@backstage/plugin-catalog-react 2.0.1-next.0 → 2.1.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @backstage/plugin-catalog-react
2
2
 
3
+ ## 2.1.0-next.1
4
+
5
+ ### Minor Changes
6
+
7
+ - 4d58894: Added `aliases` and `contentOrder` fields to `EntityContentGroupDefinition`, allowing groups to declare alias IDs and control the sort order of their content items.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @backstage/ui@0.13.0-next.1
13
+ - @backstage/catalog-client@1.14.0-next.1
14
+ - @backstage/frontend-test-utils@0.5.1-next.1
15
+ - @backstage/catalog-model@1.7.6
16
+ - @backstage/core-compat-api@0.5.9-next.1
17
+ - @backstage/core-components@0.18.8-next.0
18
+ - @backstage/core-plugin-api@1.12.4-next.0
19
+ - @backstage/errors@1.2.7
20
+ - @backstage/filter-predicates@0.1.0
21
+ - @backstage/frontend-plugin-api@0.14.2-next.0
22
+ - @backstage/integration-react@1.2.16-next.1
23
+ - @backstage/types@1.2.2
24
+ - @backstage/version-bridge@1.0.12
25
+ - @backstage/plugin-catalog-common@1.1.8
26
+ - @backstage/plugin-permission-common@0.9.6
27
+ - @backstage/plugin-permission-react@0.4.41-next.0
28
+
3
29
  ## 2.0.1-next.0
4
30
 
5
31
  ### Patch Changes
@@ -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';\nimport { ReactElement } from 'react';\n\n/** @internal */\nexport const entityContentTitleDataRef = createExtensionDataRef<string>().with({\n id: 'catalog.entity-content-title',\n});\n\n/** @internal */\nexport const entityContentIconDataRef = createExtensionDataRef<\n string | ReactElement\n>().with({\n id: 'catalog.entity-content-icon',\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/** @alpha */\nexport type EntityContentGroupDefinitions = Record<\n string,\n {\n title: string;\n icon?: string | ReactElement;\n }\n>;\n\n/**\n * @alpha\n * Default entity content groups.\n */\nexport const defaultEntityContentGroupDefinitions = {\n overview: {\n title: 'Overview',\n },\n documentation: {\n title: 'Documentation',\n },\n development: {\n title: 'Development',\n },\n deployment: {\n title: 'Deployment',\n },\n operation: {\n title: 'Operation',\n },\n observability: {\n title: 'Observability',\n },\n} satisfies EntityContentGroupDefinitions;\n\n/**\n * @alpha\n * Default entity content groups.\n * @deprecated use defaultEntityContentGroupDefinitions\n */\nexport const defaultEntityContentGroups = Object.fromEntries(\n Object.entries(defaultEntityContentGroupDefinitions).map(\n ([key, { title }]) => [key, title],\n ),\n) as Record<keyof typeof defaultEntityContentGroupDefinitions, string>;\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 'info',\n 'content',\n] as const satisfies readonly EntityCardType[];\n\n/** @alpha */\nexport type EntityCardType = 'info' | 'content';\n\n/** @internal */\nexport const entityCardTypeDataRef =\n createExtensionDataRef<EntityCardType>().with({\n id: 'catalog.entity-card-type',\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["../../../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';\nimport { ReactElement } from 'react';\n\n/** @internal */\nexport const entityContentTitleDataRef = createExtensionDataRef<string>().with({\n id: 'catalog.entity-content-title',\n});\n\n/** @internal */\nexport const entityContentIconDataRef = createExtensionDataRef<\n string | ReactElement\n>().with({\n id: 'catalog.entity-content-icon',\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/** @alpha */\nexport type EntityContentGroupDefinitions = Record<\n string,\n {\n title: string;\n icon?: string | ReactElement;\n /** Other group IDs that should be treated as aliases for this group. */\n aliases?: string[];\n /** How to sort the content items within this group. Overrides the page-level default. */\n contentOrder?: 'title' | 'natural';\n }\n>;\n\n/**\n * @alpha\n * Default entity content groups.\n */\nexport const defaultEntityContentGroupDefinitions = {\n overview: {\n title: 'Overview',\n },\n documentation: {\n title: 'Documentation',\n },\n development: {\n title: 'Development',\n },\n deployment: {\n title: 'Deployment',\n },\n operation: {\n title: 'Operation',\n },\n observability: {\n title: 'Observability',\n },\n} satisfies EntityContentGroupDefinitions;\n\n/**\n * @alpha\n * Default entity content groups.\n * @deprecated use defaultEntityContentGroupDefinitions\n */\nexport const defaultEntityContentGroups = Object.fromEntries(\n Object.entries(defaultEntityContentGroupDefinitions).map(\n ([key, { title }]) => [key, title],\n ),\n) as Record<keyof typeof defaultEntityContentGroupDefinitions, string>;\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 'info',\n 'content',\n] as const satisfies readonly EntityCardType[];\n\n/** @alpha */\nexport type EntityCardType = 'info' | 'content';\n\n/** @internal */\nexport const entityCardTypeDataRef =\n createExtensionDataRef<EntityCardType>().with({\n id: 'catalog.entity-card-type',\n });\n"],"names":[],"mappings":";;AAqBO,MAAM,yBAAA,GAA4B,sBAAA,EAA+B,CAAE,IAAA,CAAK;AAAA,EAC7E,EAAA,EAAI;AACN,CAAC;AAGM,MAAM,wBAAA,GAA2B,sBAAA,EAEtC,CAAE,IAAA,CAAK;AAAA,EACP,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;AAmBI,MAAM,oCAAA,GAAuC;AAAA,EAClD,QAAA,EAAU;AAAA,IACR,KAAA,EAAO;AAAA,GACT;AAAA,EACA,aAAA,EAAe;AAAA,IACb,KAAA,EAAO;AAAA,GACT;AAAA,EACA,WAAA,EAAa;AAAA,IACX,KAAA,EAAO;AAAA,GACT;AAAA,EACA,UAAA,EAAY;AAAA,IACV,KAAA,EAAO;AAAA,GACT;AAAA,EACA,SAAA,EAAW;AAAA,IACT,KAAA,EAAO;AAAA,GACT;AAAA,EACA,aAAA,EAAe;AAAA,IACb,KAAA,EAAO;AAAA;AAEX;AAOO,MAAM,6BAA6B,MAAA,CAAO,WAAA;AAAA,EAC/C,MAAA,CAAO,OAAA,CAAQ,oCAAoC,CAAA,CAAE,GAAA;AAAA,IACnD,CAAC,CAAC,GAAA,EAAK,EAAE,OAAO,CAAA,KAAM,CAAC,GAAA,EAAK,KAAK;AAAA;AAErC;AAGO,MAAM,yBAAA,GAA4B,sBAAA,EAA+B,CAAE,IAAA,CAAK;AAAA,EAC7E,EAAA,EAAI;AACN,CAAC;AAMM,MAAM,eAAA,GAAkB;AAAA,EAC7B,MAAA;AAAA,EACA;AACF;AAMO,MAAM,qBAAA,GACX,sBAAA,EAAuC,CAAE,IAAA,CAAK;AAAA,EAC5C,EAAA,EAAI;AACN,CAAC;;;;"}
package/dist/alpha.d.ts CHANGED
@@ -38,6 +38,10 @@ declare const CatalogFilterBlueprint: _backstage_frontend_plugin_api.ExtensionBl
38
38
  type EntityContentGroupDefinitions = Record<string, {
39
39
  title: string;
40
40
  icon?: string | ReactElement;
41
+ /** Other group IDs that should be treated as aliases for this group. */
42
+ aliases?: string[];
43
+ /** How to sort the content items within this group. Overrides the page-level default. */
44
+ contentOrder?: 'title' | 'natural';
41
45
  }>;
42
46
  /**
43
47
  * @alpha
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-react",
3
- "version": "2.0.1-next.0",
3
+ "version": "2.1.0-next.1",
4
4
  "description": "A frontend library that helps other Backstage plugins interact with the catalog",
5
5
  "backstage": {
6
6
  "role": "web-library",
@@ -73,20 +73,20 @@
73
73
  "test": "backstage-cli package test"
74
74
  },
75
75
  "dependencies": {
76
- "@backstage/catalog-client": "1.13.1-next.0",
76
+ "@backstage/catalog-client": "1.14.0-next.1",
77
77
  "@backstage/catalog-model": "1.7.6",
78
- "@backstage/core-compat-api": "0.5.9-next.0",
78
+ "@backstage/core-compat-api": "0.5.9-next.1",
79
79
  "@backstage/core-components": "0.18.8-next.0",
80
80
  "@backstage/core-plugin-api": "1.12.4-next.0",
81
81
  "@backstage/errors": "1.2.7",
82
82
  "@backstage/filter-predicates": "0.1.0",
83
83
  "@backstage/frontend-plugin-api": "0.14.2-next.0",
84
- "@backstage/integration-react": "1.2.16-next.0",
84
+ "@backstage/integration-react": "1.2.16-next.1",
85
85
  "@backstage/plugin-catalog-common": "1.1.8",
86
86
  "@backstage/plugin-permission-common": "0.9.6",
87
87
  "@backstage/plugin-permission-react": "0.4.41-next.0",
88
88
  "@backstage/types": "1.2.2",
89
- "@backstage/ui": "0.12.1-next.0",
89
+ "@backstage/ui": "0.13.0-next.1",
90
90
  "@backstage/version-bridge": "1.0.12",
91
91
  "@material-ui/core": "^4.12.2",
92
92
  "@material-ui/icons": "^4.9.1",
@@ -101,11 +101,11 @@
101
101
  "zen-observable": "^0.10.0"
102
102
  },
103
103
  "devDependencies": {
104
- "@backstage/cli": "0.35.5-next.0",
104
+ "@backstage/cli": "0.36.0-next.1",
105
105
  "@backstage/core-app-api": "1.19.6-next.0",
106
- "@backstage/frontend-test-utils": "0.5.1-next.0",
106
+ "@backstage/frontend-test-utils": "0.5.1-next.1",
107
107
  "@backstage/plugin-catalog-common": "1.1.8",
108
- "@backstage/plugin-scaffolder-common": "1.7.7-next.0",
108
+ "@backstage/plugin-scaffolder-common": "2.0.0-next.1",
109
109
  "@backstage/test-utils": "1.7.16-next.0",
110
110
  "@testing-library/dom": "^10.0.0",
111
111
  "@testing-library/jest-dom": "^6.0.0",
@@ -120,7 +120,7 @@
120
120
  "zod": "^3.25.76"
121
121
  },
122
122
  "peerDependencies": {
123
- "@backstage/frontend-test-utils": "0.5.1-next.0",
123
+ "@backstage/frontend-test-utils": "0.5.1-next.1",
124
124
  "@types/react": "^17.0.0 || ^18.0.0",
125
125
  "react": "^17.0.0 || ^18.0.0",
126
126
  "react-dom": "^17.0.0 || ^18.0.0",