@backstage/plugin-org 0.6.38-next.2 → 0.6.39-next.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # @backstage/plugin-org
2
2
 
3
+ ## 0.6.39-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/core-compat-api@0.4.2-next.0
9
+ - @backstage/plugin-catalog-react@1.18.0-next.0
10
+ - @backstage/catalog-model@1.7.3
11
+ - @backstage/core-components@0.17.1
12
+ - @backstage/core-plugin-api@1.10.6
13
+ - @backstage/frontend-plugin-api@0.10.1
14
+ - @backstage/plugin-catalog-common@1.1.3
15
+
16
+ ## 0.6.38
17
+
18
+ ### Patch Changes
19
+
20
+ - a47fd39: Removes instances of default React imports, a necessary update for the upcoming React 19 migration.
21
+
22
+ <https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html>
23
+
24
+ - Updated dependencies
25
+ - @backstage/plugin-catalog-react@1.17.0
26
+ - @backstage/frontend-plugin-api@0.10.1
27
+ - @backstage/core-compat-api@0.4.1
28
+ - @backstage/core-components@0.17.1
29
+ - @backstage/core-plugin-api@1.10.6
30
+ - @backstage/catalog-model@1.7.3
31
+ - @backstage/plugin-catalog-common@1.1.3
32
+
3
33
  ## 0.6.38-next.2
4
34
 
5
35
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"MyGroupsSidebarItem.esm.js","sources":["../../../src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 DEFAULT_NAMESPACE,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n SidebarItem,\n SidebarSubmenu,\n SidebarSubmenuItem,\n} from '@backstage/core-components';\nimport {\n IconComponent,\n identityApiRef,\n useApi,\n useRouteRef,\n} from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport {\n catalogApiRef,\n CatalogApi,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport { getCompoundEntityRef } from '@backstage/catalog-model';\n\nimport { entityPresentationApiRef } from '@backstage/plugin-catalog-react';\n\n/**\n * MyGroupsSidebarItem can be added to your sidebar providing quick access to groups the logged in user is a member of\n *\n * @public\n */\nexport const MyGroupsSidebarItem = (props: {\n singularTitle: string;\n pluralTitle: string;\n icon: IconComponent;\n filter?: Record<string, string | symbol | (string | symbol)[]>;\n}) => {\n const { singularTitle, pluralTitle, icon, filter } = props;\n\n const identityApi = useApi(identityApiRef);\n const catalogApi: CatalogApi = useApi(catalogApiRef);\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n const entityPresentationApi = useApi(entityPresentationApiRef);\n\n const { value: groups } = useAsync(async () => {\n const profile = await identityApi.getBackstageIdentity();\n\n const response = await catalogApi.getEntities({\n filter: [\n {\n kind: 'group',\n 'relations.hasMember': profile.userEntityRef,\n ...(filter ?? {}),\n },\n ],\n fields: ['metadata', 'kind'],\n });\n return response.items;\n }, []);\n\n if (!groups?.length) {\n return null;\n }\n\n // Only member of one group\n if (groups.length === 1) {\n const group = groups[0];\n return (\n <SidebarItem\n text={singularTitle}\n to={catalogEntityRoute(getCompoundEntityRef(group))}\n icon={icon}\n />\n );\n }\n\n // Member of more than one group\n return (\n <SidebarItem icon={icon} text={pluralTitle}>\n <SidebarSubmenu title={pluralTitle}>\n {groups?.map(group => {\n const entityDisplayName = entityPresentationApi.forEntity(group);\n return (\n <SidebarSubmenuItem\n title={entityDisplayName.snapshot.primaryTitle}\n subtitle={\n group.metadata.namespace !== DEFAULT_NAMESPACE\n ? group.metadata.namespace\n : undefined\n }\n to={catalogEntityRoute(getCompoundEntityRef(group))}\n icon={icon}\n key={stringifyEntityRef(group)}\n />\n );\n })}\n </SidebarSubmenu>\n </SidebarItem>\n );\n};\n"],"names":[],"mappings":";;;;;;;AA8Ca,MAAA,mBAAA,GAAsB,CAAC,KAK9B,KAAA;AACJ,EAAA,MAAM,EAAE,aAAA,EAAe,WAAa,EAAA,IAAA,EAAM,QAAW,GAAA,KAAA;AAErD,EAAM,MAAA,WAAA,GAAc,OAAO,cAAc,CAAA;AACzC,EAAM,MAAA,UAAA,GAAyB,OAAO,aAAa,CAAA;AACnD,EAAM,MAAA,kBAAA,GAAqB,YAAY,cAAc,CAAA;AACrD,EAAM,MAAA,qBAAA,GAAwB,OAAO,wBAAwB,CAAA;AAE7D,EAAA,MAAM,EAAE,KAAA,EAAO,MAAO,EAAA,GAAI,SAAS,YAAY;AAC7C,IAAM,MAAA,OAAA,GAAU,MAAM,WAAA,CAAY,oBAAqB,EAAA;AAEvD,IAAM,MAAA,QAAA,GAAW,MAAM,UAAA,CAAW,WAAY,CAAA;AAAA,MAC5C,MAAQ,EAAA;AAAA,QACN;AAAA,UACE,IAAM,EAAA,OAAA;AAAA,UACN,uBAAuB,OAAQ,CAAA,aAAA;AAAA,UAC/B,GAAI,UAAU;AAAC;AACjB,OACF;AAAA,MACA,MAAA,EAAQ,CAAC,UAAA,EAAY,MAAM;AAAA,KAC5B,CAAA;AACD,IAAA,OAAO,QAAS,CAAA,KAAA;AAAA,GAClB,EAAG,EAAE,CAAA;AAEL,EAAI,IAAA,CAAC,QAAQ,MAAQ,EAAA;AACnB,IAAO,OAAA,IAAA;AAAA;AAIT,EAAI,IAAA,MAAA,CAAO,WAAW,CAAG,EAAA;AACvB,IAAM,MAAA,KAAA,GAAQ,OAAO,CAAC,CAAA;AACtB,IACE,uBAAA,GAAA;AAAA,MAAC,WAAA;AAAA,MAAA;AAAA,QACC,IAAM,EAAA,aAAA;AAAA,QACN,EAAI,EAAA,kBAAA,CAAmB,oBAAqB,CAAA,KAAK,CAAC,CAAA;AAAA,QAClD;AAAA;AAAA,KACF;AAAA;AAKJ,EACE,uBAAA,GAAA,CAAC,WAAY,EAAA,EAAA,IAAA,EAAY,IAAM,EAAA,WAAA,EAC7B,QAAC,kBAAA,GAAA,CAAA,cAAA,EAAA,EAAe,KAAO,EAAA,WAAA,EACpB,QAAQ,EAAA,MAAA,EAAA,GAAA,CAAI,CAAS,KAAA,KAAA;AACpB,IAAM,MAAA,iBAAA,GAAoB,qBAAsB,CAAA,SAAA,CAAU,KAAK,CAAA;AAC/D,IACE,uBAAA,GAAA;AAAA,MAAC,kBAAA;AAAA,MAAA;AAAA,QACC,KAAA,EAAO,kBAAkB,QAAS,CAAA,YAAA;AAAA,QAClC,UACE,KAAM,CAAA,QAAA,CAAS,cAAc,iBACzB,GAAA,KAAA,CAAM,SAAS,SACf,GAAA,KAAA,CAAA;AAAA,QAEN,EAAI,EAAA,kBAAA,CAAmB,oBAAqB,CAAA,KAAK,CAAC,CAAA;AAAA,QAClD;AAAA,OAAA;AAAA,MACK,mBAAmB,KAAK;AAAA,KAC/B;AAAA,GAEH,GACH,CACF,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"MyGroupsSidebarItem.esm.js","sources":["../../../src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 DEFAULT_NAMESPACE,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n SidebarItem,\n SidebarSubmenu,\n SidebarSubmenuItem,\n} from '@backstage/core-components';\nimport {\n IconComponent,\n identityApiRef,\n useApi,\n useRouteRef,\n} from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport {\n catalogApiRef,\n entityRouteRef,\n entityPresentationApiRef,\n} from '@backstage/plugin-catalog-react';\nimport { getCompoundEntityRef } from '@backstage/catalog-model';\n\n/**\n * MyGroupsSidebarItem can be added to your sidebar providing quick access to groups the logged in user is a member of\n *\n * @public\n */\nexport const MyGroupsSidebarItem = (props: {\n singularTitle: string;\n pluralTitle: string;\n icon: IconComponent;\n filter?: Record<string, string | symbol | (string | symbol)[]>;\n}) => {\n const { singularTitle, pluralTitle, icon, filter } = props;\n\n const identityApi = useApi(identityApiRef);\n const catalogApi = useApi(catalogApiRef);\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n const entityPresentationApi = useApi(entityPresentationApiRef);\n\n const { value: groups } = useAsync(async () => {\n const profile = await identityApi.getBackstageIdentity();\n\n const response = await catalogApi.getEntities({\n filter: [\n {\n kind: 'group',\n 'relations.hasMember': profile.userEntityRef,\n ...(filter ?? {}),\n },\n ],\n fields: ['metadata', 'kind'],\n });\n return response.items;\n }, []);\n\n if (!groups?.length) {\n return null;\n }\n\n // Only member of one group\n if (groups.length === 1) {\n const group = groups[0];\n return (\n <SidebarItem\n text={singularTitle}\n to={catalogEntityRoute(getCompoundEntityRef(group))}\n icon={icon}\n />\n );\n }\n\n // Member of more than one group\n return (\n <SidebarItem icon={icon} text={pluralTitle}>\n <SidebarSubmenu title={pluralTitle}>\n {groups?.map(group => {\n const entityDisplayName = entityPresentationApi.forEntity(group);\n return (\n <SidebarSubmenuItem\n title={entityDisplayName.snapshot.primaryTitle}\n subtitle={\n group.metadata.namespace !== DEFAULT_NAMESPACE\n ? group.metadata.namespace\n : undefined\n }\n to={catalogEntityRoute(getCompoundEntityRef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AA,QAClD;AAAA;AAAA,KACF;AAAA;AAKJ,EACE,uBAAA,GAAA,CAAC,WAAY,EAAA,EAAA,IAAA,EAAY,IAAM,EAAA,WAAA,EAC7B,QAAC,kBAAA,GAAA,CAAA,cAAA,EAAA,EAAe,KAAO,EAAA,WAAA,EACpB,QAAQ,EAAA,MAAA,EAAA,GAAA,CAAI,CAAS,KAAA,KAAA;AACpB,IAAM,MAAA,iBAAA,GAAoB,qBAAsB,CAAA,SAAA,CAAU,KAAK,CAAA;AAC/D,IACE,uBAAA,GAAA;AAAA,MAAC,kBAAA;AAAA,MAAA;AAAA,QACC,KAAA,EAAO,kBAAkB,QAAS,CAAA,YAAA;AAAA,QAClC,UACE,KAAM,CAAA,QAAA,CAAS,cAAc,iBACzB,GAAA,KAAA,CAAM,SAAS,SACf,GAAA,KAAA,CAAA;AAAA,QAEN,EAAI,EAAA,kBAAA,CAAmB,oBAAqB,CAAA,KAAK,CAAC,CAAA;AAAA,QAClD;AAAA,OAAA;AAAA,MACK,mBAAmB,KAAK;AAAA,KAC/B;AAAA,GAEH,GACH,CACF,EAAA,CAAA;AAEJ;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-org",
3
- "version": "0.6.38-next.2",
3
+ "version": "0.6.39-next.0",
4
4
  "description": "A Backstage plugin that helps you create entity pages for your organization",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin",
@@ -64,12 +64,12 @@
64
64
  },
65
65
  "dependencies": {
66
66
  "@backstage/catalog-model": "1.7.3",
67
- "@backstage/core-compat-api": "0.4.1-next.2",
68
- "@backstage/core-components": "0.17.1-next.1",
69
- "@backstage/core-plugin-api": "1.10.6-next.0",
70
- "@backstage/frontend-plugin-api": "0.10.1-next.1",
67
+ "@backstage/core-compat-api": "0.4.2-next.0",
68
+ "@backstage/core-components": "0.17.1",
69
+ "@backstage/core-plugin-api": "1.10.6",
70
+ "@backstage/frontend-plugin-api": "0.10.1",
71
71
  "@backstage/plugin-catalog-common": "1.1.3",
72
- "@backstage/plugin-catalog-react": "1.17.0-next.2",
72
+ "@backstage/plugin-catalog-react": "1.18.0-next.0",
73
73
  "@material-ui/core": "^4.12.2",
74
74
  "@material-ui/icons": "^4.9.1",
75
75
  "@material-ui/lab": "4.0.0-alpha.61",
@@ -80,14 +80,14 @@
80
80
  "react-use": "^17.2.4"
81
81
  },
82
82
  "devDependencies": {
83
- "@backstage/catalog-client": "1.9.1",
84
- "@backstage/cli": "0.32.0-next.2",
85
- "@backstage/core-app-api": "1.16.1-next.0",
86
- "@backstage/dev-utils": "1.1.9-next.2",
87
- "@backstage/plugin-catalog": "1.29.0-next.2",
83
+ "@backstage/catalog-client": "1.10.0-next.0",
84
+ "@backstage/cli": "0.32.1-next.0",
85
+ "@backstage/core-app-api": "1.16.1",
86
+ "@backstage/dev-utils": "1.1.10-next.0",
87
+ "@backstage/plugin-catalog": "1.29.1-next.0",
88
88
  "@backstage/plugin-permission-common": "0.8.4",
89
- "@backstage/plugin-permission-react": "0.4.33-next.0",
90
- "@backstage/test-utils": "1.7.7-next.0",
89
+ "@backstage/plugin-permission-react": "0.4.33",
90
+ "@backstage/test-utils": "1.7.7",
91
91
  "@backstage/types": "1.2.1",
92
92
  "@testing-library/dom": "^10.0.0",
93
93
  "@testing-library/jest-dom": "^6.0.0",