@jbrowse/plugin-authentication 2.6.2 → 2.7.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.
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { SvgIconProps } from '@mui/material';
3
+ export default function DropboxIcon(props: SvgIconProps): React.JSX.Element;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const material_1 = require("@mui/material");
8
+ function DropboxIcon(props) {
9
+ return (react_1.default.createElement(material_1.SvgIcon, { ...props },
10
+ react_1.default.createElement("path", { d: "M3 6.2L8 9.39L13 6.2L8 3L3 6.2M13 6.2L18 9.39L23 6.2L18 3L13 6.2M3 12.55L8 15.74L13 12.55L8 9.35L3 12.55M18 9.35L13 12.55L18 15.74L23 12.55L18 9.35M8.03 16.8L13.04 20L18.04 16.8L13.04 13.61L8.03 16.8Z" })));
11
+ }
12
+ exports.default = DropboxIcon;
@@ -1,8 +1,6 @@
1
1
  import React from 'react';
2
2
  import { UriLocation } from '@jbrowse/core/util/types';
3
- import { SvgIconProps } from '@mui/material';
4
3
  import { Instance } from 'mobx-state-tree';
5
- export declare function DropboxIcon(props: SvgIconProps): React.JSX.Element;
6
4
  /**
7
5
  * #stateModel DropboxOAuthInternetAccount
8
6
  */
@@ -19,7 +17,10 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
19
17
  };
20
18
  needsPKCE: {
21
19
  description: string;
22
- type: string;
20
+ type: string; /**
21
+ * #getter
22
+ * The FileSelector icon for Dropbox
23
+ */
23
24
  defaultValue: boolean;
24
25
  };
25
26
  domains: {
@@ -52,7 +53,9 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
52
53
  description: string;
53
54
  type: string;
54
55
  defaultValue: string;
55
- };
56
+ }; /**
57
+ * #method
58
+ */
56
59
  scopes: {
57
60
  description: string;
58
61
  type: string;
@@ -81,7 +84,9 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
81
84
  };
82
85
  authHeader: {
83
86
  description: string;
84
- type: string;
87
+ type: string; /**
88
+ * #stateModel DropboxOAuthInternetAccount
89
+ */
85
90
  defaultValue: string;
86
91
  };
87
92
  tokenType: {
@@ -114,9 +119,7 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
114
119
  defaultValue: string;
115
120
  };
116
121
  tokenType: {
117
- description: string; /**
118
- * #property
119
- */
122
+ description: string;
120
123
  type: string;
121
124
  defaultValue: string;
122
125
  };
@@ -153,7 +156,9 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
153
156
  description: string;
154
157
  type: string;
155
158
  defaultValue: string;
156
- };
159
+ }; /**
160
+ * #method
161
+ */
157
162
  scopes: {
158
163
  description: string;
159
164
  type: string;
@@ -182,7 +187,9 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
182
187
  };
183
188
  authHeader: {
184
189
  description: string;
185
- type: string;
190
+ type: string; /**
191
+ * #stateModel DropboxOAuthInternetAccount
192
+ */
186
193
  defaultValue: string;
187
194
  };
188
195
  tokenType: {
@@ -217,7 +224,10 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
217
224
  };
218
225
  needsPKCE: {
219
226
  description: string;
220
- type: string;
227
+ type: string; /**
228
+ * #getter
229
+ * The FileSelector icon for Dropbox
230
+ */
221
231
  defaultValue: boolean;
222
232
  };
223
233
  domains: {
@@ -250,7 +260,9 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
250
260
  description: string;
251
261
  type: string;
252
262
  defaultValue: string;
253
- };
263
+ }; /**
264
+ * #method
265
+ */
254
266
  scopes: {
255
267
  description: string;
256
268
  type: string;
@@ -279,7 +291,9 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
279
291
  };
280
292
  authHeader: {
281
293
  description: string;
282
- type: string;
294
+ type: string; /**
295
+ * #stateModel DropboxOAuthInternetAccount
296
+ */
283
297
  defaultValue: string;
284
298
  };
285
299
  tokenType: {
@@ -294,9 +308,7 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
294
308
  };
295
309
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>, undefined>>;
296
310
  }, {
297
- readonly name: string; /**
298
- * #getter
299
- */
311
+ readonly name: string;
300
312
  readonly description: string;
301
313
  readonly internetAccountId: string;
302
314
  readonly authHeader: string;
@@ -309,11 +321,11 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
309
321
  handlesLocation(location: UriLocation): boolean;
310
322
  readonly tokenKey: string;
311
323
  } & {
312
- getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): void;
324
+ getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
313
325
  storeToken(token: string): void;
314
326
  removeToken(): void;
315
327
  retrieveToken(): string | null;
316
- validateToken(token: string, loc: UriLocation): Promise<string>;
328
+ validateToken(token: string, _loc: UriLocation): Promise<string>;
317
329
  } & {
318
330
  getToken(location?: UriLocation | undefined): Promise<string>;
319
331
  } & {
@@ -3,19 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.DropboxIcon = void 0;
7
6
  const react_1 = __importDefault(require("react"));
8
7
  const configuration_1 = require("@jbrowse/core/configuration");
9
- const material_1 = require("@mui/material");
10
8
  const mobx_state_tree_1 = require("mobx-state-tree");
11
9
  const model_1 = __importDefault(require("../OAuthModel/model"));
12
10
  const OAuthModel_1 = require("../OAuthModel");
13
11
  const util_1 = require("./util");
14
- function DropboxIcon(props) {
15
- return (react_1.default.createElement(material_1.SvgIcon, { ...props },
16
- react_1.default.createElement("path", { d: "M3 6.2L8 9.39L13 6.2L8 3L3 6.2M13 6.2L18 9.39L23 6.2L18 3L13 6.2M3 12.55L8 15.74L13 12.55L8 9.35L3 12.55M18 9.35L13 12.55L18 15.74L23 12.55L18 9.35M8.03 16.8L13.04 20L18.04 16.8L13.04 13.61L8.03 16.8Z" })));
17
- }
18
- exports.DropboxIcon = DropboxIcon;
12
+ const DropboxIcon_1 = __importDefault(require("./DropboxIcon"));
19
13
  /**
20
14
  * #stateModel DropboxOAuthInternetAccount
21
15
  */
@@ -38,7 +32,7 @@ const stateModelFactory = (configSchema) => {
38
32
  * The FileSelector icon for Dropbox
39
33
  */
40
34
  get toggleContents() {
41
- return react_1.default.createElement(DropboxIcon, null);
35
+ return react_1.default.createElement(DropboxIcon_1.default, null);
42
36
  },
43
37
  /**
44
38
  * #getter
@@ -112,11 +112,11 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
112
112
  handlesLocation(location: UriLocation): boolean;
113
113
  readonly tokenKey: string;
114
114
  } & {
115
- getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): void;
115
+ getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
116
116
  storeToken(token: string): void;
117
117
  removeToken(): void;
118
118
  retrieveToken(): string | null;
119
- validateToken(token: string, loc: UriLocation): Promise<string>;
119
+ validateToken(token: string, _loc: UriLocation): Promise<string>;
120
120
  } & {
121
121
  getToken(location?: UriLocation | undefined): Promise<string>;
122
122
  } & {
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { SvgIconProps } from '@mui/material';
3
+ export default function GoogleDriveIcon(props: SvgIconProps): React.JSX.Element;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const material_1 = require("@mui/material");
8
+ function GoogleDriveIcon(props) {
9
+ return (react_1.default.createElement(material_1.SvgIcon, { ...props },
10
+ react_1.default.createElement("path", { d: "M7.71,3.5L1.15,15L4.58,21L11.13,9.5M9.73,15L6.3,21H19.42L22.85,15M22.28,14L15.42,2H8.58L8.57,2L15.43,14H22.28Z" })));
11
+ }
12
+ exports.default = GoogleDriveIcon;
@@ -106,7 +106,9 @@ export default function stateModelFactory(configSchema: GoogleDriveOAuthInternet
106
106
  domains: {
107
107
  description: string;
108
108
  type: string;
109
- defaultValue: never[];
109
+ defaultValue: never[]; /**
110
+ * #stateModel GoogleDriveOAuthInternetAccount
111
+ */
110
112
  };
111
113
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>;
112
114
  } & {
@@ -203,7 +205,9 @@ export default function stateModelFactory(configSchema: GoogleDriveOAuthInternet
203
205
  domains: {
204
206
  description: string;
205
207
  type: string;
206
- defaultValue: never[];
208
+ defaultValue: never[]; /**
209
+ * #stateModel GoogleDriveOAuthInternetAccount
210
+ */
207
211
  };
208
212
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>, undefined>>;
209
213
  }, {
@@ -220,11 +224,11 @@ export default function stateModelFactory(configSchema: GoogleDriveOAuthInternet
220
224
  handlesLocation(location: UriLocation): boolean;
221
225
  readonly tokenKey: string;
222
226
  } & {
223
- getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): void;
227
+ getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
224
228
  storeToken(token: string): void;
225
229
  removeToken(): void;
226
230
  retrieveToken(): string | null;
227
- validateToken(token: string, loc: UriLocation): Promise<string>;
231
+ validateToken(token: string, _loc: UriLocation): Promise<string>;
228
232
  } & {
229
233
  getToken(location?: UriLocation | undefined): Promise<string>;
230
234
  } & {
@@ -258,9 +262,7 @@ export default function stateModelFactory(configSchema: GoogleDriveOAuthInternet
258
262
  readonly codeVerifierPKCE: string;
259
263
  } & {
260
264
  readonly authEndpoint: string;
261
- readonly tokenEndpoint: string; /**
262
- * #method
263
- */
265
+ readonly tokenEndpoint: string;
264
266
  readonly needsPKCE: boolean;
265
267
  readonly clientId: string;
266
268
  readonly scopes: string;
@@ -6,15 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const react_1 = __importDefault(require("react"));
7
7
  const configuration_1 = require("@jbrowse/core/configuration");
8
8
  const mobx_state_tree_1 = require("mobx-state-tree");
9
- const material_1 = require("@mui/material");
10
9
  const model_1 = __importDefault(require("../OAuthModel/model"));
11
10
  const OAuthModel_1 = require("../OAuthModel");
12
11
  const util_1 = require("./util");
13
12
  const GoogleDriveFilehandle_1 = require("./GoogleDriveFilehandle");
14
- function GoogleDriveIcon(props) {
15
- return (react_1.default.createElement(material_1.SvgIcon, { ...props },
16
- react_1.default.createElement("path", { d: "M7.71,3.5L1.15,15L4.58,21L11.13,9.5M9.73,15L6.3,21H19.42L22.85,15M22.28,14L15.42,2H8.58L8.57,2L15.43,14H22.28Z" })));
17
- }
13
+ const GoogleDriveIcon_1 = __importDefault(require("./GoogleDriveIcon"));
18
14
  function getUri(str) {
19
15
  const urlId = str.match(/[-\w]{25,}/);
20
16
  return `https://www.googleapis.com/drive/v3/files/${urlId}`;
@@ -41,7 +37,7 @@ function stateModelFactory(configSchema) {
41
37
  * The FileSelector icon for Google drive
42
38
  */
43
39
  get toggleContents() {
44
- return react_1.default.createElement(GoogleDriveIcon, null);
40
+ return react_1.default.createElement(GoogleDriveIcon_1.default, null);
45
41
  },
46
42
  /**
47
43
  * #getter
@@ -145,11 +145,11 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
145
145
  handlesLocation(location: UriLocation): boolean;
146
146
  readonly tokenKey: string;
147
147
  } & {
148
- getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): void;
148
+ getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
149
149
  storeToken(token: string): void;
150
150
  removeToken(): void;
151
151
  retrieveToken(): string | null;
152
- validateToken(token: string, loc: UriLocation): Promise<string>;
152
+ validateToken(token: string, _loc: UriLocation): Promise<string>;
153
153
  } & {
154
154
  getToken(location?: UriLocation | undefined): Promise<string>;
155
155
  } & {
@@ -201,11 +201,11 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
201
201
  handlesLocation(location: UriLocation): boolean;
202
202
  readonly tokenKey: string;
203
203
  } & {
204
- getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): void;
204
+ getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
205
205
  storeToken(token: string): void;
206
206
  removeToken(): void;
207
207
  retrieveToken(): string | null;
208
- validateToken(token: string, loc: UriLocation): Promise<string>;
208
+ validateToken(token: string, _loc: UriLocation): Promise<string>;
209
209
  } & {
210
210
  getToken(location?: UriLocation | undefined): Promise<string>;
211
211
  } & {
@@ -227,10 +227,7 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
227
227
  getPreAuthorizationInformation(location: UriLocation): Promise<{
228
228
  internetAccountType: string;
229
229
  authInfo: {
230
- token: string; /**
231
- * #action
232
- * used to listen to child window for auth code/token
233
- */
230
+ token: string;
234
231
  configuration: any;
235
232
  };
236
233
  }>;
package/dist/index.d.ts CHANGED
@@ -254,11 +254,11 @@ export default class AuthenticationPlugin extends Plugin {
254
254
  handlesLocation(location: import("@jbrowse/core/util").UriLocation): boolean;
255
255
  readonly tokenKey: string;
256
256
  } & {
257
- getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): void;
257
+ getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
258
258
  storeToken(token: string): void;
259
259
  removeToken(): void;
260
260
  retrieveToken(): string | null;
261
- validateToken(token: string, loc: import("@jbrowse/core/util").UriLocation): Promise<string>;
261
+ validateToken(token: string, _loc: import("@jbrowse/core/util").UriLocation): Promise<string>;
262
262
  } & {
263
263
  getToken(location?: import("@jbrowse/core/util").UriLocation | undefined): Promise<string>;
264
264
  } & {
@@ -459,11 +459,11 @@ export default class AuthenticationPlugin extends Plugin {
459
459
  handlesLocation(location: import("@jbrowse/core/util").UriLocation): boolean;
460
460
  readonly tokenKey: string;
461
461
  } & {
462
- getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): void;
462
+ getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
463
463
  storeToken(token: string): void;
464
464
  removeToken(): void;
465
465
  retrieveToken(): string | null;
466
- validateToken(token: string, loc: import("@jbrowse/core/util").UriLocation): Promise<string>;
466
+ validateToken(token: string, _loc: import("@jbrowse/core/util").UriLocation): Promise<string>;
467
467
  } & {
468
468
  getToken(location?: import("@jbrowse/core/util").UriLocation | undefined): Promise<string>;
469
469
  } & {
@@ -658,11 +658,11 @@ export default class AuthenticationPlugin extends Plugin {
658
658
  handlesLocation(location: import("@jbrowse/core/util").UriLocation): boolean;
659
659
  readonly tokenKey: string;
660
660
  } & {
661
- getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): void;
661
+ getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
662
662
  storeToken(token: string): void;
663
663
  removeToken(): void;
664
664
  retrieveToken(): string | null;
665
- validateToken(token: string, loc: import("@jbrowse/core/util").UriLocation): Promise<string>;
665
+ validateToken(token: string, _loc: import("@jbrowse/core/util").UriLocation): Promise<string>;
666
666
  } & {
667
667
  getToken(location?: import("@jbrowse/core/util").UriLocation | undefined): Promise<string>;
668
668
  } & {
@@ -1080,11 +1080,11 @@ export default class AuthenticationPlugin extends Plugin {
1080
1080
  handlesLocation(location: import("@jbrowse/core/util").UriLocation): boolean;
1081
1081
  readonly tokenKey: string;
1082
1082
  } & {
1083
- getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): void;
1083
+ getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
1084
1084
  storeToken(token: string): void;
1085
1085
  removeToken(): void;
1086
1086
  retrieveToken(): string | null;
1087
- validateToken(token: string, loc: import("@jbrowse/core/util").UriLocation): Promise<string>;
1087
+ validateToken(token: string, _loc: import("@jbrowse/core/util").UriLocation): Promise<string>;
1088
1088
  } & {
1089
1089
  getToken(location?: import("@jbrowse/core/util").UriLocation | undefined): Promise<string>;
1090
1090
  } & {
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { SvgIconProps } from '@mui/material';
3
+ export default function DropboxIcon(props: SvgIconProps): React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { SvgIcon } from '@mui/material';
3
+ export default function DropboxIcon(props) {
4
+ return (React.createElement(SvgIcon, { ...props },
5
+ React.createElement("path", { d: "M3 6.2L8 9.39L13 6.2L8 3L3 6.2M13 6.2L18 9.39L23 6.2L18 3L13 6.2M3 12.55L8 15.74L13 12.55L8 9.35L3 12.55M18 9.35L13 12.55L18 15.74L23 12.55L18 9.35M8.03 16.8L13.04 20L18.04 16.8L13.04 13.61L8.03 16.8Z" })));
6
+ }
@@ -1,8 +1,6 @@
1
1
  import React from 'react';
2
2
  import { UriLocation } from '@jbrowse/core/util/types';
3
- import { SvgIconProps } from '@mui/material';
4
3
  import { Instance } from 'mobx-state-tree';
5
- export declare function DropboxIcon(props: SvgIconProps): React.JSX.Element;
6
4
  /**
7
5
  * #stateModel DropboxOAuthInternetAccount
8
6
  */
@@ -19,7 +17,10 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
19
17
  };
20
18
  needsPKCE: {
21
19
  description: string;
22
- type: string;
20
+ type: string; /**
21
+ * #getter
22
+ * The FileSelector icon for Dropbox
23
+ */
23
24
  defaultValue: boolean;
24
25
  };
25
26
  domains: {
@@ -52,7 +53,9 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
52
53
  description: string;
53
54
  type: string;
54
55
  defaultValue: string;
55
- };
56
+ }; /**
57
+ * #method
58
+ */
56
59
  scopes: {
57
60
  description: string;
58
61
  type: string;
@@ -81,7 +84,9 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
81
84
  };
82
85
  authHeader: {
83
86
  description: string;
84
- type: string;
87
+ type: string; /**
88
+ * #stateModel DropboxOAuthInternetAccount
89
+ */
85
90
  defaultValue: string;
86
91
  };
87
92
  tokenType: {
@@ -114,9 +119,7 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
114
119
  defaultValue: string;
115
120
  };
116
121
  tokenType: {
117
- description: string; /**
118
- * #property
119
- */
122
+ description: string;
120
123
  type: string;
121
124
  defaultValue: string;
122
125
  };
@@ -153,7 +156,9 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
153
156
  description: string;
154
157
  type: string;
155
158
  defaultValue: string;
156
- };
159
+ }; /**
160
+ * #method
161
+ */
157
162
  scopes: {
158
163
  description: string;
159
164
  type: string;
@@ -182,7 +187,9 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
182
187
  };
183
188
  authHeader: {
184
189
  description: string;
185
- type: string;
190
+ type: string; /**
191
+ * #stateModel DropboxOAuthInternetAccount
192
+ */
186
193
  defaultValue: string;
187
194
  };
188
195
  tokenType: {
@@ -217,7 +224,10 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
217
224
  };
218
225
  needsPKCE: {
219
226
  description: string;
220
- type: string;
227
+ type: string; /**
228
+ * #getter
229
+ * The FileSelector icon for Dropbox
230
+ */
221
231
  defaultValue: boolean;
222
232
  };
223
233
  domains: {
@@ -250,7 +260,9 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
250
260
  description: string;
251
261
  type: string;
252
262
  defaultValue: string;
253
- };
263
+ }; /**
264
+ * #method
265
+ */
254
266
  scopes: {
255
267
  description: string;
256
268
  type: string;
@@ -279,7 +291,9 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
279
291
  };
280
292
  authHeader: {
281
293
  description: string;
282
- type: string;
294
+ type: string; /**
295
+ * #stateModel DropboxOAuthInternetAccount
296
+ */
283
297
  defaultValue: string;
284
298
  };
285
299
  tokenType: {
@@ -294,9 +308,7 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
294
308
  };
295
309
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>, undefined>>;
296
310
  }, {
297
- readonly name: string; /**
298
- * #getter
299
- */
311
+ readonly name: string;
300
312
  readonly description: string;
301
313
  readonly internetAccountId: string;
302
314
  readonly authHeader: string;
@@ -309,11 +321,11 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
309
321
  handlesLocation(location: UriLocation): boolean;
310
322
  readonly tokenKey: string;
311
323
  } & {
312
- getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): void;
324
+ getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
313
325
  storeToken(token: string): void;
314
326
  removeToken(): void;
315
327
  retrieveToken(): string | null;
316
- validateToken(token: string, loc: UriLocation): Promise<string>;
328
+ validateToken(token: string, _loc: UriLocation): Promise<string>;
317
329
  } & {
318
330
  getToken(location?: UriLocation | undefined): Promise<string>;
319
331
  } & {
@@ -1,14 +1,10 @@
1
1
  import React from 'react';
2
2
  import { ConfigurationReference } from '@jbrowse/core/configuration';
3
- import { SvgIcon } from '@mui/material';
4
3
  import { types } from 'mobx-state-tree';
5
4
  import baseModel from '../OAuthModel/model';
6
5
  import { configSchema as OAuthConfigSchema } from '../OAuthModel';
7
6
  import { getDescriptiveErrorMessage } from './util';
8
- export function DropboxIcon(props) {
9
- return (React.createElement(SvgIcon, { ...props },
10
- React.createElement("path", { d: "M3 6.2L8 9.39L13 6.2L8 3L3 6.2M13 6.2L18 9.39L23 6.2L18 3L13 6.2M3 12.55L8 15.74L13 12.55L8 9.35L3 12.55M18 9.35L13 12.55L18 15.74L23 12.55L18 9.35M8.03 16.8L13.04 20L18.04 16.8L13.04 13.61L8.03 16.8Z" })));
11
- }
7
+ import DropboxIcon from './DropboxIcon';
12
8
  /**
13
9
  * #stateModel DropboxOAuthInternetAccount
14
10
  */
@@ -112,11 +112,11 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
112
112
  handlesLocation(location: UriLocation): boolean;
113
113
  readonly tokenKey: string;
114
114
  } & {
115
- getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): void;
115
+ getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
116
116
  storeToken(token: string): void;
117
117
  removeToken(): void;
118
118
  retrieveToken(): string | null;
119
- validateToken(token: string, loc: UriLocation): Promise<string>;
119
+ validateToken(token: string, _loc: UriLocation): Promise<string>;
120
120
  } & {
121
121
  getToken(location?: UriLocation | undefined): Promise<string>;
122
122
  } & {
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { SvgIconProps } from '@mui/material';
3
+ export default function GoogleDriveIcon(props: SvgIconProps): React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { SvgIcon } from '@mui/material';
3
+ export default function GoogleDriveIcon(props) {
4
+ return (React.createElement(SvgIcon, { ...props },
5
+ React.createElement("path", { d: "M7.71,3.5L1.15,15L4.58,21L11.13,9.5M9.73,15L6.3,21H19.42L22.85,15M22.28,14L15.42,2H8.58L8.57,2L15.43,14H22.28Z" })));
6
+ }
@@ -106,7 +106,9 @@ export default function stateModelFactory(configSchema: GoogleDriveOAuthInternet
106
106
  domains: {
107
107
  description: string;
108
108
  type: string;
109
- defaultValue: never[];
109
+ defaultValue: never[]; /**
110
+ * #stateModel GoogleDriveOAuthInternetAccount
111
+ */
110
112
  };
111
113
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>;
112
114
  } & {
@@ -203,7 +205,9 @@ export default function stateModelFactory(configSchema: GoogleDriveOAuthInternet
203
205
  domains: {
204
206
  description: string;
205
207
  type: string;
206
- defaultValue: never[];
208
+ defaultValue: never[]; /**
209
+ * #stateModel GoogleDriveOAuthInternetAccount
210
+ */
207
211
  };
208
212
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "internetAccountId">>, undefined>>, undefined>>;
209
213
  }, {
@@ -220,11 +224,11 @@ export default function stateModelFactory(configSchema: GoogleDriveOAuthInternet
220
224
  handlesLocation(location: UriLocation): boolean;
221
225
  readonly tokenKey: string;
222
226
  } & {
223
- getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): void;
227
+ getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
224
228
  storeToken(token: string): void;
225
229
  removeToken(): void;
226
230
  retrieveToken(): string | null;
227
- validateToken(token: string, loc: UriLocation): Promise<string>;
231
+ validateToken(token: string, _loc: UriLocation): Promise<string>;
228
232
  } & {
229
233
  getToken(location?: UriLocation | undefined): Promise<string>;
230
234
  } & {
@@ -258,9 +262,7 @@ export default function stateModelFactory(configSchema: GoogleDriveOAuthInternet
258
262
  readonly codeVerifierPKCE: string;
259
263
  } & {
260
264
  readonly authEndpoint: string;
261
- readonly tokenEndpoint: string; /**
262
- * #method
263
- */
265
+ readonly tokenEndpoint: string;
264
266
  readonly needsPKCE: boolean;
265
267
  readonly clientId: string;
266
268
  readonly scopes: string;
@@ -1,15 +1,11 @@
1
1
  import React from 'react';
2
2
  import { ConfigurationReference } from '@jbrowse/core/configuration';
3
3
  import { types } from 'mobx-state-tree';
4
- import { SvgIcon } from '@mui/material';
5
4
  import baseModel from '../OAuthModel/model';
6
5
  import { configSchema as OAuthConfigSchema } from '../OAuthModel';
7
6
  import { getDescriptiveErrorMessage } from './util';
8
7
  import { GoogleDriveFile } from './GoogleDriveFilehandle';
9
- function GoogleDriveIcon(props) {
10
- return (React.createElement(SvgIcon, { ...props },
11
- React.createElement("path", { d: "M7.71,3.5L1.15,15L4.58,21L11.13,9.5M9.73,15L6.3,21H19.42L22.85,15M22.28,14L15.42,2H8.58L8.57,2L15.43,14H22.28Z" })));
12
- }
8
+ import GoogleDriveIcon from './GoogleDriveIcon';
13
9
  function getUri(str) {
14
10
  const urlId = str.match(/[-\w]{25,}/);
15
11
  return `https://www.googleapis.com/drive/v3/files/${urlId}`;
@@ -145,11 +145,11 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
145
145
  handlesLocation(location: UriLocation): boolean;
146
146
  readonly tokenKey: string;
147
147
  } & {
148
- getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): void;
148
+ getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
149
149
  storeToken(token: string): void;
150
150
  removeToken(): void;
151
151
  retrieveToken(): string | null;
152
- validateToken(token: string, loc: UriLocation): Promise<string>;
152
+ validateToken(token: string, _loc: UriLocation): Promise<string>;
153
153
  } & {
154
154
  getToken(location?: UriLocation | undefined): Promise<string>;
155
155
  } & {
@@ -201,11 +201,11 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
201
201
  handlesLocation(location: UriLocation): boolean;
202
202
  readonly tokenKey: string;
203
203
  } & {
204
- getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): void;
204
+ getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
205
205
  storeToken(token: string): void;
206
206
  removeToken(): void;
207
207
  retrieveToken(): string | null;
208
- validateToken(token: string, loc: UriLocation): Promise<string>;
208
+ validateToken(token: string, _loc: UriLocation): Promise<string>;
209
209
  } & {
210
210
  getToken(location?: UriLocation | undefined): Promise<string>;
211
211
  } & {
@@ -227,10 +227,7 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
227
227
  getPreAuthorizationInformation(location: UriLocation): Promise<{
228
228
  internetAccountType: string;
229
229
  authInfo: {
230
- token: string; /**
231
- * #action
232
- * used to listen to child window for auth code/token
233
- */
230
+ token: string;
234
231
  configuration: any;
235
232
  };
236
233
  }>;
package/esm/index.d.ts CHANGED
@@ -254,11 +254,11 @@ export default class AuthenticationPlugin extends Plugin {
254
254
  handlesLocation(location: import("@jbrowse/core/util").UriLocation): boolean;
255
255
  readonly tokenKey: string;
256
256
  } & {
257
- getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): void;
257
+ getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
258
258
  storeToken(token: string): void;
259
259
  removeToken(): void;
260
260
  retrieveToken(): string | null;
261
- validateToken(token: string, loc: import("@jbrowse/core/util").UriLocation): Promise<string>;
261
+ validateToken(token: string, _loc: import("@jbrowse/core/util").UriLocation): Promise<string>;
262
262
  } & {
263
263
  getToken(location?: import("@jbrowse/core/util").UriLocation | undefined): Promise<string>;
264
264
  } & {
@@ -459,11 +459,11 @@ export default class AuthenticationPlugin extends Plugin {
459
459
  handlesLocation(location: import("@jbrowse/core/util").UriLocation): boolean;
460
460
  readonly tokenKey: string;
461
461
  } & {
462
- getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): void;
462
+ getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
463
463
  storeToken(token: string): void;
464
464
  removeToken(): void;
465
465
  retrieveToken(): string | null;
466
- validateToken(token: string, loc: import("@jbrowse/core/util").UriLocation): Promise<string>;
466
+ validateToken(token: string, _loc: import("@jbrowse/core/util").UriLocation): Promise<string>;
467
467
  } & {
468
468
  getToken(location?: import("@jbrowse/core/util").UriLocation | undefined): Promise<string>;
469
469
  } & {
@@ -658,11 +658,11 @@ export default class AuthenticationPlugin extends Plugin {
658
658
  handlesLocation(location: import("@jbrowse/core/util").UriLocation): boolean;
659
659
  readonly tokenKey: string;
660
660
  } & {
661
- getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): void;
661
+ getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
662
662
  storeToken(token: string): void;
663
663
  removeToken(): void;
664
664
  retrieveToken(): string | null;
665
- validateToken(token: string, loc: import("@jbrowse/core/util").UriLocation): Promise<string>;
665
+ validateToken(token: string, _loc: import("@jbrowse/core/util").UriLocation): Promise<string>;
666
666
  } & {
667
667
  getToken(location?: import("@jbrowse/core/util").UriLocation | undefined): Promise<string>;
668
668
  } & {
@@ -1080,11 +1080,11 @@ export default class AuthenticationPlugin extends Plugin {
1080
1080
  handlesLocation(location: import("@jbrowse/core/util").UriLocation): boolean;
1081
1081
  readonly tokenKey: string;
1082
1082
  } & {
1083
- getTokenFromUser(resolve: (token: string) => void, reject: (error: Error) => void): void;
1083
+ getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
1084
1084
  storeToken(token: string): void;
1085
1085
  removeToken(): void;
1086
1086
  retrieveToken(): string | null;
1087
- validateToken(token: string, loc: import("@jbrowse/core/util").UriLocation): Promise<string>;
1087
+ validateToken(token: string, _loc: import("@jbrowse/core/util").UriLocation): Promise<string>;
1088
1088
  } & {
1089
1089
  getToken(location?: import("@jbrowse/core/util").UriLocation | undefined): Promise<string>;
1090
1090
  } & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-authentication",
3
- "version": "2.6.2",
3
+ "version": "2.7.0",
4
4
  "description": "JBrowse 2 Authentication",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -43,7 +43,7 @@
43
43
  "@jbrowse/core": "^2.0.0",
44
44
  "@mui/material": "^5.0.0",
45
45
  "mobx": "^6.0.0",
46
- "mobx-react": "^7.0.0",
46
+ "mobx-react": "^9.0.0",
47
47
  "mobx-state-tree": "^5.0.0",
48
48
  "react": ">=16.8.0",
49
49
  "react-dom": ">=16.8.0",
@@ -55,5 +55,5 @@
55
55
  "distModule": "esm/index.js",
56
56
  "srcModule": "src/index.ts",
57
57
  "module": "esm/index.js",
58
- "gitHead": "bbea587a402d9974acdd804a33f4b77f31a2fd5f"
58
+ "gitHead": "dbe7fb1af01fc89f833d2744635eb44a17365b41"
59
59
  }