@jbrowse/core 2.11.0 → 2.11.2
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/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +2 -6
- package/BaseFeatureWidget/BaseFeatureDetail/index.js +10 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.d.ts +7 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +80 -86
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.d.ts +8 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.js +67 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.d.ts +5 -3
- package/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.js +7 -7
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SettingsDialog.d.ts +7 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/{SequenceFeatureSettingsDialog.js → dialogs/SettingsDialog.js} +20 -10
- package/BaseFeatureWidget/SequenceFeatureDetails/hooks.js +2 -8
- package/BaseFeatureWidget/SequenceFeatureDetails/index.d.ts +1 -3
- package/BaseFeatureWidget/SequenceFeatureDetails/index.js +3 -67
- package/BaseFeatureWidget/SequenceFeatureDetails/model.d.ts +14 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/model.js +40 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDNASequence.d.ts +15 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/{CDNASequence.js → seqtypes/CDNASequence.js} +17 -8
- package/BaseFeatureWidget/SequenceFeatureDetails/{CDSSequence.d.ts → seqtypes/CDSSequence.d.ts} +1 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/{CDSSequence.js → seqtypes/CDSSequence.js} +2 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/{GenomicSequence.js → seqtypes/GenomicSequence.js} +1 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/{ProteinSequence.d.ts → seqtypes/ProteinSequence.d.ts} +1 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/{ProteinSequence.js → seqtypes/ProteinSequence.js} +2 -2
- package/BaseFeatureWidget/stateModelFactory.d.ts +32 -0
- package/BaseFeatureWidget/stateModelFactory.js +5 -0
- package/BaseFeatureWidget/types.d.ts +2 -7
- package/BaseFeatureWidget/util.d.ts +4 -2
- package/PluginManager.d.ts +1 -1
- package/ReExports/modules.d.ts +1 -1
- package/configuration/util.js +4 -11
- package/data_adapters/CytobandAdapter/index.d.ts +1 -2
- package/data_adapters/CytobandAdapter/index.js +3 -2
- package/package.json +3 -3
- package/pluggableElementTypes/models/BaseDisplayModel.d.ts +3 -3
- package/pluggableElementTypes/models/BaseDisplayModel.js +3 -3
- package/pluggableElementTypes/renderers/util/serializableFilterChain.js +4 -1
- package/rpc/methods/util.d.ts +3 -2
- package/rpc/methods/util.js +0 -7
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/ErrorMessageStackTraceDialog.js +13 -8
- package/ui/index.d.ts +0 -1
- package/ui/index.js +1 -3
- package/util/blockTypes.d.ts +4 -0
- package/util/blockTypes.js +14 -3
- package/util/calculateDynamicBlocks.js +2 -3
- package/util/index.d.ts +8 -0
- package/util/index.js +12 -2
- package/util/jexl.d.ts +1 -1
- package/util/jexl.js +2 -2
- package/util/range.d.ts +1 -1
- package/util/simpleFeature.d.ts +4 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/CDNASequence.d.ts +0 -13
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureSettingsDialog.d.ts +0 -9
- package/ui/ResizeBar.d.ts +0 -7
- package/ui/ResizeBar.js +0 -80
- package/ui/Tooltip.d.ts +0 -11
- package/ui/Tooltip.js +0 -54
- /package/BaseFeatureWidget/SequenceFeatureDetails/{SequenceHelpDialog.d.ts → dialogs/HelpDialog.d.ts} +0 -0
- /package/BaseFeatureWidget/SequenceFeatureDetails/{SequenceHelpDialog.js → dialogs/HelpDialog.js} +0 -0
- /package/BaseFeatureWidget/SequenceFeatureDetails/{GenomicSequence.d.ts → seqtypes/GenomicSequence.d.ts} +0 -0
|
@@ -28,6 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const react_1 = __importStar(require("react"));
|
|
30
30
|
const material_1 = require("@mui/material");
|
|
31
|
+
const mui_1 = require("tss-react/mui");
|
|
31
32
|
const source_map_js_1 = require("source-map-js");
|
|
32
33
|
const copy_to_clipboard_1 = __importDefault(require("copy-to-clipboard"));
|
|
33
34
|
// locals
|
|
@@ -90,7 +91,7 @@ async function mapStackTrace(stack) {
|
|
|
90
91
|
mappedStack.push(line);
|
|
91
92
|
continue;
|
|
92
93
|
}
|
|
93
|
-
mappedStack.push(`${originalPosition.source}:${originalPosition.line}:${originalPosition.column + 1}`);
|
|
94
|
+
mappedStack.push(`${originalPosition.source}:${originalPosition.line}:${originalPosition.column + 1} (${match[1].trim()})`);
|
|
94
95
|
}
|
|
95
96
|
return mappedStack.join('\n');
|
|
96
97
|
}
|
|
@@ -107,7 +108,17 @@ function stripMessage(trace, error) {
|
|
|
107
108
|
return trace;
|
|
108
109
|
}
|
|
109
110
|
}
|
|
111
|
+
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
112
|
+
pre: {
|
|
113
|
+
background: (0, material_1.alpha)(theme.palette.error.main, 0.2),
|
|
114
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
115
|
+
overflow: 'auto',
|
|
116
|
+
margin: 20,
|
|
117
|
+
maxHeight: 300,
|
|
118
|
+
},
|
|
119
|
+
}));
|
|
110
120
|
function Contents({ text, extra }) {
|
|
121
|
+
const { classes } = useStyles();
|
|
111
122
|
const err = encodeURIComponent([
|
|
112
123
|
'I got this error from JBrowse, here is the stack trace:\n',
|
|
113
124
|
'```',
|
|
@@ -129,13 +140,7 @@ function Contents({ text, extra }) {
|
|
|
129
140
|
" or send an email to ",
|
|
130
141
|
react_1.default.createElement(Link2, { href: emailLink }, email),
|
|
131
142
|
' '),
|
|
132
|
-
react_1.default.createElement("pre", {
|
|
133
|
-
background: 'lightgrey',
|
|
134
|
-
border: '1px solid black',
|
|
135
|
-
overflow: 'auto',
|
|
136
|
-
margin: 20,
|
|
137
|
-
maxHeight: 300,
|
|
138
|
-
} }, err2)));
|
|
143
|
+
react_1.default.createElement("pre", { className: classes.pre }, err2)));
|
|
139
144
|
}
|
|
140
145
|
function ErrorMessageStackTraceDialog({ error, onClose, extra, }) {
|
|
141
146
|
const [mappedStackTrace, setMappedStackTrace] = (0, react_1.useState)();
|
package/ui/index.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export { default as FileSelector } from './FileSelector';
|
|
|
11
11
|
export { default as LoadingEllipses } from './LoadingEllipses';
|
|
12
12
|
export { default as Menu } from './Menu';
|
|
13
13
|
export { default as PrerenderedCanvas } from './PrerenderedCanvas';
|
|
14
|
-
export { default as Tooltip } from './Tooltip';
|
|
15
14
|
export { default as ReturnToImportFormDialog } from './ReturnToImportFormDialog';
|
|
16
15
|
export { default as ResizeHandle } from './ResizeHandle';
|
|
17
16
|
export { default as SanitizedHTML } from './SanitizedHTML';
|
package/ui/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.SanitizedHTML = exports.ResizeHandle = exports.ReturnToImportFormDialog = exports.
|
|
20
|
+
exports.SanitizedHTML = exports.ResizeHandle = exports.ReturnToImportFormDialog = exports.PrerenderedCanvas = exports.Menu = exports.LoadingEllipses = exports.FileSelector = exports.FatalErrorDialog = exports.FactoryResetDialog = exports.ErrorMessage = exports.EditableTypography = exports.Dialog = exports.CascadingMenu = exports.AssemblySelector = exports.Logomark = exports.LogoFull = void 0;
|
|
21
21
|
__exportStar(require("./theme"), exports);
|
|
22
22
|
var Logo_1 = require("./Logo");
|
|
23
23
|
Object.defineProperty(exports, "LogoFull", { enumerable: true, get: function () { return Logo_1.LogoFull; } });
|
|
@@ -44,8 +44,6 @@ var Menu_1 = require("./Menu");
|
|
|
44
44
|
Object.defineProperty(exports, "Menu", { enumerable: true, get: function () { return __importDefault(Menu_1).default; } });
|
|
45
45
|
var PrerenderedCanvas_1 = require("./PrerenderedCanvas");
|
|
46
46
|
Object.defineProperty(exports, "PrerenderedCanvas", { enumerable: true, get: function () { return __importDefault(PrerenderedCanvas_1).default; } });
|
|
47
|
-
var Tooltip_1 = require("./Tooltip");
|
|
48
|
-
Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return __importDefault(Tooltip_1).default; } });
|
|
49
47
|
var ReturnToImportFormDialog_1 = require("./ReturnToImportFormDialog");
|
|
50
48
|
Object.defineProperty(exports, "ReturnToImportFormDialog", { enumerable: true, get: function () { return __importDefault(ReturnToImportFormDialog_1).default; } });
|
|
51
49
|
var ResizeHandle_1 = require("./ResizeHandle");
|
package/util/blockTypes.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export declare class BlockSet {
|
|
|
21
21
|
get totalBp(): number;
|
|
22
22
|
}
|
|
23
23
|
export declare class BaseBlock {
|
|
24
|
+
type: string;
|
|
24
25
|
regionNumber?: number;
|
|
25
26
|
reversed?: boolean;
|
|
26
27
|
refName: string;
|
|
@@ -45,12 +46,14 @@ export declare class BaseBlock {
|
|
|
45
46
|
};
|
|
46
47
|
}
|
|
47
48
|
export declare class ContentBlock extends BaseBlock {
|
|
49
|
+
type: string;
|
|
48
50
|
}
|
|
49
51
|
/**
|
|
50
52
|
* marker block representing one or more blocks that are
|
|
51
53
|
* too small to be shown at the current zoom level
|
|
52
54
|
*/
|
|
53
55
|
export declare class ElidedBlock extends BaseBlock {
|
|
56
|
+
type: string;
|
|
54
57
|
widthPx: number;
|
|
55
58
|
elidedBlockCount: number;
|
|
56
59
|
constructor(data: Record<string, any>);
|
|
@@ -61,5 +64,6 @@ export declare class ElidedBlock extends BaseBlock {
|
|
|
61
64
|
* and provides a thick border between them
|
|
62
65
|
*/
|
|
63
66
|
export declare class InterRegionPaddingBlock extends BaseBlock {
|
|
67
|
+
type: string;
|
|
64
68
|
}
|
|
65
69
|
export {};
|
package/util/blockTypes.js
CHANGED
|
@@ -7,9 +7,10 @@ class BlockSet {
|
|
|
7
7
|
this.blocks = blocks;
|
|
8
8
|
}
|
|
9
9
|
push(block) {
|
|
10
|
-
if (block
|
|
10
|
+
if (block.type === 'ElidedBlock' && this.blocks.length > 0) {
|
|
11
11
|
const lastBlock = this.blocks.at(-1);
|
|
12
|
-
if (lastBlock
|
|
12
|
+
if ((lastBlock === null || lastBlock === void 0 ? void 0 : lastBlock.type) === 'ElidedBlock') {
|
|
13
|
+
;
|
|
13
14
|
lastBlock.push(block);
|
|
14
15
|
return;
|
|
15
16
|
}
|
|
@@ -49,7 +50,7 @@ class BlockSet {
|
|
|
49
50
|
return this.blocks.length > 0 ? this.blocks[0].offsetPx : 0;
|
|
50
51
|
}
|
|
51
52
|
get contentBlocks() {
|
|
52
|
-
return this.blocks.filter(block => block
|
|
53
|
+
return this.blocks.filter(block => block.type === 'ContentBlock');
|
|
53
54
|
}
|
|
54
55
|
get totalBp() {
|
|
55
56
|
return (0, _1.sum)(this.contentBlocks.map(block => block.end - block.start));
|
|
@@ -62,6 +63,7 @@ class BaseBlock {
|
|
|
62
63
|
*/
|
|
63
64
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
64
65
|
constructor(data) {
|
|
66
|
+
this.type = 'BaseBlock';
|
|
65
67
|
this.widthPx = 0;
|
|
66
68
|
Object.assign(this, data);
|
|
67
69
|
this.assemblyName = data.assemblyName;
|
|
@@ -83,6 +85,10 @@ class BaseBlock {
|
|
|
83
85
|
}
|
|
84
86
|
exports.BaseBlock = BaseBlock;
|
|
85
87
|
class ContentBlock extends BaseBlock {
|
|
88
|
+
constructor() {
|
|
89
|
+
super(...arguments);
|
|
90
|
+
this.type = 'ContentBlock';
|
|
91
|
+
}
|
|
86
92
|
}
|
|
87
93
|
exports.ContentBlock = ContentBlock;
|
|
88
94
|
/**
|
|
@@ -93,6 +99,7 @@ class ElidedBlock extends BaseBlock {
|
|
|
93
99
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
94
100
|
constructor(data) {
|
|
95
101
|
super(data);
|
|
102
|
+
this.type = 'ElidedBlock';
|
|
96
103
|
this.elidedBlockCount = 0;
|
|
97
104
|
this.widthPx = data.widthPx;
|
|
98
105
|
}
|
|
@@ -112,5 +119,9 @@ exports.ElidedBlock = ElidedBlock;
|
|
|
112
119
|
* and provides a thick border between them
|
|
113
120
|
*/
|
|
114
121
|
class InterRegionPaddingBlock extends BaseBlock {
|
|
122
|
+
constructor() {
|
|
123
|
+
super(...arguments);
|
|
124
|
+
this.type = 'InterRegionPaddingBlock';
|
|
125
|
+
}
|
|
115
126
|
}
|
|
116
127
|
exports.InterRegionPaddingBlock = InterRegionPaddingBlock;
|
|
@@ -38,10 +38,9 @@ function calculateDynamicBlocks(model, padding = true, elision = true) {
|
|
|
38
38
|
const displayedRegionRightPx = displayedRegionLeftPx + (regionEnd - regionStart) / bpPerPx;
|
|
39
39
|
const regionWidthPx = (regionEnd - regionStart) / bpPerPx;
|
|
40
40
|
const parentRegion = (0, mobx_state_tree_1.isStateTreeNode)(region) ? (0, mobx_state_tree_1.getSnapshot)(region) : region;
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
const [leftPx, rightPx] = (0, range_1.intersection2)(windowLeftPx, windowRightPx, displayedRegionLeftPx, displayedRegionRightPx);
|
|
42
|
+
if (leftPx !== undefined && rightPx !== undefined) {
|
|
43
43
|
// this displayed region overlaps the view, so make a record for it
|
|
44
|
-
const [leftPx, rightPx] = (0, range_1.intersection2)(windowLeftPx, windowRightPx, displayedRegionLeftPx, displayedRegionRightPx);
|
|
45
44
|
let start;
|
|
46
45
|
let end;
|
|
47
46
|
let isLeftEndOfDisplayedRegion;
|
package/util/index.d.ts
CHANGED
|
@@ -392,6 +392,14 @@ interface BasicFeature {
|
|
|
392
392
|
}
|
|
393
393
|
export declare function gatherOverlaps(regions: BasicFeature[]): BasicFeature[];
|
|
394
394
|
export declare function stripAlpha(str: string): string;
|
|
395
|
+
export declare function getStrokeProps(str: string): {
|
|
396
|
+
strokeOpacity: number;
|
|
397
|
+
stroke: string;
|
|
398
|
+
};
|
|
399
|
+
export declare function getFillProps(str: string): {
|
|
400
|
+
fillOpacity: number;
|
|
401
|
+
fill: string;
|
|
402
|
+
};
|
|
395
403
|
export declare function renderToStaticMarkup(node: React.ReactElement, createRootFn?: (elt: Element | DocumentFragment) => {
|
|
396
404
|
render: (node: React.ReactElement) => unknown;
|
|
397
405
|
}): string;
|
package/util/index.js
CHANGED
|
@@ -18,7 +18,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
20
|
exports.getBpDisplayStr = exports.isSupportedIndexingAdapter = exports.bytesForRegions = exports.objectHash = exports.hashCode = exports.updateStatus = exports.generateCodonTable = exports.defaultCodonTable = exports.defaultStops = exports.defaultStarts = exports.getFrame = exports.measureText = exports.rIC = exports.complement = exports.reverse = exports.revcom = exports.isElectron = exports.stringify = exports.shorten = exports.minmax = exports.renameRegionsIfNeeded = exports.renameRegionIfNeeded = exports.makeAbortableReaction = exports.findLast = exports.findLastIndex = exports.iterMap = exports.bpSpanPx = exports.featureSpanPx = exports.cartesianToPolar = exports.polarToCartesian = exports.degToRad = exports.radToDeg = exports.bpToPx = exports.clamp = exports.compareLocStrings = exports.compareLocs = exports.parseLocString = exports.parseLocStringOneBased = exports.assembleLocStringFast = exports.assembleLocString = exports.getContainingDisplay = exports.getContainingTrack = exports.getContainingView = exports.getSession = exports.findParentThatIs = exports.springAnimate = exports.findParentThat = exports.useDebouncedCallback = exports.useWidthSetter = exports.useDebounce = void 0;
|
|
21
|
-
exports.blobToDataURL = exports.isFeature = exports.SimpleFeature = exports.renderToStaticMarkup = exports.stripAlpha = exports.gatherOverlaps = exports.mergeIntervals = exports.notEmpty = exports.groupBy = exports.avg = exports.sum = exports.min = exports.max = exports.localStorageSetItem = exports.localStorageGetItem = exports.getEnv = exports.measureGridWidth = exports.linkify = exports.coarseStripHTML = exports.getStr = exports.getUriLink = exports.useLocalStorage = exports.getLayoutId = exports.getViewParams = exports.getTickDisplayStr = exports.toLocale = void 0;
|
|
21
|
+
exports.blobToDataURL = exports.isFeature = exports.SimpleFeature = exports.renderToStaticMarkup = exports.getFillProps = exports.getStrokeProps = exports.stripAlpha = exports.gatherOverlaps = exports.mergeIntervals = exports.notEmpty = exports.groupBy = exports.avg = exports.sum = exports.min = exports.max = exports.localStorageSetItem = exports.localStorageGetItem = exports.getEnv = exports.measureGridWidth = exports.linkify = exports.coarseStripHTML = exports.getStr = exports.getUriLink = exports.useLocalStorage = exports.getLayoutId = exports.getViewParams = exports.getTickDisplayStr = exports.toLocale = void 0;
|
|
22
22
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
23
23
|
const react_1 = require("react");
|
|
24
24
|
const is_object_1 = __importDefault(require("is-object"));
|
|
@@ -1150,6 +1150,16 @@ function stripAlpha(str) {
|
|
|
1150
1150
|
return c.alpha(1).toHex();
|
|
1151
1151
|
}
|
|
1152
1152
|
exports.stripAlpha = stripAlpha;
|
|
1153
|
+
function getStrokeProps(str) {
|
|
1154
|
+
const c = (0, colord_1.colord)(str);
|
|
1155
|
+
return { strokeOpacity: c.alpha(), stroke: c.alpha(1).toHex() };
|
|
1156
|
+
}
|
|
1157
|
+
exports.getStrokeProps = getStrokeProps;
|
|
1158
|
+
function getFillProps(str) {
|
|
1159
|
+
const c = (0, colord_1.colord)(str);
|
|
1160
|
+
return { fillOpacity: c.alpha(), fill: c.alpha(1).toHex() };
|
|
1161
|
+
}
|
|
1162
|
+
exports.getFillProps = getFillProps;
|
|
1153
1163
|
// https://react.dev/reference/react-dom/server/renderToString#removing-rendertostring-from-the-client-code
|
|
1154
1164
|
function renderToStaticMarkup(node, createRootFn) {
|
|
1155
1165
|
const div = document.createElement('div');
|
|
@@ -1161,7 +1171,7 @@ function renderToStaticMarkup(node, createRootFn) {
|
|
|
1161
1171
|
(0, react_dom_1.render)(node, div);
|
|
1162
1172
|
}
|
|
1163
1173
|
});
|
|
1164
|
-
return div.innerHTML;
|
|
1174
|
+
return div.innerHTML.replaceAll(/\brgba\((.+?),[^,]+?\)/g, 'rgb($1)');
|
|
1165
1175
|
}
|
|
1166
1176
|
exports.renderToStaticMarkup = renderToStaticMarkup;
|
|
1167
1177
|
var simpleFeature_1 = require("./simpleFeature");
|
package/util/jexl.d.ts
CHANGED
package/util/jexl.js
CHANGED
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jexl_1 = __importDefault(require("jexl"));
|
|
7
|
-
function
|
|
7
|
+
function JexlF( /* config?: any*/) {
|
|
8
8
|
const j = new jexl_1.default.Jexl();
|
|
9
9
|
// someday will make sure all of configs callbacks are added in, including
|
|
10
10
|
// ones passed in
|
|
@@ -61,4 +61,4 @@ function default_1( /* config?: any*/) {
|
|
|
61
61
|
j.addBinaryOp('&', 15, (a, b) => a & b);
|
|
62
62
|
return j;
|
|
63
63
|
}
|
|
64
|
-
exports.default =
|
|
64
|
+
exports.default = JexlF;
|
package/util/range.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @returns array of [left, right], or [] if the ranges do not intersect. the choice of [] is because it allows destructuring array assignment without check for undefined return
|
|
7
7
|
*/
|
|
8
|
-
export declare function intersection2(left1: number, right1: number, left2: number, right2: number): number[];
|
|
8
|
+
export declare function intersection2(left1: number, right1: number, left2: number, right2: number): [number, number] | [];
|
|
9
9
|
/**
|
|
10
10
|
* Return whether 2 interbase coordinate ranges intersect.
|
|
11
11
|
*
|
package/util/simpleFeature.d.ts
CHANGED
|
@@ -48,6 +48,10 @@ export interface SimpleFeatureArgs {
|
|
|
48
48
|
export interface SimpleFeatureSerializedNoId {
|
|
49
49
|
[key: string]: unknown;
|
|
50
50
|
parentId?: string;
|
|
51
|
+
start: number;
|
|
52
|
+
end: number;
|
|
53
|
+
refName: string;
|
|
54
|
+
type?: string;
|
|
51
55
|
subfeatures?: SimpleFeatureSerializedNoId[];
|
|
52
56
|
}
|
|
53
57
|
export interface SimpleFeatureSerialized extends SimpleFeatureSerializedNoId {
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Feat } from '../util';
|
|
3
|
-
export default function CDNASequence({ utr, cds, exons, sequence, upstream, downstream, includeIntrons, collapseIntron, intronBp, }: {
|
|
4
|
-
utr: Feat[];
|
|
5
|
-
cds: Feat[];
|
|
6
|
-
exons: Feat[];
|
|
7
|
-
sequence: string;
|
|
8
|
-
upstream?: string;
|
|
9
|
-
downstream?: string;
|
|
10
|
-
includeIntrons?: boolean;
|
|
11
|
-
collapseIntron?: boolean;
|
|
12
|
-
intronBp: number;
|
|
13
|
-
}): React.JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export default function SequenceFeatureSettingsDialog({ handleClose, intronBp: intronBpArg, upDownBp: upDownBpArg, }: {
|
|
3
|
-
handleClose: (arg?: {
|
|
4
|
-
intronBp: number;
|
|
5
|
-
upDownBp: number;
|
|
6
|
-
}) => void;
|
|
7
|
-
intronBp: number;
|
|
8
|
-
upDownBp: number;
|
|
9
|
-
}): React.JSX.Element;
|
package/ui/ResizeBar.d.ts
DELETED
package/ui/ResizeBar.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const react_1 = __importStar(require("react"));
|
|
30
|
-
const mui_1 = require("tss-react/mui");
|
|
31
|
-
// locals
|
|
32
|
-
const ResizeHandle_1 = __importDefault(require("./ResizeHandle"));
|
|
33
|
-
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
34
|
-
resizeBar: {
|
|
35
|
-
background: theme.palette.action.disabledBackground,
|
|
36
|
-
height: 12,
|
|
37
|
-
position: 'relative',
|
|
38
|
-
overflow: 'hidden',
|
|
39
|
-
},
|
|
40
|
-
tick: {
|
|
41
|
-
position: 'absolute',
|
|
42
|
-
height: '100%',
|
|
43
|
-
pointerEvents: 'none',
|
|
44
|
-
background: theme.palette.action.disabled,
|
|
45
|
-
width: 1,
|
|
46
|
-
},
|
|
47
|
-
hiddenTick: {
|
|
48
|
-
position: 'absolute',
|
|
49
|
-
height: '100%',
|
|
50
|
-
width: 5,
|
|
51
|
-
},
|
|
52
|
-
}));
|
|
53
|
-
function Tick({ left, scrollLeft, idx, onDrag, onMouseDown, }) {
|
|
54
|
-
const { classes } = useStyles();
|
|
55
|
-
const onDragCallback = (0, react_1.useCallback)((lastFrameDistance, totalDistance) => onDrag(lastFrameDistance, totalDistance, idx), [idx, onDrag]);
|
|
56
|
-
// has an invisible wider than tick mark (1px) clickable area (5px)
|
|
57
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
58
|
-
react_1.default.createElement(ResizeHandle_1.default, { onDrag: onDragCallback, onMouseDown: onMouseDown, vertical: true, className: classes.hiddenTick, style: { left: left - scrollLeft - 2.5 } }),
|
|
59
|
-
react_1.default.createElement("div", { style: { left: left - scrollLeft }, className: classes.tick })));
|
|
60
|
-
}
|
|
61
|
-
function ResizeBar({ widths, setWidths, checkbox, scrollLeft = 0, }) {
|
|
62
|
-
const { classes } = useStyles();
|
|
63
|
-
const offsets = [];
|
|
64
|
-
const [initial, setInitial] = (0, react_1.useState)();
|
|
65
|
-
let init = checkbox ? 52 : 0;
|
|
66
|
-
for (let i = 0; i < widths.length; i++) {
|
|
67
|
-
const width = widths[i];
|
|
68
|
-
offsets[i] = width + init;
|
|
69
|
-
init += width;
|
|
70
|
-
}
|
|
71
|
-
return (react_1.default.createElement("div", { className: classes.resizeBar }, offsets.map((left, i) => (react_1.default.createElement(Tick, { key: i, onMouseDown: () => {
|
|
72
|
-
setInitial([...widths]);
|
|
73
|
-
}, left: i === offsets.length - 1 ? left - 3 : left, onDrag: (_, totalDistance, idx) => {
|
|
74
|
-
const newWidths = [...widths];
|
|
75
|
-
// mui doesn't allow columns smaller than 50
|
|
76
|
-
newWidths[idx] = Math.max(initial[idx] - totalDistance, 50);
|
|
77
|
-
setWidths(newWidths);
|
|
78
|
-
}, idx: i, scrollLeft: scrollLeft })))));
|
|
79
|
-
}
|
|
80
|
-
exports.default = ResizeBar;
|
package/ui/Tooltip.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Feature } from '../util';
|
|
3
|
-
import { AnyConfigurationModel } from '../configuration';
|
|
4
|
-
declare const Tooltip: ({ offsetX, offsetY, configuration, feature, timeout, }: {
|
|
5
|
-
offsetX: number;
|
|
6
|
-
offsetY: number;
|
|
7
|
-
configuration: AnyConfigurationModel;
|
|
8
|
-
feature?: Feature;
|
|
9
|
-
timeout?: number;
|
|
10
|
-
}) => React.JSX.Element | null;
|
|
11
|
-
export default Tooltip;
|
package/ui/Tooltip.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const react_1 = __importStar(require("react"));
|
|
27
|
-
const mui_1 = require("tss-react/mui");
|
|
28
|
-
const mobx_react_1 = require("mobx-react");
|
|
29
|
-
const configuration_1 = require("../configuration");
|
|
30
|
-
const useStyles = (0, mui_1.makeStyles)()({
|
|
31
|
-
hoverLabel: {
|
|
32
|
-
border: '1px solid black',
|
|
33
|
-
position: 'absolute',
|
|
34
|
-
background: '#fffa',
|
|
35
|
-
pointerEvents: 'none',
|
|
36
|
-
zIndex: 10000,
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
const Tooltip = (0, mobx_react_1.observer)(function ({ offsetX, offsetY, configuration, feature, timeout = 300, }) {
|
|
40
|
-
const { classes } = useStyles();
|
|
41
|
-
const [shown, setShown] = (0, react_1.useState)(false);
|
|
42
|
-
(0, react_1.useEffect)(() => {
|
|
43
|
-
// only show the loading message after short timeout to prevent excessive
|
|
44
|
-
// flickering
|
|
45
|
-
const handle = setTimeout(() => setShown(true), timeout);
|
|
46
|
-
return () => clearTimeout(handle);
|
|
47
|
-
});
|
|
48
|
-
if (feature && shown) {
|
|
49
|
-
const text = (0, configuration_1.readConfObject)(configuration, 'mouseover', { feature });
|
|
50
|
-
return (react_1.default.createElement("div", { className: classes.hoverLabel, style: { left: offsetX, top: offsetY } }, text));
|
|
51
|
-
}
|
|
52
|
-
return null;
|
|
53
|
-
});
|
|
54
|
-
exports.default = Tooltip;
|
|
File without changes
|
/package/BaseFeatureWidget/SequenceFeatureDetails/{SequenceHelpDialog.js → dialogs/HelpDialog.js}
RENAMED
|
File without changes
|
|
File without changes
|