@apollo-annotation/jbrowse-plugin-apollo 0.1.6 → 0.1.7

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.
Files changed (76) hide show
  1. package/dist/index.esm.js +206 -115
  2. package/dist/index.esm.js.map +1 -1
  3. package/dist/jbrowse-plugin-apollo.cjs.development.js +206 -115
  4. package/dist/jbrowse-plugin-apollo.cjs.development.js.map +1 -1
  5. package/dist/jbrowse-plugin-apollo.cjs.production.min.js +1 -1
  6. package/dist/jbrowse-plugin-apollo.cjs.production.min.js.map +1 -1
  7. package/dist/jbrowse-plugin-apollo.umd.development.js +257 -117
  8. package/dist/jbrowse-plugin-apollo.umd.development.js.map +1 -1
  9. package/dist/jbrowse-plugin-apollo.umd.production.min.js +1 -1
  10. package/dist/jbrowse-plugin-apollo.umd.production.min.js.map +1 -1
  11. package/package.json +6 -6
  12. package/src/ApolloInternetAccount/addMenuItems.ts +2 -4
  13. package/src/ApolloInternetAccount/components/AuthTypeSelector.tsx +14 -6
  14. package/src/ApolloInternetAccount/model.ts +24 -16
  15. package/src/ApolloJobModel.ts +2 -0
  16. package/src/ApolloSequenceAdapter/ApolloSequenceAdapter.ts +4 -0
  17. package/src/ApolloSixFrameRenderer/ApolloSixFrameRenderer.tsx +1 -0
  18. package/src/ApolloSixFrameRenderer/components/ApolloRendering.tsx +16 -3
  19. package/src/ApolloTextSearchAdapter/ApolloTextSearchAdapter.ts +5 -0
  20. package/src/BackendDrivers/CollaborationServerDriver.ts +10 -4
  21. package/src/BackendDrivers/DesktopFileDriver.ts +1 -0
  22. package/src/BackendDrivers/InMemoryFileDriver.ts +1 -0
  23. package/src/ChangeManager.ts +3 -0
  24. package/src/FeatureDetailsWidget/Attributes.tsx +4 -1
  25. package/src/FeatureDetailsWidget/BasicInformation.tsx +4 -2
  26. package/src/FeatureDetailsWidget/NumberTextField.tsx +4 -1
  27. package/src/FeatureDetailsWidget/RelatedFeature.tsx +16 -3
  28. package/src/FeatureDetailsWidget/Sequence.tsx +1 -0
  29. package/src/FeatureDetailsWidget/StringTextField.tsx +4 -1
  30. package/src/FeatureDetailsWidget/model.ts +2 -0
  31. package/src/LinearApolloDisplay/components/LinearApolloDisplay.tsx +9 -2
  32. package/src/LinearApolloDisplay/glyphs/BoxGlyph.ts +2 -0
  33. package/src/LinearApolloDisplay/glyphs/CanonicalGeneGlyph.ts +9 -4
  34. package/src/LinearApolloDisplay/glyphs/GenericChildGlyph.ts +4 -1
  35. package/src/LinearApolloDisplay/glyphs/Glyph.ts +5 -1
  36. package/src/LinearApolloDisplay/glyphs/ImplicitExonGeneGlyph.ts +8 -2
  37. package/src/LinearApolloDisplay/stateModel/base.ts +7 -2
  38. package/src/LinearApolloDisplay/stateModel/getGlyph.ts +1 -0
  39. package/src/LinearApolloDisplay/stateModel/glyphs.ts +2 -0
  40. package/src/LinearApolloDisplay/stateModel/layouts.ts +3 -0
  41. package/src/LinearApolloDisplay/stateModel/mouseEvents.ts +3 -1
  42. package/src/LinearApolloDisplay/stateModel/rendering.ts +3 -2
  43. package/src/LinearApolloDisplay/types.ts +1 -1
  44. package/src/OntologyManager/OntologyStore/fulltext.ts +1 -0
  45. package/src/OntologyManager/OntologyStore/index.test.ts +3 -1
  46. package/src/OntologyManager/OntologyStore/index.ts +4 -5
  47. package/src/OntologyManager/OntologyStore/indexeddb-storage.ts +3 -2
  48. package/src/SixFrameFeatureDisplay/stateModel.ts +17 -5
  49. package/src/TabularEditor/HybridGrid/Feature.tsx +7 -2
  50. package/src/TabularEditor/HybridGrid/FeatureAttributes.tsx +1 -0
  51. package/src/TabularEditor/HybridGrid/HybridGrid.tsx +2 -2
  52. package/src/TabularEditor/HybridGrid/NumberCell.tsx +3 -1
  53. package/src/TabularEditor/HybridGrid/ToolBar.tsx +9 -2
  54. package/src/components/AddAssembly.tsx +16 -8
  55. package/src/components/AddChildFeature.tsx +9 -4
  56. package/src/components/AddFeature.tsx +11 -5
  57. package/src/components/CopyFeature.tsx +11 -6
  58. package/src/components/DeleteAssembly.tsx +7 -4
  59. package/src/components/DeleteFeature.tsx +4 -1
  60. package/src/components/Dialog.tsx +1 -0
  61. package/src/components/DownloadGFF3.tsx +7 -2
  62. package/src/components/ImportFeatures.tsx +9 -3
  63. package/src/components/ManageChecks.tsx +10 -4
  64. package/src/components/ManageUsers.tsx +13 -4
  65. package/src/components/ModifyFeatureAttribute.tsx +4 -1
  66. package/src/components/OntologyTermAutocomplete.tsx +7 -4
  67. package/src/components/OntologyTermMultiSelect.tsx +2 -2
  68. package/src/components/OpenLocalFile.tsx +6 -3
  69. package/src/components/ViewChangeLog.tsx +13 -4
  70. package/src/components/ViewCheckResults.tsx +8 -2
  71. package/src/extensions/annotationFromPileup.ts +7 -2
  72. package/src/index.ts +4 -0
  73. package/src/makeDisplayComponent.tsx +4 -4
  74. package/src/session/ClientDataStore.ts +5 -0
  75. package/src/session/session.ts +9 -17
  76. package/src/util/loadAssemblyIntoClient.ts +4 -3
@@ -98,7 +98,7 @@ var ExpandLessIcon__default = /*#__PURE__*/_interopDefaultLegacy(ExpandLessIcon)
98
98
  var ExpandMoreIcon__default = /*#__PURE__*/_interopDefaultLegacy(ExpandMoreIcon);
99
99
  var ErrorIcon__default = /*#__PURE__*/_interopDefaultLegacy(ErrorIcon);
100
100
 
101
- var version = "0.1.6";
101
+ var version = "0.1.7";
102
102
 
103
103
  const ApolloConfigSchema = configuration.ConfigurationSchema('ApolloInternetAccount', {
104
104
  baseURL: {
@@ -170,7 +170,7 @@ async function checkFeatures(assembly) {
170
170
  for (const ref of assembly.refSeqs.values()) {
171
171
  for (const feature of ref.features.values()) {
172
172
  for (const check of apolloCommon.checkRegistry.getChecks().values()) {
173
- const result = await check.checkFeature(mobxStateTree.getSnapshot(feature), async (start, stop) => ref.getSequence(start, stop));
173
+ const result = await check.checkFeature(mobxStateTree.getSnapshot(feature), (start, stop) => Promise.resolve(ref.getSequence(start, stop)));
174
174
  checkResults.push(...result);
175
175
  }
176
176
  }
@@ -262,14 +262,14 @@ function createFeature(gff3Feature) {
262
262
  }
263
263
  }
264
264
  }
265
- if (childFeatures?.length) {
265
+ if (childFeatures.length > 0) {
266
266
  const children = {};
267
267
  for (const childFeature of childFeatures) {
268
268
  const child = createFeature(childFeature);
269
269
  children[child._id] = child;
270
270
  // Add value to gffId
271
271
  child.attributes?._id
272
- ? (child.gffId = child.attributes?._id.toString())
272
+ ? (child.gffId = child.attributes._id.toString())
273
273
  : (child.gffId = child._id);
274
274
  }
275
275
  feature.children = children;
@@ -371,6 +371,7 @@ function getApolloInternetAccount(session) {
371
371
  return internetAccounts.find((ia) => ia.type === 'ApolloInternetAccount');
372
372
  }
373
373
 
374
+ /* eslint-disable @typescript-eslint/unbound-method */
374
375
  const useStyles$f = mui.makeStyles()((theme) => ({
375
376
  dialogTitle: {
376
377
  background: theme.palette.primary.main,
@@ -393,6 +394,7 @@ const Dialog = mobxReact.observer(function JBrowseDialog(props) {
393
394
  React__default["default"].createElement(CloseIcon__default["default"], null))) }));
394
395
  });
395
396
 
397
+ /* eslint-disable @typescript-eslint/no-unsafe-enum-comparison */
396
398
  var FileType;
397
399
  (function (FileType) {
398
400
  FileType["GFF3"] = "text/x-gff3";
@@ -600,21 +602,29 @@ function AddAssembly({ changeManager, handleClose, session, }) {
600
602
  React__default["default"].createElement(material.FormControlLabel, { value: FileType.EXTERNAL, control: React__default["default"].createElement(material.Radio, null), label: "External", disabled: submitted && !errorMessage }))),
601
603
  fileType === FileType.EXTERNAL ? (React__default["default"].createElement(material.Box, { style: { marginTop: 20 } },
602
604
  React__default["default"].createElement(material.Typography, { variant: "caption" }, "Enter FASTA and FASTA index(es) URL"),
603
- React__default["default"].createElement(material.TextField, { margin: "dense", helperText: "Can be bgz-compressed", id: "fasta", label: "FASTA", type: "TextField", fullWidth: true, variant: "outlined", error: !validFastaFile, onChange: (e) => setFastaFile(e.target.value), disabled: submitted && !errorMessage, InputProps: {
605
+ React__default["default"].createElement(material.TextField, { margin: "dense", helperText: "Can be bgz-compressed", id: "fasta", label: "FASTA", type: "TextField", fullWidth: true, variant: "outlined", error: !validFastaFile, onChange: (e) => {
606
+ setFastaFile(e.target.value);
607
+ }, disabled: submitted && !errorMessage, InputProps: {
604
608
  startAdornment: (React__default["default"].createElement(InputAdornment__default["default"], { position: "start" },
605
609
  React__default["default"].createElement(LinkIcon__default["default"], null))),
606
610
  } }),
607
- React__default["default"].createElement(material.TextField, { margin: "dense", id: "fasta-index", label: "FASTA Index", helperText: ".fai or .gz.fai", type: "TextField", fullWidth: true, variant: "outlined", error: !validFastaIndexFile, onChange: (e) => setFastaIndexFile(e.target.value), disabled: submitted && !errorMessage, InputProps: {
611
+ React__default["default"].createElement(material.TextField, { margin: "dense", id: "fasta-index", label: "FASTA Index", helperText: ".fai or .gz.fai", type: "TextField", fullWidth: true, variant: "outlined", error: !validFastaIndexFile, onChange: (e) => {
612
+ setFastaIndexFile(e.target.value);
613
+ }, disabled: submitted && !errorMessage, InputProps: {
608
614
  startAdornment: (React__default["default"].createElement(InputAdornment__default["default"], { position: "start" },
609
615
  React__default["default"].createElement(LinkIcon__default["default"], null))),
610
616
  } }),
611
- React__default["default"].createElement(material.TextField, { margin: "dense", id: "fasta-gzi-index", label: "FASTA GZI Index", helperText: "Only for bgz-compressed FASTA, .gz.gzi", type: "TextField", fullWidth: true, variant: "outlined", error: Boolean(fastaGziIndexFile) && !validFastaGziIndexFile, onChange: (e) => setFastaGziIndexFile(e.target.value), disabled: submitted && !errorMessage, InputProps: {
617
+ React__default["default"].createElement(material.TextField, { margin: "dense", id: "fasta-gzi-index", label: "FASTA GZI Index", helperText: "Only for bgz-compressed FASTA, .gz.gzi", type: "TextField", fullWidth: true, variant: "outlined", error: Boolean(fastaGziIndexFile) && !validFastaGziIndexFile, onChange: (e) => {
618
+ setFastaGziIndexFile(e.target.value);
619
+ }, disabled: submitted && !errorMessage, InputProps: {
612
620
  startAdornment: (React__default["default"].createElement(InputAdornment__default["default"], { position: "start" },
613
621
  React__default["default"].createElement(LinkIcon__default["default"], null))),
614
622
  } }))) : (React__default["default"].createElement(material.Box, { style: { marginTop: 20 } },
615
623
  React__default["default"].createElement("input", { type: "file", onChange: handleChangeFile, disabled: submitted && !errorMessage }),
616
624
  React__default["default"].createElement(material.FormGroup, null,
617
- React__default["default"].createElement(material.FormControlLabel, { control: React__default["default"].createElement(material.Checkbox, { checked: fileType === FileType.GFF3 && importFeatures, onChange: () => setImportFeatures(!importFeatures), disabled: fileType !== FileType.GFF3 ||
625
+ React__default["default"].createElement(material.FormControlLabel, { control: React__default["default"].createElement(material.Checkbox, { checked: fileType === FileType.GFF3 && importFeatures, onChange: () => {
626
+ setImportFeatures(!importFeatures);
627
+ }, disabled: fileType !== FileType.GFF3 ||
618
628
  (submitted && !errorMessage) }), label: "Also load features from GFF3 file" }))))),
619
629
  React__default["default"].createElement(material.DialogActions, null,
620
630
  React__default["default"].createElement(material.Button, { disabled: !validAsm ||
@@ -801,7 +811,7 @@ function expandPrefixes(uri, prefixes) {
801
811
  return uri;
802
812
  }
803
813
 
804
- /* eslint-disable import/no-named-as-default-member */
814
+ /* eslint-disable @typescript-eslint/no-unsafe-return */
805
815
  /** special value of jsonPath that gets the IRI (that is, ID) of the node with the configured prefixes applied */
806
816
  const PREFIXED_ID_PATH = '$PREFIXED_ID';
807
817
  /** small wrapper for jsonpath.query that intercepts requests for the special prefixed ID path */
@@ -985,6 +995,7 @@ function isDeprecated(thing) {
985
995
  return Boolean(thing.meta?.deprecated);
986
996
  }
987
997
 
998
+ /* eslint-disable @typescript-eslint/no-unnecessary-condition */
988
999
  /** schema version we are currently on, used for the IndexedDB schema open call */
989
1000
  const schemaVersion = 2;
990
1001
  /** open the IndexedDB and create the DB schema if necessary */
@@ -1114,10 +1125,11 @@ async function isDatabaseCurrent(db) {
1114
1125
  return false;
1115
1126
  }
1116
1127
  // check that the index paths and prefixes are the same as our current ones
1117
- return (equal__default["default"](this.options.prefixes, meta.storeOptions?.prefixes) &&
1118
- equal__default["default"](this.options.textIndexing, meta.storeOptions?.textIndexing));
1128
+ return (equal__default["default"](this.options.prefixes, meta.storeOptions.prefixes) &&
1129
+ equal__default["default"](this.options.textIndexing, meta.storeOptions.textIndexing));
1119
1130
  }
1120
1131
 
1132
+ /* eslint-disable @typescript-eslint/no-throw-literal */
1121
1133
  /**
1122
1134
  * @deprecated use the one from jbrowse core when it is published
1123
1135
  **/
@@ -1212,7 +1224,7 @@ class OntologyStore {
1212
1224
  const myTx = tx ?? db.transaction('nodes');
1213
1225
  return myTx.objectStore('nodes').count();
1214
1226
  }
1215
- async unique(nodes) {
1227
+ unique(nodes) {
1216
1228
  const seen = new Map();
1217
1229
  const result = [];
1218
1230
  for (const node of nodes) {
@@ -1277,10 +1289,7 @@ class OntologyStore {
1277
1289
  const resultIds = new Set();
1278
1290
  async function recur(queryIds) {
1279
1291
  await Promise.all([...queryIds].map(async (queryId) => {
1280
- const theseResults = (await myTx
1281
- .objectStore('edges')
1282
- .index(queryIndex)
1283
- .getAll(queryId))
1292
+ const theseResults = (await myTx.objectStore('edges').index(queryIndex).getAll(queryId))
1284
1293
  .filter((element) => filterEdge(element))
1285
1294
  .map((edge) => edge[resultProp]);
1286
1295
  if (theseResults.length > 0) {
@@ -1547,13 +1556,13 @@ async function fetchValidDescendantTerms(parentFeature, ontologyStore, _signal)
1547
1556
  return subpartTerms;
1548
1557
  }
1549
1558
 
1559
+ /* eslint-disable @typescript-eslint/no-unused-vars */
1550
1560
  function OntologyTermAutocomplete({ fetchValidTerms, filterTerms: filterTermsProp, includeDeprecated, onChange, ontologyName, ontologyVersion, renderInput, session, style, value: valueString, }) {
1551
1561
  const [open, setOpen] = React.useState(false);
1552
1562
  const [termChoices, setTermChoices] = React.useState();
1553
1563
  const [currentOntologyTermInvalid, setCurrentOntologyTermInvalid] = React.useState('');
1554
1564
  const [currentOntologyTerm, setCurrentOntologyTerm] = React.useState();
1555
- const ontologyManager = session.apolloDataStore
1556
- .ontologyManager;
1565
+ const { ontologyManager } = session.apolloDataStore;
1557
1566
  const ontologyStore = ontologyManager.findOntology(ontologyName, ontologyVersion)?.dataStore;
1558
1567
  const needToLoadTermChoices = ontologyStore && open && !termChoices;
1559
1568
  const needToLoadCurrentTerm = ontologyStore && !currentOntologyTerm;
@@ -1613,7 +1622,7 @@ function OntologyTermAutocomplete({ fetchValidTerms, filterTerms: filterTermsPro
1613
1622
  session,
1614
1623
  fetchValidTerms,
1615
1624
  ]);
1616
- const handleChange = async (event, newValue) => {
1625
+ const handleChange = (event, newValue) => {
1617
1626
  if (!newValue) {
1618
1627
  return;
1619
1628
  }
@@ -1719,7 +1728,7 @@ function AddChildFeature({ changeManager, handleClose, session, sourceAssemblyId
1719
1728
  },
1720
1729
  parentFeatureId: sourceFeature._id,
1721
1730
  });
1722
- await changeManager.submit?.(change);
1731
+ await changeManager.submit(change);
1723
1732
  notify('Feature added successfully', 'success');
1724
1733
  handleClose();
1725
1734
  event.preventDefault();
@@ -1735,7 +1744,7 @@ function AddChildFeature({ changeManager, handleClose, session, sourceAssemblyId
1735
1744
  setShowPhase(false);
1736
1745
  }
1737
1746
  }
1738
- async function handleChangePhase(e) {
1747
+ function handleChangePhase(e) {
1739
1748
  setErrorMessage('');
1740
1749
  setPhase(e.target.value);
1741
1750
  switch (Number(e.target.value)) {
@@ -1761,8 +1770,12 @@ function AddChildFeature({ changeManager, handleClose, session, sourceAssemblyId
1761
1770
  return (React__default["default"].createElement(Dialog, { open: true, title: "Add new child feature", handleClose: handleClose, maxWidth: false, "data-testid": "add-feature-dialog" },
1762
1771
  React__default["default"].createElement("form", { onSubmit: onSubmit },
1763
1772
  React__default["default"].createElement(material.DialogContent, { style: { display: 'flex', flexDirection: 'column' } },
1764
- React__default["default"].createElement(material.TextField, { margin: "dense", id: "start", label: "Start", type: "number", fullWidth: true, variant: "outlined", value: start, onChange: (e) => setStart(e.target.value) }),
1765
- React__default["default"].createElement(material.TextField, { margin: "dense", id: "end", label: "End", type: "number", fullWidth: true, variant: "outlined", value: end, onChange: (e) => setEnd(e.target.value), error: error, helperText: error ? '"End" must be greater than "Start"' : null }),
1773
+ React__default["default"].createElement(material.TextField, { margin: "dense", id: "start", label: "Start", type: "number", fullWidth: true, variant: "outlined", value: start, onChange: (e) => {
1774
+ setStart(e.target.value);
1775
+ } }),
1776
+ React__default["default"].createElement(material.TextField, { margin: "dense", id: "end", label: "End", type: "number", fullWidth: true, variant: "outlined", value: end, onChange: (e) => {
1777
+ setEnd(e.target.value);
1778
+ }, error: error, helperText: error ? '"End" must be greater than "Start"' : null }),
1766
1779
  React__default["default"].createElement(OntologyTermAutocomplete, { session: session, ontologyName: "Sequence Ontology", style: { width: 170 }, value: type, filterTerms: isOntologyClass, fetchValidTerms: fetchValidTerms.bind(null, sourceFeature), renderInput: (params) => (React__default["default"].createElement(material.TextField, { ...params, label: "Type", variant: "outlined", fullWidth: true, error: Boolean(typeWarningText), helperText: typeWarningText })), onChange: (oldValue, newValue) => {
1767
1780
  if (newValue) {
1768
1781
  handleChangeType(newValue);
@@ -1816,7 +1829,7 @@ function CopyFeature({ changeManager, handleClose, session, sourceAssemblyId, so
1816
1829
  const [selectedRefSeqId, setSelectedRefSeqId] = React.useState('');
1817
1830
  const [start, setStart] = React.useState(sourceFeature.start);
1818
1831
  const [errorMessage, setErrorMessage] = React.useState('');
1819
- async function handleChangeAssembly(e) {
1832
+ function handleChangeAssembly(e) {
1820
1833
  setSelectedAssemblyId(e.target.value);
1821
1834
  }
1822
1835
  React.useEffect(() => {
@@ -1840,9 +1853,11 @@ function CopyFeature({ changeManager, handleClose, session, sourceAssemblyId, so
1840
1853
  setRefNames(newRefNames);
1841
1854
  setSelectedRefSeqId(newRefNames[0]?._id || '');
1842
1855
  }
1843
- getRefNames().catch((error) => setErrorMessage(String(error)));
1856
+ getRefNames().catch((error) => {
1857
+ setErrorMessage(String(error));
1858
+ });
1844
1859
  }, [selectedAssemblyId, assemblyManager]);
1845
- async function handleChangeRefSeq(e) {
1860
+ function handleChangeRefSeq(e) {
1846
1861
  const refSeq = e.target.value;
1847
1862
  setSelectedRefSeqId(refSeq);
1848
1863
  }
@@ -1858,7 +1873,7 @@ function CopyFeature({ changeManager, handleClose, session, sourceAssemblyId, so
1858
1873
  setErrorMessage(`Assembly not found: ${selectedAssemblyId}.`);
1859
1874
  return;
1860
1875
  }
1861
- const canonicalRefName = assembly?.getCanonicalRefName(selectedRefSeqId);
1876
+ const canonicalRefName = assembly.getCanonicalRefName(selectedRefSeqId);
1862
1877
  const region = assembly.regions?.find((r) => r.refName === canonicalRefName);
1863
1878
  if (!region) {
1864
1879
  setErrorMessage(`RefSeq not found: ${selectedRefSeqId}.`);
@@ -1914,7 +1929,7 @@ function CopyFeature({ changeManager, handleClose, session, sourceAssemblyId, so
1914
1929
  copyFeature: true,
1915
1930
  allIds: featureIds,
1916
1931
  });
1917
- await changeManager.submit?.(change);
1932
+ await changeManager.submit(change);
1918
1933
  notify('Feature copied successfully', 'success');
1919
1934
  handleClose();
1920
1935
  event.preventDefault();
@@ -1974,6 +1989,7 @@ function CopyFeature({ changeManager, handleClose, session, sourceAssemblyId, so
1974
1989
  React__default["default"].createElement(material.DialogContentText, { color: "error" }, errorMessage))) : null));
1975
1990
  }
1976
1991
 
1992
+ /* eslint-disable @typescript-eslint/no-misused-promises */
1977
1993
  function DeleteAssembly({ changeManager, handleClose, session, }) {
1978
1994
  const { internetAccounts } = mobxStateTree.getRoot(session);
1979
1995
  const [selectedAssembly, setSelectedAssembly] = React.useState();
@@ -2016,7 +2032,7 @@ function DeleteAssembly({ changeManager, handleClose, session, }) {
2016
2032
  typeName: 'DeleteAssemblyChange',
2017
2033
  assembly: selectedAssembly.name,
2018
2034
  });
2019
- await changeManager.submit?.(change, {
2035
+ await changeManager.submit(change, {
2020
2036
  internetAccountId: selectedInternetAccount.internetAccountId,
2021
2037
  });
2022
2038
  handleClose();
@@ -2033,7 +2049,9 @@ function DeleteAssembly({ changeManager, handleClose, session, }) {
2033
2049
  React__default["default"].createElement(material.DialogContentText, null,
2034
2050
  React__default["default"].createElement("strong", { style: { color: 'red' } }, "NOTE: All assembly data will be deleted and this operation cannot be undone!")),
2035
2051
  React__default["default"].createElement(material.FormGroup, null,
2036
- React__default["default"].createElement(material.FormControlLabel, { control: React__default["default"].createElement(material.Checkbox, { checked: confirmDelete, onChange: () => setconfirmDelete(!confirmDelete) }), label: "I understand that all assembly data will be deleted" }))),
2052
+ React__default["default"].createElement(material.FormControlLabel, { control: React__default["default"].createElement(material.Checkbox, { checked: confirmDelete, onChange: () => {
2053
+ setconfirmDelete(!confirmDelete);
2054
+ } }), label: "I understand that all assembly data will be deleted" }))),
2037
2055
  React__default["default"].createElement(material.DialogActions, null,
2038
2056
  React__default["default"].createElement(material.Button, { disabled: !selectedAssembly || !confirmDelete, variant: "contained", type: "submit" }, "Delete"),
2039
2057
  React__default["default"].createElement(material.Button, { variant: "outlined", type: "submit", onClick: handleClose }, "Cancel"))),
@@ -2058,7 +2076,7 @@ function DeleteFeature({ changeManager, handleClose, selectedFeature, session, s
2058
2076
  deletedFeature: mobxStateTree.getSnapshot(sourceFeature),
2059
2077
  parentFeatureId: sourceFeature.parent?._id,
2060
2078
  });
2061
- await changeManager.submit?.(change);
2079
+ await changeManager.submit(change);
2062
2080
  notify('Feature deleted successfully', 'success');
2063
2081
  handleClose();
2064
2082
  event.preventDefault();
@@ -2160,7 +2178,7 @@ function DownloadGFF3({ handleClose, session }) {
2160
2178
  });
2161
2179
  }
2162
2180
  for (const [, refSeq] of refSeqs) {
2163
- const features = refSeq?.features;
2181
+ const { features } = refSeq;
2164
2182
  if (!features) {
2165
2183
  continue;
2166
2184
  }
@@ -2189,6 +2207,7 @@ function DownloadGFF3({ handleClose, session }) {
2189
2207
  React__default["default"].createElement(material.DialogContentText, { color: "error" }, errorMessage))) : null));
2190
2208
  }
2191
2209
 
2210
+ /* eslint-disable @typescript-eslint/unbound-method */
2192
2211
  function ImportFeatures({ changeManager, handleClose, session, }) {
2193
2212
  const { apolloDataStore } = session;
2194
2213
  const [file, setFile] = React.useState();
@@ -2230,7 +2249,7 @@ function ImportFeatures({ changeManager, handleClose, session, }) {
2230
2249
  assemblyId: selectedAssembly.name,
2231
2250
  });
2232
2251
  uri.search = searchParams.toString();
2233
- const fetch = apolloInternetAccount?.getFetcher({
2252
+ const fetch = apolloInternetAccount.getFetcher({
2234
2253
  locationType: 'UriLocation',
2235
2254
  uri: uri.toString(),
2236
2255
  });
@@ -2284,7 +2303,7 @@ function ImportFeatures({ changeManager, handleClose, session, }) {
2284
2303
  formData.append('file', file);
2285
2304
  formData.append('fileName', file.name);
2286
2305
  formData.append('type', 'text/x-gff3');
2287
- const apolloFetchFile = apolloInternetAccount?.getFetcher({
2306
+ const apolloFetchFile = apolloInternetAccount.getFetcher({
2288
2307
  locationType: 'UriLocation',
2289
2308
  uri: url,
2290
2309
  });
@@ -2379,7 +2398,9 @@ function ManageChecks({ handleClose, session }) {
2379
2398
  const data = (await response.json());
2380
2399
  setChecks(data);
2381
2400
  }
2382
- getChecks().catch((error) => setErrorMessage(String(error)));
2401
+ getChecks().catch((error) => {
2402
+ setErrorMessage(String(error));
2403
+ });
2383
2404
  }, [selectedInternetAccount]);
2384
2405
  React.useEffect(() => {
2385
2406
  if (assemblies.length > 0 && selectedAssembly === undefined) {
@@ -2403,7 +2424,9 @@ function ManageChecks({ handleClose, session }) {
2403
2424
  const assembly = (await response.json());
2404
2425
  setSelectedChecks(assembly.checks);
2405
2426
  }
2406
- getChecks().catch((error) => setErrorMessage(String(error)));
2427
+ getChecks().catch((error) => {
2428
+ setErrorMessage(String(error));
2429
+ });
2407
2430
  }, [selectedAssembly, selectedInternetAccount]);
2408
2431
  function handleChangeAssembly(e) {
2409
2432
  const newAssembly = assemblies.find((asm) => asm.name === e.target.value);
@@ -2493,6 +2516,7 @@ function ManageChecks({ handleClose, session }) {
2493
2516
  React__default["default"].createElement(material.DialogContentText, { color: "error" }, errorMessage))) : null));
2494
2517
  }
2495
2518
 
2519
+ /* eslint-disable @typescript-eslint/no-unnecessary-condition */
2496
2520
  function ManageUsers({ changeManager, handleClose, session, }) {
2497
2521
  const { internetAccounts } = mobxStateTree.getRoot(session);
2498
2522
  const apolloInternetAccounts = internetAccounts.filter((ia) => ia.type === 'ApolloInternetAccount' && ia.role?.includes('admin'));
@@ -2505,7 +2529,7 @@ function ManageUsers({ changeManager, handleClose, session, }) {
2505
2529
  const getUsers = React.useCallback(async () => {
2506
2530
  const { baseURL } = selectedInternetAccount;
2507
2531
  const uri = new URL('/users', baseURL).href;
2508
- const apolloFetch = selectedInternetAccount?.getFetcher({
2532
+ const apolloFetch = selectedInternetAccount.getFetcher({
2509
2533
  locationType: 'UriLocation',
2510
2534
  uri,
2511
2535
  });
@@ -2521,7 +2545,9 @@ function ManageUsers({ changeManager, handleClose, session, }) {
2521
2545
  }
2522
2546
  }, [selectedInternetAccount]);
2523
2547
  React.useEffect(() => {
2524
- getUsers().catch((error) => setErrorMessage(String(error)));
2548
+ getUsers().catch((error) => {
2549
+ setErrorMessage(String(error));
2550
+ });
2525
2551
  }, [getUsers]);
2526
2552
  async function deleteUser(id) {
2527
2553
  const change = new apolloShared.DeleteUserChange({
@@ -2586,13 +2612,16 @@ function ManageUsers({ changeManager, handleClose, session, }) {
2586
2612
  React__default["default"].createElement(material.DialogContentText, null, "Select account"),
2587
2613
  React__default["default"].createElement(material.Select, { value: selectedInternetAccount.internetAccountId, onChange: handleChangeInternetAccount, disabled: !errorMessage }, internetAccounts.map((option) => (React__default["default"].createElement(material.MenuItem, { key: option.id, value: option.internetAccountId }, option.name)))))) : null,
2588
2614
  React__default["default"].createElement("div", { style: { height: '100%', width: '100%' } },
2589
- React__default["default"].createElement(xDataGrid.DataGrid, { pagination: true, rows: users, columns: gridColumns, getRowId: (row) => row._id, slots: { toolbar: xDataGrid.GridToolbar }, getRowHeight: () => 'auto', isCellEditable: (params) => !isCurrentUser(params.id), processRowUpdate: processRowUpdate, onProcessRowUpdateError: (error) => setErrorMessage(String(error)) }))),
2615
+ React__default["default"].createElement(xDataGrid.DataGrid, { pagination: true, rows: users, columns: gridColumns, getRowId: (row) => row._id, slots: { toolbar: xDataGrid.GridToolbar }, getRowHeight: () => 'auto', isCellEditable: (params) => !isCurrentUser(params.id), processRowUpdate: processRowUpdate, onProcessRowUpdateError: (error) => {
2616
+ setErrorMessage(String(error));
2617
+ } }))),
2590
2618
  React__default["default"].createElement(material.DialogActions, null,
2591
2619
  React__default["default"].createElement(material.Button, { variant: "outlined", type: "submit", onClick: handleClose }, "Close")),
2592
2620
  errorMessage ? (React__default["default"].createElement(material.DialogContent, null,
2593
2621
  React__default["default"].createElement(material.DialogContentText, { color: "error" }, errorMessage))) : null));
2594
2622
  }
2595
2623
 
2624
+ /* eslint-disable @typescript-eslint/no-unnecessary-condition */
2596
2625
  // interface TermAutocompleteResult extends TermValue {
2597
2626
  // label: string[]
2598
2627
  // match: string
@@ -2641,8 +2670,7 @@ function TermTagWithTooltip({ getTagProps, index, ontology, termId, }) {
2641
2670
  React__namespace.createElement(material.Chip, { label: errorMessage || manager.applyPrefixes(termId), color: errorMessage ? 'error' : 'default', size: "small", ...getTagProps({ index }) }))));
2642
2671
  }
2643
2672
  function OntologyTermMultiSelect({ includeDeprecated, onChange, ontologyName, ontologyVersion, session, value: initialValue, }) {
2644
- const ontologyManager = session.apolloDataStore
2645
- .ontologyManager;
2673
+ const { ontologyManager } = session.apolloDataStore;
2646
2674
  const ontology = ontologyManager.findOntology(ontologyName, ontologyVersion);
2647
2675
  const [value, setValue] = React__namespace.useState(initialValue.map((id) => ({ term: { id, type: 'CLASS' } })));
2648
2676
  const [inputValue, setInputValue] = React__namespace.useState('');
@@ -2901,7 +2929,7 @@ function ModifyFeatureAttribute({ changeManager, handleClose, session, sourceAss
2901
2929
  featureId: sourceFeature._id,
2902
2930
  attributes: attrs,
2903
2931
  });
2904
- await changeManager.submit?.(change);
2932
+ await changeManager.submit(change);
2905
2933
  notify('Feature attributes modified successfully', 'success');
2906
2934
  handleClose();
2907
2935
  event.preventDefault();
@@ -3005,6 +3033,7 @@ function ModifyFeatureAttribute({ changeManager, handleClose, session, sourceAss
3005
3033
  React__default["default"].createElement(material.Button, { variant: "outlined", type: "submit", disabled: showAddNewForm, onClick: handleClose }, "Cancel")))));
3006
3034
  }
3007
3035
 
3036
+ /* eslint-disable @typescript-eslint/unbound-method */
3008
3037
  function OpenLocalFile({ handleClose, session }) {
3009
3038
  const { addApolloTrackConfig, apolloDataStore } = session;
3010
3039
  const { addAssembly, addSessionAssembly, assemblyManager, notify } = session;
@@ -3013,7 +3042,7 @@ function OpenLocalFile({ handleClose, session }) {
3013
3042
  const [errorMessage, setErrorMessage] = React.useState('');
3014
3043
  const [submitted, setSubmitted] = React.useState(false);
3015
3044
  const theme = material.useTheme();
3016
- async function handleChangeFile(e) {
3045
+ function handleChangeFile(e) {
3017
3046
  const selectedFile = e.target.files?.item(0);
3018
3047
  if (!selectedFile) {
3019
3048
  return;
@@ -3070,10 +3099,10 @@ function OpenLocalFile({ handleClose, session }) {
3070
3099
  if (a) {
3071
3100
  // @ts-expect-error MST type coercion problem?
3072
3101
  addApolloTrackConfig(a);
3073
- notify(`Loaded GFF3 ${file?.name}`, 'success');
3102
+ notify(`Loaded GFF3 ${file.name}`, 'success');
3074
3103
  }
3075
3104
  else {
3076
- notify(`Error loading GFF3 ${file?.name}`, 'error');
3105
+ notify(`Error loading GFF3 ${file.name}`, 'error');
3077
3106
  }
3078
3107
  handleClose();
3079
3108
  }
@@ -3098,6 +3127,7 @@ function OpenLocalFile({ handleClose, session }) {
3098
3127
  React__default["default"].createElement(material.DialogContentText, { color: "error" }, errorMessage))) : null));
3099
3128
  }
3100
3129
 
3130
+ /* eslint-disable @typescript-eslint/no-unnecessary-condition */
3101
3131
  const useStyles$d = mui.makeStyles()((theme) => ({
3102
3132
  changeTextarea: {
3103
3133
  fontFamily: 'monospace',
@@ -3163,7 +3193,9 @@ function ViewChangeLog({ handleClose, session }) {
3163
3193
  setAssemblyCollection(data);
3164
3194
  }
3165
3195
  }
3166
- getAssemblies().catch((error) => setErrorMessage(String(error)));
3196
+ getAssemblies().catch((error) => {
3197
+ setErrorMessage(String(error));
3198
+ });
3167
3199
  }, [apolloInternetAccount, baseURL]);
3168
3200
  React.useEffect(() => {
3169
3201
  if (!assemblyId && assemblyCollection.length > 0) {
@@ -3197,9 +3229,11 @@ function ViewChangeLog({ handleClose, session }) {
3197
3229
  setDisplayGridData(data);
3198
3230
  }
3199
3231
  }
3200
- getGridData().catch((error) => setErrorMessage(String(error)));
3232
+ getGridData().catch((error) => {
3233
+ setErrorMessage(String(error));
3234
+ });
3201
3235
  }, [assemblyId, apolloInternetAccount, baseURL]);
3202
- async function handleChangeAssembly(e) {
3236
+ function handleChangeAssembly(e) {
3203
3237
  setAssemblyId(e.target.value);
3204
3238
  }
3205
3239
  return (React__default["default"].createElement(Dialog, { open: true, fullScreen: true, title: "View change log", handleClose: handleClose, "data-testid": "view-changelog" },
@@ -3256,8 +3290,7 @@ function addMenuItems(rootModel) {
3256
3290
  handleClose: () => {
3257
3291
  doneCallback();
3258
3292
  },
3259
- changeManager: session.apolloDataStore
3260
- .changeManager,
3293
+ changeManager: session.apolloDataStore.changeManager,
3261
3294
  },
3262
3295
  ]);
3263
3296
  },
@@ -3272,8 +3305,7 @@ function addMenuItems(rootModel) {
3272
3305
  handleClose: () => {
3273
3306
  doneCallback();
3274
3307
  },
3275
- changeManager: session.apolloDataStore
3276
- .changeManager,
3308
+ changeManager: session.apolloDataStore.changeManager,
3277
3309
  },
3278
3310
  ]);
3279
3311
  },
@@ -3362,7 +3394,9 @@ const AuthTypeSelector = ({ baseURL, handleClose, name, }) => {
3362
3394
  const data = (await response.json());
3363
3395
  setLoginTypes(data);
3364
3396
  }
3365
- getAuthTypes().catch((error) => util.isAbortException(error) ? '' : setErrorMessage(String(error)));
3397
+ getAuthTypes().catch((error) => {
3398
+ util.isAbortException(error) ? '' : setErrorMessage(String(error));
3399
+ });
3366
3400
  return () => {
3367
3401
  controller.abort();
3368
3402
  };
@@ -3383,11 +3417,17 @@ const AuthTypeSelector = ({ baseURL, handleClose, name, }) => {
3383
3417
  const allowGuest = loginTypes.includes('guest');
3384
3418
  return (React__default["default"].createElement(Dialog, { open: true, title: `Log in to ${name}`, handleClose: handleClose, maxWidth: false, "data-testid": "login-apollo" },
3385
3419
  React__default["default"].createElement(material.DialogContent, { style: { display: 'flex', flexDirection: 'column', paddingTop: 8 } },
3386
- allowGoogle ? (React__default["default"].createElement(GoogleButton, { disabled: !allowGoogle, onClick: () => handleClick('google') })) : null,
3387
- allowMicrosoft ? (React__default["default"].createElement(MicrosoftButton, { disabled: !allowMicrosoft, onClick: () => handleClick('microsoft') })) : null,
3420
+ allowGoogle ? (React__default["default"].createElement(GoogleButton, { disabled: !allowGoogle, onClick: () => {
3421
+ handleClick('google');
3422
+ } })) : null,
3423
+ allowMicrosoft ? (React__default["default"].createElement(MicrosoftButton, { disabled: !allowMicrosoft, onClick: () => {
3424
+ handleClick('microsoft');
3425
+ } })) : null,
3388
3426
  allowGuest ? (React__default["default"].createElement(React__default["default"].Fragment, null,
3389
3427
  React__default["default"].createElement(material.Divider, { className: classes.divider }),
3390
- React__default["default"].createElement(GuestButton, { onClick: () => handleClick('guest') }))) : null),
3428
+ React__default["default"].createElement(GuestButton, { onClick: () => {
3429
+ handleClick('guest');
3430
+ } }))) : null),
3391
3431
  React__default["default"].createElement(material.DialogActions, null,
3392
3432
  React__default["default"].createElement(material.Button, { variant: "outlined", type: "submit", onClick: () => {
3393
3433
  handleClose();
@@ -3396,6 +3436,7 @@ const AuthTypeSelector = ({ baseURL, handleClose, name, }) => {
3396
3436
  React__default["default"].createElement(material.DialogContentText, { color: "error" }, errorMessage))) : null));
3397
3437
  };
3398
3438
 
3439
+ /* eslint-disable @typescript-eslint/no-unused-vars */
3399
3440
  const inWebWorker$1 = typeof sessionStorage === 'undefined';
3400
3441
  const stateModelFactory$2 = (configSchema) => {
3401
3442
  return pluggableElementTypes.InternetAccount.named('ApolloInternetAccount')
@@ -3447,8 +3488,6 @@ const stateModelFactory$2 = (configSchema) => {
3447
3488
  return {
3448
3489
  addMessageChannel(resolve, reject) {
3449
3490
  listener = (event) => {
3450
- // this should probably get better handling, but ignored for now
3451
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
3452
3491
  this.finishOAuthWindow(event, resolve, reject);
3453
3492
  };
3454
3493
  window.addEventListener('message', listener);
@@ -3456,9 +3495,10 @@ const stateModelFactory$2 = (configSchema) => {
3456
3495
  deleteMessageChannel() {
3457
3496
  window.removeEventListener('message', listener);
3458
3497
  },
3459
- async finishOAuthWindow(event, resolve, reject) {
3498
+ finishOAuthWindow(event, resolve, reject) {
3460
3499
  if (event.data.name !== `JBrowseAuthWindow-${self.internetAccountId}`) {
3461
- return this.deleteMessageChannel();
3500
+ this.deleteMessageChannel();
3501
+ return;
3462
3502
  }
3463
3503
  const redirectUriWithInfo = event.data.redirectUri;
3464
3504
  const fixedQueryString = redirectUriWithInfo.replace('#', '?');
@@ -3468,11 +3508,12 @@ const stateModelFactory$2 = (configSchema) => {
3468
3508
  const token = urlParams.get('access_token');
3469
3509
  this.deleteMessageChannel();
3470
3510
  if (!token) {
3471
- return reject(new Error('Error with token endpoint'));
3511
+ reject(new Error('Error with token endpoint'));
3512
+ return;
3472
3513
  }
3473
3514
  self.storeToken(token);
3474
3515
  self.setRole();
3475
- return resolve(token);
3516
+ resolve(token);
3476
3517
  },
3477
3518
  async openAuthWindow(type, resolve, reject) {
3478
3519
  const redirectUri = util.isElectron
@@ -3495,7 +3536,6 @@ const stateModelFactory$2 = (configSchema) => {
3495
3536
  const eventFromDesktop = new MessageEvent('message', {
3496
3537
  data: { name: eventName, redirectUri: redirectUriFromElectron },
3497
3538
  });
3498
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
3499
3539
  this.finishOAuthWindow(eventFromDesktop, resolve, reject);
3500
3540
  }
3501
3541
  else {
@@ -3543,7 +3583,8 @@ const stateModelFactory$2 = (configSchema) => {
3543
3583
  const response = await fetch(uri);
3544
3584
  if (!response.ok) {
3545
3585
  const errorMessage = await createFetchErrorMessage(response, 'Error when logging in');
3546
- return reject(new Error(errorMessage));
3586
+ reject(new Error(errorMessage));
3587
+ return;
3547
3588
  }
3548
3589
  const { token } = await response.json();
3549
3590
  resolve(token);
@@ -3579,8 +3620,7 @@ const stateModelFactory$2 = (configSchema) => {
3579
3620
  }),
3580
3621
  getMissingChanges: mobxStateTree.flow(function* getMissingChanges() {
3581
3622
  const { session } = mobxStateTree.getRoot(self);
3582
- const { changeManager } = session
3583
- .apolloDataStore;
3623
+ const { changeManager } = session.apolloDataStore;
3584
3624
  if (!self.lastChangeSequenceNumber) {
3585
3625
  throw new Error('No LastChangeSequence stored in session. Please, refresh you browser to get last updates from server');
3586
3626
  }
@@ -3604,7 +3644,7 @@ const stateModelFactory$2 = (configSchema) => {
3604
3644
  const serializedChanges = yield response.json();
3605
3645
  for (const serializedChange of serializedChanges) {
3606
3646
  const change = apolloCommon.Change.fromJSON(serializedChange);
3607
- void changeManager?.submit(change, { submitToBackend: false });
3647
+ void changeManager.submit(change, { submitToBackend: false });
3608
3648
  }
3609
3649
  }),
3610
3650
  }))
@@ -3643,7 +3683,7 @@ const stateModelFactory$2 = (configSchema) => {
3643
3683
  return; // we did this change, no need to apply it again
3644
3684
  }
3645
3685
  const change = apolloCommon.Change.fromJSON(message.changeInfo);
3646
- void changeManager?.submit(change, { submitToBackend: false });
3686
+ void changeManager.submit(change, { submitToBackend: false });
3647
3687
  });
3648
3688
  socket.on('USER_LOCATION', (message) => {
3649
3689
  const { channel, locations, userName, userSessionId } = message;
@@ -3698,7 +3738,9 @@ const stateModelFactory$2 = (configSchema) => {
3698
3738
  let timeoutId;
3699
3739
  return (userLocation) => {
3700
3740
  clearTimeout(timeoutId);
3701
- timeoutId = setTimeout(() => fn(userLocation), debounceTimeout);
3741
+ timeoutId = setTimeout(() => {
3742
+ fn(userLocation);
3743
+ }, debounceTimeout);
3702
3744
  };
3703
3745
  };
3704
3746
  return { postUserLocation: debouncePostUserLocation(postUserLocation) };
@@ -3755,6 +3797,7 @@ const stateModelFactory$2 = (configSchema) => {
3755
3797
  }));
3756
3798
  };
3757
3799
 
3800
+ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
3758
3801
  function isApolloMessageData$1(data) {
3759
3802
  return (typeof data === 'object' &&
3760
3803
  data !== null &&
@@ -3943,8 +3986,9 @@ function ApolloRendering(props) {
3943
3986
  const { session } = displayModel;
3944
3987
  const { collaborators: collabs } = session;
3945
3988
  // bridging mobx observability and React useEffect observability
3946
- // eslint-disable-next-line react-hooks/exhaustive-deps
3947
- React.useEffect(() => mobx.autorun(() => setCollaborators(mobx.toJS(collabs))), []);
3989
+ React.useEffect(() => mobx.autorun(() => {
3990
+ setCollaborators(mobx.toJS(collabs));
3991
+ }), []);
3948
3992
  const [region] = regions;
3949
3993
  const totalWidth = (region.end - region.start) / bpPerPx;
3950
3994
  const { apolloFeatureUnderMouse, apolloRowHeight: height, apolloRowUnderMouse, changeManager, codonLayout, featureLayout, features, featuresHeight: totalHeight, getAssemblyId, selectedFeature, setApolloFeatureUnderMouse, setApolloRowUnderMouse, setSelectedFeature, showIntronLines: showLines, showStartCodons: showStarts, showStopCodons: showStops, } = displayModel;
@@ -4325,7 +4369,7 @@ function ApolloRendering(props) {
4325
4369
  assembly,
4326
4370
  });
4327
4371
  }
4328
- await changeManager?.submit(change);
4372
+ await changeManager.submit(change);
4329
4373
  }
4330
4374
  // eslint-disable-next-line unicorn/no-useless-undefined
4331
4375
  setDragging(undefined);
@@ -4426,6 +4470,7 @@ var ApolloSixFrameRendererReactComponent = mobxReact.observer(ApolloRendering);
4426
4470
 
4427
4471
  var apolloSixFrameRendererConfigSchema = configuration.ConfigurationSchema('ApolloSixFrameRenderer', {}, { explicitlyTyped: true });
4428
4472
 
4473
+ /* eslint-disable @typescript-eslint/require-await */
4429
4474
  class ApolloSixFrameRenderer extends pluggableElementTypes.RendererType {
4430
4475
  async renderInClient(_rpcManager, args) {
4431
4476
  return this.render(args);
@@ -4435,6 +4480,7 @@ class ApolloSixFrameRenderer extends pluggableElementTypes.RendererType {
4435
4480
  }
4436
4481
  }
4437
4482
 
4483
+ /* eslint-disable @typescript-eslint/no-unsafe-return */
4438
4484
  class ApolloTextSearchAdapter extends BaseAdapter.BaseAdapter {
4439
4485
  get baseURL() {
4440
4486
  return configuration.readConfObject(this.config, 'baseURL').uri;
@@ -4499,6 +4545,7 @@ function installApolloTextSearchAdapter(pluginManager) {
4499
4545
  }));
4500
4546
  }
4501
4547
 
4548
+ /* eslint-disable @typescript-eslint/no-unnecessary-condition */
4502
4549
  var PhaseEnum;
4503
4550
  (function (PhaseEnum) {
4504
4551
  PhaseEnum[PhaseEnum["zero"] = 0] = "zero";
@@ -4552,7 +4599,7 @@ function AddFeature({ changeManager, handleClose, region, session, }) {
4552
4599
  strand,
4553
4600
  },
4554
4601
  });
4555
- await changeManager.submit?.(change);
4602
+ await changeManager.submit(change);
4556
4603
  notify('Feature added successfully', 'success');
4557
4604
  handleClose();
4558
4605
  event.preventDefault();
@@ -4585,7 +4632,7 @@ function AddFeature({ changeManager, handleClose, region, session, }) {
4585
4632
  }
4586
4633
  }
4587
4634
  }
4588
- async function handleChangePhase(e) {
4635
+ function handleChangePhase(e) {
4589
4636
  setErrorMessage('');
4590
4637
  setPhase(e.target.value);
4591
4638
  switch (Number(e.target.value)) {
@@ -4611,8 +4658,12 @@ function AddFeature({ changeManager, handleClose, region, session, }) {
4611
4658
  return (React__default["default"].createElement(Dialog, { open: true, title: "Add new feature", handleClose: handleClose, maxWidth: false, "data-testid": "add-feature-dialog" },
4612
4659
  React__default["default"].createElement("form", { onSubmit: onSubmit },
4613
4660
  React__default["default"].createElement(material.DialogContent, { style: { display: 'flex', flexDirection: 'column' } },
4614
- React__default["default"].createElement(material.TextField, { margin: "dense", id: "start", label: "Start", type: "number", fullWidth: true, variant: "outlined", value: Number(start), onChange: (e) => setStart(e.target.value) }),
4615
- React__default["default"].createElement(material.TextField, { margin: "dense", id: "end", label: "End", type: "number", fullWidth: true, variant: "outlined", value: end, onChange: (e) => setEnd(e.target.value), error: error, helperText: error ? '"End" must be greater than "Start"' : null }),
4661
+ React__default["default"].createElement(material.TextField, { margin: "dense", id: "start", label: "Start", type: "number", fullWidth: true, variant: "outlined", value: Number(start), onChange: (e) => {
4662
+ setStart(e.target.value);
4663
+ } }),
4664
+ React__default["default"].createElement(material.TextField, { margin: "dense", id: "end", label: "End", type: "number", fullWidth: true, variant: "outlined", value: end, onChange: (e) => {
4665
+ setEnd(e.target.value);
4666
+ }, error: error, helperText: error ? '"End" must be greater than "Start"' : null }),
4616
4667
  React__default["default"].createElement(OntologyTermAutocomplete, { session: session, ontologyName: "Sequence Ontology", style: { width: 170 }, value: type, filterTerms: isOntologyClass, renderInput: (params) => (React__default["default"].createElement(material.TextField, { ...params, label: "Type", variant: "outlined", fullWidth: true })), onChange: (oldValue, newValue) => {
4617
4668
  if (newValue) {
4618
4669
  handleChangeType(newValue);
@@ -4692,7 +4743,9 @@ function ViewCheckResults({ handleClose, session, }) {
4692
4743
  setDisplayGridData(data);
4693
4744
  }
4694
4745
  }
4695
- getGridData().catch((error) => setErrorMessage(String(error)));
4746
+ getGridData().catch((error) => {
4747
+ setErrorMessage(String(error));
4748
+ });
4696
4749
  }, [selectedAssembly, apolloInternetAccount, baseURL]);
4697
4750
  function handleChangeAssembly(e) {
4698
4751
  const newAssembly = assemblies.find((asm) => asm.name === e.target.value);
@@ -4845,7 +4898,7 @@ function annotationFromPileup(pluggableElement) {
4845
4898
  cdsFeature.start = Math.min(cdsFeature.start, exon.start);
4846
4899
  cdsFeature.end = Math.max(cdsFeature.end, exon.end);
4847
4900
  const { end, start } = exon;
4848
- discontinuousLocations?.push({ start, end, phase });
4901
+ discontinuousLocations.push({ start, end, phase });
4849
4902
  const localPhase = (end - start) % 3;
4850
4903
  phase = ((phase + localPhase) % 3);
4851
4904
  const newExon = {
@@ -4873,7 +4926,7 @@ function annotationFromPileup(pluggableElement) {
4873
4926
  addedFeature: newFeature,
4874
4927
  });
4875
4928
  const session = util.getSession(self);
4876
- await session.apolloDataStore.changeManager.submit?.(change);
4929
+ await session.apolloDataStore.changeManager.submit(change);
4877
4930
  session.notify('Annotation added successfully', 'success');
4878
4931
  },
4879
4932
  }))
@@ -4900,6 +4953,7 @@ function annotationFromPileup(pluggableElement) {
4900
4953
  return pluggableElement;
4901
4954
  }
4902
4955
 
4956
+ /* eslint-disable @typescript-eslint/no-unsafe-argument */
4903
4957
  const StringTextField = mobxReact.observer(function StringTextField({ onChangeCommitted, value: initialValue, ...props }) {
4904
4958
  const [value, setValue] = React.useState(String(initialValue));
4905
4959
  const [blur, setBlur] = React.useState(false);
@@ -4928,7 +4982,9 @@ const StringTextField = mobxReact.observer(function StringTextField({ onChangeCo
4928
4982
  if (value !== String(initialValue)) {
4929
4983
  onChangeCommitted(value);
4930
4984
  }
4931
- }, inputRef: (node) => setInputNode(node) }));
4985
+ }, inputRef: (node) => {
4986
+ setInputNode(node);
4987
+ } }));
4932
4988
  });
4933
4989
 
4934
4990
  const reservedKeys = new Map([
@@ -5065,7 +5121,7 @@ const Attributes = mobxReact.observer(function Attributes({ assembly, editable,
5065
5121
  featureId: feature._id,
5066
5122
  attributes: attrs,
5067
5123
  });
5068
- await changeManager.submit?.(change);
5124
+ await changeManager.submit(change);
5069
5125
  notify('Feature attributes modified successfully', 'success');
5070
5126
  }
5071
5127
  function handleAddNewAttributeChange() {
@@ -5148,6 +5204,7 @@ const Attributes = mobxReact.observer(function Attributes({ assembly, editable,
5148
5204
  errorMessage ? (React__default["default"].createElement(material.Typography, { color: "error" }, errorMessage)) : null));
5149
5205
  });
5150
5206
 
5207
+ /* eslint-disable @typescript-eslint/no-unsafe-argument */
5151
5208
  const NumberTextField = mobxReact.observer(function NumberTextField({ onChangeCommitted, value: initialValue, ...props }) {
5152
5209
  const [value, setValue] = React.useState(String(initialValue));
5153
5210
  const [blur, setBlur] = React.useState(false);
@@ -5183,14 +5240,18 @@ const NumberTextField = mobxReact.observer(function NumberTextField({ onChangeCo
5183
5240
  onChangeCommitted(valueAsNumber);
5184
5241
  }
5185
5242
  }
5186
- }, inputRef: (node) => setInputNode(node), error: error, helperText: error ? 'Not a valid number' : undefined }));
5243
+ }, inputRef: (node) => {
5244
+ setInputNode(node);
5245
+ }, error: error, helperText: error ? 'Not a valid number' : undefined }));
5187
5246
  });
5188
5247
 
5189
5248
  const BasicInformation = mobxReact.observer(function BasicInformation({ assembly, feature, session, }) {
5190
5249
  const [errorMessage, setErrorMessage] = React.useState('');
5191
5250
  const [typeWarningText, setTypeWarningText] = React.useState('');
5192
5251
  const { _id, assemblyId, end, start, strand, type } = feature;
5193
- const notifyError = (e) => session.notify(e.message, 'error');
5252
+ const notifyError = (e) => {
5253
+ session.notify(e.message, 'error');
5254
+ };
5194
5255
  const { changeManager } = session.apolloDataStore;
5195
5256
  function handleTypeChange(newType) {
5196
5257
  setErrorMessage('');
@@ -5286,7 +5347,7 @@ const RelatedFeatures = mobxReact.observer(function RelatedFeatures({ assembly,
5286
5347
  assembly,
5287
5348
  refName,
5288
5349
  });
5289
- session.showWidget?.(apolloFeatureWidget);
5350
+ session.showWidget(apolloFeatureWidget);
5290
5351
  }
5291
5352
  };
5292
5353
  if (!(parent || (children && children.size > 0))) {
@@ -5298,12 +5359,16 @@ const RelatedFeatures = mobxReact.observer(function RelatedFeatures({ assembly,
5298
5359
  React__default["default"].createElement(material.Typography, { variant: "h5" }, "Parent"),
5299
5360
  React__default["default"].createElement(material.Paper, { elevation: 6, className: classes.paper },
5300
5361
  `Start: ${parent.start}, End: ${parent.end}, Type: ${parent.type}`,
5301
- React__default["default"].createElement(material.Button, { variant: "contained", onClick: () => onButtonClick(parent) }, "Go to parent")))),
5362
+ React__default["default"].createElement(material.Button, { variant: "contained", onClick: () => {
5363
+ onButtonClick(parent);
5364
+ } }, "Go to parent")))),
5302
5365
  children && children.size > 0 && (React__default["default"].createElement(React__default["default"].Fragment, null,
5303
5366
  React__default["default"].createElement(material.Typography, { variant: "h5" }, "Children"),
5304
5367
  [...children.values()].map((child) => (React__default["default"].createElement(material.Paper, { elevation: 6, className: classes.paper, key: child._id },
5305
5368
  `Start: ${child.start}, End: ${child.end}, Type: ${child.type}`,
5306
- React__default["default"].createElement(material.Button, { variant: "contained", onClick: () => onButtonClick(child) }, "Go to child"))))))));
5369
+ React__default["default"].createElement(material.Button, { variant: "contained", onClick: () => {
5370
+ onButtonClick(child);
5371
+ } }, "Go to child"))))))));
5307
5372
  });
5308
5373
 
5309
5374
  function formatSequence(seq, refName, start, end, wrap) {
@@ -5391,6 +5456,7 @@ const ApolloFeatureDetailsWidget = mobxReact.observer(function ApolloFeatureDeta
5391
5456
  React__default["default"].createElement(RelatedFeatures, { feature: feature, refName: refName, session: session, assembly: currentAssembly._id })));
5392
5457
  });
5393
5458
 
5459
+ /* eslint-disable @typescript-eslint/no-unsafe-call */
5394
5460
  const ApolloFeatureDetailsWidgetModel = mobxStateTree.types
5395
5461
  .model('ApolloFeatureDetailsWidget', {
5396
5462
  id: mst.ElementId,
@@ -5673,7 +5739,9 @@ const NumberCell = mobxReact.observer(function NumberCell({ initialValue, notify
5673
5739
  if (value !== initialValue) {
5674
5740
  onChangeCommitted(value).catch(notifyError);
5675
5741
  }
5676
- }, ref: (node) => setInputNode(node) })));
5742
+ }, ref: (node) => {
5743
+ setInputNode(node);
5744
+ } })));
5677
5745
  });
5678
5746
 
5679
5747
  const useStyles$4 = mui.makeStyles()((theme) => ({
@@ -5732,7 +5800,9 @@ const Feature = mobxReact.observer(function Feature({ depth, feature, isHovered,
5732
5800
  tabularEditorState.setFeatureCollapsed(_id, expanded);
5733
5801
  };
5734
5802
  // pop up a snackbar in the session notifying user of an error
5735
- const notifyError = (e) => session.notify(e.message, 'error');
5803
+ const notifyError = (e) => {
5804
+ session.notify(e.message, 'error');
5805
+ };
5736
5806
  return (React__default["default"].createElement(React__default["default"].Fragment, null,
5737
5807
  React__default["default"].createElement("tr", { onMouseEnter: (_e) => {
5738
5808
  displayState.setApolloHover({
@@ -5894,6 +5964,7 @@ const HybridGrid = mobxReact.observer(function HybridGrid({ model, }) {
5894
5964
  }, style: { zIndex: theme.zIndex.tooltip }, menuItems: contextMenu?.items ?? [], anchorReference: "anchorPosition", anchorPosition: contextMenu?.position })));
5895
5965
  });
5896
5966
 
5967
+ /* eslint-disable @typescript-eslint/unbound-method */
5897
5968
  const useStyles$2 = mui.makeStyles()({
5898
5969
  toolbar: {
5899
5970
  width: '100%',
@@ -5913,9 +5984,13 @@ const ToolBar = mobxReact.observer(function ToolBar({ model: displayState, }) {
5913
5984
  React__default["default"].createElement(material.Tooltip, { title: "Collapse all" },
5914
5985
  React__default["default"].createElement(material.IconButton, { "aria-label": "collapse", sx: { marginTop: 0 }, onClick: model.collapseAllFeatures },
5915
5986
  React__default["default"].createElement(UnfoldLessIcon__default["default"], null))),
5916
- React__default["default"].createElement(material.TextField, { className: classes.filterText, label: "Filter features", value: model.filterText, sx: { marginTop: 0 }, variant: "outlined", onChange: (event) => model.setFilterText(event.target.value), InputProps: {
5987
+ React__default["default"].createElement(material.TextField, { className: classes.filterText, label: "Filter features", value: model.filterText, sx: { marginTop: 0 }, variant: "outlined", onChange: (event) => {
5988
+ model.setFilterText(event.target.value);
5989
+ }, InputProps: {
5917
5990
  endAdornment: (React__default["default"].createElement(material.InputAdornment, { position: "end" },
5918
- React__default["default"].createElement(material.IconButton, { onClick: () => model.clearFilterText() },
5991
+ React__default["default"].createElement(material.IconButton, { onClick: () => {
5992
+ model.clearFilterText();
5993
+ } },
5919
5994
  React__default["default"].createElement(ClearIcon__default["default"], null)))),
5920
5995
  } })));
5921
5996
  });
@@ -6217,7 +6292,7 @@ class Glyph {
6217
6292
  assembly: currentAssemblyId,
6218
6293
  refName: region.refName,
6219
6294
  });
6220
- session.showWidget?.(apolloFeatureWidget);
6295
+ session.showWidget(apolloFeatureWidget);
6221
6296
  },
6222
6297
  });
6223
6298
  }
@@ -6631,7 +6706,7 @@ function baseModelFactory(_pluginManager, configSchema) {
6631
6706
  },
6632
6707
  get changeManager() {
6633
6708
  return self.session.apolloDataStore
6634
- ?.changeManager;
6709
+ .changeManager;
6635
6710
  },
6636
6711
  getAssemblyId(assemblyName) {
6637
6712
  const { assemblyManager } = self.session;
@@ -6648,7 +6723,7 @@ function baseModelFactory(_pluginManager, configSchema) {
6648
6723
  }))
6649
6724
  .actions((self) => ({
6650
6725
  setSelectedFeature(feature) {
6651
- return self.session.apolloSetSelectedFeature(feature);
6726
+ self.session.apolloSetSelectedFeature(feature);
6652
6727
  },
6653
6728
  afterAttach() {
6654
6729
  mobxStateTree.addDisposer(self, mobx.autorun(() => {
@@ -6943,8 +7018,8 @@ function codonColorCode(letter, rowColorCode, bpPerPx) {
6943
7018
  M: '#33ee33',
6944
7019
  '*': '#f44336',
6945
7020
  };
6946
- if (colorMap[letter?.toUpperCase()] !== undefined) {
6947
- return colorMap[letter?.toUpperCase()];
7021
+ if (colorMap[letter.toUpperCase()] !== undefined) {
7022
+ return colorMap[letter.toUpperCase()];
6948
7023
  }
6949
7024
  return bpPerPx <= 0.1 ? rowColorCode : 'lightgray';
6950
7025
  }
@@ -7324,7 +7399,7 @@ class CanonicalGeneGlyph extends Glyph {
7324
7399
  let featureRow;
7325
7400
  let i = 0;
7326
7401
  for (const [, f] of children ?? new Map()) {
7327
- if (f._id === apolloSelectedFeature?._id) {
7402
+ if (f._id === apolloSelectedFeature._id) {
7328
7403
  featureEntry = f;
7329
7404
  featureRow = i;
7330
7405
  }
@@ -7393,7 +7468,7 @@ class CanonicalGeneGlyph extends Glyph {
7393
7468
  let featureRow;
7394
7469
  let i = 0;
7395
7470
  for (const [, f] of topLevelFeature.children ?? new Map()) {
7396
- if (f._id === feature?._id) {
7471
+ if (f._id === feature._id) {
7397
7472
  featureEntry = f;
7398
7473
  featureRow = i;
7399
7474
  }
@@ -7755,10 +7830,10 @@ class CanonicalGeneGlyph extends Glyph {
7755
7830
  }
7756
7831
  if (feature.type !== 'CDS') {
7757
7832
  const adjacentExons = this.adjacentExonsOfExon(feature, topLevelFeature);
7758
- if (adjacentExons?.nextExon && bp >= adjacentExons?.nextExon.start - 1) {
7833
+ if (adjacentExons?.nextExon && bp >= adjacentExons.nextExon.start - 1) {
7759
7834
  return;
7760
7835
  }
7761
- if (adjacentExons?.prevExon && bp <= adjacentExons?.prevExon.end + 1) {
7836
+ if (adjacentExons?.prevExon && bp <= adjacentExons.prevExon.end + 1) {
7762
7837
  return;
7763
7838
  }
7764
7839
  const dls = this.cdsDlsForExon(feature, topLevelFeature);
@@ -8032,7 +8107,7 @@ class GenericChildGlyph extends BoxGlyph {
8032
8107
  }
8033
8108
  getFeatureFromLayout(feature, bp, row) {
8034
8109
  const layoutRow = this.featuresForRow(feature)[row];
8035
- return layoutRow?.find((f) => bp >= f.start && bp <= f.end);
8110
+ return layoutRow.find((f) => bp >= f.start && bp <= f.end);
8036
8111
  }
8037
8112
  getRowForFeature(feature, childFeature) {
8038
8113
  const rows = this.featuresForRow(feature);
@@ -8192,7 +8267,7 @@ class ImplicitExonGeneGlyph extends Glyph {
8192
8267
  let featureRow;
8193
8268
  let i = 0;
8194
8269
  for (const [, f] of children ?? new Map()) {
8195
- if (f._id === apolloSelectedFeature?._id) {
8270
+ if (f._id === apolloSelectedFeature._id) {
8196
8271
  featureEntry = f;
8197
8272
  featureRow = i;
8198
8273
  }
@@ -8450,7 +8525,7 @@ class ImplicitExonGeneGlyph extends Glyph {
8450
8525
  }
8451
8526
  getFeatureFromLayout(feature, bp, row) {
8452
8527
  const layoutRow = this.featuresForRow(feature)[row];
8453
- return layoutRow?.find((f) => bp >= f.start && bp <= f.end);
8528
+ return layoutRow.find((f) => bp >= f.start && bp <= f.end);
8454
8529
  }
8455
8530
  getRowForFeature(feature, childFeature) {
8456
8531
  const rows = this.featuresForRow(feature);
@@ -8689,7 +8764,7 @@ function mouseEventsSeqHightlightModelFactory(pluginManager, configSchema) {
8689
8764
  const LinearApolloDisplayRendering = mouseEventsModelIntermediateFactory(pluginManager, configSchema);
8690
8765
  return LinearApolloDisplayRendering.actions((self) => ({
8691
8766
  afterAttach() {
8692
- mobxStateTree.addDisposer(self, mobx.autorun(async () => {
8767
+ mobxStateTree.addDisposer(self, mobx.autorun(() => {
8693
8768
  if (!self.lgv.initialized || self.regionCannotBeRendered()) {
8694
8769
  return;
8695
8770
  }
@@ -8934,6 +9009,7 @@ function stateModelFactory$1(pluginManager, configSchema) {
8934
9009
  .named('LinearApolloDisplay');
8935
9010
  }
8936
9011
 
9012
+ /* eslint-disable @typescript-eslint/unbound-method */
8937
9013
  const useStyles$1 = mui.makeStyles()((theme) => ({
8938
9014
  canvasContainer: {
8939
9015
  position: 'relative',
@@ -8959,7 +9035,9 @@ const LinearApolloDisplay = mobxReact.observer(function LinearApolloDisplay(prop
8959
9035
  const { apolloRowHeight, contextMenuItems: getContextMenuItems, cursor, featuresHeight, isShown, onMouseDown, onMouseLeave, onMouseMove, onMouseUp, regionCannotBeRendered, session, setCanvas, setCollaboratorCanvas, setOverlayCanvas, setSeqTrackCanvas, setSeqTrackOverlayCanvas, setTheme, tabularEditor, } = model;
8960
9036
  const { classes } = useStyles$1();
8961
9037
  const lgv = util.getContainingView(model);
8962
- React.useEffect(() => setTheme(theme), [theme, setTheme]);
9038
+ React.useEffect(() => {
9039
+ setTheme(theme);
9040
+ }, [theme, setTheme]);
8963
9041
  const [contextCoord, setContextCoord] = React.useState();
8964
9042
  const [contextMenuItems, setContextMenuItems] = React.useState([]);
8965
9043
  const message = regionCannotBeRendered();
@@ -9018,7 +9096,7 @@ const LinearApolloDisplay = mobxReact.observer(function LinearApolloDisplay(prop
9018
9096
  const assembly = assemblyManager.get(region.assemblyName);
9019
9097
  return [...session.apolloDataStore.checkResults.values()]
9020
9098
  .filter((checkResult) => assembly?.isValidRefName(checkResult.refSeq) &&
9021
- assembly?.getCanonicalRefName(checkResult.refSeq) ===
9099
+ assembly.getCanonicalRefName(checkResult.refSeq) ===
9022
9100
  region.refName &&
9023
9101
  util.doesIntersect2(region.start, region.end, checkResult.start, checkResult.end))
9024
9102
  .map((checkResult) => {
@@ -9158,7 +9236,9 @@ const DisplayComponent = mobxReact.observer(function DisplayComponent({ model, .
9158
9236
  model.setDetailsHeight(model.detailsHeight - delta);
9159
9237
  };
9160
9238
  const canvasScrollContainerRef = React.useRef(null);
9161
- React.useEffect(() => scrollSelectedFeatureIntoView(model, canvasScrollContainerRef), [model, selectedFeature]);
9239
+ React.useEffect(() => {
9240
+ scrollSelectedFeatureIntoView(model, canvasScrollContainerRef);
9241
+ }, [model, selectedFeature]);
9162
9242
  return (React__default["default"].createElement("div", { className: classes.details, style: { height: overallHeight } },
9163
9243
  React__default["default"].createElement(AccordionControl, { open: isShown, title: "Graphical", onClick: toggleShown }),
9164
9244
  React__default["default"].createElement("div", { className: classes.shading, ref: canvasScrollContainerRef, style: { height: featureAreaHeight } },
@@ -9190,6 +9270,7 @@ function makeSixFrameDisplayComponent(pluginManager) {
9190
9270
  return mobxReact.observer(ApolloDisplayComponent);
9191
9271
  }
9192
9272
 
9273
+ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
9193
9274
  const ApolloJobModel = mobxStateTree.types
9194
9275
  .model('JobsManager', {})
9195
9276
  .views((self) => ({
@@ -9277,6 +9358,7 @@ class BackendDriver {
9277
9358
  }
9278
9359
  }
9279
9360
 
9361
+ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
9280
9362
  class ChangeManager {
9281
9363
  dataStore;
9282
9364
  constructor(dataStore) {
@@ -9388,6 +9470,7 @@ class ChangeManager {
9388
9470
  }
9389
9471
  }
9390
9472
 
9473
+ /* eslint-disable @typescript-eslint/no-base-to-string */
9391
9474
  class CollaborationServerDriver extends BackendDriver {
9392
9475
  inFlight = new Map();
9393
9476
  async fetch(internetAccount, info, init) {
@@ -9446,7 +9529,7 @@ class CollaborationServerDriver extends BackendDriver {
9446
9529
  const errorMessage = await createFetchErrorMessage(response, 'getFeatures failed');
9447
9530
  throw new Error(errorMessage);
9448
9531
  }
9449
- await this.checkSocket(assemblyName, refName, internetAccount);
9532
+ this.checkSocket(assemblyName, refName, internetAccount);
9450
9533
  return response.json();
9451
9534
  }
9452
9535
  /**
@@ -9455,7 +9538,7 @@ class CollaborationServerDriver extends BackendDriver {
9455
9538
  * @param refSeq - refSeqName
9456
9539
  * @param internetAccount - internet account
9457
9540
  */
9458
- async checkSocket(assembly, refSeq, internetAccount) {
9541
+ checkSocket(assembly, refSeq, internetAccount) {
9459
9542
  const { socket } = internetAccount;
9460
9543
  const token = internetAccount.retrieveToken();
9461
9544
  const channel = `${assembly}-${refSeq}`;
@@ -9498,7 +9581,7 @@ class CollaborationServerDriver extends BackendDriver {
9498
9581
  if (!apolloAssembly) {
9499
9582
  apolloAssembly = this.clientStore.addAssembly(assemblyName);
9500
9583
  }
9501
- let apolloRefSeq = apolloAssembly?.refSeqs.get(refSeq);
9584
+ let apolloRefSeq = apolloAssembly.refSeqs.get(refSeq);
9502
9585
  if (!apolloRefSeq) {
9503
9586
  apolloRefSeq = apolloAssembly.addRefSeq(refSeq, refName);
9504
9587
  }
@@ -9519,7 +9602,7 @@ class CollaborationServerDriver extends BackendDriver {
9519
9602
  const seqPromise = this.getSeqFromServer(internetAccount, uri, apolloRefSeq, start, end);
9520
9603
  this.inFlight.set(inFlightKey, seqPromise);
9521
9604
  const seq = await seqPromise;
9522
- await this.checkSocket(assemblyName, refName, internetAccount);
9605
+ this.checkSocket(assemblyName, refName, internetAccount);
9523
9606
  this.inFlight.delete(inFlightKey);
9524
9607
  return { seq, refSeq };
9525
9608
  }
@@ -9657,6 +9740,7 @@ class InMemoryFileDriver extends BackendDriver {
9657
9740
  }
9658
9741
  }
9659
9742
 
9743
+ /* eslint-disable @typescript-eslint/require-await */
9660
9744
  class DesktopFileDriver extends BackendDriver {
9661
9745
  async loadAssembly(assemblyName) {
9662
9746
  const { assemblyManager } = util.getSession(this.clientStore);
@@ -10371,7 +10455,7 @@ function stateModelFactory(pluginManager, configSchema) {
10371
10455
  },
10372
10456
  get changeManager() {
10373
10457
  const session = util.getSession(self);
10374
- return session.apolloDataStore?.changeManager;
10458
+ return session.apolloDataStore.changeManager;
10375
10459
  },
10376
10460
  get sequence() {
10377
10461
  const { regions } = self;
@@ -10565,7 +10649,7 @@ function stateModelFactory(pluginManager, configSchema) {
10565
10649
  .actions((self) => ({
10566
10650
  setSelectedFeature(feature) {
10567
10651
  const session = util.getSession(self);
10568
- return session.apolloSetSelectedFeature(feature);
10652
+ session.apolloSetSelectedFeature(feature);
10569
10653
  },
10570
10654
  setApolloFeatureUnderMouse(feature) {
10571
10655
  self.apolloFeatureUnderMouse = feature;
@@ -10602,25 +10686,32 @@ function stateModelFactory(pluginManager, configSchema) {
10602
10686
  label: 'Show start codons',
10603
10687
  type: 'checkbox',
10604
10688
  checked: self.showStartCodons,
10605
- onClick: () => self.toggleShowStartCodons(),
10689
+ onClick: () => {
10690
+ self.toggleShowStartCodons();
10691
+ },
10606
10692
  },
10607
10693
  {
10608
10694
  label: 'Show stop codons',
10609
10695
  type: 'checkbox',
10610
10696
  checked: self.showStopCodons,
10611
- onClick: () => self.toggleShowStopCodons(),
10697
+ onClick: () => {
10698
+ self.toggleShowStopCodons();
10699
+ },
10612
10700
  },
10613
10701
  {
10614
10702
  label: 'Show intron lines',
10615
10703
  type: 'checkbox',
10616
10704
  checked: self.showIntronLines,
10617
- onClick: () => self.toggleShowIntronLines(),
10705
+ onClick: () => {
10706
+ self.toggleShowIntronLines();
10707
+ },
10618
10708
  },
10619
10709
  ];
10620
10710
  },
10621
10711
  }));
10622
10712
  }
10623
10713
 
10714
+ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
10624
10715
  function isApolloMessageData(data) {
10625
10716
  return (typeof data === 'object' &&
10626
10717
  data !== null &&