@jbrowse/web-core 2.13.1 → 2.15.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,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
1
  import { lazy } from 'react';
3
2
  import clone from 'clone';
4
3
  import { getConf, readConfObject, } from '@jbrowse/core/configuration';
@@ -191,9 +190,14 @@ export function BaseWebSession({ pluginManager, assemblyConfigSchema, }) {
191
190
  * #action
192
191
  */
193
192
  removeSessionPlugin(pluginDefinition) {
194
- self.sessionPlugins = cast(self.sessionPlugins.filter(plugin => plugin.url !== pluginDefinition.url ||
193
+ self.sessionPlugins = cast(self.sessionPlugins.filter(plugin =>
194
+ // @ts-expect-error
195
+ plugin.url !== pluginDefinition.url ||
196
+ // @ts-expect-error
195
197
  plugin.umdUrl !== pluginDefinition.umdUrl ||
198
+ // @ts-expect-error
196
199
  plugin.cjsUrl !== pluginDefinition.cjsUrl ||
200
+ // @ts-expect-error
197
201
  plugin.esmUrl !== pluginDefinition.esmUrl));
198
202
  getParent(self).setPluginsUpdated(true);
199
203
  },
@@ -287,7 +291,9 @@ export function BaseWebSession({ pluginManager, assemblyConfigSchema, }) {
287
291
  {
288
292
  label: 'Settings',
289
293
  disabled: !canEdit,
290
- onClick: () => self.editTrackConfiguration(config),
294
+ onClick: () => {
295
+ self.editTrackConfiguration(config);
296
+ },
291
297
  icon: SettingsIcon,
292
298
  },
293
299
  {
@@ -333,17 +339,13 @@ export function BaseWebSession({ pluginManager, assemblyConfigSchema, }) {
333
339
  return types.snapshotProcessor(extendedSessionModel, {
334
340
  // @ts-expect-error
335
341
  preProcessor(snapshot) {
336
- if (snapshot) {
337
- // @ts-expect-error
338
- const { connectionInstances, ...rest } = snapshot || {};
339
- // connectionInstances schema changed from object to an array, so any
340
- // old connectionInstances as object is in snapshot, filter it out
341
- // https://github.com/GMOD/jbrowse-components/issues/1903
342
- if (!Array.isArray(connectionInstances)) {
343
- return rest;
344
- }
345
- }
346
- return snapshot;
342
+ // @ts-expect-error
343
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
344
+ const { connectionInstances, ...rest } = snapshot || {};
345
+ // connectionInstances schema changed from object to an array, so any
346
+ // old connectionInstances as object is in snapshot, filter it out
347
+ // https://github.com/GMOD/jbrowse-components/issues/1903
348
+ return !Array.isArray(connectionInstances) ? rest : snapshot;
347
349
  },
348
350
  });
349
351
  }
@@ -25,9 +25,29 @@ export declare function WebSessionConnectionsMixin(pluginManager: PluginManager)
25
25
  connect(_arg: AnyConfigurationModel): void;
26
26
  } & {
27
27
  afterAttach(): void;
28
- addTrackConf(trackConf: AnyConfigurationModel): any;
29
- addTrackConfs(trackConfs: AnyConfigurationModel[]): any[];
30
- setTrackConfs(trackConfs: AnyConfigurationModel[]): import("mobx-state-tree").IMSTArray<import("mobx-state-tree").IAnyModelType> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>>;
28
+ addTrackConf(trackConf: ({
29
+ [x: string]: any;
30
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
31
+ setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
32
+ [x: string]: any;
33
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
34
+ setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
35
+ [x: string]: any;
36
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
37
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
38
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | Record<string, unknown>): any;
39
+ addTrackConfs(trackConfs: (({
40
+ [x: string]: any;
41
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
42
+ setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
43
+ [x: string]: any;
44
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
45
+ setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
46
+ [x: string]: any;
47
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
48
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
49
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | Record<string, unknown>)[]): void;
50
+ setTrackConfs(trackConfs: AnyConfigurationModel[]): void;
31
51
  clear(): void;
32
52
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
33
53
  } & {
@@ -59,7 +79,7 @@ export declare function WebSessionConnectionsMixin(pluginManager: PluginManager)
59
79
  };
60
80
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>>)[];
61
81
  } & {
62
- makeConnection(configuration: AnyConfigurationModel, initialSnapshot?: {}): {
82
+ makeConnection(configuration: AnyConfigurationModel, initialSnapshot?: {}): ({
63
83
  name: string;
64
84
  tracks: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").IAnyModelType> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>>;
65
85
  configuration: {
@@ -88,9 +108,29 @@ export declare function WebSessionConnectionsMixin(pluginManager: PluginManager)
88
108
  connect(_arg: AnyConfigurationModel): void;
89
109
  } & {
90
110
  afterAttach(): void;
91
- addTrackConf(trackConf: AnyConfigurationModel): any;
92
- addTrackConfs(trackConfs: AnyConfigurationModel[]): any[];
93
- setTrackConfs(trackConfs: AnyConfigurationModel[]): import("mobx-state-tree").IMSTArray<import("mobx-state-tree").IAnyModelType> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>>;
111
+ addTrackConf(trackConf: ({
112
+ [x: string]: any;
113
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
114
+ setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
115
+ [x: string]: any;
116
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
117
+ setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
118
+ [x: string]: any;
119
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
120
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
121
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | Record<string, unknown>): any;
122
+ addTrackConfs(trackConfs: (({
123
+ [x: string]: any;
124
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
125
+ setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
126
+ [x: string]: any;
127
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
128
+ setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
129
+ [x: string]: any;
130
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
131
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
132
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | Record<string, unknown>)[]): void;
133
+ setTrackConfs(trackConfs: AnyConfigurationModel[]): void;
94
134
  clear(): void;
95
135
  } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
96
136
  name: import("mobx-state-tree").ISimpleType<string>;
@@ -111,11 +151,31 @@ export declare function WebSessionConnectionsMixin(pluginManager: PluginManager)
111
151
  connect(_arg: AnyConfigurationModel): void;
112
152
  } & {
113
153
  afterAttach(): void;
114
- addTrackConf(trackConf: AnyConfigurationModel): any;
115
- addTrackConfs(trackConfs: AnyConfigurationModel[]): any[];
116
- setTrackConfs(trackConfs: AnyConfigurationModel[]): import("mobx-state-tree").IMSTArray<import("mobx-state-tree").IAnyModelType> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>>;
154
+ addTrackConf(trackConf: ({
155
+ [x: string]: any;
156
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
157
+ setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
158
+ [x: string]: any;
159
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
160
+ setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
161
+ [x: string]: any;
162
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
163
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
164
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | Record<string, unknown>): any;
165
+ addTrackConfs(trackConfs: (({
166
+ [x: string]: any;
167
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
168
+ setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
169
+ [x: string]: any;
170
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
171
+ setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
172
+ [x: string]: any;
173
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
174
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
175
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>) | Record<string, unknown>)[]): void;
176
+ setTrackConfs(trackConfs: AnyConfigurationModel[]): void;
117
177
  clear(): void;
118
- }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
178
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
119
179
  prepareToBreakConnection(configuration: AnyConfigurationModel): (Record<string, number> | (() => void))[] | undefined;
120
180
  breakConnection(configuration: AnyConfigurationModel): void;
121
181
  deleteConnection(configuration: AnyConfigurationModel): any;
@@ -123,5 +183,5 @@ export declare function WebSessionConnectionsMixin(pluginManager: PluginManager)
123
183
  clearConnections(): void;
124
184
  } & {
125
185
  addConnectionConf(connectionConf: BaseConnectionConfigModel): any;
126
- deleteConnection(configuration: AnyConfigurationModel): any;
186
+ deleteConnection(configuration: AnyConfigurationModel): {} | undefined;
127
187
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/web-core",
3
- "version": "2.13.1",
3
+ "version": "2.15.0",
4
4
  "description": "JBrowse 2 code shared between web-app type products",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -32,7 +32,7 @@
32
32
  "build:esm": "tsc --build tsconfig.build.esm.json",
33
33
  "build:commonjs": "tsc --build tsconfig.build.commonjs.json",
34
34
  "build": "npm run build:esm && npm run build:commonjs",
35
- "test": "cd ../..; jest packages/web-core",
35
+ "test": "cd ../..; jest --passWithNoTests packages/web-core",
36
36
  "clean": "rimraf dist esm *.tsbuildinfo",
37
37
  "prebuild": "yarn clean",
38
38
  "prepack": "yarn build && yarn useDist",
@@ -42,10 +42,10 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@babel/runtime": "^7.16.3",
45
- "@jbrowse/app-core": "^2.13.1",
46
- "@jbrowse/product-core": "^2.13.1",
47
- "@mui/icons-material": "^5.0.0",
48
- "@mui/material": "^5.10.17",
45
+ "@jbrowse/app-core": "^2.15.0",
46
+ "@jbrowse/product-core": "^2.15.0",
47
+ "@mui/icons-material": "^6.0.0",
48
+ "@mui/material": "^6.0.0",
49
49
  "clone": "^2.0.0",
50
50
  "copy-to-clipboard": "^3.3.1",
51
51
  "react-error-boundary": "^4.0.3"
@@ -62,5 +62,5 @@
62
62
  "publishConfig": {
63
63
  "access": "public"
64
64
  },
65
- "gitHead": "fcebca71cc1d066654603e1a9accfa6c6d4f764d"
65
+ "gitHead": "87eeb1fbf8311dbf88d5e75b5a265f03beffdda8"
66
66
  }