@backstage/plugin-api-docs 0.11.6-next.0 → 0.11.6-next.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @backstage/plugin-api-docs
2
2
 
3
+ ## 0.11.6-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 7f84039: The `registerComponent` external route will now by default bind to the catalog import page if it is available.
8
+ - 9cdc651: Make sure that the toggle button state is properly reflected in API cards
9
+ - Updated dependencies
10
+ - @backstage/core-components@0.14.8-next.1
11
+ - @backstage/core-compat-api@0.2.6-next.1
12
+ - @backstage/core-plugin-api@1.9.3-next.0
13
+ - @backstage/plugin-catalog@1.21.0-next.2
14
+ - @backstage/frontend-plugin-api@0.6.6-next.1
15
+ - @backstage/plugin-catalog-react@1.12.1-next.1
16
+ - @backstage/plugin-permission-react@0.4.23-next.0
17
+ - @backstage/catalog-model@1.5.0
18
+ - @backstage/plugin-catalog-common@1.0.23
19
+
3
20
  ## 0.11.6-next.0
4
21
 
5
22
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-api-docs",
3
- "version": "0.11.6-next.0",
3
+ "version": "0.11.6-next.1",
4
4
  "main": "../dist/alpha.esm.js",
5
5
  "module": "../dist/alpha.esm.js",
6
6
  "types": "../dist/alpha.d.ts"
@@ -26,7 +26,8 @@ const ApiDefinitionButton = ({ apiEntity }) => {
26
26
  ToggleButton,
27
27
  {
28
28
  "aria-label": "Toggle API Definition Dialog",
29
- onClick: () => setDialogOpen(!dialogOpen)
29
+ onClick: () => setDialogOpen(!dialogOpen),
30
+ value: dialogOpen
30
31
  },
31
32
  /* @__PURE__ */ React.createElement(ExtensionIcon, null)
32
33
  ), /* @__PURE__ */ React.createElement(
@@ -1 +1 @@
1
- {"version":3,"file":"presets.esm.js","sources":["../../../src/components/ApisCards/presets.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiEntity } from '@backstage/catalog-model';\nimport { TableColumn } from '@backstage/core-components';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport ExtensionIcon from '@material-ui/icons/Extension';\nimport ToggleButton from '@material-ui/lab/ToggleButton';\nimport React, { useState } from 'react';\nimport { ApiTypeTitle } from '../ApiDefinitionCard';\nimport { ApiDefinitionDialog } from '../ApiDefinitionDialog';\n\nexport function createSpecApiTypeColumn(): TableColumn<ApiEntity> {\n return {\n title: 'Type',\n field: 'spec.type',\n render: entity => <ApiTypeTitle apiEntity={entity} />,\n };\n}\n\nconst ApiDefinitionButton = ({ apiEntity }: { apiEntity: ApiEntity }) => {\n const [dialogOpen, setDialogOpen] = useState(false);\n return (\n <>\n <ToggleButton\n aria-label=\"Toggle API Definition Dialog\"\n onClick={() => setDialogOpen(!dialogOpen)}\n >\n <ExtensionIcon />\n </ToggleButton>\n <ApiDefinitionDialog\n entity={apiEntity}\n open={dialogOpen}\n onClose={() => setDialogOpen(false)}\n />\n </>\n );\n};\n\nfunction createApiDefinitionColumn(): TableColumn<ApiEntity> {\n return {\n title: 'API Definition',\n render: entity => <ApiDefinitionButton apiEntity={entity} />,\n };\n}\n\nexport const apiEntityColumns: TableColumn<ApiEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'API' }),\n EntityTable.columns.createSystemColumn(),\n EntityTable.columns.createOwnerColumn(),\n createSpecApiTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n createApiDefinitionCol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EAAa,OAAO,CAAA;AAAA,EAChE,WAAA,CAAY,QAAQ,kBAAmB,EAAA;AAAA,EACvC,WAAA,CAAY,QAAQ,iBAAkB,EAAA;AAAA,EACtC,uBAAwB,EAAA;AAAA,EACxB,WAAA,CAAY,QAAQ,yBAA0B,EAAA;AAAA,EAC9C,WAAA,CAAY,QAAQ,+BAAgC,EAAA;AAAA,EACpD,yBAA0B,EAAA;AAC5B;;;;"}
1
+ {"version":3,"file":"presets.esm.js","sources":["../../../src/components/ApisCards/presets.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiEntity } from '@backstage/catalog-model';\nimport { TableColumn } from '@backstage/core-components';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport ExtensionIcon from '@material-ui/icons/Extension';\nimport ToggleButton from '@material-ui/lab/ToggleButton';\nimport React, { useState } from 'react';\nimport { ApiTypeTitle } from '../ApiDefinitionCard';\nimport { ApiDefinitionDialog } from '../ApiDefinitionDialog';\n\nexport function createSpecApiTypeColumn(): TableColumn<ApiEntity> {\n return {\n title: 'Type',\n field: 'spec.type',\n render: entity => <ApiTypeTitle apiEntity={entity} />,\n };\n}\n\nconst ApiDefinitionButton = ({ apiEntity }: { apiEntity: ApiEntity }) => {\n const [dialogOpen, setDialogOpen] = useState(false);\n return (\n <>\n <ToggleButton\n aria-label=\"Toggle API Definition Dialog\"\n onClick={() => setDialogOpen(!dialogOpen)}\n value={dialogOpen}\n >\n <ExtensionIcon />\n </ToggleButton>\n <ApiDefinitionDialog\n entity={apiEntity}\n open={dialogOpen}\n onClose={() => setDialogOpen(false)}\n />\n </>\n );\n};\n\nfunction createApiDefinitionColumn(): TableColumn<ApiEntity> {\n return {\n title: 'API Definition',\n render: entity => <ApiDefinitionButton apiEntity={entity} />,\n };\n}\n\nexport const apiEntityColumns: TableColumn<ApiEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'API' }),\n EntityTable.columns.createSystemColumn(),\n EntityTable.columns.createOwnerColumn(),\n createSpecApiTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n createApiDefinitionColumn(),\n];\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAyBO,SAAS,uBAAkD,GAAA;AAChE,EAAO,OAAA;AAAA,IACL,KAAO,EAAA,MAAA;AAAA,IACP,KAAO,EAAA,WAAA;AAAA,IACP,MAAQ,EAAA,CAAA,MAAA,qBAAW,KAAA,CAAA,aAAA,CAAA,YAAA,EAAA,EAAa,WAAW,MAAQ,EAAA,CAAA;AAAA,GACrD,CAAA;AACF,CAAA;AAEA,MAAM,mBAAsB,GAAA,CAAC,EAAE,SAAA,EAA0C,KAAA;AACvE,EAAA,MAAM,CAAC,UAAA,EAAY,aAAa,CAAA,GAAI,SAAS,KAAK,CAAA,CAAA;AAClD,EAAA,uBAEI,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,YAAA;AAAA,IAAA;AAAA,MACC,YAAW,EAAA,8BAAA;AAAA,MACX,OAAS,EAAA,MAAM,aAAc,CAAA,CAAC,UAAU,CAAA;AAAA,MACxC,KAAO,EAAA,UAAA;AAAA,KAAA;AAAA,wCAEN,aAAc,EAAA,IAAA,CAAA;AAAA,GAEjB,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,MAAQ,EAAA,SAAA;AAAA,MACR,IAAM,EAAA,UAAA;AAAA,MACN,OAAA,EAAS,MAAM,aAAA,CAAc,KAAK,CAAA;AAAA,KAAA;AAAA,GAEtC,CAAA,CAAA;AAEJ,CAAA,CAAA;AAEA,SAAS,yBAAoD,GAAA;AAC3D,EAAO,OAAA;AAAA,IACL,KAAO,EAAA,gBAAA;AAAA,IACP,MAAQ,EAAA,CAAA,MAAA,qBAAW,KAAA,CAAA,aAAA,CAAA,mBAAA,EAAA,EAAoB,WAAW,MAAQ,EAAA,CAAA;AAAA,GAC5D,CAAA;AACF,CAAA;AAEO,MAAM,gBAA6C,GAAA;AAAA,EACxD,YAAY,OAAQ,CAAA,qBAAA,CAAsB,EAAE,WAAA,EAAa,OAAO,CAAA;AAAA,EAChE,WAAA,CAAY,QAAQ,kBAAmB,EAAA;AAAA,EACvC,WAAA,CAAY,QAAQ,iBAAkB,EAAA;AAAA,EACtC,uBAAwB,EAAA;AAAA,EACxB,WAAA,CAAY,QAAQ,yBAA0B,EAAA;AAAA,EAC9C,WAAA,CAAY,QAAQ,+BAAgC,EAAA;AAAA,EACpD,yBAA0B,EAAA;AAC5B;;;;"}
@@ -5,7 +5,8 @@ const rootRoute = createRouteRef({
5
5
  });
6
6
  const registerComponentRouteRef = createExternalRouteRef({
7
7
  id: "register-component",
8
- optional: true
8
+ optional: true,
9
+ defaultTarget: "catalog-import.importPage"
9
10
  });
10
11
 
11
12
  export { registerComponentRouteRef, rootRoute };
@@ -1 +1 @@
1
- {"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createExternalRouteRef,\n createRouteRef,\n} from '@backstage/core-plugin-api';\n\nexport const rootRoute = createRouteRef({\n id: 'api-docs',\n});\n\nexport const registerComponentRouteRef = createExternalRouteRef({\n id: 'register-component',\n optional: true,\n});\n"],"names":[],"mappings":";;AAqBO,MAAM,YAAY,cAAe,CAAA;AAAA,EACtC,EAAI,EAAA,UAAA;AACN,CAAC,EAAA;AAEM,MAAM,4BAA4B,sBAAuB,CAAA;AAAA,EAC9D,EAAI,EAAA,oBAAA;AAAA,EACJ,QAAU,EAAA,IAAA;AACZ,CAAC;;;;"}
1
+ {"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createExternalRouteRef,\n createRouteRef,\n} from '@backstage/core-plugin-api';\n\nexport const rootRoute = createRouteRef({\n id: 'api-docs',\n});\n\nexport const registerComponentRouteRef = createExternalRouteRef({\n id: 'register-component',\n optional: true,\n defaultTarget: 'catalog-import.importPage',\n});\n"],"names":[],"mappings":";;AAqBO,MAAM,YAAY,cAAe,CAAA;AAAA,EACtC,EAAI,EAAA,UAAA;AACN,CAAC,EAAA;AAEM,MAAM,4BAA4B,sBAAuB,CAAA;AAAA,EAC9D,EAAI,EAAA,oBAAA;AAAA,EACJ,QAAU,EAAA,IAAA;AAAA,EACV,aAAe,EAAA,2BAAA;AACjB,CAAC;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-api-docs",
3
- "version": "0.11.6-next.0",
3
+ "version": "0.11.6-next.1",
4
4
  "description": "A Backstage plugin that helps represent API entities in the frontend",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin"
@@ -50,14 +50,14 @@
50
50
  "dependencies": {
51
51
  "@asyncapi/react-component": "1.3.1",
52
52
  "@backstage/catalog-model": "^1.5.0",
53
- "@backstage/core-compat-api": "^0.2.6-next.0",
54
- "@backstage/core-components": "^0.14.8-next.0",
55
- "@backstage/core-plugin-api": "^1.9.2",
56
- "@backstage/frontend-plugin-api": "^0.6.6-next.0",
57
- "@backstage/plugin-catalog": "^1.20.1-next.0",
53
+ "@backstage/core-compat-api": "^0.2.6-next.1",
54
+ "@backstage/core-components": "^0.14.8-next.1",
55
+ "@backstage/core-plugin-api": "^1.9.3-next.0",
56
+ "@backstage/frontend-plugin-api": "^0.6.6-next.1",
57
+ "@backstage/plugin-catalog": "^1.21.0-next.2",
58
58
  "@backstage/plugin-catalog-common": "^1.0.23",
59
- "@backstage/plugin-catalog-react": "^1.12.1-next.0",
60
- "@backstage/plugin-permission-react": "^0.4.22",
59
+ "@backstage/plugin-catalog-react": "^1.12.1-next.1",
60
+ "@backstage/plugin-permission-react": "^0.4.23-next.0",
61
61
  "@graphiql/react": "^0.20.0",
62
62
  "@material-ui/core": "^4.12.2",
63
63
  "@material-ui/icons": "^4.9.1",
@@ -71,10 +71,10 @@
71
71
  "swagger-ui-react": "^5.0.0"
72
72
  },
73
73
  "devDependencies": {
74
- "@backstage/cli": "^0.26.6-next.0",
75
- "@backstage/core-app-api": "^1.12.5",
76
- "@backstage/dev-utils": "^1.0.33-next.0",
77
- "@backstage/test-utils": "^1.5.6-next.0",
74
+ "@backstage/cli": "^0.26.7-next.2",
75
+ "@backstage/core-app-api": "^1.12.6-next.0",
76
+ "@backstage/dev-utils": "^1.0.33-next.1",
77
+ "@backstage/test-utils": "^1.5.6-next.1",
78
78
  "@testing-library/dom": "^10.0.0",
79
79
  "@testing-library/jest-dom": "^6.0.0",
80
80
  "@testing-library/react": "^15.0.0",