@apollo-annotation/jbrowse-plugin-apollo 0.1.10 → 0.1.12

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 (55) hide show
  1. package/dist/index.esm.js +4 -4
  2. package/dist/index.esm.js.map +1 -1
  3. package/dist/jbrowse-plugin-apollo.cjs.development.js +68 -68
  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 +77 -78
  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 +5 -5
  12. package/src/ApolloInternetAccount/model.ts +2 -2
  13. package/src/ApolloSixFrameRenderer/components/ApolloRendering.tsx +2 -2
  14. package/src/BackendDrivers/BackendDriver.ts +3 -3
  15. package/src/BackendDrivers/CollaborationServerDriver.ts +3 -9
  16. package/src/BackendDrivers/DesktopFileDriver.ts +3 -3
  17. package/src/BackendDrivers/InMemoryFileDriver.ts +3 -6
  18. package/src/ChangeManager.ts +2 -2
  19. package/src/FeatureDetailsWidget/Attributes.tsx +2 -2
  20. package/src/FeatureDetailsWidget/BasicInformation.tsx +2 -2
  21. package/src/FeatureDetailsWidget/RelatedFeature.tsx +1 -4
  22. package/src/FeatureDetailsWidget/Sequence.tsx +2 -2
  23. package/src/FeatureDetailsWidget/model.ts +1 -4
  24. package/src/LinearApolloDisplay/glyphs/BoxGlyph.ts +2 -2
  25. package/src/LinearApolloDisplay/glyphs/CanonicalGeneGlyph.ts +2 -2
  26. package/src/LinearApolloDisplay/glyphs/GenericChildGlyph.ts +1 -1
  27. package/src/LinearApolloDisplay/glyphs/Glyph.ts +1 -1
  28. package/src/LinearApolloDisplay/glyphs/ImplicitExonGeneGlyph.ts +2 -2
  29. package/src/LinearApolloDisplay/stateModel/base.ts +1 -1
  30. package/src/LinearApolloDisplay/stateModel/getGlyph.ts +1 -1
  31. package/src/LinearApolloDisplay/stateModel/glyphs.ts +1 -1
  32. package/src/LinearApolloDisplay/stateModel/layouts.ts +1 -1
  33. package/src/LinearApolloDisplay/stateModel/mouseEvents.ts +1 -1
  34. package/src/OntologyManager/util.ts +1 -1
  35. package/src/SixFrameFeatureDisplay/stateModel.ts +1 -1
  36. package/src/TabularEditor/HybridGrid/ChangeHandling.ts +2 -2
  37. package/src/TabularEditor/HybridGrid/Feature.tsx +1 -1
  38. package/src/TabularEditor/HybridGrid/FeatureAttributes.tsx +1 -1
  39. package/src/TabularEditor/HybridGrid/featureContextMenuItems.ts +1 -1
  40. package/src/components/AddAssembly.tsx +1 -1
  41. package/src/components/AddChildFeature.tsx +2 -2
  42. package/src/components/AddFeature.tsx +1 -1
  43. package/src/components/CopyFeature.tsx +2 -2
  44. package/src/components/DeleteAssembly.tsx +1 -1
  45. package/src/components/DeleteFeature.tsx +2 -2
  46. package/src/components/DownloadGFF3.tsx +2 -2
  47. package/src/components/ImportFeatures.tsx +1 -1
  48. package/src/components/ManageUsers.tsx +1 -1
  49. package/src/components/ModifyFeatureAttribute.tsx +2 -2
  50. package/src/components/ViewChangeLog.tsx +1 -1
  51. package/src/extensions/annotationFromPileup.ts +2 -2
  52. package/src/index.ts +2 -2
  53. package/src/session/ClientDataStore.ts +2 -2
  54. package/src/session/session.ts +3 -6
  55. package/src/util/loadAssemblyIntoClient.ts +2 -5
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var apolloCommon = require('@apollo-annotation/apollo-common');
6
- var apolloShared = require('@apollo-annotation/apollo-shared');
5
+ var common = require('@apollo-annotation/common');
6
+ var shared = require('@apollo-annotation/shared');
7
7
  var configuration = require('@jbrowse/core/configuration');
8
8
  var pluggableElementTypes = require('@jbrowse/core/pluggableElementTypes');
9
9
  var Plugin = require('@jbrowse/core/Plugin');
@@ -43,7 +43,7 @@ var BaseAdapter = require('@jbrowse/core/data_adapters/BaseAdapter');
43
43
  var rxjs = require('@jbrowse/core/util/rxjs');
44
44
  var SimpleFeature = require('@jbrowse/core/util/simpleFeature');
45
45
  var BaseResult = require('@jbrowse/core/TextSearch/BaseResults');
46
- var apolloMst = require('@apollo-annotation/apollo-mst');
46
+ var mst$1 = require('@apollo-annotation/mst');
47
47
  var ClearIcon = require('@mui/icons-material/Clear');
48
48
  var UnfoldLessIcon = require('@mui/icons-material/UnfoldLess');
49
49
  var tracks = require('@jbrowse/core/util/tracks');
@@ -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.10";
101
+ var version = "0.1.12";
102
102
 
103
103
  const ApolloConfigSchema = configuration.ConfigurationSchema('ApolloInternetAccount', {
104
104
  baseURL: {
@@ -169,7 +169,7 @@ async function checkFeatures(assembly) {
169
169
  const checkResults = [];
170
170
  for (const ref of assembly.refSeqs.values()) {
171
171
  for (const feature of ref.features.values()) {
172
- for (const check of apolloCommon.checkRegistry.getChecks().values()) {
172
+ for (const check of common.checkRegistry.getChecks().values()) {
173
173
  const result = await check.checkFeature(mobxStateTree.getSnapshot(feature), (start, stop) => Promise.resolve(ref.getSequence(start, stop)));
174
174
  checkResults.push(...result);
175
175
  }
@@ -516,7 +516,7 @@ function AddAssembly({ changeManager, handleClose, session, }) {
516
516
  }
517
517
  let change;
518
518
  if (fileType === FileType.EXTERNAL) {
519
- change = new apolloShared.AddAssemblyFromExternalChange({
519
+ change = new shared.AddAssemblyFromExternalChange({
520
520
  typeName: 'AddAssemblyFromExternalChange',
521
521
  assembly: new ObjectID__default["default"]().toHexString(),
522
522
  assemblyName,
@@ -535,11 +535,11 @@ function AddAssembly({ changeManager, handleClose, session, }) {
535
535
  };
536
536
  change =
537
537
  fileType === FileType.GFF3 && importFeatures
538
- ? new apolloShared.AddAssemblyAndFeaturesFromFileChange({
538
+ ? new shared.AddAssemblyAndFeaturesFromFileChange({
539
539
  typeName: 'AddAssemblyAndFeaturesFromFileChange',
540
540
  ...fileUploadChangeBase,
541
541
  })
542
- : new apolloShared.AddAssemblyFromFileChange({
542
+ : new shared.AddAssemblyFromFileChange({
543
543
  typeName: 'AddAssemblyFromFileChange',
544
544
  ...fileUploadChangeBase,
545
545
  });
@@ -1713,7 +1713,7 @@ function AddChildFeature({ changeManager, handleClose, session, sourceAssemblyId
1713
1713
  setErrorMessage('The phase is REQUIRED for all CDS features.');
1714
1714
  return;
1715
1715
  }
1716
- const change = new apolloShared.AddFeatureChange({
1716
+ const change = new shared.AddFeatureChange({
1717
1717
  changedIds: [sourceFeature._id],
1718
1718
  typeName: 'AddFeatureChange',
1719
1719
  assembly: sourceAssemblyId,
@@ -1909,7 +1909,7 @@ function CopyFeature({ changeManager, handleClose, session, sourceAssemblyId, so
1909
1909
  newFeatureLine.end = start + featureLength;
1910
1910
  // Updates children start, end and gffId values
1911
1911
  const updatedChildren = updateRefSeqStartEndAndGffId(newFeatureLine, locationMove);
1912
- const change = new apolloShared.AddFeatureChange({
1912
+ const change = new shared.AddFeatureChange({
1913
1913
  changedIds: [newFeatureLine._id],
1914
1914
  typeName: 'AddFeatureChange',
1915
1915
  assembly: selectedAssemblyId,
@@ -2028,7 +2028,7 @@ function DeleteAssembly({ changeManager, handleClose, session, }) {
2028
2028
  setErrorMessage('Must select assembly!');
2029
2029
  return;
2030
2030
  }
2031
- const change = new apolloShared.DeleteAssemblyChange({
2031
+ const change = new shared.DeleteAssemblyChange({
2032
2032
  typeName: 'DeleteAssemblyChange',
2033
2033
  assembly: selectedAssembly.name,
2034
2034
  });
@@ -2069,7 +2069,7 @@ function DeleteFeature({ changeManager, handleClose, selectedFeature, session, s
2069
2069
  setSelectedFeature();
2070
2070
  }
2071
2071
  // Delete features
2072
- const change = new apolloShared.DeleteFeatureChange({
2072
+ const change = new shared.DeleteFeatureChange({
2073
2073
  changedIds: [sourceFeature._id],
2074
2074
  typeName: 'DeleteFeatureChange',
2075
2075
  assembly: sourceAssemblyId,
@@ -2183,7 +2183,7 @@ function DownloadGFF3({ handleClose, session }) {
2183
2183
  continue;
2184
2184
  }
2185
2185
  for (const [, feature] of features) {
2186
- gff3Items.push(apolloShared.makeGFF3Feature(mobxStateTree.getSnapshot(feature)));
2186
+ gff3Items.push(shared.makeGFF3Feature(mobxStateTree.getSnapshot(feature)));
2187
2187
  }
2188
2188
  }
2189
2189
  for (const sequenceFeature of sequenceFeatures) {
@@ -2338,7 +2338,7 @@ function ImportFeatures({ changeManager, handleClose, session, }) {
2338
2338
  fileId = result._id;
2339
2339
  }
2340
2340
  // Add features
2341
- const change = new apolloShared.AddFeaturesFromFileChange({
2341
+ const change = new shared.AddFeaturesFromFileChange({
2342
2342
  typeName: 'AddFeaturesFromFileChange',
2343
2343
  assembly: selectedAssembly.name,
2344
2344
  fileId,
@@ -2550,7 +2550,7 @@ function ManageUsers({ changeManager, handleClose, session, }) {
2550
2550
  });
2551
2551
  }, [getUsers]);
2552
2552
  async function deleteUser(id) {
2553
- const change = new apolloShared.DeleteUserChange({
2553
+ const change = new shared.DeleteUserChange({
2554
2554
  typeName: 'DeleteUserChange',
2555
2555
  userId: id,
2556
2556
  });
@@ -2596,7 +2596,7 @@ function ManageUsers({ changeManager, handleClose, session, }) {
2596
2596
  setSelectedInternetAccount(newlySelectedInternetAccount);
2597
2597
  }
2598
2598
  async function processRowUpdate(newRow) {
2599
- const change = new apolloShared.UserChange({
2599
+ const change = new shared.UserChange({
2600
2600
  typeName: 'UserChange',
2601
2601
  role: newRow.role,
2602
2602
  userId: newRow._id,
@@ -2922,7 +2922,7 @@ function ModifyFeatureAttribute({ changeManager, handleClose, session, sourceAss
2922
2922
  }
2923
2923
  }
2924
2924
  }
2925
- const change = new apolloShared.FeatureAttributeChange({
2925
+ const change = new shared.FeatureAttributeChange({
2926
2926
  changedIds: [sourceFeature._id],
2927
2927
  typeName: 'FeatureAttributeChange',
2928
2928
  assembly: sourceAssemblyId,
@@ -3157,7 +3157,7 @@ function ViewChangeLog({ handleClose, session }) {
3157
3157
  width: 200,
3158
3158
  type: 'singleSelect',
3159
3159
  // TODO: Get these from change manager once it's on the session
3160
- valueOptions: [...apolloCommon.changeRegistry.changes.keys()],
3160
+ valueOptions: [...common.changeRegistry.changes.keys()],
3161
3161
  },
3162
3162
  {
3163
3163
  field: 'changes',
@@ -3453,7 +3453,7 @@ const stateModelFactory$2 = (configSchema) => {
3453
3453
  if (!token) {
3454
3454
  return;
3455
3455
  }
3456
- const dec = apolloShared.getDecodedToken(token);
3456
+ const dec = shared.getDecodedToken(token);
3457
3457
  return dec.id;
3458
3458
  },
3459
3459
  }))
@@ -3469,7 +3469,7 @@ const stateModelFactory$2 = (configSchema) => {
3469
3469
  self.role = undefined;
3470
3470
  return;
3471
3471
  }
3472
- const dec = apolloShared.getDecodedToken(token);
3472
+ const dec = shared.getDecodedToken(token);
3473
3473
  const { role } = dec;
3474
3474
  if (!role && !roleNotificationSent) {
3475
3475
  const { session } = mobxStateTree.getRoot(self);
@@ -3643,7 +3643,7 @@ const stateModelFactory$2 = (configSchema) => {
3643
3643
  }
3644
3644
  const serializedChanges = yield response.json();
3645
3645
  for (const serializedChange of serializedChanges) {
3646
- const change = apolloCommon.Change.fromJSON(serializedChange);
3646
+ const change = common.Change.fromJSON(serializedChange);
3647
3647
  void changeManager.submit(change, { submitToBackend: false });
3648
3648
  }
3649
3649
  }),
@@ -3682,13 +3682,13 @@ const stateModelFactory$2 = (configSchema) => {
3682
3682
  if (message.userSessionId === token) {
3683
3683
  return; // we did this change, no need to apply it again
3684
3684
  }
3685
- const change = apolloCommon.Change.fromJSON(message.changeInfo);
3685
+ const change = common.Change.fromJSON(message.changeInfo);
3686
3686
  void changeManager.submit(change, { submitToBackend: false });
3687
3687
  });
3688
3688
  socket.on('USER_LOCATION', (message) => {
3689
3689
  const { channel, locations, userName, userSessionId } = message;
3690
- const user = apolloShared.getDecodedToken(token);
3691
- const localSessionId = apolloShared.makeUserSessionId(user);
3690
+ const user = shared.getDecodedToken(token);
3691
+ const localSessionId = shared.makeUserSessionId(user);
3692
3692
  if (channel === 'USER_LOCATION' && userSessionId !== localSessionId) {
3693
3693
  const collaborator = {
3694
3694
  name: userName,
@@ -4347,7 +4347,7 @@ function ApolloRendering(props) {
4347
4347
  const featureId = feature._id;
4348
4348
  const oldEnd = feature.end;
4349
4349
  const newEnd = Math.round(bp);
4350
- change = new apolloShared.LocationEndChange({
4350
+ change = new shared.LocationEndChange({
4351
4351
  typeName: 'LocationEndChange',
4352
4352
  changedIds: [featureId],
4353
4353
  featureId,
@@ -4360,7 +4360,7 @@ function ApolloRendering(props) {
4360
4360
  const featureId = feature._id;
4361
4361
  const oldStart = feature.start;
4362
4362
  const newStart = Math.round(bp);
4363
- change = new apolloShared.LocationStartChange({
4363
+ change = new shared.LocationStartChange({
4364
4364
  typeName: 'LocationStartChange',
4365
4365
  changedIds: [featureId],
4366
4366
  featureId,
@@ -4584,7 +4584,7 @@ function AddFeature({ changeManager, handleClose, region, session, }) {
4584
4584
  return;
4585
4585
  }
4586
4586
  const id = new ObjectID__default["default"]().toHexString();
4587
- const change = new apolloShared.AddFeatureChange({
4587
+ const change = new shared.AddFeatureChange({
4588
4588
  changedIds: [id],
4589
4589
  typeName: 'AddFeatureChange',
4590
4590
  assembly: region.assemblyName,
@@ -4919,7 +4919,7 @@ function annotationFromPileup(pluggableElement) {
4919
4919
  const newFeature = self.createFeature();
4920
4920
  const assembly = self.getAssembly();
4921
4921
  const assemblyId = assembly.name;
4922
- const change = new apolloShared.AddFeatureChange({
4922
+ const change = new shared.AddFeatureChange({
4923
4923
  changedIds: [newFeature._id],
4924
4924
  typeName: 'AddFeatureChange',
4925
4925
  assembly: assemblyId,
@@ -5114,7 +5114,7 @@ const Attributes = mobxReact.observer(function Attributes({ assembly, editable,
5114
5114
  }
5115
5115
  }
5116
5116
  }
5117
- const change = new apolloShared.FeatureAttributeChange({
5117
+ const change = new shared.FeatureAttributeChange({
5118
5118
  changedIds: [feature._id],
5119
5119
  typeName: 'FeatureAttributeChange',
5120
5120
  assembly,
@@ -5256,7 +5256,7 @@ const BasicInformation = mobxReact.observer(function BasicInformation({ assembly
5256
5256
  function handleTypeChange(newType) {
5257
5257
  setErrorMessage('');
5258
5258
  const featureId = _id;
5259
- const change = new apolloShared.TypeChange({
5259
+ const change = new shared.TypeChange({
5260
5260
  typeName: 'TypeChange',
5261
5261
  changedIds: [featureId],
5262
5262
  featureId,
@@ -5269,7 +5269,7 @@ const BasicInformation = mobxReact.observer(function BasicInformation({ assembly
5269
5269
  function handleStrandChange(event) {
5270
5270
  const { value } = event.target;
5271
5271
  const newStrand = value ? Number(value) : undefined;
5272
- const change = new apolloShared.StrandChange({
5272
+ const change = new shared.StrandChange({
5273
5273
  typeName: 'StrandChange',
5274
5274
  changedIds: [_id],
5275
5275
  featureId: _id,
@@ -5281,7 +5281,7 @@ const BasicInformation = mobxReact.observer(function BasicInformation({ assembly
5281
5281
  }
5282
5282
  function handleStartChange(newStart) {
5283
5283
  newStart--;
5284
- const change = new apolloShared.LocationStartChange({
5284
+ const change = new shared.LocationStartChange({
5285
5285
  typeName: 'LocationStartChange',
5286
5286
  changedIds: [_id],
5287
5287
  featureId: _id,
@@ -5292,7 +5292,7 @@ const BasicInformation = mobxReact.observer(function BasicInformation({ assembly
5292
5292
  return changeManager.submit(change);
5293
5293
  }
5294
5294
  function handleEndChange(newEnd) {
5295
- const change = new apolloShared.LocationEndChange({
5295
+ const change = new shared.LocationEndChange({
5296
5296
  typeName: 'LocationEndChange',
5297
5297
  changedIds: [_id],
5298
5298
  featureId: _id,
@@ -5373,7 +5373,7 @@ const RelatedFeatures = mobxReact.observer(function RelatedFeatures({ assembly,
5373
5373
 
5374
5374
  function formatSequence(seq, refName, start, end, wrap) {
5375
5375
  const header = `>${refName}:${start + 1}–${end}\n`;
5376
- const body = wrap === undefined ? seq : apolloShared.splitStringIntoChunks(seq, wrap).join('\n');
5376
+ const body = wrap === undefined ? seq : shared.splitStringIntoChunks(seq, wrap).join('\n');
5377
5377
  return `${header}${body}`;
5378
5378
  }
5379
5379
  const useStyles$8 = mui.makeStyles()({
@@ -5461,7 +5461,7 @@ const ApolloFeatureDetailsWidgetModel = mobxStateTree.types
5461
5461
  .model('ApolloFeatureDetailsWidget', {
5462
5462
  id: mst.ElementId,
5463
5463
  type: mobxStateTree.types.literal('ApolloFeatureDetailsWidget'),
5464
- feature: mobxStateTree.types.maybe(mobxStateTree.types.reference(apolloMst.AnnotationFeature, {
5464
+ feature: mobxStateTree.types.maybe(mobxStateTree.types.reference(mst$1.AnnotationFeature, {
5465
5465
  onInvalidated(ev) {
5466
5466
  ev.parent.setTryReload(ev.invalidId);
5467
5467
  ev.removeRef();
@@ -5510,7 +5510,7 @@ function configSchemaFactory$1(pluginManager) {
5510
5510
 
5511
5511
  function handleFeatureTypeChange(changeManager, feature, oldType, newType) {
5512
5512
  const featureId = feature._id;
5513
- const change = new apolloShared.TypeChange({
5513
+ const change = new shared.TypeChange({
5514
5514
  typeName: 'TypeChange',
5515
5515
  changedIds: [featureId],
5516
5516
  featureId,
@@ -5523,7 +5523,7 @@ function handleFeatureTypeChange(changeManager, feature, oldType, newType) {
5523
5523
  function handleFeatureStartChange(changeManager, feature, oldStart, newStart, index) {
5524
5524
  const featureId = feature._id;
5525
5525
  const change = index === undefined
5526
- ? new apolloShared.LocationStartChange({
5526
+ ? new shared.LocationStartChange({
5527
5527
  typeName: 'LocationStartChange',
5528
5528
  changedIds: [featureId],
5529
5529
  featureId,
@@ -5531,7 +5531,7 @@ function handleFeatureStartChange(changeManager, feature, oldStart, newStart, in
5531
5531
  newStart,
5532
5532
  assembly: feature.assemblyId,
5533
5533
  })
5534
- : new apolloShared.DiscontinuousLocationStartChange({
5534
+ : new shared.DiscontinuousLocationStartChange({
5535
5535
  typeName: 'DiscontinuousLocationStartChange',
5536
5536
  changedIds: [featureId],
5537
5537
  featureId,
@@ -5545,7 +5545,7 @@ function handleFeatureStartChange(changeManager, feature, oldStart, newStart, in
5545
5545
  function handleFeatureEndChange(changeManager, feature, oldEnd, newEnd, index) {
5546
5546
  const featureId = feature._id;
5547
5547
  const change = index === undefined
5548
- ? new apolloShared.LocationEndChange({
5548
+ ? new shared.LocationEndChange({
5549
5549
  typeName: 'LocationEndChange',
5550
5550
  changedIds: [featureId],
5551
5551
  featureId,
@@ -5553,7 +5553,7 @@ function handleFeatureEndChange(changeManager, feature, oldEnd, newEnd, index) {
5553
5553
  newEnd,
5554
5554
  assembly: feature.assemblyId,
5555
5555
  })
5556
- : new apolloShared.DiscontinuousLocationEndChange({
5556
+ : new shared.DiscontinuousLocationEndChange({
5557
5557
  typeName: 'DiscontinuousLocationEndChange',
5558
5558
  changedIds: [featureId],
5559
5559
  featureId,
@@ -6570,7 +6570,7 @@ class BoxGlyph extends Glyph {
6570
6570
  const featureId = feature._id;
6571
6571
  const oldEnd = feature.end;
6572
6572
  const newEnd = newBp;
6573
- change = new apolloShared.LocationEndChange({
6573
+ change = new shared.LocationEndChange({
6574
6574
  typeName: 'LocationEndChange',
6575
6575
  changedIds: [featureId],
6576
6576
  featureId,
@@ -6583,7 +6583,7 @@ class BoxGlyph extends Glyph {
6583
6583
  const featureId = feature._id;
6584
6584
  const oldStart = feature.start;
6585
6585
  const newStart = newBp;
6586
- change = new apolloShared.LocationStartChange({
6586
+ change = new shared.LocationStartChange({
6587
6587
  typeName: 'LocationStartChange',
6588
6588
  changedIds: [featureId],
6589
6589
  featureId,
@@ -7976,7 +7976,7 @@ class CanonicalGeneGlyph extends Glyph {
7976
7976
  addDiscontinuousLocStartChange(changes, feature, // cds
7977
7977
  newBp, oldStart, assembly, index) {
7978
7978
  const featureId = feature._id;
7979
- changes.push(new apolloShared.DiscontinuousLocationStartChange({
7979
+ changes.push(new shared.DiscontinuousLocationStartChange({
7980
7980
  typeName: 'DiscontinuousLocationStartChange',
7981
7981
  changedIds: [feature._id],
7982
7982
  featureId,
@@ -7989,7 +7989,7 @@ class CanonicalGeneGlyph extends Glyph {
7989
7989
  addDiscontinuousLocEndChange(changes, feature, // cds
7990
7990
  newBp, oldEnd, assembly, index) {
7991
7991
  const featureId = feature._id;
7992
- changes.push(new apolloShared.DiscontinuousLocationEndChange({
7992
+ changes.push(new shared.DiscontinuousLocationEndChange({
7993
7993
  typeName: 'DiscontinuousLocationEndChange',
7994
7994
  changedIds: [feature._id],
7995
7995
  featureId,
@@ -8003,7 +8003,7 @@ class CanonicalGeneGlyph extends Glyph {
8003
8003
  const featureId = feature._id;
8004
8004
  const oldEnd = feature.end;
8005
8005
  const newEnd = newBp;
8006
- changes.push(new apolloShared.LocationEndChange({
8006
+ changes.push(new shared.LocationEndChange({
8007
8007
  typeName: 'LocationEndChange',
8008
8008
  changedIds: [featureId],
8009
8009
  featureId,
@@ -8016,7 +8016,7 @@ class CanonicalGeneGlyph extends Glyph {
8016
8016
  const featureId = feature._id;
8017
8017
  const oldStart = feature.start;
8018
8018
  const newStart = newBp;
8019
- changes.push(new apolloShared.LocationStartChange({
8019
+ changes.push(new shared.LocationStartChange({
8020
8020
  typeName: 'LocationStartChange',
8021
8021
  changedIds: [featureId],
8022
8022
  featureId,
@@ -8617,7 +8617,7 @@ class ImplicitExonGeneGlyph extends Glyph {
8617
8617
  const featureId = feature._id;
8618
8618
  const oldEnd = feature.end;
8619
8619
  const newEnd = newBp;
8620
- changes.push(new apolloShared.LocationEndChange({
8620
+ changes.push(new shared.LocationEndChange({
8621
8621
  typeName: 'LocationEndChange',
8622
8622
  changedIds: [featureId],
8623
8623
  featureId,
@@ -8630,7 +8630,7 @@ class ImplicitExonGeneGlyph extends Glyph {
8630
8630
  const featureId = feature._id;
8631
8631
  const oldStart = feature.start;
8632
8632
  const newStart = newBp;
8633
- changes.push(new apolloShared.LocationStartChange({
8633
+ changes.push(new shared.LocationStartChange({
8634
8634
  typeName: 'LocationStartChange',
8635
8635
  changedIds: [featureId],
8636
8636
  featureId,
@@ -9382,7 +9382,7 @@ class ChangeManager {
9382
9382
  if (updateJobsManager) {
9383
9383
  jobsManager.runJob(job);
9384
9384
  }
9385
- const result = await apolloShared.validationRegistry.frontendPreValidate(change);
9385
+ const result = await shared.validationRegistry.frontendPreValidate(change);
9386
9386
  if (!result.ok) {
9387
9387
  const msg = `Pre-validation failed: "${result.resultsMessages}"`;
9388
9388
  if (updateJobsManager) {
@@ -9404,7 +9404,7 @@ class ChangeManager {
9404
9404
  return;
9405
9405
  }
9406
9406
  // post-validate
9407
- const results2 = await apolloShared.validationRegistry.frontendPostValidate(change, this.dataStore);
9407
+ const results2 = await shared.validationRegistry.frontendPostValidate(change, this.dataStore);
9408
9408
  if (!results2.ok) {
9409
9409
  // notify of invalid change and revert
9410
9410
  await this.revert(change);
@@ -9415,7 +9415,7 @@ class ChangeManager {
9415
9415
  }
9416
9416
  // submit to driver
9417
9417
  const { collaborationServerDriver, getBackendDriver } = this.dataStore;
9418
- const backendDriver = apolloCommon.isAssemblySpecificChange(change)
9418
+ const backendDriver = common.isAssemblySpecificChange(change)
9419
9419
  ? getBackendDriver(change.assembly)
9420
9420
  : collaborationServerDriver;
9421
9421
  let backendResult;
@@ -9548,7 +9548,7 @@ class CollaborationServerDriver extends BackendDriver {
9548
9548
  // Save server last change sequence into session storage
9549
9549
  internetAccount.setLastChangeSequenceNumber(Number(message.changeSequence));
9550
9550
  if (message.userSessionId !== token && message.channel === channel) {
9551
- const change = apolloCommon.Change.fromJSON(message.changeInfo);
9551
+ const change = common.Change.fromJSON(message.changeInfo);
9552
9552
  await changeManager.submit(change, { submitToBackend: false });
9553
9553
  }
9554
9554
  });
@@ -9681,7 +9681,7 @@ class CollaborationServerDriver extends BackendDriver {
9681
9681
  const errorMessage = await createFetchErrorMessage(response, 'submitChange failed');
9682
9682
  throw new Error(errorMessage);
9683
9683
  }
9684
- const results = new apolloShared.ValidationResultSet();
9684
+ const results = new shared.ValidationResultSet();
9685
9685
  if (!response.ok) {
9686
9686
  results.ok = false;
9687
9687
  }
@@ -9733,7 +9733,7 @@ class InMemoryFileDriver extends BackendDriver {
9733
9733
  });
9734
9734
  }
9735
9735
  async submitChange(_change, _opts = {}) {
9736
- return new apolloShared.ValidationResultSet();
9736
+ return new shared.ValidationResultSet();
9737
9737
  }
9738
9738
  async searchFeatures(_term, _assemblies) {
9739
9739
  return [];
@@ -9799,7 +9799,7 @@ class DesktopFileDriver extends BackendDriver {
9799
9799
  });
9800
9800
  }
9801
9801
  async submitChange(change) {
9802
- if (!apolloCommon.isAssemblySpecificChange(change)) {
9802
+ if (!common.isAssemblySpecificChange(change)) {
9803
9803
  throw new Error(`Cannot use this type of change with local file: "${change.typeName}"`);
9804
9804
  }
9805
9805
  const { assemblyManager } = util.getSession(this.clientStore);
@@ -9834,12 +9834,12 @@ class DesktopFileDriver extends BackendDriver {
9834
9834
  for (const [, refSeq] of clientAssembly.refSeqs) {
9835
9835
  const { features } = refSeq;
9836
9836
  for (const [, feature] of features) {
9837
- gff3Items.push(apolloShared.makeGFF3Feature(mobxStateTree.getSnapshot(feature)));
9837
+ gff3Items.push(shared.makeGFF3Feature(mobxStateTree.getSnapshot(feature)));
9838
9838
  }
9839
9839
  }
9840
9840
  for (const [, refSeq] of clientAssembly.refSeqs) {
9841
9841
  const [sequence] = refSeq.sequence;
9842
- const formattedSequence = apolloShared.splitStringIntoChunks(sequence.sequence, 80).join('\n');
9842
+ const formattedSequence = shared.splitStringIntoChunks(sequence.sequence, 80).join('\n');
9843
9843
  gff3Items.push({
9844
9844
  id: refSeq.name,
9845
9845
  description: refSeq.description,
@@ -9850,7 +9850,7 @@ class DesktopFileDriver extends BackendDriver {
9850
9850
  // eslint-disable-next-line @typescript-eslint/no-var-requires
9851
9851
  const fs = require('node:fs');
9852
9852
  await fs.promises.writeFile(file, gff3Contents, 'utf8');
9853
- const results = new apolloShared.ValidationResultSet();
9853
+ const results = new shared.ValidationResultSet();
9854
9854
  return results;
9855
9855
  }
9856
9856
  async searchFeatures(_term, _assemblies) {
@@ -9862,8 +9862,8 @@ function clientDataStoreFactory(AnnotationFeatureExtended) {
9862
9862
  const clientStoreType = mobxStateTree.types
9863
9863
  .model('ClientDataStore', {
9864
9864
  typeName: mobxStateTree.types.optional(mobxStateTree.types.literal('Client'), 'Client'),
9865
- assemblies: mobxStateTree.types.map(apolloMst.ApolloAssembly),
9866
- checkResults: mobxStateTree.types.map(apolloMst.CheckResult),
9865
+ assemblies: mobxStateTree.types.map(mst$1.ApolloAssembly),
9866
+ checkResults: mobxStateTree.types.map(mst$1.CheckResult),
9867
9867
  })
9868
9868
  .views((self) => ({
9869
9869
  get internetAccounts() {
@@ -9902,7 +9902,7 @@ function clientDataStoreFactory(AnnotationFeatureExtended) {
9902
9902
  parent.deleteChild(featureId);
9903
9903
  }
9904
9904
  else {
9905
- const refSeq = mobxStateTree.getParentOfType(feature, apolloMst.ApolloRefSeq);
9905
+ const refSeq = mobxStateTree.getParentOfType(feature, mst$1.ApolloRefSeq);
9906
9906
  refSeq.deleteFeature(_id);
9907
9907
  }
9908
9908
  },
@@ -10073,7 +10073,7 @@ function clientDataStoreFactory(AnnotationFeatureExtended) {
10073
10073
  function extendSession(pluginManager, sessionModel) {
10074
10074
  const aborter = new AbortController();
10075
10075
  const { signal } = aborter;
10076
- const AnnotationFeatureExtended = pluginManager.evaluateExtensionPoint('Apollo-extendAnnotationFeature', apolloMst.AnnotationFeature);
10076
+ const AnnotationFeatureExtended = pluginManager.evaluateExtensionPoint('Apollo-extendAnnotationFeature', mst$1.AnnotationFeature);
10077
10077
  const ClientDataStore = clientDataStoreFactory(AnnotationFeatureExtended);
10078
10078
  return sessionModel
10079
10079
  .props({
@@ -10719,13 +10719,13 @@ function isApolloMessageData(data) {
10719
10719
  data.apollo === true);
10720
10720
  }
10721
10721
  const inWebWorker = 'WorkerGlobalScope' in globalThis;
10722
- for (const [changeName, change] of Object.entries(apolloShared.changes)) {
10723
- apolloCommon.changeRegistry.registerChange(changeName, change);
10722
+ for (const [changeName, change] of Object.entries(shared.changes)) {
10723
+ common.changeRegistry.registerChange(changeName, change);
10724
10724
  }
10725
- const cdsCheck = new apolloShared.CDSCheck();
10726
- apolloCommon.checkRegistry.registerCheck(cdsCheck.name, cdsCheck);
10727
- apolloShared.validationRegistry.registerValidation(new apolloShared.CoreValidation());
10728
- apolloShared.validationRegistry.registerValidation(new apolloShared.ParentChildValidation());
10725
+ const cdsCheck = new shared.CDSCheck();
10726
+ common.checkRegistry.registerCheck(cdsCheck.name, cdsCheck);
10727
+ shared.validationRegistry.registerValidation(new shared.CoreValidation());
10728
+ shared.validationRegistry.registerValidation(new shared.ParentChildValidation());
10729
10729
  class ApolloPlugin extends Plugin__default["default"] {
10730
10730
  name = 'ApolloPlugin';
10731
10731
  version = version;