@backstage/frontend-app-api 0.5.0 → 0.6.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,69 @@
1
1
  # @backstage/frontend-app-api
2
2
 
3
+ ## 0.6.0-next.1
4
+
5
+ ### Minor Changes
6
+
7
+ - bdf4a8e: **BREAKING**: Removed the experimental `createExtensionTree` API.
8
+
9
+ ### Patch Changes
10
+
11
+ - bc621aa: Updates to use the new `RouteResolutionsApi`.
12
+ - e586f79: Wrap the root element with the analytics context to ensure it always exists for all extensions.
13
+ - fb9b5e7: The default `ComponentsApi` implementation now uses the `ComponentRef` ID as the component key, rather than the reference instance. This fixes a bug where duplicate installations of `@backstage/frontend-plugin-api` would break the app.
14
+ - 46b63de: Allow external route refs in the new system to have a `defaultTarget` pointing to a route that it'll resolve to by default if no explicit bindings were made by the adopter.
15
+ - Updated dependencies
16
+ - @backstage/frontend-plugin-api@0.6.0-next.1
17
+ - @backstage/core-components@0.14.0-next.0
18
+ - @backstage/core-plugin-api@1.8.3-next.0
19
+ - @backstage/core-app-api@1.11.4-next.0
20
+ - @backstage/config@1.1.1
21
+ - @backstage/errors@1.2.3
22
+ - @backstage/theme@0.5.0
23
+ - @backstage/types@1.1.1
24
+ - @backstage/version-bridge@1.0.7
25
+
26
+ ## 0.6.0-next.0
27
+
28
+ ### Minor Changes
29
+
30
+ - 86346c2: **BREAKING**: The `app.routes.bindings` app-config mapping has been simplified. You now only need to specify the plugin ID and route ID on both sides of the mapping.
31
+
32
+ Old form:
33
+
34
+ ```yaml
35
+ app:
36
+ routes:
37
+ bindings:
38
+ plugin.catalog.externalRoutes.viewTechDoc: plugin.techdocs.routes.docRoot
39
+ plugin.catalog.externalRoutes.createComponent: plugin.catalog-import.routes.importPage
40
+ ```
41
+
42
+ New form:
43
+
44
+ ```yaml
45
+ app:
46
+ routes:
47
+ bindings:
48
+ catalog.viewTechDoc: techdocs.docRoot
49
+ catalog.createComponent: catalog-import.importPage
50
+ ```
51
+
52
+ ### Patch Changes
53
+
54
+ - 42ebf27: Added `IconsApi` implementation and the ability to configure icons through the `icons` option for `createApp` and `createSpecializedApp`. This is not a long-term solution as icons should be installable via extensions instead. This is just a stop-gap to make sure there is feature parity with the existing frontend system.
55
+ - e0a4dd1: Improved the error message when data input/output shapes do not match
56
+ - Updated dependencies
57
+ - @backstage/frontend-plugin-api@0.5.1-next.0
58
+ - @backstage/core-components@0.13.10
59
+ - @backstage/config@1.1.1
60
+ - @backstage/core-app-api@1.11.3
61
+ - @backstage/core-plugin-api@1.8.2
62
+ - @backstage/errors@1.2.3
63
+ - @backstage/theme@0.5.0
64
+ - @backstage/types@1.1.1
65
+ - @backstage/version-bridge@1.0.7
66
+
3
67
  ## 0.5.0
4
68
 
5
69
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { ExternalRouteRef, RouteRef, SubRouteRef, ExtensionDataRef, FrontendFeature } from '@backstage/frontend-plugin-api';
1
+ import { ExternalRouteRef, RouteRef, SubRouteRef, FrontendFeature } from '@backstage/frontend-plugin-api';
2
2
  import { JSX } from 'react';
3
- import { Config } from '@backstage/config';
4
- import { ConfigApi } from '@backstage/core-plugin-api';
3
+ import { ConfigApi, IconComponent } from '@backstage/core-plugin-api';
5
4
 
6
5
  /**
7
6
  * Extracts a union of the keys in a map whose value extends the given type
@@ -41,22 +40,6 @@ type CreateAppRouteBinder = <TExternalRoutes extends {
41
40
  [name: string]: ExternalRouteRef;
42
41
  }>(externalRoutes: TExternalRoutes, targetRoutes: PartialKeys<TargetRouteMap<TExternalRoutes>, KeysWithType<TExternalRoutes, ExternalRouteRef<any, true>>>) => void;
43
42
 
44
- /** @public */
45
- interface ExtensionTreeNode {
46
- id: string;
47
- getData<T>(ref: ExtensionDataRef<T>): T | undefined;
48
- }
49
- /** @public */
50
- interface ExtensionTree {
51
- getExtension(id: string): ExtensionTreeNode | undefined;
52
- getExtensionAttachments(id: string, inputName: string): ExtensionTreeNode[];
53
- getRootRoutes(): JSX.Element[];
54
- getSidebarItems(): JSX.Element[];
55
- }
56
- /** @public */
57
- declare function createExtensionTree(options: {
58
- config: Config;
59
- }): ExtensionTree;
60
43
  /**
61
44
  * A source of dynamically loaded frontend features.
62
45
  *
@@ -78,6 +61,9 @@ interface CreateAppFeatureLoader {
78
61
  }
79
62
  /** @public */
80
63
  declare function createApp(options?: {
64
+ icons?: {
65
+ [key in string]: IconComponent;
66
+ };
81
67
  features?: (FrontendFeature | CreateAppFeatureLoader)[];
82
68
  configLoader?: () => Promise<{
83
69
  config: ConfigApi;
@@ -95,6 +81,9 @@ declare function createApp(options?: {
95
81
  * @public
96
82
  */
97
83
  declare function createSpecializedApp(options?: {
84
+ icons?: {
85
+ [key in string]: IconComponent;
86
+ };
98
87
  features?: FrontendFeature[];
99
88
  config?: ConfigApi;
100
89
  bindRoutes?(context: {
@@ -104,4 +93,4 @@ declare function createSpecializedApp(options?: {
104
93
  createRoot(): JSX.Element;
105
94
  };
106
95
 
107
- export { CreateAppFeatureLoader, CreateAppRouteBinder, ExtensionTree, ExtensionTreeNode, createApp, createExtensionTree, createSpecializedApp };
96
+ export { CreateAppFeatureLoader, CreateAppRouteBinder, createApp, createSpecializedApp };