@jbrowse/core 2.13.0 → 2.14.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/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +2 -2
- package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +1 -1
- package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +3 -1
- package/BaseFeatureWidget/BaseFeatureDetail/index.js +28 -25
- package/BaseFeatureWidget/BaseFeatureDetail/util.js +1 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +11 -5
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.d.ts +1 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.js +11 -7
- package/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.js +1 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.js +6 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.js +11 -5
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceFeatureMenu.js +15 -5
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.js +4 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SettingsDialog.js +15 -5
- package/BaseFeatureWidget/SequenceFeatureDetails/hooks.js +2 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDNASequence.js +2 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.js +5 -3
- package/BaseFeatureWidget/stateModelFactory.js +0 -2
- package/PluginLoader.d.ts +1 -2
- package/PluginLoader.js +16 -6
- package/PluginManager.d.ts +13 -13
- package/PluginManager.js +7 -2
- package/ReExports/modules.js +2 -11
- package/assemblyManager/assembly.d.ts +18 -12
- package/assemblyManager/assembly.js +75 -52
- package/assemblyManager/assemblyConfigSchema.d.ts +9 -7
- package/assemblyManager/assemblyConfigSchema.js +15 -16
- package/assemblyManager/assemblyManager.d.ts +109 -81
- package/assemblyManager/assemblyManager.js +3 -6
- package/configuration/configurationSchema.d.ts +1 -1
- package/configuration/configurationSchema.js +1 -2
- package/configuration/configurationSlot.js +7 -8
- package/configuration/util.js +0 -7
- package/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +6 -6
- package/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +6 -6
- package/data_adapters/BaseAdapter/BaseRefNameAliasAdapter.d.ts +1 -0
- package/data_adapters/CytobandAdapter/CytobandAdapter.d.ts +0 -1
- package/data_adapters/CytobandAdapter/CytobandAdapter.js +4 -8
- package/data_adapters/dataAdapterCache.d.ts +9 -6
- package/data_adapters/dataAdapterCache.js +16 -22
- package/package.json +3 -3
- package/pluggableElementTypes/AddTrackWorkflowType.js +0 -6
- package/pluggableElementTypes/ConnectionType.js +0 -6
- package/pluggableElementTypes/DisplayType.js +0 -20
- package/pluggableElementTypes/InternetAccountType.js +0 -11
- package/pluggableElementTypes/RpcMethodType.d.ts +1 -1
- package/pluggableElementTypes/TextSearchAdapterType.js +0 -3
- package/pluggableElementTypes/TrackType.js +0 -11
- package/pluggableElementTypes/ViewType.js +0 -6
- package/pluggableElementTypes/WidgetType.js +0 -6
- package/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +4 -3
- package/pluggableElementTypes/models/BaseConnectionModelFactory.js +1 -3
- package/pluggableElementTypes/models/BaseDisplayModel.d.ts +4 -5
- package/pluggableElementTypes/models/BaseDisplayModel.js +6 -14
- package/pluggableElementTypes/models/BaseTrackModel.js +8 -5
- package/pluggableElementTypes/models/InternetAccountModel.d.ts +1 -1
- package/pluggableElementTypes/models/InternetAccountModel.js +19 -13
- package/pluggableElementTypes/models/baseTrackConfig.js +2 -5
- package/pluggableElementTypes/renderers/BoxRendererType.d.ts +10 -4
- package/pluggableElementTypes/renderers/BoxRendererType.js +10 -26
- package/pluggableElementTypes/renderers/CircularChordRendererType.d.ts +1 -1
- package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.d.ts +9 -12
- package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.js +12 -19
- package/pluggableElementTypes/renderers/FeatureRendererType.d.ts +5 -5
- package/pluggableElementTypes/renderers/FeatureRendererType.js +6 -13
- package/pluggableElementTypes/renderers/RendererType.js +0 -10
- package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.d.ts +1 -1
- package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.js +8 -9
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.js +11 -14
- package/pluggableElementTypes/renderers/ServerSideRendererType.d.ts +4 -4
- package/pluggableElementTypes/renderers/ServerSideRendererType.js +7 -5
- package/pluggableElementTypes/renderers/util/serializableFilterChain.js +0 -1
- package/rpc/BaseRpcDriver.d.ts +1 -1
- package/rpc/BaseRpcDriver.js +12 -11
- package/rpc/MainThreadRpcDriver.d.ts +2 -2
- package/rpc/MainThreadRpcDriver.js +3 -0
- package/rpc/RpcManager.d.ts +1 -1
- package/rpc/RpcManager.js +11 -8
- package/rpc/configSchema.js +0 -1
- package/rpc/methods/CoreFreeResources.d.ts +2 -2
- package/rpc/methods/CoreGetFeatureDensityStats.d.ts +2 -2
- package/rpc/methods/CoreGetFeatureDetails.d.ts +1 -1
- package/rpc/methods/CoreGetFeatureDetails.js +3 -3
- package/rpc/methods/CoreGetFeatures.d.ts +1 -1
- package/rpc/methods/CoreGetFileInfo.d.ts +1 -1
- package/rpc/methods/CoreGetMetadata.d.ts +1 -1
- package/rpc/methods/CoreGetRefNames.d.ts +1 -1
- package/rpc/methods/util.d.ts +2 -2
- package/rpc/methods/util.js +0 -3
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/AssemblySelector.js +3 -1
- package/ui/CascadingMenu.js +2 -1
- package/ui/CascadingMenuButton.js +3 -1
- package/ui/ColorPicker.js +14 -4
- package/ui/DropDownMenu.js +3 -1
- package/ui/EditableTypography.js +6 -2
- package/ui/ErrorMessage.d.ts +2 -2
- package/ui/ErrorMessage.js +37 -20
- package/ui/ErrorMessageStackTraceDialog.js +11 -9
- package/ui/FactoryResetDialog.d.ts +1 -1
- package/ui/FactoryResetDialog.js +9 -3
- package/ui/FatalErrorDialog.js +9 -3
- package/ui/FileSelector/FileSelector.js +8 -4
- package/ui/FileSelector/LocalFileChooser.js +7 -6
- package/ui/LoadingEllipses.js +1 -1
- package/ui/Menu.d.ts +4 -4
- package/ui/Menu.js +6 -9
- package/ui/MenuButton.js +6 -2
- package/ui/PrerenderedCanvas.js +8 -5
- package/ui/RedErrorMessageBox.js +13 -8
- package/ui/ResizeHandle.d.ts +1 -1
- package/ui/ReturnToImportFormDialog.js +3 -1
- package/ui/SanitizedHTML.js +1 -3
- package/ui/SnackbarModel.d.ts +12 -1
- package/ui/SnackbarModel.js +19 -3
- package/ui/theme.js +5 -5
- package/util/Base1DViewModel.js +3 -1
- package/util/QuickLRU.js +8 -8
- package/util/TimeTraveller.js +12 -4
- package/util/analytics.js +0 -1
- package/util/blockTypes.js +5 -9
- package/util/calculateStaticBlocks.d.ts +1 -1
- package/util/compositeMap.js +2 -2
- package/util/idMaker.js +0 -1
- package/util/index.d.ts +9 -8
- package/util/index.js +91 -51
- package/util/io/RemoteFileWithRangeCache.js +1 -3
- package/util/io/index.js +3 -5
- package/util/jexlStrings.js +5 -8
- package/util/layouts/GranularRectLayout.js +1 -4
- package/util/layouts/SceneGraph.d.ts +1 -1
- package/util/layouts/SceneGraph.js +2 -6
- package/util/map-obj.js +15 -7
- package/util/mst-reflection.js +1 -2
- package/util/nanoid.js +9 -8
- package/util/offscreenCanvasPonyfill.d.ts +1 -1
- package/util/offscreenCanvasPonyfill.js +7 -10
- package/util/offscreenCanvasUtils.d.ts +1 -1
- package/util/offscreenCanvasUtils.js +1 -3
- package/util/rxjs.js +4 -2
- package/util/simpleFeature.d.ts +2 -3
- package/util/simpleFeature.js +9 -12
- package/util/stats.js +3 -1
- package/util/tracks.d.ts +4 -2
- package/util/tracks.js +10 -11
- package/util/types/index.d.ts +5 -5
- package/util/types/index.js +8 -1
- package/util/types/mst.js +1 -0
- package/util/when.js +7 -2
package/util/simpleFeature.d.ts
CHANGED
|
@@ -7,8 +7,7 @@ export interface Feature {
|
|
|
7
7
|
* 'start' and 'end', but everything else is optional.
|
|
8
8
|
*/
|
|
9
9
|
get(name: 'refName'): string;
|
|
10
|
-
get(name: 'start'): number;
|
|
11
|
-
get(name: 'end'): number;
|
|
10
|
+
get(name: 'start' | 'end'): number;
|
|
12
11
|
get(name: 'subfeatures'): Feature[] | undefined;
|
|
13
12
|
get(name: string): any;
|
|
14
13
|
/**
|
|
@@ -39,7 +38,7 @@ export interface Feature {
|
|
|
39
38
|
export declare function isFeature(thing: unknown): thing is Feature;
|
|
40
39
|
export interface SimpleFeatureArgs {
|
|
41
40
|
/** key-value data, must include 'start' and 'end' */
|
|
42
|
-
data:
|
|
41
|
+
data: Record<string, unknown>;
|
|
43
42
|
/** optional parent feature */
|
|
44
43
|
parent?: Feature;
|
|
45
44
|
/** unique identifier. can also be in data.uniqueId */
|
package/util/simpleFeature.js
CHANGED
|
@@ -26,15 +26,17 @@ class SimpleFeature {
|
|
|
26
26
|
this.data = args;
|
|
27
27
|
}
|
|
28
28
|
else {
|
|
29
|
-
this.data = args.data
|
|
30
|
-
// load handle from args.parent (not args.data.parent)
|
|
31
|
-
//
|
|
32
|
-
// parent as a Feature reference (probably a raw parent ID or something
|
|
29
|
+
this.data = args.data;
|
|
30
|
+
// load handle from args.parent (not args.data.parent) this reason is
|
|
31
|
+
// because if args is an object, it likely isn't properly loaded with
|
|
32
|
+
// parent as a Feature reference (probably a raw parent ID or something
|
|
33
|
+
// instead)
|
|
33
34
|
this.parentHandle = args.parent;
|
|
34
35
|
}
|
|
35
|
-
// the feature id comes from
|
|
36
|
-
//
|
|
36
|
+
// the feature id comes from args.id, args.data.uniqueId, or args.uniqueId
|
|
37
|
+
// due to this initialization
|
|
37
38
|
const id = isSimpleFeatureSerialized(args) ? args.uniqueId : args.id;
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
38
40
|
if (id === undefined || id === null) {
|
|
39
41
|
throw new Error('SimpleFeature requires a unique `id` or `data.uniqueId` attribute');
|
|
40
42
|
}
|
|
@@ -43,15 +45,12 @@ class SimpleFeature {
|
|
|
43
45
|
throw new Error(`invalid feature data, end less than start. end: ${this.data.end} start: ${this.data.start}`);
|
|
44
46
|
}
|
|
45
47
|
if (this.data.subfeatures) {
|
|
46
|
-
this.subfeatures = (_a = this.data.subfeatures) === null || _a === void 0 ? void 0 : _a.map(
|
|
47
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48
|
-
(f, i) => typeof f.get !== 'function'
|
|
48
|
+
this.subfeatures = (_a = this.data.subfeatures) === null || _a === void 0 ? void 0 : _a.map((f, i) => typeof f.get !== 'function'
|
|
49
49
|
? new SimpleFeature({
|
|
50
50
|
id: f.uniqueId || `${id}-${i}`,
|
|
51
51
|
data: {
|
|
52
52
|
strand: this.data.strand,
|
|
53
53
|
...f,
|
|
54
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
55
54
|
},
|
|
56
55
|
parent: this,
|
|
57
56
|
})
|
|
@@ -62,7 +61,6 @@ class SimpleFeature {
|
|
|
62
61
|
* Get a piece of data about the feature. All features must have
|
|
63
62
|
* 'start' and 'end', but everything else is optional.
|
|
64
63
|
*/
|
|
65
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
66
64
|
get(name) {
|
|
67
65
|
return name === 'subfeatures'
|
|
68
66
|
? this.subfeatures
|
|
@@ -73,7 +71,6 @@ class SimpleFeature {
|
|
|
73
71
|
/**
|
|
74
72
|
* Set an item of data.
|
|
75
73
|
*/
|
|
76
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
77
74
|
set(name, val) {
|
|
78
75
|
this.data[name] = val;
|
|
79
76
|
}
|
package/util/stats.js
CHANGED
|
@@ -63,7 +63,8 @@ function calcPerBaseStats(region, features) {
|
|
|
63
63
|
let currentFeat = 0;
|
|
64
64
|
let i = 0;
|
|
65
65
|
while (pos < end) {
|
|
66
|
-
while (currentFeat < feats.length &&
|
|
66
|
+
while (currentFeat < feats.length &&
|
|
67
|
+
pos >= feats[currentFeat].get('end')) {
|
|
67
68
|
currentFeat += 1;
|
|
68
69
|
}
|
|
69
70
|
const f = feats[currentFeat];
|
|
@@ -110,6 +111,7 @@ async function scoresToStats(region, feats) {
|
|
|
110
111
|
found = true;
|
|
111
112
|
return acc;
|
|
112
113
|
}, seed)));
|
|
114
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
113
115
|
return found
|
|
114
116
|
? rectifyStats({
|
|
115
117
|
scoreMax,
|
package/util/tracks.d.ts
CHANGED
|
@@ -5,7 +5,9 @@ export declare function getTrackAssemblyNames(track: IAnyStateTreeNode & {
|
|
|
5
5
|
configuration: AnyConfigurationModel;
|
|
6
6
|
}): string[];
|
|
7
7
|
export declare function getConfAssemblyNames(conf: AnyConfigurationModel): string[];
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* return the rpcSessionId of the highest parent node in the tree that has an
|
|
10
|
+
* rpcSessionId */
|
|
9
11
|
export declare function getRpcSessionId(thisNode: IAnyStateTreeNode): string;
|
|
10
12
|
/**
|
|
11
13
|
* given an MST node, get the renderprops of the first parent container that
|
|
@@ -16,7 +18,7 @@ export declare function getRpcSessionId(thisNode: IAnyStateTreeNode): string;
|
|
|
16
18
|
export declare function getParentRenderProps(node: IAnyStateTreeNode): any;
|
|
17
19
|
export declare const UNKNOWN = "UNKNOWN";
|
|
18
20
|
export declare const UNSUPPORTED = "UNSUPPORTED";
|
|
19
|
-
export declare function getBlob(id: string): File;
|
|
21
|
+
export declare function getBlob(id: string): File | undefined;
|
|
20
22
|
export declare function getBlobMap(): Record<string, File>;
|
|
21
23
|
export declare function setBlobMap(map: Record<string, File>): void;
|
|
22
24
|
export declare function storeBlobLocation(location: PreFileLocation): import("./types").PreUriLocation | import("./types").PreLocalPathLocation | {
|
package/util/tracks.js
CHANGED
|
@@ -28,18 +28,21 @@ function getConfAssemblyNames(conf) {
|
|
|
28
28
|
const trackAssemblyNames = (0, configuration_1.readConfObject)(conf, 'assemblyNames');
|
|
29
29
|
if (!trackAssemblyNames) {
|
|
30
30
|
// Check if it's an assembly sequence track
|
|
31
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32
31
|
const parent = (0, mobx_state_tree_1.getParent)(conf);
|
|
33
32
|
if ('sequence' in parent) {
|
|
34
33
|
return [(0, configuration_1.readConfObject)(parent, 'name')];
|
|
35
34
|
}
|
|
35
|
+
else {
|
|
36
|
+
throw new Error('unknown assembly names');
|
|
37
|
+
}
|
|
36
38
|
}
|
|
37
39
|
return trackAssemblyNames;
|
|
38
40
|
}
|
|
39
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* return the rpcSessionId of the highest parent node in the tree that has an
|
|
43
|
+
* rpcSessionId */
|
|
40
44
|
function getRpcSessionId(thisNode) {
|
|
41
45
|
let highestRpcSessionId;
|
|
42
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
43
46
|
for (let node = thisNode; !(0, mobx_state_tree_1.isRoot)(node); node = (0, mobx_state_tree_1.getParent)(node)) {
|
|
44
47
|
if ('rpcSessionId' in node) {
|
|
45
48
|
highestRpcSessionId = node.rpcSessionId;
|
|
@@ -57,11 +60,7 @@ function getRpcSessionId(thisNode) {
|
|
|
57
60
|
* @returns renderprops, or empty object if none found
|
|
58
61
|
*/
|
|
59
62
|
function getParentRenderProps(node) {
|
|
60
|
-
for (
|
|
61
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
62
|
-
let currentNode = (0, mobx_state_tree_1.getParent)(node); !(0, mobx_state_tree_1.isRoot)(currentNode);
|
|
63
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
64
|
-
currentNode = (0, mobx_state_tree_1.getParent)(currentNode)) {
|
|
63
|
+
for (let currentNode = (0, mobx_state_tree_1.getParent)(node); !(0, mobx_state_tree_1.isRoot)(currentNode); currentNode = (0, mobx_state_tree_1.getParent)(currentNode)) {
|
|
65
64
|
if ('renderProps' in currentNode) {
|
|
66
65
|
return currentNode.renderProps();
|
|
67
66
|
}
|
|
@@ -88,10 +87,10 @@ let counter = 0;
|
|
|
88
87
|
// of timestamp plus counter to be unique across sessions and fast repeated
|
|
89
88
|
// calls
|
|
90
89
|
function storeBlobLocation(location) {
|
|
91
|
-
if (
|
|
90
|
+
if ('blob' in location) {
|
|
92
91
|
const blobId = `b${+Date.now()}-${counter++}`;
|
|
93
92
|
blobMap[blobId] = location.blob;
|
|
94
|
-
return { name: location
|
|
93
|
+
return { name: location.blob.name, blobId, locationType: 'BlobLocation' };
|
|
95
94
|
}
|
|
96
95
|
return location;
|
|
97
96
|
}
|
|
@@ -129,7 +128,7 @@ function getFileName(track) {
|
|
|
129
128
|
const blob = 'blobId' in track ? track : undefined;
|
|
130
129
|
return ((blob === null || blob === void 0 ? void 0 : blob.name) ||
|
|
131
130
|
(uri === null || uri === void 0 ? void 0 : uri.slice(uri.lastIndexOf('/') + 1)) ||
|
|
132
|
-
(localPath === null || localPath === void 0 ? void 0 : localPath.slice(
|
|
131
|
+
(localPath === null || localPath === void 0 ? void 0 : localPath.slice(localPath.replace(/\\/g, '/').lastIndexOf('/') + 1)) ||
|
|
133
132
|
'');
|
|
134
133
|
}
|
|
135
134
|
function guessAdapter(file, index, adapterHint, model) {
|
package/util/types/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Instance, SnapshotIn, IAnyStateTreeNode, IStateTreeNode, IType } from 'mobx-state-tree';
|
|
3
|
+
import { ThemeOptions } from '@mui/material';
|
|
3
4
|
import { AnyConfigurationModel } from '../../configuration';
|
|
4
|
-
import assemblyManager from '../../assemblyManager';
|
|
5
5
|
import TextSearchManager from '../../TextSearch/TextSearchManager';
|
|
6
6
|
import { MenuItem } from '../../ui';
|
|
7
|
-
import { NoAssemblyRegion as MUNoAssemblyRegion, Region as MUIRegion, LocalPathLocation as MULocalPathLocation, UriLocation as MUUriLocation, BlobLocation as MUBlobLocation } from './mst';
|
|
8
7
|
import RpcManager from '../../rpc/RpcManager';
|
|
9
8
|
import { Feature } from '../simpleFeature';
|
|
10
9
|
import { BaseInternetAccountModel } from '../../pluggableElementTypes/models';
|
|
11
|
-
import
|
|
10
|
+
import type assemblyManager from '../../assemblyManager';
|
|
11
|
+
import type { NoAssemblyRegion as MUNoAssemblyRegion, Region as MUIRegion, LocalPathLocation as MULocalPathLocation, UriLocation as MUUriLocation, BlobLocation as MUBlobLocation } from './mst';
|
|
12
12
|
export * from './util';
|
|
13
13
|
/** abstract type for a model that contains multiple views */
|
|
14
14
|
export interface AbstractViewContainer extends IStateTreeNode<IType<any, unknown, any>> {
|
|
@@ -55,7 +55,7 @@ export interface AbstractSessionModel extends AbstractViewContainer {
|
|
|
55
55
|
hovered: unknown;
|
|
56
56
|
setHovered: (arg: unknown) => void;
|
|
57
57
|
setFocusedViewId?: (id: string) => void;
|
|
58
|
-
allThemes?: () => Record<string, ThemeOptions
|
|
58
|
+
allThemes?: () => Record<string, ThemeOptions>;
|
|
59
59
|
setSelection: (feature: Feature) => void;
|
|
60
60
|
setSession?: (arg: {
|
|
61
61
|
name: string;
|
|
@@ -266,4 +266,4 @@ export interface PreBlobLocation {
|
|
|
266
266
|
blob: File;
|
|
267
267
|
}
|
|
268
268
|
export type PreFileLocation = PreUriLocation | PreLocalPathLocation | PreBlobLocation;
|
|
269
|
-
export {
|
|
269
|
+
export { default as TextSearchManager } from '../../TextSearch/TextSearchManager';
|
package/util/types/index.js
CHANGED
|
@@ -13,8 +13,11 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
13
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
16
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.RetryError = exports.AuthNeededError = void 0;
|
|
20
|
+
exports.TextSearchManager = exports.RetryError = exports.AuthNeededError = void 0;
|
|
18
21
|
exports.isViewContainer = isViewContainer;
|
|
19
22
|
exports.isSessionModel = isSessionModel;
|
|
20
23
|
exports.isSessionModelWithConfigEditing = isSessionModelWithConfigEditing;
|
|
@@ -164,11 +167,15 @@ function isAuthNeededException(exception) {
|
|
|
164
167
|
return (exception instanceof Error &&
|
|
165
168
|
// DOMException
|
|
166
169
|
(exception.name === 'AuthNeededError' ||
|
|
170
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
167
171
|
exception.url !== undefined));
|
|
168
172
|
}
|
|
169
173
|
function isRetryException(exception) {
|
|
170
174
|
return (
|
|
171
175
|
// DOMException
|
|
172
176
|
exception.name === 'RetryError' ||
|
|
177
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
173
178
|
exception.internetAccountId !== undefined);
|
|
174
179
|
}
|
|
180
|
+
var TextSearchManager_1 = require("../../TextSearch/TextSearchManager");
|
|
181
|
+
Object.defineProperty(exports, "TextSearchManager", { enumerable: true, get: function () { return __importDefault(TextSearchManager_1).default; } });
|
package/util/types/mst.js
CHANGED
|
@@ -54,6 +54,7 @@ exports.UriLocation = mobx_state_tree_1.types.snapshotProcessor(exports.UriLocat
|
|
|
54
54
|
exports.FileLocation = mobx_state_tree_1.types.snapshotProcessor(mobx_state_tree_1.types.union(exports.LocalPathLocation, exports.UriLocation, exports.BlobLocation), {
|
|
55
55
|
// @ts-expect-error
|
|
56
56
|
preProcessor(snap) {
|
|
57
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
57
58
|
if (!snap) {
|
|
58
59
|
return undefined;
|
|
59
60
|
}
|
package/util/when.js
CHANGED
|
@@ -22,7 +22,11 @@ function when(getter, { timeout, signal, name } = {}) {
|
|
|
22
22
|
reject(new Error(`timed out waiting for ${name || 'whenPresent'}`));
|
|
23
23
|
}
|
|
24
24
|
}, timeout);
|
|
25
|
-
finishTimeout = () =>
|
|
25
|
+
finishTimeout = () => {
|
|
26
|
+
if (timeoutId) {
|
|
27
|
+
clearTimeout(timeoutId);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
26
30
|
}
|
|
27
31
|
// set up aborting
|
|
28
32
|
if (signal) {
|
|
@@ -44,10 +48,11 @@ function when(getter, { timeout, signal, name } = {}) {
|
|
|
44
48
|
resolve(true);
|
|
45
49
|
}
|
|
46
50
|
})
|
|
47
|
-
.catch(err => {
|
|
51
|
+
.catch((err) => {
|
|
48
52
|
if (!finished) {
|
|
49
53
|
finished = true;
|
|
50
54
|
finishTimeout();
|
|
55
|
+
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
|
|
51
56
|
reject(err);
|
|
52
57
|
}
|
|
53
58
|
});
|