@backstage/plugin-catalog-react 1.9.2-next.3 → 1.9.3-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,57 @@
1
1
  # @backstage/plugin-catalog-react
2
2
 
3
+ ## 1.9.3-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 4016f21: Remove some unused dependencies
8
+ - Updated dependencies
9
+ - @backstage/core-components@0.13.10-next.0
10
+ - @backstage/catalog-client@1.5.2-next.0
11
+ - @backstage/frontend-plugin-api@0.4.1-next.0
12
+ - @backstage/plugin-permission-react@0.4.19-next.0
13
+ - @backstage/integration-react@1.1.22
14
+ - @backstage/catalog-model@1.4.3
15
+ - @backstage/core-plugin-api@1.8.1
16
+ - @backstage/errors@1.2.3
17
+ - @backstage/types@1.1.1
18
+ - @backstage/version-bridge@1.0.7
19
+ - @backstage/plugin-catalog-common@1.0.19
20
+ - @backstage/plugin-permission-common@0.7.11
21
+
22
+ ## 1.9.2
23
+
24
+ ### Patch Changes
25
+
26
+ - 8587f06: Added pagination support to `EntityListProvider`.
27
+ - 5360097: Ensure that passed-in icons are taken advantage of in the presentation API
28
+ - fd9863c: Grouped all `/alpha` extension data reference exports under `catalogExtensionData`.
29
+ - 08d9e67: Add default icon for kind resource.
30
+ - aaa6fb3: Minor updates for TypeScript 5.2.2+ compatibility
31
+ - a5a0473: Internal refactor of alpha exports due to a change in how extension factories are defined.
32
+ - 4d9e3b3: Register component overrides in the global `OverrideComponentNameToClassKeys` provided by `@backstage/theme`. This will in turn will provide component style override types for `createUnifiedTheme`.
33
+ - 8f5d6c1: Updates to the `/alpha` exports to match the extension input wrapping change.
34
+ - 36c94b8: Refactor of the alpha exports due to API change in how extension IDs are constructed.
35
+ - e223f22: Breaking alpha-API change to entity visibility filter functions to accept a bare entity as their first argument, instead of an object with an entity property.
36
+
37
+ Functions that accept such filters now also support the string expression form of filters.
38
+
39
+ - eee0ff2: Fixed a issue where `CatalogPage` wasn't using the chosen `initiallySelectedFilter` as intended.
40
+ - Updated dependencies
41
+ - @backstage/core-plugin-api@1.8.1
42
+ - @backstage/frontend-plugin-api@0.4.0
43
+ - @backstage/core-components@0.13.9
44
+ - @backstage/theme@0.5.0
45
+ - @backstage/catalog-client@1.5.0
46
+ - @backstage/plugin-permission-common@0.7.11
47
+ - @backstage/integration-react@1.1.22
48
+ - @backstage/plugin-permission-react@0.4.18
49
+ - @backstage/catalog-model@1.4.3
50
+ - @backstage/errors@1.2.3
51
+ - @backstage/types@1.1.1
52
+ - @backstage/version-bridge@1.0.7
53
+ - @backstage/plugin-catalog-common@1.0.19
54
+
3
55
  ## 1.9.2-next.3
4
56
 
5
57
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-react",
3
- "version": "1.9.2-next.3",
3
+ "version": "1.9.3-next.0",
4
4
  "main": "../dist/alpha.esm.js",
5
5
  "module": "../dist/alpha.esm.js",
6
6
  "types": "../dist/alpha.d.ts"
package/dist/alpha.d.ts CHANGED
@@ -41,11 +41,11 @@ declare function useEntityPermission(permission: ResourcePermission<'catalog-ent
41
41
  };
42
42
 
43
43
  /** @alpha */
44
- declare const entityContentTitleExtensionDataRef: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, {}>;
45
- /** @alpha */
46
- declare const entityFilterFunctionExtensionDataRef: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: Entity) => boolean, {}>;
47
- /** @alpha */
48
- declare const entityFilterExpressionExtensionDataRef: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, {}>;
44
+ declare const catalogExtensionData: {
45
+ entityContentTitle: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, {}>;
46
+ entityFilterFunction: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: Entity) => boolean, {}>;
47
+ entityFilterExpression: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, {}>;
48
+ };
49
49
  /** @alpha */
50
50
  declare function createEntityCardExtension<TInputs extends AnyExtensionInputMap>(options: {
51
51
  namespace?: string;
@@ -56,7 +56,7 @@ declare function createEntityCardExtension<TInputs extends AnyExtensionInputMap>
56
56
  };
57
57
  disabled?: boolean;
58
58
  inputs?: TInputs;
59
- filter?: typeof entityFilterFunctionExtensionDataRef.T | typeof entityFilterExpressionExtensionDataRef.T;
59
+ filter?: typeof catalogExtensionData.entityFilterFunction.T | typeof catalogExtensionData.entityFilterExpression.T;
60
60
  loader: (options: {
61
61
  inputs: Expand<ResolvedExtensionInputs<TInputs>>;
62
62
  }) => Promise<JSX.Element>;
@@ -76,7 +76,7 @@ declare function createEntityContentExtension<TInputs extends AnyExtensionInputM
76
76
  routeRef?: RouteRef;
77
77
  defaultPath: string;
78
78
  defaultTitle: string;
79
- filter?: typeof entityFilterFunctionExtensionDataRef.T | typeof entityFilterExpressionExtensionDataRef.T;
79
+ filter?: typeof catalogExtensionData.entityFilterFunction.T | typeof catalogExtensionData.entityFilterExpression.T;
80
80
  loader: (options: {
81
81
  inputs: Expand<ResolvedExtensionInputs<TInputs>>;
82
82
  }) => Promise<JSX.Element>;
@@ -86,4 +86,4 @@ declare function createEntityContentExtension<TInputs extends AnyExtensionInputM
86
86
  filter?: string | undefined;
87
87
  }>;
88
88
 
89
- export { createEntityCardExtension, createEntityContentExtension, entityContentTitleExtensionDataRef, entityFilterExpressionExtensionDataRef, entityFilterFunctionExtensionDataRef, isOwnerOf, useEntityPermission };
89
+ export { catalogExtensionData, createEntityCardExtension, createEntityContentExtension, isOwnerOf, useEntityPermission };
package/dist/alpha.esm.js CHANGED
@@ -47,9 +47,17 @@ function useEntityPermission(permission) {
47
47
  return { loading: false, allowed, error: permissionError };
48
48
  }
49
49
 
50
- const entityContentTitleExtensionDataRef = createExtensionDataRef("plugin.catalog.entity.content.title");
51
- const entityFilterFunctionExtensionDataRef = createExtensionDataRef("plugin.catalog.entity.filter.fn");
52
- const entityFilterExpressionExtensionDataRef = createExtensionDataRef("plugin.catalog.entity.filter.expression");
50
+ const catalogExtensionData = {
51
+ entityContentTitle: createExtensionDataRef(
52
+ "catalog.entity-content-title"
53
+ ),
54
+ entityFilterFunction: createExtensionDataRef(
55
+ "catalog.entity-filter-function"
56
+ ),
57
+ entityFilterExpression: createExtensionDataRef(
58
+ "catalog.entity-filter-expression"
59
+ )
60
+ };
53
61
  function createEntityCardExtension(options) {
54
62
  var _a, _b;
55
63
  return createExtension({
@@ -63,8 +71,8 @@ function createEntityCardExtension(options) {
63
71
  disabled: (_b = options.disabled) != null ? _b : true,
64
72
  output: {
65
73
  element: coreExtensionData.reactElement,
66
- filterFunction: entityFilterFunctionExtensionDataRef.optional(),
67
- filterExpression: entityFilterExpressionExtensionDataRef.optional()
74
+ filterFunction: catalogExtensionData.entityFilterFunction.optional(),
75
+ filterExpression: catalogExtensionData.entityFilterExpression.optional()
68
76
  },
69
77
  inputs: options.inputs,
70
78
  configSchema: createSchemaFromZod(
@@ -98,9 +106,9 @@ function createEntityContentExtension(options) {
98
106
  element: coreExtensionData.reactElement,
99
107
  path: coreExtensionData.routePath,
100
108
  routeRef: coreExtensionData.routeRef.optional(),
101
- title: entityContentTitleExtensionDataRef,
102
- filterFunction: entityFilterFunctionExtensionDataRef.optional(),
103
- filterExpression: entityFilterExpressionExtensionDataRef.optional()
109
+ title: catalogExtensionData.entityContentTitle,
110
+ filterFunction: catalogExtensionData.entityFilterFunction.optional(),
111
+ filterExpression: catalogExtensionData.entityFilterExpression.optional()
104
112
  },
105
113
  inputs: options.inputs,
106
114
  configSchema: createSchemaFromZod(
@@ -136,5 +144,5 @@ function mergeFilters(inputs) {
136
144
  return {};
137
145
  }
138
146
 
139
- export { createEntityCardExtension, createEntityContentExtension, entityContentTitleExtensionDataRef, entityFilterExpressionExtensionDataRef, entityFilterFunctionExtensionDataRef, isOwnerOf, useEntityPermission };
147
+ export { catalogExtensionData, createEntityCardExtension, createEntityContentExtension, isOwnerOf, useEntityPermission };
140
148
  //# sourceMappingURL=alpha.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.esm.js","sources":["../src/utils/isOwnerOf.ts","../src/hooks/useEntityPermission.ts","../src/alpha.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 {\n Entity,\n getCompoundEntityRef,\n RELATION_MEMBER_OF,\n RELATION_OWNED_BY,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport { getEntityRelations } from './getEntityRelations';\n\n/**\n * Returns true if the `owner` argument is a direct owner on the `entity` argument.\n *\n * @alpha\n * @remarks\n *\n * Note that this ownership is not the same as using the claims in the auth-resolver, it only will take into account ownership as expressed by direct entity relations.\n * It doesn't know anything about the additional groups that a user might belong to which the claims contain.\n */\nexport function isOwnerOf(owner: Entity, entity: Entity) {\n const possibleOwners = new Set(\n [\n ...getEntityRelations(owner, RELATION_MEMBER_OF, { kind: 'group' }),\n ...(owner ? [getCompoundEntityRef(owner)] : []),\n ].map(stringifyEntityRef),\n );\n\n const owners = getEntityRelations(entity, RELATION_OWNED_BY).map(\n stringifyEntityRef,\n );\n\n for (const ownerItem of owners) {\n if (possibleOwners.has(ownerItem)) {\n return true;\n }\n }\n\n return false;\n}\n","/*\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 { stringifyEntityRef } from '@backstage/catalog-model';\nimport { ResourcePermission } from '@backstage/plugin-permission-common';\nimport { usePermission } from '@backstage/plugin-permission-react';\nimport { useAsyncEntity } from './useEntity';\n\n/**\n * A thin wrapper around the\n * {@link @backstage/plugin-permission-react#usePermission} hook which uses the\n * current entity in context to make an authorization request for the given\n * {@link @backstage/plugin-catalog-common#CatalogEntityPermission}.\n *\n * Note: this hook blocks the permission request until the entity has loaded in\n * context. If you have the entityRef and need concurrent requests, use the\n * `usePermission` hook directly.\n * @alpha\n */\nexport function useEntityPermission(\n // TODO(joeporpeglia) Replace with `CatalogEntityPermission` when the issue described in\n // https://github.com/backstage/backstage/pull/10128 is fixed.\n permission: ResourcePermission<'catalog-entity'>,\n): {\n loading: boolean;\n allowed: boolean;\n error?: Error;\n} {\n const {\n entity,\n loading: loadingEntity,\n error: entityError,\n } = useAsyncEntity();\n const {\n allowed,\n loading: loadingPermission,\n error: permissionError,\n } = usePermission({\n permission,\n resourceRef: entity ? stringifyEntityRef(entity) : undefined,\n });\n\n if (loadingEntity || loadingPermission) {\n return { loading: true, allowed: false };\n }\n if (entityError) {\n return { loading: false, allowed: false, error: entityError };\n }\n return { loading: false, allowed, error: permissionError };\n}\n","/*\n * Copyright 2023 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 AnyExtensionInputMap,\n ExtensionBoundary,\n ResolvedExtensionInputs,\n RouteRef,\n coreExtensionData,\n createExtension,\n createExtensionDataRef,\n createSchemaFromZod,\n} from '@backstage/frontend-plugin-api';\nimport React, { lazy } from 'react';\nimport { Entity } from '@backstage/catalog-model';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { Expand } from '../../../packages/frontend-plugin-api/src/types';\n\nexport { useEntityPermission } from './hooks/useEntityPermission';\nexport { isOwnerOf } from './utils';\n\n/** @alpha */\nexport const entityContentTitleExtensionDataRef =\n createExtensionDataRef<string>('plugin.catalog.entity.content.title');\n\n/** @alpha */\nexport const entityFilterFunctionExtensionDataRef = createExtensionDataRef<\n (entity: Entity) => boolean\n>('plugin.catalog.entity.filter.fn');\n\n/** @alpha */\nexport const entityFilterExpressionExtensionDataRef =\n createExtensionDataRef<string>('plugin.catalog.entity.filter.expression');\n\n// TODO: Figure out how to merge with provided config schema\n/** @alpha */\nexport function createEntityCardExtension<\n TInputs extends AnyExtensionInputMap,\n>(options: {\n namespace?: string;\n name?: string;\n attachTo?: { id: string; input: string };\n disabled?: boolean;\n inputs?: TInputs;\n filter?:\n | typeof entityFilterFunctionExtensionDataRef.T\n | typeof entityFilterExpressionExtensionDataRef.T;\n loader: (options: {\n inputs: Expand<ResolvedExtensionInputs<TInputs>>;\n }) => Promise<JSX.Element>;\n}) {\n return createExtension({\n kind: 'entity-card',\n namespace: options.namespace,\n name: options.name,\n attachTo: options.attachTo ?? {\n id: 'entity-content:catalog/overview',\n input: 'cards',\n },\n disabled: options.disabled ?? true,\n output: {\n element: coreExtensionData.reactElement,\n filterFunction: entityFilterFunctionExtensionDataRef.optional(),\n filterExpression: entityFilterExpressionExtensionDataRef.optional(),\n },\n inputs: options.inputs,\n configSchema: createSchemaFromZod(z =>\n z.object({\n filter: z.string().optional(),\n }),\n ),\n factory({ config, inputs, node }) {\n const ExtensionComponent = lazy(() =>\n options\n .loader({ inputs })\n .then(element => ({ default: () => element })),\n );\n\n return {\n element: (\n <ExtensionBoundary node={node}>\n <ExtensionComponent />\n </ExtensionBoundary>\n ),\n ...mergeFilters({ config, options }),\n };\n },\n });\n}\n\n/** @alpha */\nexport function createEntityContentExtension<\n TInputs extends AnyExtensionInputMap,\n>(options: {\n namespace?: string;\n name?: string;\n attachTo?: { id: string; input: string };\n disabled?: boolean;\n inputs?: TInputs;\n routeRef?: RouteRef;\n defaultPath: string;\n defaultTitle: string;\n filter?:\n | typeof entityFilterFunctionExtensionDataRef.T\n | typeof entityFilterExpressionExtensionDataRef.T;\n loader: (options: {\n inputs: Expand<ResolvedExtensionInputs<TInputs>>;\n }) => Promise<JSX.Element>;\n}) {\n return createExtension({\n kind: 'entity-content',\n namespace: options.namespace,\n name: options.name,\n attachTo: options.attachTo ?? {\n id: 'page:catalog/entity',\n input: 'contents',\n },\n disabled: options.disabled ?? true,\n output: {\n element: coreExtensionData.reactElement,\n path: coreExtensionData.routePath,\n routeRef: coreExtensionData.routeRef.optional(),\n title: entityContentTitleExtensionDataRef,\n filterFunction: entityFilterFunctionExtensionDataRef.optional(),\n filterExpression: entityFilterExpressionExtensionDataRef.optional(),\n },\n inputs: options.inputs,\n configSchema: createSchemaFromZod(z =>\n z.object({\n path: z.string().default(options.defaultPath),\n title: z.string().default(options.defaultTitle),\n filter: z.string().optional(),\n }),\n ),\n factory({ config, inputs, node }) {\n const ExtensionComponent = lazy(() =>\n options\n .loader({ inputs })\n .then(element => ({ default: () => element })),\n );\n\n return {\n path: config.path,\n title: config.title,\n routeRef: options.routeRef,\n element: (\n <ExtensionBoundary node={node} routable>\n <ExtensionComponent />\n </ExtensionBoundary>\n ),\n ...mergeFilters({ config, options }),\n };\n },\n });\n}\n\n/**\n * Decides what filter outputs to produce, given some options and config\n */\nfunction mergeFilters(inputs: {\n options: {\n filter?:\n | typeof entityFilterFunctionExtensionDataRef.T\n | typeof entityFilterExpressionExtensionDataRef.T;\n };\n config: {\n filter?: string;\n };\n}): {\n filterFunction?: typeof entityFilterFunctionExtensionDataRef.T;\n filterExpression?: typeof entityFilterExpressionExtensionDataRef.T;\n} {\n const { options, config } = inputs;\n if (config.filter) {\n return { filterExpression: config.filter };\n } else if (typeof options.filter === 'string') {\n return { filterExpression: options.filter };\n } else if (typeof options.filter === 'function') {\n return { filterFunction: options.filter };\n }\n return {};\n}\n"],"names":[],"mappings":";;;;;;;;AAkCgB,SAAA,SAAA,CAAU,OAAe,MAAgB,EAAA;AACvD,EAAA,MAAM,iBAAiB,IAAI,GAAA;AAAA,IACzB;AAAA,MACE,GAAG,kBAAmB,CAAA,KAAA,EAAO,oBAAoB,EAAE,IAAA,EAAM,SAAS,CAAA;AAAA,MAClE,GAAI,KAAQ,GAAA,CAAC,qBAAqB,KAAK,CAAC,IAAI,EAAC;AAAA,KAC/C,CAAE,IAAI,kBAAkB,CAAA;AAAA,GAC1B,CAAA;AAEA,EAAA,MAAM,MAAS,GAAA,kBAAA,CAAmB,MAAQ,EAAA,iBAAiB,CAAE,CAAA,GAAA;AAAA,IAC3D,kBAAA;AAAA,GACF,CAAA;AAEA,EAAA,KAAA,MAAW,aAAa,MAAQ,EAAA;AAC9B,IAAI,IAAA,cAAA,CAAe,GAAI,CAAA,SAAS,CAAG,EAAA;AACjC,MAAO,OAAA,IAAA,CAAA;AAAA,KACT;AAAA,GACF;AAEA,EAAO,OAAA,KAAA,CAAA;AACT;;ACrBO,SAAS,oBAGd,UAKA,EAAA;AACA,EAAM,MAAA;AAAA,IACJ,MAAA;AAAA,IACA,OAAS,EAAA,aAAA;AAAA,IACT,KAAO,EAAA,WAAA;AAAA,MACL,cAAe,EAAA,CAAA;AACnB,EAAM,MAAA;AAAA,IACJ,OAAA;AAAA,IACA,OAAS,EAAA,iBAAA;AAAA,IACT,KAAO,EAAA,eAAA;AAAA,MACL,aAAc,CAAA;AAAA,IAChB,UAAA;AAAA,IACA,WAAa,EAAA,MAAA,GAAS,kBAAmB,CAAA,MAAM,CAAI,GAAA,KAAA,CAAA;AAAA,GACpD,CAAA,CAAA;AAED,EAAA,IAAI,iBAAiB,iBAAmB,EAAA;AACtC,IAAA,OAAO,EAAE,OAAA,EAAS,IAA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EAAW,GAAA,MAAA,CAAA;AAC5B,EAAA,IAAI,OAAO,MAAQ,EAAA;AACjB,IAAO,OAAA,EAAE,gBAAkB,EAAA,MAAA,CAAO,MAAO,EAAA,CAAA;AAAA,GAChC,MAAA,IAAA,OAAO,OAAQ,CAAA,MAAA,KAAW,QAAU,EAAA;AAC7C,IAAO,OAAA,EAAE,gBAAkB,EAAA,OAAA,CAAQ,MAAO,EAAA,CAAA;AAAA,GACjC,MAAA,IAAA,OAAO,OAAQ,CAAA,MAAA,KAAW,UAAY,EAAA;AAC/C,IAAO,OAAA,EAAE,cAAgB,EAAA,OAAA,CAAQ,MAAO,EAAA,CAAA;AAAA,GAC1C;AACA,EAAA,OAAO,EAAC,CAAA;AACV;;;;"}
1
+ {"version":3,"file":"alpha.esm.js","sources":["../src/utils/isOwnerOf.ts","../src/hooks/useEntityPermission.ts","../src/alpha.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 {\n Entity,\n getCompoundEntityRef,\n RELATION_MEMBER_OF,\n RELATION_OWNED_BY,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport { getEntityRelations } from './getEntityRelations';\n\n/**\n * Returns true if the `owner` argument is a direct owner on the `entity` argument.\n *\n * @alpha\n * @remarks\n *\n * Note that this ownership is not the same as using the claims in the auth-resolver, it only will take into account ownership as expressed by direct entity relations.\n * It doesn't know anything about the additional groups that a user might belong to which the claims contain.\n */\nexport function isOwnerOf(owner: Entity, entity: Entity) {\n const possibleOwners = new Set(\n [\n ...getEntityRelations(owner, RELATION_MEMBER_OF, { kind: 'group' }),\n ...(owner ? [getCompoundEntityRef(owner)] : []),\n ].map(stringifyEntityRef),\n );\n\n const owners = getEntityRelations(entity, RELATION_OWNED_BY).map(\n stringifyEntityRef,\n );\n\n for (const ownerItem of owners) {\n if (possibleOwners.has(ownerItem)) {\n return true;\n }\n }\n\n return false;\n}\n","/*\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 { stringifyEntityRef } from '@backstage/catalog-model';\nimport { ResourcePermission } from '@backstage/plugin-permission-common';\nimport { usePermission } from '@backstage/plugin-permission-react';\nimport { useAsyncEntity } from './useEntity';\n\n/**\n * A thin wrapper around the\n * {@link @backstage/plugin-permission-react#usePermission} hook which uses the\n * current entity in context to make an authorization request for the given\n * {@link @backstage/plugin-catalog-common#CatalogEntityPermission}.\n *\n * Note: this hook blocks the permission request until the entity has loaded in\n * context. If you have the entityRef and need concurrent requests, use the\n * `usePermission` hook directly.\n * @alpha\n */\nexport function useEntityPermission(\n // TODO(joeporpeglia) Replace with `CatalogEntityPermission` when the issue described in\n // https://github.com/backstage/backstage/pull/10128 is fixed.\n permission: ResourcePermission<'catalog-entity'>,\n): {\n loading: boolean;\n allowed: boolean;\n error?: Error;\n} {\n const {\n entity,\n loading: loadingEntity,\n error: entityError,\n } = useAsyncEntity();\n const {\n allowed,\n loading: loadingPermission,\n error: permissionError,\n } = usePermission({\n permission,\n resourceRef: entity ? stringifyEntityRef(entity) : undefined,\n });\n\n if (loadingEntity || loadingPermission) {\n return { loading: true, allowed: false };\n }\n if (entityError) {\n return { loading: false, allowed: false, error: entityError };\n }\n return { loading: false, allowed, error: permissionError };\n}\n","/*\n * Copyright 2023 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 AnyExtensionInputMap,\n ExtensionBoundary,\n ResolvedExtensionInputs,\n RouteRef,\n coreExtensionData,\n createExtension,\n createExtensionDataRef,\n createSchemaFromZod,\n} from '@backstage/frontend-plugin-api';\nimport React, { lazy } from 'react';\nimport { Entity } from '@backstage/catalog-model';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { Expand } from '../../../packages/frontend-plugin-api/src/types';\n\nexport { useEntityPermission } from './hooks/useEntityPermission';\nexport { isOwnerOf } from './utils';\n\n/** @alpha */\nexport const catalogExtensionData = {\n entityContentTitle: createExtensionDataRef<string>(\n 'catalog.entity-content-title',\n ),\n entityFilterFunction: createExtensionDataRef<(entity: Entity) => boolean>(\n 'catalog.entity-filter-function',\n ),\n entityFilterExpression: createExtensionDataRef<string>(\n 'catalog.entity-filter-expression',\n ),\n};\n\n// TODO: Figure out how to merge with provided config schema\n/** @alpha */\nexport function createEntityCardExtension<\n TInputs extends AnyExtensionInputMap,\n>(options: {\n namespace?: string;\n name?: string;\n attachTo?: { id: string; input: string };\n disabled?: boolean;\n inputs?: TInputs;\n filter?:\n | typeof catalogExtensionData.entityFilterFunction.T\n | typeof catalogExtensionData.entityFilterExpression.T;\n loader: (options: {\n inputs: Expand<ResolvedExtensionInputs<TInputs>>;\n }) => Promise<JSX.Element>;\n}) {\n return createExtension({\n kind: 'entity-card',\n namespace: options.namespace,\n name: options.name,\n attachTo: options.attachTo ?? {\n id: 'entity-content:catalog/overview',\n input: 'cards',\n },\n disabled: options.disabled ?? true,\n output: {\n element: coreExtensionData.reactElement,\n filterFunction: catalogExtensionData.entityFilterFunction.optional(),\n filterExpression: catalogExtensionData.entityFilterExpression.optional(),\n },\n inputs: options.inputs,\n configSchema: createSchemaFromZod(z =>\n z.object({\n filter: z.string().optional(),\n }),\n ),\n factory({ config, inputs, node }) {\n const ExtensionComponent = lazy(() =>\n options\n .loader({ inputs })\n .then(element => ({ default: () => element })),\n );\n\n return {\n element: (\n <ExtensionBoundary node={node}>\n <ExtensionComponent />\n </ExtensionBoundary>\n ),\n ...mergeFilters({ config, options }),\n };\n },\n });\n}\n\n/** @alpha */\nexport function createEntityContentExtension<\n TInputs extends AnyExtensionInputMap,\n>(options: {\n namespace?: string;\n name?: string;\n attachTo?: { id: string; input: string };\n disabled?: boolean;\n inputs?: TInputs;\n routeRef?: RouteRef;\n defaultPath: string;\n defaultTitle: string;\n filter?:\n | typeof catalogExtensionData.entityFilterFunction.T\n | typeof catalogExtensionData.entityFilterExpression.T;\n loader: (options: {\n inputs: Expand<ResolvedExtensionInputs<TInputs>>;\n }) => Promise<JSX.Element>;\n}) {\n return createExtension({\n kind: 'entity-content',\n namespace: options.namespace,\n name: options.name,\n attachTo: options.attachTo ?? {\n id: 'page:catalog/entity',\n input: 'contents',\n },\n disabled: options.disabled ?? true,\n output: {\n element: coreExtensionData.reactElement,\n path: coreExtensionData.routePath,\n routeRef: coreExtensionData.routeRef.optional(),\n title: catalogExtensionData.entityContentTitle,\n filterFunction: catalogExtensionData.entityFilterFunction.optional(),\n filterExpression: catalogExtensionData.entityFilterExpression.optional(),\n },\n inputs: options.inputs,\n configSchema: createSchemaFromZod(z =>\n z.object({\n path: z.string().default(options.defaultPath),\n title: z.string().default(options.defaultTitle),\n filter: z.string().optional(),\n }),\n ),\n factory({ config, inputs, node }) {\n const ExtensionComponent = lazy(() =>\n options\n .loader({ inputs })\n .then(element => ({ default: () => element })),\n );\n\n return {\n path: config.path,\n title: config.title,\n routeRef: options.routeRef,\n element: (\n <ExtensionBoundary node={node} routable>\n <ExtensionComponent />\n </ExtensionBoundary>\n ),\n ...mergeFilters({ config, options }),\n };\n },\n });\n}\n\n/**\n * Decides what filter outputs to produce, given some options and config\n */\nfunction mergeFilters(inputs: {\n options: {\n filter?:\n | typeof catalogExtensionData.entityFilterFunction.T\n | typeof catalogExtensionData.entityFilterExpression.T;\n };\n config: {\n filter?: string;\n };\n}): {\n filterFunction?: typeof catalogExtensionData.entityFilterFunction.T;\n filterExpression?: typeof catalogExtensionData.entityFilterExpression.T;\n} {\n const { options, config } = inputs;\n if (config.filter) {\n return { filterExpression: config.filter };\n } else if (typeof options.filter === 'string') {\n return { filterExpression: options.filter };\n } else if (typeof options.filter === 'function') {\n return { filterFunction: options.filter };\n }\n return {};\n}\n"],"names":[],"mappings":";;;;;;;;AAkCgB,SAAA,SAAA,CAAU,OAAe,MAAgB,EAAA;AACvD,EAAA,MAAM,iBAAiB,IAAI,GAAA;AAAA,IACzB;AAAA,MACE,GAAG,kBAAmB,CAAA,KAAA,EAAO,oBAAoB,EAAE,IAAA,EAAM,SAAS,CAAA;AAAA,MAClE,GAAI,KAAQ,GAAA,CAAC,qBAAqB,KAAK,CAAC,IAAI,EAAC;AAAA,KAC/C,CAAE,IAAI,kBAAkB,CAAA;AAAA,GAC1B,CAAA;AAEA,EAAA,MAAM,MAAS,GAAA,kBAAA,CAAmB,MAAQ,EAAA,iBAAiB,CAAE,CAAA,GAAA;AAAA,IAC3D,kBAAA;AAAA,GACF,CAAA;AAEA,EAAA,KAAA,MAAW,aAAa,MAAQ,EAAA;AAC9B,IAAI,IAAA,cAAA,CAAe,GAAI,CAAA,SAAS,CAAG,EAAA;AACjC,MAAO,OAAA,IAAA,CAAA;AAAA,KACT;AAAA,GACF;AAEA,EAAO,OAAA,KAAA,CAAA;AACT;;ACrBO,SAAS,oBAGd,UAKA,EAAA;AACA,EAAM,MAAA;AAAA,IACJ,MAAA;AAAA,IACA,OAAS,EAAA,aAAA;AAAA,IACT,K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AA,CAAK,CAAY,OAAA,MAAA,EAAE,OAAS,EAAA,MAAM,SAAU,CAAA,CAAA;AAAA,OACjD,CAAA;AAEA,MAAO,OAAA;AAAA,QACL,MAAM,MAAO,CAAA,IAAA;AAAA,QACb,OAAO,MAAO,CAAA,KAAA;AAAA,QACd,UAAU,OAAQ,CAAA,QAAA;AAAA,QAClB,OAAA,sCACG,iBAAkB,EAAA,EAAA,IAAA,EAAY,UAAQ,IACrC,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,wBAAmB,CACtB,CAAA;AAAA,QAEF,GAAG,YAAA,CAAa,EAAE,MAAA,EAAQ,SAAS,CAAA;AAAA,OACrC,CAAA;AAAA,KACF;AAAA,GACD,CAAA,CAAA;AACH,CAAA;AAKA,SAAS,aAAa,MAYpB,EAAA;AACA,EAAM,MAAA,EAAE,OAAS,EAAA,MAAA,EAAW,GAAA,MAAA,CAAA;AAC5B,EAAA,IAAI,OAAO,MAAQ,EAAA;AACjB,IAAO,OAAA,EAAE,gBAAkB,EAAA,MAAA,CAAO,MAAO,EAAA,CAAA;AAAA,GAChC,MAAA,IAAA,OAAO,OAAQ,CAAA,MAAA,KAAW,QAAU,EAAA;AAC7C,IAAO,OAAA,EAAE,gBAAkB,EAAA,OAAA,CAAQ,MAAO,EAAA,CAAA;AAAA,GACjC,MAAA,IAAA,OAAO,OAAQ,CAAA,MAAA,KAAW,UAAY,EAAA;AAC/C,IAAO,OAAA,EAAE,cAAgB,EAAA,OAAA,CAAQ,MAAO,EAAA,CAAA;AAAA,GAC1C;AACA,EAAA,OAAO,EAAC,CAAA;AACV;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-react",
3
3
  "description": "A frontend library that helps other Backstage plugins interact with the catalog",
4
- "version": "1.9.2-next.3",
4
+ "version": "1.9.3-next.0",
5
5
  "main": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -44,17 +44,16 @@
44
44
  "start": "backstage-cli package start"
45
45
  },
46
46
  "dependencies": {
47
- "@backstage/catalog-client": "^1.5.0-next.1",
47
+ "@backstage/catalog-client": "^1.5.2-next.0",
48
48
  "@backstage/catalog-model": "^1.4.3",
49
- "@backstage/core-components": "^0.13.9-next.3",
50
- "@backstage/core-plugin-api": "^1.8.1-next.1",
49
+ "@backstage/core-components": "^0.13.10-next.0",
50
+ "@backstage/core-plugin-api": "^1.8.1",
51
51
  "@backstage/errors": "^1.2.3",
52
- "@backstage/frontend-plugin-api": "^0.4.0-next.3",
53
- "@backstage/integration-react": "^1.1.22-next.1",
54
- "@backstage/plugin-catalog-common": "^1.0.18",
55
- "@backstage/plugin-permission-common": "^0.7.10",
56
- "@backstage/plugin-permission-react": "^0.4.18-next.1",
57
- "@backstage/theme": "^0.5.0-next.1",
52
+ "@backstage/frontend-plugin-api": "^0.4.1-next.0",
53
+ "@backstage/integration-react": "^1.1.22",
54
+ "@backstage/plugin-catalog-common": "^1.0.19",
55
+ "@backstage/plugin-permission-common": "^0.7.11",
56
+ "@backstage/plugin-permission-react": "^0.4.19-next.0",
58
57
  "@backstage/types": "^1.1.1",
59
58
  "@backstage/version-bridge": "^1.0.7",
60
59
  "@material-ui/core": "^4.12.2",
@@ -76,11 +75,11 @@
76
75
  "react-router-dom": "6.0.0-beta.0 || ^6.3.0"
77
76
  },
78
77
  "devDependencies": {
79
- "@backstage/cli": "^0.25.0-next.3",
80
- "@backstage/core-app-api": "^1.11.2-next.1",
81
- "@backstage/plugin-catalog-common": "^1.0.18",
82
- "@backstage/plugin-scaffolder-common": "^1.4.3",
83
- "@backstage/test-utils": "^1.4.6-next.2",
78
+ "@backstage/cli": "^0.25.1-next.0",
79
+ "@backstage/core-app-api": "^1.11.2",
80
+ "@backstage/plugin-catalog-common": "^1.0.19",
81
+ "@backstage/plugin-scaffolder-common": "^1.4.4",
82
+ "@backstage/test-utils": "^1.4.7-next.0",
84
83
  "@testing-library/dom": "^9.0.0",
85
84
  "@testing-library/jest-dom": "^6.0.0",
86
85
  "@testing-library/react": "^14.0.0",