swoop-common 2.2.98 → 2.2.100

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.
@@ -17,9 +17,9 @@ if (!bearerToken) {
17
17
  console.error('Please provide a bearer token to authenticate with the API');
18
18
  process.exit(1);
19
19
  }
20
- console.log('Fetching API specifications with provided bearer token...', bearerToken);
21
20
  const headers = {
22
- 'Authorization': `Bearer ${bearerToken}`
21
+ 'Authorization': `Bearer ${bearerToken}`,
22
+ 'Accept': 'application/vnd.openapi+json'
23
23
  };
24
24
  fetch(`${swoopApiUrl}/api/docs.jsonopenapi`, { headers }).then(res => {
25
25
  if (!res.ok) {
@@ -1,6 +1,7 @@
1
1
  import { JsonForms } from "@jsonforms/react";
2
2
  import React, { useEffect } from "react";
3
3
  import { materialCells, materialRenderers, } from "@jsonforms/material-renderers";
4
+ import { GlobalStyles } from "@mui/material";
4
5
  import { getComponents } from "../registry/components";
5
6
  import { generateJsonSchema } from "../schema/generate/jsonSchemaGenerate";
6
7
  import { generateUiSchema } from "../schema/generate/uiSchemaGenerate";
@@ -11,6 +12,32 @@ export const StyledFormView = ({ initialData, schema, onChange, stage, pool, rea
11
12
  const json = overrideJsonSchema || generateJsonSchema(schema, stage, hideReadonlyFields);
12
13
  const ui = overrideUiSchema || generateUiSchema(schema, stage, hideReadonlyFields);
13
14
  return (React.createElement(ComponentContext, { componentId: hintComponentId, stage: stage },
15
+ React.createElement(GlobalStyles, { styles: {
16
+ ".json-forms-wrapper .MuiTable-root > .MuiTableBody-root > .MuiTableRow-root, .json-forms-wrapper .MuiTable-root > .MuiTableHead-root > .MuiTableRow-root:last-child": {
17
+ display: "grid",
18
+ gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
19
+ columnGap: "24px",
20
+ rowGap: "12px",
21
+ alignItems: "start",
22
+ },
23
+ ".json-forms-wrapper .MuiTable-root > .MuiTableBody-root > .MuiTableRow-root > .MuiTableCell-root, .json-forms-wrapper .MuiTable-root > .MuiTableHead-root > .MuiTableRow-root:last-child > .MuiTableCell-root": {
24
+ minWidth: 0,
25
+ width: "100%",
26
+ paddingLeft: 0,
27
+ paddingRight: 0,
28
+ },
29
+ ".json-forms-wrapper .MuiTable-root > .MuiTableBody-root > .MuiTableRow-root > .MuiTableCell-root:only-child": {
30
+ gridColumn: "1 / -1",
31
+ },
32
+ ".json-forms-wrapper .MuiTable-root > .MuiTableBody-root > .MuiTableRow-root > .MuiTableCell-root:last-child": {
33
+ gridColumn: "2",
34
+ justifySelf: "end",
35
+ width: "fit-content",
36
+ },
37
+ ".json-forms-wrapper .MuiTable-root > .MuiTableHead-root > .MuiTableRow-root:last-child > .MuiTableCell-root:last-child": {
38
+ display: "none",
39
+ },
40
+ } }),
14
41
  React.createElement("div", { className: "json-forms-wrapper" },
15
42
  React.createElement(JsonForms, { onChange: onChange, data: initialData, schema: json, uischema: ui, renderers: [
16
43
  ...materialRenderers,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swoop-common",
3
- "version": "2.2.98",
3
+ "version": "2.2.100",
4
4
  "main": "dist/api/index.js",
5
5
  "types": "dist/api/index.d.ts",
6
6
  "exports": {