@jbrowse/plugin-config 1.7.9 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/dist/ConfigurationEditorWidget/components/CallbackEditor.d.ts +10 -7
  2. package/dist/ConfigurationEditorWidget/components/CallbackEditor.js +108 -115
  3. package/dist/ConfigurationEditorWidget/components/CallbackEditor.js.map +1 -0
  4. package/dist/ConfigurationEditorWidget/components/CodeEditor.d.ts +4 -3
  5. package/dist/ConfigurationEditorWidget/components/CodeEditor.js +78 -73
  6. package/dist/ConfigurationEditorWidget/components/CodeEditor.js.map +1 -0
  7. package/dist/ConfigurationEditorWidget/components/ColorEditor.d.ts +9 -33
  8. package/dist/ConfigurationEditorWidget/components/ColorEditor.js +82 -116
  9. package/dist/ConfigurationEditorWidget/components/ColorEditor.js.map +1 -0
  10. package/dist/ConfigurationEditorWidget/components/ColorPicker.d.ts +0 -7
  11. package/dist/ConfigurationEditorWidget/components/ColorPicker.js +64 -67
  12. package/dist/ConfigurationEditorWidget/components/ColorPicker.js.map +1 -0
  13. package/dist/ConfigurationEditorWidget/components/ConfigurationEditor.d.ts +7 -3
  14. package/dist/ConfigurationEditorWidget/components/ConfigurationEditor.js +113 -160
  15. package/dist/ConfigurationEditorWidget/components/ConfigurationEditor.js.map +1 -0
  16. package/dist/ConfigurationEditorWidget/components/JsonEditor.js +74 -75
  17. package/dist/ConfigurationEditorWidget/components/JsonEditor.js.map +1 -0
  18. package/dist/ConfigurationEditorWidget/components/SlotEditor.d.ts +11 -1
  19. package/dist/ConfigurationEditorWidget/components/SlotEditor.js +228 -423
  20. package/dist/ConfigurationEditorWidget/components/SlotEditor.js.map +1 -0
  21. package/dist/ConfigurationEditorWidget/components/StringArrayEditor.d.ts +12 -0
  22. package/dist/ConfigurationEditorWidget/components/StringArrayEditor.js +81 -0
  23. package/dist/ConfigurationEditorWidget/components/StringArrayEditor.js.map +1 -0
  24. package/dist/ConfigurationEditorWidget/components/TypeSelector.d.ts +8 -6
  25. package/dist/ConfigurationEditorWidget/components/TypeSelector.js +16 -46
  26. package/dist/ConfigurationEditorWidget/components/TypeSelector.js.map +1 -0
  27. package/dist/ConfigurationEditorWidget/index.js +25 -42
  28. package/dist/ConfigurationEditorWidget/index.js.map +1 -0
  29. package/dist/ConfigurationEditorWidget/model.js +18 -26
  30. package/dist/ConfigurationEditorWidget/model.js.map +1 -0
  31. package/dist/FromConfigAdapter/FromConfigAdapter.js +172 -204
  32. package/dist/FromConfigAdapter/FromConfigAdapter.js.map +1 -0
  33. package/dist/FromConfigAdapter/FromConfigRegionsAdapter.js +151 -142
  34. package/dist/FromConfigAdapter/FromConfigRegionsAdapter.js.map +1 -0
  35. package/dist/FromConfigAdapter/FromConfigSequenceAdapter.js +182 -181
  36. package/dist/FromConfigAdapter/FromConfigSequenceAdapter.js.map +1 -0
  37. package/dist/FromConfigAdapter/configSchema.js +33 -49
  38. package/dist/FromConfigAdapter/configSchema.js.map +1 -0
  39. package/dist/FromConfigAdapter/index.js +16 -50
  40. package/dist/FromConfigAdapter/index.js.map +1 -0
  41. package/dist/RefNameAliasAdapter/RefNameAliasAdapter.js +111 -123
  42. package/dist/RefNameAliasAdapter/RefNameAliasAdapter.js.map +1 -0
  43. package/dist/RefNameAliasAdapter/configSchema.js +16 -25
  44. package/dist/RefNameAliasAdapter/configSchema.js.map +1 -0
  45. package/dist/RefNameAliasAdapter/index.js +10 -22
  46. package/dist/RefNameAliasAdapter/index.js.map +1 -0
  47. package/dist/index.d.ts +9 -3
  48. package/dist/index.js +129 -144
  49. package/dist/index.js.map +1 -0
  50. package/esm/ConfigurationEditorWidget/components/CallbackEditor.d.ts +12 -0
  51. package/esm/ConfigurationEditorWidget/components/CallbackEditor.js +71 -0
  52. package/esm/ConfigurationEditorWidget/components/CallbackEditor.js.map +1 -0
  53. package/esm/ConfigurationEditorWidget/components/CodeEditor.d.ts +5 -0
  54. package/esm/ConfigurationEditorWidget/components/CodeEditor.js +42 -0
  55. package/esm/ConfigurationEditorWidget/components/CodeEditor.js.map +1 -0
  56. package/esm/ConfigurationEditorWidget/components/ColorEditor.d.ts +20 -0
  57. package/esm/ConfigurationEditorWidget/components/ColorEditor.js +37 -0
  58. package/esm/ConfigurationEditorWidget/components/ColorEditor.js.map +1 -0
  59. package/esm/ConfigurationEditorWidget/components/ColorPicker.d.ts +7 -0
  60. package/esm/ConfigurationEditorWidget/components/ColorPicker.js +26 -0
  61. package/esm/ConfigurationEditorWidget/components/ColorPicker.js.map +1 -0
  62. package/esm/ConfigurationEditorWidget/components/ConfigurationEditor.d.ts +8 -0
  63. package/esm/ConfigurationEditorWidget/components/ConfigurationEditor.js +83 -0
  64. package/esm/ConfigurationEditorWidget/components/ConfigurationEditor.js.map +1 -0
  65. package/esm/ConfigurationEditorWidget/components/JsonEditor.d.ts +9 -0
  66. package/esm/ConfigurationEditorWidget/components/JsonEditor.js +39 -0
  67. package/esm/ConfigurationEditorWidget/components/JsonEditor.js.map +1 -0
  68. package/esm/ConfigurationEditorWidget/components/SlotEditor.d.ts +16 -0
  69. package/esm/ConfigurationEditorWidget/components/SlotEditor.js +176 -0
  70. package/esm/ConfigurationEditorWidget/components/SlotEditor.js.map +1 -0
  71. package/esm/ConfigurationEditorWidget/components/StringArrayEditor.d.ts +12 -0
  72. package/esm/ConfigurationEditorWidget/components/StringArrayEditor.js +36 -0
  73. package/esm/ConfigurationEditorWidget/components/StringArrayEditor.js.map +1 -0
  74. package/esm/ConfigurationEditorWidget/components/TypeSelector.d.ts +9 -0
  75. package/esm/ConfigurationEditorWidget/components/TypeSelector.js +12 -0
  76. package/esm/ConfigurationEditorWidget/components/TypeSelector.js.map +1 -0
  77. package/esm/ConfigurationEditorWidget/index.d.ts +3 -0
  78. package/esm/ConfigurationEditorWidget/index.js +20 -0
  79. package/esm/ConfigurationEditorWidget/index.js.map +1 -0
  80. package/esm/ConfigurationEditorWidget/model.d.ts +8 -0
  81. package/esm/ConfigurationEditorWidget/model.js +16 -0
  82. package/esm/ConfigurationEditorWidget/model.js.map +1 -0
  83. package/esm/FromConfigAdapter/FromConfigAdapter.d.ts +24 -0
  84. package/esm/FromConfigAdapter/FromConfigAdapter.js +63 -0
  85. package/esm/FromConfigAdapter/FromConfigAdapter.js.map +1 -0
  86. package/esm/FromConfigAdapter/FromConfigRegionsAdapter.d.ts +23 -0
  87. package/esm/FromConfigAdapter/FromConfigRegionsAdapter.js +50 -0
  88. package/esm/FromConfigAdapter/FromConfigRegionsAdapter.js.map +1 -0
  89. package/esm/FromConfigAdapter/FromConfigSequenceAdapter.d.ts +25 -0
  90. package/esm/FromConfigAdapter/FromConfigSequenceAdapter.js +73 -0
  91. package/esm/FromConfigAdapter/FromConfigSequenceAdapter.js.map +1 -0
  92. package/esm/FromConfigAdapter/configSchema.d.ts +3 -0
  93. package/esm/FromConfigAdapter/configSchema.js +32 -0
  94. package/esm/FromConfigAdapter/configSchema.js.map +1 -0
  95. package/esm/FromConfigAdapter/index.d.ts +4 -0
  96. package/esm/FromConfigAdapter/index.js +5 -0
  97. package/esm/FromConfigAdapter/index.js.map +1 -0
  98. package/esm/RefNameAliasAdapter/RefNameAliasAdapter.d.ts +8 -0
  99. package/esm/RefNameAliasAdapter/RefNameAliasAdapter.js +24 -0
  100. package/esm/RefNameAliasAdapter/RefNameAliasAdapter.js.map +1 -0
  101. package/esm/RefNameAliasAdapter/configSchema.d.ts +2 -0
  102. package/esm/RefNameAliasAdapter/configSchema.js +15 -0
  103. package/esm/RefNameAliasAdapter/configSchema.js.map +1 -0
  104. package/esm/RefNameAliasAdapter/index.d.ts +2 -0
  105. package/esm/RefNameAliasAdapter/index.js +3 -0
  106. package/esm/RefNameAliasAdapter/index.js.map +1 -0
  107. package/esm/index.d.ts +18 -0
  108. package/esm/index.js +72 -0
  109. package/esm/index.js.map +1 -0
  110. package/package.json +20 -13
  111. package/src/ConfigurationEditorWidget/components/{CallbackEditor.js → CallbackEditor.tsx} +36 -21
  112. package/src/ConfigurationEditorWidget/components/CodeEditor.tsx +59 -0
  113. package/src/ConfigurationEditorWidget/components/ColorEditor.tsx +8 -33
  114. package/src/ConfigurationEditorWidget/components/ColorPicker.tsx +4 -13
  115. package/src/ConfigurationEditorWidget/components/ConfigurationEditor.tsx +169 -0
  116. package/src/ConfigurationEditorWidget/components/JsonEditor.js +4 -8
  117. package/src/ConfigurationEditorWidget/components/SlotEditor.js +11 -69
  118. package/src/ConfigurationEditorWidget/components/StringArrayEditor.tsx +115 -0
  119. package/src/ConfigurationEditorWidget/components/{TypeSelector.js → TypeSelector.tsx} +15 -7
  120. package/src/ConfigurationEditorWidget/components/__snapshots__/ConfigurationEditor.test.js.snap +883 -691
  121. package/src/ConfigurationEditorWidget/index.js +2 -2
  122. package/src/RefNameAliasAdapter/RefNameAliasAdapter.ts +1 -1
  123. package/src/index.ts +20 -14
  124. package/dist/ConfigurationEditorWidget/components/ColorEditor.test.js +0 -31
  125. package/dist/ConfigurationEditorWidget/components/ConfigurationEditor.test.js +0 -121
  126. package/dist/FromConfigAdapter/FromConfigAdapter.test.js +0 -100
  127. package/dist/FromConfigAdapter/FromConfigRegionsAdapter.test.js +0 -200
  128. package/dist/FromConfigAdapter/FromConfigSequenceAdapter.test.js +0 -110
  129. package/dist/RefNameAliasAdapter/RefNameAliasAdapter.test.js +0 -41
  130. package/dist/index.test.js +0 -41
  131. package/src/ConfigurationEditorWidget/components/CodeEditor.js +0 -60
  132. package/src/ConfigurationEditorWidget/components/ConfigurationEditor.js +0 -154
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlotEditor.js","sourceRoot":"","sources":["../../../src/ConfigurationEditorWidget/components/SlotEditor.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAA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,CAAC,IAAI,CAAC,8BAA8B,IAAI,qBAAqB,CAAC,CAAA;QACrE,cAAc,GAAG,YAAY,CAAA;KAC9B;IACD,IAAI,CAAC,CAAC,IAAI,IAAI,eAAe,CAAC,EAAE;QAC9B,OAAO,CAAC,IAAI,CAAC,iCAAiC,IAAI,EAAE,CAAC,CAAA;KACtD;IACD,OAAO,CACL,oBAAC,KAAK,IAAC,SAAS,EAAE,OAAO,CAAC,KAAK;QAC7B,6BAAK,SAAS,EAAE,OAAO,CAAC,YAAY;YAClC,oBAAC,cAAc,IAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,GAAI,CAClD;QACN,6BAAK,SAAS,EAAE,OAAO,CAAC,cAAc,IACnC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAC7B,oBAAC,UAAU,IACT,SAAS,EAAE,OAAO,CAAC,YAAY,EAC/B,OAAO,EAAE,GAAG,EAAE,CACZ,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAEpE,KAAK,EAAE,cACL,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,UACtC,EAAE,EACF,KAAK,EAAC,WAAW,IAEhB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,oBAAC,wBAAwB,OAAG,CAAC,CAAC,CAAC,oBAAC,WAAW,OAAG,CACvD,CACd,CAAC,CAAC,CAAC,IAAI,CACJ,CACA,CACT,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,UAAU,CAAA"}
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ declare const StringArrayEditor: ({ slot, }: {
3
+ slot: {
4
+ name: string;
5
+ value: string[];
6
+ setAtIndex: Function;
7
+ removeAtIndex: Function;
8
+ add: Function;
9
+ description: string;
10
+ };
11
+ }) => JSX.Element;
12
+ export default StringArrayEditor;
@@ -0,0 +1,36 @@
1
+ import React, { useState } from 'react';
2
+ import { observer } from 'mobx-react';
3
+ import { Button, FormHelperText, IconButton, InputAdornment, InputLabel, List, ListItem, TextField, } from '@mui/material';
4
+ // icons
5
+ import DeleteIcon from '@mui/icons-material/Delete';
6
+ const StringArrayEditor = observer(({ slot, }) => {
7
+ const [value, setValue] = useState('');
8
+ const [addNew, setAddNew] = useState(false);
9
+ return (React.createElement(React.Fragment, null,
10
+ slot.name ? React.createElement(InputLabel, null, slot.name) : null,
11
+ React.createElement(List, { disablePadding: true },
12
+ slot.value.map((val, idx) => (React.createElement(ListItem, { key: idx, disableGutters: true },
13
+ React.createElement(TextField, { value: val, onChange: evt => slot.setAtIndex(idx, evt.target.value), InputProps: {
14
+ endAdornment: (React.createElement(InputAdornment, { position: "end" },
15
+ React.createElement(IconButton, { color: "secondary", onClick: () => slot.removeAtIndex(idx) },
16
+ React.createElement(DeleteIcon, null)))),
17
+ } })))),
18
+ addNew ? (React.createElement(ListItem, { disableGutters: true },
19
+ React.createElement(TextField, { value: value, placeholder: "add new", onChange: event => setValue(event.target.value), InputProps: {
20
+ endAdornment: (React.createElement(InputAdornment, { position: "end" },
21
+ React.createElement(React.Fragment, null,
22
+ React.createElement(Button, { color: "primary", variant: "contained", style: { margin: 2 }, "data-testid": `stringArrayAdd-${slot.name}`, onClick: () => {
23
+ setAddNew(false);
24
+ slot.add(value);
25
+ setValue('');
26
+ } }, "OK"),
27
+ React.createElement(Button, { color: "primary", variant: "contained", style: { margin: 2 }, onClick: () => {
28
+ setAddNew(false);
29
+ setValue('');
30
+ } }, "Cancel")))),
31
+ } }))) : null,
32
+ React.createElement(Button, { color: "primary", variant: "contained", style: { margin: 4 }, disabled: addNew, onClick: () => setAddNew(true) }, "Add item")),
33
+ React.createElement(FormHelperText, null, slot.description)));
34
+ });
35
+ export default StringArrayEditor;
36
+ //# sourceMappingURL=StringArrayEditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StringArr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ACJ;QACP,oBAAC,cAAc,QAAE,IAAI,CAAC,WAAW,CAAkB,CAClD,CACJ,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,iBAAiB,CAAA"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
+ declare const TypeSelector: ({ typeNameChoices, slot, slotName, onChange, }: {
4
+ typeNameChoices: string[];
5
+ slot: AnyConfigurationModel;
6
+ slotName: string;
7
+ onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
8
+ }) => JSX.Element;
9
+ export default TypeSelector;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { MenuItem, Paper, TextField } from '@mui/material';
3
+ import { observer } from 'mobx-react';
4
+ import { useSlotEditorStyles } from './SlotEditor';
5
+ const TypeSelector = observer(({ typeNameChoices, slot, slotName, onChange, }) => {
6
+ const { classes } = useSlotEditorStyles();
7
+ return (React.createElement(Paper, { className: classes.paper },
8
+ React.createElement("div", { className: classes.paperContent },
9
+ React.createElement(TextField, { value: slot.type, label: "Type", select: true, helperText: `Type of ${slotName} to use`, fullWidth: true, onChange: onChange }, typeNameChoices.map(str => (React.createElement(MenuItem, { key: str, value: str }, str)))))));
10
+ });
11
+ export default TypeSelector;
12
+ //# sourceMappingURL=TypeSelector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypeSelector.js","sourceRoot":"","sources":["../../../src/ConfigurationEditorWidget/components/TypeSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAGlD,MAAM,YAAY,GAAG,QAAQ,CAC3B,CAAC,EACC,eAAe,EACf,IAAI,EACJ,QAAQ,EACR,QAAQ,GAMT,EAAE,EAAE;IACH,MAAM,EAAE,OAAO,EAAE,GAAG,mBAAmB,EAAE,CAAA;IACzC,OAAO,CACL,oBAAC,KAAK,IAAC,SAAS,EAAE,OAAO,CAAC,KAAK;QAC7B,6BAAK,SAAS,EAAE,OAAO,CAAC,YAAY;YAClC,oBAAC,SAAS,IACR,KAAK,EAAE,IAAI,CAAC,IAAI,EAChB,KAAK,EAAC,MAAM,EACZ,MAAM,QACN,UAAU,EAAE,WAAW,QAAQ,SAAS,EACxC,SAAS,QACT,QAAQ,EAAE,QAAQ,IAEjB,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAC1B,oBAAC,QAAQ,IAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,IAC3B,GAAG,CACK,CACZ,CAAC,CACQ,CACR,CACA,CACT,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,YAAY,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { default as stateModelFactory } from "./model";
2
+ export const configSchema: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
3
+ export const HeadingComponent: import("mobx-react/dist/types/IReactComponent").IReactComponent<any>;
@@ -0,0 +1,20 @@
1
+ import { observer } from 'mobx-react';
2
+ import { isStateTreeNode, getType } from 'mobx-state-tree';
3
+ import { ConfigurationSchema } from '@jbrowse/core/configuration';
4
+ export { default as stateModelFactory } from './model';
5
+ export const configSchema = ConfigurationSchema('ConfigurationEditorWidget', {});
6
+ export const HeadingComponent = observer(({ model }) => {
7
+ if (model === null || model === void 0 ? void 0 : model.target) {
8
+ if (model.target.type) {
9
+ return `${model.target.type} settings`;
10
+ }
11
+ if (isStateTreeNode(model.target)) {
12
+ const type = getType(model.target);
13
+ if (type === null || type === void 0 ? void 0 : type.name) {
14
+ return `${type.name.replace('ConfigurationSchema', '')} settings`;
15
+ }
16
+ }
17
+ }
18
+ return 'Settings';
19
+ });
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ConfigurationEditorWidget/index.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAEjE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,SAAS,CAAA;AACtD,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAAC,2BAA2B,EAAE,EAAE,CAAC,CAAA;AAChF,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACrD,IAAI,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,EAAE;QACjB,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE;YACrB,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,WAAW,CAAA;SACvC;QACD,IAAI,eAAe,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;YACjC,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;YAClC,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,EAAE;gBACd,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,EAAE,CAAC,WAAW,CAAA;aAClE;SACF;KACF;IACD,OAAO,UAAU,CAAA;AACnB,CAAC,CAAC,CAAA"}
@@ -0,0 +1,8 @@
1
+ declare function _default(pluginManager: any): import("mobx-state-tree").IModelType<{
2
+ id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
3
+ type: import("mobx-state-tree").ISimpleType<"ConfigurationEditorWidget">;
4
+ target: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<any>>;
5
+ }, {
6
+ setTarget(newTarget: any): void;
7
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
8
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import { types } from 'mobx-state-tree';
2
+ import { ElementId } from '@jbrowse/core/util/types/mst';
3
+ export default pluginManager => types
4
+ .model('ConfigurationEditorWidget', {
5
+ id: ElementId,
6
+ type: types.literal('ConfigurationEditorWidget'),
7
+ // If you add different types of targets, don't forget to account for that
8
+ // in the key of ./components/ConfigurationEditor.js
9
+ target: types.safeReference(pluginManager.pluggableConfigSchemaType('track')),
10
+ })
11
+ .actions(self => ({
12
+ setTarget(newTarget) {
13
+ self.target = newTarget;
14
+ },
15
+ }));
16
+ //# sourceMappingURL=model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/ConfigurationEditorWidget/model.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAExD,eAAe,aAAa,CAAC,EAAE,CAC7B,KAAK;KACF,KAAK,CAAC,2BAA2B,EAAE;IAClC,EAAE,EAAE,SAAS;IACb,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,2BAA2B,CAAC;IAChD,0EAA0E;IAC1E,oDAAoD;IACpD,MAAM,EAAE,KAAK,CAAC,aAAa,CACzB,aAAa,CAAC,yBAAyB,CAAC,OAAO,CAAC,CACjD;CACF,CAAC;KACD,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChB,SAAS,CAAC,SAAS;QACjB,IAAI,CAAC,MAAM,GAAG,SAAS,CAAA;IACzB,CAAC;CACF,CAAC,CAAC,CAAA"}
@@ -0,0 +1,24 @@
1
+ import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
2
+ import SimpleFeature, { Feature, SimpleFeatureSerialized } from '@jbrowse/core/util/simpleFeature';
3
+ import { NoAssemblyRegion } from '@jbrowse/core/util/types';
4
+ import { AnyConfigurationModel } from '@jbrowse/core/configuration/configurationSchema';
5
+ import PluginManager from '@jbrowse/core/PluginManager';
6
+ import { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache';
7
+ /**
8
+ * Adapter that just returns the features defined in its `features` configuration
9
+ * key, like:
10
+ * `"features": [ { "refName": "ctgA", "start":1, "end":20 }, ... ]`
11
+ */
12
+ export default class FromConfigAdapter extends BaseFeatureDataAdapter {
13
+ protected features: Map<string, Feature[]>;
14
+ constructor(conf: AnyConfigurationModel, getSubAdapter?: getSubAdapterType, pluginManager?: PluginManager);
15
+ static makeFeatures(fdata: SimpleFeatureSerialized[]): Map<string, Feature[]>;
16
+ static makeFeature(data: SimpleFeatureSerialized): SimpleFeature;
17
+ getRefNames(): Promise<string[]>;
18
+ getRefNameAliases(): Promise<{
19
+ refName: string;
20
+ aliases: any;
21
+ }[]>;
22
+ getFeatures(region: NoAssemblyRegion): import("rxjs").Observable<Feature>;
23
+ freeResources(): void;
24
+ }
@@ -0,0 +1,63 @@
1
+ import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
2
+ import SimpleFeature from '@jbrowse/core/util/simpleFeature';
3
+ import { ObservableCreate } from '@jbrowse/core/util/rxjs';
4
+ import { readConfObject } from '@jbrowse/core/configuration';
5
+ /**
6
+ * Adapter that just returns the features defined in its `features` configuration
7
+ * key, like:
8
+ * `"features": [ { "refName": "ctgA", "start":1, "end":20 }, ... ]`
9
+ */
10
+ export default class FromConfigAdapter extends BaseFeatureDataAdapter {
11
+ constructor(conf, getSubAdapter, pluginManager) {
12
+ super(conf, getSubAdapter, pluginManager);
13
+ const feats = readConfObject(conf, 'features');
14
+ this.features = FromConfigAdapter.makeFeatures(feats || []);
15
+ }
16
+ static makeFeatures(fdata) {
17
+ const features = new Map();
18
+ for (let i = 0; i < fdata.length; i += 1) {
19
+ if (fdata[i]) {
20
+ const f = this.makeFeature(fdata[i]);
21
+ const refName = f.get('refName');
22
+ let bucket = features.get(refName);
23
+ if (!bucket) {
24
+ bucket = [];
25
+ features.set(refName, bucket);
26
+ }
27
+ bucket.push(f);
28
+ }
29
+ }
30
+ // sort the features on each reference sequence by start coordinate
31
+ for (const refFeatures of features.values()) {
32
+ refFeatures.sort((a, b) => a.get('start') - b.get('start'));
33
+ }
34
+ return features;
35
+ }
36
+ static makeFeature(data) {
37
+ return new SimpleFeature(data);
38
+ }
39
+ async getRefNames() {
40
+ return [...this.features.keys()];
41
+ }
42
+ async getRefNameAliases() {
43
+ return Array.from(this.features.values()).map(featureArray => ({
44
+ refName: featureArray[0].get('refName'),
45
+ aliases: featureArray[0].get('aliases'),
46
+ }));
47
+ }
48
+ getFeatures(region) {
49
+ const { refName, start, end } = region;
50
+ return ObservableCreate(async (observer) => {
51
+ const features = this.features.get(refName) || [];
52
+ for (let i = 0; i < features.length; i++) {
53
+ const f = features[i];
54
+ if (f.get('end') > start && f.get('start') < end) {
55
+ observer.next(f);
56
+ }
57
+ }
58
+ observer.complete();
59
+ });
60
+ }
61
+ freeResources( /* { region } */) { }
62
+ }
63
+ //# sourceMappingURL=FromConfigAdapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FromConfigAdapter.js","sourceRoot":"","sources":["../../src/FromConfigAdapter/FromConfigAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAA;AAChF,OAAO,aAGN,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAG1D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAI5D;;;;GAIG;AAEH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,sBAAsB;IAGnE,YACE,IAA2B,EAC3B,aAAiC,EACjC,aAA6B;QAE7B,KAAK,CAAC,IAAI,EAAE,aAAa,EAAE,aAAa,CAAC,CAAA;QACzC,MAAM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,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;IAClC,CAAC;IAED,KAAK,CAAC,iBAAiB;QACrB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;YAC7D,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC;YACvC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC;SACxC,CAAC,CAAC,CAAA;IACL,CAAC;IAED,WAAW,CAAC,MAAwB;QAClC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM,CAAA;QAEtC,OAAO,gBAAgB,CAAU,KAAK,EAAC,QAAQ,EAAC,EAAE;YAChD,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAA;YACjD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACxC,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;gBAErB,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,GAAG,EAAE;oBAChD,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;iBACjB;aACF;YACD,QAAQ,CAAC,QAAQ,EAAE,CAAA;QACrB,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,aAAa,EAAC,gBAAgB,IAAS,CAAC;CACzC"}
@@ -0,0 +1,23 @@
1
+ import { BaseAdapter, RegionsAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
2
+ import { ConfigurationModel } from '@jbrowse/core/configuration/configurationSchema';
3
+ import { configSchema as FromConfigAdapterConfigSchema } from './configSchema';
4
+ import PluginManager from '@jbrowse/core/PluginManager';
5
+ import { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache';
6
+ /**
7
+ * Adapter that just returns the features defined in its `features` configuration
8
+ * key, like:
9
+ * `"features": [ { "refName": "ctgA", "start":1, "end":20 }, ... ]`
10
+ */
11
+ export default class FromConfigRegionsAdapter extends BaseAdapter implements RegionsAdapter {
12
+ private features;
13
+ constructor(config: ConfigurationModel<typeof FromConfigAdapterConfigSchema>, getSubAdapter?: getSubAdapterType, pluginManager?: PluginManager);
14
+ /**
15
+ * Get refName, start, and end for all features after collapsing any overlaps
16
+ */
17
+ getRegions(): Promise<{
18
+ refName: string;
19
+ start: number;
20
+ end: number;
21
+ }[]>;
22
+ freeResources(): void;
23
+ }
@@ -0,0 +1,50 @@
1
+ import { BaseAdapter, } from '@jbrowse/core/data_adapters/BaseAdapter';
2
+ import { readConfObject } from '@jbrowse/core/configuration';
3
+ import FromConfigAdapter from './FromConfigAdapter';
4
+ /**
5
+ * Adapter that just returns the features defined in its `features` configuration
6
+ * key, like:
7
+ * `"features": [ { "refName": "ctgA", "start":1, "end":20 }, ... ]`
8
+ */
9
+ export default class FromConfigRegionsAdapter extends BaseAdapter {
10
+ constructor(config, getSubAdapter, pluginManager) {
11
+ super(config, getSubAdapter, pluginManager);
12
+ const features = readConfObject(config, 'features');
13
+ this.features = FromConfigAdapter.makeFeatures(features || []);
14
+ }
15
+ /**
16
+ * Get refName, start, and end for all features after collapsing any overlaps
17
+ */
18
+ async getRegions() {
19
+ const regions = [];
20
+ // recall: features are stored in this object sorted by start coordinate
21
+ for (const [refName, features] of this.features) {
22
+ let currentRegion;
23
+ for (const feature of features) {
24
+ if (currentRegion &&
25
+ currentRegion.end >= feature.get('start') &&
26
+ currentRegion.start <= feature.get('end')) {
27
+ currentRegion.end = feature.get('end');
28
+ }
29
+ else {
30
+ if (currentRegion) {
31
+ regions.push(currentRegion);
32
+ }
33
+ currentRegion = {
34
+ refName,
35
+ start: feature.get('start'),
36
+ end: feature.get('end'),
37
+ };
38
+ }
39
+ }
40
+ if (currentRegion) {
41
+ regions.push(currentRegion);
42
+ }
43
+ }
44
+ // sort the regions by refName
45
+ regions.sort((a, b) => a.refName.localeCompare(b.refName));
46
+ return regions;
47
+ }
48
+ freeResources( /* { region } */) { }
49
+ }
50
+ //# sourceMappingURL=FromConfigRegionsAdapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FromConfigRegionsAdapter.js","sourceRoot":"","sources":["../../src/FromConfigAdapter/FromConfigRegionsAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,GAEZ,MAAM,yCAAyC,CAAA;AAKhD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAG5D,OAAO,iBAAiB,MAAM,qBAAqB,CAAA;AAInD;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,wBACnB,SAAQ,WAAW;IAKnB,YACE,MAAgE,EAChE,aAAiC,EACjC,aAA6B;QAE7B,KAAK,CAAC,MAAM,EAAE,aAAa,EAAE,aAAa,CAAC,CAAA;QAC3C,MAAM,QAAQ,GAAG,cAAc,CAC7B,MAAM,EACN,UAAU,CACkB,CAAA;QAC9B,IAAI,CAAC,QAAQ,GAAG,iBAAiB,CAAC,YAAY,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAA;IAChE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,UAAU;QACd,MAAM,OAAO,GAAG,EAAE,CAAA;QAElB,wEAAwE;QACxE,KAAK,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE;YAC/C,IAAI,aAAa,CAAA;YACjB,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;gBAC9B,IACE,aAAa;oBACb,aAAa,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;oBACzC,aAAa,CAAC,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EACzC;oBACA,aAAa,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;iBACvC;qBAAM;oBACL,IAAI,aAAa,EAAE;wBACjB,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;qBAC5B;oBACD,aAAa,GAAG;wBACd,OAAO;wBACP,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;wBAC3B,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;qBACxB,CAAA;iBACF;aACF;YACD,IAAI,aAAa,EAAE;gBACjB,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;aAC5B;SACF;QAED,8BAA8B;QAC9B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;QAE1D,OAAO,OAAO,CAAA;IAChB,CAAC;IAED,aAAa,EAAC,gBAAgB,IAAS,CAAC;CACzC"}
@@ -0,0 +1,25 @@
1
+ import { Feature } from '@jbrowse/core/util/simpleFeature';
2
+ import { NoAssemblyRegion } from '@jbrowse/core/util/types';
3
+ import FromConfigAdapter from './FromConfigAdapter';
4
+ export default class FromConfigSequenceAdapter extends FromConfigAdapter {
5
+ /**
6
+ * Fetch features for a certain region
7
+ * @param region - Region
8
+ * @returns Observable of Feature objects in the region
9
+ */
10
+ getFeatures(region: NoAssemblyRegion): import("rxjs").Observable<Feature>;
11
+ /**
12
+ * Get refName, start, and end for all features after collapsing any overlaps
13
+ */
14
+ getRegions(): Promise<{
15
+ refName: string;
16
+ start: number;
17
+ end: number;
18
+ }[]>;
19
+ /**
20
+ * called to provide a hint that data tied to a certain region
21
+ * will not be needed for the forseeable future and can be purged
22
+ * from caches, etc
23
+ */
24
+ freeResources(): void;
25
+ }
@@ -0,0 +1,73 @@
1
+ import SimpleFeature from '@jbrowse/core/util/simpleFeature';
2
+ import { ObservableCreate } from '@jbrowse/core/util/rxjs';
3
+ import { toArray } from 'rxjs/operators';
4
+ import FromConfigAdapter from './FromConfigAdapter';
5
+ export default class FromConfigSequenceAdapter extends FromConfigAdapter {
6
+ /**
7
+ * Fetch features for a certain region
8
+ * @param region - Region
9
+ * @returns Observable of Feature objects in the region
10
+ */
11
+ getFeatures(region) {
12
+ // TODO: restore commented version below once TSDX supports Rollup v2
13
+ // xref: https://github.com/rollup/rollup/blob/master/CHANGELOG.md#bug-fixes-45
14
+ // return ObservableCreate<Feature>(async observer => {
15
+ // const feats = await super.getFeatures(region).pipe(toArray()).toPromise()
16
+ const superGetFeatures = super.getFeatures;
17
+ return ObservableCreate(async (observer) => {
18
+ const feats = await superGetFeatures
19
+ .call(this, region)
20
+ .pipe(toArray())
21
+ .toPromise();
22
+ const feat = feats[0];
23
+ observer.next(new SimpleFeature({
24
+ ...feat.toJSON(),
25
+ uniqueId: `${feat.id()}:${region.start}-${region.end}`,
26
+ end: region.end,
27
+ start: region.start,
28
+ seq: feat
29
+ .get('seq')
30
+ .slice(Math.max(region.start - feat.get('start'), 0), Math.max(region.end - feat.get('start'), 0)),
31
+ }));
32
+ observer.complete();
33
+ });
34
+ }
35
+ /**
36
+ * Get refName, start, and end for all features after collapsing any overlaps
37
+ */
38
+ async getRegions() {
39
+ const regions = [];
40
+ // recall: features are stored in this object sorted by start coordinate
41
+ for (const [refName, features] of this.features) {
42
+ let currentRegion;
43
+ for (const feature of features) {
44
+ if (currentRegion &&
45
+ currentRegion.end >= feature.get('start') &&
46
+ currentRegion.start <= feature.get('end')) {
47
+ currentRegion.end = feature.get('end');
48
+ }
49
+ else {
50
+ if (currentRegion) {
51
+ regions.push(currentRegion);
52
+ }
53
+ currentRegion = {
54
+ refName,
55
+ start: feature.get('start'),
56
+ end: feature.get('end'),
57
+ };
58
+ }
59
+ }
60
+ if (currentRegion) {
61
+ regions.push(currentRegion);
62
+ }
63
+ }
64
+ return regions;
65
+ }
66
+ /**
67
+ * called to provide a hint that data tied to a certain region
68
+ * will not be needed for the forseeable future and can be purged
69
+ * from caches, etc
70
+ */
71
+ freeResources( /* { region } */) { }
72
+ }
73
+ //# sourceMappingURL=FromConfigSequenceAdapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FromConfigSequenceAdapter.js","sourceRoot":"","sources":["../../src/FromConfigAdapter/FromConfigSequenceAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,aAA0B,MAAM,kCAAkC,CAAA;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE1D,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,OAAO,iBAAiB,MAAM,qBAAqB,CAAA;AAEnD,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,iBAAiB;IACtE;;;;OAIG;IACH,WAAW,CAAC,MAAwB;QAClC,qEAAqE;QACrE,+EAA+E;QAC/E,uDAAuD;QACvD,8EAA8E;QAC9E,MAAM,gBAAgB,GAAG,KAAK,CAAC,WAAW,CAAA;QAC1C,OAAO,gBAAgB,CAAU,KAAK,EAAC,QAAQ,EAAC,EAAE;YAChD,MAAM,KAAK,GAAG,MAAM,gBAAgB;iBACjC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC;iBAClB,IAAI,CAAC,OAAO,EAAE,CAAC;iBACf,SAAS,EAAE,CAAA;YACd,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;YACrB,QAAQ,CAAC,IAAI,CACX,IAAI,aAAa,CAAC;gBAChB,GAAG,IAAI,CAAC,MAAM,EAAE;gBAChB,QAAQ,EAAE,GAAG,IAAI,CAAC,EAAE,EAAE,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,GAAG,EAAE;gBACtD,GAAG,EAAE,MAAM,CAAC,GAAG;gBACf,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,GAAG,EAAE,IA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AAa,EAAC,gBAAgB,IAAS,CAAC;CACzC"}
@@ -0,0 +1,3 @@
1
+ export declare const configSchema: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
2
+ export declare const regionsConfigSchema: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
3
+ export declare const sequenceConfigSchema: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
@@ -0,0 +1,32 @@
1
+ import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
+ export const configSchema = ConfigurationSchema('FromConfigAdapter', {
3
+ features: {
4
+ type: 'frozen',
5
+ defaultValue: [],
6
+ },
7
+ featureClass: {
8
+ type: 'string',
9
+ defaultValue: 'SimpleFeature',
10
+ },
11
+ }, { explicitlyTyped: true, implicitIdentifier: 'adapterId' });
12
+ export const regionsConfigSchema = ConfigurationSchema('FromConfigRegionsAdapter', {
13
+ features: {
14
+ type: 'frozen',
15
+ defaultValue: [],
16
+ },
17
+ featureClass: {
18
+ type: 'string',
19
+ defaultValue: 'SimpleFeature',
20
+ },
21
+ }, { explicitlyTyped: true, implicitIdentifier: 'adapterId' });
22
+ export const sequenceConfigSchema = ConfigurationSchema('FromConfigSequenceAdapter', {
23
+ features: {
24
+ type: 'frozen',
25
+ defaultValue: [],
26
+ },
27
+ featureClass: {
28
+ type: 'string',
29
+ defaultValue: 'SimpleFeature',
30
+ },
31
+ }, { explicitlyTyped: true, implicitIdentifier: 'adapterId' });
32
+ //# sourceMappingURL=configSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configSchema.js","sourceRoot":"","sources":["../../src/FromConfigAdapter/configSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAEjE,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAC7C,mBAAmB,EACnB;IACE,QAAQ,EAAE;QACR,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,EAAE;KACjB;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,eAAe;KAC9B;CACF,EACD,EAAE,eAAe,EAAE,IAAI,EAAE,kBAAkB,EAAE,WAAW,EAAE,CAC3D,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CACpD,0BAA0B,EAC1B;IACE,QAAQ,EAAE;QACR,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,EAAE;KACjB;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,eAAe;KAC9B;CACF,EACD,EAAE,eAAe,EAAE,IAAI,EAAE,kBAAkB,EAAE,WAAW,EAAE,CAC3D,CAAA;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CACrD,2BAA2B,EAC3B;IACE,QAAQ,EAAE;QACR,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,EAAE;KACjB;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,eAAe;KAC9B;CACF,EACD,EAAE,eAAe,EAAE,IAAI,EAAE,kBAAkB,EAAE,WAAW,EAAE,CAC3D,CAAA"}
@@ -0,0 +1,4 @@
1
+ export { default as AdapterClass } from './FromConfigAdapter';
2
+ export { default as RegionsAdapterClass } from './FromConfigRegionsAdapter';
3
+ export { default as SequenceAdapterClass } from './FromConfigSequenceAdapter';
4
+ export { configSchema, regionsConfigSchema, sequenceConfigSchema, } from './configSchema';
@@ -0,0 +1,5 @@
1
+ export { default as AdapterClass } from './FromConfigAdapter';
2
+ export { default as RegionsAdapterClass } from './FromConfigRegionsAdapter';
3
+ export { default as SequenceAdapterClass } from './FromConfigSequenceAdapter';
4
+ export { configSchema, regionsConfigSchema, sequenceConfigSchema, } from './configSchema';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/FromConfigAdapter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAC7D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAC3E,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAC7E,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,gBAAgB,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { BaseRefNameAliasAdapter, BaseAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
2
+ export default class RefNameAliasAdapter extends BaseAdapter implements BaseRefNameAliasAdapter {
3
+ getRefNameAliases(): Promise<{
4
+ refName: string;
5
+ aliases: string[];
6
+ }[]>;
7
+ freeResources(): Promise<void>;
8
+ }
@@ -0,0 +1,24 @@
1
+ import { BaseAdapter, } from '@jbrowse/core/data_adapters/BaseAdapter';
2
+ import { openLocation } from '@jbrowse/core/util/io';
3
+ import { readConfObject } from '@jbrowse/core/configuration';
4
+ export default class RefNameAliasAdapter extends BaseAdapter {
5
+ async getRefNameAliases() {
6
+ const loc = readConfObject(this.config, 'location');
7
+ if (loc.uri === '' || loc.uri === '/path/to/my/aliases.txt') {
8
+ return [];
9
+ }
10
+ const results = await openLocation(loc).readFile('utf8');
11
+ const refColumn = readConfObject(this.config, 'refNameColumn');
12
+ return results
13
+ .trim()
14
+ .split('\n')
15
+ .filter(f => !!f && !f.startsWith('#'))
16
+ .map(row => {
17
+ const aliases = row.split('\t');
18
+ const [refName] = aliases.splice(refColumn, 1);
19
+ return { refName, aliases: aliases.filter(f => !!f.trim()) };
20
+ });
21
+ }
22
+ async freeResources() { }
23
+ }
24
+ //# sourceMappingURL=RefNameAliasAdapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RefNameAliasAdapter.js","sourceRoot":"","sources":["../../src/RefNameAliasAdapter/RefNameAliasAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,GACZ,MAAM,yCAAyC,CAAA;AAChD,O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
+ import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
+ export default ConfigurationSchema('RefNameAliasAdapter', {
3
+ location: {
4
+ type: 'fileLocation',
5
+ defaultValue: {
6
+ uri: '/path/to/my/aliases.txt',
7
+ locationType: 'UriLocation',
8
+ },
9
+ },
10
+ refNameColumn: {
11
+ type: 'number',
12
+ defaultValue: 0,
13
+ },
14
+ }, { explicitlyTyped: true });
15
+ //# sourceMappingURL=configSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configSchema.js","sourceRoot":"","sources":["../../src/RefNameAliasAdapter/configSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAEjE,eAAe,mBAAmB,CAChC,qBAAqB,EACrB;IACE,QAAQ,EAAE;QACR,IAAI,EAAE,cAAc;QACpB,YAAY,EAAE;YACZ,GAAG,EAAE,yBAAyB;YAC9B,YAAY,EAAE,aAAa;SAC5B;KACF;IACD,aAAa,EAAE;QACb,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,CAAC;KAChB;CACF,EACD,EAAE,eAAe,EAAE,IAAI,EAAE,CAC1B,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { default as AdapterClass } from './RefNameAliasAdapter';
2
+ export { default as configSchema } from './configSchema';
@@ -0,0 +1,3 @@
1
+ export { default as AdapterClass } from './RefNameAliasAdapter';
2
+ export { default as configSchema } from './configSchema';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/RefNameAliasAdapter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAC/D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA"}
package/esm/index.d.ts ADDED
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ import Plugin from '@jbrowse/core/Plugin';
3
+ import PluginManager from '@jbrowse/core/PluginManager';
4
+ declare const LazyConfigurationEditorComponent: import("react").LazyExoticComponent<({ model }: {
5
+ model: {
6
+ target: {
7
+ [x: string]: any;
8
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
9
+ setSubschema(slotName: string, data: unknown): any;
10
+ } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>;
11
+ };
12
+ }) => JSX.Element>;
13
+ export default class extends Plugin {
14
+ name: string;
15
+ install(pluginManager: PluginManager): void;
16
+ }
17
+ export { default as JsonEditor } from './ConfigurationEditorWidget/components/JsonEditor';
18
+ export { LazyConfigurationEditorComponent as ConfigurationEditor };