@backstage/plugin-catalog-react 1.20.0-next.2 → 1.20.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.
Files changed (98) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/alpha/blueprints/CatalogFilterBlueprint.esm.js.map +1 -1
  3. package/dist/alpha/blueprints/EntityCardBlueprint.esm.js +1 -1
  4. package/dist/alpha/blueprints/EntityCardBlueprint.esm.js.map +1 -1
  5. package/dist/alpha/blueprints/EntityContentBlueprint.esm.js +5 -5
  6. package/dist/alpha/blueprints/EntityContentBlueprint.esm.js.map +1 -1
  7. package/dist/alpha/blueprints/EntityContentLayoutBlueprint.esm.js +1 -1
  8. package/dist/alpha/blueprints/EntityContentLayoutBlueprint.esm.js.map +1 -1
  9. package/dist/alpha/blueprints/EntityContextMenuItemBlueprint.esm.js.map +1 -1
  10. package/dist/alpha/blueprints/EntityHeaderBlueprint.esm.js.map +1 -1
  11. package/dist/alpha/blueprints/EntityIconLinkBlueprint.esm.js +1 -1
  12. package/dist/alpha/blueprints/EntityIconLinkBlueprint.esm.js.map +1 -1
  13. package/dist/alpha/blueprints/extensionData.esm.js.map +1 -1
  14. package/dist/alpha/blueprints/resolveEntityFilterData.esm.js.map +1 -1
  15. package/dist/alpha/converters/convertLegacyEntityCardExtension.esm.js.map +1 -1
  16. package/dist/alpha/converters/convertLegacyEntityContentExtension.esm.js +3 -3
  17. package/dist/alpha/converters/convertLegacyEntityContentExtension.esm.js.map +1 -1
  18. package/dist/alpha/predicates/createEntityPredicateSchema.esm.js.map +1 -1
  19. package/dist/alpha/predicates/entityPredicateToFilterFunction.esm.js.map +1 -1
  20. package/dist/alpha/predicates/valueAtPath.esm.js.map +1 -1
  21. package/dist/api.esm.js.map +1 -1
  22. package/dist/apis/EntityPresentationApi/EntityPresentationApi.esm.js.map +1 -1
  23. package/dist/apis/EntityPresentationApi/defaultEntityPresentation.esm.js.map +1 -1
  24. package/dist/apis/EntityPresentationApi/useEntityPresentation.esm.js.map +1 -1
  25. package/dist/apis/EntityPresentationApi/useUpdatingObservable.esm.js.map +1 -1
  26. package/dist/apis/StarredEntitiesApi/MockStarredEntitiesApi.esm.js.map +1 -1
  27. package/dist/apis/StarredEntitiesApi/StarredEntitiesApi.esm.js.map +1 -1
  28. package/dist/components/CatalogAutocomplete/CatalogAutocomplete.esm.js.map +1 -1
  29. package/dist/components/CatalogFilterLayout/CatalogFilterLayout.esm.js.map +1 -1
  30. package/dist/components/DefaultFilters/DefaultFilters.esm.js.map +1 -1
  31. package/dist/components/EntityAutocompletePicker/EntityAutocompletePicker.esm.js.map +1 -1
  32. package/dist/components/EntityAutocompletePicker/EntityAutocompletePickerOption.esm.js.map +1 -1
  33. package/dist/components/EntityDisplayName/EntityDisplayName.esm.js.map +1 -1
  34. package/dist/components/EntityKindPicker/EntityKindPicker.esm.js.map +1 -1
  35. package/dist/components/EntityKindPicker/kindFilterUtils.esm.js.map +1 -1
  36. package/dist/components/EntityLifecyclePicker/EntityLifecyclePicker.esm.js.map +1 -1
  37. package/dist/components/EntityNamespacePicker/EntityNamespacePicker.esm.js.map +1 -1
  38. package/dist/components/EntityOwnerPicker/EntityOwnerPicker.esm.js.map +1 -1
  39. package/dist/components/EntityOwnerPicker/useFacetsEntities.esm.js.map +1 -1
  40. package/dist/components/EntityOwnerPicker/useFetchEntities.esm.js.map +1 -1
  41. package/dist/components/EntityOwnerPicker/useQueryEntities.esm.js.map +1 -1
  42. package/dist/components/EntityPeekAheadPopover/CardActionComponents/EmailCardAction.esm.js.map +1 -1
  43. package/dist/components/EntityPeekAheadPopover/CardActionComponents/EntityCardActions.esm.js.map +1 -1
  44. package/dist/components/EntityPeekAheadPopover/CardActionComponents/GroupCardActions.esm.js.map +1 -1
  45. package/dist/components/EntityPeekAheadPopover/CardActionComponents/UserCardActions.esm.js.map +1 -1
  46. package/dist/components/EntityPeekAheadPopover/EntityPeekAheadPopover.esm.js.map +1 -1
  47. package/dist/components/EntityProcessingStatusPicker/EntityProcessingStatusPicker.esm.js.map +1 -1
  48. package/dist/components/EntityRefLink/EntityRefLink.esm.js.map +1 -1
  49. package/dist/components/EntityRefLink/EntityRefLinks.esm.js.map +1 -1
  50. package/dist/components/EntityRefLink/humanize.esm.js.map +1 -1
  51. package/dist/components/EntitySearchBar/EntitySearchBar.esm.js.map +1 -1
  52. package/dist/components/EntityTable/EntityTable.esm.js.map +1 -1
  53. package/dist/components/EntityTable/columns.esm.js +1 -1
  54. package/dist/components/EntityTable/columns.esm.js.map +1 -1
  55. package/dist/components/EntityTable/presets.esm.js.map +1 -1
  56. package/dist/components/EntityTagPicker/EntityTagPicker.esm.js.map +1 -1
  57. package/dist/components/EntityTypePicker/EntityTypePicker.esm.js.map +1 -1
  58. package/dist/components/FavoriteEntity/FavoriteEntity.esm.js.map +1 -1
  59. package/dist/components/InspectEntityDialog/InspectEntityDialog.esm.js.map +1 -1
  60. package/dist/components/InspectEntityDialog/components/AncestryPage.esm.js.map +1 -1
  61. package/dist/components/InspectEntityDialog/components/ColocatedPage.esm.js.map +1 -1
  62. package/dist/components/InspectEntityDialog/components/EntityKindIcon.esm.js.map +1 -1
  63. package/dist/components/InspectEntityDialog/components/JsonPage.esm.js.map +1 -1
  64. package/dist/components/InspectEntityDialog/components/OverviewPage.esm.js +1 -1
  65. package/dist/components/InspectEntityDialog/components/OverviewPage.esm.js.map +1 -1
  66. package/dist/components/InspectEntityDialog/components/YamlPage.esm.js.map +1 -1
  67. package/dist/components/InspectEntityDialog/components/common.esm.js.map +1 -1
  68. package/dist/components/InspectEntityDialog/components/util.esm.js.map +1 -1
  69. package/dist/components/MissingAnnotationEmptyState/MissingAnnotationEmptyState.esm.js.map +1 -1
  70. package/dist/components/UnregisterEntityDialog/UnregisterEntityDialog.esm.js.map +1 -1
  71. package/dist/components/UnregisterEntityDialog/useUnregisterEntityDialogState.esm.js.map +1 -1
  72. package/dist/components/UserListPicker/UserListPicker.esm.js.map +1 -1
  73. package/dist/components/UserListPicker/useAllEntitiesCount.esm.js.map +1 -1
  74. package/dist/components/UserListPicker/useOwnedEntitiesCount.esm.js.map +1 -1
  75. package/dist/components/UserListPicker/useStarredEntitiesCount.esm.js.map +1 -1
  76. package/dist/deprecated.esm.js.map +1 -1
  77. package/dist/filters.esm.js.map +1 -1
  78. package/dist/hooks/useEntity.esm.js +1 -1
  79. package/dist/hooks/useEntity.esm.js.map +1 -1
  80. package/dist/hooks/useEntityContextMenu.esm.js.map +1 -1
  81. package/dist/hooks/useEntityListProvider.esm.js +1 -1
  82. package/dist/hooks/useEntityListProvider.esm.js.map +1 -1
  83. package/dist/hooks/useEntityOwnership.esm.js.map +1 -1
  84. package/dist/hooks/useEntityPermission.esm.js.map +1 -1
  85. package/dist/hooks/useEntityTypeFilter.esm.js.map +1 -1
  86. package/dist/hooks/useRelatedEntities.esm.js.map +1 -1
  87. package/dist/hooks/useStarredEntities.esm.js.map +1 -1
  88. package/dist/hooks/useStarredEntity.esm.js.map +1 -1
  89. package/dist/routes.esm.js.map +1 -1
  90. package/dist/testUtils/MockEntityListContextProvider.esm.js.map +1 -1
  91. package/dist/testUtils/catalogApiMock.esm.js.map +1 -1
  92. package/dist/translation.esm.js.map +1 -1
  93. package/dist/utils/filters.esm.js.map +1 -1
  94. package/dist/utils/getEntityRelations.esm.js.map +1 -1
  95. package/dist/utils/getEntitySourceLocation.esm.js.map +1 -1
  96. package/dist/utils/isOwnerOf.esm.js +1 -1
  97. package/dist/utils/isOwnerOf.esm.js.map +1 -1
  98. package/package.json +20 -20
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @backstage/plugin-catalog-react
2
2
 
3
+ ## 1.20.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 65b6a7c: Support `default*` for older packages as this package is in range for breaking `/alpha` changes
8
+
9
+ ## 1.20.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 3f4da39: Added the `analyzeLocation` method to `catalogApiMock`
14
+ - e4ddf22: **BREAKING ALPHA**: The `defaultPath`, `defaultTitle`, and `defaultGroup` params of `PageBlueprint` has been renamed to `path`, `title`, and `group`. The `convertLegacyEntityContentExtension` utility has also received the same change. This change does not affect the compatibility of extensions created with older versions of this blueprint.
15
+
16
+ ### Patch Changes
17
+
18
+ - 77eebdc: Support `filter` parameter on the `EntityHeaderBlueprint`
19
+ - a3a878d: Adding `type` as an override to the `convertLegacyEntityCardExtension`
20
+ - defc243: hide pagination `queryparams` if pagination mode is set to none
21
+ - Updated dependencies
22
+ - @backstage/core-components@0.17.5
23
+ - @backstage/frontend-plugin-api@0.11.0
24
+ - @backstage/frontend-test-utils@0.3.5
25
+ - @backstage/core-compat-api@0.5.0
26
+ - @backstage/catalog-client@1.11.0
27
+
3
28
  ## 1.20.0-next.2
4
29
 
5
30
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"CatalogFilterBlueprint.esm.js","sources":["../../../src/alpha/blueprints/CatalogFilterBlueprint.ts"],"sourcesContent":["/*\n * Copyright 2024 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 ExtensionBoundary,\n coreExtensionData,\n createExtensionBlueprint,\n} from '@backstage/frontend-plugin-api';\n\n/**\n * Creates Catalog Filter Extensions\n * @alpha\n */\nexport const CatalogFilterBlueprint = createExtensionBlueprint({\n kind: 'catalog-filter',\n attachTo: { id: 'page:catalog', input: 'filters' },\n output: [coreExtensionData.reactElement],\n factory(params: { loader: () => Promise<JSX.Element> }, { node }) {\n return [\n coreExtensionData.reactElement(\n ExtensionBoundary.lazy(node, params.loader),\n ),\n ];\n },\n});\n"],"names":[],"mappings":";;AA0BO,MAAM,yBAAyB,wBAAyB,CAAA;AAAA,EAC7D,IAAM,EAAA,gBAAA;AAAA,EACN,QAAU,EAAA,EAAE,EAAI,EAAA,cAAA,EAAgB,OAAO,SAAU,EAAA;AAAA,EACjD,MAAA,EAAQ,CAAC,iBAAA,CAAkB,YAAY,CAAA;AAAA,EACvC,OAAQ,CAAA,MAAA,EAAgD,EAAE,IAAA,EAAQ,EAAA;AAChE,IAAO,OAAA;AAAA,MACL,iBAAkB,CAAA,YAAA;AAAA,QAChB,iBAAkB,CAAA,IAAA,CAAK,IAAM,EAAA,MAAA,CAAO,MAAM;AAAA;AAC5C,KACF;AAAA;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"CatalogFilterBlueprint.esm.js","sources":["../../../src/alpha/blueprints/CatalogFilterBlueprint.ts"],"sourcesContent":["/*\n * Copyright 2024 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 ExtensionBoundary,\n coreExtensionData,\n createExtensionBlueprint,\n} from '@backstage/frontend-plugin-api';\n\n/**\n * Creates Catalog Filter Extensions\n * @alpha\n */\nexport const CatalogFilterBlueprint = createExtensionBlueprint({\n kind: 'catalog-filter',\n attachTo: { id: 'page:catalog', input: 'filters' },\n output: [coreExtensionData.reactElement],\n factory(params: { loader: () => Promise<JSX.Element> }, { node }) {\n return [\n coreExtensionData.reactElement(\n ExtensionBoundary.lazy(node, params.loader),\n ),\n ];\n },\n});\n"],"names":[],"mappings":";;AA0BO,MAAM,yBAAyB,wBAAA,CAAyB;AAAA,EAC7D,IAAA,EAAM,gBAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,cAAA,EAAgB,OAAO,SAAA,EAAU;AAAA,EACjD,MAAA,EAAQ,CAAC,iBAAA,CAAkB,YAAY,CAAA;AAAA,EACvC,OAAA,CAAQ,MAAA,EAAgD,EAAE,IAAA,EAAK,EAAG;AAChE,IAAA,OAAO;AAAA,MACL,iBAAA,CAAkB,YAAA;AAAA,QAChB,iBAAA,CAAkB,IAAA,CAAK,IAAA,EAAM,MAAA,CAAO,MAAM;AAAA;AAC5C,KACF;AAAA,EACF;AACF,CAAC;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { createExtensionBlueprint, coreExtensionData, ExtensionBoundary } from '@backstage/frontend-plugin-api';
2
- import { entityFilterFunctionDataRef, entityFilterExpressionDataRef, entityCardTypeDataRef, entityCardTypes } from './extensionData.esm.js';
2
+ import { entityCardTypeDataRef, entityFilterExpressionDataRef, entityFilterFunctionDataRef, entityCardTypes } from './extensionData.esm.js';
3
3
  import { createEntityPredicateSchema } from '../predicates/createEntityPredicateSchema.esm.js';
4
4
  import { resolveEntityFilterData } from './resolveEntityFilterData.esm.js';
5
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"EntityCardBlueprint.esm.js","sources":["../../../src/alpha/blueprints/EntityCardBlueprint.ts"],"sourcesContent":["/*\n * Copyright 2024 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 ExtensionBoundary,\n coreExtensionData,\n createExtensionBlueprint,\n} from '@backstage/frontend-plugin-api';\nimport {\n entityFilterFunctionDataRef,\n entityFilterExpressionDataRef,\n entityCardTypeDataRef,\n entityCardTypes,\n EntityCardType,\n} from './extensionData';\nimport { createEntityPredicateSchema } from '../predicates/createEntityPredicateSchema';\nimport { EntityPredicate } from '../predicates';\nimport { resolveEntityFilterData } from './resolveEntityFilterData';\nimport { Entity } from '@backstage/catalog-model';\n\n/**\n * @alpha\n * A blueprint for creating cards for the entity pages in the catalog.\n */\nexport const EntityCardBlueprint = createExtensionBlueprint({\n kind: 'entity-card',\n attachTo: { id: 'entity-content:catalog/overview', input: 'cards' },\n output: [\n coreExtensionData.reactElement,\n entityFilterFunctionDataRef.optional(),\n entityFilterExpressionDataRef.optional(),\n entityCardTypeDataRef.optional(),\n ],\n dataRefs: {\n filterFunction: entityFilterFunctionDataRef,\n filterExpression: entityFilterExpressionDataRef,\n type: entityCardTypeDataRef,\n },\n config: {\n schema: {\n filter: z =>\n z.union([z.string(), createEntityPredicateSchema(z)]).optional(),\n type: z => z.enum(entityCardTypes).optional(),\n },\n },\n *factory(\n {\n loader,\n filter,\n type,\n }: {\n loader: () => Promise<JSX.Element>;\n filter?: string | EntityPredicate | ((entity: Entity) => boolean);\n type?: EntityCardType;\n },\n { node, config },\n ) {\n yield coreExtensionData.reactElement(ExtensionBoundary.lazy(node, loader));\n\n yield* resolveEntityFilterData(filter, config, node);\n\n const finalType = config.type ?? type;\n if (finalType) {\n yield entityCardTypeDataRef(finalType);\n } else {\n // eslint-disable-next-line no-console\n console.warn(\n `DEPRECATION WARNING: Not providing type for entity cards is deprecated. Missing from '${node.spec.id}'`,\n );\n }\n },\n});\n"],"names":[],"mappings":";;;;;AAqCO,MAAM,sBAAsB,wBAAyB,CAAA;AAAA,EAC1D,IAAM,EAAA,aAAA;AAAA,EACN,QAAU,EAAA,EAAE,EAAI,EAAA,iCAAA,EAAmC,OAAO,OAAQ,EAAA;AAAA,EAClE,MAAQ,EAAA;AAAA,IACN,iBAAkB,CAAA,YAAA;AAAA,IAClB,4BAA4B,QAAS,EAAA;AAAA,IACrC,8BAA8B,QAAS,EAAA;AAAA,IACvC,sBAAsB,QAAS;AAAA,GACjC;AAAA,EACA,QAAU,EAAA;AAAA,IACR,cAAgB,EAAA,2BAAA;AAAA,IAChB,gBAAkB,EAAA,6BAAA;AAAA,IAClB,IAAM,EAAA;AAAA,GACR;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,MAAQ,EAAA;AAAA,MACN,MAAQ,EAAA,CAAA,CAAA,KACN,CAAE,CAAA,KAAA,CAAM,CAAC,CAAA,CAAE,MAAO,EAAA,EAAG,2BAA4B,CAAA,CAAC,CAAC,CAAC,EAAE,QAAS,EAAA;AAAA,MACjE,MAAM,CAAK,CAAA,KAAA,CAAA,CAAE,IAAK,CAAA,eAAe,EAAE,QAAS;AAAA;AAC9C,GACF;AAAA,EACA,CAAC,OACC,CAAA;AAAA,IACE,MAAA;AAAA,IACA,MAAA;AAAA,IACA;AAAA,GAMF,EAAA,EAAE,IAAM,EAAA,MAAA,EACR,EAAA;AACA,IAAA,MAAM,kBAAkB,YAAa,CAAA,iBAAA,CAAkB,IAAK,CAAA,IAAA,EAAM,MAAM,CAAC,CAAA;AAEzE,IAAO,OAAA,uBAAA,CAAwB,MAAQ,EAAA,MAAA,EAAQ,IAAI,CAAA;AAEnD,IAAM,MAAA,SAAA,GAAY,OAAO,IAAQ,IAAA,IAAA;AACjC,IAAA,IAAI,SAAW,EAAA;AACb,MAAA,MAAM,sBAAsB,SAAS,CAAA;AAAA,KAChC,MAAA;AAEL,MAAQ,OAAA,CAAA,IAAA;AAAA,QACN,CAAA,sFAAA,EAAyF,IAAK,CAAA,IAAA,CAAK,EAAE,CAAA,CAAA;AAAA,OACvG;AAAA;AACF;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"EntityCardBlueprint.esm.js","sources":["../../../src/alpha/blueprints/EntityCardBlueprint.ts"],"sourcesContent":["/*\n * Copyright 2024 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 ExtensionBoundary,\n coreExtensionData,\n createExtensionBlueprint,\n} from '@backstage/frontend-plugin-api';\nimport {\n entityFilterFunctionDataRef,\n entityFilterExpressionDataRef,\n entityCardTypeDataRef,\n entityCardTypes,\n EntityCardType,\n} from './extensionData';\nimport { createEntityPredicateSchema } from '../predicates/createEntityPredicateSchema';\nimport { EntityPredicate } from '../predicates';\nimport { resolveEntityFilterData } from './resolveEntityFilterData';\nimport { Entity } from '@backstage/catalog-model';\n\n/**\n * @alpha\n * A blueprint for creating cards for the entity pages in the catalog.\n */\nexport const EntityCardBlueprint = createExtensionBlueprint({\n kind: 'entity-card',\n attachTo: { id: 'entity-content:catalog/overview', input: 'cards' },\n output: [\n coreExtensionData.reactElement,\n entityFilterFunctionDataRef.optional(),\n entityFilterExpressionDataRef.optional(),\n entityCardTypeDataRef.optional(),\n ],\n dataRefs: {\n filterFunction: entityFilterFunctionDataRef,\n filterExpression: entityFilterExpressionDataRef,\n type: entityCardTypeDataRef,\n },\n config: {\n schema: {\n filter: z =>\n z.union([z.string(), createEntityPredicateSchema(z)]).optional(),\n type: z => z.enum(entityCardTypes).optional(),\n },\n },\n *factory(\n {\n loader,\n filter,\n type,\n }: {\n loader: () => Promise<JSX.Element>;\n filter?: string | EntityPredicate | ((entity: Entity) => boolean);\n type?: EntityCardType;\n },\n { node, config },\n ) {\n yield coreExtensionData.reactElement(ExtensionBoundary.lazy(node, loader));\n\n yield* resolveEntityFilterData(filter, config, node);\n\n const finalType = config.type ?? type;\n if (finalType) {\n yield entityCardTypeDataRef(finalType);\n } else {\n // eslint-disable-next-line no-console\n console.warn(\n `DEPRECATION WARNING: Not providing type for entity cards is deprecated. Missing from '${node.spec.id}'`,\n );\n }\n },\n});\n"],"names":[],"mappings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A,CAAK,IAAA,CAAK,EAAE,CAAA,CAAA;AAAA,OACvG;AAAA,IACF;AAAA,EACF;AACF,CAAC;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { createExtensionBlueprint, coreExtensionData, ExtensionBoundary } from '@backstage/frontend-plugin-api';
2
- import { entityContentTitleDataRef, entityFilterFunctionDataRef, entityFilterExpressionDataRef, entityContentGroupDataRef } from './extensionData.esm.js';
2
+ import { entityContentGroupDataRef, entityFilterExpressionDataRef, entityFilterFunctionDataRef, entityContentTitleDataRef } from './extensionData.esm.js';
3
3
  import { resolveEntityFilterData } from './resolveEntityFilterData.esm.js';
4
4
  import { createEntityPredicateSchema } from '../predicates/createEntityPredicateSchema.esm.js';
5
5
 
@@ -30,9 +30,9 @@ const EntityContentBlueprint = createExtensionBlueprint({
30
30
  }
31
31
  },
32
32
  *factory(params, { node, config }) {
33
- const path = config.path ?? params.path;
34
- const title = config.title ?? params.title;
35
- const group = config.group ?? params.group;
33
+ const path = config.path ?? params.path ?? params.defaultPath;
34
+ const title = config.title ?? params.title ?? params.defaultTitle;
35
+ const group = config.group ?? params.group ?? params.defaultGroup;
36
36
  yield coreExtensionData.reactElement(
37
37
  ExtensionBoundary.lazy(node, params.loader)
38
38
  );
@@ -42,7 +42,7 @@ const EntityContentBlueprint = createExtensionBlueprint({
42
42
  yield coreExtensionData.routeRef(params.routeRef);
43
43
  }
44
44
  yield* resolveEntityFilterData(params.filter, config, node);
45
- if (group) {
45
+ if (group && typeof group === "string") {
46
46
  yield entityContentGroupDataRef(group);
47
47
  }
48
48
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EntityContentBlueprint.esm.js","sources":["../../../src/alpha/blueprints/EntityContentBlueprint.ts"],"sourcesContent":["/*\n * Copyright 2024 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 coreExtensionData,\n createExtensionBlueprint,\n ExtensionBoundary,\n RouteRef,\n} from '@backstage/frontend-plugin-api';\nimport {\n entityContentTitleDataRef,\n entityFilterFunctionDataRef,\n entityFilterExpressionDataRef,\n entityContentGroupDataRef,\n defaultEntityContentGroups,\n} from './extensionData';\nimport { EntityPredicate } from '../predicates/types';\nimport { resolveEntityFilterData } from './resolveEntityFilterData';\nimport { createEntityPredicateSchema } from '../predicates/createEntityPredicateSchema';\nimport { Entity } from '@backstage/catalog-model';\n\n/**\n * @alpha\n * Creates an EntityContent extension.\n */\nexport const EntityContentBlueprint = createExtensionBlueprint({\n kind: 'entity-content',\n attachTo: { id: 'page:catalog/entity', input: 'contents' },\n output: [\n coreExtensionData.reactElement,\n coreExtensionData.routePath,\n entityContentTitleDataRef,\n coreExtensionData.routeRef.optional(),\n entityFilterFunctionDataRef.optional(),\n entityFilterExpressionDataRef.optional(),\n entityContentGroupDataRef.optional(),\n ],\n dataRefs: {\n title: entityContentTitleDataRef,\n filterFunction: entityFilterFunctionDataRef,\n filterExpression: entityFilterExpressionDataRef,\n group: entityContentGroupDataRef,\n },\n config: {\n schema: {\n path: z => z.string().optional(),\n title: z => z.string().optional(),\n filter: z =>\n z.union([z.string(), createEntityPredicateSchema(z)]).optional(),\n group: z => z.literal(false).or(z.string()).optional(),\n },\n },\n *factory(\n params: {\n /**\n * @deprecated Use the `path` param instead.\n */\n defaultPath?: [Error: `Use the 'path' param instead`];\n path: string;\n /**\n * @deprecated Use the `path` param instead.\n */\n defaultTitle?: [Error: `Use the 'title' param instead`];\n title: string;\n /**\n * @deprecated Use the `path` param instead.\n */\n defaultGroup?: [Error: `Use the 'group' param instead`];\n group?: keyof typeof defaultEntityContentGroups | (string & {});\n loader: () => Promise<JSX.Element>;\n routeRef?: RouteRef;\n filter?: string | EntityPredicate | ((entity: Entity) => boolean);\n },\n { node, config },\n ) {\n const path = config.path ?? params.path;\n const title = config.title ?? params.title;\n const group = config.group ?? params.group;\n\n yield coreExtensionData.reactElement(\n ExtensionBoundary.lazy(node, params.loader),\n );\n\n yield coreExtensionData.routePath(path);\n\n yield entityContentTitleDataRef(title);\n\n if (params.routeRef) {\n yield coreExtensionData.routeRef(params.routeRef);\n }\n\n yield* resolveEntityFilterData(params.filter, config, node);\n\n if (group) {\n yield entityContentGroupDataRef(group);\n }\n },\n});\n"],"names":[],"mappings":";;;;;AAsCO,MAAM,yBAAyB,wBAAyB,CAAA;AAAA,EAC7D,IAAM,EAAA,gBAAA;AAAA,EACN,QAAU,EAAA,EAAE,EAAI,EAAA,qBAAA,EAAuB,OAAO,UAAW,EAAA;AAAA,EACzD,MAAQ,EAAA;AAAA,IACN,iBAAkB,CAAA,YAAA;AAAA,IAClB,iBAAkB,CAAA,SAAA;AAAA,IAClB,yBAAA;AAAA,IACA,iBAAA,CAAkB,SAAS,QAAS,EAAA;AAAA,IACpC,4BAA4B,QAAS,EAAA;AAAA,IACrC,8BAA8B,QAAS,EAAA;AAAA,IACvC,0BAA0B,QAAS;AAAA,GACrC;AAAA,EACA,QAAU,EAAA;AAAA,IACR,KAAO,EAAA,yBAAA;AAAA,IACP,cAAgB,EAAA,2BAAA;AAAA,IAChB,gBAAkB,EAAA,6BAAA;AAAA,IAClB,KAAO,EAAA;AAAA,GACT;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,MAAQ,EAAA;AAAA,MACN,IAAM,EAAA,CAAA,CAAA,KAAK,CAAE,CAAA,MAAA,GAAS,QAAS,EAAA;AAAA,MAC/B,KAAO,EAAA,CAAA,CAAA,KAAK,CAAE,CAAA,MAAA,GAAS,QAAS,EAAA;AAAA,MAChC,MAAQ,EAAA,CAAA,CAAA,KACN,CAAE,CAAA,KAAA,CAAM,CAAC,CAAA,CAAE,MAAO,EAAA,EAAG,2BAA4B,CAAA,CAAC,CAAC,CAAC,EAAE,QAAS,EAAA;AAAA,MACjE,KAAA,EAAO,CAAK,CAAA,KAAA,CAAA,CAAE,OAAQ,CAAA,KAAK,CAAE,CAAA,EAAA,CAAG,CAAE,CAAA,MAAA,EAAQ,CAAA,CAAE,QAAS;AAAA;AACvD,GACF;AAAA,EACA,CAAC,OACC,CAAA,MAAA,EAoBA,EAAE,IAAA,EAAM,QACR,EAAA;AACA,IAAM,MAAA,IAAA,GAAO,MAAO,CAAA,IAAA,IAAQ,MAAO,CAAA,IAAA;AACnC,IAAM,MAAA,KAAA,GAAQ,MAAO,CAAA,KAAA,IAAS,MAAO,CAAA,KAAA;AACrC,IAAM,MAAA,KAAA,GAAQ,MAAO,CAAA,KAAA,IAAS,MAAO,CAAA,KAAA;AAErC,IAAA,MAAM,iBAAkB,CAAA,YAAA;AAAA,MACtB,iBAAkB,CAAA,IAAA,CAAK,IAAM,EAAA,MAAA,CAAO,MAAM;AAAA,KAC5C;AAEA,IAAM,MAAA,iBAAA,CAAkB,UAAU,IAAI,CAAA;AAEtC,IAAA,MAAM,0BAA0B,KAAK,CAAA;AAErC,IAAA,IAAI,OAAO,QAAU,EAAA;AACnB,MAAM,MAAA,iBAAA,CAAkB,QAAS,CAAA,MAAA,CAAO,QAAQ,CAAA;AAAA;AAGlD,IAAA,OAAO,uBAAwB,CAAA,MAAA,CAAO,MAAQ,EAAA,MAAA,EAAQ,IAAI,CAAA;AAE1D,IAAA,IAAI,KAAO,EAAA;AACT,MAAA,MAAM,0BAA0B,KAAK,CAAA;AAAA;AACvC;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"EntityContentBlueprint.esm.js","sources":["../../../src/alpha/blueprints/EntityContentBlueprint.ts"],"sourcesContent":["/*\n * Copyright 2024 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 coreExtensionData,\n createExtensionBlueprint,\n ExtensionBoundary,\n RouteRef,\n} from '@backstage/frontend-plugin-api';\nimport {\n entityContentTitleDataRef,\n entityFilterFunctionDataRef,\n entityFilterExpressionDataRef,\n entityContentGroupDataRef,\n defaultEntityContentGroups,\n} from './extensionData';\nimport { EntityPredicate } from '../predicates/types';\nimport { resolveEntityFilterData } from './resolveEntityFilterData';\nimport { createEntityPredicateSchema } from '../predicates/createEntityPredicateSchema';\nimport { Entity } from '@backstage/catalog-model';\n\n/**\n * @alpha\n * Creates an EntityContent extension.\n */\nexport const EntityContentBlueprint = createExtensionBlueprint({\n kind: 'entity-content',\n attachTo: { id: 'page:catalog/entity', input: 'contents' },\n output: [\n coreExtensionData.reactElement,\n coreExtensionData.routePath,\n entityContentTitleDataRef,\n coreExtensionData.routeRef.optional(),\n entityFilterFunctionDataRef.optional(),\n entityFilterExpressionDataRef.optional(),\n entityContentGroupDataRef.optional(),\n ],\n dataRefs: {\n title: entityContentTitleDataRef,\n filterFunction: entityFilterFunctionDataRef,\n filterExpression: entityFilterExpressionDataRef,\n group: entityContentGroupDataRef,\n },\n config: {\n schema: {\n path: z => z.string().optional(),\n title: z => z.string().optional(),\n filter: z =>\n z.union([z.string(), createEntityPredicateSchema(z)]).optional(),\n group: z => z.literal(false).or(z.string()).optional(),\n },\n },\n *factory(\n params: {\n /**\n * @deprecated Use the `path` param instead.\n */\n defaultPath?: [Error: `Use the 'path' param instead`];\n path: string;\n /**\n * @deprecated Use the `path` param instead.\n */\n defaultTitle?: [Error: `Use the 'title' param instead`];\n title: string;\n /**\n * @deprecated Use the `path` param instead.\n */\n defaultGroup?: [Error: `Use the 'group' param instead`];\n group?: keyof typeof defaultEntityContentGroups | (string & {});\n loader: () => Promise<JSX.Element>;\n routeRef?: RouteRef;\n filter?: string | EntityPredicate | ((entity: Entity) => boolean);\n },\n { node, config },\n ) {\n // TODO(blam): Remove support for all the `default*` props in the future, this breaks backwards compatibility without it\n // As this is marked as BREAKING ALPHA, it doesn't affect the public API so it falls in range and gets picked\n // up by packages that depend on `catalog-react`.\n const path = config.path ?? params.path ?? params.defaultPath;\n const title = config.title ?? params.title ?? params.defaultTitle;\n const group = config.group ?? params.group ?? params.defaultGroup;\n\n yield coreExtensionData.reactElement(\n ExtensionBoundary.lazy(node, params.loader),\n );\n\n yield coreExtensionData.routePath(path);\n\n yield entityContentTitleDataRef(title);\n\n if (params.routeRef) {\n yield coreExtensionData.routeRef(params.routeRef);\n }\n\n yield* resolveEntityFilterData(params.filter, config, node);\n\n if (group && typeof group === 'string') {\n yield entityContentGroupDataRef(group);\n }\n },\n});\n"],"names":[],"mappings":";;;;;AAsCO,MAAM,yBAAyB,wBAAA,CAAyB;AAAA,EAC7D,IAAA,EAAM,gBAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,qBAAA,EAAuB,OAAO,UAAA,EAAW;AAAA,EACzD,MAAA,EAAQ;AAAA,IACN,iBAAA,CAAkB,YAAA;AAAA,IAClB,iBAAA,CAAkB,SAAA;AAAA,IAClB,yBAAA;AAAA,IACA,iBAAA,CAAkB,SAAS,QAAA,EAAS;AAAA,IACpC,4BAA4B,QAAA,EAAS;AAAA,IACrC,8BAA8B,QAAA,EAAS;AAAA,IACvC,0BAA0B,QAAA;AAAS,GACrC;AAAA,EACA,QAAA,EAAU;AAAA,IACR,KAAA,EAAO,yBAAA;AAAA,IACP,cAAA,EAAgB,2BAAA;AAAA,IAChB,gBAAA,EAAkB,6BAAA;AAAA,IAClB,KAAA,EAAO;AAAA,GACT;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,MAAA,EAAQ;AAAA,MACN,IAAA,EAAM,CAAA,CAAA,KAAK,CAAA,CAAE,MAAA,GAAS,QAAA,EAAS;AAAA,M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,CAAA;AAAA,IACvC;AAAA,EACF;AACF,CAAC;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { createExtensionDataRef, createExtensionBlueprint, ExtensionBoundary } from '@backstage/frontend-plugin-api';
2
- import { entityFilterFunctionDataRef, entityFilterExpressionDataRef } from './extensionData.esm.js';
2
+ import { entityFilterExpressionDataRef, entityFilterFunctionDataRef } from './extensionData.esm.js';
3
3
  import { resolveEntityFilterData } from './resolveEntityFilterData.esm.js';
4
4
  import { createEntityPredicateSchema } from '../predicates/createEntityPredicateSchema.esm.js';
5
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"EntityContentLayoutBlueprint.esm.js","sources":["../../../src/alpha/blueprints/EntityContentLayoutBlueprint.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 createExtensionDataRef,\n createExtensionBlueprint,\n ExtensionBoundary,\n} from '@backstage/frontend-plugin-api';\nimport {\n entityFilterExpressionDataRef,\n entityFilterFunctionDataRef,\n EntityCardType,\n} from './extensionData';\nimport { JSX } from 'react';\nimport { EntityPredicate } from '../predicates/types';\nimport { resolveEntityFilterData } from './resolveEntityFilterData';\nimport { createEntityPredicateSchema } from '../predicates/createEntityPredicateSchema';\nimport { Entity } from '@backstage/catalog-model';\n\n/** @alpha */\nexport interface EntityContentLayoutProps {\n cards: Array<{\n type?: EntityCardType;\n element: JSX.Element;\n }>;\n}\n\nconst entityCardLayoutComponentDataRef = createExtensionDataRef<\n (props: EntityContentLayoutProps) => React.JSX.Element\n>().with({\n id: 'catalog.entity-content-layout.component',\n});\n\n/** @alpha */\nexport const EntityContentLayoutBlueprint = createExtensionBlueprint({\n kind: 'entity-content-layout',\n attachTo: { id: 'entity-content:catalog/overview', input: 'layouts' },\n output: [\n entityFilterFunctionDataRef.optional(),\n entityFilterExpressionDataRef.optional(),\n entityCardLayoutComponentDataRef,\n ],\n dataRefs: {\n filterFunction: entityFilterFunctionDataRef,\n filterExpression: entityFilterExpressionDataRef,\n component: entityCardLayoutComponentDataRef,\n },\n config: {\n schema: {\n type: z => z.string().optional(),\n filter: z =>\n z.union([z.string(), createEntityPredicateSchema(z)]).optional(),\n },\n },\n *factory(\n {\n loader,\n filter,\n }: {\n filter?: string | EntityPredicate | ((entity: Entity) => boolean);\n loader: () => Promise<(props: EntityContentLayoutProps) => JSX.Element>;\n },\n { node, config },\n ) {\n yield* resolveEntityFilterData(filter, config, node);\n\n yield entityCardLayoutComponentDataRef(\n ExtensionBoundary.lazyComponent(node, loader),\n );\n },\n});\n"],"names":[],"mappings":";;;;;AAwCA,MAAM,gCAAA,GAAmC,sBAEvC,EAAA,CAAE,IAAK,CAAA;AAAA,EACP,EAAI,EAAA;AACN,CAAC,CAAA;AAGM,MAAM,+BAA+B,wBAAyB,CAAA;AAAA,EACnE,IAAM,EAAA,uBAAA;AAAA,EACN,QAAU,EAAA,EAAE,EAAI,EAAA,iCAAA,EAAmC,OAAO,SAAU,EAAA;AAAA,EACpE,MAAQ,EAAA;AAAA,IACN,4BAA4B,QAAS,EAAA;AAAA,IACrC,8BAA8B,QAAS,EAAA;AAAA,IACvC;AAAA,GACF;AAAA,EACA,QAAU,EAAA;AAAA,IACR,cAAgB,EAAA,2BAAA;AAAA,IAChB,gBAAkB,EAAA,6BAAA;AAAA,IAClB,SAAW,EAAA;AAAA,GACb;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,MAAQ,EAAA;AAAA,MACN,IAAM,EAAA,CAAA,CAAA,KAAK,CAAE,CAAA,MAAA,GAAS,QAAS,EAAA;AAAA,MAC/B,MAAQ,EAAA,CAAA,CAAA,KACN,CAAE,CAAA,KAAA,CAAM,CAAC,CAAA,CAAE,MAAO,EAAA,EAAG,2BAA4B,CAAA,CAAC,CAAC,CAAC,EAAE,QAAS;AAAA;AACnE,GACF;AAAA,EACA,CAAC,OACC,CAAA;AAAA,IACE,MAAA;AAAA,IACA;AAAA,GAKF,EAAA,EAAE,IAAM,EAAA,MAAA,EACR,EAAA;AACA,IAAO,OAAA,uBAAA,CAAwB,MAAQ,EAAA,MAAA,EAAQ,IAAI,CAAA;AAEnD,IAAM,MAAA,gCAAA;AAAA,MACJ,iBAAA,CAAkB,aAAc,CAAA,IAAA,EAAM,MAAM;AAAA,KAC9C;AAAA;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"EntityContentLayoutBlueprint.esm.js","sources":["../../../src/alpha/blueprints/EntityContentLayoutBlueprint.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 createExtensionDataRef,\n createExtensionBlueprint,\n ExtensionBoundary,\n} from '@backstage/frontend-plugin-api';\nimport {\n entityFilterExpressionDataRef,\n entityFilterFunctionDataRef,\n EntityCardType,\n} from './extensionData';\nimport { JSX } from 'react';\nimport { EntityPredicate } from '../predicates/types';\nimport { resolveEntityFilterData } from './resolveEntityFilterData';\nimport { createEntityPredicateSchema } from '../predicates/createEntityPredicateSchema';\nimport { Entity } from '@backstage/catalog-model';\n\n/** @alpha */\nexport interface EntityContentLayoutProps {\n cards: Array<{\n type?: EntityCardType;\n element: JSX.Element;\n }>;\n}\n\nconst entityCardLayoutComponentDataRef = createExtensionDataRef<\n (props: EntityContentLayoutProps) => React.JSX.Element\n>().with({\n id: 'catalog.entity-content-layout.component',\n});\n\n/** @alpha */\nexport const EntityContentLayoutBlueprint = createExtensionBlueprint({\n kind: 'entity-content-layout',\n attachTo: { id: 'entity-content:catalog/overview', input: 'layouts' },\n output: [\n entityFilterFunctionDataRef.optional(),\n entityFilterExpressionDataRef.optional(),\n entityCardLayoutComponentDataRef,\n ],\n dataRefs: {\n filterFunction: entityFilterFunctionDataRef,\n filterExpression: entityFilterExpressionDataRef,\n component: entityCardLayoutComponentDataRef,\n },\n config: {\n schema: {\n type: z => z.string().optional(),\n filter: z =>\n z.union([z.string(), createEntityPredicateSchema(z)]).optional(),\n },\n },\n *factory(\n {\n loader,\n filter,\n }: {\n filter?: string | EntityPredicate | ((entity: Entity) => boolean);\n loader: () => Promise<(props: EntityContentLayoutProps) => JSX.Element>;\n },\n { node, config },\n ) {\n yield* resolveEntityFilterData(filter, config, node);\n\n yield entityCardLayoutComponentDataRef(\n ExtensionBoundary.lazyComponent(node, loader),\n );\n },\n});\n"],"names":[],"mappings":";;;;;AAwCA,MAAM,gCAAA,GAAmC,sBAAA,EAEvC,CAAE,IAAA,CAAK;AAAA,EACP,EAAA,EAAI;AACN,CAAC,CAAA;AAGM,MAAM,+BAA+B,wBAAA,CAAyB;AAAA,EACnE,IAAA,EAAM,uBAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,iCAAA,EAAmC,OAAO,SAAA,EAAU;AAAA,EACpE,MAAA,EAAQ;AAAA,IACN,4BAA4B,QAAA,EAAS;AAAA,IACrC,8BAA8B,QAAA,EAAS;AAAA,IACvC;AAAA,GACF;AAAA,EACA,QAAA,EAAU;AAAA,IACR,cAAA,EAAgB,2BAAA;AAAA,IAChB,gBAAA,EAAkB,6BAAA;AAAA,IAClB,SAAA,EAAW;AAAA,GACb;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,MAAA,EAAQ;AAAA,MACN,IAAA,EAAM,CAAA,CAAA,KAAK,CAAA,CAAE,MAAA,GAAS,QAAA,EAAS;AAAA,MAC/B,MAAA,EAAQ,CAAA,CAAA,KACN,CAAA,CAAE,KAAA,CAAM,CAAC,CAAA,CAAE,MAAA,EAAO,EAAG,2BAAA,CAA4B,CAAC,CAAC,CAAC,EAAE,QAAA;AAAS;AACnE,GACF;AAAA,EACA,CAAC,OAAA,CACC;AAAA,IACE,MAAA;AAAA,IACA;AAAA,GACF,EAIA,EAAE,IAAA,EAAM,MAAA,EAAO,EACf;AACA,IAAA,OAAO,uBAAA,CAAwB,MAAA,EAAQ,MAAA,EAAQ,IAAI,CAAA;AAEnD,IAAA,MAAM,gCAAA;AAAA,MACJ,iBAAA,CAAkB,aAAA,CAAc,IAAA,EAAM,MAAM;AAAA,KAC9C;AAAA,EACF;AACF,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityContextMenuItemBlueprint.esm.js","sources":["../../../src/alpha/blueprints/EntityContextMenuItemBlueprint.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 { ReactNode, JSX } from 'react';\nimport {\n coreExtensionData,\n createExtensionBlueprint,\n ExtensionBoundary,\n} from '@backstage/frontend-plugin-api';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport ListItemIcon from '@material-ui/core/ListItemIcon';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport { useEntityContextMenu } from '../../hooks/useEntityContextMenu';\nimport { EntityPredicate } from '../predicates/types';\nimport { entityPredicateToFilterFunction } from '../predicates/entityPredicateToFilterFunction';\nimport type { Entity } from '@backstage/catalog-model';\nimport { entityFilterFunctionDataRef } from './extensionData';\nimport { createEntityPredicateSchema } from '../predicates/createEntityPredicateSchema';\n/** @alpha */\nexport type UseProps = () =>\n | {\n title: ReactNode;\n href: string;\n disabled?: boolean;\n }\n | {\n title: ReactNode;\n onClick: () => void | Promise<void>;\n disabled?: boolean;\n };\n\n/** @alpha */\nexport type EntityContextMenuItemParams = {\n useProps: UseProps;\n icon: JSX.Element;\n filter?: EntityPredicate | ((entity: Entity) => boolean);\n};\n\n/** @alpha */\nexport const EntityContextMenuItemBlueprint = createExtensionBlueprint({\n kind: 'entity-context-menu-item',\n attachTo: { id: 'page:catalog/entity', input: 'contextMenuItems' },\n output: [\n coreExtensionData.reactElement,\n entityFilterFunctionDataRef.optional(),\n ],\n dataRefs: {\n filterFunction: entityFilterFunctionDataRef,\n },\n config: {\n schema: {\n filter: z => createEntityPredicateSchema(z).optional(),\n },\n },\n *factory(params: EntityContextMenuItemParams, { node, config }) {\n const loader = async () => {\n const Component = () => {\n const { onMenuClose } = useEntityContextMenu();\n const { title, ...menuItemProps } = params.useProps();\n let handleClick = undefined;\n\n if ('onClick' in menuItemProps) {\n handleClick = () => {\n const result = menuItemProps.onClick();\n if (result && 'then' in result) {\n result.then(onMenuClose, onMenuClose);\n } else {\n onMenuClose();\n }\n };\n }\n\n return (\n <MenuItem {...menuItemProps} onClick={handleClick}>\n <ListItemIcon>{params.icon}</ListItemIcon>\n <ListItemText primary={title} />\n </MenuItem>\n );\n };\n\n return <Component />;\n };\n\n yield coreExtensionData.reactElement(ExtensionBoundary.lazy(node, loader));\n\n if (config.filter) {\n yield entityFilterFunctionDataRef(\n entityPredicateToFilterFunction(config.filter),\n );\n } else if (typeof params.filter === 'function') {\n yield entityFilterFunctionDataRef(params.filter);\n } else if (params.filter) {\n yield entityFilterFunctionDataRef(\n entityPredicateToFilterFunction(params.filter),\n );\n }\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;AAoDO,MAAM,iCAAiC,wBAAyB,CAAA;AA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AA,SAChC,EAAA,CAAA;AAAA,OAEJ;AAEA,MAAA,2BAAQ,SAAU,EAAA,EAAA,CAAA;AAAA,KACpB;AAEA,IAAA,MAAM,kBAAkB,YAAa,CAAA,iBAAA,CAAkB,IAAK,CAAA,IAAA,EAAM,MAAM,CAAC,CAAA;AAEzE,IAAA,IAAI,OAAO,MAAQ,EAAA;AACjB,MAAM,MAAA,2BAAA;AAAA,QACJ,+BAAA,CAAgC,OAAO,MAAM;AAAA,OAC/C;AAAA,KACS,MAAA,IAAA,OAAO,MAAO,CAAA,MAAA,KAAW,UAAY,EAAA;AAC9C,MAAM,MAAA,2BAAA,CAA4B,OAAO,MAAM,CAAA;AAAA,KACjD,MAAA,IAAW,OAAO,MAAQ,EAAA;AACxB,MAAM,MAAA,2BAAA;AAAA,QACJ,+BAAA,CAAgC,OAAO,MAAM;AAAA,OAC/C;AAAA;AACF;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"EntityContextMenuItemBlueprint.esm.js","sources":["../../../src/alpha/blueprints/EntityContextMenuItemBlueprint.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 { ReactNode, JSX } from 'react';\nimport {\n coreExtensionData,\n createExtensionBlueprint,\n ExtensionBoundary,\n} from '@backstage/frontend-plugin-api';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport ListItemIcon from '@material-ui/core/ListItemIcon';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport { useEntityContextMenu } from '../../hooks/useEntityContextMenu';\nimport { EntityPredicate } from '../predicates/types';\nimport { entityPredicateToFilterFunction } from '../predicates/entityPredicateToFilterFunction';\nimport type { Entity } from '@backstage/catalog-model';\nimport { entityFilterFunctionDataRef } from './extensionData';\nimport { createEntityPredicateSchema } from '../predicates/createEntityPredicateSchema';\n/** @alpha */\nexport type UseProps = () =>\n | {\n title: ReactNode;\n href: string;\n disabled?: boolean;\n }\n | {\n title: ReactNode;\n onClick: () => void | Promise<void>;\n disabled?: boolean;\n };\n\n/** @alpha */\nexport type EntityContextMenuItemParams = {\n useProps: UseProps;\n icon: JSX.Element;\n filter?: EntityPredicate | ((entity: Entity) => boolean);\n};\n\n/** @alpha */\nexport const EntityContextMenuItemBlueprint = createExtensionBlueprint({\n kind: 'entity-context-menu-item',\n attachTo: { id: 'page:catalog/entity', input: 'contextMenuItems' },\n output: [\n coreExtensionData.reactElement,\n entityFilterFunctionDataRef.optional(),\n ],\n dataRefs: {\n filterFunction: entityFilterFunctionDataRef,\n },\n config: {\n schema: {\n filter: z => createEntityPredicateSchema(z).optional(),\n },\n },\n *factory(params: EntityContextMenuItemParams, { node, config }) {\n const loader = async () => {\n const Component = () => {\n const { onMenuClose } = useEntityContextMenu();\n const { title, ...menuItemProps } = params.useProps();\n let handleClick = undefined;\n\n if ('onClick' in menuItemProps) {\n handleClick = () => {\n const result = menuItemProps.onClick();\n if (result && 'then' in result) {\n result.then(onMenuClose, onMenuClose);\n } else {\n onMenuClose();\n }\n };\n }\n\n return (\n <MenuItem {...menuItemProps} onClick={handleClick}>\n <ListItemIcon>{params.icon}</ListItemIcon>\n <ListItemText primary={title} />\n </MenuItem>\n );\n };\n\n return <Component />;\n };\n\n yield coreExtensionData.reactElement(ExtensionBoundary.lazy(node, loader));\n\n if (config.filter) {\n yield entityFilterFunctionDataRef(\n entityPredicateToFilterFunction(config.filter),\n );\n } else if (typeof params.filter === 'function') {\n yield entityFilterFunctionDataRef(params.filter);\n } else if (params.filter) {\n yield entityFilterFunctionDataRef(\n entityPredicateToFilterFunction(params.filter),\n );\n }\n },\n});\n"],"names":[],"m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AAA,0BAC3B,GAAA,CAAC,YAAA,EAAA,EAAa,OAAA,EAAS,KAAA,EAAO;AAAA,SAAA,EAChC,CAAA;AAAA,MAEJ,CAAA;AAEA,MAAA,2BAAQ,SAAA,EAAA,EAAU,CAAA;AAAA,IACpB,CAAA;AAEA,IAAA,MAAM,kBAAkB,YAAA,CAAa,iBAAA,CAAkB,IAAA,CAAK,IAAA,EAAM,MAAM,CAAC,CAAA;AAEzE,IAAA,IAAI,OAAO,MAAA,EAAQ;AACjB,MAAA,MAAM,2BAAA;AAAA,QACJ,+BAAA,CAAgC,OAAO,MAAM;AAAA,OAC/C;AAAA,IACF,CAAA,MAAA,IAAW,OAAO,MAAA,CAAO,MAAA,KAAW,UAAA,EAAY;AAC9C,MAAA,MAAM,2BAAA,CAA4B,OAAO,MAAM,CAAA;AAAA,IACjD,CAAA,MAAA,IAAW,OAAO,MAAA,EAAQ;AACxB,MAAA,MAAM,2BAAA;AAAA,QACJ,+BAAA,CAAgC,OAAO,MAAM;AAAA,OAC/C;AAAA,IACF;AAAA,EACF;AACF,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityHeaderBlueprint.esm.js","sources":["../../../src/alpha/blueprints/EntityHeaderBlueprint.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 createExtensionBlueprint,\n coreExtensionData,\n ExtensionBoundary,\n} from '@backstage/frontend-plugin-api';\nimport { EntityPredicate } from '../predicates/types';\nimport { Entity } from '@backstage/catalog-model';\nimport { resolveEntityFilterData } from './resolveEntityFilterData';\nimport { createEntityPredicateSchema } from '../predicates/createEntityPredicateSchema';\nimport {\n entityFilterExpressionDataRef,\n entityFilterFunctionDataRef,\n} from './extensionData';\n\n/** @alpha */\nexport const EntityHeaderBlueprint = createExtensionBlueprint({\n kind: 'entity-header',\n attachTo: { id: 'page:catalog/entity', input: 'headers' },\n dataRefs: {\n filterFunction: entityFilterFunctionDataRef,\n element: coreExtensionData.reactElement,\n },\n config: {\n schema: {\n filter: z => createEntityPredicateSchema(z).optional(),\n },\n },\n output: [\n entityFilterFunctionDataRef.optional(),\n entityFilterExpressionDataRef.optional(),\n coreExtensionData.reactElement.optional(),\n ],\n *factory(\n params: {\n loader: () => Promise<JSX.Element>;\n filter?: EntityPredicate | ((entity: Entity) => boolean);\n },\n { node, config },\n ) {\n const { loader, filter } = params;\n\n yield* resolveEntityFilterData(filter, config, node);\n\n if (loader) {\n yield coreExtensionData.reactElement(\n ExtensionBoundary.lazy(node, loader),\n );\n }\n },\n});\n"],"names":[],"mappings":";;;;;AA+BO,MAAM,wBAAwB,wBAAyB,CAAA;AAAA,EAC5D,IAAM,EAAA,eAAA;AAAA,EACN,QAAU,EAAA,EAAE,EAAI,EAAA,qBAAA,EAAuB,OAAO,SAAU,EAAA;AAAA,EACxD,QAAU,EAAA;AAAA,IACR,cAAgB,EAAA,2BAAA;AAAA,IAChB,SAAS,iBAAkB,CAAA;AAAA,GAC7B;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,MAAQ,EAAA;AAAA,MACN,MAAQ,EAAA,CAAA,CAAA,KAAK,2BAA4B,CAAA,CAAC,EAAE,QAAS;AAAA;AACvD,GACF;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,4BAA4B,QAAS,EAAA;AAAA,IACrC,8BAA8B,QAAS,EAAA;AAAA,IACvC,iBAAA,CAAkB,aAAa,QAAS;AAAA,GAC1C;AAAA,EACA,CAAC,OACC,CAAA,MAAA,EAIA,EAAE,IAAA,EAAM,QACR,EAAA;AACA,IAAM,MAAA,EAAE,MAAQ,EAAA,MAAA,EAAW,GAAA,MAAA;AAE3B,IAAO,OAAA,uBAAA,CAAwB,MAAQ,EAAA,MAAA,EAAQ,IAAI,CAAA;AAEnD,IAAA,IAAI,MAAQ,EAAA;AACV,MAAA,MAAM,iBAAkB,CAAA,YAAA;AAAA,QACtB,iBAAA,CAAkB,IAAK,CAAA,IAAA,EAAM,MAAM;AAAA,OACrC;AAAA;AACF;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"EntityHeaderBlueprint.esm.js","sources":["../../../src/alpha/blueprints/EntityHeaderBlueprint.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 createExtensionBlueprint,\n coreExtensionData,\n ExtensionBoundary,\n} from '@backstage/frontend-plugin-api';\nimport { EntityPredicate } from '../predicates/types';\nimport { Entity } from '@backstage/catalog-model';\nimport { resolveEntityFilterData } from './resolveEntityFilterData';\nimport { createEntityPredicateSchema } from '../predicates/createEntityPredicateSchema';\nimport {\n entityFilterExpressionDataRef,\n entityFilterFunctionDataRef,\n} from './extensionData';\n\n/** @alpha */\nexport const EntityHeaderBlueprint = createExtensionBlueprint({\n kind: 'entity-header',\n attachTo: { id: 'page:catalog/entity', input: 'headers' },\n dataRefs: {\n filterFunction: entityFilterFunctionDataRef,\n element: coreExtensionData.reactElement,\n },\n config: {\n schema: {\n filter: z => createEntityPredicateSchema(z).optional(),\n },\n },\n output: [\n entityFilterFunctionDataRef.optional(),\n entityFilterExpressionDataRef.optional(),\n coreExtensionData.reactElement.optional(),\n ],\n *factory(\n params: {\n loader: () => Promise<JSX.Element>;\n filter?: EntityPredicate | ((entity: Entity) => boolean);\n },\n { node, config },\n ) {\n const { loader, filter } = params;\n\n yield* resolveEntityFilterData(filter, config, node);\n\n if (loader) {\n yield coreExtensionData.reactElement(\n ExtensionBoundary.lazy(node, loader),\n );\n }\n },\n});\n"],"names":[],"mappings":";;;;;AA+BO,MAAM,wBAAwB,wBAAA,CAAyB;AAAA,EAC5D,IAAA,EAAM,eAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,qBAAA,EAAuB,OAAO,SAAA,EAAU;AAAA,EACxD,QAAA,EAAU;AAAA,IACR,cAAA,EAAgB,2BAAA;AAAA,IAChB,SAAS,iBAAA,CAAkB;AAAA,GAC7B;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,MAAA,EAAQ;AAAA,MACN,MAAA,EAAQ,CAAA,CAAA,KAAK,2BAAA,CAA4B,CAAC,EAAE,QAAA;AAAS;AACvD,GACF;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,4BAA4B,QAAA,EAAS;AAAA,IACrC,8BAA8B,QAAA,EAAS;AAAA,IACvC,iBAAA,CAAkB,aAAa,QAAA;AAAS,GAC1C;AAAA,EACA,CAAC,OAAA,CACC,MAAA,EAIA,EAAE,IAAA,EAAM,QAAO,EACf;AACA,IAAA,MAAM,EAAE,MAAA,EAAQ,MAAA,EAAO,GAAI,MAAA;AAE3B,IAAA,OAAO,uBAAA,CAAwB,MAAA,EAAQ,MAAA,EAAQ,IAAI,CAAA;AAEnD,IAAA,IAAI,MAAA,EAAQ;AACV,MAAA,MAAM,iBAAA,CAAkB,YAAA;AAAA,QACtB,iBAAA,CAAkB,IAAA,CAAK,IAAA,EAAM,MAAM;AAAA,OACrC;AAAA,IACF;AAAA,EACF;AACF,CAAC;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { createExtensionDataRef, createExtensionBlueprint } from '@backstage/frontend-plugin-api';
2
2
  import { createEntityPredicateSchema } from '../predicates/createEntityPredicateSchema.esm.js';
3
- import { entityFilterFunctionDataRef, entityFilterExpressionDataRef } from './extensionData.esm.js';
3
+ import { entityFilterExpressionDataRef, entityFilterFunctionDataRef } from './extensionData.esm.js';
4
4
  import { resolveEntityFilterData } from './resolveEntityFilterData.esm.js';
5
5
 
6
6
  const entityIconLinkPropsDataRef = createExtensionDataRef().with({
@@ -1 +1 @@
1
- {"version":3,"file":"EntityIconLinkBlueprint.esm.js","sources":["../../../src/alpha/blueprints/EntityIconLinkBlueprint.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 { IconLinkVerticalProps } from '@backstage/core-components';\nimport {\n createExtensionBlueprint,\n createExtensionDataRef,\n} from '@backstage/frontend-plugin-api';\n\nimport { EntityPredicate } from '../predicates/types';\nimport { createEntityPredicateSchema } from '../predicates/createEntityPredicateSchema';\n\nimport {\n entityFilterExpressionDataRef,\n entityFilterFunctionDataRef,\n} from './extensionData';\nimport { Entity } from '@backstage/catalog-model';\nimport { resolveEntityFilterData } from './resolveEntityFilterData';\n\nconst entityIconLinkPropsDataRef = createExtensionDataRef<\n () => IconLinkVerticalProps\n>().with({\n id: 'entity-icon-link-props',\n});\n\n/** @alpha */\nexport const EntityIconLinkBlueprint = createExtensionBlueprint({\n kind: 'entity-icon-link',\n attachTo: { id: 'entity-card:catalog/about', input: 'iconLinks' },\n output: [\n entityFilterFunctionDataRef.optional(),\n entityFilterExpressionDataRef.optional(),\n entityIconLinkPropsDataRef,\n ],\n dataRefs: {\n useProps: entityIconLinkPropsDataRef,\n filterFunction: entityFilterFunctionDataRef,\n filterExpression: entityFilterExpressionDataRef,\n },\n config: {\n schema: {\n label: z => z.string().optional(),\n title: z => z.string().optional(),\n filter: z => createEntityPredicateSchema(z).optional(),\n },\n },\n *factory(\n params: {\n useProps: () => Omit<IconLinkVerticalProps, 'color'>;\n filter?: EntityPredicate | ((entity: Entity) => boolean);\n },\n { config, node },\n ) {\n const { filter, useProps } = params;\n yield* resolveEntityFilterData(filter, config, node);\n // Only include properties that are defined in the config\n // to avoid overriding defaults with undefined values\n const configProps = Object.entries(config).reduce(\n (rest, [key, value]) =>\n value !== undefined\n ? {\n ...rest,\n [key]: value,\n }\n : rest,\n {},\n );\n yield entityIconLinkPropsDataRef(() => ({ ...useProps(), ...configProps }));\n },\n});\n"],"names":[],"mappings":";;;;;AAgCA,MAAM,0BAAA,GAA6B,sBAEjC,EAAA,CAAE,IAAK,CAAA;AAAA,EACP,EAAI,EAAA;AACN,CAAC,CAAA;AAGM,MAAM,0BAA0B,wBAAyB,CAAA;AAAA,EAC9D,IAAM,EAAA,kBAAA;AAAA,EACN,QAAU,EAAA,EAAE,EAAI,EAAA,2BAAA,EAA6B,OAAO,WAAY,EAAA;AAAA,EAChE,MAAQ,EAAA;AAAA,IACN,4BAA4B,QAAS,EAAA;AAAA,IACrC,8BAA8B,QAAS,EAAA;AAAA,IACvC;AAAA,GACF;AAAA,EACA,QAAU,EAAA;AAAA,IACR,QAAU,EAAA,0BAAA;AAAA,IACV,cAAgB,EAAA,2BAAA;AAAA,IAChB,gBAAkB,EAAA;AAAA,GACpB;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,MAAQ,EAAA;AAAA,MACN,KAAO,EAAA,CAAA,CAAA,KAAK,CAAE,CAAA,MAAA,GAAS,QAAS,EAAA;AAAA,MAChC,KAAO,EAAA,CAAA,CAAA,KAAK,CAAE,CAAA,MAAA,GAAS,QAAS,EAAA;AAAA,MAChC,MAAQ,EAAA,CAAA,CAAA,KAAK,2BAA4B,CAAA,CAAC,EAAE,QAAS;AAAA;AACvD,GACF;AAAA,EACA,CAAC,OACC,CAAA,MAAA,EAIA,EAAE,MAAA,EAAQ,MACV,EAAA;AACA,IAAM,MAAA,EAAE,MAAQ,EAAA,QAAA,EAAa,GAAA,MAAA;AAC7B,IAAO,OAAA,uBAAA,CAAwB,MAAQ,EAAA,MAAA,EAAQ,IAAI,CAAA;AAGnD,IAAA,MAAM,WAAc,GAAA,MAAA,CAAO,OAAQ,CAAA,MAAM,CAAE,CAAA,MAAA;AAAA,MACzC,CAAC,IAAM,EAAA,CAAC,KAAK,KAAK,CAAA,KAChB,UAAU,KACN,CAAA,GAAA;AAAA,QACE,GAAG,IAAA;AAAA,QACH,CAAC,GAAG,GAAG;AAAA,OAET,GAAA,IAAA;AAAA,MACN;AAAC,KACH;AACA,IAAM,MAAA,0BAAA,CAA2B,OAAO,EAAE,GAAG,UAAY,EAAA,GAAG,aAAc,CAAA,CAAA;AAAA;AAE9E,CAAC;;;;"}
1
+ {"version":3,"file":"EntityIconLinkBlueprint.esm.js","sources":["../../../src/alpha/blueprints/EntityIconLinkBlueprint.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 { IconLinkVerticalProps } from '@backstage/core-components';\nimport {\n createExtensionBlueprint,\n createExtensionDataRef,\n} from '@backstage/frontend-plugin-api';\n\nimport { EntityPredicate } from '../predicates/types';\nimport { createEntityPredicateSchema } from '../predicates/createEntityPredicateSchema';\n\nimport {\n entityFilterExpressionDataRef,\n entityFilterFunctionDataRef,\n} from './extensionData';\nimport { Entity } from '@backstage/catalog-model';\nimport { resolveEntityFilterData } from './resolveEntityFilterData';\n\nconst entityIconLinkPropsDataRef = createExtensionDataRef<\n () => IconLinkVerticalProps\n>().with({\n id: 'entity-icon-link-props',\n});\n\n/** @alpha */\nexport const EntityIconLinkBlueprint = createExtensionBlueprint({\n kind: 'entity-icon-link',\n attachTo: { id: 'entity-card:catalog/about', input: 'iconLinks' },\n output: [\n entityFilterFunctionDataRef.optional(),\n entityFilterExpressionDataRef.optional(),\n entityIconLinkPropsDataRef,\n ],\n dataRefs: {\n useProps: entityIconLinkPropsDataRef,\n filterFunction: entityFilterFunctionDataRef,\n filterExpression: entityFilterExpressionDataRef,\n },\n config: {\n schema: {\n label: z => z.string().optional(),\n title: z => z.string().optional(),\n filter: z => createEntityPredicateSchema(z).optional(),\n },\n },\n *factory(\n params: {\n useProps: () => Omit<IconLinkVerticalProps, 'color'>;\n filter?: EntityPredicate | ((entity: Entity) => boolean);\n },\n { config, node },\n ) {\n const { filter, useProps } = params;\n yield* resolveEntityFilterData(filter, config, node);\n // Only include properties that are defined in the config\n // to avoid overriding defaults with undefined values\n const configProps = Object.entries(config).reduce(\n (rest, [key, value]) =>\n value !== undefined\n ? {\n ...rest,\n [key]: value,\n }\n : rest,\n {},\n );\n yield entityIconLinkPropsDataRef(() => ({ ...useProps(), ...configProps }));\n },\n});\n"],"names":[],"mappings":";;;;;AAgCA,MAAM,0BAAA,GAA6B,sBAAA,EAEjC,CAAE,IAAA,CAAK;AAAA,EACP,EAAA,EAAI;AACN,CAAC,CAAA;AAGM,MAAM,0BAA0B,wBAAA,CAAyB;AAAA,EAC9D,IAAA,EAAM,kBAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,2BAAA,EAA6B,OAAO,WAAA,EAAY;AAAA,EAChE,MAAA,EAAQ;AAAA,IACN,4BAA4B,QAAA,EAAS;AAAA,IACrC,8BAA8B,QAAA,EAAS;AAAA,IACvC;AAAA,GACF;AAAA,EACA,QAAA,EAAU;AAAA,IACR,QAAA,EAAU,0BAAA;AAAA,IACV,cAAA,EAAgB,2BAAA;AAAA,IAChB,gBAAA,EAAkB;AAAA,GACpB;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,MAAA,EAAQ;AAAA,MACN,KAAA,EAAO,CAAA,CAAA,KAAK,CAAA,CAAE,MAAA,GAAS,QAAA,EAAS;AAAA,MAChC,KAAA,EAAO,CAAA,CAAA,KAAK,CAAA,CAAE,MAAA,GAAS,QAAA,EAAS;AAAA,MAChC,MAAA,EAAQ,CAAA,CAAA,KAAK,2BAAA,CAA4B,CAAC,EAAE,QAAA;AAAS;AACvD,GACF;AAAA,EACA,CAAC,OAAA,CACC,MAAA,EAIA,EAAE,MAAA,EAAQ,MAAK,EACf;AACA,IAAA,MAAM,EAAE,MAAA,EAAQ,QAAA,EAAS,GAAI,MAAA;AAC7B,IAAA,OAAO,uBAAA,CAAwB,MAAA,EAAQ,MAAA,EAAQ,IAAI,CAAA;AAGnD,IAAA,MAAM,WAAA,GAAc,MAAA,CAAO,OAAA,CAAQ,MAAM,CAAA,CAAE,MAAA;AAAA,MACzC,CAAC,IAAA,EAAM,CAAC,KAAK,KAAK,CAAA,KAChB,UAAU,MAAA,GACN;AAAA,QACE,GAAG,IAAA;AAAA,QACH,CAAC,GAAG,GAAG;AAAA,OACT,GACA,IAAA;AAAA,MACN;AAAC,KACH;AACA,IAAA,MAAM,0BAAA,CAA2B,OAAO,EAAE,GAAG,UAAS,EAAG,GAAG,aAAY,CAAE,CAAA;AAAA,EAC5E;AACF,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"extensionData.esm.js","sources":["../../../src/alpha/blueprints/extensionData.tsx"],"sourcesContent":["/*\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 { Entity } from '@backstage/catalog-model';\nimport { createExtensionDataRef } from '@backstage/frontend-plugin-api';\n\n/** @internal */\nexport const entityContentTitleDataRef = createExtensionDataRef<string>().with({\n id: 'catalog.entity-content-title',\n});\n\n/** @internal */\nexport const entityFilterFunctionDataRef = createExtensionDataRef<\n (entity: Entity) => boolean\n>().with({ id: 'catalog.entity-filter-function' });\n\n/** @internal */\nexport const entityFilterExpressionDataRef =\n createExtensionDataRef<string>().with({\n id: 'catalog.entity-filter-expression',\n });\n\n/**\n * @alpha\n * Default entity content groups.\n */\nexport const defaultEntityContentGroups = {\n overview: 'Overview',\n documentation: 'Documentation',\n development: 'Development',\n deployment: 'Deployment',\n operation: 'Operation',\n observability: 'Observability',\n};\n\n/** @internal */\nexport const entityContentGroupDataRef = createExtensionDataRef<string>().with({\n id: 'catalog.entity-content-group',\n});\n\n/**\n * @internal\n * Available entity card types\n */\nexport const entityCardTypes = [\n 'summary',\n 'info',\n 'content',\n] as const satisfies readonly EntityCardType[];\n\n/** @alpha */\nexport type EntityCardType = 'summary' | 'info' | 'content';\n\n/** @internal */\nexport const entityCardTypeDataRef =\n createExtensionDataRef<EntityCardType>().with({\n id: 'catalog.entity-card-type',\n });\n"],"names":[],"mappings":";;AAoBa,MAAA,yBAAA,GAA4B,sBAA+B,EAAA,CAAE,IAAK,CAAA;AAAA,EAC7E,EAAI,EAAA;AACN,CAAC;AAGM,MAAM,8BAA8B,sBAEzC,EAAA,CAAE,KAAK,EAAE,EAAA,EAAI,kCAAkC;AAGpC,MAAA,6BAAA,GACX,sBAA+B,EAAA,CAAE,IAAK,CAAA;AAAA,EACpC,EAAI,EAAA;AACN,CAAC;AAMI,MAAM,0BAA6B,GAAA;AAAA,EACxC,QAAU,EAAA,UAAA;AAAA,EACV,aAAe,EAAA,eAAA;AAAA,EACf,WAAa,EAAA,aAAA;AAAA,EACb,UAAY,EAAA,YAAA;AAAA,EACZ,SAAW,EAAA,WAAA;AAAA,EACX,aAAe,EAAA;AACjB;AAGa,MAAA,yBAAA,GAA4B,sBAA+B,EAAA,CAAE,IAAK,CAAA;AAAA,EAC7E,EAAI,EAAA;AACN,CAAC;AAMM,MAAM,eAAkB,GAAA;AAAA,EAC7B,SAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF;AAMa,MAAA,qBAAA,GACX,sBAAuC,EAAA,CAAE,IAAK,CAAA;AAAA,EAC5C,EAAI,EAAA;AACN,CAAC;;;;"}
1
+ {"version":3,"file":"extensionData.esm.js","sources":["../../../src/alpha/blueprints/extensionData.tsx"],"sourcesContent":["/*\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 { Entity } from '@backstage/catalog-model';\nimport { createExtensionDataRef } from '@backstage/frontend-plugin-api';\n\n/** @internal */\nexport const entityContentTitleDataRef = createExtensionDataRef<string>().with({\n id: 'catalog.entity-content-title',\n});\n\n/** @internal */\nexport const entityFilterFunctionDataRef = createExtensionDataRef<\n (entity: Entity) => boolean\n>().with({ id: 'catalog.entity-filter-function' });\n\n/** @internal */\nexport const entityFilterExpressionDataRef =\n createExtensionDataRef<string>().with({\n id: 'catalog.entity-filter-expression',\n });\n\n/**\n * @alpha\n * Default entity content groups.\n */\nexport const defaultEntityContentGroups = {\n overview: 'Overview',\n documentation: 'Documentation',\n development: 'Development',\n deployment: 'Deployment',\n operation: 'Operation',\n observability: 'Observability',\n};\n\n/** @internal */\nexport const entityContentGroupDataRef = createExtensionDataRef<string>().with({\n id: 'catalog.entity-content-group',\n});\n\n/**\n * @internal\n * Available entity card types\n */\nexport const entityCardTypes = [\n 'summary',\n 'info',\n 'content',\n] as const satisfies readonly EntityCardType[];\n\n/** @alpha */\nexport type EntityCardType = 'summary' | 'info' | 'content';\n\n/** @internal */\nexport const entityCardTypeDataRef =\n createExtensionDataRef<EntityCardType>().with({\n id: 'catalog.entity-card-type',\n });\n"],"names":[],"mappings":";;AAoBO,MAAM,yBAAA,GAA4B,sBAAA,EAA+B,CAAE,IAAA,CAAK;AAAA,EAC7E,EAAA,EAAI;AACN,CAAC;AAGM,MAAM,8BAA8B,sBAAA,EAEzC,CAAE,KAAK,EAAE,EAAA,EAAI,kCAAkC;AAG1C,MAAM,6BAAA,GACX,sBAAA,EAA+B,CAAE,IAAA,CAAK;AAAA,EACpC,EAAA,EAAI;AACN,CAAC;AAMI,MAAM,0BAAA,GAA6B;AAAA,EACxC,QAAA,EAAU,UAAA;AAAA,EACV,aAAA,EAAe,eAAA;AAAA,EACf,WAAA,EAAa,aAAA;AAAA,EACb,UAAA,EAAY,YAAA;AAAA,EACZ,SAAA,EAAW,WAAA;AAAA,EACX,aAAA,EAAe;AACjB;AAGO,MAAM,yBAAA,GAA4B,sBAAA,EAA+B,CAAE,IAAA,CAAK;AAAA,EAC7E,EAAA,EAAI;AACN,CAAC;AAMM,MAAM,eAAA,GAAkB;AAAA,EAC7B,SAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF;AAMO,MAAM,qBAAA,GACX,sBAAA,EAAuC,CAAE,IAAA,CAAK;AAAA,EAC5C,EAAA,EAAI;AACN,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolveEntityFilterData.esm.js","sources":["../../../src/alpha/blueprints/resolveEntityFilterData.ts"],"sourcesContent":["/*\n * Copyright 2025 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 entityFilterExpressionDataRef,\n entityFilterFunctionDataRef,\n} from './extensionData';\nimport {\n EntityPredicate,\n entityPredicateToFilterFunction,\n} from '../predicates';\nimport { Entity } from '@backstage/catalog-model';\nimport { AppNode } from '@backstage/frontend-plugin-api';\n\nexport function* resolveEntityFilterData(\n filter: ((entity: Entity) => boolean) | EntityPredicate | string | undefined,\n config: { filter?: EntityPredicate | string },\n node: AppNode,\n) {\n if (typeof config.filter === 'string') {\n // eslint-disable-next-line no-console\n console.warn(\n `DEPRECATION WARNING: Using a string-based filter in the configuration for '${node.spec.id}' is deprecated. Use an entity predicate object instead.`,\n );\n yield entityFilterExpressionDataRef(config.filter);\n } else if (config.filter) {\n yield entityFilterFunctionDataRef(\n entityPredicateToFilterFunction(config.filter),\n );\n } else if (typeof filter === 'function') {\n yield entityFilterFunctionDataRef(filter);\n } else if (typeof filter === 'string') {\n // eslint-disable-next-line no-console\n console.warn(\n `DEPRECATION WARNING: Using a string as the default filter for '${node.spec.id}' is deprecated. Use an entity predicate object instead.`,\n );\n yield entityFilterExpressionDataRef(filter);\n } else if (filter) {\n yield entityFilterFunctionDataRef(entityPredicateToFilterFunction(filter));\n }\n}\n"],"names":[],"mappings":";;;AA2BiB,UAAA,uBAAA,CACf,MACA,EAAA,MAAA,EACA,IACA,EAAA;AACA,EAAI,IAAA,OAAO,MAAO,CAAA,MAAA,KAAW,QAAU,EAAA;AAErC,IAAQ,OAAA,CAAA,IAAA;AAAA,MACN,CAAA,2EAAA,EAA8E,IAAK,CAAA,IAAA,CAAK,EAAE,CAAA,wDAAA;AAAA,KAC5F;AACA,IAAM,MAAA,6BAAA,CAA8B,OAAO,MAAM,CAAA;AAAA,GACnD,MAAA,IAAW,OAAO,MAAQ,EAAA;AACxB,IAAM,MAAA,2BAAA;AAAA,MACJ,+BAAA,CAAgC,OAAO,MAAM;AAAA,KAC/C;AAAA,GACF,MAAA,IAAW,OAAO,MAAA,KAAW,UAAY,EAAA;AACvC,IAAA,MAAM,4BAA4B,MAAM,CAAA;AAAA,GAC1C,MAAA,IAAW,OAAO,MAAA,KAAW,QAAU,EAAA;AAErC,IAAQ,OAAA,CAAA,IAAA;AAAA,MACN,CAAA,+DAAA,EAAkE,IAAK,CAAA,IAAA,CAAK,EAAE,CAAA,wDAAA;AAAA,KAChF;AACA,IAAA,MAAM,8BAA8B,MAAM,CAAA;AAAA,aACjC,MAAQ,EAAA;AACjB,IAAM,MAAA,2BAAA,CAA4B,+BAAgC,CAAA,MAAM,CAAC,CAAA;AAAA;AAE7E;;;;"}
1
+ {"version":3,"file":"resolveEntityFilterData.esm.js","sources":["../../../src/alpha/blueprints/resolveEntityFilterData.ts"],"sourcesContent":["/*\n * Copyright 2025 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 entityFilterExpressionDataRef,\n entityFilterFunctionDataRef,\n} from './extensionData';\nimport {\n EntityPredicate,\n entityPredicateToFilterFunction,\n} from '../predicates';\nimport { Entity } from '@backstage/catalog-model';\nimport { AppNode } from '@backstage/frontend-plugin-api';\n\nexport function* resolveEntityFilterData(\n filter: ((entity: Entity) => boolean) | EntityPredicate | string | undefined,\n config: { filter?: EntityPredicate | string },\n node: AppNode,\n) {\n if (typeof config.filter === 'string') {\n // eslint-disable-next-line no-console\n console.warn(\n `DEPRECATION WARNING: Using a string-based filter in the configuration for '${node.spec.id}' is deprecated. Use an entity predicate object instead.`,\n );\n yield entityFilterExpressionDataRef(config.filter);\n } else if (config.filter) {\n yield entityFilterFunctionDataRef(\n entityPredicateToFilterFunction(config.filter),\n );\n } else if (typeof filter === 'function') {\n yield entityFilterFunctionDataRef(filter);\n } else if (typeof filter === 'string') {\n // eslint-disable-next-line no-console\n console.warn(\n `DEPRECATION WARNING: Using a string as the default filter for '${node.spec.id}' is deprecated. Use an entity predicate object instead.`,\n );\n yield entityFilterExpressionDataRef(filter);\n } else if (filter) {\n yield entityFilterFunctionDataRef(entityPredicateToFilterFunction(filter));\n }\n}\n"],"names":[],"mappings":";;;AA2BO,UAAU,uBAAA,CACf,MAAA,EACA,MAAA,EACA,IAAA,EACA;AACA,EAAA,IAAI,OAAO,MAAA,CAAO,MAAA,KAAW,QAAA,EAAU;AAErC,IAAA,OAAA,CAAQ,IAAA;AAAA,MACN,CAAA,2EAAA,EAA8E,IAAA,CAAK,IAAA,CAAK,EAAE,CAAA,wDAAA;AAAA,KAC5F;AACA,IAAA,MAAM,6BAAA,CAA8B,OAAO,MAAM,CAAA;AAAA,EACnD,CAAA,MAAA,IAAW,OAAO,MAAA,EAAQ;AACxB,IAAA,MAAM,2BAAA;AAAA,MACJ,+BAAA,CAAgC,OAAO,MAAM;AAAA,KAC/C;AAAA,EACF,CAAA,MAAA,IAAW,OAAO,MAAA,KAAW,UAAA,EAAY;AACvC,IAAA,MAAM,4BAA4B,MAAM,CAAA;AAAA,EAC1C,CAAA,MAAA,IAAW,OAAO,MAAA,KAAW,QAAA,EAAU;AAErC,IAAA,OAAA,CAAQ,IAAA;AAAA,MACN,CAAA,+DAAA,EAAkE,IAAA,CAAK,IAAA,CAAK,EAAE,CAAA,wDAAA;AAAA,KAChF;AACA,IAAA,MAAM,8BAA8B,MAAM,CAAA;AAAA,EAC5C,WAAW,MAAA,EAAQ;AACjB,IAAA,MAAM,2BAAA,CAA4B,+BAAA,CAAgC,MAAM,CAAC,CAAA;AAAA,EAC3E;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"convertLegacyEntityCardExtension.esm.js","sources":["../../../src/alpha/converters/convertLegacyEntityCardExtension.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 { compatWrapper } from '@backstage/core-compat-api';\nimport { BackstagePlugin, getComponentData } from '@backstage/core-plugin-api';\nimport { ExtensionDefinition } from '@backstage/frontend-plugin-api';\nimport { ComponentType } from 'react';\nimport { EntityCardBlueprint } from '../blueprints/EntityCardBlueprint';\nimport kebabCase from 'lodash/kebabCase';\nimport { EntityPredicate } from '../predicates/types';\nimport { Entity } from '@backstage/catalog-model';\nimport { EntityCardType } from '../blueprints/extensionData';\n\n/** @alpha */\nexport function convertLegacyEntityCardExtension(\n LegacyExtension: ComponentType<{}>,\n overrides?: {\n name?: string;\n filter?: string | EntityPredicate | ((entity: Entity) => boolean);\n type?: EntityCardType;\n },\n): ExtensionDefinition {\n const element = <LegacyExtension />;\n\n const extName = getComponentData<string>(element, 'core.extensionName');\n if (!extName) {\n throw new Error('Extension has no name');\n }\n\n const plugin = getComponentData<BackstagePlugin>(element, 'core.plugin');\n const pluginId = plugin?.getId();\n\n const match = extName.match(/^Entity(.*)Card$/);\n const infix = match?.[1] ?? extName;\n\n let name: string | undefined = infix;\n if (\n pluginId &&\n name\n .toLocaleLowerCase('en-US')\n .startsWith(pluginId.toLocaleLowerCase('en-US'))\n ) {\n name = name.slice(pluginId.length);\n if (!name) {\n name = undefined;\n }\n }\n name = name && kebabCase(name);\n\n return EntityCardBlueprint.make({\n name: overrides?.name ?? name,\n params: {\n filter: overrides?.filter,\n loader: async () => compatWrapper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,"file":"convertLegacyEntityCardExtension.esm.js","sources":["../../../src/alpha/converters/convertLegacyEntityCardExtension.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 { compatWrapper } from '@backstage/core-compat-api';\nimport { BackstagePlugin, getComponentData } from '@backstage/core-plugin-api';\nimport { ExtensionDefinition } from '@backstage/frontend-plugin-api';\nimport { ComponentType } from 'react';\nimport { EntityCardBlueprint } from '../blueprints/EntityCardBlueprint';\nimport kebabCase from 'lodash/kebabCase';\nimport { EntityPredicate } from '../predicates/types';\nimport { Entity } from '@backstage/catalog-model';\nimport { EntityCardType } from '../blueprints/extensionData';\n\n/** @alpha */\nexport function convertLegacyEntityCardExtension(\n LegacyExtension: ComponentType<{}>,\n overrides?: {\n name?: string;\n filter?: string | EntityPredicate | ((entity: Entity) => boolean);\n type?: EntityCardType;\n },\n): ExtensionDefinition {\n const element = <LegacyExtension />;\n\n const extName = getComponentData<string>(element, 'core.extensionName');\n if (!extName) {\n throw new Error('Extension has no name');\n }\n\n const plugin = getComponentData<BackstagePlugin>(element, 'core.plugin');\n const pluginId = plugin?.getId();\n\n const match = extName.match(/^Entity(.*)Card$/);\n const infix = match?.[1] ?? extName;\n\n let name: string | undefined = infix;\n if (\n pluginId &&\n name\n .toLocaleLowerCase('en-US')\n .startsWith(pluginId.toLocaleLowerCase('en-US'))\n ) {\n name = name.slice(pluginId.length);\n if (!name) {\n name = undefined;\n }\n }\n name = name && kebabCase(name);\n\n return EntityCardBlueprint.make({\n name: overrides?.name ?? name,\n params: {\n filter: overrides?.filter,\n loader: async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;;"}
@@ -1,5 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { convertLegacyRouteRef, compatWrapper } from '@backstage/core-compat-api';
2
+ import { compatWrapper, convertLegacyRouteRef } from '@backstage/core-compat-api';
3
3
  import { getComponentData } from '@backstage/core-plugin-api';
4
4
  import kebabCase from 'lodash/kebabCase';
5
5
  import startCase from 'lodash/startCase';
@@ -31,8 +31,8 @@ function convertLegacyEntityContentExtension(LegacyExtension, overrides) {
31
31
  name: overrides?.name ?? name,
32
32
  params: {
33
33
  filter: overrides?.filter,
34
- path: overrides?.path ?? `/${kebabCase(infix)}`,
35
- title: overrides?.title ?? startCase(infix),
34
+ path: overrides?.path ?? overrides?.defaultPath ?? `/${kebabCase(infix)}`,
35
+ title: overrides?.title ?? overrides?.defaultTitle ?? startCase(infix),
36
36
  routeRef: mountPoint && convertLegacyRouteRef(mountPoint),
37
37
  loader: async () => compatWrapper(element)
38
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"convertLegacyEntityContentExtension.esm.js","sources":["../../../src/alpha/converters/convertLegacyEntityContentExtension.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 compatWrapper,\n convertLegacyRouteRef,\n} from '@backstage/core-compat-api';\nimport {\n BackstagePlugin,\n getComponentData,\n RouteRef as LegacyRouteRef,\n} from '@backstage/core-plugin-api';\nimport { ExtensionDefinition } from '@backstage/frontend-plugin-api';\nimport kebabCase from 'lodash/kebabCase';\nimport startCase from 'lodash/startCase';\nimport { ComponentType } from 'react';\nimport { EntityContentBlueprint } from '../blueprints/EntityContentBlueprint';\nimport { EntityPredicate } from '../predicates/types';\nimport { Entity } from '@backstage/catalog-model';\n\n/** @alpha */\nexport function convertLegacyEntityContentExtension(\n LegacyExtension: ComponentType<{}>,\n overrides?: {\n name?: string;\n filter?: string | EntityPredicate | ((entity: Entity) => boolean);\n path?: string;\n title?: string;\n\n /**\n * @deprecated Use the `path` param instead.\n */\n defaultPath?: [Error: `Use the 'path' override instead`];\n\n /**\n * @deprecated Use the `path` param instead.\n */\n defaultTitle?: [Error: `Use the 'title' override instead`];\n },\n): ExtensionDefinition {\n const element = <LegacyExtension />;\n\n const extName = getComponentData<string>(element, 'core.extensionName');\n if (!extName) {\n throw new Error('Extension has no name');\n }\n\n const mountPoint = getComponentData<LegacyRouteRef>(\n element,\n 'core.mountPoint',\n );\n\n const plugin = getComponentData<BackstagePlugin>(element, 'core.plugin');\n const pluginId = plugin?.getId();\n\n const match = extName.match(/^Entity(.*)Content$/);\n const infix = match?.[1] ?? extName;\n\n let name: string | undefined = infix;\n if (\n pluginId &&\n name\n .toLocaleLowerCase('en-US')\n .startsWith(pluginId.toLocaleLowerCase('en-US'))\n ) {\n name = name.slice(pluginId.length);\n if (!name) {\n name = undefined;\n }\n }\n name = name && kebabCase(name);\n\n return EntityContentBlueprint.make({\n name: overrides?.name ?? name,\n params: {\n filter: overrides?.filter,\n path: overrides?.path ?? `/${kebabCase(infix)}`,\n title: overrides?.title ?? startCase(infix),\n routeRef: mountPoint && convertLegacyRouteRef(mountPoint),\n loader: async () => compatWrapper(element),\n },\n });\n}\n"],"names":[],"mappings":";;;;;;;AAkCgB,SAAA,mCAAA,CACd,iBACA,SAgBqB,EAAA;AACrB,EAAM,MAAA,OAAA,uBAAW,eAAgB,EAAA,EAAA,CAAA;AAEjC,EAAM,MAAA,OAAA,GAAU,gBAAyB,CAAA,OAAA,EAAS,oBAAoB,CAAA;AACtE,EAAA,IAAI,CAAC,OAAS,EAAA;AACZ,IAAM,MAAA,IAAI,MAAM,uBA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ension.esm.js","sources":["../../../src/alpha/converters/convertLegacyEntityContentExtension.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 compatWrapper,\n convertLegacyRouteRef,\n} from '@backstage/core-compat-api';\nimport {\n BackstagePlugin,\n getComponentData,\n RouteRef as LegacyRouteRef,\n} from '@backstage/core-plugin-api';\nimport { ExtensionDefinition } from '@backstage/frontend-plugin-api';\nimport kebabCase from 'lodash/kebabCase';\nimport startCase from 'lodash/startCase';\nimport { ComponentType } from 'react';\nimport { EntityContentBlueprint } from '../blueprints/EntityContentBlueprint';\nimport { EntityPredicate } from '../predicates/types';\nimport { Entity } from '@backstage/catalog-model';\n\n/** @alpha */\nexport function convertLegacyEntityContentExtension(\n LegacyExtension: ComponentType<{}>,\n overrides?: {\n name?: string;\n filter?: string | EntityPredicate | ((entity: Entity) => boolean);\n path?: string;\n title?: string;\n\n /**\n * @deprecated Use the `path` param instead.\n */\n defaultPath?: [Error: `Use the 'path' override instead`];\n\n /**\n * @deprecated Use the `path` param instead.\n */\n defaultTitle?: [Error: `Use the 'title' override instead`];\n },\n): ExtensionDefinition {\n const element = <LegacyExtension />;\n\n const extName = getComponentData<string>(element, 'core.extensionName');\n if (!extName) {\n throw new Error('Extension has no name');\n }\n\n const mountPoint = getComponentData<LegacyRouteRef>(\n element,\n 'core.mountPoint',\n );\n\n const plugin = getComponentData<BackstagePlugin>(element, 'core.plugin');\n const pluginId = plugin?.getId();\n\n const match = extName.match(/^Entity(.*)Content$/);\n const infix = match?.[1] ?? extName;\n\n let name: string | undefined = infix;\n if (\n pluginId &&\n name\n .toLocaleLowerCase('en-US')\n .startsWith(pluginId.toLocaleLowerCase('en-US'))\n ) {\n name = name.slice(pluginId.length);\n if (!name) {\n name = undefined;\n }\n }\n name = name && kebabCase(name);\n // TODO(blam): Remove support for all the `default*` props in the future, this breaks backwards compatibility without it\n // As this is marked as BREAKING ALPHA, it doesn't affect the public API so it falls in range and gets picked\n // up by packages that depend on `catalog-react`.\n return EntityContentBlueprint.make({\n name: overrides?.name ?? name,\n params: {\n filter: overrides?.filter,\n path: (overrides?.path ??\n overrides?.defaultPath ??\n `/${kebabCase(infix)}`) as string,\n title: (overrides?.title ??\n overrides?.defaultTitle ??\n startCase(infix)) as string,\n routeRef: mountPoint && convertLegacyRouteRef(mountPoint),\n loader: async () => compatWrapper(element),\n },\n });\n}\n"],"names":[],"mappings":";;;;;;;AAkCO,SAAS,mCAAA,CACd,iBACA,SAAA,EAgBqB;AACrB,EAAA,MAAM,OAAA,uBAAW,eAAA,EAAA,EAAgB,CAAA;AAEjC,EAAA,MAAM,OAAA,GAAU,gBAAA,CAAyB,OAAA,EAAS,oBAAoB,CAAA;AACtE,EAAA,IAAI,CAAC,OAAA,EAAS;AACZ,IAAA,MAAM,IAAI,MAAM,uBAAuB,CAAA;AAAA,EACzC;AAEA,EAAA,MAAM,UAAA,GAAa,gBAAA;AAAA,IACjB,OAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,MAAM,MAAA,GAAS,gBAAA,CAAkC,OAAA,EAAS,aAAa,CAAA;AACvE,EAAA,MAAM,QAAA,GAAW,QAAQ,KAAA,EAAM;AAE/B,EAAA,MAAM,KAAA,GAAQ,OAAA,CAAQ,KAAA,CAAM,qBAAqB,CAAA;AACjD,EAAA,MAAM,KAAA,GAAQ,KAAA,GAAQ,CAAC,CAAA,IAAK,OAAA;AAE5B,EAAA,IAAI,IAAA,GAA2B,KAAA;AAC/B,EAAA,IACE,QAAA,IACA,IAAA,CACG,iBAAA,CAAkB,OAAO,CAAA,CACzB,WAAW,QAAA,CAAS,iBAAA,CAAkB,OAAO,CAAC,CAAA,EACjD;AACA,IAAA,IAAA,GAAO,IAAA,CAAK,KAAA,CAAM,QAAA,CAAS,MAAM,CAAA;AACjC,IAAA,IAAI,CAAC,IAAA,EAAM;AACT,MAAA,IAAA,GAAO,MAAA;AAAA,IACT;AAAA,EACF;AACA,EAAA,IAAA,GAAO,IAAA,IAAQ,UAAU,IAAI,CAAA;AAI7B,EAAA,OAAO,uBAAuB,IAAA,CAAK;AAAA,IACjC,IAAA,EAAM,WAAW,IAAA,IAAQ,IAAA;AAAA,IACzB,MAAA,EAAQ;AAAA,MACN,QAAQ,SAAA,EAAW,MAAA;AAAA,MACnB,IAAA,EAAO,WAAW,IAAA,IAChB,SAAA,EAAW,eACX,CAAA,CAAA,EAAI,SAAA,CAAU,KAAK,CAAC,CAAA,CAAA;AAAA,MACtB,OAAQ,SAAA,EAAW,KAAA,IACjB,SAAA,EAAW,YAAA,IACX,UAAU,KAAK,CAAA;AAAA,MACjB,QAAA,EAAU,UAAA,IAAc,qBAAA,CAAsB,UAAU,CAAA;AAAA,MACxD,MAAA,EAAQ,YAAY,aAAA,CAAc,OAAO;AAAA;AAC3C,GACD,CAAA;AACH;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"createEntityPredicateSchema.esm.js","sources":["../../../src/alpha/predicates/createEntityPredicateSchema.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { EntityPredicate, EntityPredicateValue } from './types';\nimport type { z as zImpl, ZodType } from 'zod';\n\n/** @internal */\nexport function createEntityPredicateSchema(z: typeof zImpl) {\n const primitiveSchema = z.union([z.string(), z.number(), z.boolean()]);\n\n const comparableValueSchema = z.union([\n primitiveSchema,\n z.array(primitiveSchema),\n ]);\n\n // eslint-disable-next-line prefer-const\n let valuePredicateSchema: ZodType<EntityPredicateValue>;\n\n const predicateSchema = z.lazy(() =>\n z.union([\n comparableValueSchema,\n z.object({ $all: z.array(predicateSchema) }),\n z.object({ $any: z.array(predicateSchema) }),\n z.object({ $not: predicateSchema }),\n z.record(z.string().regex(/^(?!\\$).*$/), valuePredicateSchema),\n ]),\n ) as ZodType<EntityPredicate>;\n\n valuePredicateSchema = z.union([\n comparableValueSchema,\n z.object({ $exists: z.boolean() }),\n z.object({ $in: z.array(primitiveSchema) }),\n z.object({ $contains: predicateSchema }),\n ]) as ZodType<EntityPredicateValue>;\n\n return predicateSchema;\n}\n"],"names":[],"mappings":"AAoBO,SAAS,4BAA4B,CAAiB,EAAA;AAC3D,EAAA,MAAM,eAAkB,GAAA,CAAA,CAAE,KAAM,CAAA,CAAC,CAAE,CAAA,MAAA,EAAU,EAAA,CAAA,CAAE,MAAO,EAAA,EAAG,CAAE,CAAA,OAAA,EAAS,CAAC,CAAA;AAErE,EAAM,MAAA,qBAAA,GAAwB,EAAE,KAAM,CAAA;AAAA,IACpC,eAAA;AAAA,IACA,CAAA,CAAE,MAAM,eAAe;AAAA,GACxB,CAAA;AAGD,EAAI,IAAA,oBAAA;AAEJ,EAAA,MAAM,kBAAkB,CAAE,CAAA,IAAA;AAAA,IAAK,MAC7B,EAAE,KAAM,CAAA;AAAA,MACN,qBAAA;AAAA,MACA,CAAA,CAAE,OAAO,EAAE,IAAA,EAAM,EAAE,KAAM,CAAA,eAAe,GAAG,CAAA;AAAA,MAC3C,CAAA,CAAE,OAAO,EAAE,IAAA,EAAM,EAAE,KAAM,CAAA,eAAe,GAAG,CAAA;AAAA,MAC3C,CAAE,CAAA,MAAA,CAAO,EAAE,IAAA,EAAM,iBAAiB,CAAA;AAAA,MAClC,CAAA,CAAE,OAAO,CAAE,CAAA,MAAA,GAAS,KAAM,CAAA,YAAY,GAAG,oBAAoB;AAAA,KAC9D;AAAA,GACH;AAEA,EAAA,oBAAA,GAAuB,EAAE,KAAM,CAAA;AAAA,IAC7B,qBAAA;AAAA,IACA,EAAE,MAAO,CAAA,EAAE,SAAS,CAAE,CAAA,OAAA,IAAW,CAAA;AAAA,IACjC,CAAA,CAAE,OAAO,EAAE,GAAA,EAAK,EAAE,KAAM,CAAA,eAAe,GAAG,CAAA;AAAA,IAC1C,CAAE,CAAA,MAAA,CAAO,EAAE,SAAA,EAAW,iBAAiB;AAAA,GACxC,CAAA;AAED,EAAO,OAAA,eAAA;AACT;;;;"}
1
+ {"version":3,"file":"createEntityPredicateSchema.esm.js","sources":["../../../src/alpha/predicates/createEntityPredicateSchema.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { EntityPredicate, EntityPredicateValue } from './types';\nimport type { z as zImpl, ZodType } from 'zod';\n\n/** @internal */\nexport function createEntityPredicateSchema(z: typeof zImpl) {\n const primitiveSchema = z.union([z.string(), z.number(), z.boolean()]);\n\n const comparableValueSchema = z.union([\n primitiveSchema,\n z.array(primitiveSchema),\n ]);\n\n // eslint-disable-next-line prefer-const\n let valuePredicateSchema: ZodType<EntityPredicateValue>;\n\n const predicateSchema = z.lazy(() =>\n z.union([\n comparableValueSchema,\n z.object({ $all: z.array(predicateSchema) }),\n z.object({ $any: z.array(predicateSchema) }),\n z.object({ $not: predicateSchema }),\n z.record(z.string().regex(/^(?!\\$).*$/), valuePredicateSchema),\n ]),\n ) as ZodType<EntityPredicate>;\n\n valuePredicateSchema = z.union([\n comparableValueSchema,\n z.object({ $exists: z.boolean() }),\n z.object({ $in: z.array(primitiveSchema) }),\n z.object({ $contains: predicateSchema }),\n ]) as ZodType<EntityPredicateValue>;\n\n return predicateSchema;\n}\n"],"names":[],"mappings":"AAoBO,SAAS,4BAA4B,CAAA,EAAiB;AAC3D,EAAA,MAAM,eAAA,GAAkB,CAAA,CAAE,KAAA,CAAM,CAAC,CAAA,CAAE,MAAA,EAAO,EAAG,CAAA,CAAE,MAAA,EAAO,EAAG,CAAA,CAAE,OAAA,EAAS,CAAC,CAAA;AAErE,EAAA,MAAM,qBAAA,GAAwB,EAAE,KAAA,CAAM;AAAA,IACpC,eAAA;AAAA,IACA,CAAA,CAAE,MAAM,eAAe;AAAA,GACxB,CAAA;AAGD,EAAA,IAAI,oBAAA;AAEJ,EAAA,MAAM,kBAAkB,CAAA,CAAE,IAAA;AAAA,IAAK,MAC7B,EAAE,KAAA,CAAM;AAAA,MACN,qBAAA;AAAA,MACA,CAAA,CAAE,OAAO,EAAE,IAAA,EAAM,EAAE,KAAA,CAAM,eAAe,GAAG,CAAA;AAAA,MAC3C,CAAA,CAAE,OAAO,EAAE,IAAA,EAAM,EAAE,KAAA,CAAM,eAAe,GAAG,CAAA;AAAA,MAC3C,CAAA,CAAE,MAAA,CAAO,EAAE,IAAA,EAAM,iBAAiB,CAAA;AAAA,MAClC,CAAA,CAAE,OAAO,CAAA,CAAE,MAAA,GAAS,KAAA,CAAM,YAAY,GAAG,oBAAoB;AAAA,KAC9D;AAAA,GACH;AAEA,EAAA,oBAAA,GAAuB,EAAE,KAAA,CAAM;AAAA,IAC7B,qBAAA;AAAA,IACA,EAAE,MAAA,CAAO,EAAE,SAAS,CAAA,CAAE,OAAA,IAAW,CAAA;AAAA,IACjC,CAAA,CAAE,OAAO,EAAE,GAAA,EAAK,EAAE,KAAA,CAAM,eAAe,GAAG,CAAA;AAAA,IAC1C,CAAA,CAAE,MAAA,CAAO,EAAE,SAAA,EAAW,iBAAiB;AAAA,GACxC,CAAA;AAED,EAAA,OAAO,eAAA;AACT;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"entityPredicateToFilterFunction.esm.js","sources":["../../../src/alpha/predicates/entityPredicateToFilterFunction.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { JsonValue } from '@backstage/types';\nimport { EntityPredicate, EntityPredicateValue } from './types';\nimport { valueAtPath } from './valueAtPath';\n\n/**\n * Convert an entity predicate to a filter function that can be used to filter entities.\n * @alpha\n */\nexport function entityPredicateToFilterFunction<T extends JsonValue>(\n entityPredicate: EntityPredicate,\n): (value: T) => boolean {\n return value => evaluateEntityPredicate(entityPredicate, value);\n}\n\n/**\n * Evaluate a entity predicate against a value, typically an entity.\n *\n * @internal\n */\nfunction evaluateEntityPredicate(\n filter: EntityPredicate,\n value: JsonValue,\n): boolean {\n if (typeof filter !== 'object' || filter === null || Array.isArray(filter)) {\n return valuesAreEqual(value, filter);\n }\n\n if ('$all' in filter) {\n return filter.$all.every(f => evaluateEntityPredicate(f, value));\n }\n if ('$any' in filter) {\n return filter.$any.some(f => evaluateEntityPredicate(f, value));\n }\n if ('$not' in filter) {\n return !evaluateEntityPredicate(filter.$not, value);\n }\n\n for (const filterKey in filter) {\n if (!Object.hasOwn(filter, filterKey)) {\n continue;\n }\n if (filterKey.startsWith('$')) {\n return false;\n }\n if (\n !evaluatePredicateValue(filter[filterKey], valueAtPath(value, filterKey))\n ) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Evaluate a single value against a predicate value.\n *\n * @internal\n */\nfunction evaluatePredicateValue(\n filter: EntityPredicateValue,\n value: JsonValue | undefined,\n): boolean {\n if (typeof filter !== 'object' || filter === null || Array.isArray(filter)) {\n return valuesAreEqual(value, filter);\n }\n\n if ('$contains' in filter) {\n if (!Array.isArray(value)) {\n return false;\n }\n return value.some(v => evaluateEntityPredicate(filter.$contains, v));\n }\n if ('$in' in filter) {\n return filter.$in.some(search => valuesAreEqual(value, search));\n }\n if ('$exists' in filter) {\n if (filter.$exists === true) {\n return value !== undefined;\n }\n return value === undefined;\n }\n\n return false;\n}\n\nfunction valuesAreEqual(\n a: JsonValue | undefined,\n b: JsonValue | undefined,\n): boolean {\n if (a === null || b === null) {\n return false;\n }\n if (a === b) {\n return true;\n }\n if (typeof a === 'string' && typeof b === 'string') {\n return a.toLocaleUpperCase('en-US') === b.toLocaleUpperCase('en-US');\n }\n if (typeof a === 'number' || typeof b === 'number') {\n return String(a) === String(b);\n }\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((v, i) => valuesAreEqual(v, b[i]));\n }\n return false;\n}\n"],"names":[],"mappings":";;AAwBO,SAAS,gCACd,eACuB,EAAA;AACvB,EAAO,OAAA,CAAA,KAAA,KAAS,uBAAwB,CAAA,eAAA,EAAiB,KAAK,CAAA;AAChE;AAOA,SAAS,uBAAA,CACP,QACA,KACS,EAAA;AACT,EAAI,IAAA,OAAO,WAAW,QAAY,IAAA,MAAA,KAAW,QAAQ,KAAM,CAAA,OAAA,CAAQ,MAAM,CAAG,EAAA;AAC1E,IAAO,OAAA,cAAA,CAAe,OAAO,MAAM,CAAA;AAAA;AAGrC,EAAA,IAAI,UAAU,MAAQ,EAAA;AACpB,IAAA,OAAO,OAAO,IAAK,CAAA,KAAA,CAAM,OAAK,uBAAwB,CAAA,CAAA,EAAG,KAAK,CAAC,CAAA;AAAA;AAEjE,EAAA,IAAI,UAAU,MAAQ,EAAA;AACpB,I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EAAA;AACvB,IAAI,IAAA,MAAA,CAAO,YAAY,IAAM,EAAA;AAC3B,MAAA,OAAO,KAAU,KAAA,KAAA,CAAA;AAAA;AAEnB,IAAA,OAAO,KAAU,KAAA,KAAA,CAAA;AAAA;AAGnB,EAAO,OAAA,KAAA;AACT;AAEA,SAAS,cAAA,CACP,GACA,CACS,EAAA;AACT,EAAI,IAAA,CAAA,KAAM,IAAQ,IAAA,CAAA,KAAM,IAAM,EAAA;AAC5B,IAAO,OAAA,KAAA;AAAA;AAET,EAAA,IAAI,MAAM,CAAG,EAAA;AACX,IAAO,OAAA,IAAA;AAAA;AAET,EAAA,IAAI,OAAO,CAAA,KAAM,QAAY,IAAA,OAAO,MAAM,QAAU,EAAA;AAClD,IAAA,OAAO,EAAE,iBAAkB,CAAA,OAAO,CAAM,KAAA,CAAA,CAAE,kBAAkB,OAAO,CAAA;AAAA;AAErE,EAAA,IAAI,OAAO,CAAA,KAAM,QAAY,IAAA,OAAO,MAAM,QAAU,EAAA;AAClD,IAAA,OAAO,MAAO,CAAA,CAAC,CAAM,KAAA,MAAA,CAAO,CAAC,CAAA;AAAA;AAE/B,EAAA,IAAI,MAAM,OAAQ,CAAA,CAAC,KAAK,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAG,EAAA;AACxC,IAAA,OAAO,CAAE,CAAA,MAAA,KAAW,CAAE,CAAA,MAAA,IAAU,EAAE,KAAM,CAAA,CAAC,CAAG,EAAA,CAAA,KAAM,cAAe,CAAA,CAAA,EAAG,CAAE,CAAA,CAAC,CAAC,CAAC,CAAA;AAAA;AAE3E,EAAO,OAAA,KAAA;AACT;;;;"}
1
+ {"version":3,"file":"entityPredicateToFilterFunction.esm.js","sources":["../../../src/alpha/predicates/entityPredicateToFilterFunction.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { JsonValue } from '@backstage/types';\nimport { EntityPredicate, EntityPredicateValue } from './types';\nimport { valueAtPath } from './valueAtPath';\n\n/**\n * Convert an entity predicate to a filter function that can be used to filter entities.\n * @alpha\n */\nexport function entityPredicateToFilterFunction<T extends JsonValue>(\n entityPredicate: EntityPredicate,\n): (value: T) => boolean {\n return value => evaluateEntityPredicate(entityPredicate, value);\n}\n\n/**\n * Evaluate a entity predicate against a value, typically an entity.\n *\n * @internal\n */\nfunction evaluateEntityPredicate(\n filter: EntityPredicate,\n value: JsonValue,\n): boolean {\n if (typeof filter !== 'object' || filter === null || Array.isArray(filter)) {\n return valuesAreEqual(value, filter);\n }\n\n if ('$all' in filter) {\n return filter.$all.every(f => evaluateEntityPredicate(f, value));\n }\n if ('$any' in filter) {\n return filter.$any.some(f => evaluateEntityPredicate(f, value));\n }\n if ('$not' in filter) {\n return !evaluateEntityPredicate(filter.$not, value);\n }\n\n for (const filterKey in filter) {\n if (!Object.hasOwn(filter, filterKey)) {\n continue;\n }\n if (filterKey.startsWith('$')) {\n return false;\n }\n if (\n !evaluatePredicateValue(filter[filterKey], valueAtPath(value, filterKey))\n ) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Evaluate a single value against a predicate value.\n *\n * @internal\n */\nfunction evaluatePredicateValue(\n filter: EntityPredicateValue,\n value: JsonValue | undefined,\n): boolean {\n if (typeof filter !== 'object' || filter === null || Array.isArray(filter)) {\n return valuesAreEqual(value, filter);\n }\n\n if ('$contains' in filter) {\n if (!Array.isArray(value)) {\n return false;\n }\n return value.some(v => evaluateEntityPredicate(filter.$contains, v));\n }\n if ('$in' in filter) {\n return filter.$in.some(search => valuesAreEqual(value, search));\n }\n if ('$exists' in filter) {\n if (filter.$exists === true) {\n return value !== undefined;\n }\n return value === undefined;\n }\n\n return false;\n}\n\nfunction valuesAreEqual(\n a: JsonValue | undefined,\n b: JsonValue | undefined,\n): boolean {\n if (a === null || b === null) {\n return false;\n }\n if (a === b) {\n return true;\n }\n if (typeof a === 'string' && typeof b === 'string') {\n return a.toLocaleUpperCase('en-US') === b.toLocaleUpperCase('en-US');\n }\n if (typeof a === 'number' || typeof b === 'number') {\n return String(a) === String(b);\n }\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((v, i) => valuesAreEqual(v, b[i]));\n }\n return false;\n}\n"],"names":[],"mappings":";;AAwBO,SAAS,gCACd,eAAA,EACuB;AACvB,EAAA,OAAO,CAAA,KAAA,KAAS,uBAAA,CAAwB,eAAA,EAAiB,KAAK,CAAA;AAChE;AAOA,SAAS,uBAAA,CACP,QACA,KAAA,EACS;AACT,EAAA,IAAI,OAAO,WAAW,QAAA,IAAY,MAAA,KAAW,QAAQ,KAAA,CAAM,OAAA,CAAQ,MAAM,CAAA,EAAG;AAC1E,IAAA,OAAO,cAAA,CAAe,OAAO,MAAM,CAAA;AAAA,EACrC;AAEA,EAAA,IAAI,UAAU,MAAA,EAAQ;AACpB,IAAA,OAAO,OAAO,IAAA,CAAK,KAAA,CAAM,OAAK,uBAAA,CAAwB,CAAA,EAAG,KAAK,CAAC,CAAA;AAAA,EACjE;AACA,EAAA,IAAI,UAAU,MAAA,EAAQ;AACpB,IAAA,OAAO,OAAO,IAAA,CAAK,IAAA,CAAK,OAAK,uBAAA,CAAwB,CAAA,EAAG,KAAK,CAAC,CAAA;AAAA,EAChE;AACA,EAAA,IAAI,UAAU,MAAA,EAAQ;AACpB,IAAA,OAAO,CAAC,uBAAA,CAAwB,MAAA,CAAO,IAAA,EAAM,KAAK,CAAA;AAAA,EACpD;AAEA,EAAA,KAAA,MAAW,aAAa,MAAA,EAAQ;AAC9B,IAAA,IAAI,CAAC,MAAA,CAAO,MAAA,CAAO,MAAA,EAAQ,SAAS,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AAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,IAAI,MAAM,CAAA,EAAG;AACX,IAAA,OAAO,IAAA;AAAA,EACT;AACA,EAAA,IAAI,OAAO,CAAA,KAAM,QAAA,IAAY,OAAO,MAAM,QAAA,EAAU;AAClD,IAAA,OAAO,EAAE,iBAAA,CAAkB,OAAO,CAAA,KAAM,CAAA,CAAE,kBAAkB,OAAO,CAAA;AAAA,EACrE;AACA,EAAA,IAAI,OAAO,CAAA,KAAM,QAAA,IAAY,OAAO,MAAM,QAAA,EAAU;AAClD,IAAA,OAAO,MAAA,CAAO,CAAC,CAAA,KAAM,MAAA,CAAO,CAAC,CAAA;AAAA,EAC/B;AACA,EAAA,IAAI,MAAM,OAAA,CAAQ,CAAC,KAAK,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA,EAAG;AACxC,IAAA,OAAO,CAAA,CAAE,MAAA,KAAW,CAAA,CAAE,MAAA,IAAU,EAAE,KAAA,CAAM,CAAC,CAAA,EAAG,CAAA,KAAM,cAAA,CAAe,CAAA,EAAG,CAAA,CAAE,CAAC,CAAC,CAAC,CAAA;AAAA,EAC3E;AACA,EAAA,OAAO,KAAA;AACT;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"valueAtPath.esm.js","sources":["../../../src/alpha/predicates/valueAtPath.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { JsonValue } from '@backstage/types';\n\n/**\n * Looks up a value by path in a nested object structure.\n *\n * @remarks\n *\n * The path should be a dot-separated string of keys to traverse. The traversal\n * will tolerate object keys containing dots, and will keep searching until a\n * value has been found or all matching keys have been traversed.\n *\n * This lookup does not traverse into arrays, returning `undefined` instead.\n *\n * @internal\n */\nexport function valueAtPath(\n value: JsonValue | undefined,\n path: string,\n): JsonValue | undefined {\n if (!path) {\n return undefined;\n }\n if (\n value === undefined ||\n value === null ||\n typeof value !== 'object' ||\n Array.isArray(value)\n ) {\n return undefined;\n }\n\n for (const valueKey in value) {\n if (!Object.hasOwn(value, valueKey)) {\n continue;\n }\n if (valueKey === path) {\n if (value[valueKey] !== undefined) {\n return value[valueKey];\n }\n }\n if (path.startsWith(`${valueKey}.`)) {\n const found = valueAtPath(\n value[valueKey],\n path.slice(valueKey.length + 1),\n );\n if (found !== undefined) {\n return found;\n }\n }\n }\n\n return undefined;\n}\n"],"names":[],"mappings":"AA+BgB,SAAA,WAAA,CACd,OACA,IACuB,EAAA;AACvB,EAAA,IAAI,CAAC,IAAM,EAAA;AACT,IAAO,OAAA,KAAA,CAAA;AAAA;AAET,EACE,IAAA,KAAA,KAAU,KACV,CAAA,IAAA,KAAA,KAAU,IACV,IAAA,OAAO,UAAU,QACjB,IAAA,KAAA,CAAM,OAAQ,CAAA,KAAK,CACnB,EAAA;AACA,IAAO,OAAA,KAAA,CAAA;AAAA;AAGT,EAAA,KAAA,MAAW,YAAY,KAAO,EAAA;AAC5B,IAAA,IAAI,CAAC,MAAA,CAAO,MAAO,CAAA,KAAA,EAAO,QAAQ,CAAG,EAAA;AACnC,MAAA;AAAA;AAEF,IAAA,IAAI,aAAa,IAAM,EAAA;AACrB,MAAI,IAAA,KAAA,CAAM,QAAQ,CAAA,KAAM,KAAW,CAAA,EAAA;AACjC,QAAA,OAAO,MAAM,QAAQ,CAAA;AAAA;AACvB;AAEF,IAAA,IAAI,IAAK,CAAA,UAAA,CAAW,CAAG,EAAA,QAAQ,GAAG,CAAG,EAAA;AACnC,MAAA,MAAM,KAAQ,GAAA,WAAA;AAAA,QACZ,MAAM,QAAQ,CAAA;AAAA,QACd,IAAK,CAAA,KAAA,CAAM,QAAS,CAAA,MAAA,GAAS,CAAC;AAAA,OAChC;AACA,MAAA,IAAI,UAAU,KAAW,CAAA,EAAA;AACvB,QAAO,OAAA,KAAA;AAAA;AACT;AACF;AAGF,EAAO,OAAA,KAAA,CAAA;AACT;;;;"}
1
+ {"version":3,"file":"valueAtPath.esm.js","sources":["../../../src/alpha/predicates/valueAtPath.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { JsonValue } from '@backstage/types';\n\n/**\n * Looks up a value by path in a nested object structure.\n *\n * @remarks\n *\n * The path should be a dot-separated string of keys to traverse. The traversal\n * will tolerate object keys containing dots, and will keep searching until a\n * value has been found or all matching keys have been traversed.\n *\n * This lookup does not traverse into arrays, returning `undefined` instead.\n *\n * @internal\n */\nexport function valueAtPath(\n value: JsonValue | undefined,\n path: string,\n): JsonValue | undefined {\n if (!path) {\n return undefined;\n }\n if (\n value === undefined ||\n value === null ||\n typeof value !== 'object' ||\n Array.isArray(value)\n ) {\n return undefined;\n }\n\n for (const valueKey in value) {\n if (!Object.hasOwn(value, valueKey)) {\n continue;\n }\n if (valueKey === path) {\n if (value[valueKey] !== undefined) {\n return value[valueKey];\n }\n }\n if (path.startsWith(`${valueKey}.`)) {\n const found = valueAtPath(\n value[valueKey],\n path.slice(valueKey.length + 1),\n );\n if (found !== undefined) {\n return found;\n }\n }\n }\n\n return undefined;\n}\n"],"names":[],"mappings":"AA+BO,SAAS,WAAA,CACd,OACA,IAAA,EACuB;AACvB,EAAA,IAAI,CAAC,IAAA,EAAM;AACT,IAAA,OAAO,MAAA;AAAA,EACT;AACA,EAAA,IACE,KAAA,KAAU,MAAA,IACV,KAAA,KAAU,IAAA,IACV,OAAO,UAAU,QAAA,IACjB,KAAA,CAAM,OAAA,CAAQ,KAAK,CAAA,EACnB;AACA,IAAA,OAAO,MAAA;AAAA,EACT;AAEA,EAAA,KAAA,MAAW,YAAY,KAAA,EAAO;AAC5B,IAAA,IAAI,CAAC,MAAA,CAAO,MAAA,CAAO,KAAA,EAAO,QAAQ,CAAA,EAAG;AACnC,MAAA;AAAA,IACF;AACA,IAAA,IAAI,aAAa,IAAA,EAAM;AACrB,MAAA,IAAI,KAAA,CAAM,QAAQ,CAAA,KAAM,MAAA,EAAW;AACjC,QAAA,OAAO,MAAM,QAAQ,CAAA;AAAA,MACvB;AAAA,IACF;AACA,IAAA,IAAI,IAAA,CAAK,UAAA,CAAW,CAAA,EAAG,QAAQ,GAAG,CAAA,EAAG;AACnC,MAAA,MAAM,KAAA,GAAQ,WAAA;AAAA,QACZ,MAAM,QAAQ,CAAA;AAAA,QACd,IAAA,CAAK,KAAA,CAAM,QAAA,CAAS,MAAA,GAAS,CAAC;AAAA,OAChC;AACA,MAAA,IAAI,UAAU,MAAA,EAAW;AACvB,QAAA,OAAO,KAAA;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAEA,EAAA,OAAO,MAAA;AACT;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"api.esm.js","sources":["../src/api.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 { CatalogApi } from '@backstage/catalog-client';\nimport { createApiRef } from '@backstage/core-plugin-api';\n\n/**\n * The API reference for the {@link @backstage/catalog-client#CatalogApi}.\n * @public\n */\nexport const catalogApiRef = createApiRef<CatalogApi>({\n id: 'plugin.catalog.service',\n});\n"],"names":[],"mappings":";;AAuBO,MAAM,gBAAgB,YAAyB,CAAA;AAAA,EACpD,EAAI,EAAA;AACN,CAAC;;;;"}
1
+ {"version":3,"file":"api.esm.js","sources":["../src/api.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 { CatalogApi } from '@backstage/catalog-client';\nimport { createApiRef } from '@backstage/core-plugin-api';\n\n/**\n * The API reference for the {@link @backstage/catalog-client#CatalogApi}.\n * @public\n */\nexport const catalogApiRef = createApiRef<CatalogApi>({\n id: 'plugin.catalog.service',\n});\n"],"names":[],"mappings":";;AAuBO,MAAM,gBAAgB,YAAA,CAAyB;AAAA,EACpD,EAAA,EAAI;AACN,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityPresentationApi.esm.js","sources":["../../../src/apis/EntityPresentationApi/EntityPresentationApi.ts"],"sourcesContent":["/*\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 { Entity } from '@backstage/catalog-model';\nimport {\n ApiRef,\n IconComponent,\n createApiRef,\n} from '@backstage/core-plugin-api';\nimport { Observable } from '@backstage/types';\n\n/**\n * An API that handles how to represent entities in the interface.\n *\n * @public\n */\nexport const entityPresentationApiRef: ApiRef<EntityPresentationApi> =\n createApiRef({\n id: 'plugin.catalog.entity-presentation',\n });\n\n/**\n * The visual presentation of an entity reference at some point in time.\n *\n * @public\n */\nexport interface EntityRefPresentationSnapshot {\n /**\n * The ref to the entity that this snapshot represents.\n *\n * @remarks\n *\n * Note that when the input data was broken or had missing vital pieces of\n * information, this string may contain placeholders such as \"unknown\". You\n * can therefore not necessarily assume that the ref is completely valid and\n * usable for example for forming a clickable link to the entity.\n */\n entityRef: string;\n /**\n * A string that can be used as a plain representation of the entity, for\n * example in a header or a link.\n *\n * @remarks\n *\n * The title may be short and not contain all of the information that the\n * entity holds. When rendering the primary title, you may also want to\n * make sure to add more contextual information nearby such as the icon or\n * secondary title, since the primary could for example just be the\n * `metadata.name` of the entity which might be ambiguous to the reader.\n */\n primaryTitle: string;\n /**\n * Optionally, some additional textual information about the entity, to be\n * used as a clarification on top of the primary title.\n *\n * @remarks\n *\n * This text can for example be rendered in a tooltip or be used as a\n * subtitle. It may not be sufficient to display on its own; it should\n * typically be used in conjunction with the primary title. It can contain\n * such information as the entity ref and/or a `spec.type` etc.\n */\n secondaryTitle?: string;\n /**\n * Optionally, an icon that represents the kind/type of entity.\n *\n * @remarks\n *\n * This icon should ideally be easily recognizable as the kind of entity, and\n * be used consistently throughout the Backstage interface. It can be rendered\n * both in larger formats such as in a header, or in smaller formats such as\n * inline with regular text, so bear in mind that the legibility should be\n * high in both cases.\n *\n * A value of `false` here indicates the desire to not have an icon present\n * for the given implementation. A value of `undefined` leaves it at the\n * discretion of the display layer to choose what to do (such as for example\n * showing a fallback icon).\n */\n Icon?: IconComponent | undefined | false;\n}\n\n/**\n * The visual presentation of an entity reference.\n *\n * @public\n */\nexport interface EntityRefPresentation {\n /**\n * The representation that's suitable to use for this entity right now.\n */\n snapshot: EntityRefPresentationSnapshot;\n /**\n * Some presentation implementations support emitting updated snapshots over\n * time, for example after retrieving additional data from the catalog or\n * elsewhere.\n */\n update$?: Observable<EntityRefPresentationSnapshot>;\n /**\n * A promise that resolves to a usable entity presentation.\n */\n promise: Promise<EntityRefPresentationSnapshot>;\n}\n\n/**\n * An API that decides how to visually represent entities in the interface.\n *\n * @remarks\n *\n * Most consumers will want to use the {@link useEntityPresentation} hook\n * instead of this interface directly.\n *\n * @public\n */\nexport interface EntityPresentationApi {\n /**\n * Fetches the presentation for an entity.\n *\n * @param entityOrRef - Either an entity, or a string ref to it. If you pass\n * in an entity, it is assumed that it is not a partial one - i.e. only pass\n * in an entity if you know that it was fetched in such a way that it\n * contains all of the fields that the representation renderer needs.\n * @param context - Contextual information that may affect the presentation.\n */\n forEntity(\n entityOrRef: Entity | string,\n context?: {\n defaultKind?: string;\n defaultNamespace?: string;\n },\n ): EntityRefPresentation;\n}\n"],"names":[],"mappings":";;AA6BO,MAAM,2BACX,YAAa,CAAA;AAAA,EACX,EAAI,EAAA;AACN,CAAC;;;;"}
1
+ {"version":3,"file":"EntityPresentationApi.esm.js","sources":["../../../src/apis/EntityPresentationApi/EntityPresentationApi.ts"],"sourcesContent":["/*\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 { Entity } from '@backstage/catalog-model';\nimport {\n ApiRef,\n IconComponent,\n createApiRef,\n} from '@backstage/core-plugin-api';\nimport { Observable } from '@backstage/types';\n\n/**\n * An API that handles how to represent entities in the interface.\n *\n * @public\n */\nexport const entityPresentationApiRef: ApiRef<EntityPresentationApi> =\n createApiRef({\n id: 'plugin.catalog.entity-presentation',\n });\n\n/**\n * The visual presentation of an entity reference at some point in time.\n *\n * @public\n */\nexport interface EntityRefPresentationSnapshot {\n /**\n * The ref to the entity that this snapshot represents.\n *\n * @remarks\n *\n * Note that when the input data was broken or had missing vital pieces of\n * information, this string may contain placeholders such as \"unknown\". You\n * can therefore not necessarily assume that the ref is completely valid and\n * usable for example for forming a clickable link to the entity.\n */\n entityRef: string;\n /**\n * A string that can be used as a plain representation of the entity, for\n * example in a header or a link.\n *\n * @remarks\n *\n * The title may be short and not contain all of the information that the\n * entity holds. When rendering the primary title, you may also want to\n * make sure to add more contextual information nearby such as the icon or\n * secondary title, since the primary could for example just be the\n * `metadata.name` of the entity which might be ambiguous to the reader.\n */\n primaryTitle: string;\n /**\n * Optionally, some additional textual information about the entity, to be\n * used as a clarification on top of the primary title.\n *\n * @remarks\n *\n * This text can for example be rendered in a tooltip or be used as a\n * subtitle. It may not be sufficient to display on its own; it should\n * typically be used in conjunction with the primary title. It can contain\n * such information as the entity ref and/or a `spec.type` etc.\n */\n secondaryTitle?: string;\n /**\n * Optionally, an icon that represents the kind/type of entity.\n *\n * @remarks\n *\n * This icon should ideally be easily recognizable as the kind of entity, and\n * be used consistently throughout the Backstage interface. It can be rendered\n * both in larger formats such as in a header, or in smaller formats such as\n * inline with regular text, so bear in mind that the legibility should be\n * high in both cases.\n *\n * A value of `false` here indicates the desire to not have an icon present\n * for the given implementation. A value of `undefined` leaves it at the\n * discretion of the display layer to choose what to do (such as for example\n * showing a fallback icon).\n */\n Icon?: IconComponent | undefined | false;\n}\n\n/**\n * The visual presentation of an entity reference.\n *\n * @public\n */\nexport interface EntityRefPresentation {\n /**\n * The representation that's suitable to use for this entity right now.\n */\n snapshot: EntityRefPresentationSnapshot;\n /**\n * Some presentation implementations support emitting updated snapshots over\n * time, for example after retrieving additional data from the catalog or\n * elsewhere.\n */\n update$?: Observable<EntityRefPresentationSnapshot>;\n /**\n * A promise that resolves to a usable entity presentation.\n */\n promise: Promise<EntityRefPresentationSnapshot>;\n}\n\n/**\n * An API that decides how to visually represent entities in the interface.\n *\n * @remarks\n *\n * Most consumers will want to use the {@link useEntityPresentation} hook\n * instead of this interface directly.\n *\n * @public\n */\nexport interface EntityPresentationApi {\n /**\n * Fetches the presentation for an entity.\n *\n * @param entityOrRef - Either an entity, or a string ref to it. If you pass\n * in an entity, it is assumed that it is not a partial one - i.e. only pass\n * in an entity if you know that it was fetched in such a way that it\n * contains all of the fields that the representation renderer needs.\n * @param context - Contextual information that may affect the presentation.\n */\n forEntity(\n entityOrRef: Entity | string,\n context?: {\n defaultKind?: string;\n defaultNamespace?: string;\n },\n ): EntityRefPresentation;\n}\n"],"names":[],"mappings":";;AA6BO,MAAM,2BACX,YAAA,CAAa;AAAA,EACX,EAAA,EAAI;AACN,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"defaultEntityPresentation.esm.js","sources":["../../../src/apis/EntityPresentationApi/defaultEntityPresentation.ts"],"sourcesContent":["/*\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 CompoundEntityRef,\n DEFAULT_NAMESPACE,\n Entity,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport get from 'lodash/get';\nimport { EntityRefPresentationSnapshot } from './EntityPresentationApi';\n\n/**\n * This returns the default representation of an entity.\n *\n * @public\n * @param entityOrRef - Either an entity, or a ref to it.\n * @param context - Contextual information that may affect the presentation.\n */\nexport function defaultEntityPresentation(\n entityOrRef: Entity | CompoundEntityRef | string,\n context?: {\n defaultKind?: string;\n defaultNamespace?: string;\n },\n): EntityRefPresentationSnapshot {\n // NOTE(freben): This code may look convoluted, but it tries its very best to\n // be defensive and handling any type of malformed input and still producing\n // some form of result without crashing.\n const { kind, namespace, name, title, description, displayName, type } =\n getParts(entityOrRef);\n\n const entityRef: string = stringifyEntityRef({\n kind: kind || 'unknown',\n namespace: namespace || DEFAULT_NAMESPACE,\n name: name || 'unknown',\n });\n\n const shortRef = getShortRef({ kind, namespace, name, context });\n\n const primary = [displayName, title, shortRef].find(\n candidate => candidate && typeof candidate === 'string',\n )!;\n\n const secondary = [\n primary !== entityRef ? entityRef : undefined,\n type,\n description,\n ]\n .filter(candidate => candidate && typeof candidate === 'string')\n .join(' | ');\n\n return {\n entityRef,\n primaryTitle: primary,\n secondaryTitle: secondary || undefined,\n Icon: undefined, // leave it up to the presentation API to handle\n };\n}\n\nconst isString = (value: unknown): value is string =>\n Boolean(value) && typeof value === 'string';\n\n// Try to extract display-worthy parts of an entity or ref as best we can, without throwing\nfunction getParts(entityOrRef: Entity | CompoundEntityRef | string): {\n kind?: string;\n namespace?: string;\n name?: string;\n title?: string;\n description?: string;\n displayName?: string;\n type?: string;\n} {\n if (typeof entityOrRef === 'string') {\n let colonI = entityOrRef.indexOf(':');\n const slashI = entityOrRef.indexOf('/');\n\n // If the / is ahead of the :, treat the rest as the name\n if (slashI !== -1 && slashI < colonI) {\n colonI = -1;\n }\n\n const kind = colonI === -1 ? undefined : entityOrRef.slice(0, colonI);\n const namespace =\n slashI === -1 ? undefined : entityOrRef.slice(colonI + 1, slashI);\n const name = entityOrRef.slice(Math.max(colonI + 1, slashI + 1));\n\n return { kind, namespace, name };\n }\n\n if (typeof entityOrRef === 'object' && entityOrRef !== null) {\n const kind = [get(entityOrRef, 'kind')].find(isString);\n\n const namespace = [\n get(entityOrRef, 'metadata.namespace'),\n get(entityOrRef, 'namespace'),\n ].find(isString);\n\n const name = [\n get(entityOrRef, 'metadata.name'),\n get(entityOrRef, 'name'),\n ].find(isString);\n\n const title = [get(entityOrRef, 'metadata.title')].find(isString);\n\n const description = [get(entityOrRef, 'metadata.description')].find(\n isString,\n );\n\n const displayName = [get(entityOrRef, 'spec.profile.displayName')].find(\n isString,\n );\n\n const type = [get(entityOrRef, 'spec.type')].find(isString);\n\n return { kind, namespace, name, title, description, displayName, type };\n }\n\n return {};\n}\n\nfunction getShortRef(options: {\n kind?: string;\n namespace?: string;\n name?: string;\n context?: { defaultKind?: string; defaultNamespace?: string };\n}): string {\n const kind = options.kind?.toLocaleLowerCase('en-US') || 'unknown';\n const namespace = options.namespace || DEFAULT_NAMESPACE;\n const name = options.name || 'unknown';\n const defaultKindLower =\n options.context?.defaultKind?.toLocaleLowerCase('en-US');\n const defaultNamespaceLower =\n options.context?.defaultNamespace?.toLocaleLowerCase('en-US');\n\n let result = name;\n\n if (\n (defaultNamespaceLower &&\n namespace.toLocaleLowerCase('en-US') !== defaultNamespaceLower) ||\n namespace !== DEFAULT_NAMESPACE\n ) {\n result = `${namespace}/${result}`;\n }\n\n if (\n defaultKindLower &&\n kind.toLocaleLowerCase('en-US') !== defaultKindLower\n ) {\n result = `${kind}:${result}`;\n }\n\n return result;\n}\n"],"names":[],"mappings":";;;AAgCgB,SAAA,yBAAA,CACd,aACA,OAI+B,EAAA;AAI/B,EAAM,MAAA,EAAE,IAAM,EAAA,SAAA,EAAW,IAAM,EAAA,KAAA,EAAO,aAAa,WAAa,EAAA,IAAA,EAC9D,GAAA,QAAA,CAAS,WAAW,CAAA;AAEtB,EAAA,MAAM,YAAoB,kBAAmB,CAAA;AAAA,IAC3C,MAAM,IAAQ,IAAA,SAAA;AAAA,IACd,WAAW,SAAa,IAAA,iBAAA;AAAA,IACxB,MAAM,IAAQ,IAAA;AAAA,GACf,CAAA;AAED,EAAA,MAAM,WAAW,WAAY,CAAA,EAAE,MAAM,SAAW,EAAA,IAAA,EAAM,SAAS,CAAA;AAE/D,EAAA,MAAM,OAAU,GAAA,CAAC,WAAa,EAAA,KAAA,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,IAAA,SAAA;AACzD,EAAM,MAAA,SAAA,GAAY,QAAQ,SAAa,IAAA,iBAAA;AACvC,EAAM,MAAA,IAAA,GAAO,QAAQ,IAAQ,IAAA,SAAA;AAC7B,EAAA,MAAM,gBACJ,GAAA,OAAA,CAAQ,OAAS,EAAA,WAAA,EAAa,kBAAkB,OAAO,CAAA;AACzD,EAAA,MAAM,qBACJ,GAAA,OAAA,CAAQ,OAAS,EAAA,gBAAA,EAAkB,kBAAkB,OAAO,CAAA;AAE9D,EAAA,IAAI,MAAS,GAAA,IAAA;AAEb,EAAA,IACG,yBACC,SAAU,CAAA,iBAAA,CAAkB,OAAO,CAAM,KAAA,qBAAA,IAC3C,cAAc,iBACd,EAAA;AACA,IAAS,MAAA,GAAA,CAAA,EAAG,SAAS,CAAA,CAAA,EAAI,MAAM,CAAA,CAAA;AAAA;AAGjC,EAAA,IACE,gBACA,IAAA,IAAA,CAAK,iBAAkB,CAAA,OAAO,MAAM,gBACpC,EAAA;AACA,IAAS,MAAA,GAAA,CAAA,EAAG,IAAI,CAAA,CAAA,EAAI,MAAM,CAAA,CAAA;AAAA;AAG5B,EAAO,OAAA,MAAA;AACT;;;;"}
1
+ {"version":3,"file":"defaultEntityPresentation.esm.js","sources":["../../../src/apis/EntityPresentationApi/defaultEntityPresentation.ts"],"sourcesContent":["/*\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 CompoundEntityRef,\n DEFAULT_NAMESPACE,\n Entity,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport get from 'lodash/get';\nimport { EntityRefPresentationSnapshot } from './EntityPresentationApi';\n\n/**\n * This returns the default representation of an entity.\n *\n * @public\n * @param entityOrRef - Either an entity, or a ref to it.\n * @param context - Contextual information that may affect the presentation.\n */\nexport function defaultEntityPresentation(\n entityOrRef: Entity | CompoundEntityRef | string,\n context?: {\n defaultKind?: string;\n defaultNamespace?: string;\n },\n): EntityRefPresentationSnapshot {\n // NOTE(freben): This code may look convoluted, but it tries its very best to\n // be defensive and handling any type of malformed input and still producing\n // some form of result without crashing.\n const { kind, namespace, name, title, description, displayName, type } =\n getParts(entityOrRef);\n\n const entityRef: string = stringifyEntityRef({\n kind: kind || 'unknown',\n namespace: namespace || DEFAULT_NAMESPACE,\n name: name || 'unknown',\n });\n\n const shortRef = getShortRef({ kind, namespace, name, context });\n\n const primary = [displayName, title, shortRef].find(\n candidate => candidate && typeof candidate === 'string',\n )!;\n\n const secondary = [\n primary !== entityRef ? entityRef : undefined,\n type,\n description,\n ]\n .filter(candidate => candidate && typeof candidate === 'string')\n .join(' | ');\n\n return {\n entityRef,\n primaryTitle: primary,\n secondaryTitle: secondary || undefined,\n Icon: undefined, // leave it up to the presentation API to handle\n };\n}\n\nconst isString = (value: unknown): value is string =>\n Boolean(value) && typeof value === 'string';\n\n// Try to extract display-worthy parts of an entity or ref as best we can, without throwing\nfunction getParts(entityOrRef: Entity | CompoundEntityRef | string): {\n kind?: string;\n namespace?: string;\n name?: string;\n title?: string;\n description?: string;\n displayName?: string;\n type?: string;\n} {\n if (typeof entityOrRef === 'string') {\n let colonI = entityOrRef.indexOf(':');\n const slashI = entityOrRef.indexOf('/');\n\n // If the / is ahead of the :, treat the rest as the name\n if (slashI !== -1 && slashI < colonI) {\n colonI = -1;\n }\n\n const kind = colonI === -1 ? undefined : entityOrRef.slice(0, colonI);\n const namespace =\n slashI === -1 ? undefined : entityOrRef.slice(colonI + 1, slashI);\n const name = entityOrRef.slice(Math.max(colonI + 1, slashI + 1));\n\n return { kind, namespace, name };\n }\n\n if (typeof entityOrRef === 'object' && entityOrRef !== null) {\n const kind = [get(entityOrRef, 'kind')].find(isString);\n\n const namespace = [\n get(entityOrRef, 'metadata.namespace'),\n get(entityOrRef, 'namespace'),\n ].find(isString);\n\n const name = [\n get(entityOrRef, 'metadata.name'),\n get(entityOrRef, 'name'),\n ].find(isString);\n\n const title = [get(entityOrRef, 'metadata.title')].find(isString);\n\n const description = [get(entityOrRef, 'metadata.description')].find(\n isString,\n );\n\n const displayName = [get(entityOrRef, 'spec.profile.displayName')].find(\n isString,\n );\n\n const type = [get(entityOrRef, 'spec.type')].find(isString);\n\n return { kind, namespace, name, title, description, displayName, type };\n }\n\n return {};\n}\n\nfunction getShortRef(options: {\n kind?: string;\n namespace?: string;\n name?: string;\n context?: { defaultKind?: string; defaultNamespace?: string };\n}): string {\n const kind = options.kind?.toLocaleLowerCase('en-US') || 'unknown';\n const namespace = options.namespace || DEFAULT_NAMESPACE;\n const name = options.name || 'unknown';\n const defaultKindLower =\n options.context?.defaultKind?.toLocaleLowerCase('en-US');\n const defaultNamespaceLower =\n options.context?.defaultNamespace?.toLocaleLowerCase('en-US');\n\n let result = name;\n\n if (\n (defaultNamespaceLower &&\n namespace.toLocaleLowerCase('en-US') !== defaultNamespaceLower) ||\n namespace !== DEFAULT_NAMESPACE\n ) {\n result = `${namespace}/${result}`;\n }\n\n if (\n defaultKindLower &&\n kind.toLocaleLowerCase('en-US') !== defaultKindLower\n ) {\n result = `${kind}:${result}`;\n }\n\n return result;\n}\n"],"names":[],"mappings":";;;AAgCO,SAAS,yBAAA,CACd,aACA,OAAA,EAI+B;AAI/B,EAAA,MAAM,EAAE,IAAA,EAAM,SAAA,EAAW,IAAA,EAAM,KAAA,EAAO,aAAa,WAAA,EAAa,IAAA,EAAK,GACnE,QAAA,CAAS,WAAW,CAAA;AAEtB,EAAA,MAAM,YAAoB,kBAAA,CAAmB;AAAA,IAC3C,MAAM,IAAA,IAAQ,SAAA;AAAA,IACd,WAAW,SAAA,IAAa,iBAAA;AAAA,IACxB,MAAM,IAAA,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