@backstage/plugin-app 0.2.0-next.2 → 0.2.1-next.0

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 (93) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/alpha/appModulePublicSignIn.esm.js.map +1 -1
  3. package/dist/apis/DefaultDialogApi.esm.js.map +1 -1
  4. package/dist/apis/SwappableComponentsApi/DefaultSwappableComponentsApi.esm.js.map +1 -1
  5. package/dist/defaultApis.esm.js +3 -3
  6. package/dist/defaultApis.esm.js.map +1 -1
  7. package/dist/extensions/AnalyticsApi.esm.js.map +1 -1
  8. package/dist/extensions/App.esm.js +1 -1
  9. package/dist/extensions/App.esm.js.map +1 -1
  10. package/dist/extensions/AppLanguageApi.esm.js.map +1 -1
  11. package/dist/extensions/AppLayout.esm.js +1 -1
  12. package/dist/extensions/AppLayout.esm.js.map +1 -1
  13. package/dist/extensions/AppNav.esm.js +1 -1
  14. package/dist/extensions/AppNav.esm.js.map +1 -1
  15. package/dist/extensions/AppRoot.esm.js +1 -1
  16. package/dist/extensions/AppRoot.esm.js.map +1 -1
  17. package/dist/extensions/AppRoutes.esm.js +1 -1
  18. package/dist/extensions/AppRoutes.esm.js.map +1 -1
  19. package/dist/extensions/AppThemeApi.esm.js +1 -1
  20. package/dist/extensions/AppThemeApi.esm.js.map +1 -1
  21. package/dist/extensions/DefaultSignInPage.esm.js.map +1 -1
  22. package/dist/extensions/DialogDisplay.esm.js.map +1 -1
  23. package/dist/extensions/FeatureFlagsApi.esm.js.map +1 -1
  24. package/dist/extensions/IconsApi.esm.js +1 -1
  25. package/dist/extensions/IconsApi.esm.js.map +1 -1
  26. package/dist/extensions/LegacyComponentsApi.esm.js.map +1 -1
  27. package/dist/extensions/SwappableComponentsApi.esm.js +1 -1
  28. package/dist/extensions/SwappableComponentsApi.esm.js.map +1 -1
  29. package/dist/extensions/TranslationsApi.esm.js +1 -1
  30. package/dist/extensions/TranslationsApi.esm.js.map +1 -1
  31. package/dist/extensions/components.esm.js +4 -4
  32. package/dist/extensions/components.esm.js.map +1 -1
  33. package/dist/extensions/elements.esm.js.map +1 -1
  34. package/dist/index.d.ts +1 -1
  35. package/dist/packages/app-defaults/src/defaults/apis.esm.js +2 -2
  36. package/dist/packages/app-defaults/src/defaults/apis.esm.js.map +1 -1
  37. package/dist/packages/app-defaults/src/defaults/icons.esm.js.map +1 -1
  38. package/dist/packages/core-app-api/src/apis/implementations/AlertApi/AlertApiForwarder.esm.js.map +1 -1
  39. package/dist/packages/core-app-api/src/apis/implementations/AppLanguageApi/AppLanguageSelector.esm.js.map +1 -1
  40. package/dist/packages/core-app-api/src/apis/implementations/AppThemeApi/AppThemeSelector.esm.js.map +1 -1
  41. package/dist/packages/core-app-api/src/apis/implementations/DiscoveryApi/UrlPatternDiscovery.esm.js.map +1 -1
  42. package/dist/packages/core-app-api/src/apis/implementations/ErrorApi/ErrorAlerter.esm.js.map +1 -1
  43. package/dist/packages/core-app-api/src/apis/implementations/ErrorApi/ErrorApiForwarder.esm.js.map +1 -1
  44. package/dist/packages/core-app-api/src/apis/implementations/ErrorApi/UnhandledErrorForwarder.esm.js.map +1 -1
  45. package/dist/packages/core-app-api/src/apis/implementations/FeatureFlagsApi/LocalStorageFeatureFlags.esm.js.map +1 -1
  46. package/dist/packages/core-app-api/src/apis/implementations/FetchApi/FetchMiddlewares.esm.js.map +1 -1
  47. package/dist/packages/core-app-api/src/apis/implementations/FetchApi/IdentityAuthInjectorFetchMiddleware.esm.js.map +1 -1
  48. package/dist/packages/core-app-api/src/apis/implementations/FetchApi/PluginProtocolResolverFetchMiddleware.esm.js.map +1 -1
  49. package/dist/packages/core-app-api/src/apis/implementations/FetchApi/createFetchApi.esm.js.map +1 -1
  50. package/dist/packages/core-app-api/src/apis/implementations/OAuthRequestApi/OAuthPendingRequests.esm.js.map +1 -1
  51. package/dist/packages/core-app-api/src/apis/implementations/OAuthRequestApi/OAuthRequestManager.esm.js.map +1 -1
  52. package/dist/packages/core-app-api/src/apis/implementations/StorageApi/WebStorage.esm.js.map +1 -1
  53. package/dist/packages/core-app-api/src/apis/implementations/TranslationApi/I18nextTranslationApi.esm.js.map +1 -1
  54. package/dist/packages/core-app-api/src/apis/implementations/auth/atlassian/AtlassianAuth.esm.js.map +1 -1
  55. package/dist/packages/core-app-api/src/apis/implementations/auth/bitbucket/BitbucketAuth.esm.js.map +1 -1
  56. package/dist/packages/core-app-api/src/apis/implementations/auth/bitbucketServer/BitbucketServerAuth.esm.js.map +1 -1
  57. package/dist/packages/core-app-api/src/apis/implementations/auth/github/GithubAuth.esm.js.map +1 -1
  58. package/dist/packages/core-app-api/src/apis/implementations/auth/gitlab/GitlabAuth.esm.js.map +1 -1
  59. package/dist/packages/core-app-api/src/apis/implementations/auth/google/GoogleAuth.esm.js.map +1 -1
  60. package/dist/packages/core-app-api/src/apis/implementations/auth/microsoft/MicrosoftAuth.esm.js.map +1 -1
  61. package/dist/packages/core-app-api/src/apis/implementations/auth/oauth2/OAuth2.esm.js.map +1 -1
  62. package/dist/packages/core-app-api/src/apis/implementations/auth/okta/OktaAuth.esm.js.map +1 -1
  63. package/dist/packages/core-app-api/src/apis/implementations/auth/onelogin/OneLoginAuth.esm.js.map +1 -1
  64. package/dist/packages/core-app-api/src/apis/implementations/auth/saml/types.esm.js.map +1 -1
  65. package/dist/packages/core-app-api/src/apis/implementations/auth/vmwareCloud/VMwareCloudAuth.esm.js.map +1 -1
  66. package/dist/packages/core-app-api/src/apis/system/ApiAggregator.esm.js.map +1 -1
  67. package/dist/packages/core-app-api/src/apis/system/ApiProvider.esm.js.map +1 -1
  68. package/dist/packages/core-app-api/src/app/AppRouter.esm.js.map +1 -1
  69. package/dist/packages/core-app-api/src/app/AppThemeProvider.esm.js.map +1 -1
  70. package/dist/packages/core-app-api/src/app/InternalAppContext.esm.js.map +1 -1
  71. package/dist/packages/core-app-api/src/app/isProtectedApp.esm.js.map +1 -1
  72. package/dist/packages/core-app-api/src/app/isReactRouterBeta.esm.js.map +1 -1
  73. package/dist/packages/core-app-api/src/lib/AuthConnector/DefaultAuthConnector.esm.js.map +1 -1
  74. package/dist/packages/core-app-api/src/lib/AuthSessionManager/RefreshingAuthSessionManager.esm.js.map +1 -1
  75. package/dist/packages/core-app-api/src/lib/AuthSessionManager/SessionStateTracker.esm.js.map +1 -1
  76. package/dist/packages/core-app-api/src/lib/AuthSessionManager/common.esm.js.map +1 -1
  77. package/dist/packages/core-app-api/src/lib/loginPopup.esm.js.map +1 -1
  78. package/dist/packages/core-app-api/src/lib/subjects.esm.js.map +1 -1
  79. package/dist/packages/core-app-api/src/routing/FeatureFlagged.esm.js.map +1 -1
  80. package/dist/packages/core-app-api/src/routing/FlatRoutes.esm.js.map +1 -1
  81. package/dist/packages/core-app-api/src/routing/RouteTracker.esm.js.map +1 -1
  82. package/dist/packages/core-plugin-api/src/translation/TranslationRef.esm.js.map +1 -1
  83. package/dist/packages/core-plugin-api/src/translation/TranslationResource.esm.js.map +1 -1
  84. package/dist/packages/frontend-app-api/src/apis/implementations/IconsApi/DefaultIconsApi.esm.js.map +1 -1
  85. package/dist/packages/frontend-app-api/src/routing/RouteTracker.esm.js.map +1 -1
  86. package/dist/packages/frontend-app-api/src/routing/getBasePath.esm.js.map +1 -1
  87. package/dist/packages/frontend-internal/src/wiring/InternalExtensionDefinition.esm.js.map +1 -1
  88. package/dist/packages/frontend-internal/src/wiring/InternalFrontendPlugin.esm.js.map +1 -1
  89. package/dist/packages/frontend-internal/src/wiring/InternalSwappableComponentRef.esm.js.map +1 -1
  90. package/dist/packages/opaque-internal/src/OpaqueType.esm.js.map +1 -1
  91. package/dist/plugin.esm.js.map +1 -1
  92. package/dist/plugins/app/package.json.esm.js +1 -1
  93. package/package.json +10 -10
package/CHANGELOG.md CHANGED
@@ -1,5 +1,50 @@
1
1
  # @backstage/plugin-app
2
2
 
3
+ ## 0.2.1-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/frontend-plugin-api@0.11.1-next.0
9
+ - @backstage/core-components@0.17.6-next.0
10
+ - @backstage/integration-react@1.2.10-next.0
11
+
12
+ ## 0.2.0
13
+
14
+ ### Minor Changes
15
+
16
+ - fda1bbc: **BREAKING**: The `componentsApi` implementation has been removed from the plugin and replaced with the new `SwappableComponentsApi` instead.
17
+
18
+ If you were overriding the `componentsApi` implementation, you can now use the new `SwappableComponentsApi` instead.
19
+
20
+ ```ts
21
+ // old
22
+ appPlugin.getExtension('api:app/components').override(...)
23
+
24
+ // new
25
+ appPlugin.getExtension('api:app/swappable-components').override(...)
26
+ ```
27
+
28
+ - 29786f6: Updated the `app/nav` extension to use the new `NavContentBlueprint`, and removed support for extensions created with the now removed `NavLogoBlueprint`.
29
+ - 121899a: **BREAKING**: The `app-root-element` extension now only accepts `JSX.Element` in its `element` param, meaning overrides need to be updated.
30
+
31
+ ### Patch Changes
32
+
33
+ - 91cbdf4: Log a warning when `SwappableComponent` extensions are installed outside of using the `app` plugin
34
+ - fda1bbc: Default implementations of core components are now provided by this package.
35
+
36
+ A backwards compatible `componentsApi` implementation is also provided from this package which uses the `SwappableComponentsApi` as the implementation. This backwards compatible wrapper will be removed in the future.
37
+
38
+ - f2f133c: Internal update to use the new variant of `ApiBlueprint`.
39
+ - a08f95f: Added a new module for implementing public sign-in apps, exported as `appModulePublicSignIn` via the `/alpha` sub-path export. This replaces the `createPublicSignInApp` export from `@backstage/frontend-defaults`, which is now deprecated.
40
+ - 5d31d66: Updated the usage of the `RouterBlueprint` and `AppRootWrapperBlueprint` to use the lowercase `component` parameter
41
+ - 93b5e38: The default implementation of the Analytics API now collects and instantiates analytics implementations exposed via `AnalyticsImplementationBlueprint` extensions. If no such extensions are discovered, the API continues to do nothing with analytics events fired within Backstage. If multiple such extensions are discovered, every discovered implementation automatically receives analytics events.
42
+ - 9831f4e: Adjusted the dialog API types to have more sensible defaults
43
+ - Updated dependencies
44
+ - @backstage/core-components@0.17.5
45
+ - @backstage/frontend-plugin-api@0.11.0
46
+ - @backstage/theme@0.6.8
47
+
3
48
  ## 0.2.0-next.2
4
49
 
5
50
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"appModulePublicSignIn.esm.js","sources":["../../src/alpha/appModulePublicSignIn.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 appPlugin from '@backstage/plugin-app';\nimport { useAsync, useMountEffect } from '@react-hookz/web';\nimport {\n coreExtensionData,\n createFrontendModule,\n identityApiRef,\n useApi,\n} from '@backstage/frontend-plugin-api';\n\n// This is a copy of the CookieAuthRedirect component from the auth-react\n// plugin, to avoid a dependency on that package. Long-term we want this to be\n// the only implementation and remove the one in auth-react once the old frontend system is gone.\n\n// TODO(Rugvip): Should this be part of the app plugin instead? since it owns the backend part of it.\n\n/** @internal */\nexport function InternalCookieAuthRedirect() {\n const identityApi = useApi(identityApiRef);\n\n const [state, actions] = useAsync(async () => {\n const { token } = await identityApi.getCredentials();\n if (!token) {\n throw new Error('Expected Backstage token in sign-in response');\n }\n return token;\n });\n\n useMountEffect(actions.execute);\n\n if (state.status === 'error' && state.error) {\n return <>An error occurred: {state.error.message}</>;\n }\n\n if (state.status === 'success' && state.result) {\n return (\n <form\n ref={form => form?.submit()}\n action={window.location.href}\n method=\"POST\"\n style={{ visibility: 'hidden' }}\n >\n <input type=\"hidden\" name=\"type\" value=\"sign-in\" />\n <input type=\"hidden\" name=\"token\" value={state.result} />\n <input type=\"submit\" value=\"Continue\" />\n </form>\n );\n }\n\n return null;\n}\n\n/**\n * This module is intended for use in public sign-in page apps, in the\n * `index-public-experimental.tsx` file.\n *\n * @remarks\n *\n * This module is used to enable the public sign-in flow where the build output\n * is split into one small publicly accessible app, and the full app protected\n * by auth.\n *\n * This module overrides the `app/layout` extension, which means that most\n * extension typically installed in an app will be ignored. However, you can\n * still for example install API and root element extensions.\n *\n * A typical setup of this app will only install a custom sign-in page.\n *\n * @example\n *\n *#### In `index-public-experimental.tsx`\n *\n *```ts\n *import { createApp } from '@backstage/frontend-defaults\n *import { appModulePublicSignIn } from '@backstage/plugin-app/alpha';\n *import { appModuleSignInPage } from './appModuleSignInPage';\n *\n *const app = createApp({\n * features: [appModuleSignInPage, appModulePublicSignIn],\n *});\n *```\n *\n *#### In `appModuleSignInPage.tsx`\n *\n *```tsx\n *import { createFrontendModule, SignInPageBlueprint } from '@backstage/frontend-plugin-api';\n *\n *export const appModuleSignInPage = createFrontendModule({\n * pluginId: 'app',\n * extensions: [\n * SignInPageBlueprint.make({\n * params: {\n * ...\n * }\n * }),\n * ],\n *})\n *```\n *\n * @alpha\n */\nexport const appModulePublicSignIn = createFrontendModule({\n pluginId: 'app',\n extensions: [\n appPlugin.getExtension('app/layout').override({\n factory: () => [\n coreExtensionData.reactElement(<InternalCookieAuthRedirect />),\n ],\n }),\n ],\n});\n"],"names":[],"mappings":";;;;;AAgCO,SAAS,0BAA6B,GAAA;AAC3C,EAAM,MAAA,WAAA,GAAc,OAAO,cAAc,CAAA;AAEzC,EAAA,MAAM,CAAC,KAAA,EAAO,OAAO,CAAA,GAAI,SAAS,YAAY;AAC5C,IAAA,MAAM,EAAE,KAAA,EAAU,GAAA,MAAM,YAAY,cAAe,EAAA;AACnD,IAAA,IAAI,CAAC,KAAO,EAAA;AACV,MAAM,MAAA,IAAI,MAAM,8CAA8C,CAAA;AAAA;AAEhE,IAAO,OAAA,KAAA;AAAA,GACR,CAAA;AAED,EAAA,cAAA,CAAe,QAAQ,OAAO,CAAA;AAE9B,EAAA,IAAI,KAAM,CAAA,MAAA,KAAW,OAAW,IAAA,KAA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alpha/appModulePublicSignIn.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 appPlugin from '@backstage/plugin-app';\nimport { useAsync, useMountEffect } from '@react-hookz/web';\nimport {\n coreExtensionData,\n createFrontendModule,\n identityApiRef,\n useApi,\n} from '@backstage/frontend-plugin-api';\n\n// This is a copy of the CookieAuthRedirect component from the auth-react\n// plugin, to avoid a dependency on that package. Long-term we want this to be\n// the only implementation and remove the one in auth-react once the old frontend system is gone.\n\n// TODO(Rugvip): Should this be part of the app plugin instead? since it owns the backend part of it.\n\n/** @internal */\nexport function InternalCookieAuthRedirect() {\n const identityApi = useApi(identityApiRef);\n\n const [state, actions] = useAsync(async () => {\n const { token } = await identityApi.getCredentials();\n if (!token) {\n throw new Error('Expected Backstage token in sign-in response');\n }\n return token;\n });\n\n useMountEffect(actions.execute);\n\n if (state.status === 'error' && state.error) {\n return <>An error occurred: {state.error.message}</>;\n }\n\n if (state.status === 'success' && state.result) {\n return (\n <form\n ref={form => form?.submit()}\n action={window.location.href}\n method=\"POST\"\n style={{ visibility: 'hidden' }}\n >\n <input type=\"hidden\" name=\"type\" value=\"sign-in\" />\n <input type=\"hidden\" name=\"token\" value={state.result} />\n <input type=\"submit\" value=\"Continue\" />\n </form>\n );\n }\n\n return null;\n}\n\n/**\n * This module is intended for use in public sign-in page apps, in the\n * `index-public-experimental.tsx` file.\n *\n * @remarks\n *\n * This module is used to enable the public sign-in flow where the build output\n * is split into one small publicly accessible app, and the full app protected\n * by auth.\n *\n * This module overrides the `app/layout` extension, which means that most\n * extension typically installed in an app will be ignored. However, you can\n * still for example install API and root element extensions.\n *\n * A typical setup of this app will only install a custom sign-in page.\n *\n * @example\n *\n *#### In `index-public-experimental.tsx`\n *\n *```ts\n *import { createApp } from '@backstage/frontend-defaults\n *import { appModulePublicSignIn } from '@backstage/plugin-app/alpha';\n *import { appModuleSignInPage } from './appModuleSignInPage';\n *\n *const app = createApp({\n * features: [appModuleSignInPage, appModulePublicSignIn],\n *});\n *```\n *\n *#### In `appModuleSignInPage.tsx`\n *\n *```tsx\n *import { createFrontendModule, SignInPageBlueprint } from '@backstage/frontend-plugin-api';\n *\n *export const appModuleSignInPage = createFrontendModule({\n * pluginId: 'app',\n * extensions: [\n * SignInPageBlueprint.make({\n * params: {\n * ...\n * }\n * }),\n * ],\n *})\n *```\n *\n * @alpha\n */\nexport const appModulePublicSignIn = createFrontendModule({\n pluginId: 'app',\n extensions: [\n appPlugin.getExtension('app/layout').override({\n factory: () => [\n coreExtensionData.reactElement(<InternalCookieAuthRedirect />),\n ],\n }),\n ],\n});\n"],"names":[],"mappings":";;;;;AAgCO,SAAS,0BAAA,GAA6B;AAC3C,EAAA,MAAM,WAAA,GAAc,OAAO,cAAc,CAAA;AAEzC,EAAA,MAAM,CAAC,KAAA,EAAO,OAAO,CAAA,GAAI,SAAS,YAAY;AAC5C,IAAA,MAAM,EAAE,KAAA,EAAM,GAAI,MAAM,YAAY,cAAA,EAAe;AACnD,IAAA,IAAI,CAAC,KAAA,EAAO;AACV,MAAA,MAAM,IAAI,MAAM,8CAA8C,CAAA;AAAA,IAChE;AACA,IAAA,OAAO,KAAA;AAAA,EACT,CAAC,CAAA;AAED,EAAA,cAAA,CAAe,QAAQ,OAAO,CAAA;AAE9B,EAAA,IAAI,KAAA,CAAM,MAAA,KAAW,OAAA,IAAW,KAAA,CAAM,KAAA,EAAO;AAC3C,IAAA,uBAAO,IAAA,CAAA,QAAA,EAAA,EAAE,QAAA,EAAA;AAAA,MAAA,qBAAA;AAAA,MAAoB,MAAM,KAAA,CAAM;AAAA,KAAA,EAAQ,CAAA;AAAA,EACnD;AAEA,EAAA,IAAI,KAAA,CAAM,MAAA,KAAW,SAAA,IAAa,KAAA,CAAM,MAAA,EAAQ;AAC9C,IAAA,uBACE,IAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,GAAA,EAAK,CAAA,IAAA,KAAQ,IAAA,EAAM,MAAA,EAAO;AAAA,QAC1B,MAAA,EAAQ,OAAO,QAAA,CAAS,IAAA;AAAA,QACxB,MAAA,EAAO,MAAA;AAAA,QACP,KAAA,EAAO,EAAE,UAAA,EAAY,QAAA,EAAS;AAAA,QAE9B,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,WAAM,IAAA,EAAK,QAAA,EAAS,IAAA,EAAK,MAAA,EAAO,OAAM,SAAA,EAAU,CAAA;AAAA,0BACjD,GAAA,CAAC,WAAM,IAAA,EAAK,QAAA,EAAS,MAAK,OAAA,EAAQ,KAAA,EAAO,MAAM,MAAA,EAAQ,CAAA;AAAA,0BACvD,GAAA,CAAC,OAAA,EAAA,EAAM,IAAA,EAAK,QAAA,EAAS,OAAM,UAAA,EAAW;AAAA;AAAA;AAAA,KACxC;AAAA,EAEJ;AAEA,EAAA,OAAO,IAAA;AACT;AAmDO,MAAM,wBAAwB,oBAAA,CAAqB;AAAA,EACxD,QAAA,EAAU,KAAA;AAAA,EACV,UAAA,EAAY;AAAA,IACV,SAAA,CAAU,YAAA,CAAa,YAAY,CAAA,CAAE,QAAA,CAAS;AAAA,MAC5C,SAAS,MAAM;AAAA,QACb,iBAAA,CAAkB,YAAA,iBAAa,GAAA,CAAC,0BAAA,EAAA,EAA2B,CAAE;AAAA;AAC/D,KACD;AAAA;AAEL,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultDialogApi.esm.js","sources":["../../src/apis/DefaultDialogApi.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 { DialogApi, DialogApiDialog } from '@backstage/frontend-plugin-api';\n\nexport type OnShowDialog = (options: {\n component: (props: { dialog: DialogApiDialog<any> }) => React.JSX.Element;\n modal: boolean;\n}) => DialogApiDialog<unknown>;\n\n/**\n * Default implementation for the {@link DialogApi}.\n * @internal\n */\nexport class DefaultDialogApi implements DialogApi {\n #onShow?: OnShowDialog;\n\n show<TResult = void>(\n elementOrComponent:\n | JSX.Element\n | ((props: {\n dialog: DialogApiDialog<TResult | undefined>;\n }) => JSX.Element),\n ): DialogApiDialog<TResult | undefined> {\n if (!this.#onShow) {\n throw new Error('Dialog API has not been connected');\n }\n return this.#onShow({\n component:\n typeof elementOrComponent === 'function'\n ? elementOrComponent\n : () => elementOrComponent,\n modal: false,\n }) as DialogApiDialog<TResult | undefined>;\n }\n\n showModal<TResult = void>(\n elementOrComponent:\n | JSX.Element\n | ((props: { dialog: DialogApiDialog<TResult> }) => JSX.Element),\n ): DialogApiDialog<TResult> {\n if (!this.#onShow) {\n throw new Error('Dialog API has not been connected');\n }\n return this.#onShow({\n component:\n typeof elementOrComponent === 'function'\n ? elementOrComponent\n : () => elementOrComponent,\n modal: true,\n }) as DialogApiDialog<TResult>;\n }\n\n connect(onShow: OnShowDialog): void {\n this.#onShow = onShow;\n }\n}\n"],"names":[],"mappings":"AA2BO,MAAM,gBAAsC,CAAA;AAAA,EACjD,OAAA;AAAA,EAEA,KACE,kBAKsC,EAAA;AACtC,IAAI,IAAA,CAAC,KAAK,OAAS,EAAA;AACjB,MAAM,MAAA,IAAI,MAAM,mCAAmC,CAAA;AAAA;AAErD,IAAA,OAAO,KAAK,OAAQ,CAAA;AAAA,MAClB,SACE,EAAA,OAAO,kBAAuB,KAAA,UAAA,GAC1B,qBACA,MAAM,kBAAA;AAAA,MACZ,KAAO,EAAA;AAAA,KACR,CAAA;AAAA;AACH,EAEA,UACE,kBAG0B,EAAA;AAC1B,IAAI,IAAA,CAAC,KAAK,OAAS,EAAA;AACjB,MAAM,MAAA,IAAI,MAAM,mCAAmC,CAAA;AAAA;AAErD,IAAA,OAAO,KAAK,OAAQ,CAAA;AAAA,MAClB,SACE,EAAA,OAAO,kBAAuB,KAAA,UAAA,GAC1B,qBACA,MAAM,kBAAA;AAAA,MACZ,KAAO,EAAA;AAAA,KACR,CAAA;AAAA;AACH,EAEA,QAAQ,MAA4B,EAAA;AAClC,IAAA,IAAA,CAAK,OAAU,GAAA,MAAA;AAAA;AAEnB;;;;"}
1
+ {"version":3,"file":"DefaultDialogApi.esm.js","sources":["../../src/apis/DefaultDialogApi.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 { DialogApi, DialogApiDialog } from '@backstage/frontend-plugin-api';\n\nexport type OnShowDialog = (options: {\n component: (props: { dialog: DialogApiDialog<any> }) => React.JSX.Element;\n modal: boolean;\n}) => DialogApiDialog<unknown>;\n\n/**\n * Default implementation for the {@link DialogApi}.\n * @internal\n */\nexport class DefaultDialogApi implements DialogApi {\n #onShow?: OnShowDialog;\n\n show<TResult = void>(\n elementOrComponent:\n | JSX.Element\n | ((props: {\n dialog: DialogApiDialog<TResult | undefined>;\n }) => JSX.Element),\n ): DialogApiDialog<TResult | undefined> {\n if (!this.#onShow) {\n throw new Error('Dialog API has not been connected');\n }\n return this.#onShow({\n component:\n typeof elementOrComponent === 'function'\n ? elementOrComponent\n : () => elementOrComponent,\n modal: false,\n }) as DialogApiDialog<TResult | undefined>;\n }\n\n showModal<TResult = void>(\n elementOrComponent:\n | JSX.Element\n | ((props: { dialog: DialogApiDialog<TResult> }) => JSX.Element),\n ): DialogApiDialog<TResult> {\n if (!this.#onShow) {\n throw new Error('Dialog API has not been connected');\n }\n return this.#onShow({\n component:\n typeof elementOrComponent === 'function'\n ? elementOrComponent\n : () => elementOrComponent,\n modal: true,\n }) as DialogApiDialog<TResult>;\n }\n\n connect(onShow: OnShowDialog): void {\n this.#onShow = onShow;\n }\n}\n"],"names":[],"mappings":"AA2BO,MAAM,gBAAA,CAAsC;AAAA,EACjD,OAAA;AAAA,EAEA,KACE,kBAAA,EAKsC;AACtC,IAAA,IAAI,CAAC,KAAK,OAAA,EAAS;AACjB,MAAA,MAAM,IAAI,MAAM,mCAAmC,CAAA;AAAA,IACrD;AACA,IAAA,OAAO,KAAK,OAAA,CAAQ;AAAA,MAClB,SAAA,EACE,OAAO,kBAAA,KAAuB,UAAA,GAC1B,qBACA,MAAM,kBAAA;AAAA,MACZ,KAAA,EAAO;AAAA,KACR,CAAA;AAAA,EACH;AAAA,EAEA,UACE,kBAAA,EAG0B;AAC1B,IAAA,IAAI,CAAC,KAAK,OAAA,EAAS;AACjB,MAAA,MAAM,IAAI,MAAM,mCAAmC,CAAA;AAAA,IACrD;AACA,IAAA,OAAO,KAAK,OAAA,CAAQ;AAAA,MAClB,SAAA,EACE,OAAO,kBAAA,KAAuB,UAAA,GAC1B,qBACA,MAAM,kBAAA;AAAA,MACZ,KAAA,EAAO;AAAA,KACR,CAAA;AAAA,EACH;AAAA,EAEA,QAAQ,MAAA,EAA4B;AAClC,IAAA,IAAA,CAAK,OAAA,GAAU,MAAA;AAAA,EACjB;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultSwappableComponentsApi.esm.js","sources":["../../../src/apis/SwappableComponentsApi/DefaultSwappableComponentsApi.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 {\n SwappableComponentRef,\n SwappableComponentsApi,\n SwappableComponentBlueprint,\n} from '@backstage/frontend-plugin-api';\nimport { OpaqueSwappableComponentRef } from '@internal/frontend';\n\nimport { lazy } from 'react';\n\n/**\n * Implementation for the {@link SwappableComponentsApi}\n *\n * @internal\n */\nexport class DefaultSwappableComponentsApi implements SwappableComponentsApi {\n #components: Map<string, ((props: object) => JSX.Element | null) | undefined>;\n\n static fromComponents(\n components: Array<typeof SwappableComponentBlueprint.dataRefs.component.T>,\n ) {\n return new DefaultSwappableComponentsApi(\n new Map(\n components.map(entry => {\n return [\n entry.ref.id,\n entry.loader\n ? lazy(async () => ({\n default: await entry.loader!(),\n }))\n : undefined,\n ];\n }),\n ),\n );\n }\n\n constructor(components: Map<string, any>) {\n this.#components = components;\n }\n\n getComponent(\n ref: SwappableComponentRef<any>,\n ): (props: object) => JSX.Element | null {\n const OverrideComponent = this.#components.get(ref.id);\n const { defaultComponent: DefaultComponent, transformProps } =\n OpaqueSwappableComponentRef.toInternal(ref);\n\n return (props: object) => {\n const innerProps = transformProps?.(props) ?? props;\n\n if (OverrideComponent) {\n return <OverrideComponent {...innerProps} />;\n }\n\n return <DefaultComponent {...innerProps} />;\n };\n }\n}\n"],"names":[],"mappings":";;;;;;AA8BO,MAAM,6BAAgE,CAAA;AAAA,EAC3E,WAAA;AAAA,EAEA,OAAO,eACL,UACA,EAAA;AACA,IAAA,OAAO,IAAI,6BAAA;AAAA,MACT,IAAI,GAAA;AAAA,QACF,UAAA,CAAW,IAAI,CAAS,KAAA,KAAA;AACtB,UAAO,OAAA;AAAA,YACL,MAAM,GAAI,CAAA,EAAA;AAAA,YACV,KAAA,CAAM,MACF,GAAA,IAAA,CAAK,aAAa;AAAA,cAChB,OAAA,EAAS,MAAM,KAAA,CAAM,MAAQ;AAAA,cAC7B,CACF,GAAA,KAAA;AAAA,WACN;AAAA,SACD;AAAA;AACH,KACF;AAAA;AACF,EAEA,YAAY,UAA8B,EAAA;AACxC,IAAA,IAAA,CAAK,WAAc,GAAA,UAAA;AAAA;AACrB,EAEA,aACE,GACuC,EAAA;AACvC,IAAA,MAAM,iBAAoB,GAAA,IAAA,CAAK,WAAY,CAAA,GAAA,CAAI,IAAI,EAAE,CAAA;AACrD,IAAA,MAAM,EAAE,gBAAkB,EAAA,gBAAA,EAAkB,gBAC1C,GAAA,2BAAA,CAA4B,WAAW,GAAG,CAAA;AAE5C,IAAA,OAAO,CAAC,KAAkB,KAAA;AACxB,MAAM,MAAA,UAAA,GAAa,cAAiB,GAAA,KAAK,CAAK,IAAA,KAAA;AAE9C,MAAA,IAAI,iBAAmB,EAAA;AACrB,QAAO,uBAAA,GAAA,CAAC,iBAAmB,EAAA,EAAA,GAAG,UAAY,EAAA,CAAA;AAAA;AAG5C,MAAO,uBAAA,GAAA,CAAC,gBAAkB,EAAA,EAAA,GAAG,UAAY,EAAA,CAAA;AAAA,KAC3C;AAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"DefaultSwappableComponentsApi.esm.js","sources":["../../../src/apis/SwappableComponentsApi/DefaultSwappableComponentsApi.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 {\n SwappableComponentRef,\n SwappableComponentsApi,\n SwappableComponentBlueprint,\n} from '@backstage/frontend-plugin-api';\nimport { OpaqueSwappableComponentRef } from '@internal/frontend';\n\nimport { lazy } from 'react';\n\n/**\n * Implementation for the {@link SwappableComponentsApi}\n *\n * @internal\n */\nexport class DefaultSwappableComponentsApi implements SwappableComponentsApi {\n #components: Map<string, ((props: object) => JSX.Element | null) | undefined>;\n\n static fromComponents(\n components: Array<typeof SwappableComponentBlueprint.dataRefs.component.T>,\n ) {\n return new DefaultSwappableComponentsApi(\n new Map(\n components.map(entry => {\n return [\n entry.ref.id,\n entry.loader\n ? lazy(async () => ({\n default: await entry.loader!(),\n }))\n : undefined,\n ];\n }),\n ),\n );\n }\n\n constructor(components: Map<string, any>) {\n this.#components = components;\n }\n\n getComponent(\n ref: SwappableComponentRef<any>,\n ): (props: object) => JSX.Element | null {\n const OverrideComponent = this.#components.get(ref.id);\n const { defaultComponent: DefaultComponent, transformProps } =\n OpaqueSwappableComponentRef.toInternal(ref);\n\n return (props: object) => {\n const innerProps = transformProps?.(props) ?? props;\n\n if (OverrideComponent) {\n return <OverrideComponent {...innerProps} />;\n }\n\n return <DefaultComponent {...innerProps} />;\n };\n }\n}\n"],"names":[],"mappings":";;;;;;AA8BO,MAAM,6BAAA,CAAgE;AAAA,EAC3E,WAAA;AAAA,EAEA,OAAO,eACL,UAAA,EACA;AACA,IAAA,OAAO,IAAI,6BAAA;AAAA,MACT,IAAI,GAAA;AAAA,QACF,UAAA,CAAW,IAAI,CAAA,KAAA,KAAS;AACtB,UAAA,OAAO;AAAA,YACL,MAAM,GAAA,CAAI,EAAA;AAAA,YACV,KAAA,CAAM,MAAA,GACF,IAAA,CAAK,aAAa;AAAA,cAChB,OAAA,EAAS,MAAM,KAAA,CAAM,MAAA;AAAQ,cAC7B,CAAA,GACF;AAAA,WACN;AAAA,QACF,CAAC;AAAA;AACH,KACF;AAAA,EACF;AAAA,EAEA,YAAY,UAAA,EAA8B;AACxC,IAAA,IAAA,CAAK,WAAA,GAAc,UAAA;AAAA,EACrB;AAAA,EAEA,aACE,GAAA,EACuC;AACvC,IAAA,MAAM,iBAAA,GAAoB,IAAA,CAAK,WAAA,CAAY,GAAA,CAAI,IAAI,EAAE,CAAA;AACrD,IAAA,MAAM,EAAE,gBAAA,EAAkB,gBAAA,EAAkB,gBAAe,GACzD,2BAAA,CAA4B,WAAW,GAAG,CAAA;AAE5C,IAAA,OAAO,CAAC,KAAA,KAAkB;AACxB,MAAA,MAAM,UAAA,GAAa,cAAA,GAAiB,KAAK,CAAA,IAAK,KAAA;AAE9C,MAAA,IAAI,iBAAA,EAAmB;AACrB,QAAA,uBAAO,GAAA,CAAC,iBAAA,EAAA,EAAmB,GAAG,UAAA,EAAY,CAAA;AAAA,MAC5C;AAEA,MAAA,uBAAO,GAAA,CAAC,gBAAA,EAAA,EAAkB,GAAG,UAAA,EAAY,CAAA;AAAA,IAC3C,CAAA;AAAA,EACF;AACF;;;;"}
@@ -2,7 +2,7 @@ import GithubAuth from './packages/core-app-api/src/apis/implementations/auth/gi
2
2
  import GitlabAuth from './packages/core-app-api/src/apis/implementations/auth/gitlab/GitlabAuth.esm.js';
3
3
  import GoogleAuth from './packages/core-app-api/src/apis/implementations/auth/google/GoogleAuth.esm.js';
4
4
  import 'zen-observable';
5
- import { discoveryApiRef, configApiRef, alertApiRef, errorApiRef, storageApiRef, fetchApiRef, identityApiRef, oauthRequestApiRef, googleAuthApiRef, microsoftAuthApiRef, githubAuthApiRef, oktaAuthApiRef, gitlabAuthApiRef, oneloginAuthApiRef, bitbucketAuthApiRef, bitbucketServerAuthApiRef, atlassianAuthApiRef, vmwareCloudAuthApiRef } from '@backstage/core-plugin-api';
5
+ import { configApiRef, discoveryApiRef, alertApiRef, errorApiRef, storageApiRef, identityApiRef, fetchApiRef, oauthRequestApiRef, googleAuthApiRef, microsoftAuthApiRef, githubAuthApiRef, oktaAuthApiRef, gitlabAuthApiRef, oneloginAuthApiRef, bitbucketAuthApiRef, bitbucketServerAuthApiRef, atlassianAuthApiRef, vmwareCloudAuthApiRef } from '@backstage/core-plugin-api';
6
6
  import OktaAuth from './packages/core-app-api/src/apis/implementations/auth/okta/OktaAuth.esm.js';
7
7
  import './packages/core-app-api/src/apis/implementations/auth/saml/types.esm.js';
8
8
  import MicrosoftAuth from './packages/core-app-api/src/apis/implementations/auth/microsoft/MicrosoftAuth.esm.js';
@@ -22,8 +22,8 @@ import { FetchMiddlewares } from './packages/core-app-api/src/apis/implementatio
22
22
  import { OAuthRequestManager } from './packages/core-app-api/src/apis/implementations/OAuthRequestApi/OAuthRequestManager.esm.js';
23
23
  import { WebStorage } from './packages/core-app-api/src/apis/implementations/StorageApi/WebStorage.esm.js';
24
24
  import { ApiBlueprint, dialogApiRef } from '@backstage/frontend-plugin-api';
25
- import { ScmAuth, scmIntegrationsApiRef, ScmIntegrationsApi } from '@backstage/integration-react';
26
- import { permissionApiRef, IdentityPermissionApi } from '@backstage/plugin-permission-react';
25
+ import { ScmAuth, ScmIntegrationsApi, scmIntegrationsApiRef } from '@backstage/integration-react';
26
+ import { IdentityPermissionApi, permissionApiRef } from '@backstage/plugin-permission-react';
27
27
  import { DefaultDialogApi } from './apis/DefaultDialogApi.esm.js';
28
28
  import { analyticsApi } from './extensions/AnalyticsApi.esm.js';
29
29
 
@@ -1 +1 @@
1
- {"version":3,"file":"defaultApis.esm.js","sources":["../src/defaultApis.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\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport {\n AlertApiForwarder,\n ErrorApiForwarder,\n ErrorAlerter,\n GoogleAuth,\n GithubAuth,\n OktaAuth,\n GitlabAuth,\n MicrosoftAuth,\n BitbucketAuth,\n BitbucketServerAuth,\n OAuthRequestManager,\n WebStorage,\n UrlPatternDiscovery,\n OneLoginAuth,\n UnhandledErrorForwarder,\n AtlassianAuth,\n createFetchApi,\n FetchMiddlewares,\n VMwareCloudAuth,\n} from '../../../packages/core-app-api/src/apis/implementations';\n\nimport {\n alertApiRef,\n errorApiRef,\n discoveryApiRef,\n fetchApiRef,\n identityApiRef,\n oauthRequestApiRef,\n googleAuthApiRef,\n githubAuthApiRef,\n oktaAuthApiRef,\n gitlabAuthApiRef,\n microsoftAuthApiRef,\n storageApiRef,\n configApiRef,\n oneloginAuthApiRef,\n bitbucketAuthApiRef,\n bitbucketServerAuthApiRef,\n atlassianAuthApiRef,\n vmwareCloudAuthApiRef,\n} from '@backstage/core-plugin-api';\nimport { ApiBlueprint, dialogApiRef } from '@backstage/frontend-plugin-api';\nimport {\n ScmAuth,\n ScmIntegrationsApi,\n scmIntegrationsApiRef,\n} from '@backstage/integration-react';\nimport {\n permissionApiRef,\n IdentityPermissionApi,\n} from '@backstage/plugin-permission-react';\nimport { DefaultDialogApi } from './apis/DefaultDialogApi';\nimport { analyticsApi } from './extensions/AnalyticsApi';\n\nexport const apis = [\n ApiBlueprint.make({\n name: 'dialog',\n params: defineParams =>\n defineParams({\n api: dialogApiRef,\n deps: {},\n factory: () => new DefaultDialogApi(),\n }),\n }),\n ApiBlueprint.make({\n name: 'discovery',\n params: defineParams =>\n defineParams({\n api: discoveryApiRef,\n deps: { configApi: configApiRef },\n factory: ({ configApi }) =>\n UrlPatternDiscovery.compile(\n `${configApi.getString('backend.baseUrl')}/api/{{ pluginId }}`,\n ),\n }),\n }),\n ApiBlueprint.make({\n name: 'alert',\n params: defineParams =>\n defineParams({\n api: alertApiRef,\n deps: {},\n factory: () => new AlertApiForwarder(),\n }),\n }),\n analyticsApi,\n ApiBlueprint.make({\n name: 'error',\n params: defineParams =>\n defineParams({\n api: errorApiRef,\n deps: { alertApi: alertApiRef },\n factory: ({ alertApi }) => {\n const errorApi = new ErrorAlerter(alertApi, new ErrorApiForwarder());\n UnhandledErrorForwarder.forward(errorApi, { hidden: false });\n return errorApi;\n },\n }),\n }),\n ApiBlueprint.make({\n name: 'storage',\n params: defineParams =>\n defineParams({\n api: storageApiRef,\n deps: { errorApi: errorApiRef },\n factory: ({ errorApi }) => WebStorage.create({ errorApi }),\n }),\n }),\n ApiBlueprint.make({\n name: 'fetch',\n params: defineParams =>\n defineParams({\n api: fetchApiRef,\n deps: {\n configApi: configApiRef,\n identityApi: identityApiRef,\n discoveryApi: discoveryApiRef,\n },\n factory: ({ configApi, identityApi, discoveryApi }) => {\n return createFetchApi({\n middleware: [\n FetchMiddlewares.resolvePluginProtocol({\n discoveryApi,\n }),\n FetchMiddlewares.injectIdentityAuth({\n identityApi,\n config: configApi,\n }),\n ],\n });\n },\n }),\n }),\n ApiBlueprint.make({\n name: 'oauth-request',\n params: defineParams =>\n defineParams({\n api: oauthRequestApiRef,\n deps: {},\n factory: () => new OAuthRequestManager(),\n }),\n }),\n ApiBlueprint.make({\n name: 'google-auth',\n params: defineParams =>\n defineParams({\n api: googleAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n GoogleAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'microsoft-auth',\n params: defineParams =>\n defineParams({\n api: microsoftAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n MicrosoftAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'github-auth',\n params: defineParams =>\n defineParams({\n api: githubAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n GithubAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n defaultScopes: ['read:user'],\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'okta-auth',\n params: defineParams =>\n defineParams({\n api: oktaAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n OktaAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'gitlab-auth',\n params: defineParams =>\n defineParams({\n api: gitlabAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n GitlabAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'onelogin-auth',\n params: defineParams =>\n defineParams({\n api: oneloginAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n OneLoginAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'bitbucket-auth',\n params: defineParams =>\n defineParams({\n api: bitbucketAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n BitbucketAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n defaultScopes: ['account'],\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'bitbucket-server-auth',\n params: defineParams =>\n defineParams({\n api: bitbucketServerAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n BitbucketServerAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n defaultScopes: ['REPO_READ'],\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'atlassian-auth',\n params: defineParams =>\n defineParams({\n api: atlassianAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) => {\n return AtlassianAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n });\n },\n }),\n }),\n ApiBlueprint.make({\n name: 'vmware-cloud-auth',\n params: defineParams =>\n defineParams({\n api: vmwareCloudAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) => {\n return VMwareCloudAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n });\n },\n }),\n }),\n ApiBlueprint.make({\n name: 'permission',\n params: defineParams =>\n defineParams({\n api: permissionApiRef,\n deps: {\n discovery: discoveryApiRef,\n identity: identityApiRef,\n config: configApiRef,\n },\n factory: ({ config, discovery, identity }) =>\n IdentityPermissionApi.create({ config, discovery, identity }),\n }),\n }),\n ApiBlueprint.make({\n name: 'scm-auth',\n params: defineParams => defineParams(ScmAuth.createDefaultApiFactory()),\n }),\n ApiBlueprint.make({\n name: 'scm-integrations',\n params: defineParams =>\n defineParams({\n api: scmIntegrationsApiRef,\n deps: { configApi: configApiRef },\n factory: ({ configApi }) => ScmIntegrationsApi.fromConfig(configApi),\n }),\n }),\n] as const;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEO,MAAM,IAAO,GAAA;AAAA,EAClB,aAAa,IAAK,CAAA;AAAA,IAChB,IAAM,EAAA,QAAA;AAAA,IACN,MAAA,EAAQ,kBACN,YAAa,CAAA;AAAA,MACX,GAAK,EAAA,YAAA;AAAA,MACL,MAAM,EAAC;AAAA,MACP,OAAA,EAAS,MAAM,IAAI,gBAAiB;AAAA,KACrC;AAAA,GACJ,CAAA;AAAA,EACD,aAAa,IAAK,CAAA;AAAA,IAChB,IAAM,EAAA,WAAA;AAAA,IACN,MAAA,EAAQ,kBACN,YAAa,CAAA;AAAA,MACX,GAAK,EAAA,eAAA;AAAA,MACL,IAAA,EAAM,EAAE,SAAA,EAAW,YAAa,EAAA;AAAA,MAChC,OAAS,EAAA,CAAC,EAAE,SAAA,OACV,mBAAoB,CAAA,OAAA;AAAA,QAClB,CAAG,EAAA,SAAA,CAAU,SAAU,CAAA,iBAAiB,CAAC,CAAA,mBAAA;AAAA;AAC3C,KACH;AAAA,GACJ,CAAA;AAAA,EACD,aAAa,IAAK,CAAA;AAAA,IAChB,IAAM,EAAA,OAAA;AAAA,IACN,MAAA,EAAQ,kBACN,YAAa,CAAA;AAAA,MACX,GAAK,EAAA,WAAA;AAAA,MACL,MAAM,EAAC;AAAA,MACP,OAAA,EAAS,MAAM,IAAI,iBAAkB;AAAA,KACtC;AAAA,GACJ,CAAA;AAAA,EACD,YAAA;AAAA,EACA,aAAa,IAA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EAAM,EAAE,SAAA,EAAW,YAAa,EAAA;AAAA,MAChC,SAAS,CAAC,EAAE,WAAgB,KAAA,kBAAA,CAAmB,WAAW,SAAS;AAAA,KACpE;AAAA,GACJ;AACH;;;;"}
1
+ {"version":3,"file":"defaultApis.esm.js","sources":["../src/defaultApis.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\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport {\n AlertApiForwarder,\n ErrorApiForwarder,\n ErrorAlerter,\n GoogleAuth,\n GithubAuth,\n OktaAuth,\n GitlabAuth,\n MicrosoftAuth,\n BitbucketAuth,\n BitbucketServerAuth,\n OAuthRequestManager,\n WebStorage,\n UrlPatternDiscovery,\n OneLoginAuth,\n UnhandledErrorForwarder,\n AtlassianAuth,\n createFetchApi,\n FetchMiddlewares,\n VMwareCloudAuth,\n} from '../../../packages/core-app-api/src/apis/implementations';\n\nimport {\n alertApiRef,\n errorApiRef,\n discoveryApiRef,\n fetchApiRef,\n identityApiRef,\n oauthRequestApiRef,\n googleAuthApiRef,\n githubAuthApiRef,\n oktaAuthApiRef,\n gitlabAuthApiRef,\n microsoftAuthApiRef,\n storageApiRef,\n configApiRef,\n oneloginAuthApiRef,\n bitbucketAuthApiRef,\n bitbucketServerAuthApiRef,\n atlassianAuthApiRef,\n vmwareCloudAuthApiRef,\n} from '@backstage/core-plugin-api';\nimport { ApiBlueprint, dialogApiRef } from '@backstage/frontend-plugin-api';\nimport {\n ScmAuth,\n ScmIntegrationsApi,\n scmIntegrationsApiRef,\n} from '@backstage/integration-react';\nimport {\n permissionApiRef,\n IdentityPermissionApi,\n} from '@backstage/plugin-permission-react';\nimport { DefaultDialogApi } from './apis/DefaultDialogApi';\nimport { analyticsApi } from './extensions/AnalyticsApi';\n\nexport const apis = [\n ApiBlueprint.make({\n name: 'dialog',\n params: defineParams =>\n defineParams({\n api: dialogApiRef,\n deps: {},\n factory: () => new DefaultDialogApi(),\n }),\n }),\n ApiBlueprint.make({\n name: 'discovery',\n params: defineParams =>\n defineParams({\n api: discoveryApiRef,\n deps: { configApi: configApiRef },\n factory: ({ configApi }) =>\n UrlPatternDiscovery.compile(\n `${configApi.getString('backend.baseUrl')}/api/{{ pluginId }}`,\n ),\n }),\n }),\n ApiBlueprint.make({\n name: 'alert',\n params: defineParams =>\n defineParams({\n api: alertApiRef,\n deps: {},\n factory: () => new AlertApiForwarder(),\n }),\n }),\n analyticsApi,\n ApiBlueprint.make({\n name: 'error',\n params: defineParams =>\n defineParams({\n api: errorApiRef,\n deps: { alertApi: alertApiRef },\n factory: ({ alertApi }) => {\n const errorApi = new ErrorAlerter(alertApi, new ErrorApiForwarder());\n UnhandledErrorForwarder.forward(errorApi, { hidden: false });\n return errorApi;\n },\n }),\n }),\n ApiBlueprint.make({\n name: 'storage',\n params: defineParams =>\n defineParams({\n api: storageApiRef,\n deps: { errorApi: errorApiRef },\n factory: ({ errorApi }) => WebStorage.create({ errorApi }),\n }),\n }),\n ApiBlueprint.make({\n name: 'fetch',\n params: defineParams =>\n defineParams({\n api: fetchApiRef,\n deps: {\n configApi: configApiRef,\n identityApi: identityApiRef,\n discoveryApi: discoveryApiRef,\n },\n factory: ({ configApi, identityApi, discoveryApi }) => {\n return createFetchApi({\n middleware: [\n FetchMiddlewares.resolvePluginProtocol({\n discoveryApi,\n }),\n FetchMiddlewares.injectIdentityAuth({\n identityApi,\n config: configApi,\n }),\n ],\n });\n },\n }),\n }),\n ApiBlueprint.make({\n name: 'oauth-request',\n params: defineParams =>\n defineParams({\n api: oauthRequestApiRef,\n deps: {},\n factory: () => new OAuthRequestManager(),\n }),\n }),\n ApiBlueprint.make({\n name: 'google-auth',\n params: defineParams =>\n defineParams({\n api: googleAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n GoogleAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'microsoft-auth',\n params: defineParams =>\n defineParams({\n api: microsoftAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n MicrosoftAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'github-auth',\n params: defineParams =>\n defineParams({\n api: githubAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n GithubAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n defaultScopes: ['read:user'],\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'okta-auth',\n params: defineParams =>\n defineParams({\n api: oktaAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n OktaAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'gitlab-auth',\n params: defineParams =>\n defineParams({\n api: gitlabAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n GitlabAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'onelogin-auth',\n params: defineParams =>\n defineParams({\n api: oneloginAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n OneLoginAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'bitbucket-auth',\n params: defineParams =>\n defineParams({\n api: bitbucketAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n BitbucketAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n defaultScopes: ['account'],\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'bitbucket-server-auth',\n params: defineParams =>\n defineParams({\n api: bitbucketServerAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n BitbucketServerAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n defaultScopes: ['REPO_READ'],\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'atlassian-auth',\n params: defineParams =>\n defineParams({\n api: atlassianAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) => {\n return AtlassianAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n });\n },\n }),\n }),\n ApiBlueprint.make({\n name: 'vmware-cloud-auth',\n params: defineParams =>\n defineParams({\n api: vmwareCloudAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) => {\n return VMwareCloudAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n });\n },\n }),\n }),\n ApiBlueprint.make({\n name: 'permission',\n params: defineParams =>\n defineParams({\n api: permissionApiRef,\n deps: {\n discovery: discoveryApiRef,\n identity: identityApiRef,\n config: configApiRef,\n },\n factory: ({ config, discovery, identity }) =>\n IdentityPermissionApi.create({ config, discovery, identity }),\n }),\n }),\n ApiBlueprint.make({\n name: 'scm-auth',\n params: defineParams => defineParams(ScmAuth.createDefaultApiFactory()),\n }),\n ApiBlueprint.make({\n name: 'scm-integrations',\n params: defineParams =>\n defineParams({\n api: scmIntegrationsApiRef,\n deps: { configApi: configApiRef },\n factory: ({ configApi }) => ScmIntegrationsApi.fromConfig(configApi),\n }),\n }),\n] as const;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEO,MAAM,IAAA,GAAO;AAAA,EAClB,aAAa,IAAA,CAAK;AAAA,IAChB,IAAA,EAAM,QAAA;AAAA,IACN,MAAA,EAAQ,kBACN,YAAA,CAAa;AAAA,MACX,GAAA,EAAK,YAAA;AAAA,MACL,MAAM,EAAC;AAAA,MACP,OAAA,EAAS,MAAM,IAAI,gBAAA;AAAiB,KACrC;AAAA,GACJ,CAAA;AAAA,EACD,aAAa,IAAA,CAAK;AAAA,IAChB,IAAA,EAAM,WAAA;AAAA,IACN,MAAA,EAAQ,kBACN,YAAA,CAAa;AAAA,MACX,GAAA,EAAK,eAAA;AAAA,MACL,IAAA,EAAM,EAAE,SAAA,E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V;AAAA,MACA,OAAA,EAAS,CAAC,EAAE,MAAA,EAAQ,SAAA,EAAW,QAAA,EAAS,KACtC,qBAAA,CAAsB,MAAA,CAAO,EAAE,MAAA,EAAQ,SAAA,EAAW,UAAU;AAAA,KAC/D;AAAA,GACJ,CAAA;AAAA,EACD,aAAa,IAAA,CAAK;AAAA,IAChB,IAAA,EAAM,UAAA;AAAA,IACN,MAAA,EAAQ,CAAA,YAAA,KAAgB,YAAA,CAAa,OAAA,CAAQ,yBAAyB;AAAA,GACvE,CAAA;AAAA,EACD,aAAa,IAAA,CAAK;AAAA,IAChB,IAAA,EAAM,kBAAA;AAAA,IACN,MAAA,EAAQ,kBACN,YAAA,CAAa;AAAA,MACX,GAAA,EAAK,qBAAA;AAAA,MACL,IAAA,EAAM,EAAE,SAAA,EAAW,YAAA,EAAa;AAAA,MAChC,SAAS,CAAC,EAAE,WAAU,KAAM,kBAAA,CAAmB,WAAW,SAAS;AAAA,KACpE;AAAA,GACJ;AACH;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"AnalyticsApi.esm.js","sources":["../../src/extensions/AnalyticsApi.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 analyticsApiRef,\n AnalyticsImplementationBlueprint,\n ApiBlueprint,\n ApiRef,\n createExtensionInput,\n} from '@backstage/frontend-plugin-api';\n\nexport const analyticsApi = ApiBlueprint.makeWithOverrides({\n name: 'analytics',\n inputs: {\n implementations: createExtensionInput([\n AnalyticsImplementationBlueprint.dataRefs.factory,\n ]),\n },\n factory(originalFactory, { inputs }) {\n // Pull out and aggregate deps from every implementation input into an\n // object keyed by the apiRef ID to be passed to this API implementation as\n // if they were its own deps.\n const aggregatedDeps = inputs.implementations\n .flatMap<ApiRef<unknown>>(impls =>\n Object.values(\n impls.get(AnalyticsImplementationBlueprint.dataRefs.factory).deps,\n ),\n )\n .reduce<{ [x: string]: ApiRef<unknown> }>((accum, ref) => {\n accum[ref.id] = ref;\n return accum;\n }, {});\n\n return originalFactory(defineParams =>\n defineParams({\n api: analyticsApiRef,\n deps: aggregatedDeps,\n factory: analyticsApiDeps => {\n const actualApis = inputs.implementations\n .map(impl =>\n impl.get(AnalyticsImplementationBlueprint.dataRefs.factory),\n )\n .map(({ factory, deps }) =>\n factory(\n // Reconstruct a deps argument to pass to this analytics\n // implementation factory from those passed into ours.\n Object.keys(deps).reduce<{ [x: string]: ApiRef<unknown> }>(\n (accum, dep) => {\n accum[dep] = analyticsApiDeps[\n (deps as { [x: string]: ApiRef<unknown> })[dep].id\n ] as ApiRef<unknown>;\n return accum;\n },\n {},\n ),\n ),\n );\n return {\n captureEvent: event => {\n actualApis.forEach(api => {\n try {\n api.captureEvent(event);\n } catch {\n /* ignored */\n }\n });\n },\n };\n },\n }),\n );\n },\n});\n"],"names":[],"mappings":";;AAwBa,MAAA,YAAA,GAAe,aAAa,iBAAkB,CAAA;AAAA,EACzD,IAAM,EAAA,WAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,iBAAiB,oBAAqB,CAAA;AAAA,MACpC,iCAAiC,QAAS,CAAA;AAAA,KAC3C;AAAA,GACH;AAAA,EACA,OAAQ,CAAA,eAAA,EAAiB,EAAE,MAAA,EAAU,EAAA;AAInC,IAAM,MAAA,cAAA,GAAiB,OAAO,eAC3B,CAAA,OAAA;AAAA,MAAyB,WACxB,MAAO,CAAA,MAAA;AAAA,QACL,KAAM,CAAA,GAAA,CAAI,gCAAiC,CAAA,QAAA,CAAS,OAAO,CAAE,CAAA;AAAA;AAC/D,KAED,CAAA,MAAA,CAAyC,CAAC,KAAA,EAAO,GAAQ,KAAA;AACxD,MAAM,KAAA,CAAA,GAAA,CAAI,EAAE,CAAI,GAAA,GAAA;AAChB,MAAO,OAAA,KAAA;AAAA,KACT,EAAG,EAAE,CAAA;AAEP,IAAO,OAAA,eAAA;AAAA,MAAgB,kBACrB,YAAa,CAAA;AAAA,QACX,GAAK,EAAA,eAAA;AAAA,QACL,IAAM,EAAA,cAAA;AAAA,QACN,SAAS,CAAoB,gBAAA,KAAA;AAC3B,UAAM,MAAA,UAAA,GAAa,OAAO,eACvB,CAAA,GAAA;AAAA,YAAI,CACH,IAAA,KAAA,IAAA,CAAK,GAAI,CAAA,gCAAA,CAAiC,SAAS,OAAO;AAAA,WAE3D,CAAA,GAAA;AAAA,YAAI,CAAC,EAAE,OAAS,EAAA,IAAA,EACf,KAAA,OAAA;AAAA;AAAA;AAAA,cAGE,MAAA,CAAO,IAAK,CAAA,IAAI,CAAE,CAAA,MAAA;AAAA,gBAChB,CAAC,OAAO,GAAQ,KAAA;AACd,kBAAA,KAAA,CAAM,GAAG,CAAI,GAAA,gBAAA,CACV,IAA0C,CAAA,GAAG,EAAE,EAClD,CAAA;AACA,kBAAO,OAAA,KAAA;AAAA,iBACT;AAAA,gBACA;AAAC;AACH;AACF,WACF;AACF,UAAO,OAAA;AAAA,YACL,cAAc,CAAS,KAAA,KAAA;AACrB,cAAA,UAAA,CAAW,QAAQ,CAAO,GAAA,KAAA;AACxB,gBAAI,IAAA;AACF,kBAAA,GAAA,CAAI,aAAa,KAAK,CAAA;AAAA,iBAChB,CAAA,MAAA;AAAA;AAER,eACD,CAAA;AAAA;AACH,WACF;AAAA;AACF,OACD;AAAA,KACH;AAAA;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"AnalyticsApi.esm.js","sources":["../../src/extensions/AnalyticsApi.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 analyticsApiRef,\n AnalyticsImplementationBlueprint,\n ApiBlueprint,\n ApiRef,\n createExtensionInput,\n} from '@backstage/frontend-plugin-api';\n\nexport const analyticsApi = ApiBlueprint.makeWithOverrides({\n name: 'analytics',\n inputs: {\n implementations: createExtensionInput([\n AnalyticsImplementationBlueprint.dataRefs.factory,\n ]),\n },\n factory(originalFactory, { inputs }) {\n // Pull out and aggregate deps from every implementation input into an\n // object keyed by the apiRef ID to be passed to this API implementation as\n // if they were its own deps.\n const aggregatedDeps = inputs.implementations\n .flatMap<ApiRef<unknown>>(impls =>\n Object.values(\n impls.get(AnalyticsImplementationBlueprint.dataRefs.factory).deps,\n ),\n )\n .reduce<{ [x: string]: ApiRef<unknown> }>((accum, ref) => {\n accum[ref.id] = ref;\n return accum;\n }, {});\n\n return originalFactory(defineParams =>\n defineParams({\n api: analyticsApiRef,\n deps: aggregatedDeps,\n factory: analyticsApiDeps => {\n const actualApis = inputs.implementations\n .map(impl =>\n impl.get(AnalyticsImplementationBlueprint.dataRefs.factory),\n )\n .map(({ factory, deps }) =>\n factory(\n // Reconstruct a deps argument to pass to this analytics\n // implementation factory from those passed into ours.\n Object.keys(deps).reduce<{ [x: string]: ApiRef<unknown> }>(\n (accum, dep) => {\n accum[dep] = analyticsApiDeps[\n (deps as { [x: string]: ApiRef<unknown> })[dep].id\n ] as ApiRef<unknown>;\n return accum;\n },\n {},\n ),\n ),\n );\n return {\n captureEvent: event => {\n actualApis.forEach(api => {\n try {\n api.captureEvent(event);\n } catch {\n /* ignored */\n }\n });\n },\n };\n },\n }),\n );\n },\n});\n"],"names":[],"mappings":";;AAwBO,MAAM,YAAA,GAAe,aAAa,iBAAA,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AAO;AAAA,YACL,cAAc,CAAA,KAAA,KAAS;AACrB,cAAA,UAAA,CAAW,QAAQ,CAAA,GAAA,KAAO;AACxB,gBAAA,IAAI;AACF,kBAAA,GAAA,CAAI,aAAa,KAAK,CAAA;AAAA,gBACxB,CAAA,CAAA,MAAQ;AAAA,gBAER;AAAA,cACF,CAAC,CAAA;AAAA,YACH;AAAA,WACF;AAAA,QACF;AAAA,OACD;AAAA,KACH;AAAA,EACF;AACF,CAAC;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { createExtension, createExtensionInput, coreExtensionData, ExtensionBoundary } from '@backstage/frontend-plugin-api';
2
+ import { createExtension, coreExtensionData, createExtensionInput, ExtensionBoundary } from '@backstage/frontend-plugin-api';
3
3
  import { ApiProvider } from '../packages/core-app-api/src/apis/system/ApiProvider.esm.js';
4
4
  import 'zen-observable';
5
5
  import '@backstage/core-plugin-api';
@@ -1 +1 @@
1
- {"version":3,"file":"App.esm.js","sources":["../../src/extensions/App.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 {\n ExtensionBoundary,\n coreExtensionData,\n createExtension,\n createExtensionInput,\n} from '@backstage/frontend-plugin-api';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { ApiProvider } from '../../../../packages/core-app-api/src';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { AppThemeProvider } from '../../../../packages/core-app-api/src/app/AppThemeProvider';\n\nexport const App = createExtension({\n attachTo: { id: 'root', input: 'app' },\n inputs: {\n root: createExtensionInput([coreExtensionData.reactElement], {\n singleton: true,\n }),\n },\n output: [coreExtensionData.reactElement],\n factory: ({ node, apis, inputs }) => {\n return [\n coreExtensionData.reactElement(\n <ApiProvider apis={apis}>\n <AppThemeProvider>\n <ExtensionBoundary node={node}>\n {inputs.root.get(coreExtensionData.reactElement)}\n </ExtensionBoundary>\n </AppThemeProvider>\n </ApiProvider>,\n ),\n ];\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AA2BO,MAAM,MAAM,eAAgB,CAAA;AAAA,EACjC,QAAU,EAAA,EAAE,EAAI,EAAA,MAAA,EAAQ,OAAO,KAAM,EAAA;AAAA,EACrC,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,oBAAA,CAAqB,CAAC,iBAAA,CAAkB,YAAY,CAAG,EAAA;AAAA,MAC3D,SAAW,EAAA;AAAA,KACZ;AAAA,GACH;AAAA,EACA,MAAA,EAAQ,CAAC,iBAAA,CAAkB,YAAY,CAAA;AAAA,EACvC,SAAS,CAAC,EAAE,IAAM,EAAA,IAAA,EAAM,QAAa,KAAA;AACnC,IAAO,OAAA;AAAA,MACL,iBAAkB,CAAA,YAAA;AAAA,wBACf,GAAA,CAAA,WAAA,EAAA,EAAY,IACX,EAAA,QAAA,kBAAA,GAAA,CAAC,oBACC,QAAC,kBAAA,GAAA,CAAA,iBAAA,EAAA,EAAkB,IAChB,EAAA,QAAA,EAAA,MAAA,CAAO,KAAK,GAAI,CAAA,iBAAA,CAAkB,YAAY,CAAA,EACjD,GACF,CACF,EAAA;AAAA;AACF,KACF;AAAA;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"App.esm.js","sources":["../../src/extensions/App.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 {\n ExtensionBoundary,\n coreExtensionData,\n createExtension,\n createExtensionInput,\n} from '@backstage/frontend-plugin-api';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { ApiProvider } from '../../../../packages/core-app-api/src';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { AppThemeProvider } from '../../../../packages/core-app-api/src/app/AppThemeProvider';\n\nexport const App = createExtension({\n attachTo: { id: 'root', input: 'app' },\n inputs: {\n root: createExtensionInput([coreExtensionData.reactElement], {\n singleton: true,\n }),\n },\n output: [coreExtensionData.reactElement],\n factory: ({ node, apis, inputs }) => {\n return [\n coreExtensionData.reactElement(\n <ApiProvider apis={apis}>\n <AppThemeProvider>\n <ExtensionBoundary node={node}>\n {inputs.root.get(coreExtensionData.reactElement)}\n </ExtensionBoundary>\n </AppThemeProvider>\n </ApiProvider>,\n ),\n ];\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AA2BO,MAAM,MAAM,eAAA,CAAgB;AAAA,EACjC,QAAA,EAAU,EAAE,EAAA,EAAI,MAAA,EAAQ,OAAO,KAAA,EAAM;AAAA,EACrC,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,oBAAA,CAAqB,CAAC,iBAAA,CAAkB,YAAY,CAAA,EAAG;AAAA,MAC3D,SAAA,EAAW;AAAA,KACZ;AAAA,GACH;AAAA,EACA,MAAA,EAAQ,CAAC,iBAAA,CAAkB,YAAY,CAAA;AAAA,EACvC,SAAS,CAAC,EAAE,IAAA,EAAM,IAAA,EAAM,QAAO,KAAM;AACnC,IAAA,OAAO;AAAA,MACL,iBAAA,CAAkB,YAAA;AAAA,wBAChB,GAAA,CAAC,WAAA,EAAA,EAAY,IAAA,EACX,QAAA,kBAAA,GAAA,CAAC,oBACC,QAAA,kBAAA,GAAA,CAAC,iBAAA,EAAA,EAAkB,IAAA,EAChB,QAAA,EAAA,MAAA,CAAO,KAAK,GAAA,CAAI,iBAAA,CAAkB,YAAY,CAAA,EACjD,GACF,CAAA,EACF;AAAA;AACF,KACF;AAAA,EACF;AACF,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"AppLanguageApi.esm.js","sources":["../../src/extensions/AppLanguageApi.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\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { AppLanguageSelector } from '../../../../packages/core-app-api/src/apis/implementations/AppLanguageApi';\nimport { appLanguageApiRef } from '@backstage/core-plugin-api/alpha';\nimport { ApiBlueprint } from '@backstage/frontend-plugin-api';\n\nexport const AppLanguageApi = ApiBlueprint.make({\n name: 'app-language',\n params: defineParams =>\n defineParams({\n api: appLanguageApiRef,\n deps: {},\n factory: () => AppLanguageSelector.createWithStorage(),\n }),\n});\n"],"names":[],"mappings":";;;;AAqBa,MAAA,cAAA,GAAiB,aAAa,IAAK,CAAA;AAAA,EAC9C,IAAM,EAAA,cAAA;AAAA,EACN,MAAA,EAAQ,kBACN,YAAa,CAAA;AAAA,IACX,GAAK,EAAA,iBAAA;AAAA,IACL,MAAM,EAAC;AAAA,IACP,OAAA,EAAS,MAAM,mBAAA,CAAoB,iBAAkB;AAAA,GACtD;AACL,CAAC;;;;"}
1
+ {"version":3,"file":"AppLanguageApi.esm.js","sources":["../../src/extensions/AppLanguageApi.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\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { AppLanguageSelector } from '../../../../packages/core-app-api/src/apis/implementations/AppLanguageApi';\nimport { appLanguageApiRef } from '@backstage/core-plugin-api/alpha';\nimport { ApiBlueprint } from '@backstage/frontend-plugin-api';\n\nexport const AppLanguageApi = ApiBlueprint.make({\n name: 'app-language',\n params: defineParams =>\n defineParams({\n api: appLanguageApiRef,\n deps: {},\n factory: () => AppLanguageSelector.createWithStorage(),\n }),\n});\n"],"names":[],"mappings":";;;;AAqBO,MAAM,cAAA,GAAiB,aAAa,IAAA,CAAK;AAAA,EAC9C,IAAA,EAAM,cAAA;AAAA,EACN,MAAA,EAAQ,kBACN,YAAA,CAAa;AAAA,IACX,GAAA,EAAK,iBAAA;AAAA,IACL,MAAM,EAAC;AAAA,IACP,OAAA,EAAS,MAAM,mBAAA,CAAoB,iBAAA;AAAkB,GACtD;AACL,CAAC;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { jsxs } from 'react/jsx-runtime';
2
- import { createExtension, createExtensionInput, coreExtensionData } from '@backstage/frontend-plugin-api';
2
+ import { createExtension, coreExtensionData, createExtensionInput } from '@backstage/frontend-plugin-api';
3
3
  import { SidebarPage } from '@backstage/core-components';
4
4
 
5
5
  const AppLayout = createExtension({
@@ -1 +1 @@
1
- {"version":3,"file":"AppLayout.esm.js","sources":["../../src/extensions/AppLayout.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 {\n createExtension,\n coreExtensionData,\n createExtensionInput,\n} from '@backstage/frontend-plugin-api';\nimport { SidebarPage } from '@backstage/core-components';\n\nexport const AppLayout = createExtension({\n name: 'layout',\n attachTo: { id: 'app/root', input: 'children' },\n inputs: {\n nav: createExtensionInput([coreExtensionData.reactElement], {\n singleton: true,\n }),\n content: createExtensionInput([coreExtensionData.reactElement], {\n singleton: true,\n }),\n },\n output: [coreExtensionData.reactElement],\n factory: ({ inputs }) => [\n coreExtensionData.reactElement(\n <SidebarPage>\n {inputs.nav.get(coreExtensionData.reactElement)}\n {inputs.content.get(coreExtensionData.reactElement)}\n </SidebarPage>,\n ),\n ],\n});\n"],"names":[],"mappings":";;;;AAuBO,MAAM,YAAY,eAAgB,CAAA;AAAA,EACvC,IAAM,EAAA,QAAA;AAAA,EACN,QAAU,EAAA,EAAE,EAAI,EAAA,UAAA,EAAY,OAAO,UAAW,EAAA;AAAA,EAC9C,MAAQ,EAAA;AAAA,IACN,GAAK,EAAA,oBAAA,CAAqB,CAAC,iBAAA,CAAkB,YAAY,CAAG,EAAA;AAAA,MAC1D,SAAW,EAAA;AAAA,KACZ,CAAA;AAAA,IACD,OAAS,EAAA,oBAAA,CAAqB,CAAC,iBAAA,CAAkB,YAAY,CAAG,EAAA;AAAA,MAC9D,SAAW,EAAA;AAAA,KACZ;AAAA,GACH;AAAA,EACA,MAAA,EAAQ,CAAC,iBAAA,CAAkB,YAAY,CAAA;AAAA,EACvC,OAAS,EAAA,CAAC,EAAE,MAAA,EAAa,KAAA;AAAA,IACvB,iBAAkB,CAAA,YAAA;AAAA,2BACf,WACE,EAAA,EAAA,QAAA,EAAA;AAAA,QAAO,MAAA,CAAA,GAAA,CAAI,GAAI,CAAA,iBAAA,CAAkB,YAAY,CAAA;AAAA,QAC7C,MAAO,CAAA,OAAA,CAAQ,GAAI,CAAA,iBAAA,CAAkB,YAAY;AAAA,OACpD,EAAA;AAAA;AACF;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"AppLayout.esm.js","sources":["../../src/extensions/AppLayout.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 {\n createExtension,\n coreExtensionData,\n createExtensionInput,\n} from '@backstage/frontend-plugin-api';\nimport { SidebarPage } from '@backstage/core-components';\n\nexport const AppLayout = createExtension({\n name: 'layout',\n attachTo: { id: 'app/root', input: 'children' },\n inputs: {\n nav: createExtensionInput([coreExtensionData.reactElement], {\n singleton: true,\n }),\n content: createExtensionInput([coreExtensionData.reactElement], {\n singleton: true,\n }),\n },\n output: [coreExtensionData.reactElement],\n factory: ({ inputs }) => [\n coreExtensionData.reactElement(\n <SidebarPage>\n {inputs.nav.get(coreExtensionData.reactElement)}\n {inputs.content.get(coreExtensionData.reactElement)}\n </SidebarPage>,\n ),\n ],\n});\n"],"names":[],"mappings":";;;;AAuBO,MAAM,YAAY,eAAA,CAAgB;AAAA,EACvC,IAAA,EAAM,QAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,UAAA,EAAY,OAAO,UAAA,EAAW;AAAA,EAC9C,MAAA,EAAQ;AAAA,IACN,GAAA,EAAK,oBAAA,CAAqB,CAAC,iBAAA,CAAkB,YAAY,CAAA,EAAG;AAAA,MAC1D,SAAA,EAAW;AAAA,KACZ,CAAA;AAAA,IACD,OAAA,EAAS,oBAAA,CAAqB,CAAC,iBAAA,CAAkB,YAAY,CAAA,EAAG;AAAA,MAC9D,SAAA,EAAW;AAAA,KACZ;AAAA,GACH;AAAA,EACA,MAAA,EAAQ,CAAC,iBAAA,CAAkB,YAAY,CAAA;AAAA,EACvC,OAAA,EAAS,CAAC,EAAE,MAAA,EAAO,KAAM;AAAA,IACvB,iBAAA,CAAkB,YAAA;AAAA,2BACf,WAAA,EAAA,EACE,QAAA,EAAA;AAAA,QAAA,MAAA,CAAO,GAAA,CAAI,GAAA,CAAI,iBAAA,CAAkB,YAAY,CAAA;AAAA,QAC7C,MAAA,CAAO,OAAA,CAAQ,GAAA,CAAI,iBAAA,CAAkB,YAAY;AAAA,OAAA,EACpD;AAAA;AACF;AAEJ,CAAC;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { createExtension, createExtensionInput, NavItemBlueprint, NavContentBlueprint, coreExtensionData, useApi, routeResolutionApiRef } from '@backstage/frontend-plugin-api';
2
+ import { createExtension, coreExtensionData, createExtensionInput, NavContentBlueprint, NavItemBlueprint, useApi, routeResolutionApiRef } from '@backstage/frontend-plugin-api';
3
3
  import { Sidebar, SidebarItem } from '@backstage/core-components';
4
4
  import { useMemo } from 'react';
5
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"AppNav.esm.js","sources":["../../src/extensions/AppNav.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 {\n createExtension,\n coreExtensionData,\n createExtensionInput,\n NavItemBlueprint,\n NavContentBlueprint,\n NavContentComponentProps,\n routeResolutionApiRef,\n IconComponent,\n RouteRef,\n useApi,\n NavContentComponent,\n} from '@backstage/frontend-plugin-api';\nimport { Sidebar, SidebarItem } from '@backstage/core-components';\nimport { useMemo } from 'react';\n\nfunction DefaultNavContent(props: NavContentComponentProps) {\n return (\n <Sidebar>\n {props.items.map((item, index) => (\n <SidebarItem\n to={item.to}\n icon={item.icon}\n text={item.text}\n key={index}\n />\n ))}\n </Sidebar>\n );\n}\n\n// This helps defer rendering until the app is being rendered, which is needed\n// because the RouteResolutionApi can't be called until the app has been fully initialized.\nfunction NavContentRenderer(props: {\n Content: NavContentComponent;\n items: Array<{\n title: string;\n icon: IconComponent;\n routeRef: RouteRef<undefined>;\n }>;\n}) {\n const routeResolutionApi = useApi(routeResolutionApiRef);\n\n const items = useMemo(() => {\n return props.items.flatMap(item => {\n const link = routeResolutionApi.resolve(item.routeRef);\n if (!link) {\n // eslint-disable-next-line no-console\n console.warn(\n `NavItemBlueprint: unable to resolve route ref ${item.routeRef}`,\n );\n return [];\n }\n return [\n {\n to: link(),\n text: item.title,\n icon: item.icon,\n title: item.title,\n routeRef: item.routeRef,\n },\n ];\n });\n }, [props.items, routeResolutionApi]);\n\n return <props.Content items={items} />;\n}\n\nexport const AppNav = createExtension({\n name: 'nav',\n attachTo: { id: 'app/layout', input: 'nav' },\n inputs: {\n items: createExtensionInput([NavItemBlueprint.dataRefs.target]),\n content: createExtensionInput([NavContentBlueprint.dataRefs.component], {\n singleton: true,\n optional: true,\n }),\n },\n output: [coreExtensionData.reactElement],\n *factory({ inputs }) {\n const Content =\n inputs.content?.get(NavContentBlueprint.dataRefs.component) ??\n DefaultNavContent;\n\n yield coreExtensionData.reactElement(\n <NavContentRenderer\n items={inputs.items.map(item =>\n item.get(NavItemBlueprint.dataRefs.target),\n )}\n Content={Content}\n />,\n );\n },\n});\n"],"names":[],"mappings":";;;;;AAgCA,SAAS,kBAAkB,KAAiC,EAAA;AAC1D,EAAA,2B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AM,EAAA;AAAA,EAC3C,MAAQ,EAAA;AAAA,IACN,OAAO,oBAAqB,CAAA,CAAC,gBAAiB,CAAA,QAAA,CAAS,MAAM,CAAC,CAAA;AAAA,IAC9D,SAAS,oBAAqB,CAAA,CAAC,mBAAoB,CAAA,QAAA,CAAS,SAAS,CAAG,EAAA;AAAA,MACtE,SAAW,EAAA,IAAA;AAAA,MACX,QAAU,EAAA;AAAA,KACX;AAAA,GACH;AAAA,EACA,MAAA,EAAQ,CAAC,iBAAA,CAAkB,YAAY,CAAA;AAAA,EACvC,CAAC,OAAA,CAAQ,EAAE,MAAA,EAAU,EAAA;AACnB,IAAA,MAAM,UACJ,MAAO,CAAA,OAAA,EAAS,IAAI,mBAAoB,CAAA,QAAA,CAAS,SAAS,CAC1D,IAAA,iBAAA;AAEF,IAAA,MAAM,iBAAkB,CAAA,YAAA;AAAA,sBACtB,GAAA;AAAA,QAAC,kBAAA;AAAA,QAAA;AAAA,UACC,KAAA,EAAO,OAAO,KAAM,CAAA,GAAA;AAAA,YAAI,CACtB,IAAA,KAAA,IAAA,CAAK,GAAI,CAAA,gBAAA,CAAiB,SAAS,MAAM;AAAA,WAC3C;AAAA,UACA;AAAA;AAAA;AACF,KACF;AAAA;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"AppNav.esm.js","sources":["../../src/extensions/AppNav.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 {\n createExtension,\n coreExtensionData,\n createExtensionInput,\n NavItemBlueprint,\n NavContentBlueprint,\n NavContentComponentProps,\n routeResolutionApiRef,\n IconComponent,\n RouteRef,\n useApi,\n NavContentComponent,\n} from '@backstage/frontend-plugin-api';\nimport { Sidebar, SidebarItem } from '@backstage/core-components';\nimport { useMemo } from 'react';\n\nfunction DefaultNavContent(props: NavContentComponentProps) {\n return (\n <Sidebar>\n {props.items.map((item, index) => (\n <SidebarItem\n to={item.to}\n icon={item.icon}\n text={item.text}\n key={index}\n />\n ))}\n </Sidebar>\n );\n}\n\n// This helps defer rendering until the app is being rendered, which is needed\n// because the RouteResolutionApi can't be called until the app has been fully initialized.\nfunction NavContentRenderer(props: {\n Content: NavContentComponent;\n items: Array<{\n title: string;\n icon: IconComponent;\n routeRef: RouteRef<undefined>;\n }>;\n}) {\n const routeResolutionApi = useApi(routeResolutionApiRef);\n\n const items = useMemo(() => {\n return props.items.flatMap(item => {\n const link = routeResolutionApi.resolve(item.routeRef);\n if (!link) {\n // eslint-disable-next-line no-console\n console.warn(\n `NavItemBlueprint: unable to resolve route ref ${item.routeRef}`,\n );\n return [];\n }\n return [\n {\n to: link(),\n text: item.title,\n icon: item.icon,\n title: item.title,\n routeRef: item.routeRef,\n },\n ];\n });\n }, [props.items, routeResolutionApi]);\n\n return <props.Content items={items} />;\n}\n\nexport const AppNav = createExtension({\n name: 'nav',\n attachTo: { id: 'app/layout', input: 'nav' },\n inputs: {\n items: createExtensionInput([NavItemBlueprint.dataRefs.target]),\n content: createExtensionInput([NavContentBlueprint.dataRefs.component], {\n singleton: true,\n optional: true,\n }),\n },\n output: [coreExtensionData.reactElement],\n *factory({ inputs }) {\n const Content =\n inputs.content?.get(NavContentBlueprint.dataRefs.component) ??\n DefaultNavContent;\n\n yield coreExtensionData.reactElement(\n <NavContentRenderer\n items={inputs.items.map(item =>\n item.get(NavItemBlueprint.dataRefs.target),\n )}\n Content={Content}\n />,\n );\n },\n});\n"],"names":[],"mappings":";;;;;AAgCA,SAAS,kBAAkB,KAAA,EAAiC;AAC1D,EAAA,2BACG,OAAA,EAAA,EACE,QAAA,EAAA,KAAA,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AAA,EAAQ;AAAA,IACN,OAAO,oBAAA,CAAqB,CAAC,gBAAA,CAAiB,QAAA,CAAS,MAAM,CAAC,CAAA;AAAA,IAC9D,SAAS,oBAAA,CAAqB,CAAC,mBAAA,CAAoB,QAAA,CAAS,SAAS,CAAA,EAAG;AAAA,MACtE,SAAA,EAAW,IAAA;AAAA,MACX,QAAA,EAAU;AAAA,KACX;AAAA,GACH;AAAA,EACA,MAAA,EAAQ,CAAC,iBAAA,CAAkB,YAAY,CAAA;AAAA,EACvC,CAAC,OAAA,CAAQ,EAAE,MAAA,EAAO,EAAG;AACnB,IAAA,MAAM,UACJ,MAAA,CAAO,OAAA,EAAS,IAAI,mBAAA,CAAoB,QAAA,CAAS,SAAS,CAAA,IAC1D,iBAAA;AAEF,IAAA,MAAM,iBAAA,CAAkB,YAAA;AAAA,sBACtB,GAAA;AAAA,QAAC,kBAAA;AAAA,QAAA;AAAA,UACC,KAAA,EAAO,OAAO,KAAA,CAAM,GAAA;AAAA,YAAI,CAAA,IAAA,KACtB,IAAA,CAAK,GAAA,CAAI,gBAAA,CAAiB,SAAS,MAAM;AAAA,WAC3C;AAAA,UACA;AAAA;AAAA;AACF,KACF;AAAA,EACF;AACF,CAAC;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { useState } from 'react';
3
- import { createExtension, createExtensionInput, RouterBlueprint, SignInPageBlueprint, coreExtensionData, AppRootWrapperBlueprint, discoveryApiRef, errorApiRef, fetchApiRef, routeResolutionApiRef } from '@backstage/frontend-plugin-api';
3
+ import { createExtension, coreExtensionData, createExtensionInput, discoveryApiRef, errorApiRef, fetchApiRef, AppRootWrapperBlueprint, RouterBlueprint, SignInPageBlueprint, routeResolutionApiRef } from '@backstage/frontend-plugin-api';
4
4
  import { identityApiRef, useApi, configApiRef } from '@backstage/core-plugin-api';
5
5
  import { isProtectedApp } from '../packages/core-app-api/src/app/isProtectedApp.esm.js';
6
6
  import { BrowserRouter } from 'react-router-dom';
@@ -1 +1 @@
1
- {"version":3,"file":"AppRoot.esm.js","sources":["../../src/extensions/AppRoot.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 {\n ComponentType,\n PropsWithChildren,\n ReactNode,\n useState,\n JSX,\n} from 'react';\nimport {\n AppRootWrapperBlueprint,\n RouterBlueprint,\n SignInPageBlueprint,\n coreExtensionData,\n discoveryApiRef,\n fetchApiRef,\n errorApiRef,\n createExtension,\n createExtensionInput,\n routeResolutionApiRef,\n} from '@backstage/frontend-plugin-api';\nimport {\n DiscoveryApi,\n ErrorApi,\n FetchApi,\n IdentityApi,\n ProfileInfo,\n SignInPageProps,\n configApiRef,\n identityApiRef,\n useApi,\n} from '@backstage/core-plugin-api';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { isProtectedApp } from '../../../../packages/core-app-api/src/app/isProtectedApp';\nimport { BrowserRouter } from 'react-router-dom';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { RouteTracker } from '../../../../packages/frontend-app-api/src/routing/RouteTracker';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { getBasePath } from '../../../../packages/frontend-app-api/src/routing/getBasePath';\n\nexport const AppRoot = createExtension({\n name: 'root',\n attachTo: { id: 'app', input: 'root' },\n inputs: {\n router: createExtensionInput([RouterBlueprint.dataRefs.component], {\n singleton: true,\n optional: true,\n }),\n signInPage: createExtensionInput([SignInPageBlueprint.dataRefs.component], {\n singleton: true,\n optional: true,\n }),\n children: createExtensionInput([coreExtensionData.reactElement], {\n singleton: true,\n }),\n elements: createExtensionInput([coreExtensionData.reactElement]),\n wrappers: createExtensionInput([\n AppRootWrapperBlueprint.dataRefs.component,\n ]),\n },\n output: [coreExtensionData.reactElement],\n factory({ inputs, apis }) {\n if (isProtectedApp()) {\n const identityApi = apis.get(identityApiRef);\n if (!identityApi) {\n throw new Error('App requires an Identity API implementation');\n }\n const appIdentityProxy = toAppIdentityProxy(identityApi);\n const discoveryApi = apis.get(discoveryApiRef);\n const errorApi = apis.get(errorApiRef);\n const fetchApi = apis.get(fetchApiRef);\n if (!discoveryApi || !errorApi || !fetchApi) {\n throw new Error(\n 'App is running in protected mode but missing required APIs',\n );\n }\n appIdentityProxy.enableCookieAuth({\n discoveryApi,\n errorApi,\n fetchApi,\n });\n }\n\n let content: ReactNode = inputs.children.get(\n coreExtensionData.reactElement,\n );\n\n for (const wrapper of inputs.wrappers) {\n const Component = wrapper.get(AppRootWrapperBlueprint.dataRefs.component);\n content = <Component>{content}</Component>;\n }\n\n return [\n coreExtensionData.reactElement(\n <AppRouter\n SignInPageComponent={inputs.signInPage?.get(\n SignInPageBlueprint.dataRefs.component,\n )}\n RouterComponent={inputs.router?.get(\n RouterBlueprint.dataRefs.component,\n )}\n extraElements={inputs.elements?.map(el =>\n el.get(coreExtensionData.reactElement),\n )}\n >\n {content}\n </AppRouter>,\n ),\n ];\n },\n});\n\n// This wraps the sign-in page and waits for sign-in to be completed before rendering the app\nfunction SignInPageWrapper({\n component: Component,\n appIdentityProxy,\n children,\n}: {\n component: ComponentType<SignInPageProps>;\n appIdentityProxy: AppIdentityProxy;\n children: ReactNode;\n}) {\n const [identityApi, setIdentityApi] = useState<IdentityApi>();\n const configApi = useApi(configApiRef);\n const basePath = getBasePath(configApi);\n\n if (!identityApi) {\n return <Component onSignInSuccess={setIdentityApi} />;\n }\n\n appIdentityProxy.setTarget(identityApi, {\n signOutTargetUrl: basePath || '/',\n });\n return <>{children}</>;\n}\n\ntype AppIdentityProxy = IdentityApi & {\n enableCookieAuth(ctx: {\n errorApi: ErrorApi;\n fetchApi: FetchApi;\n discoveryApi: DiscoveryApi;\n }): void;\n setTarget(\n impl: IdentityApi & /* backwards compat stuff */ {\n getUserId?(): string;\n getIdToken?(): Promise<string | undefined>;\n getProfile?(): ProfileInfo;\n },\n options: { signOutTargetUrl: string },\n ): void;\n};\n\nfunction toAppIdentityProxy(identityApi: IdentityApi): AppIdentityProxy {\n if (!('enableCookieAuth' in identityApi)) {\n throw new Error('Unexpected Identity API implementation');\n }\n return identityApi as AppIdentityProxy;\n}\n\ntype RouteResolverProxy = {\n getRouteObjects(): any[];\n};\n\n/**\n * Props for the {@link AppRouter} component.\n * @public\n */\nexport interface AppRouterProps {\n children?: ReactNode;\n SignInPageComponent?: ComponentType<SignInPageProps>;\n RouterComponent?: (props: { children: ReactNode }) => JSX.Element | null;\n extraElements?: Array<JSX.Element>;\n}\n\nfunction DefaultRouter(props: PropsWithChildren<{}>) {\n const configApi = useApi(configApiRef);\n const basePath = getBasePath(configApi);\n return <BrowserRouter basename={basePath}>{props.children}</BrowserRouter>;\n}\n\n/**\n * App router and sign-in page wrapper.\n *\n * @remarks\n *\n * The AppRouter provides the routing context and renders the sign-in page.\n * Until the user has successfully signed in, this component will render\n * the sign-in page. Once the user has signed-in, it will instead render\n * the app, while providing routing and route tracking for the app.\n */\nexport function AppRouter(props: AppRouterProps) {\n const {\n children,\n SignInPageComponent,\n RouterComponent = DefaultRouter,\n extraElements = [],\n } = props;\n\n const configApi = useApi(configApiRef);\n const appIdentityProxy = toAppIdentityProxy(useApi(identityApiRef));\n const routeResolutionsApi = useApi(routeResolutionApiRef);\n const basePath = getBasePath(configApi);\n\n // TODO: Private access for now, probably replace with path -> node lookup method on the API\n if (!('getRouteObjects' in routeResolutionsApi)) {\n throw new Error('Unexpected route resolution API implementation');\n }\n const routeObjects = (\n routeResolutionsApi as RouteResolverProxy\n ).getRouteObjects();\n\n // If the app hasn't configured a sign-in page, we just continue as guest.\n if (!SignInPageComponent) {\n appIdentityProxy.setTarget(\n {\n getUserId: () => 'guest',\n getIdToken: async () => undefined,\n getProfile: () => ({\n email: 'guest@example.com',\n displayName: 'Guest',\n }),\n getProfileInfo: async () => ({\n email: 'guest@example.com',\n displayName: 'Guest',\n }),\n getBackstageIdentity: async () => ({\n type: 'user',\n userEntityRef: 'user:default/guest',\n ownershipEntityRefs: ['user:default/guest'],\n }),\n getCredentials: async () => ({}),\n signOut: async () => {},\n },\n { signOutTargetUrl: basePath || '/' },\n );\n\n return (\n <RouterComponent>\n {...extraElements}\n <RouteTracker routeObjects={routeObjects} />\n {children}\n </RouterComponent>\n );\n }\n\n return (\n <RouterComponent>\n {...extraElements}\n <RouteTracker routeObjects={routeObjects} />\n <SignInPageWrapper\n component={SignInPageComponent}\n appIdentityProxy={appIdentityProxy}\n >\n {children}\n </SignInPageWrapper>\n </RouterComponent>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;AAsDO,MAAM,UAAU,eAAgB,CAAA;AAAA,EACrC,IAAM,EAAA,MAAA;AAAA,EACN,QAAU,EAAA,EAAE,EAAI,EAAA,KAAA,EAAO,OAAO,MAAO,EAAA;AAAA,EACrC,MAAQ,EAAA;AAAA,IACN,QAAQ,oBAAqB,CAAA,CAAC,eAAgB,CAAA,QAAA,CAAS,SAAS,CAAG,EAAA;AAAA,MACjE,SAAW,EAAA,IAAA;AAAA,MACX,QAAU,EAAA;AAAA,KACX,CAAA;AAAA,IACD,YAAY,oBAAqB,CAAA,CAAC,mBAAoB,CAAA,QAAA,CAAS,SAAS,CAAG,EAAA;AAAA,MACzE,SAAW,EAAA,IAAA;AAAA,MACX,QAAU,EAAA;AAAA,KACX,CAAA;AAAA,IACD,QAAU,EAAA,oBAAA,CAAqB,CAAC,iBAAA,CAAkB,YAAY,CAAG,EAAA;AAAA,MAC/D,SAAW,EAAA;AAAA,KACZ,CAAA;AAAA,IACD,QAAU,EAAA,oBAAA,CAAqB,CAAC,iBAAA,CAAkB,YAAY,CAAC,CAAA;AAA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CAAA;AAAA,QAC9B,SAAS,YAAY;AAAA;AAAC,OACxB;AAAA,MACA,EAAE,gBAAkB,EAAA,QAAA,IAAY,GAAI;AAAA,KACtC;AAEA,IAAA,4BACG,eACE,EAAA,EAAA,QAAA,EAAA;AAAA,MAAG,GAAA,aAAA;AAAA,sBACJ,GAAA,CAAC,gBAAa,YAA4B,EAAA,CAAA;AAAA,MACzC;AAAA,KACH,EAAA,CAAA;AAAA;AAIJ,EAAA,4BACG,eACE,EAAA,EAAA,QAAA,EAAA;AAAA,IAAG,GAAA,aAAA;AAAA,oBACJ,GAAA,CAAC,gBAAa,YAA4B,EAAA,CAAA;AAAA,oBAC1C,GAAA;AAAA,MAAC,iBAAA;AAAA,MAAA;AAAA,QACC,SAAW,EAAA,mBAAA;AAAA,QACX,gBAAA;AAAA,QAEC;AAAA;AAAA;AACH,GACF,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"AppRoot.esm.js","sources":["../../src/extensions/AppRoot.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 {\n ComponentType,\n PropsWithChildren,\n ReactNode,\n useState,\n JSX,\n} from 'react';\nimport {\n AppRootWrapperBlueprint,\n RouterBlueprint,\n SignInPageBlueprint,\n coreExtensionData,\n discoveryApiRef,\n fetchApiRef,\n errorApiRef,\n createExtension,\n createExtensionInput,\n routeResolutionApiRef,\n} from '@backstage/frontend-plugin-api';\nimport {\n DiscoveryApi,\n ErrorApi,\n FetchApi,\n IdentityApi,\n ProfileInfo,\n SignInPageProps,\n configApiRef,\n identityApiRef,\n useApi,\n} from '@backstage/core-plugin-api';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { isProtectedApp } from '../../../../packages/core-app-api/src/app/isProtectedApp';\nimport { BrowserRouter } from 'react-router-dom';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { RouteTracker } from '../../../../packages/frontend-app-api/src/routing/RouteTracker';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { getBasePath } from '../../../../packages/frontend-app-api/src/routing/getBasePath';\n\nexport const AppRoot = createExtension({\n name: 'root',\n attachTo: { id: 'app', input: 'root' },\n inputs: {\n router: createExtensionInput([RouterBlueprint.dataRefs.component], {\n singleton: true,\n optional: true,\n }),\n signInPage: createExtensionInput([SignInPageBlueprint.dataRefs.component], {\n singleton: true,\n optional: true,\n }),\n children: createExtensionInput([coreExtensionData.reactElement], {\n singleton: true,\n }),\n elements: createExtensionInput([coreExtensionData.reactElement]),\n wrappers: createExtensionInput([\n AppRootWrapperBlueprint.dataRefs.component,\n ]),\n },\n output: [coreExtensionData.reactElement],\n factory({ inputs, apis }) {\n if (isProtectedApp()) {\n const identityApi = apis.get(identityApiRef);\n if (!identityApi) {\n throw new Error('App requires an Identity API implementation');\n }\n const appIdentityProxy = toAppIdentityProxy(identityApi);\n const discoveryApi = apis.get(discoveryApiRef);\n const errorApi = apis.get(errorApiRef);\n const fetchApi = apis.get(fetchApiRef);\n if (!discoveryApi || !errorApi || !fetchApi) {\n throw new Error(\n 'App is running in protected mode but missing required APIs',\n );\n }\n appIdentityProxy.enableCookieAuth({\n discoveryApi,\n errorApi,\n fetchApi,\n });\n }\n\n let content: ReactNode = inputs.children.get(\n coreExtensionData.reactElement,\n );\n\n for (const wrapper of inputs.wrappers) {\n const Component = wrapper.get(AppRootWrapperBlueprint.dataRefs.component);\n content = <Component>{content}</Component>;\n }\n\n return [\n coreExtensionData.reactElement(\n <AppRouter\n SignInPageComponent={inputs.signInPage?.get(\n SignInPageBlueprint.dataRefs.component,\n )}\n RouterComponent={inputs.router?.get(\n RouterBlueprint.dataRefs.component,\n )}\n extraElements={inputs.elements?.map(el =>\n el.get(coreExtensionData.reactElement),\n )}\n >\n {content}\n </AppRouter>,\n ),\n ];\n },\n});\n\n// This wraps the sign-in page and waits for sign-in to be completed before rendering the app\nfunction SignInPageWrapper({\n component: Component,\n appIdentityProxy,\n children,\n}: {\n component: ComponentType<SignInPageProps>;\n appIdentityProxy: AppIdentityProxy;\n children: ReactNode;\n}) {\n const [identityApi, setIdentityApi] = useState<IdentityApi>();\n const configApi = useApi(configApiRef);\n const basePath = getBasePath(configApi);\n\n if (!identityApi) {\n return <Component onSignInSuccess={setIdentityApi} />;\n }\n\n appIdentityProxy.setTarget(identityApi, {\n signOutTargetUrl: basePath || '/',\n });\n return <>{children}</>;\n}\n\ntype AppIdentityProxy = IdentityApi & {\n enableCookieAuth(ctx: {\n errorApi: ErrorApi;\n fetchApi: FetchApi;\n discoveryApi: DiscoveryApi;\n }): void;\n setTarget(\n impl: IdentityApi & /* backwards compat stuff */ {\n getUserId?(): string;\n getIdToken?(): Promise<string | undefined>;\n getProfile?(): ProfileInfo;\n },\n options: { signOutTargetUrl: string },\n ): void;\n};\n\nfunction toAppIdentityProxy(identityApi: IdentityApi): AppIdentityProxy {\n if (!('enableCookieAuth' in identityApi)) {\n throw new Error('Unexpected Identity API implementation');\n }\n return identityApi as AppIdentityProxy;\n}\n\ntype RouteResolverProxy = {\n getRouteObjects(): any[];\n};\n\n/**\n * Props for the {@link AppRouter} component.\n * @public\n */\nexport interface AppRouterProps {\n children?: ReactNode;\n SignInPageComponent?: ComponentType<SignInPageProps>;\n RouterComponent?: (props: { children: ReactNode }) => JSX.Element | null;\n extraElements?: Array<JSX.Element>;\n}\n\nfunction DefaultRouter(props: PropsWithChildren<{}>) {\n const configApi = useApi(configApiRef);\n const basePath = getBasePath(configApi);\n return <BrowserRouter basename={basePath}>{props.children}</BrowserRouter>;\n}\n\n/**\n * App router and sign-in page wrapper.\n *\n * @remarks\n *\n * The AppRouter provides the routing context and renders the sign-in page.\n * Until the user has successfully signed in, this component will render\n * the sign-in page. Once the user has signed-in, it will instead render\n * the app, while providing routing and route tracking for the app.\n */\nexport function AppRouter(props: AppRouterProps) {\n const {\n children,\n SignInPageComponent,\n RouterComponent = DefaultRouter,\n extraElements = [],\n } = props;\n\n const configApi = useApi(configApiRef);\n const appIdentityProxy = toAppIdentityProxy(useApi(identityApiRef));\n const routeResolutionsApi = useApi(routeResolutionApiRef);\n const basePath = getBasePath(configApi);\n\n // TODO: Private access for now, probably replace with path -> node lookup method on the API\n if (!('getRouteObjects' in routeResolutionsApi)) {\n throw new Error('Unexpected route resolution API implementation');\n }\n const routeObjects = (\n routeResolutionsApi as RouteResolverProxy\n ).getRouteObjects();\n\n // If the app hasn't configured a sign-in page, we just continue as guest.\n if (!SignInPageComponent) {\n appIdentityProxy.setTarget(\n {\n getUserId: () => 'guest',\n getIdToken: async () => undefined,\n getProfile: () => ({\n email: 'guest@example.com',\n displayName: 'Guest',\n }),\n getProfileInfo: async () => ({\n email: 'guest@example.com',\n displayName: 'Guest',\n }),\n getBackstageIdentity: async () => ({\n type: 'user',\n userEntityRef: 'user:default/guest',\n ownershipEntityRefs: ['user:default/guest'],\n }),\n getCredentials: async () => ({}),\n signOut: async () => {},\n },\n { signOutTargetUrl: basePath || '/' },\n );\n\n return (\n <RouterComponent>\n {...extraElements}\n <RouteTracker routeObjects={routeObjects} />\n {children}\n </RouterComponent>\n );\n }\n\n return (\n <RouterComponent>\n {...extraElements}\n <RouteTracker routeObjects={routeObjects} />\n <SignInPageWrapper\n component={SignInPageComponent}\n appIdentityProxy={appIdentityProxy}\n >\n {children}\n </SignInPageWrapper>\n </RouterComponent>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;AAsDO,MAAM,UAAU,eAAA,CAAgB;AAAA,EACrC,IAAA,EAAM,MAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,KAAA,EAAO,OAAO,MAAA,EAAO;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,MAAM,YAAA,GACJ,oBACA,eAAA,EAAgB;AAGlB,EAAA,IAAI,CAAC,mBAAA,EAAqB;AACxB,IAAA,gBAAA,CAAiB,SAAA;AAAA,MACf;AAAA,QACE,WAAW,MAAM,OAAA;AAAA,QACjB,YAAY,YAAY,MAAA;AAAA,QACxB,YAAY,OAAO;AAAA,UACjB,KAAA,EAAO,mBAAA;AAAA,UACP,WAAA,EAAa;AAAA,SACf,CAAA;AAAA,QACA,gBAAgB,aAAa;AAAA,UAC3B,KAAA,EAAO,mBAAA;AAAA,UACP,WAAA,EAAa;AAAA,SACf,CAAA;AAAA,QACA,sBAAsB,aAAa;AAAA,UACjC,IAAA,EAAM,MAAA;AAAA,UACN,aAAA,EAAe,oBAAA;AAAA,UACf,mBAAA,EAAqB,CAAC,oBAAoB;AAAA,SAC5C,CAAA;AAAA,QACA,cAAA,EAAgB,aAAa,EAAC,CAAA;AAAA,QAC9B,SAAS,YAAY;AAAA,QAAC;AAAA,OACxB;AAAA,MACA,EAAE,gBAAA,EAAkB,QAAA,IAAY,GAAA;AAAI,KACtC;AAEA,IAAA,4BACG,eAAA,EAAA,EACE,QAAA,EAAA;AAAA,MAAA,GAAG,aAAA;AAAA,sBACJ,GAAA,CAAC,gBAAa,YAAA,EAA4B,CAAA;AAAA,MACzC;AAAA,KAAA,EACH,CAAA;AAAA,EAEJ;AAEA,EAAA,4BACG,eAAA,EAAA,EACE,QAAA,EAAA;AAAA,IAAA,GAAG,aAAA;AAAA,oBACJ,GAAA,CAAC,gBAAa,YAAA,EAA4B,CAAA;AAAA,oBAC1C,GAAA;AAAA,MAAC,iBAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,mBAAA;AAAA,QACX,gBAAA;AAAA,QAEC;AAAA;AAAA;AACH,GAAA,EACF,CAAA;AAEJ;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { createExtension, createExtensionInput, coreExtensionData, NotFoundErrorPage } from '@backstage/frontend-plugin-api';
2
+ import { createExtension, coreExtensionData, createExtensionInput, NotFoundErrorPage } from '@backstage/frontend-plugin-api';
3
3
  import { useRoutes } from 'react-router-dom';
4
4
 
5
5
  const AppRoutes = createExtension({
@@ -1 +1 @@
1
- {"version":3,"file":"AppRoutes.esm.js","sources":["../../src/extensions/AppRoutes.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 {\n createExtension,\n coreExtensionData,\n createExtensionInput,\n NotFoundErrorPage,\n} from '@backstage/frontend-plugin-api';\nimport { useRoutes } from 'react-router-dom';\n\nexport const AppRoutes = createExtension({\n name: 'routes',\n attachTo: { id: 'app/layout', input: 'content' },\n inputs: {\n routes: createExtensionInput([\n coreExtensionData.routePath,\n coreExtensionData.routeRef.optional(),\n coreExtensionData.reactElement,\n ]),\n },\n output: [coreExtensionData.reactElement],\n factory({ inputs }) {\n const Routes = () => {\n const element = useRoutes([\n ...inputs.routes.map(route => ({\n path: `${route\n .get(coreExtensionData.routePath)\n .replace(/\\/$/, '')}/*`,\n element: route.get(coreExtensionData.reactElement),\n })),\n {\n path: '*',\n element: <NotFoundErrorPage />,\n },\n ]);\n\n return element;\n };\n\n return [coreExtensionData.reactElement(<Routes />)];\n },\n});\n"],"names":[],"mappings":";;;;AAwBO,MAAM,YAAY,eAAgB,CAAA;AAAA,EACvC,IAAM,EAAA,QAAA;AAAA,EACN,QAAU,EAAA,EAAE,EAAI,EAAA,YAAA,EAAc,OAAO,SAAU,EAAA;AAAA,EAC/C,MAAQ,EAAA;AAAA,IACN,QAAQ,oBAAqB,CAAA;AAAA,MAC3B,iBAAkB,CAAA,SAAA;AAAA,MAClB,iBAAA,CAAkB,SAAS,QAAS,EAAA;AAAA,MACpC,iBAAkB,CAAA;AAAA,KACnB;AAAA,GACH;AAAA,EACA,MAAA,EAAQ,CAAC,iBAAA,CAAkB,YAAY,CAAA;AAAA,EACvC,OAAA,CAAQ,EAAE,MAAA,EAAU,EAAA;AAClB,IAAA,MAAM,SAAS,MAAM;AACnB,MAAA,MAAM,UAAU,SAAU,CAAA;AAAA,QACxB,GAAG,MAAA,CAAO,MAAO,CAAA,GAAA,CAAI,CAAU,KAAA,MAAA;AAAA,UAC7B,IAAA,EAAM,CAAG,EAAA,KAAA,CACN,GAAI,CAAA,iBAAA,CAAkB,SAAS,CAC/B,CAAA,OAAA,CAAQ,KAAO,EAAA,EAAE,CAAC,CAAA,EAAA,CAAA;AAAA,UACrB,OAAS,EAAA,KAAA,CAAM,GAAI,CAAA,iBAAA,CAAkB,YAAY;AAAA,SACjD,CAAA,CAAA;AAAA,QACF;AAAA,UACE,IAAM,EAAA,GAAA;AAAA,UACN,OAAA,sBAAU,iBAAkB,EAAA,EAAA;AAAA;AAC9B,OACD,CAAA;AAED,MAAO,OAAA,OAAA;AAAA,KACT;AAEA,IAAA,OAAO,CAAC,iBAAkB,CAAA,YAAA,iBAAc,GAAA,CAAA,MAAA,EAAA,EAAO,CAAE,CAAC,CAAA;AAAA;AAEtD,CAAC;;;;"}
1
+ {"version":3,"file":"AppRoutes.esm.js","sources":["../../src/extensions/AppRoutes.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 {\n createExtension,\n coreExtensionData,\n createExtensionInput,\n NotFoundErrorPage,\n} from '@backstage/frontend-plugin-api';\nimport { useRoutes } from 'react-router-dom';\n\nexport const AppRoutes = createExtension({\n name: 'routes',\n attachTo: { id: 'app/layout', input: 'content' },\n inputs: {\n routes: createExtensionInput([\n coreExtensionData.routePath,\n coreExtensionData.routeRef.optional(),\n coreExtensionData.reactElement,\n ]),\n },\n output: [coreExtensionData.reactElement],\n factory({ inputs }) {\n const Routes = () => {\n const element = useRoutes([\n ...inputs.routes.map(route => ({\n path: `${route\n .get(coreExtensionData.routePath)\n .replace(/\\/$/, '')}/*`,\n element: route.get(coreExtensionData.reactElement),\n })),\n {\n path: '*',\n element: <NotFoundErrorPage />,\n },\n ]);\n\n return element;\n };\n\n return [coreExtensionData.reactElement(<Routes />)];\n },\n});\n"],"names":[],"mappings":";;;;AAwBO,MAAM,YAAY,eAAA,CAAgB;AAAA,EACvC,IAAA,EAAM,QAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,YAAA,EAAc,OAAO,SAAA,EAAU;AAAA,EAC/C,MAAA,EAAQ;AAAA,IACN,QAAQ,oBAAA,CAAqB;AAAA,MAC3B,iBAAA,CAAkB,SAAA;AAAA,MAClB,iBAAA,CAAkB,SAAS,QAAA,EAAS;AAAA,MACpC,iBAAA,CAAkB;AAAA,KACnB;AAAA,GACH;AAAA,EACA,MAAA,EAAQ,CAAC,iBAAA,CAAkB,YAAY,CAAA;AAAA,EACvC,OAAA,CAAQ,EAAE,MAAA,EAAO,EAAG;AAClB,IAAA,MAAM,SAAS,MAAM;AACnB,MAAA,MAAM,UAAU,SAAA,CAAU;AAAA,QACxB,GAAG,MAAA,CAAO,MAAA,CAAO,GAAA,CAAI,CAAA,KAAA,MAAU;AAAA,UAC7B,IAAA,EAAM,CAAA,EAAG,KAAA,CACN,GAAA,CAAI,iBAAA,CAAkB,SAAS,CAAA,CAC/B,OAAA,CAAQ,KAAA,EAAO,EAAE,CAAC,CAAA,EAAA,CAAA;AAAA,UACrB,OAAA,EAAS,KAAA,CAAM,GAAA,CAAI,iBAAA,CAAkB,YAAY;AAAA,SACnD,CAAE,CAAA;AAAA,QACF;AAAA,UACE,IAAA,EAAM,GAAA;AAAA,UACN,OAAA,sBAAU,iBAAA,EAAA,EAAkB;AAAA;AAC9B,OACD,CAAA;AAED,MAAA,OAAO,OAAA;AAAA,IACT,CAAA;AAEA,IAAA,OAAO,CAAC,iBAAA,CAAkB,YAAA,iBAAa,GAAA,CAAC,MAAA,EAAA,EAAO,CAAE,CAAC,CAAA;AAAA,EACpD;AACF,CAAC;;;;"}
@@ -2,7 +2,7 @@ import { jsx } from 'react/jsx-runtime';
2
2
  import { UnifiedThemeProvider, themes } from '@backstage/theme';
3
3
  import DarkIcon from '@material-ui/icons/Brightness2';
4
4
  import LightIcon from '@material-ui/icons/WbSunny';
5
- import { ApiBlueprint, createExtensionInput, ThemeBlueprint, appThemeApiRef } from '@backstage/frontend-plugin-api';
5
+ import { ApiBlueprint, createExtensionInput, appThemeApiRef, ThemeBlueprint } from '@backstage/frontend-plugin-api';
6
6
  import 'zen-observable';
7
7
  import '@backstage/core-plugin-api';
8
8
  import '../packages/core-app-api/src/apis/implementations/auth/saml/types.esm.js';
@@ -1 +1 @@
1
- {"version":3,"file":"AppThemeApi.esm.js","sources":["../../src/extensions/AppThemeApi.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 UnifiedThemeProvider,\n themes as builtinThemes,\n} from '@backstage/theme';\nimport DarkIcon from '@material-ui/icons/Brightness2';\nimport LightIcon from '@material-ui/icons/WbSunny';\nimport {\n createExtensionInput,\n ThemeBlueprint,\n ApiBlueprint,\n appThemeApiRef,\n} from '@backstage/frontend-plugin-api';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { AppThemeSelector } from '../../../../packages/core-app-api/src/apis/implementations';\n\n/**\n * Contains the themes installed into the app.\n */\nexport const AppThemeApi = ApiBlueprint.makeWithOverrides({\n name: 'app-theme',\n inputs: {\n themes: createExtensionInput([ThemeBlueprint.dataRefs.theme], {\n replaces: [{ id: 'app', input: 'themes' }],\n }),\n },\n factory: (originalFactory, { inputs }) => {\n return originalFactory(defineParams =>\n defineParams({\n api: appThemeApiRef,\n deps: {},\n factory: () =>\n AppThemeSelector.createWithStorage(\n inputs.themes.map(i => i.get(ThemeBlueprint.dataRefs.theme)),\n ),\n }),\n );\n },\n});\n\nexport const LightTheme = ThemeBlueprint.make({\n name: 'light',\n params: {\n theme: {\n id: 'light',\n title: 'Light Theme',\n variant: 'light',\n icon: <LightIcon />,\n Provider: ({ children }) => (\n <UnifiedThemeProvider theme={builtinThemes.light} children={children} />\n ),\n },\n },\n});\n\nexport const DarkTheme = ThemeBlueprint.make({\n name: 'dark',\n params: {\n theme: {\n id: 'dark',\n title: 'Dark Theme',\n variant: 'dark',\n icon: <DarkIcon />,\n Provider: ({ children }) => (\n <UnifiedThemeProvider theme={builtinThemes.dark} children={children} />\n ),\n },\n },\n});\n"],"names":["builtinThemes"],"mappings":";;;;;;;;;;;AAkCa,MAAA,WAAA,GAAc,aAAa,iBAAkB,CAAA;AAAA,EACxD,IAAM,EAAA,WAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,QAAQ,oBAAqB,CAAA,CAAC,cAAe,CAAA,QAAA,CAAS,KAAK,CAAG,EAAA;AAAA,MAC5D,UAAU,CAAC,EAAE,IAAI,KAAO,EAAA,KAAA,EAAO,UAAU;AAAA,KAC1C;AAAA,GACH;AAAA,EACA,OAAS,EAAA,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emeApi.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 UnifiedThemeProvider,\n themes as builtinThemes,\n} from '@backstage/theme';\nimport DarkIcon from '@material-ui/icons/Brightness2';\nimport LightIcon from '@material-ui/icons/WbSunny';\nimport {\n createExtensionInput,\n ThemeBlueprint,\n ApiBlueprint,\n appThemeApiRef,\n} from '@backstage/frontend-plugin-api';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { AppThemeSelector } from '../../../../packages/core-app-api/src/apis/implementations';\n\n/**\n * Contains the themes installed into the app.\n */\nexport const AppThemeApi = ApiBlueprint.makeWithOverrides({\n name: 'app-theme',\n inputs: {\n themes: createExtensionInput([ThemeBlueprint.dataRefs.theme], {\n replaces: [{ id: 'app', input: 'themes' }],\n }),\n },\n factory: (originalFactory, { inputs }) => {\n return originalFactory(defineParams =>\n defineParams({\n api: appThemeApiRef,\n deps: {},\n factory: () =>\n AppThemeSelector.createWithStorage(\n inputs.themes.map(i => i.get(ThemeBlueprint.dataRefs.theme)),\n ),\n }),\n );\n },\n});\n\nexport const LightTheme = ThemeBlueprint.make({\n name: 'light',\n params: {\n theme: {\n id: 'light',\n title: 'Light Theme',\n variant: 'light',\n icon: <LightIcon />,\n Provider: ({ children }) => (\n <UnifiedThemeProvider theme={builtinThemes.light} children={children} />\n ),\n },\n },\n});\n\nexport const DarkTheme = ThemeBlueprint.make({\n name: 'dark',\n params: {\n theme: {\n id: 'dark',\n title: 'Dark Theme',\n variant: 'dark',\n icon: <DarkIcon />,\n Provider: ({ children }) => (\n <U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N,MAAA,EAAQ;AAAA,IACN,KAAA,EAAO;AAAA,MACL,EAAA,EAAI,MAAA;AAAA,MACJ,KAAA,EAAO,YAAA;AAAA,MACP,OAAA,EAAS,MAAA;AAAA,MACT,IAAA,sBAAO,QAAA,EAAA,EAAS,CAAA;AAAA,MAChB,QAAA,EAAU,CAAC,EAAE,QAAA,EAAS,yBACnB,oBAAA,EAAA,EAAqB,KAAA,EAAOA,MAAA,CAAc,IAAA,EAAM,QAAA,EAAoB;AAAA;AAEzE;AAEJ,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultSignInPage.esm.js","sources":["../../src/extensions/DefaultSignInPage.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 */\nimport { SignInPageBlueprint } from '@backstage/frontend-plugin-api';\nimport { SignInPage } from '@backstage/core-components';\n\nexport const DefaultSignInPage = SignInPageBlueprint.make({\n params: {\n loader: async () => props =>\n <SignInPage {...props} providers={['guest']} />,\n },\n});\n"],"names":[],"mappings":";;;;AAkBa,MAAA,iBAAA,GAAoB,oBAAoB,IAAK,CAAA;AAAA,EACxD,MAAQ,EAAA;AAAA,IACN,MAAA,EAAQ,YAAY,CAAA,KAAA,qBACjB,GAAA,CAAA,UAAA,EAAA,EAAY,GAAG,KAAO,EAAA,SAAA,EAAW,CAAC,OAAO,CAAG,EAAA;AAAA;AAEnD,CAAC;;;;"}
1
+ {"version":3,"file":"DefaultSignInPage.esm.js","sources":["../../src/extensions/DefaultSignInPage.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 */\nimport { SignInPageBlueprint } from '@backstage/frontend-plugin-api';\nimport { SignInPage } from '@backstage/core-components';\n\nexport const DefaultSignInPage = SignInPageBlueprint.make({\n params: {\n loader: async () => props =>\n <SignInPage {...props} providers={['guest']} />,\n },\n});\n"],"names":[],"mappings":";;;;AAkBO,MAAM,iBAAA,GAAoB,oBAAoB,IAAA,CAAK;AAAA,EACxD,MAAA,EAAQ;AAAA,IACN,MAAA,EAAQ,YAAY,CAAA,KAAA,qBAClB,GAAA,CAAC,UAAA,EAAA,EAAY,GAAG,KAAA,EAAO,SAAA,EAAW,CAAC,OAAO,CAAA,EAAG;AAAA;AAEnD,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogDisplay.esm.js","sources":["../../src/extensions/DialogDisplay.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 { Fragment, useEffect, useState } from 'react';\nimport {\n AppRootElementBlueprint,\n DialogApi,\n DialogApiDialog,\n dialogApiRef,\n} from '@backstage/frontend-plugin-api';\nimport { createDeferred } from '@backstage/types';\nimport { OnShowDialog } from '../apis/DefaultDialogApi';\nimport Dialog from '@material-ui/core/Dialog';\n\nlet dialogId = 0;\nfunction getDialogId() {\n dialogId += 1;\n return dialogId.toString(36);\n}\n\ntype DialogState = DialogApiDialog<unknown> & {\n id: string;\n modal: boolean;\n};\n\n/**\n * The other half of the default implementation of the {@link DialogApi}.\n *\n * This component is responsible for rendering the dialogs in the React tree and managing a stack of dialogs.\n * It expects the implementation of the {@link DialogApi} to be the `DefaultDialogApi`. If one is replaced the other must be too.\n * @internal\n */\nfunction DialogDisplay({\n dialogApi,\n}: {\n dialogApi: DialogApi & { connect(onShow: OnShowDialog): void };\n}) {\n const [dialogs, setDialogs] = useState<\n { dialog: DialogState; element: React.JSX.Element }[]\n >([]);\n\n useEffect(() => {\n dialogApi.connect(options => {\n const id = getDialogId();\n const deferred = createDeferred<unknown>();\n const dialog: DialogState = {\n id,\n modal: options.modal,\n close(result) {\n deferred.resolve(result);\n setDialogs(ds => ds.filter(d => d.dialog.id !== id));\n },\n update(ElementOrComponent) {\n const element =\n typeof ElementOrComponent === 'function' ? (\n <ElementOrComponent dialog={dialog} />\n ) : (\n ElementOrComponent\n );\n setDialogs(ds =>\n ds.map(d => (d.dialog.id === id ? { dialog, element } : d)),\n );\n },\n async result() {\n return deferred;\n },\n };\n const element = <options.component dialog={dialog} />;\n setDialogs(ds => [...ds, { dialog, element }]);\n return dialog;\n });\n }, [dialogApi]);\n\n if (dialogs.length > 0) {\n const lastDialog = dialogs[dialogs.length - 1];\n return (\n <Dialog\n open\n onClose={() => {\n if (!lastDialog.dialog.modal) {\n lastDialog.dialog.close();\n }\n }}\n >\n {lastDialog.element}\n </Dialog>\n );\n }\n\n return null;\n}\n\nexport const dialogDisplayAppRootElement =\n AppRootElementBlueprint.makeWithOverrides({\n name: 'dialog-display',\n factory(originalFactory, { apis }) {\n const dialogApi = apis.get(dialogApiRef);\n if (!isInternalDialogApi(dialogApi)) {\n return originalFactory({\n element: <Fragment />,\n });\n }\n return originalFactory({\n element: <DialogDisplay dialogApi={dialogApi} />,\n });\n },\n });\n\nfunction isInternalDialogApi(\n dialogApi?: DialogApi,\n): dialogApi is DialogApi & { connect(onShow: OnShowDialog): void } {\n if (!dialogApi) {\n return false;\n }\n return 'connect' in dialogApi;\n}\n"],"names":["element"],"mappings":";;;;;;AA2BA,IAAI,QAAW,GAAA,CAAA;AACf,SAAS,WAAc,GAAA;AACrB,EAAY,QAAA,IAAA,CAAA;AACZ,EAAO,OAAA,QAAA,CAAS,SAAS,EAAE,CAAA;AAC7B;AAcA,SAAS,aAAc,CAAA;AAAA,EACrB;AACF,CAEG,EAAA;AACD,EAAA,MAAM,CAAC,OAAS,EAAA,UAAU,CAAI,GAAA,QAAA,CAE5B,EAAE,CAAA;AAEJ,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,SAAA,CAAU,QAAQ,CAAW,OAAA,KAAA;AAC3B,MAAA,MAAM,KAAK,WAAY,EAAA;AACvB,MAAA,MAAM,WAAW,cAAwB,EAAA;AACzC,MAAA,MAAM,MAAsB,GAAA;AAAA,QAC1B,EAAA;AAAA,QACA,OAAO,OAAQ,CAAA,KAAA;AAAA,QACf,MAAM,MAAQ,EAAA;AACZ,UAAA,QAAA,CAAS,QAAQ,MAAM,CAAA;AACvB,UAAW,UAAA,CAAA,CAAA,EAAA,KAAM,GAAG,MAAO,CAAA,CAAA,CAAA,KAAK,EAAE,MAAO,CAAA,EAAA,KAAO,EAAE,CAAC,CAAA;AAAA,SACrD;AAAA,QACA,OAAO,kBAAoB,EAAA;AACzB,UAAA,MAAMA,WACJ,OAAO,kBAAA,KAAuB,6BAC3B,GAAA,CAAA,kBAAA,EAAA,EAAmB,QAAgB,CAEpC,GAAA,kBAAA;AAEJ,UAAA,UAAA;AAAA,YAAW,CACT,EAAA,KAAA,EAAA,CAAG,GAAI,CAAA,CAAA,CAAA,KAAM,CAAE,CAAA,MAAA,CAAO,EAAO,KAAA,EAAA,GAAK,EAAE,MAAA,EAAQ,OAAAA,EAAAA,QAAAA,KAAY,CAAE;AAAA,WAC5D;AAAA,SACF;AAAA,QACA,MA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AAc,SAAsB,EAAA;AAAA,KAC/C,CAAA;AAAA;AAEL,CAAC;AAEH,SAAS,oBACP,SACkE,EAAA;AAClE,EAAA,IAAI,CAAC,SAAW,EAAA;AACd,IAAO,OAAA,KAAA;AAAA;AAET,EAAA,OAAO,SAAa,IAAA,SAAA;AACtB;;;;"}
1
+ {"version":3,"file":"DialogDisplay.esm.js","sources":["../../src/extensions/DialogDisplay.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 { Fragment, useEffect, useState } from 'react';\nimport {\n AppRootElementBlueprint,\n DialogApi,\n DialogApiDialog,\n dialogApiRef,\n} from '@backstage/frontend-plugin-api';\nimport { createDeferred } from '@backstage/types';\nimport { OnShowDialog } from '../apis/DefaultDialogApi';\nimport Dialog from '@material-ui/core/Dialog';\n\nlet dialogId = 0;\nfunction getDialogId() {\n dialogId += 1;\n return dialogId.toString(36);\n}\n\ntype DialogState = DialogApiDialog<unknown> & {\n id: string;\n modal: boolean;\n};\n\n/**\n * The other half of the default implementation of the {@link DialogApi}.\n *\n * This component is responsible for rendering the dialogs in the React tree and managing a stack of dialogs.\n * It expects the implementation of the {@link DialogApi} to be the `DefaultDialogApi`. If one is replaced the other must be too.\n * @internal\n */\nfunction DialogDisplay({\n dialogApi,\n}: {\n dialogApi: DialogApi & { connect(onShow: OnShowDialog): void };\n}) {\n const [dialogs, setDialogs] = useState<\n { dialog: DialogState; element: React.JSX.Element }[]\n >([]);\n\n useEffect(() => {\n dialogApi.connect(options => {\n const id = getDialogId();\n const deferred = createDeferred<unknown>();\n const dialog: DialogState = {\n id,\n modal: options.modal,\n close(result) {\n deferred.resolve(result);\n setDialogs(ds => ds.filter(d => d.dialog.id !== id));\n },\n update(ElementOrComponent) {\n const element =\n typeof ElementOrComponent === 'function' ? (\n <ElementOrComponent dialog={dialog} />\n ) : (\n ElementOrComponent\n );\n setDialogs(ds =>\n ds.map(d => (d.dialog.id === id ? { dialog, element } : d)),\n );\n },\n async result() {\n return deferred;\n },\n };\n const element = <options.component dialog={dialog} />;\n setDialogs(ds => [...ds, { dialog, element }]);\n return dialog;\n });\n }, [dialogApi]);\n\n if (dialogs.length > 0) {\n const lastDialog = dialogs[dialogs.length - 1];\n return (\n <Dialog\n open\n onClose={() => {\n if (!lastDialog.dialog.modal) {\n lastDialog.dialog.close();\n }\n }}\n >\n {lastDialog.element}\n </Dialog>\n );\n }\n\n return null;\n}\n\nexport const dialogDisplayAppRootElement =\n AppRootElementBlueprint.makeWithOverrides({\n name: 'dialog-display',\n factory(originalFactory, { apis }) {\n const dialogApi = apis.get(dialogApiRef);\n if (!isInternalDialogApi(dialogApi)) {\n return originalFactory({\n element: <Fragment />,\n });\n }\n return originalFactory({\n element: <DialogDisplay dialogApi={dialogApi} />,\n });\n },\n });\n\nfunction isInternalDialogApi(\n dialogApi?: DialogApi,\n): dialogApi is DialogApi & { connect(onShow: OnShowDialog): void } {\n if (!dialogApi) {\n return false;\n }\n return 'connect' in dialogApi;\n}\n"],"names":["element"],"mappings":";;;;;;AA2BA,IAAI,QAAA,GAAW,CAAA;AACf,SAAS,WAAA,GAAc;AACrB,EAAA,QAAA,IAAY,CAAA;AACZ,EAAA,OAAO,QAAA,CAAS,SAAS,EAAE,CAAA;AAC7B;AAcA,SAAS,aAAA,CAAc;AAAA,EACrB;AACF,CAAA,EAEG;AACD,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,QAAA,CAE5B,EAAE,CAAA;AAEJ,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,SAAA,CAAU,QAAQ,CAAA,OA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MAAA,GAAS,CAAC,CAAA;AAC7C,IAAA,uBACE,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAI,IAAA;AAAA,QACJ,SAAS,MAAM;AACb,UAAA,IAAI,CAAC,UAAA,CAAW,MAAA,CAAO,KAAA,EAAO;AAC5B,YAAA,UAAA,CAAW,OAAO,KAAA,EAAM;AAAA,UAC1B;AAAA,QACF,CAAA;AAAA,QAEC,QAAA,EAAA,UAAA,CAAW;AAAA;AAAA,KACd;AAAA,EAEJ;AAEA,EAAA,OAAO,IAAA;AACT;AAEO,MAAM,2BAAA,GACX,wBAAwB,iBAAA,CAAkB;AAAA,EACxC,IAAA,EAAM,gBAAA;AAAA,EACN,OAAA,CAAQ,eAAA,EAAiB,EAAE,IAAA,EAAK,EAAG;AACjC,IAAA,MAAM,SAAA,GAAY,IAAA,CAAK,GAAA,CAAI,YAAY,CAAA;AACvC,IAAA,IAAI,CAAC,mBAAA,CAAoB,SAAS,CAAA,EAAG;AACnC,MAAA,OAAO,eAAA,CAAgB;AAAA,QACrB,OAAA,sBAAU,QAAA,EAAA,EAAS;AAAA,OACpB,CAAA;AAAA,IACH;AACA,IAAA,OAAO,eAAA,CAAgB;AAAA,MACrB,OAAA,kBAAS,GAAA,CAAC,aAAA,EAAA,EAAc,SAAA,EAAsB;AAAA,KAC/C,CAAA;AAAA,EACH;AACF,CAAC;AAEH,SAAS,oBACP,SAAA,EACkE;AAClE,EAAA,IAAI,CAAC,SAAA,EAAW;AACd,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,OAAO,SAAA,IAAa,SAAA;AACtB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureFlagsApi.esm.js","sources":["../../src/extensions/FeatureFlagsApi.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 ApiBlueprint,\n featureFlagsApiRef,\n} from '@backstage/frontend-plugin-api';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { LocalStorageFeatureFlags } from '../../../../packages/core-app-api/src/apis/implementations/FeatureFlagsApi/LocalStorageFeatureFlags';\n\n/**\n * Contains the shareable icons installed into the app.\n */\nexport const FeatureFlagsApi = ApiBlueprint.make({\n name: 'feature-flags',\n params: defineParams =>\n defineParams({\n // TODO: properly discovery feature flags, maybe rework the whole thing\n api: featureFlagsApiRef,\n deps: {},\n factory: () => new LocalStorageFeatureFlags(),\n }),\n});\n"],"names":[],"mappings":";;;AA0Ba,MAAA,eAAA,GAAkB,aAAa,IAAK,CAAA;AAAA,EAC/C,IAAM,EAAA,eAAA;AAAA,EACN,MAAA,EAAQ,kBACN,YAAa,CAAA;AAAA;AAAA,IAEX,GAAK,EAAA,kBAAA;AAAA,IACL,MAAM,EAAC;AAAA,IACP,OAAA,EAAS,MAAM,IAAI,wBAAyB;AAAA,GAC7C;AACL,CAAC;;;;"}
1
+ {"version":3,"file":"FeatureFlagsApi.esm.js","sources":["../../src/extensions/FeatureFlagsApi.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 ApiBlueprint,\n featureFlagsApiRef,\n} from '@backstage/frontend-plugin-api';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { LocalStorageFeatureFlags } from '../../../../packages/core-app-api/src/apis/implementations/FeatureFlagsApi/LocalStorageFeatureFlags';\n\n/**\n * Contains the shareable icons installed into the app.\n */\nexport const FeatureFlagsApi = ApiBlueprint.make({\n name: 'feature-flags',\n params: defineParams =>\n defineParams({\n // TODO: properly discovery feature flags, maybe rework the whole thing\n api: featureFlagsApiRef,\n deps: {},\n factory: () => new LocalStorageFeatureFlags(),\n }),\n});\n"],"names":[],"mappings":";;;AA0BO,MAAM,eAAA,GAAkB,aAAa,IAAA,CAAK;AAAA,EAC/C,IAAA,EAAM,eAAA;AAAA,EACN,MAAA,EAAQ,kBACN,YAAA,CAAa;AAAA;AAAA,IAEX,GAAA,EAAK,kBAAA;AAAA,IACL,MAAM,EAAC;AAAA,IACP,OAAA,EAAS,MAAM,IAAI,wBAAA;AAAyB,GAC7C;AACL,CAAC;;;;"}