@jbrowse/plugin-authentication 2.9.0 → 2.10.1

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.
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare const HTTPBasicLoginForm: ({ internetAccountId, handleClose, }: {
2
+ export declare function HTTPBasicLoginForm({ internetAccountId, handleClose, }: {
3
3
  internetAccountId: string;
4
4
  handleClose: (arg?: string) => void;
5
- }) => React.JSX.Element;
5
+ }): React.JSX.Element;
@@ -27,10 +27,10 @@ exports.HTTPBasicLoginForm = void 0;
27
27
  const react_1 = __importStar(require("react"));
28
28
  const material_1 = require("@mui/material");
29
29
  const ui_1 = require("@jbrowse/core/ui");
30
- const HTTPBasicLoginForm = ({ internetAccountId, handleClose, }) => {
30
+ function HTTPBasicLoginForm({ internetAccountId, handleClose, }) {
31
31
  const [username, setUsername] = (0, react_1.useState)('');
32
32
  const [password, setPassword] = (0, react_1.useState)('');
33
- return (react_1.default.createElement(ui_1.Dialog, { open: true, maxWidth: "xl", "data-testid": "login-httpbasic", title: `Log In for ${internetAccountId}` },
33
+ return (react_1.default.createElement(ui_1.Dialog, { open: true, maxWidth: "xl", "data-testid": "login-httpbasic", title: `Log in for ${internetAccountId}` },
34
34
  react_1.default.createElement("form", { onSubmit: event => {
35
35
  if (username && password) {
36
36
  handleClose(btoa(`${username}:${password}`));
@@ -46,5 +46,5 @@ const HTTPBasicLoginForm = ({ internetAccountId, handleClose, }) => {
46
46
  react_1.default.createElement(material_1.DialogActions, null,
47
47
  react_1.default.createElement(material_1.Button, { variant: "contained", color: "primary", type: "submit" }, "Submit"),
48
48
  react_1.default.createElement(material_1.Button, { variant: "contained", color: "secondary", type: "submit", onClick: () => handleClose() }, "Cancel")))));
49
- };
49
+ }
50
50
  exports.HTTPBasicLoginForm = HTTPBasicLoginForm;
@@ -329,9 +329,10 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
329
329
  } & {
330
330
  /**
331
331
  * #action
332
- * Get a fetch method that will add any needed authentication headers to
333
- * the request before sending it. If location is provided, it will be
334
- * checked to see if it includes a token in it's pre-auth information.
332
+ * Get a fetch method that will add any needed authentication headers
333
+ * to the request before sending it. If location is provided, it will
334
+ * be checked to see if it includes a token in it's pre-auth
335
+ * information.
335
336
  *
336
337
  * @param loc - UriLocation of the resource
337
338
  * @returns A function that can be used to fetch
@@ -338,9 +338,10 @@ const stateModelFactory = (configSchema) => {
338
338
  return {
339
339
  /**
340
340
  * #action
341
- * Get a fetch method that will add any needed authentication headers to
342
- * the request before sending it. If location is provided, it will be
343
- * checked to see if it includes a token in it's pre-auth information.
341
+ * Get a fetch method that will add any needed authentication headers
342
+ * to the request before sending it. If location is provided, it will
343
+ * be checked to see if it includes a token in it's pre-auth
344
+ * information.
344
345
  *
345
346
  * @param loc - UriLocation of the resource
346
347
  * @returns A function that can be used to fetch
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare const HTTPBasicLoginForm: ({ internetAccountId, handleClose, }: {
2
+ export declare function HTTPBasicLoginForm({ internetAccountId, handleClose, }: {
3
3
  internetAccountId: string;
4
4
  handleClose: (arg?: string) => void;
5
- }) => React.JSX.Element;
5
+ }): React.JSX.Element;
@@ -1,10 +1,10 @@
1
1
  import React, { useState } from 'react';
2
2
  import { Button, DialogContent, DialogActions, TextField } from '@mui/material';
3
3
  import { Dialog } from '@jbrowse/core/ui';
4
- export const HTTPBasicLoginForm = ({ internetAccountId, handleClose, }) => {
4
+ export function HTTPBasicLoginForm({ internetAccountId, handleClose, }) {
5
5
  const [username, setUsername] = useState('');
6
6
  const [password, setPassword] = useState('');
7
- return (React.createElement(Dialog, { open: true, maxWidth: "xl", "data-testid": "login-httpbasic", title: `Log In for ${internetAccountId}` },
7
+ return (React.createElement(Dialog, { open: true, maxWidth: "xl", "data-testid": "login-httpbasic", title: `Log in for ${internetAccountId}` },
8
8
  React.createElement("form", { onSubmit: event => {
9
9
  if (username && password) {
10
10
  handleClose(btoa(`${username}:${password}`));
@@ -20,4 +20,4 @@ export const HTTPBasicLoginForm = ({ internetAccountId, handleClose, }) => {
20
20
  React.createElement(DialogActions, null,
21
21
  React.createElement(Button, { variant: "contained", color: "primary", type: "submit" }, "Submit"),
22
22
  React.createElement(Button, { variant: "contained", color: "secondary", type: "submit", onClick: () => handleClose() }, "Cancel")))));
23
- };
23
+ }
@@ -329,9 +329,10 @@ declare const stateModelFactory: (configSchema: import("@jbrowse/core/configurat
329
329
  } & {
330
330
  /**
331
331
  * #action
332
- * Get a fetch method that will add any needed authentication headers to
333
- * the request before sending it. If location is provided, it will be
334
- * checked to see if it includes a token in it's pre-auth information.
332
+ * Get a fetch method that will add any needed authentication headers
333
+ * to the request before sending it. If location is provided, it will
334
+ * be checked to see if it includes a token in it's pre-auth
335
+ * information.
335
336
  *
336
337
  * @param loc - UriLocation of the resource
337
338
  * @returns A function that can be used to fetch
@@ -336,9 +336,10 @@ const stateModelFactory = (configSchema) => {
336
336
  return {
337
337
  /**
338
338
  * #action
339
- * Get a fetch method that will add any needed authentication headers to
340
- * the request before sending it. If location is provided, it will be
341
- * checked to see if it includes a token in it's pre-auth information.
339
+ * Get a fetch method that will add any needed authentication headers
340
+ * to the request before sending it. If location is provided, it will
341
+ * be checked to see if it includes a token in it's pre-auth
342
+ * information.
342
343
  *
343
344
  * @param loc - UriLocation of the resource
344
345
  * @returns A function that can be used to fetch
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-authentication",
3
- "version": "2.9.0",
3
+ "version": "2.10.1",
4
4
  "description": "JBrowse 2 Authentication",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -55,5 +55,5 @@
55
55
  "distModule": "esm/index.js",
56
56
  "srcModule": "src/index.ts",
57
57
  "module": "esm/index.js",
58
- "gitHead": "a50b6f67cf8c8f3c65a7b8cd858de2fcca1f2909"
58
+ "gitHead": "442b5f87efddfdf4ccf520b4d9dd01ddd370cb07"
59
59
  }