@jbrowse/core 2.4.2 → 2.6.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 (223) hide show
  1. package/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.d.ts +16 -0
  2. package/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +45 -0
  3. package/BaseFeatureWidget/BaseFeatureDetail/Attributes.d.ts +15 -0
  4. package/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +52 -0
  5. package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.d.ts +13 -0
  6. package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +27 -0
  7. package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.d.ts +15 -0
  8. package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +98 -0
  9. package/BaseFeatureWidget/BaseFeatureDetail/FieldName.d.ts +16 -0
  10. package/BaseFeatureWidget/BaseFeatureDetail/FieldName.js +32 -0
  11. package/BaseFeatureWidget/BaseFeatureDetail/SimpleField.d.ts +17 -0
  12. package/BaseFeatureWidget/BaseFeatureDetail/SimpleField.js +23 -0
  13. package/BaseFeatureWidget/BaseFeatureDetail/UriField.d.ts +18 -0
  14. package/BaseFeatureWidget/BaseFeatureDetail/UriField.js +31 -0
  15. package/BaseFeatureWidget/BaseFeatureDetail/UriLink.d.ts +7 -0
  16. package/BaseFeatureWidget/BaseFeatureDetail/UriLink.js +13 -0
  17. package/BaseFeatureWidget/BaseFeatureDetail/index.d.ts +33 -0
  18. package/BaseFeatureWidget/BaseFeatureDetail/index.js +170 -0
  19. package/BaseFeatureWidget/BaseFeatureDetail/util.d.ts +5 -0
  20. package/BaseFeatureWidget/BaseFeatureDetail/util.js +46 -0
  21. package/BaseFeatureWidget/SequenceFeatureDetails/CDNASequence.d.ts +13 -0
  22. package/BaseFeatureWidget/SequenceFeatureDetails/CDNASequence.js +25 -0
  23. package/BaseFeatureWidget/SequenceFeatureDetails/CDSSequence.d.ts +6 -0
  24. package/BaseFeatureWidget/SequenceFeatureDetails/CDSSequence.js +12 -0
  25. package/BaseFeatureWidget/SequenceFeatureDetails/GenomicSequence.d.ts +6 -0
  26. package/BaseFeatureWidget/SequenceFeatureDetails/GenomicSequence.js +14 -0
  27. package/BaseFeatureWidget/SequenceFeatureDetails/ProteinSequence.d.ts +9 -0
  28. package/BaseFeatureWidget/SequenceFeatureDetails/ProteinSequence.js +18 -0
  29. package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.d.ts +3 -0
  30. package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +143 -0
  31. package/BaseFeatureWidget/{SequenceFeatureSettingsDialog.d.ts → SequenceFeatureDetails/SequenceFeatureSettingsDialog.d.ts} +2 -2
  32. package/BaseFeatureWidget/{SequenceFeatureSettingsDialog.js → SequenceFeatureDetails/SequenceFeatureSettingsDialog.js} +1 -1
  33. package/BaseFeatureWidget/{SequenceHelpDialog.d.ts → SequenceFeatureDetails/SequenceHelpDialog.d.ts} +2 -2
  34. package/BaseFeatureWidget/{SequenceHelpDialog.js → SequenceFeatureDetails/SequenceHelpDialog.js} +6 -9
  35. package/BaseFeatureWidget/{SequencePanel.d.ts → SequenceFeatureDetails/SequencePanel.d.ts} +1 -1
  36. package/BaseFeatureWidget/{SequencePanel.js → SequenceFeatureDetails/SequencePanel.js} +10 -8
  37. package/BaseFeatureWidget/SequenceFeatureDetails/hooks.d.ts +10 -0
  38. package/BaseFeatureWidget/SequenceFeatureDetails/hooks.js +73 -0
  39. package/BaseFeatureWidget/SequenceFeatureDetails/index.d.ts +3 -0
  40. package/BaseFeatureWidget/SequenceFeatureDetails/index.js +68 -0
  41. package/BaseFeatureWidget/{test_data → SequenceFeatureDetails/test_data}/DLGAP3.d.ts +17 -17
  42. package/BaseFeatureWidget/{test_data → SequenceFeatureDetails/test_data}/NCDN.d.ts +16 -16
  43. package/BaseFeatureWidget/SequenceFeatureDetails/util.d.ts +6 -0
  44. package/BaseFeatureWidget/SequenceFeatureDetails/util.js +11 -0
  45. package/BaseFeatureWidget/index.d.ts +4 -1
  46. package/BaseFeatureWidget/index.js +29 -17
  47. package/BaseFeatureWidget/types.d.ts +2 -2
  48. package/BaseFeatureWidget/util.js +15 -5
  49. package/Plugin.d.ts +1 -1
  50. package/PluginLoader.js +17 -0
  51. package/PluginManager.d.ts +8 -5
  52. package/PluginManager.js +3 -0
  53. package/README.md +0 -2
  54. package/ReExports/list.js +1 -0
  55. package/ReExports/modules.d.ts +8 -5
  56. package/ReExports/modules.js +7 -7
  57. package/TextSearch/TextSearchManager.d.ts +2 -9
  58. package/assemblyManager/assembly.d.ts +91 -8
  59. package/assemblyManager/assembly.js +92 -8
  60. package/assemblyManager/assemblyConfigSchema.d.ts +52 -1
  61. package/assemblyManager/assemblyConfigSchema.js +1 -0
  62. package/assemblyManager/assemblyManager.d.ts +227 -58
  63. package/assemblyManager/assemblyManager.js +72 -13
  64. package/assemblyManager/index.d.ts +1 -0
  65. package/configuration/configurationSchema.d.ts +14 -16
  66. package/configuration/configurationSchema.js +4 -2
  67. package/configuration/index.d.ts +1 -1
  68. package/configuration/types.d.ts +15 -0
  69. package/configuration/types.js +2 -0
  70. package/configuration/util.d.ts +5 -3
  71. package/configuration/util.js +18 -18
  72. package/data_adapters/BaseAdapter/BaseAdapter.d.ts +23 -0
  73. package/data_adapters/BaseAdapter/BaseAdapter.js +37 -0
  74. package/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +128 -0
  75. package/data_adapters/{BaseAdapter.js → BaseAdapter/BaseFeatureDataAdapter.js} +58 -88
  76. package/data_adapters/BaseAdapter/BaseOptions.d.ts +16 -0
  77. package/data_adapters/BaseAdapter/BaseOptions.js +2 -0
  78. package/data_adapters/BaseAdapter/BaseRefNameAliasAdapter.d.ts +9 -0
  79. package/data_adapters/BaseAdapter/BaseRefNameAliasAdapter.js +2 -0
  80. package/data_adapters/BaseAdapter/BaseSequenceAdapter.d.ts +13 -0
  81. package/data_adapters/BaseAdapter/BaseSequenceAdapter.js +10 -0
  82. package/data_adapters/BaseAdapter/BaseTextSearchAdapter.d.ts +6 -0
  83. package/data_adapters/BaseAdapter/BaseTextSearchAdapter.js +2 -0
  84. package/data_adapters/BaseAdapter/RegionsAdapter.d.ts +6 -0
  85. package/data_adapters/BaseAdapter/RegionsAdapter.js +2 -0
  86. package/data_adapters/BaseAdapter/index.d.ts +15 -0
  87. package/data_adapters/BaseAdapter/index.js +25 -0
  88. package/data_adapters/BaseAdapter/types.d.ts +21 -0
  89. package/data_adapters/BaseAdapter/types.js +2 -0
  90. package/data_adapters/BaseAdapter/util.d.ts +12 -0
  91. package/data_adapters/BaseAdapter/util.js +23 -0
  92. package/data_adapters/CytobandAdapter/configSchema.d.ts +11 -1
  93. package/package.json +4 -4
  94. package/pluggableElementTypes/AdapterType.d.ts +1 -1
  95. package/pluggableElementTypes/ConnectionType.d.ts +1 -1
  96. package/pluggableElementTypes/DisplayType.d.ts +1 -1
  97. package/pluggableElementTypes/InternetAccountType.d.ts +1 -1
  98. package/pluggableElementTypes/RpcMethodType.d.ts +9 -7
  99. package/pluggableElementTypes/RpcMethodType.js +9 -7
  100. package/pluggableElementTypes/TextSearchAdapterType.d.ts +1 -1
  101. package/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +18 -0
  102. package/pluggableElementTypes/models/BaseConnectionModelFactory.js +9 -0
  103. package/pluggableElementTypes/models/BaseDisplayModel.d.ts +10 -1
  104. package/pluggableElementTypes/models/BaseDisplayModel.js +9 -1
  105. package/pluggableElementTypes/models/BaseTrackModel.d.ts +2 -1
  106. package/pluggableElementTypes/models/BaseTrackModel.js +4 -2
  107. package/pluggableElementTypes/models/BaseViewModel.d.ts +46 -2
  108. package/pluggableElementTypes/models/BaseViewModel.js +6 -0
  109. package/pluggableElementTypes/models/InternetAccountModel.d.ts +36 -2
  110. package/pluggableElementTypes/models/InternetAccountModel.js +33 -21
  111. package/pluggableElementTypes/models/baseConnectionConfig.d.ts +22 -2
  112. package/pluggableElementTypes/models/baseConnectionConfig.js +2 -1
  113. package/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +42 -1
  114. package/pluggableElementTypes/models/baseInternetAccountConfig.js +1 -1
  115. package/pluggableElementTypes/models/baseTrackConfig.d.ts +120 -3
  116. package/pluggableElementTypes/models/baseTrackConfig.js +7 -5
  117. package/pluggableElementTypes/models/index.d.ts +1 -1
  118. package/pluggableElementTypes/renderers/BoxRendererType.js +1 -2
  119. package/pluggableElementTypes/renderers/CircularChordRendererType.d.ts +2 -2
  120. package/pluggableElementTypes/renderers/FeatureRendererType.d.ts +4 -2
  121. package/pluggableElementTypes/renderers/FeatureRendererType.js +4 -6
  122. package/pluggableElementTypes/renderers/RendererType.d.ts +1 -1
  123. package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.d.ts +2 -2
  124. package/pluggableElementTypes/renderers/ServerSideRenderedContent.d.ts +1 -1
  125. package/pluggableElementTypes/renderers/ServerSideRendererType.d.ts +1 -1
  126. package/rpc/BaseRpcDriver.js +1 -7
  127. package/rpc/RpcManager.d.ts +8 -1
  128. package/rpc/RpcManager.js +1 -1
  129. package/rpc/baseRpcConfig.d.ts +10 -1
  130. package/rpc/configSchema.d.ts +14 -1
  131. package/rpc/coreRpcMethods.d.ts +1 -1
  132. package/rpc/coreRpcMethods.js +3 -3
  133. package/rpc/mainThreadRpcConfig.d.ts +7 -1
  134. package/rpc/methods/{CoreEstimateRegionStats.d.ts → CoreGetFeatureDensityStats.d.ts} +2 -2
  135. package/rpc/methods/{CoreEstimateRegionStats.js → CoreGetFeatureDensityStats.js} +4 -4
  136. package/rpc/methods/CoreGetFeatureDetails.js +5 -5
  137. package/rpc/webWorkerRpcConfig.d.ts +7 -1
  138. package/tsconfig.build.tsbuildinfo +1 -1
  139. package/ui/AppLogo.d.ts +2 -2
  140. package/ui/AssemblySelector.d.ts +2 -2
  141. package/ui/AssemblySelector.js +1 -1
  142. package/ui/CascadingMenu.d.ts +2 -2
  143. package/ui/CascadingMenuButton.d.ts +8 -0
  144. package/ui/CascadingMenuButton.js +20 -0
  145. package/ui/ColorPicker.d.ts +4 -4
  146. package/ui/Dialog.d.ts +5 -5
  147. package/ui/Dialog.js +19 -7
  148. package/ui/DropDownMenu.d.ts +2 -2
  149. package/ui/EditableTypography.js +1 -1
  150. package/ui/ErrorMessage.d.ts +2 -2
  151. package/ui/ErrorMessage.js +6 -2
  152. package/ui/FactoryResetDialog.d.ts +2 -2
  153. package/ui/FatalErrorDialog.d.ts +6 -7
  154. package/ui/FatalErrorDialog.js +7 -7
  155. package/ui/FileSelector/FileSelector.d.ts +2 -2
  156. package/ui/FileSelector/FileSelector.js +3 -2
  157. package/ui/FileSelector/LocalFileChooser.d.ts +2 -2
  158. package/ui/FileSelector/UrlChooser.d.ts +3 -4
  159. package/ui/FileSelector/UrlChooser.js +8 -10
  160. package/ui/Icons.d.ts +10 -10
  161. package/ui/LoadingEllipses.d.ts +2 -2
  162. package/ui/Logo.d.ts +3 -3
  163. package/ui/Menu.d.ts +2 -2
  164. package/ui/PrerenderedCanvas.d.ts +2 -2
  165. package/ui/ResizeBar.d.ts +1 -1
  166. package/ui/ResizeBar.js +1 -1
  167. package/ui/ResizeHandle.d.ts +2 -2
  168. package/ui/ReturnToImportFormDialog.d.ts +2 -2
  169. package/ui/SanitizedHTML.d.ts +2 -2
  170. package/ui/SanitizedHTML.js +6 -0
  171. package/ui/Snackbar.d.ts +7 -9
  172. package/ui/Snackbar.js +12 -17
  173. package/ui/SnackbarModel.d.ts +9 -3
  174. package/ui/SnackbarModel.js +3 -3
  175. package/ui/Tooltip.d.ts +2 -2
  176. package/ui/index.d.ts +0 -1
  177. package/ui/index.js +1 -3
  178. package/ui/react-colorful.d.ts +1 -1
  179. package/ui/theme.js +3 -18
  180. package/util/Base1DUtils.js +2 -1
  181. package/util/QuickLRU.d.ts +1 -1
  182. package/util/blockTypes.js +1 -1
  183. package/util/formatFastaStrings.js +1 -1
  184. package/util/index.d.ts +18 -2
  185. package/util/index.js +77 -11
  186. package/util/io/index.js +1 -1
  187. package/util/layouts/PrecomputedMultiLayout.d.ts +1 -1
  188. package/util/mst-reflection.js +1 -2
  189. package/util/offscreenCanvasUtils.d.ts +2 -2
  190. package/util/stats.d.ts +5 -5
  191. package/util/types/index.d.ts +9 -3
  192. package/util/types/index.js +6 -2
  193. package/util/types/mst.d.ts +12 -9
  194. package/util/types/util.d.ts +0 -3
  195. package/BaseFeatureWidget/BaseFeatureDetail.d.ts +0 -62
  196. package/BaseFeatureWidget/BaseFeatureDetail.js +0 -378
  197. package/BaseFeatureWidget/SequenceBox.d.ts +0 -29
  198. package/BaseFeatureWidget/SequenceBox.js +0 -63
  199. package/BaseFeatureWidget/SequenceFeatureDetails.d.ts +0 -3
  200. package/BaseFeatureWidget/SequenceFeatureDetails.js +0 -230
  201. package/data_adapters/BaseAdapter.d.ts +0 -138
  202. package/ui/AboutDialog.d.ts +0 -12
  203. package/ui/AboutDialog.js +0 -125
  204. package/ui/App.d.ts +0 -18
  205. package/ui/App.js +0 -114
  206. package/ui/AppToolbar.d.ts +0 -19
  207. package/ui/AppToolbar.js +0 -56
  208. package/ui/Drawer.d.ts +0 -8
  209. package/ui/Drawer.js +0 -34
  210. package/ui/DrawerWidget.d.ts +0 -6
  211. package/ui/DrawerWidget.js +0 -130
  212. package/ui/ViewContainer.d.ts +0 -9
  213. package/ui/ViewContainer.js +0 -76
  214. package/ui/ViewContainerTitle.d.ts +0 -6
  215. package/ui/ViewContainerTitle.js +0 -42
  216. package/ui/ViewLauncher.d.ts +0 -18
  217. package/ui/ViewLauncher.js +0 -50
  218. package/ui/ViewMenu.d.ts +0 -9
  219. package/ui/ViewMenu.js +0 -69
  220. package/ui/ViewPanel.d.ts +0 -19
  221. package/ui/ViewPanel.js +0 -49
  222. /package/BaseFeatureWidget/{test_data → SequenceFeatureDetails/test_data}/DLGAP3.js +0 -0
  223. /package/BaseFeatureWidget/{test_data → SequenceFeatureDetails/test_data}/NCDN.js +0 -0
@@ -11,6 +11,36 @@ export declare const InternetAccount: import("mobx-state-tree").IModelType<{
11
11
  * #property
12
12
  */
13
13
  type: import("mobx-state-tree").ISimpleType<string>;
14
+ /**
15
+ * #property
16
+ */
17
+ configuration: import("../../configuration/configurationSchema").ConfigurationSchemaType<{
18
+ name: {
19
+ description: string;
20
+ type: string;
21
+ defaultValue: string;
22
+ };
23
+ description: {
24
+ description: string;
25
+ type: string;
26
+ defaultValue: string;
27
+ };
28
+ authHeader: {
29
+ description: string;
30
+ type: string;
31
+ defaultValue: string;
32
+ };
33
+ tokenType: {
34
+ description: string;
35
+ type: string;
36
+ defaultValue: string;
37
+ };
38
+ domains: {
39
+ description: string;
40
+ type: string;
41
+ defaultValue: never[];
42
+ };
43
+ }, import("../../configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>;
14
44
  }, {
15
45
  /**
16
46
  * #getter
@@ -90,12 +120,13 @@ export declare const InternetAccount: import("mobx-state-tree").IModelType<{
90
120
  /**
91
121
  * #action
92
122
  * This can be used by an internetAccount to validate a token works before
93
- * it is used. This is run when preAuthorizationInformation is requested, so
94
- * it can be used to check that a token is valid before sending it to a
123
+ * it is used. This is run when preAuthorizationInformation is requested,
124
+ * so it can be used to check that a token is valid before sending it to a
95
125
  * worker thread. It expects the token to be returned so that this action
96
126
  * can also be used to generate a new token (e.g. by using a refresh token)
97
127
  * if the original one was invalid. Should throw an error if a token is
98
128
  * invalid.
129
+ *
99
130
  * @param token - Auth token
100
131
  * @param loc - UriLocation of the resource
101
132
  * @returns - Valid auth token
@@ -107,6 +138,7 @@ export declare const InternetAccount: import("mobx-state-tree").IModelType<{
107
138
  * Try to get the token from the location pre-auth, from local storage,
108
139
  * or from a previously cached promise. If token is not available, uses
109
140
  * `getTokenFromUser`.
141
+ *
110
142
  * @param location - UriLocation of the resource
111
143
  * @returns A promise for the token
112
144
  */
@@ -134,6 +166,7 @@ export declare const InternetAccount: import("mobx-state-tree").IModelType<{
134
166
  * #action
135
167
  * Gets the token and returns it along with the information needed to
136
168
  * create a new internetAccount.
169
+ *
137
170
  * @param location - UriLocation of the resource
138
171
  * @returns
139
172
  */
@@ -150,6 +183,7 @@ export declare const InternetAccount: import("mobx-state-tree").IModelType<{
150
183
  * Get a fetch method that will add any needed authentication headers to
151
184
  * the request before sending it. If location is provided, it will be
152
185
  * checked to see if it includes a token in it pre-auth information.
186
+ *
153
187
  * @param loc - UriLocation of the resource
154
188
  * @returns A function that can be used to fetch
155
189
  */
@@ -5,9 +5,11 @@ const mobx_state_tree_1 = require("mobx-state-tree");
5
5
  const configuration_1 = require("../../configuration");
6
6
  const io_1 = require("../../util/io");
7
7
  const mst_1 = require("../../util/types/mst");
8
+ const baseInternetAccountConfig_1 = require("./baseInternetAccountConfig");
8
9
  const inWebWorker = typeof sessionStorage === 'undefined';
9
10
  /**
10
11
  * #stateModel BaseInternetAccountModel
12
+ * #category internetAccount
11
13
  */
12
14
  function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
13
15
  exports.InternetAccount = mobx_state_tree_1.types
@@ -20,6 +22,10 @@ exports.InternetAccount = mobx_state_tree_1.types
20
22
  * #property
21
23
  */
22
24
  type: mobx_state_tree_1.types.string,
25
+ /**
26
+ * #property
27
+ */
28
+ configuration: (0, configuration_1.ConfigurationReference)(baseInternetAccountConfig_1.BaseInternetAccountConfig),
23
29
  })
24
30
  .views(self => ({
25
31
  /**
@@ -38,7 +44,7 @@ exports.InternetAccount = mobx_state_tree_1.types
38
44
  * #getter
39
45
  */
40
46
  get internetAccountId() {
41
- return (0, configuration_1.getConf)(self, 'internetAccountId');
47
+ return (0, configuration_1.getConf)(self, 'internetAccountId'); // NOTE: this is the explicitIdentifier of the config schema
42
48
  },
43
49
  /**
44
50
  * #getter
@@ -132,12 +138,13 @@ exports.InternetAccount = mobx_state_tree_1.types
132
138
  /**
133
139
  * #action
134
140
  * This can be used by an internetAccount to validate a token works before
135
- * it is used. This is run when preAuthorizationInformation is requested, so
136
- * it can be used to check that a token is valid before sending it to a
141
+ * it is used. This is run when preAuthorizationInformation is requested,
142
+ * so it can be used to check that a token is valid before sending it to a
137
143
  * worker thread. It expects the token to be returned so that this action
138
144
  * can also be used to generate a new token (e.g. by using a refresh token)
139
145
  * if the original one was invalid. Should throw an error if a token is
140
146
  * invalid.
147
+ *
141
148
  * @param token - Auth token
142
149
  * @param loc - UriLocation of the resource
143
150
  * @returns - Valid auth token
@@ -154,6 +161,7 @@ exports.InternetAccount = mobx_state_tree_1.types
154
161
  * Try to get the token from the location pre-auth, from local storage,
155
162
  * or from a previously cached promise. If token is not available, uses
156
163
  * `getTokenFromUser`.
164
+ *
157
165
  * @param location - UriLocation of the resource
158
166
  * @returns A promise for the token
159
167
  */
@@ -175,17 +183,13 @@ exports.InternetAccount = mobx_state_tree_1.types
175
183
  tokenPromise = Promise.resolve(token);
176
184
  return tokenPromise;
177
185
  }
178
- tokenPromise = new Promise((r, x) => {
179
- function resolve(token) {
180
- self.storeToken(token);
181
- r(token);
182
- }
183
- function reject(error) {
184
- self.removeToken();
185
- x(error);
186
- }
187
- self.getTokenFromUser(resolve, reject);
188
- });
186
+ tokenPromise = new Promise((resolve, reject) => self.getTokenFromUser(token => {
187
+ self.storeToken(token);
188
+ resolve(token);
189
+ }, error => {
190
+ self.removeToken();
191
+ reject(error);
192
+ }));
189
193
  return tokenPromise;
190
194
  },
191
195
  };
@@ -195,17 +199,21 @@ exports.InternetAccount = mobx_state_tree_1.types
195
199
  * #action
196
200
  */
197
201
  addAuthHeaderToInit(init = {}, token) {
198
- const tokenInfoString = self.tokenType
199
- ? `${self.tokenType} ${token}`
200
- : token;
201
- const newHeaders = new Headers(init.headers || {});
202
- newHeaders.append(self.authHeader, tokenInfoString);
203
- return { ...init, headers: newHeaders };
202
+ return {
203
+ ...init,
204
+ headers: new Headers({
205
+ ...init.headers,
206
+ [self.authHeader]: self.tokenType
207
+ ? `${self.tokenType} ${token}`
208
+ : token,
209
+ }),
210
+ };
204
211
  },
205
212
  /**
206
213
  * #action
207
214
  * Gets the token and returns it along with the information needed to
208
215
  * create a new internetAccount.
216
+ *
209
217
  * @param location - UriLocation of the resource
210
218
  * @returns
211
219
  */
@@ -221,7 +229,10 @@ exports.InternetAccount = mobx_state_tree_1.types
221
229
  }
222
230
  return {
223
231
  internetAccountType: self.type,
224
- authInfo: { token: validatedToken, configuration: (0, configuration_1.getConf)(self) },
232
+ authInfo: {
233
+ token: validatedToken,
234
+ configuration: (0, configuration_1.getConf)(self),
235
+ },
225
236
  };
226
237
  },
227
238
  }))
@@ -231,6 +242,7 @@ exports.InternetAccount = mobx_state_tree_1.types
231
242
  * Get a fetch method that will add any needed authentication headers to
232
243
  * the request before sending it. If location is provided, it will be
233
244
  * checked to see if it includes a token in it pre-auth information.
245
+ *
234
246
  * @param loc - UriLocation of the resource
235
247
  * @returns A function that can be used to fetch
236
248
  */
@@ -1,2 +1,22 @@
1
- declare const _default: import("../../configuration").AnyConfigurationSchemaType;
2
- export default _default;
1
+ import type { Instance } from 'mobx-state-tree';
2
+ declare const BaseConnectionConfig: import("../../configuration/configurationSchema").ConfigurationSchemaType<{
3
+ /**
4
+ * #slot
5
+ */
6
+ name: {
7
+ type: string;
8
+ defaultValue: string;
9
+ description: string;
10
+ };
11
+ /**
12
+ * #slot
13
+ */
14
+ assemblyNames: {
15
+ type: string;
16
+ defaultValue: never[];
17
+ description: string;
18
+ };
19
+ }, import("../../configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>;
20
+ export default BaseConnectionConfig;
21
+ export type BaseConnectionConfigSchema = typeof BaseConnectionConfig;
22
+ export type BaseConnectionConfigModel = Instance<BaseConnectionConfigSchema>;
@@ -5,7 +5,7 @@ const configuration_1 = require("../../configuration");
5
5
  * #config BaseConnection
6
6
  */
7
7
  function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
8
- exports.default = (0, configuration_1.ConfigurationSchema)('BaseConnection', {
8
+ const BaseConnectionConfig = (0, configuration_1.ConfigurationSchema)('BaseConnection', {
9
9
  /**
10
10
  * #slot
11
11
  */
@@ -29,3 +29,4 @@ exports.default = (0, configuration_1.ConfigurationSchema)('BaseConnection', {
29
29
  */
30
30
  explicitIdentifier: 'connectionId',
31
31
  });
32
+ exports.default = BaseConnectionConfig;
@@ -1 +1,42 @@
1
- export declare const BaseInternetAccountConfig: import("../../configuration").AnyConfigurationSchemaType;
1
+ export declare const BaseInternetAccountConfig: import("../../configuration/configurationSchema").ConfigurationSchemaType<{
2
+ /**
3
+ * #slot
4
+ */
5
+ name: {
6
+ description: string;
7
+ type: string;
8
+ defaultValue: string;
9
+ };
10
+ /**
11
+ * #slot
12
+ */
13
+ description: {
14
+ description: string;
15
+ type: string;
16
+ defaultValue: string;
17
+ };
18
+ /**
19
+ * #slot
20
+ */
21
+ authHeader: {
22
+ description: string;
23
+ type: string;
24
+ defaultValue: string;
25
+ };
26
+ /**
27
+ * #slot
28
+ */
29
+ tokenType: {
30
+ description: string;
31
+ type: string;
32
+ defaultValue: string;
33
+ };
34
+ /**
35
+ * #slot
36
+ */
37
+ domains: {
38
+ description: string;
39
+ type: string;
40
+ defaultValue: never[];
41
+ };
42
+ }, import("../../configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BaseInternetAccountConfig = void 0;
4
4
  const configuration_1 = require("../../configuration");
5
5
  /**
6
- * #config InternetAccount
6
+ * #config BaseInternetAccount
7
7
  * the "base" internet account type
8
8
  */
9
9
  function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
@@ -3,6 +3,123 @@ import PluginManager from '../../PluginManager';
3
3
  /**
4
4
  * #config BaseTrack
5
5
  */
6
- export declare function createBaseTrackConfig(pluginManager: PluginManager): import("../../configuration").AnyConfigurationSchemaType;
7
- export type BaseTrackConfigModel = ReturnType<typeof createBaseTrackConfig>;
8
- export type BaseTrackConfig = Instance<BaseTrackConfigModel>;
6
+ export declare function createBaseTrackConfig(pluginManager: PluginManager): import("../../configuration/configurationSchema").ConfigurationSchemaType<{
7
+ /**
8
+ * #slot
9
+ */
10
+ name: {
11
+ description: string;
12
+ type: string;
13
+ defaultValue: string;
14
+ };
15
+ /**
16
+ * #slot
17
+ */
18
+ assemblyNames: {
19
+ description: string;
20
+ type: string;
21
+ defaultValue: string[];
22
+ };
23
+ /**
24
+ * #slot
25
+ */
26
+ description: {
27
+ description: string;
28
+ type: string;
29
+ defaultValue: string;
30
+ };
31
+ /**
32
+ * #slot
33
+ */
34
+ category: {
35
+ description: string;
36
+ type: string;
37
+ defaultValue: never[];
38
+ };
39
+ /**
40
+ * #slot
41
+ */
42
+ metadata: {
43
+ type: string;
44
+ description: string;
45
+ defaultValue: {};
46
+ };
47
+ /**
48
+ * #slot
49
+ */
50
+ adapter: import("mobx-state-tree").IAnyModelType;
51
+ textSearching: import("../../configuration/configurationSchema").ConfigurationSchemaType<{
52
+ /**
53
+ * #slot textSearching.indexedAttributes
54
+ */
55
+ indexingAttributes: {
56
+ type: string;
57
+ description: string;
58
+ defaultValue: string[];
59
+ };
60
+ /**
61
+ * #slot textSearching.indexingFeatureTypesToExclude
62
+ */
63
+ indexingFeatureTypesToExclude: {
64
+ type: string;
65
+ description: string;
66
+ defaultValue: string[];
67
+ };
68
+ /**
69
+ * #slot textSearching.textSearchAdapter
70
+ */
71
+ textSearchAdapter: import("mobx-state-tree").IAnyModelType;
72
+ }, import("../../configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
73
+ /**
74
+ * #slot
75
+ */
76
+ displays: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
77
+ formatDetails: import("../../configuration/configurationSchema").ConfigurationSchemaType<{
78
+ /**
79
+ * #slot formatDetails.feature
80
+ */
81
+ feature: {
82
+ type: string;
83
+ description: string;
84
+ defaultValue: {};
85
+ contextVariable: string[];
86
+ };
87
+ /**
88
+ * #slot formatDetails.subfeatures
89
+ */
90
+ subfeatures: {
91
+ type: string;
92
+ description: string;
93
+ defaultValue: {};
94
+ contextVariable: string[];
95
+ };
96
+ /**
97
+ * #slot formatDetails.depth
98
+ */
99
+ depth: {
100
+ type: string;
101
+ defaultValue: number;
102
+ description: string;
103
+ };
104
+ }, import("../../configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
105
+ formatAbout: import("../../configuration/configurationSchema").ConfigurationSchemaType<{
106
+ /**
107
+ * #slot formatAbout.config
108
+ */
109
+ config: {
110
+ type: string;
111
+ description: string;
112
+ defaultValue: {};
113
+ contextVariable: string[];
114
+ };
115
+ /**
116
+ * #slot formatAbout.hideUris
117
+ */
118
+ hideUris: {
119
+ type: string;
120
+ defaultValue: boolean;
121
+ };
122
+ }, import("../../configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
123
+ }, import("../../configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "trackId">>;
124
+ export type BaseTrackConfigSchema = ReturnType<typeof createBaseTrackConfig>;
125
+ export type BaseTrackConfig = Instance<BaseTrackConfigSchema>;
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createBaseTrackConfig = void 0;
4
- /* eslint-disable @typescript-eslint/no-explicit-any */
5
4
  const mobx_state_tree_1 = require("mobx-state-tree");
6
5
  const configuration_1 = require("../../configuration");
7
6
  /**
@@ -126,15 +125,15 @@ function createBaseTrackConfig(pluginManager) {
126
125
  },
127
126
  }),
128
127
  }, {
129
- preProcessSnapshot: s => {
130
- const snap = JSON.parse(JSON.stringify(s));
128
+ preProcessSnapshot: s2 => {
129
+ const snap = pluginManager.evaluateExtensionPoint('Core-preProcessTrackConfig', JSON.parse(JSON.stringify(s2)));
131
130
  const displayTypes = new Set();
132
131
  const { displays = [] } = snap;
133
132
  if (snap.trackId !== 'placeholderId') {
134
133
  // Gets the displays on the track snapshot and the possible displays
135
134
  // from the track type and adds any missing possible displays to the
136
135
  // snapshot
137
- displays.forEach((d) => d && displayTypes.add(d.type));
136
+ displays.forEach(d => d && displayTypes.add(d.type));
138
137
  const trackType = pluginManager.getTrackType(snap.type);
139
138
  trackType.displayTypes.forEach(displayType => {
140
139
  if (!displayTypes.has(displayType.name)) {
@@ -152,13 +151,16 @@ function createBaseTrackConfig(pluginManager) {
152
151
  */
153
152
  explicitIdentifier: 'trackId',
154
153
  explicitlyTyped: true,
154
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
155
155
  actions: (self) => ({
156
156
  addDisplayConf(conf) {
157
157
  const { type } = conf;
158
158
  if (!type) {
159
159
  throw new Error(`unknown display type ${type}`);
160
160
  }
161
- const display = self.displays.find((d) => (d === null || d === void 0 ? void 0 : d.displayId) === conf.displayId);
161
+ const display = self.displays.find(
162
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
163
+ (d) => (d === null || d === void 0 ? void 0 : d.displayId) === conf.displayId);
162
164
  if (display) {
163
165
  return display;
164
166
  }
@@ -10,4 +10,4 @@ export { BaseInternetAccountConfig } from './baseInternetAccountConfig';
10
10
  export { createBaseTrackModel } from './BaseTrackModel';
11
11
  export type { BaseTrackModel, BaseTrackStateModel } from './BaseTrackModel';
12
12
  export { createBaseTrackConfig } from './baseTrackConfig';
13
- export type { BaseTrackConfig, BaseTrackConfigModel } from './baseTrackConfig';
13
+ export type { BaseTrackConfig, BaseTrackConfigSchema as BaseTrackConfigModel, } from './baseTrackConfig';
@@ -113,8 +113,7 @@ class BoxRendererType extends FeatureRendererType_1.default {
113
113
  createLayoutInWorker(args) {
114
114
  const { regions } = args;
115
115
  const session = this.getWorkerSession(args);
116
- const subLayout = session.layout.getSublayout(regions[0].refName);
117
- return subLayout;
116
+ return session.layout.getSublayout(regions[0].refName);
118
117
  }
119
118
  serializeResultsInWorker(results, args) {
120
119
  const serialized = super.serializeResultsInWorker(results, args);
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { SimpleFeature, SimpleFeatureSerialized } from '../../util';
3
3
  import FeatureRenderer from './FeatureRendererType';
4
4
  export default class CircularChordRendererType extends FeatureRenderer {
@@ -17,7 +17,7 @@ export default class CircularChordRendererType extends FeatureRenderer {
17
17
  } | {
18
18
  features: Map<string, SimpleFeature>;
19
19
  blockKey: string;
20
- reactElement: JSX.Element;
20
+ reactElement: React.JSX.Element;
21
21
  html: string;
22
22
  };
23
23
  }
@@ -1,7 +1,7 @@
1
1
  import { Feature, SimpleFeatureSerialized } from '../../util/simpleFeature';
2
2
  import { AugmentedRegion as Region } from '../../util/types';
3
3
  import ServerSideRendererType, { RenderArgs as ServerSideRenderArgs, RenderArgsSerialized as ServerSideRenderArgsSerialized, RenderArgsDeserialized as ServerSideRenderArgsDeserialized, RenderResults as ServerSideRenderResults, ResultsDeserialized as ServerSideResultsDeserialized, ResultsSerialized as ServerSideResultsSerialized } from './ServerSideRendererType';
4
- import { AnyConfigurationModel } from '../../configuration/configurationSchema';
4
+ import { AnyConfigurationModel } from '../../configuration';
5
5
  export interface RenderArgs extends ServerSideRenderArgs {
6
6
  displayModel: {
7
7
  id: string;
@@ -87,5 +87,7 @@ export default class FeatureRendererType extends ServerSideRendererType {
87
87
  *
88
88
  * @param props - render args
89
89
  */
90
- render(props: RenderArgsDeserialized): Promise<RenderResults>;
90
+ render(props: RenderArgsDeserialized & {
91
+ features?: Map<string, Feature>;
92
+ }): Promise<RenderResults>;
91
93
  }
@@ -120,10 +120,9 @@ class FeatureRendererType extends ServerSideRendererType_1.default {
120
120
  * @returns true if this feature passes all configured filters
121
121
  */
122
122
  featurePassesFilters(renderArgs, feature) {
123
- if (!renderArgs.filters) {
124
- return true;
125
- }
126
- return renderArgs.filters.passes(feature, renderArgs);
123
+ return renderArgs.filters
124
+ ? renderArgs.filters.passes(feature, renderArgs)
125
+ : true;
127
126
  }
128
127
  /**
129
128
  * gets features and renders
@@ -131,8 +130,7 @@ class FeatureRendererType extends ServerSideRendererType_1.default {
131
130
  * @param props - render args
132
131
  */
133
132
  async render(props) {
134
- const features = props.features ||
135
- (await this.getFeatures(props));
133
+ const features = props.features || (await this.getFeatures(props));
136
134
  const result = await super.render({ ...props, features });
137
135
  return { ...result, features };
138
136
  }
@@ -1,6 +1,6 @@
1
1
  import { ReactElement } from 'react';
2
2
  import PluggableElementBase from '../PluggableElementBase';
3
- import { AnyConfigurationSchemaType } from '../../configuration/configurationSchema';
3
+ import { AnyConfigurationSchemaType } from '../../configuration';
4
4
  import { AnyReactComponentType } from '../../util';
5
5
  import PluginManager from '../../PluginManager';
6
6
  export type RenderProps = Record<string, unknown>;
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { AnyReactComponentType, Feature } from '../../util';
3
3
  declare const _default: (props: {
4
4
  html: string;
5
5
  features: Map<string, Feature>;
6
6
  RenderingComponent: AnyReactComponentType;
7
- }) => JSX.Element;
7
+ }) => React.JSX.Element;
8
8
  export default _default;
@@ -3,5 +3,5 @@ import { ResultsSerialized, RenderArgs } from './ServerSideRendererType';
3
3
  interface Props extends ResultsSerialized, RenderArgs {
4
4
  RenderingComponent: React.ComponentType<any>;
5
5
  }
6
- export default function ({ theme, html, RenderingComponent, ...rest }: Props): JSX.Element;
6
+ export default function ({ theme, html, RenderingComponent, ...rest }: Props): React.JSX.Element;
7
7
  export {};
@@ -1,7 +1,7 @@
1
1
  import { ThemeOptions } from '@mui/material';
2
2
  import { SnapshotOrInstance, SnapshotIn } from 'mobx-state-tree';
3
3
  import SerializableFilterChain, { SerializedFilterChain } from './util/serializableFilterChain';
4
- import { AnyConfigurationModel } from '../../configuration/configurationSchema';
4
+ import { AnyConfigurationModel } from '../../configuration';
5
5
  import RpcManager from '../../rpc/RpcManager';
6
6
  import RendererType, { RenderProps, RenderResults } from './RendererType';
7
7
  interface BaseRenderArgs extends RenderProps {
@@ -6,13 +6,7 @@ const util_1 = require("../util");
6
6
  const remoteAbortSignals_1 = require("./remoteAbortSignals");
7
7
  const configuration_1 = require("../configuration");
8
8
  function isClonable(thing) {
9
- if (typeof thing === 'function') {
10
- return false;
11
- }
12
- if (thing instanceof Error) {
13
- return false;
14
- }
15
- return true;
9
+ return !(typeof thing === 'function') && !(thing instanceof Error);
16
10
  }
17
11
  // watches the given worker object, returns a promise that will be rejected if
18
12
  // the worker times out
@@ -15,7 +15,14 @@ export default class RpcManager {
15
15
  pluginManager: PluginManager;
16
16
  mainConfiguration: AnyConfigurationModel;
17
17
  backendConfigurations: BackendConfigurations;
18
- static configSchema: import("../configuration").AnyConfigurationSchemaType;
18
+ static configSchema: import("../configuration/configurationSchema").ConfigurationSchemaType<{
19
+ defaultDriver: {
20
+ type: string;
21
+ description: string;
22
+ defaultValue: string;
23
+ };
24
+ drivers: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IMapType<import("mobx-state-tree").ITypeUnion<import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> | undefined, import("mobx-state-tree").ModelSnapshotType<Record<string, any>>, ({} & Partial<import("mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> & import("mobx-state-tree/dist/internal").NonEmptyObject) | undefined>>, [undefined]>;
25
+ }, import("../configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
19
26
  driverObjects: Map<string, DriverClass>;
20
27
  constructor(pluginManager: PluginManager, mainConfiguration: AnyConfigurationModel, backendConfigurations: BackendConfigurations);
21
28
  getDriver(backendName: keyof typeof DriverClasses): DriverClass;
package/rpc/RpcManager.js CHANGED
@@ -64,5 +64,5 @@ class RpcManager {
64
64
  return driverForCall.call(this.pluginManager, sessionId, functionName, args, opts);
65
65
  }
66
66
  }
67
- exports.default = RpcManager;
68
67
  RpcManager.configSchema = configSchema_1.default;
68
+ exports.default = RpcManager;
@@ -1,2 +1,11 @@
1
- declare const BaseRpcDriverConfigSchema: import("../configuration").AnyConfigurationSchemaType;
1
+ declare const BaseRpcDriverConfigSchema: import("../configuration/configurationSchema").ConfigurationSchemaType<{
2
+ /**
3
+ * #slot
4
+ */
5
+ workerCount: {
6
+ type: string;
7
+ description: string;
8
+ defaultValue: number;
9
+ };
10
+ }, import("../configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
2
11
  export default BaseRpcDriverConfigSchema;
@@ -1,2 +1,15 @@
1
- declare const _default: import("../configuration").AnyConfigurationSchemaType;
1
+ declare const _default: import("../configuration/configurationSchema").ConfigurationSchemaType<{
2
+ /**
3
+ * #slot
4
+ */
5
+ defaultDriver: {
6
+ type: string;
7
+ description: string;
8
+ defaultValue: string;
9
+ };
10
+ /**
11
+ * #slot
12
+ */
13
+ drivers: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IMapType<import("mobx-state-tree").ITypeUnion<import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> | undefined, import("mobx-state-tree").ModelSnapshotType<Record<string, any>>, ({} & Partial<import("mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> & import("mobx-state-tree/dist/internal").NonEmptyObject) | undefined>>, [undefined]>;
14
+ }, import("../configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
2
15
  export default _default;