@ssplib/react-components 0.0.62 → 0.0.64

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,9 +1,12 @@
1
1
  /// <reference types="react" />
2
- export default function FetchAutoComplete({ name, url, title, customLoadingText, shouldRefetch, required, }: {
2
+ export default function FetchAutoComplete({ name, url, title, customLoadingText, shouldRefetch, required, xs, sm, md, }: {
3
3
  name: string;
4
4
  url: string;
5
5
  title: string;
6
6
  customLoadingText: string;
7
7
  required?: boolean;
8
8
  shouldRefetch?: boolean;
9
+ xs?: number;
10
+ sm?: number;
11
+ md?: number;
9
12
  }): JSX.Element;
@@ -27,7 +27,7 @@ const material_1 = require("@mui/material");
27
27
  const react_1 = __importStar(require("react"));
28
28
  const form_1 = require("../../../context/form");
29
29
  const auth_1 = require("../../../context/auth");
30
- function FetchAutoComplete({ name, url, title, customLoadingText, shouldRefetch = true, required = false, }) {
30
+ function FetchAutoComplete({ name, url, title, customLoadingText, shouldRefetch = true, required = false, xs = 12, sm, md, }) {
31
31
  const context = (0, react_1.useContext)(form_1.FormContext);
32
32
  const [loading, setLoading] = (0, react_1.useState)(true);
33
33
  const [list, setList] = (0, react_1.useState)([]);
@@ -56,7 +56,7 @@ function FetchAutoComplete({ name, url, title, customLoadingText, shouldRefetch
56
56
  }
57
57
  });
58
58
  }
59
- return (react_1.default.createElement(material_1.Grid, { item: true, xs: 12 },
59
+ return (react_1.default.createElement(material_1.Grid, Object.assign({ item: true }, { xs, sm, md }),
60
60
  react_1.default.createElement(material_1.InputLabel, { required: required }, title),
61
61
  react_1.default.createElement(material_1.Autocomplete, { loading: loading, loadingText: loadingText, options: list, isOptionEqualToValue: (op, value) => op.id === value.id, onChange: (e, v) => context === null || context === void 0 ? void 0 : context.formSetValue(name, v ? v.id : ''), renderInput: (params) => react_1.default.createElement(material_1.TextField, Object.assign({}, params, { size: 'small', fullWidth: true, placeholder: title, onFocus: onFocus, required: true })), size: 'small', fullWidth: true })));
62
62
  }
@@ -57,7 +57,6 @@ function OAuthProvider({ children, AUTH_URL, oidcConfig, redirectURL, validateTo
57
57
  }
58
58
  fetch(`${AUTH_URL}${validateTokenRoute}`, {
59
59
  method: 'POST',
60
- mode: 'no-cors',
61
60
  headers: {
62
61
  Authorization: `Bearer ${token}`,
63
62
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssplib/react-components",
3
- "version": "0.0.62",
3
+ "version": "0.0.64",
4
4
  "description": "SSP React Components",
5
5
  "main": "index.js",
6
6
  "author": "Pedro Henrique <sr.hudrick@gmail.com>",