@backstage/frontend-app-api 0.6.1-next.1 → 0.6.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,36 @@
1
1
  # @backstage/frontend-app-api
2
2
 
3
+ ## 0.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 48d6628: Add `loadingComponent` parameter to `createApp()`
8
+ - Updated dependencies
9
+ - @backstage/config@1.2.0
10
+ - @backstage/core-components@0.14.1
11
+ - @backstage/errors@1.2.4
12
+ - @backstage/theme@0.5.2
13
+ - @backstage/core-app-api@1.12.1
14
+ - @backstage/core-plugin-api@1.9.1
15
+ - @backstage/frontend-plugin-api@0.6.1
16
+ - @backstage/types@1.1.1
17
+ - @backstage/version-bridge@1.0.7
18
+
19
+ ## 0.6.1-next.2
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies
24
+ - @backstage/core-components@0.14.1-next.2
25
+ - @backstage/frontend-plugin-api@0.6.1-next.2
26
+ - @backstage/config@1.2.0-next.1
27
+ - @backstage/core-app-api@1.12.1-next.1
28
+ - @backstage/core-plugin-api@1.9.1-next.1
29
+ - @backstage/errors@1.2.4-next.0
30
+ - @backstage/theme@0.5.2-next.0
31
+ - @backstage/types@1.1.1
32
+ - @backstage/version-bridge@1.0.7
33
+
3
34
  ## 0.6.1-next.1
4
35
 
5
36
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ExternalRouteRef, RouteRef, SubRouteRef, FrontendFeature } from '@backstage/frontend-plugin-api';
2
- import { JSX } from 'react';
2
+ import { ReactNode, JSX } from 'react';
3
3
  import { ConfigApi, IconComponent } from '@backstage/core-plugin-api';
4
4
 
5
5
  /**
@@ -71,6 +71,13 @@ declare function createApp(options?: {
71
71
  bindRoutes?(context: {
72
72
  bind: CreateAppRouteBinder;
73
73
  }): void;
74
+ /**
75
+ * The component to render while loading the app (waiting for config, features, etc)
76
+ *
77
+ * Is the text "Loading..." by default.
78
+ * If set to "null" then no loading fallback component is rendered. *
79
+ */
80
+ loadingComponent?: ReactNode;
74
81
  }): {
75
82
  createRoot(): JSX.Element;
76
83
  };
package/dist/index.esm.js CHANGED
@@ -2670,6 +2670,10 @@ function deduplicateFeatures(allFeatures) {
2670
2670
  }).reverse();
2671
2671
  }
2672
2672
  function createApp(options) {
2673
+ let suspenseFallback = options == null ? void 0 : options.loadingComponent;
2674
+ if (suspenseFallback === void 0) {
2675
+ suspenseFallback = "Loading...";
2676
+ }
2673
2677
  async function appLoader() {
2674
2678
  var _a, _b, _c;
2675
2679
  const config = (_b = await ((_a = options == null ? void 0 : options.configLoader) == null ? void 0 : _a.call(options).then((c) => c.config))) != null ? _b : ConfigReader.fromConfigs(
@@ -2704,7 +2708,7 @@ function createApp(options) {
2704
2708
  return {
2705
2709
  createRoot() {
2706
2710
  const LazyApp = React.lazy(appLoader);
2707
- return /* @__PURE__ */ React.createElement(React.Suspense, { fallback: "Loading..." }, /* @__PURE__ */ React.createElement(LazyApp, null));
2711
+ return /* @__PURE__ */ React.createElement(React.Suspense, { fallback: suspenseFallback }, /* @__PURE__ */ React.createElement(LazyApp, null));
2708
2712
  }
2709
2713
  };
2710
2714
  }