@backstage/frontend-app-api 0.6.1-next.2 → 0.6.2
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 +31 -0
- package/dist/index.d.ts +9 -2
- package/dist/index.esm.js +6 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @backstage/frontend-app-api
|
|
2
2
|
|
|
3
|
+
## 0.6.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/core-components@0.14.2
|
|
9
|
+
- @backstage/core-app-api@1.12.2
|
|
10
|
+
- @backstage/frontend-plugin-api@0.6.2
|
|
11
|
+
- @backstage/core-plugin-api@1.9.1
|
|
12
|
+
- @backstage/config@1.2.0
|
|
13
|
+
- @backstage/errors@1.2.4
|
|
14
|
+
- @backstage/theme@0.5.2
|
|
15
|
+
- @backstage/types@1.1.1
|
|
16
|
+
- @backstage/version-bridge@1.0.7
|
|
17
|
+
|
|
18
|
+
## 0.6.1
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- 48d6628: Add `loadingComponent` parameter to `createApp()`
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
- @backstage/config@1.2.0
|
|
25
|
+
- @backstage/core-components@0.14.1
|
|
26
|
+
- @backstage/errors@1.2.4
|
|
27
|
+
- @backstage/theme@0.5.2
|
|
28
|
+
- @backstage/core-app-api@1.12.1
|
|
29
|
+
- @backstage/core-plugin-api@1.9.1
|
|
30
|
+
- @backstage/frontend-plugin-api@0.6.1
|
|
31
|
+
- @backstage/types@1.1.1
|
|
32
|
+
- @backstage/version-bridge@1.0.7
|
|
33
|
+
|
|
3
34
|
## 0.6.1-next.2
|
|
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
|
};
|
|
@@ -93,4 +100,4 @@ declare function createSpecializedApp(options?: {
|
|
|
93
100
|
createRoot(): JSX.Element;
|
|
94
101
|
};
|
|
95
102
|
|
|
96
|
-
export { CreateAppFeatureLoader, CreateAppRouteBinder, createApp, createSpecializedApp };
|
|
103
|
+
export { type CreateAppFeatureLoader, type CreateAppRouteBinder, createApp, createSpecializedApp };
|
package/dist/index.esm.js
CHANGED
|
@@ -6,7 +6,7 @@ import { SidebarPage, sidebarConfig, Sidebar, SidebarDivider, useSidebarOpenStat
|
|
|
6
6
|
import { makeStyles, Button as Button$1 } from '@material-ui/core';
|
|
7
7
|
import { useApi, appThemeApiRef, FeatureFlagState, createApiFactory, discoveryApiRef, configApiRef, alertApiRef, analyticsApiRef, errorApiRef, storageApiRef, fetchApiRef, identityApiRef, oauthRequestApiRef, googleAuthApiRef, microsoftAuthApiRef, githubAuthApiRef, oktaAuthApiRef, gitlabAuthApiRef, oneloginAuthApiRef, bitbucketAuthApiRef, bitbucketServerAuthApiRef, atlassianAuthApiRef, vmwareCloudAuthApiRef, featureFlagsApiRef } from '@backstage/core-plugin-api';
|
|
8
8
|
import { UrlPatternDiscovery, AlertApiForwarder, NoOpAnalyticsApi, ErrorAlerter, ErrorApiForwarder, UnhandledErrorForwarder, WebStorage, createFetchApi, FetchMiddlewares, OAuthRequestManager, GoogleAuth, MicrosoftAuth, GithubAuth, OktaAuth, GitlabAuth, OneLoginAuth, BitbucketAuth, BitbucketServerAuth, AtlassianAuth, VMwareCloudAuth, ApiFactoryRegistry, AppThemeSelector, ApiResolver, ApiProvider } from '@backstage/core-app-api';
|
|
9
|
-
import useObservable from 'react-use/
|
|
9
|
+
import useObservable from 'react-use/esm/useObservable';
|
|
10
10
|
import ObservableImpl from 'zen-observable';
|
|
11
11
|
import { createInstance } from 'i18next';
|
|
12
12
|
import { permissionApiRef, IdentityPermissionApi } from '@backstage/plugin-permission-react';
|
|
@@ -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:
|
|
2711
|
+
return /* @__PURE__ */ React.createElement(React.Suspense, { fallback: suspenseFallback }, /* @__PURE__ */ React.createElement(LazyApp, null));
|
|
2708
2712
|
}
|
|
2709
2713
|
};
|
|
2710
2714
|
}
|