@backstage/plugin-app 0.2.0-next.1 → 0.2.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 (108) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +1 -7
  3. package/dist/alpha/appModulePublicSignIn.esm.js.map +1 -1
  4. package/dist/apis/DefaultDialogApi.esm.js.map +1 -1
  5. package/dist/apis/SwappableComponentsApi/DefaultSwappableComponentsApi.esm.js +40 -0
  6. package/dist/apis/SwappableComponentsApi/DefaultSwappableComponentsApi.esm.js.map +1 -0
  7. package/dist/defaultApis.esm.js +3 -3
  8. package/dist/defaultApis.esm.js.map +1 -1
  9. package/dist/extensions/AnalyticsApi.esm.js.map +1 -1
  10. package/dist/extensions/App.esm.js +1 -1
  11. package/dist/extensions/App.esm.js.map +1 -1
  12. package/dist/extensions/AppLanguageApi.esm.js.map +1 -1
  13. package/dist/extensions/AppLayout.esm.js +1 -1
  14. package/dist/extensions/AppLayout.esm.js.map +1 -1
  15. package/dist/extensions/AppNav.esm.js +1 -1
  16. package/dist/extensions/AppNav.esm.js.map +1 -1
  17. package/dist/extensions/AppRoot.esm.js +1 -1
  18. package/dist/extensions/AppRoot.esm.js.map +1 -1
  19. package/dist/extensions/AppRoutes.esm.js +1 -4
  20. package/dist/extensions/AppRoutes.esm.js.map +1 -1
  21. package/dist/extensions/AppThemeApi.esm.js +1 -1
  22. package/dist/extensions/AppThemeApi.esm.js.map +1 -1
  23. package/dist/extensions/DefaultSignInPage.esm.js.map +1 -1
  24. package/dist/extensions/DialogDisplay.esm.js.map +1 -1
  25. package/dist/extensions/FeatureFlagsApi.esm.js.map +1 -1
  26. package/dist/extensions/IconsApi.esm.js +1 -1
  27. package/dist/extensions/IconsApi.esm.js.map +1 -1
  28. package/dist/extensions/LegacyComponentsApi.esm.js +26 -0
  29. package/dist/extensions/LegacyComponentsApi.esm.js.map +1 -0
  30. package/dist/extensions/SwappableComponentsApi.esm.js +40 -0
  31. package/dist/extensions/SwappableComponentsApi.esm.js.map +1 -0
  32. package/dist/extensions/TranslationsApi.esm.js +1 -1
  33. package/dist/extensions/TranslationsApi.esm.js.map +1 -1
  34. package/dist/extensions/components.esm.js +21 -43
  35. package/dist/extensions/components.esm.js.map +1 -1
  36. package/dist/extensions/elements.esm.js.map +1 -1
  37. package/dist/index.d.ts +87 -12
  38. package/dist/packages/app-defaults/src/defaults/apis.esm.js +2 -2
  39. package/dist/packages/app-defaults/src/defaults/apis.esm.js.map +1 -1
  40. package/dist/packages/app-defaults/src/defaults/icons.esm.js.map +1 -1
  41. package/dist/packages/core-app-api/src/apis/implementations/AlertApi/AlertApiForwarder.esm.js.map +1 -1
  42. package/dist/packages/core-app-api/src/apis/implementations/AppLanguageApi/AppLanguageSelector.esm.js.map +1 -1
  43. package/dist/packages/core-app-api/src/apis/implementations/AppThemeApi/AppThemeSelector.esm.js.map +1 -1
  44. package/dist/packages/core-app-api/src/apis/implementations/DiscoveryApi/UrlPatternDiscovery.esm.js.map +1 -1
  45. package/dist/packages/core-app-api/src/apis/implementations/ErrorApi/ErrorAlerter.esm.js.map +1 -1
  46. package/dist/packages/core-app-api/src/apis/implementations/ErrorApi/ErrorApiForwarder.esm.js.map +1 -1
  47. package/dist/packages/core-app-api/src/apis/implementations/ErrorApi/UnhandledErrorForwarder.esm.js.map +1 -1
  48. package/dist/packages/core-app-api/src/apis/implementations/FeatureFlagsApi/LocalStorageFeatureFlags.esm.js.map +1 -1
  49. package/dist/packages/core-app-api/src/apis/implementations/FetchApi/FetchMiddlewares.esm.js.map +1 -1
  50. package/dist/packages/core-app-api/src/apis/implementations/FetchApi/IdentityAuthInjectorFetchMiddleware.esm.js.map +1 -1
  51. package/dist/packages/core-app-api/src/apis/implementations/FetchApi/PluginProtocolResolverFetchMiddleware.esm.js.map +1 -1
  52. package/dist/packages/core-app-api/src/apis/implementations/FetchApi/createFetchApi.esm.js.map +1 -1
  53. package/dist/packages/core-app-api/src/apis/implementations/OAuthRequestApi/OAuthPendingRequests.esm.js.map +1 -1
  54. package/dist/packages/core-app-api/src/apis/implementations/OAuthRequestApi/OAuthRequestManager.esm.js.map +1 -1
  55. package/dist/packages/core-app-api/src/apis/implementations/StorageApi/WebStorage.esm.js.map +1 -1
  56. package/dist/packages/core-app-api/src/apis/implementations/TranslationApi/I18nextTranslationApi.esm.js.map +1 -1
  57. package/dist/packages/core-app-api/src/apis/implementations/auth/atlassian/AtlassianAuth.esm.js.map +1 -1
  58. package/dist/packages/core-app-api/src/apis/implementations/auth/bitbucket/BitbucketAuth.esm.js.map +1 -1
  59. package/dist/packages/core-app-api/src/apis/implementations/auth/bitbucketServer/BitbucketServerAuth.esm.js.map +1 -1
  60. package/dist/packages/core-app-api/src/apis/implementations/auth/github/GithubAuth.esm.js.map +1 -1
  61. package/dist/packages/core-app-api/src/apis/implementations/auth/gitlab/GitlabAuth.esm.js.map +1 -1
  62. package/dist/packages/core-app-api/src/apis/implementations/auth/google/GoogleAuth.esm.js.map +1 -1
  63. package/dist/packages/core-app-api/src/apis/implementations/auth/microsoft/MicrosoftAuth.esm.js.map +1 -1
  64. package/dist/packages/core-app-api/src/apis/implementations/auth/oauth2/OAuth2.esm.js.map +1 -1
  65. package/dist/packages/core-app-api/src/apis/implementations/auth/okta/OktaAuth.esm.js.map +1 -1
  66. package/dist/packages/core-app-api/src/apis/implementations/auth/onelogin/OneLoginAuth.esm.js.map +1 -1
  67. package/dist/packages/core-app-api/src/apis/implementations/auth/saml/types.esm.js.map +1 -1
  68. package/dist/packages/core-app-api/src/apis/implementations/auth/vmwareCloud/VMwareCloudAuth.esm.js.map +1 -1
  69. package/dist/packages/core-app-api/src/apis/system/ApiAggregator.esm.js.map +1 -1
  70. package/dist/packages/core-app-api/src/apis/system/ApiProvider.esm.js.map +1 -1
  71. package/dist/packages/core-app-api/src/app/AppRouter.esm.js.map +1 -1
  72. package/dist/packages/core-app-api/src/app/AppThemeProvider.esm.js.map +1 -1
  73. package/dist/packages/core-app-api/src/app/InternalAppContext.esm.js.map +1 -1
  74. package/dist/packages/core-app-api/src/app/isProtectedApp.esm.js.map +1 -1
  75. package/dist/packages/core-app-api/src/app/isReactRouterBeta.esm.js.map +1 -1
  76. package/dist/packages/core-app-api/src/lib/AuthConnector/DefaultAuthConnector.esm.js.map +1 -1
  77. package/dist/packages/core-app-api/src/lib/AuthSessionManager/RefreshingAuthSessionManager.esm.js.map +1 -1
  78. package/dist/packages/core-app-api/src/lib/AuthSessionManager/SessionStateTracker.esm.js.map +1 -1
  79. package/dist/packages/core-app-api/src/lib/AuthSessionManager/common.esm.js.map +1 -1
  80. package/dist/packages/core-app-api/src/lib/loginPopup.esm.js.map +1 -1
  81. package/dist/packages/core-app-api/src/lib/subjects.esm.js.map +1 -1
  82. package/dist/packages/core-app-api/src/routing/FeatureFlagged.esm.js.map +1 -1
  83. package/dist/packages/core-app-api/src/routing/FlatRoutes.esm.js.map +1 -1
  84. package/dist/packages/core-app-api/src/routing/RouteTracker.esm.js.map +1 -1
  85. package/dist/packages/core-plugin-api/src/translation/TranslationRef.esm.js.map +1 -1
  86. package/dist/packages/core-plugin-api/src/translation/TranslationResource.esm.js.map +1 -1
  87. package/dist/packages/frontend-app-api/src/apis/implementations/IconsApi/DefaultIconsApi.esm.js.map +1 -1
  88. package/dist/packages/frontend-app-api/src/routing/RouteTracker.esm.js.map +1 -1
  89. package/dist/packages/frontend-app-api/src/routing/getBasePath.esm.js.map +1 -1
  90. package/dist/packages/frontend-internal/src/wiring/InternalExtensionDefinition.esm.js +7 -0
  91. package/dist/packages/frontend-internal/src/wiring/InternalExtensionDefinition.esm.js.map +1 -0
  92. package/dist/packages/frontend-internal/src/wiring/InternalFrontendPlugin.esm.js +7 -0
  93. package/dist/packages/frontend-internal/src/wiring/InternalFrontendPlugin.esm.js.map +1 -0
  94. package/dist/packages/frontend-internal/src/wiring/InternalSwappableComponentRef.esm.js +9 -0
  95. package/dist/packages/frontend-internal/src/wiring/InternalSwappableComponentRef.esm.js.map +1 -0
  96. package/dist/packages/opaque-internal/src/OpaqueType.esm.js +103 -0
  97. package/dist/packages/opaque-internal/src/OpaqueType.esm.js.map +1 -0
  98. package/dist/plugin.esm.js +9 -7
  99. package/dist/plugin.esm.js.map +1 -1
  100. package/dist/plugins/app/package.json.esm.js +7 -5
  101. package/dist/plugins/app/package.json.esm.js.map +1 -1
  102. package/package.json +18 -16
  103. package/dist/extensions/ComponentsApi.esm.js +0 -28
  104. package/dist/extensions/ComponentsApi.esm.js.map +0 -1
  105. package/dist/packages/app-defaults/src/defaults/components.esm.js +0 -46
  106. package/dist/packages/app-defaults/src/defaults/components.esm.js.map +0 -1
  107. package/dist/packages/frontend-app-api/src/apis/implementations/ComponentsApi/DefaultComponentsApi.esm.js +0 -21
  108. package/dist/packages/frontend-app-api/src/apis/implementations/ComponentsApi/DefaultComponentsApi.esm.js.map +0 -1
@@ -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 & {\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,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AAA,SAAS,CAAG,EAAA;AACnC,MAAA,OAAO,eAAgB,CAAA;AAAA,QACrB,OAAA,sBAAU,QAAS,EAAA,EAAA;AAAA,OACpB,CAAA;AAAA;AAEH,IAAA,OAAO,eAAgB,CAAA;AAAA,MACrB,OAAA,kBAAU,GAAA,CAAA,aAAA,EAAA,EAAc,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;AAC7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
- {"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;;;;"}
@@ -1,4 +1,4 @@
1
- import { ApiBlueprint, createExtensionInput, IconBundleBlueprint, iconsApiRef } from '@backstage/frontend-plugin-api';
1
+ import { ApiBlueprint, createExtensionInput, iconsApiRef, IconBundleBlueprint } from '@backstage/frontend-plugin-api';
2
2
  import { DefaultIconsApi } from '../packages/frontend-app-api/src/apis/implementations/IconsApi/DefaultIconsApi.esm.js';
3
3
  import '../packages/app-defaults/src/defaults/apis.esm.js';
4
4
  import 'react/jsx-runtime';
@@ -1 +1 @@
1
- {"version":3,"file":"IconsApi.esm.js","sources":["../../src/extensions/IconsApi.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 createExtensionInput,\n IconBundleBlueprint,\n ApiBlueprint,\n iconsApiRef,\n} from '@backstage/frontend-plugin-api';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { DefaultIconsApi } from '../../../../packages/frontend-app-api/src/apis/implementations/IconsApi';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { icons as defaultIcons } from '../../../../packages/app-defaults/src/defaults';\n\n/**\n * Contains the shareable icons installed into the app.\n */\nexport const IconsApi = ApiBlueprint.makeWithOverrides({\n name: 'icons',\n inputs: {\n icons: createExtensionInput([IconBundleBlueprint.dataRefs.icons], {\n replaces: [{ id: 'app', input: 'icons' }],\n }),\n },\n factory: (originalFactory, { inputs }) => {\n return originalFactory(defineParams =>\n defineParams({\n api: iconsApiRef,\n deps: {},\n factory: () =>\n new DefaultIconsApi(\n inputs.icons\n .map(i => i.get(IconBundleBlueprint.dataRefs.icons))\n .reduce((acc, bundle) => ({ ...acc, ...bundle }), defaultIcons),\n ),\n }),\n );\n },\n});\n"],"names":["defaultIcons"],"mappings":";;;;;;;;;;;;AA8Ba,MAAA,QAAA,GAAW,aAAa,iBAAkB,CAAA;AAAA,EACrD,IAAM,EAAA,OAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,OAAO,oBAAqB,CAAA,CAAC,mBAAoB,CAAA,QAAA,CAAS,KAAK,CAAG,EAAA;AAAA,MAChE,UAAU,CAAC,EAAE,IAAI,KAAO,EAAA,KAAA,EAAO,SAAS;AAAA,KACzC;AAAA,GACH;AAAA,EACA,OAAS,EAAA,CAAC,eAAiB,EAAA,EAAE,QAAa,KAAA;AACxC,IAAO,OAAA,eAAA;AAAA,MAAgB,kBACrB,YAAa,CAAA;AAAA,QACX,GAAK,EAAA,WAAA;AAAA,QACL,MAAM,EAAC;AAAA,QACP,OAAA,EAAS,MACP,IAAI,eAAA;AAAA,UACF,MAAA,CAAO,MACJ,GAAI,CAAA,CAAA,CAAA,KAAK,EAAE,GAAI,CAAA,mBAAA,CAAoB,SAAS,KAAK,CAAC,EAClD,MAAO,CAAA,CAAC,KAAK,MAAY,MAAA,EAAE,GAAG,GAAK,EAAA,GAAG,MAAO,EAAA,CAAA,EAAIA,KAAY;AAAA;AAClE,OACH;AAAA,KACH;AAAA;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"IconsApi.esm.js","sources":["../../src/extensions/IconsApi.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 createExtensionInput,\n IconBundleBlueprint,\n ApiBlueprint,\n iconsApiRef,\n} from '@backstage/frontend-plugin-api';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { DefaultIconsApi } from '../../../../packages/frontend-app-api/src/apis/implementations/IconsApi';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { icons as defaultIcons } from '../../../../packages/app-defaults/src/defaults';\n\n/**\n * Contains the shareable icons installed into the app.\n */\nexport const IconsApi = ApiBlueprint.makeWithOverrides({\n name: 'icons',\n inputs: {\n icons: createExtensionInput([IconBundleBlueprint.dataRefs.icons], {\n replaces: [{ id: 'app', input: 'icons' }],\n }),\n },\n factory: (originalFactory, { inputs }) => {\n return originalFactory(defineParams =>\n defineParams({\n api: iconsApiRef,\n deps: {},\n factory: () =>\n new DefaultIconsApi(\n inputs.icons\n .map(i => i.get(IconBundleBlueprint.dataRefs.icons))\n .reduce((acc, bundle) => ({ ...acc, ...bundle }), defaultIcons),\n ),\n }),\n );\n },\n});\n"],"names":["defaultIcons"],"mappings":";;;;;;;;;;;;AA8BO,MAAM,QAAA,GAAW,aAAa,iBAAA,CAAkB;AAAA,EACrD,IAAA,EAAM,OAAA;AAAA,EACN,MAAA,EAAQ;AAAA,IACN,OAAO,oBAAA,CAAqB,CAAC,mBAAA,CAAoB,QAAA,CAAS,KAAK,CAAA,EAAG;AAAA,MAChE,UAAU,CAAC,EAAE,IAAI,KAAA,EAAO,KAAA,EAAO,SAAS;AAAA,KACzC;AAAA,GACH;AAAA,EACA,OAAA,EAAS,CAAC,eAAA,EAAiB,EAAE,QAAO,KAAM;AACxC,IAAA,OAAO,eAAA;AAAA,MAAgB,kBACrB,YAAA,CAAa;AAAA,QACX,GAAA,EAAK,WAAA;AAAA,QACL,MAAM,EAAC;AAAA,QACP,OAAA,EAAS,MACP,IAAI,eAAA;AAAA,UACF,MAAA,CAAO,MACJ,GAAA,CAAI,CAAA,CAAA,KAAK,EAAE,GAAA,CAAI,mBAAA,CAAoB,SAAS,KAAK,CAAC,EAClD,MAAA,CAAO,CAAC,KAAK,MAAA,MAAY,EAAE,GAAG,GAAA,EAAK,GAAG,MAAA,EAAO,CAAA,EAAIA,KAAY;AAAA;AAClE,OACH;AAAA,KACH;AAAA,EACF;AACF,CAAC;;;;"}
@@ -0,0 +1,26 @@
1
+ import { ApiBlueprint, createApiRef, Progress, NotFoundErrorPage, ErrorDisplay } from '@backstage/frontend-plugin-api';
2
+
3
+ const LegacyComponentsApi = ApiBlueprint.make({
4
+ name: "components",
5
+ params: (defineParams) => defineParams({
6
+ api: createApiRef({ id: "core.components" }),
7
+ deps: {},
8
+ factory: () => ({
9
+ getComponent(ref) {
10
+ if (ref.id === "core.components.progress") {
11
+ return Progress;
12
+ }
13
+ if (ref.id === "core.components.notFoundErrorPage") {
14
+ return NotFoundErrorPage;
15
+ }
16
+ if (ref.id === "core.components.errorBoundaryFallback") {
17
+ return ErrorDisplay;
18
+ }
19
+ throw new Error(`No implementation found for component ref ${ref}`);
20
+ }
21
+ })
22
+ })
23
+ });
24
+
25
+ export { LegacyComponentsApi };
26
+ //# sourceMappingURL=LegacyComponentsApi.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegacyComponentsApi.esm.js","sources":["../../src/extensions/LegacyComponentsApi.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 createApiRef,\n ErrorDisplay,\n NotFoundErrorPage,\n Progress,\n} from '@backstage/frontend-plugin-api';\nimport { ComponentType } from 'react';\n\n/**\n * This is the old component API that has been replaced by the new SwappableComponentsApi.\n *\n * This backwards compatibility implementation exists to avoid breaking older plugins.\n *\n * This was added for the 1.42 release, and can be removed in the future.\n *\n * @internal\n */\nexport const LegacyComponentsApi = ApiBlueprint.make({\n name: 'components',\n params: defineParams =>\n defineParams({\n api: createApiRef<{\n getComponent(ref: { id: string }): ComponentType<any>;\n }>({ id: 'core.components' }),\n deps: {},\n factory: () => ({\n getComponent(ref) {\n if (ref.id === 'core.components.progress') {\n return Progress;\n }\n if (ref.id === 'core.components.notFoundErrorPage') {\n return NotFoundErrorPage;\n }\n if (ref.id === 'core.components.errorBoundaryFallback') {\n return ErrorDisplay;\n }\n throw new Error(`No implementation found for component ref ${ref}`);\n },\n }),\n }),\n});\n"],"names":[],"mappings":";;AAkCO,MAAM,mBAAA,GAAsB,aAAa,IAAA,CAAK;AAAA,EACnD,IAAA,EAAM,YAAA;AAAA,EACN,MAAA,EAAQ,kBACN,YAAA,CAAa;AAAA,IACX,GAAA,EAAK,YAAA,CAEF,EAAE,EAAA,EAAI,mBAAmB,CAAA;AAAA,IAC5B,MAAM,EAAC;AAAA,IACP,SAAS,OAAO;AAAA,MACd,aAAa,GAAA,EAAK;AAChB,QAAA,IAAI,GAAA,CAAI,OAAO,0BAAA,EAA4B;AACzC,UAAA,OAAO,QAAA;AAAA,QACT;AACA,QAAA,IAAI,GAAA,CAAI,OAAO,mCAAA,EAAqC;AAClD,UAAA,OAAO,iBAAA;AAAA,QACT;AACA,QAAA,IAAI,GAAA,CAAI,OAAO,uCAAA,EAAyC;AACtD,UAAA,OAAO,YAAA;AAAA,QACT;AACA,QAAA,MAAM,IAAI,KAAA,CAAM,CAAA,0CAAA,EAA6C,GAAG,CAAA,CAAE,CAAA;AAAA,MACpE;AAAA,KACF;AAAA,GACD;AACL,CAAC;;;;"}
@@ -0,0 +1,40 @@
1
+ import { ApiBlueprint, createExtensionInput, swappableComponentsApiRef, SwappableComponentBlueprint } from '@backstage/frontend-plugin-api';
2
+ import { DefaultSwappableComponentsApi } from '../apis/SwappableComponentsApi/DefaultSwappableComponentsApi.esm.js';
3
+
4
+ const SwappableComponentsApi = ApiBlueprint.makeWithOverrides({
5
+ name: "swappable-components",
6
+ inputs: {
7
+ components: createExtensionInput([
8
+ SwappableComponentBlueprint.dataRefs.component
9
+ ])
10
+ },
11
+ factory: (originalFactory, { inputs }) => {
12
+ return originalFactory(
13
+ (defineParams) => defineParams({
14
+ api: swappableComponentsApiRef,
15
+ deps: {},
16
+ factory: () => {
17
+ const nonAppExtensions = inputs.components.filter(
18
+ (i) => i.node.spec.plugin?.id !== "app"
19
+ );
20
+ if (nonAppExtensions.length > 0) {
21
+ console.warn(
22
+ `SwappableComponents should only be installed as an extension in the app plugin. You can either use appPlugin.override(), or provide a module for the app-plugin with the extension there instead. Invalid extensions: ${nonAppExtensions.map((i) => i.node.spec.id).join(", ")}`
23
+ );
24
+ }
25
+ const appExtensions = inputs.components.filter(
26
+ (i) => i.node.spec.plugin?.id === "app"
27
+ );
28
+ return DefaultSwappableComponentsApi.fromComponents(
29
+ appExtensions.map(
30
+ (i) => i.get(SwappableComponentBlueprint.dataRefs.component)
31
+ )
32
+ );
33
+ }
34
+ })
35
+ );
36
+ }
37
+ });
38
+
39
+ export { SwappableComponentsApi };
40
+ //# sourceMappingURL=SwappableComponentsApi.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SwappableComponentsApi.esm.js","sources":["../../src/extensions/SwappableComponentsApi.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 SwappableComponentBlueprint,\n createExtensionInput,\n ApiBlueprint,\n swappableComponentsApiRef,\n} from '@backstage/frontend-plugin-api';\nimport { DefaultSwappableComponentsApi } from '../apis/SwappableComponentsApi';\n\n/**\n * Contains the shareable components installed into the app.\n */\nexport const SwappableComponentsApi = ApiBlueprint.makeWithOverrides({\n name: 'swappable-components',\n inputs: {\n components: createExtensionInput([\n SwappableComponentBlueprint.dataRefs.component,\n ]),\n },\n factory: (originalFactory, { inputs }) => {\n return originalFactory(defineParams =>\n defineParams({\n api: swappableComponentsApiRef,\n deps: {},\n factory: () => {\n const nonAppExtensions = inputs.components.filter(\n i => i.node.spec.plugin?.id !== 'app',\n );\n\n if (nonAppExtensions.length > 0) {\n // eslint-disable-next-line no-console\n console.warn(\n `SwappableComponents should only be installed as an extension in the app plugin. You can either use appPlugin.override(), or provide a module for the app-plugin with the extension there instead. Invalid extensions: ${nonAppExtensions\n .map(i => i.node.spec.id)\n .join(', ')}`,\n );\n }\n\n const appExtensions = inputs.components.filter(\n i => i.node.spec.plugin?.id === 'app',\n );\n\n return DefaultSwappableComponentsApi.fromComponents(\n appExtensions.map(i =>\n i.get(SwappableComponentBlueprint.dataRefs.component),\n ),\n );\n },\n }),\n );\n },\n});\n"],"names":[],"mappings":";;;AA2BO,MAAM,sBAAA,GAAyB,aAAa,iBAAA,CAAkB;AAAA,EACnE,IAAA,EAAM,sBAAA;AAAA,EACN,MAAA,EAAQ;AAAA,IACN,YAAY,oBAAA,CAAqB;AAAA,MAC/B,4BAA4B,QAAA,CAAS;AAAA,KACtC;AAAA,GACH;AAAA,EACA,OAAA,EAAS,CAAC,eAAA,EAAiB,EAAE,QAAO,KAAM;AACxC,IAAA,OAAO,eAAA;AAAA,MAAgB,kBACrB,YAAA,CAAa;AAAA,QACX,GAAA,EAAK,yBAAA;AAAA,QACL,MAAM,EAAC;AAAA,QACP,SAAS,MAAM;AACb,UAAA,MAAM,gBAAA,GAAmB,OAAO,UAAA,CAAW,MAAA;AAAA,YACzC,CAAA,CAAA,KAAK,CAAA,CAAE,IAAA,CAAK,IAAA,CAAK,QAAQ,EAAA,KAAO;AAAA,WAClC;AAEA,UAAA,IAAI,gBAAA,CAAiB,SAAS,CAAA,EAAG;AAE/B,YAAA,OAAA,CAAQ,IAAA;AAAA,cACN,CAAA,sNAAA,EAAyN,gBAAA,CACtN,GAAA,CAAI,CAAA,CAAA,KAAK,CAAA,CAAE,IAAA,CAAK,IAAA,CAAK,EAAE,CAAA,CACvB,IAAA,CAAK,IAAI,CAAC,CAAA;AAAA,aACf;AAAA,UACF;AAEA,UAAA,MAAM,aAAA,GAAgB,OAAO,UAAA,CAAW,MAAA;AAAA,YACtC,CAAA,CAAA,KAAK,CAAA,CAAE,IAAA,CAAK,IAAA,CAAK,QAAQ,EAAA,KAAO;AAAA,WAClC;AAEA,UAAA,OAAO,6BAAA,CAA8B,cAAA;AAAA,YACnC,aAAA,CAAc,GAAA;AAAA,cAAI,CAAA,CAAA,KAChB,CAAA,CAAE,GAAA,CAAI,2BAAA,CAA4B,SAAS,SAAS;AAAA;AACtD,WACF;AAAA,QACF;AAAA,OACD;AAAA,KACH;AAAA,EACF;AACF,CAAC;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { ApiBlueprint, createExtensionInput, TranslationBlueprint } from '@backstage/frontend-plugin-api';
2
- import { translationApiRef, appLanguageApiRef } from '@backstage/core-plugin-api/alpha';
2
+ import { appLanguageApiRef, translationApiRef } from '@backstage/core-plugin-api/alpha';
3
3
  import { I18nextTranslationApi } from '../packages/core-app-api/src/apis/implementations/TranslationApi/I18nextTranslationApi.esm.js';
4
4
 
5
5
  const TranslationsApi = ApiBlueprint.makeWithOverrides({
@@ -1 +1 @@
1
- {"version":3,"file":"TranslationsApi.esm.js","sources":["../../src/extensions/TranslationsApi.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 {\n ApiBlueprint,\n TranslationBlueprint,\n createExtensionInput,\n} from '@backstage/frontend-plugin-api';\nimport {\n appLanguageApiRef,\n translationApiRef,\n} from '@backstage/core-plugin-api/alpha';\n\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { I18nextTranslationApi } from '../../../../packages/core-app-api/src/apis/implementations/TranslationApi/I18nextTranslationApi';\n\n/**\n * Contains translations that are installed in the app.\n */\nexport const TranslationsApi = ApiBlueprint.makeWithOverrides({\n name: 'translations',\n inputs: {\n translations: createExtensionInput(\n [TranslationBlueprint.dataRefs.translation],\n { replaces: [{ id: 'app', input: 'translations' }] },\n ),\n },\n factory: (originalFactory, { inputs }) => {\n return originalFactory(defineParams =>\n defineParams({\n api: translationApiRef,\n deps: { languageApi: appLanguageApiRef },\n factory: ({ languageApi }) =>\n I18nextTranslationApi.create({\n languageApi,\n resources: inputs.translations.map(i =>\n i.get(TranslationBlueprint.dataRefs.translation),\n ),\n }),\n }),\n );\n },\n});\n"],"names":[],"mappings":";;;;AA+Ba,MAAA,eAAA,GAAkB,aAAa,iBAAkB,CAAA;AAAA,EAC5D,IAAM,EAAA,cAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,YAAc,EAAA,oBAAA;AAAA,MACZ,CAAC,oBAAqB,CAAA,QAAA,CAAS,WAAW,CAAA;AAAA,MAC1C,EAAE,UAAU,CAAC,EAAE,IAAI,KAAO,EAAA,KAAA,EAAO,cAAe,EAAC,CAAE;AAAA;AACrD,GACF;AAAA,EACA,OAAS,EAAA,CAAC,eAAiB,EAAA,EAAE,QAAa,KAAA;AACxC,IAAO,OAAA,eAAA;AAAA,MAAgB,kBACrB,YAAa,CAAA;AAAA,QACX,GAAK,EAAA,iBAAA;AAAA,QACL,IAAA,EAAM,EAAE,WAAA,EAAa,iBAAkB,EAAA;AAAA,QACvC,SAAS,CAAC,EAAE,WAAY,EAAA,KACtB,sBAAsB,MAAO,CAAA;AAAA,UAC3B,WAAA;AAAA,UACA,SAAA,EAAW,OAAO,YAAa,CAAA,GAAA;AAAA,YAAI,CACjC,CAAA,KAAA,CAAA,CAAE,GAAI,CAAA,oBAAA,CAAqB,SAAS,WAAW;AAAA;AACjD,SACD;AAAA,OACJ;AAAA,KACH;AAAA;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"TranslationsApi.esm.js","sources":["../../src/extensions/TranslationsApi.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 {\n ApiBlueprint,\n TranslationBlueprint,\n createExtensionInput,\n} from '@backstage/frontend-plugin-api';\nimport {\n appLanguageApiRef,\n translationApiRef,\n} from '@backstage/core-plugin-api/alpha';\n\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { I18nextTranslationApi } from '../../../../packages/core-app-api/src/apis/implementations/TranslationApi/I18nextTranslationApi';\n\n/**\n * Contains translations that are installed in the app.\n */\nexport const TranslationsApi = ApiBlueprint.makeWithOverrides({\n name: 'translations',\n inputs: {\n translations: createExtensionInput(\n [TranslationBlueprint.dataRefs.translation],\n { replaces: [{ id: 'app', input: 'translations' }] },\n ),\n },\n factory: (originalFactory, { inputs }) => {\n return originalFactory(defineParams =>\n defineParams({\n api: translationApiRef,\n deps: { languageApi: appLanguageApiRef },\n factory: ({ languageApi }) =>\n I18nextTranslationApi.create({\n languageApi,\n resources: inputs.translations.map(i =>\n i.get(TranslationBlueprint.dataRefs.translation),\n ),\n }),\n }),\n );\n },\n});\n"],"names":[],"mappings":";;;;AA+BO,MAAM,eAAA,GAAkB,aAAa,iBAAA,CAAkB;AAAA,EAC5D,IAAA,EAAM,cAAA;AAAA,EACN,MAAA,EAAQ;AAAA,IACN,YAAA,EAAc,oBAAA;AAAA,MACZ,CAAC,oBAAA,CAAqB,QAAA,CAAS,WAAW,CAAA;AAAA,MAC1C,EAAE,UAAU,CAAC,EAAE,IAAI,KAAA,EAAO,KAAA,EAAO,cAAA,EAAgB,CAAA;AAAE;AACrD,GACF;AAAA,EACA,OAAA,EAAS,CAAC,eAAA,EAAiB,EAAE,QAAO,KAAM;AACxC,IAAA,OAAO,eAAA;AAAA,MAAgB,kBACrB,YAAA,CAAa;AAAA,QACX,GAAA,EAAK,iBAAA;AAAA,QACL,IAAA,EAAM,EAAE,WAAA,EAAa,iBAAA,EAAkB;AAAA,QACvC,SAAS,CAAC,EAAE,WAAA,EAAY,KACtB,sBAAsB,MAAA,CAAO;AAAA,UAC3B,WAAA;AAAA,UACA,SAAA,EAAW,OAAO,YAAA,CAAa,GAAA;AAAA,YAAI,CAAA,CAAA,KACjC,CAAA,CAAE,GAAA,CAAI,oBAAA,CAAqB,SAAS,WAAW;AAAA;AACjD,SACD;AAAA,OACJ;AAAA,KACH;AAAA,EACF;AACF,CAAC;;;;"}
@@ -1,55 +1,33 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
+ import { SwappableComponentBlueprint, Progress as Progress$2, NotFoundErrorPage as NotFoundErrorPage$1, ErrorDisplay as ErrorDisplay$1 } from '@backstage/frontend-plugin-api';
3
+ import { Progress as Progress$1, ErrorPage, ErrorPanel } from '@backstage/core-components';
2
4
  import Button from '@material-ui/core/Button';
3
- import { createComponentExtension, coreComponentRefs } from '@backstage/frontend-plugin-api';
4
- import { ErrorPanel } from '@backstage/core-components';
5
- import '../packages/app-defaults/src/defaults/apis.esm.js';
6
- import { components } from '../packages/app-defaults/src/defaults/components.esm.js';
7
- import '@material-ui/icons/Apartment';
8
- import '@material-ui/icons/BrokenImage';
9
- import '@material-ui/icons/Category';
10
- import '@material-ui/icons/CreateNewFolder';
11
- import '@material-ui/icons/Subject';
12
- import '@material-ui/icons/Search';
13
- import '@material-ui/icons/Chat';
14
- import '@material-ui/icons/Dashboard';
15
- import '@material-ui/icons/Description';
16
- import '@material-ui/icons/Email';
17
- import '@material-ui/icons/Extension';
18
- import '@material-ui/icons/GitHub';
19
- import '@material-ui/icons/Help';
20
- import '@material-ui/icons/LocationOn';
21
- import '@material-ui/icons/Memory';
22
- import '@material-ui/icons/MenuBook';
23
- import '@material-ui/icons/People';
24
- import '@material-ui/icons/Person';
25
- import '@material-ui/icons/Warning';
26
- import '@material-ui/icons/Storage';
27
- import '@material-ui/icons/FeaturedPlayList';
28
- import '@material-ui/icons/Star';
29
- import '@material-ui/icons/StarBorder';
30
- import '@material-ui/icons/OpenInNew';
31
- import '@backstage/theme';
32
- import '@material-ui/icons/Brightness2';
33
- import '@material-ui/icons/WbSunny';
34
5
 
35
- const DefaultProgressComponent = createComponentExtension({
36
- ref: coreComponentRefs.progress,
37
- loader: { sync: () => components.Progress }
6
+ const Progress = SwappableComponentBlueprint.make({
7
+ name: "core-progress",
8
+ params: (define) => define({
9
+ component: Progress$2,
10
+ loader: () => Progress$1
11
+ })
38
12
  });
39
- const DefaultNotFoundErrorPageComponent = createComponentExtension({
40
- ref: coreComponentRefs.notFoundErrorPage,
41
- loader: { sync: () => components.NotFoundErrorPage }
13
+ const NotFoundErrorPage = SwappableComponentBlueprint.make({
14
+ name: "core-not-found-error-page",
15
+ params: (define) => define({
16
+ component: NotFoundErrorPage$1,
17
+ loader: () => () => /* @__PURE__ */ jsx(ErrorPage, { status: "404", statusMessage: "PAGE NOT FOUND" })
18
+ })
42
19
  });
43
- const DefaultErrorBoundaryComponent = createComponentExtension({
44
- ref: coreComponentRefs.errorBoundaryFallback,
45
- loader: {
46
- sync: () => (props) => {
20
+ const ErrorDisplay = SwappableComponentBlueprint.make({
21
+ name: "core-error-display",
22
+ params: (define) => define({
23
+ component: ErrorDisplay$1,
24
+ loader: () => (props) => {
47
25
  const { plugin, error, resetError } = props;
48
26
  const title = `Error in ${plugin?.id}`;
49
27
  return /* @__PURE__ */ jsx(ErrorPanel, { title, error, defaultExpanded: true, children: /* @__PURE__ */ jsx(Button, { variant: "outlined", onClick: resetError, children: "Retry" }) });
50
28
  }
51
- }
29
+ })
52
30
  });
53
31
 
54
- export { DefaultErrorBoundaryComponent, DefaultNotFoundErrorPageComponent, DefaultProgressComponent };
32
+ export { ErrorDisplay, NotFoundErrorPage, Progress };
55
33
  //# sourceMappingURL=components.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components.esm.js","sources":["../../src/extensions/components.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 Button from '@material-ui/core/Button';\n\nimport {\n createComponentExtension,\n coreComponentRefs,\n} from '@backstage/frontend-plugin-api';\nimport { ErrorPanel } from '@backstage/core-components';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { components as defaultComponents } from '../../../../packages/app-defaults/src/defaults';\n\nexport const DefaultProgressComponent = createComponentExtension({\n ref: coreComponentRefs.progress,\n loader: { sync: () => defaultComponents.Progress },\n});\n\nexport const DefaultNotFoundErrorPageComponent = createComponentExtension({\n ref: coreComponentRefs.notFoundErrorPage,\n loader: { sync: () => defaultComponents.NotFoundErrorPage },\n});\n\nexport const DefaultErrorBoundaryComponent = createComponentExtension({\n ref: coreComponentRefs.errorBoundaryFallback,\n loader: {\n sync: () => props => {\n const { plugin, error, resetError } = props;\n const title = `Error in ${plugin?.id}`;\n\n return (\n <ErrorPanel title={title} error={error} defaultExpanded>\n <Button variant=\"outlined\" onClick={resetError}>\n Retry\n </Button>\n </ErrorPanel>\n );\n },\n },\n});\n"],"names":["defaultComponents"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BO,MAAM,2BAA2B,wBAAyB,CAAA;AAAA,EAC/D,KAAK,iBAAkB,CAAA,QAAA;AAAA,EACvB,MAAQ,EAAA,EAAE,IAAM,EAAA,MAAMA,WAAkB,QAAS;AACnD,CAAC;AAEM,MAAM,oCAAoC,wBAAyB,CAAA;AAAA,EACxE,KAAK,iBAAkB,CAAA,iBAAA;AAAA,EACvB,MAAQ,EAAA,EAAE,IAAM,EAAA,MAAMA,WAAkB,iBAAkB;AAC5D,CAAC;AAEM,MAAM,gCAAgC,wBAAyB,CAAA;AAAA,EACpE,KAAK,iBAAkB,CAAA,qBAAA;AAAA,EACvB,MAAQ,EAAA;AAAA,IACN,IAAA,EAAM,MAAM,CAAS,KAAA,KAAA;AACnB,MAAA,MAAM,EAAE,MAAA,EAAQ,KAAO,EAAA,UAAA,EAAe,GAAA,KAAA;AACtC,MAAM,MAAA,KAAA,GAAQ,CAAY,SAAA,EAAA,MAAA,EAAQ,EAAE,CAAA,CAAA;AAEpC,MAAA,uBACG,GAAA,CAAA,UAAA,EAAA,EAAW,KAAc,EAAA,KAAA,EAAc,eAAe,EAAA,IAAA,EACrD,QAAC,kBAAA,GAAA,CAAA,MAAA,EAAA,EAAO,OAAQ,EAAA,UAAA,EAAW,OAAS,EAAA,UAAA,EAAY,mBAEhD,CACF,EAAA,CAAA;AAAA;AAEJ;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"components.esm.js","sources":["../../src/extensions/components.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 */\nimport {\n NotFoundErrorPage as SwappableNotFoundErrorPage,\n Progress as SwappableProgress,\n ErrorDisplay as SwappableErrorDisplay,\n SwappableComponentBlueprint,\n} from '@backstage/frontend-plugin-api';\n\nimport {\n ErrorPage,\n ErrorPanel,\n Progress as ProgressComponent,\n} from '@backstage/core-components';\nimport Button from '@material-ui/core/Button';\n\nexport const Progress = SwappableComponentBlueprint.make({\n name: 'core-progress',\n params: define =>\n define({\n component: SwappableProgress,\n loader: () => ProgressComponent,\n }),\n});\n\nexport const NotFoundErrorPage = SwappableComponentBlueprint.make({\n name: 'core-not-found-error-page',\n params: define =>\n define({\n component: SwappableNotFoundErrorPage,\n loader: () => () =>\n <ErrorPage status=\"404\" statusMessage=\"PAGE NOT FOUND\" />,\n }),\n});\n\nexport const ErrorDisplay = SwappableComponentBlueprint.make({\n name: 'core-error-display',\n params: define =>\n define({\n component: SwappableErrorDisplay,\n loader: () => props => {\n const { plugin, error, resetError } = props;\n const title = `Error in ${plugin?.id}`;\n return (\n <ErrorPanel title={title} error={error} defaultExpanded>\n <Button variant=\"outlined\" onClick={resetError}>\n Retry\n </Button>\n </ErrorPanel>\n );\n },\n }),\n});\n"],"names":["SwappableProgress","ProgressComponent","SwappableNotFoundErrorPage","SwappableErrorDisplay"],"mappings":";;;;;AA6BO,MAAM,QAAA,GAAW,4BAA4B,IAAA,CAAK;AAAA,EACvD,IAAA,EAAM,eAAA;AAAA,EACN,MAAA,EAAQ,YACN,MAAA,CAAO;AAAA,IACL,SAAA,EAAWA,UAAA;AAAA,IACX,QAAQ,MAAMC;AAAA,GACf;AACL,CAAC;AAEM,MAAM,iBAAA,GAAoB,4BAA4B,IAAA,CAAK;AAAA,EAChE,IAAA,EAAM,2BAAA;AAAA,EACN,MAAA,EAAQ,YACN,MAAA,CAAO;AAAA,IACL,SAAA,EAAWC,mBAAA;AAAA,IACX,MAAA,EAAQ,MAAM,sBACZ,GAAA,CAAC,aAAU,MAAA,EAAO,KAAA,EAAM,eAAc,gBAAA,EAAiB;AAAA,GAC1D;AACL,CAAC;AAEM,MAAM,YAAA,GAAe,4BAA4B,IAAA,CAAK;AAAA,EAC3D,IAAA,EAAM,oBAAA;AAAA,EACN,MAAA,EAAQ,YACN,MAAA,CAAO;AAAA,IACL,SAAA,EAAWC,cAAA;AAAA,IACX,MAAA,EAAQ,MAAM,CAAA,KAAA,KAAS;AACrB,MAAA,MAAM,EAAE,MAAA,EAAQ,KAAA,EAAO,UAAA,EAAW,GAAI,KAAA;AACtC,MAAA,MAAM,KAAA,GAAQ,CAAA,SAAA,EAAY,MAAA,EAAQ,EAAE,CAAA,CAAA;AACpC,MAAA,uBACE,GAAA,CAAC,UAAA,EAAA,EAAW,KAAA,EAAc,KAAA,EAAc,eAAA,EAAe,IAAA,EACrD,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAO,OAAA,EAAQ,UAAA,EAAW,OAAA,EAAS,UAAA,EAAY,mBAEhD,CAAA,EACF,CAAA;AAAA,IAEJ;AAAA,GACD;AACL,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"elements.esm.js","sources":["../../src/extensions/elements.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 { AlertDisplay, OAuthRequestDialog } from '@backstage/core-components';\nimport { AppRootElementBlueprint } from '@backstage/frontend-plugin-api';\n\nexport const oauthRequestDialogAppRootElement = AppRootElementBlueprint.make({\n name: 'oauth-request-dialog',\n params: {\n element: <OAuthRequestDialog />,\n },\n});\n\nexport const alertDisplayAppRootElement =\n AppRootElementBlueprint.makeWithOverrides({\n name: 'alert-display',\n config: {\n schema: {\n transientTimeoutMs: z => z.number().default(5000),\n anchorOrigin: z =>\n z\n .object({\n vertical: z.enum(['top', 'bottom']).default('top'),\n horizontal: z.enum(['left', 'center', 'right']).default('center'),\n })\n .default({}),\n },\n },\n factory: (originalFactory, { config }) => {\n return originalFactory({\n element: <AlertDisplay {...config} />,\n });\n },\n });\n"],"names":[],"mappings":";;;;AAmBa,MAAA,gCAAA,GAAmC,wBAAwB,IAAK,CAAA;AAAA,EAC3E,IAAM,EAAA,sBAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,OAAA,sBAAU,kBAAmB,EAAA,EAAA;AAAA;AAEjC,CAAC;AAEY,MAAA,0BAAA,GACX,wBAAwB,iBAAkB,CAAA;AAAA,EACxC,IAAM,EAAA,eAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,MAAQ,EAAA;AAAA,MACN,oBAAoB,CAAK,CAAA,KAAA,CAAA,CAAE,MAAO,EAAA,CAAE,QAAQ,GAAI,CAAA;AAAA,MAChD,YAAA,EAAc,CACZ,CAAA,KAAA,CAAA,CACG,MAAO,CAAA;AAAA,QACN,QAAA,EAAU,EAAE,IAAK,CAAA,CAAC,OAAO,QAAQ,CAAC,CAAE,CAAA,OAAA,CAAQ,KAAK,CAAA;AAAA,QACjD,UAAA,EAAY,CAAE,CAAA,IAAA,CAAK,CAAC,MAAA,EAAQ,UAAU,OAAO,CAAC,CAAE,CAAA,OAAA,CAAQ,QAAQ;AAAA,OACjE,CAAA,CACA,OAAQ,CAAA,EAAE;AAAA;AACjB,GACF;AAAA,EACA,OAAS,EAAA,CAAC,eAAiB,EAAA,EAAE,QAAa,KAAA;AACxC,IAAA,OAAO,eAAgB,CAAA;AAAA,MACrB,OAAS,kBAAA,GAAA,CAAC,YAAc,EAAA,EAAA,GAAG,MAAQ,EAAA;AAAA,KACpC,CAAA;AAAA;AAEL,CAAC;;;;"}
1
+ {"version":3,"file":"elements.esm.js","sources":["../../src/extensions/elements.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 { AlertDisplay, OAuthRequestDialog } from '@backstage/core-components';\nimport { AppRootElementBlueprint } from '@backstage/frontend-plugin-api';\n\nexport const oauthRequestDialogAppRootElement = AppRootElementBlueprint.make({\n name: 'oauth-request-dialog',\n params: {\n element: <OAuthRequestDialog />,\n },\n});\n\nexport const alertDisplayAppRootElement =\n AppRootElementBlueprint.makeWithOverrides({\n name: 'alert-display',\n config: {\n schema: {\n transientTimeoutMs: z => z.number().default(5000),\n anchorOrigin: z =>\n z\n .object({\n vertical: z.enum(['top', 'bottom']).default('top'),\n horizontal: z.enum(['left', 'center', 'right']).default('center'),\n })\n .default({}),\n },\n },\n factory: (originalFactory, { config }) => {\n return originalFactory({\n element: <AlertDisplay {...config} />,\n });\n },\n });\n"],"names":[],"mappings":";;;;AAmBO,MAAM,gCAAA,GAAmC,wBAAwB,IAAA,CAAK;AAAA,EAC3E,IAAA,EAAM,sBAAA;AAAA,EACN,MAAA,EAAQ;AAAA,IACN,OAAA,sBAAU,kBAAA,EAAA,EAAmB;AAAA;AAEjC,CAAC;AAEM,MAAM,0BAAA,GACX,wBAAwB,iBAAA,CAAkB;AAAA,EACxC,IAAA,EAAM,eAAA;AAAA,EACN,MAAA,EAAQ;AAAA,IACN,MAAA,EAAQ;AAAA,MACN,oBAAoB,CAAA,CAAA,KAAK,CAAA,CAAE,MAAA,EAAO,CAAE,QAAQ,GAAI,CAAA;AAAA,MAChD,YAAA,EAAc,CAAA,CAAA,KACZ,CAAA,CACG,MAAA,CAAO;AAAA,QACN,QAAA,EAAU,EAAE,IAAA,CAAK,CAAC,OAAO,QAAQ,CAAC,CAAA,CAAE,OAAA,CAAQ,KAAK,CAAA;AAAA,QACjD,UAAA,EAAY,CAAA,CAAE,IAAA,CAAK,CAAC,MAAA,EAAQ,UAAU,OAAO,CAAC,CAAA,CAAE,OAAA,CAAQ,QAAQ;AAAA,OACjE,CAAA,CACA,OAAA,CAAQ,EAAE;AAAA;AACjB,GACF;AAAA,EACA,OAAA,EAAS,CAAC,eAAA,EAAiB,EAAE,QAAO,KAAM;AACxC,IAAA,OAAO,eAAA,CAAgB;AAAA,MACrB,OAAA,kBAAS,GAAA,CAAC,YAAA,EAAA,EAAc,GAAG,MAAA,EAAQ;AAAA,KACpC,CAAA;AAAA,EACH;AACF,CAAC;;;;"}
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api'
3
3
  import * as react from 'react';
4
4
 
5
5
  /** @public */
6
- declare const appPlugin: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
6
+ declare const appPlugin: _backstage_frontend_plugin_api.OverridableFrontendPlugin<{}, {}, {
7
7
  app: _backstage_frontend_plugin_api.ExtensionDefinition<{
8
8
  config: {};
9
9
  configInput: {};
@@ -182,20 +182,12 @@ declare const appPlugin: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
182
182
  params: <TApi, TImpl extends TApi, TDeps extends { [name in string]: unknown; }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
183
183
  }>;
184
184
  "api:app/components": _backstage_frontend_plugin_api.ExtensionDefinition<{
185
+ kind: "api";
186
+ name: "components";
185
187
  config: {};
186
188
  configInput: {};
187
189
  output: _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.AnyApiFactory, "core.api.factory", {}>;
188
- inputs: {
189
- components: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<{
190
- ref: _backstage_frontend_plugin_api.ComponentRef;
191
- impl: react.ComponentType;
192
- }, "core.component.component", {}>, {
193
- singleton: false;
194
- optional: false;
195
- }>;
196
- };
197
- kind: "api";
198
- name: "components";
190
+ inputs: {};
199
191
  params: <TApi, TImpl extends TApi, TDeps extends { [name in string]: unknown; }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
200
192
  }>;
201
193
  "api:app/dialog": _backstage_frontend_plugin_api.ExtensionDefinition<{
@@ -358,6 +350,23 @@ declare const appPlugin: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
358
350
  inputs: {};
359
351
  params: <TApi, TImpl extends TApi, TDeps extends { [name in string]: unknown; }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
360
352
  }>;
353
+ "api:app/swappable-components": _backstage_frontend_plugin_api.ExtensionDefinition<{
354
+ config: {};
355
+ configInput: {};
356
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.AnyApiFactory, "core.api.factory", {}>;
357
+ inputs: {
358
+ components: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<{
359
+ ref: _backstage_frontend_plugin_api.SwappableComponentRef;
360
+ loader: (() => (props: {}) => JSX.Element | null) | (() => Promise<(props: {}) => JSX.Element | null>);
361
+ }, "core.swappableComponent", {}>, {
362
+ singleton: false;
363
+ optional: false;
364
+ }>;
365
+ };
366
+ kind: "api";
367
+ name: "swappable-components";
368
+ params: <TApi, TImpl extends TApi, TDeps extends { [name in string]: unknown; }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
369
+ }>;
361
370
  "api:app/translations": _backstage_frontend_plugin_api.ExtensionDefinition<{
362
371
  config: {};
363
372
  configInput: {};
@@ -438,6 +447,72 @@ declare const appPlugin: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
438
447
  element: JSX.Element;
439
448
  };
440
449
  }>;
450
+ "component:app/core-error-display": _backstage_frontend_plugin_api.ExtensionDefinition<{
451
+ kind: "component";
452
+ name: "core-error-display";
453
+ config: {};
454
+ configInput: {};
455
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<{
456
+ ref: _backstage_frontend_plugin_api.SwappableComponentRef;
457
+ loader: (() => (props: {}) => JSX.Element | null) | (() => Promise<(props: {}) => JSX.Element | null>);
458
+ }, "core.swappableComponent", {}>;
459
+ inputs: {};
460
+ params: <Ref extends _backstage_frontend_plugin_api.SwappableComponentRef<any>>(params: {
461
+ component: Ref extends _backstage_frontend_plugin_api.SwappableComponentRef<any, infer IExternalComponentProps> ? {
462
+ ref: Ref;
463
+ } & ((props: IExternalComponentProps) => JSX.Element | null) : never;
464
+ loader: Ref extends _backstage_frontend_plugin_api.SwappableComponentRef<infer IInnerComponentProps, any> ? (() => (props: IInnerComponentProps) => JSX.Element | null) | (() => Promise<(props: IInnerComponentProps) => JSX.Element | null>) : never;
465
+ }) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<{
466
+ component: Ref extends _backstage_frontend_plugin_api.SwappableComponentRef<any, infer IExternalComponentProps> ? {
467
+ ref: Ref;
468
+ } & ((props: IExternalComponentProps) => JSX.Element | null) : never;
469
+ loader: Ref extends _backstage_frontend_plugin_api.SwappableComponentRef<infer IInnerComponentProps, any> ? (() => (props: IInnerComponentProps) => JSX.Element | null) | (() => Promise<(props: IInnerComponentProps) => JSX.Element | null>) : never;
470
+ }>;
471
+ }>;
472
+ "component:app/core-not-found-error-page": _backstage_frontend_plugin_api.ExtensionDefinition<{
473
+ kind: "component";
474
+ name: "core-not-found-error-page";
475
+ config: {};
476
+ configInput: {};
477
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<{
478
+ ref: _backstage_frontend_plugin_api.SwappableComponentRef;
479
+ loader: (() => (props: {}) => JSX.Element | null) | (() => Promise<(props: {}) => JSX.Element | null>);
480
+ }, "core.swappableComponent", {}>;
481
+ inputs: {};
482
+ params: <Ref extends _backstage_frontend_plugin_api.SwappableComponentRef<any>>(params: {
483
+ component: Ref extends _backstage_frontend_plugin_api.SwappableComponentRef<any, infer IExternalComponentProps> ? {
484
+ ref: Ref;
485
+ } & ((props: IExternalComponentProps) => JSX.Element | null) : never;
486
+ loader: Ref extends _backstage_frontend_plugin_api.SwappableComponentRef<infer IInnerComponentProps, any> ? (() => (props: IInnerComponentProps) => JSX.Element | null) | (() => Promise<(props: IInnerComponentProps) => JSX.Element | null>) : never;
487
+ }) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<{
488
+ component: Ref extends _backstage_frontend_plugin_api.SwappableComponentRef<any, infer IExternalComponentProps> ? {
489
+ ref: Ref;
490
+ } & ((props: IExternalComponentProps) => JSX.Element | null) : never;
491
+ loader: Ref extends _backstage_frontend_plugin_api.SwappableComponentRef<infer IInnerComponentProps, any> ? (() => (props: IInnerComponentProps) => JSX.Element | null) | (() => Promise<(props: IInnerComponentProps) => JSX.Element | null>) : never;
492
+ }>;
493
+ }>;
494
+ "component:app/core-progress": _backstage_frontend_plugin_api.ExtensionDefinition<{
495
+ kind: "component";
496
+ name: "core-progress";
497
+ config: {};
498
+ configInput: {};
499
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<{
500
+ ref: _backstage_frontend_plugin_api.SwappableComponentRef;
501
+ loader: (() => (props: {}) => JSX.Element | null) | (() => Promise<(props: {}) => JSX.Element | null>);
502
+ }, "core.swappableComponent", {}>;
503
+ inputs: {};
504
+ params: <Ref extends _backstage_frontend_plugin_api.SwappableComponentRef<any>>(params: {
505
+ component: Ref extends _backstage_frontend_plugin_api.SwappableComponentRef<any, infer IExternalComponentProps> ? {
506
+ ref: Ref;
507
+ } & ((props: IExternalComponentProps) => JSX.Element | null) : never;
508
+ loader: Ref extends _backstage_frontend_plugin_api.SwappableComponentRef<infer IInnerComponentProps, any> ? (() => (props: IInnerComponentProps) => JSX.Element | null) | (() => Promise<(props: IInnerComponentProps) => JSX.Element | null>) : never;
509
+ }) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<{
510
+ component: Ref extends _backstage_frontend_plugin_api.SwappableComponentRef<any, infer IExternalComponentProps> ? {
511
+ ref: Ref;
512
+ } & ((props: IExternalComponentProps) => JSX.Element | null) : never;
513
+ loader: Ref extends _backstage_frontend_plugin_api.SwappableComponentRef<infer IInnerComponentProps, any> ? (() => (props: IInnerComponentProps) => JSX.Element | null) | (() => Promise<(props: IInnerComponentProps) => JSX.Element | null>) : never;
514
+ }>;
515
+ }>;
441
516
  "sign-in-page:app": _backstage_frontend_plugin_api.ExtensionDefinition<{
442
517
  kind: "sign-in-page";
443
518
  name: undefined;
@@ -1,6 +1,6 @@
1
1
  import { FrontendHostDiscovery, AlertApiForwarder, NoOpAnalyticsApi, ErrorAlerter, ErrorApiForwarder, UnhandledErrorForwarder, WebStorage, createFetchApi, FetchMiddlewares, OAuthRequestManager, GoogleAuth, MicrosoftAuth, GithubAuth, OktaAuth, GitlabAuth, OneLoginAuth, BitbucketAuth, BitbucketServerAuth, AtlassianAuth, VMwareCloudAuth } from '@backstage/core-app-api';
2
- import { createApiFactory, discoveryApiRef, configApiRef, alertApiRef, analyticsApiRef, errorApiRef, storageApiRef, fetchApiRef, identityApiRef, oauthRequestApiRef, googleAuthApiRef, microsoftAuthApiRef, githubAuthApiRef, oktaAuthApiRef, gitlabAuthApiRef, oneloginAuthApiRef, bitbucketAuthApiRef, bitbucketServerAuthApiRef, atlassianAuthApiRef, vmwareCloudAuthApiRef } from '@backstage/core-plugin-api';
3
- import { permissionApiRef, IdentityPermissionApi } from '@backstage/plugin-permission-react';
2
+ import { createApiFactory, configApiRef, discoveryApiRef, alertApiRef, analyticsApiRef, errorApiRef, storageApiRef, identityApiRef, fetchApiRef, oauthRequestApiRef, googleAuthApiRef, microsoftAuthApiRef, githubAuthApiRef, oktaAuthApiRef, gitlabAuthApiRef, oneloginAuthApiRef, bitbucketAuthApiRef, bitbucketServerAuthApiRef, atlassianAuthApiRef, vmwareCloudAuthApiRef } from '@backstage/core-plugin-api';
3
+ import { IdentityPermissionApi, permissionApiRef } from '@backstage/plugin-permission-react';
4
4
 
5
5
  [
6
6
  createApiFactory({
@@ -1 +1 @@
1
- {"version":3,"file":"apis.esm.js","sources":["../../../../../../../packages/app-defaults/src/defaults/apis.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\nimport {\n AlertApiForwarder,\n NoOpAnalyticsApi,\n ErrorApiForwarder,\n ErrorAlerter,\n GoogleAuth,\n GithubAuth,\n OktaAuth,\n GitlabAuth,\n MicrosoftAuth,\n BitbucketAuth,\n BitbucketServerAuth,\n OAuthRequestManager,\n WebStorage,\n OneLoginAuth,\n UnhandledErrorForwarder,\n AtlassianAuth,\n createFetchApi,\n FetchMiddlewares,\n VMwareCloudAuth,\n FrontendHostDiscovery,\n} from '@backstage/core-app-api';\n\nimport {\n createApiFactory,\n alertApiRef,\n analyticsApiRef,\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 {\n permissionApiRef,\n IdentityPermissionApi,\n} from '@backstage/plugin-permission-react';\n\nexport const apis = [\n createApiFactory({\n api: discoveryApiRef,\n deps: { configApi: configApiRef },\n factory: ({ configApi }) => FrontendHostDiscovery.fromConfig(configApi),\n }),\n createApiFactory({\n api: alertApiRef,\n deps: {},\n factory: () => new AlertApiForwarder(),\n }),\n createApiFactory({\n api: analyticsApiRef,\n deps: {},\n factory: () => new NoOpAnalyticsApi(),\n }),\n createApiFactory({\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 createApiFactory({\n api: storageApiRef,\n deps: { errorApi: errorApiRef },\n factory: ({ errorApi }) => WebStorage.create({ errorApi }),\n }),\n createApiFactory({\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 createApiFactory({\n api: oauthRequestApiRef,\n deps: {},\n factory: () => new OAuthRequestManager(),\n }),\n createApiFactory({\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 createApiFactory({\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 createApiFactory({\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 createApiFactory({\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 createApiFactory({\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 createApiFactory({\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 createApiFactory({\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 createApiFactory({\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 createApiFactory({\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 createApiFactory({\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 createApiFactory({\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"],"names":[],"mappings":";;;;AAkEoB;AAAA,EAClB,gBAAiB,CAAA;AAAA,IACf,GAAK,EAAA,eAAA;AAAA,IACL,IAAA,EAAM,EAAE,SAAA,EAAW,YAAa,EAAA;AAAA,IAChC,SAAS,CAAC,EAAE,WAAgB,KAAA,qBAAA,CAAsB,WAAW,SAAS;AAAA,GACvE,CAAA;AAAA,EACD,gBAAiB,CAAA;AAAA,IACf,GAAK,EAAA,WAAA;AAAA,IACL,MAAM,EAAC;AAAA,IACP,OAAA,EAAS,MAAM,IAAI,iBAAkB;AAAA,GACtC,CAAA;AAAA,EACD,gBAAiB,CAAA;AAAA,IACf,GAAK,EAAA,eAAA;AAAA,IACL,MAAM,EAAC;AAAA,IACP,OAAA,EAAS,MAAM,IAAI,gBAAiB;AAAA,GACrC,CAAA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QACA,WAAA,EAAa,SAAU,CAAA,iBAAA,CAAkB,kBAAkB;AAAA,OAC5D,CAAA;AAAA;AACH,GACD,CAAA;AAAA,EACD,gBAAiB,CAAA;AAAA,IACf,GAAK,EAAA,qBAAA;AAAA,IACL,IAAM,EAAA;AAAA,MACJ,YAAc,EAAA,eAAA;AAAA,MACd,eAAiB,EAAA,kBAAA;AAAA,MACjB,SAAW,EAAA;AAAA,KACb;AAAA,IACA,SAAS,CAAC,EAAE,YAAc,EAAA,eAAA,EAAiB,WAAgB,KAAA;AACzD,MAAA,OAAO,gBAAgB,MAAO,CAAA;AAAA,QAC5B,SAAA;AAAA,QACA,YAAA;AAAA,QACA,eAAA;AAAA,QACA,WAAA,EAAa,SAAU,CAAA,iBAAA,CAAkB,kBAAkB;AAAA,OAC5D,CAAA;AAAA;AACH,GACD,CAAA;AAAA,EACD,gBAAiB,CAAA;AAAA,IACf,GAAK,EAAA,gBAAA;AAAA,IACL,IAAM,EAAA;AAAA,MACJ,SAAW,EAAA,eAAA;AAAA,MACX,QAAU,EAAA,cAAA;AAAA,MACV,MAAQ,EAAA;AAAA,KACV;AAAA,IACA,OAAS,EAAA,CAAC,EAAE,MAAA,EAAQ,SAAW,EAAA,QAAA,EAC7B,KAAA,qBAAA,CAAsB,MAAO,CAAA,EAAE,MAAQ,EAAA,SAAA,EAAW,UAAU;AAAA,GAC/D;AACH"}
1
+ {"version":3,"file":"apis.esm.js","sources":["../../../../../../../packages/app-defaults/src/defaults/apis.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\nimport {\n AlertApiForwarder,\n NoOpAnalyticsApi,\n ErrorApiForwarder,\n ErrorAlerter,\n GoogleAuth,\n GithubAuth,\n OktaAuth,\n GitlabAuth,\n MicrosoftAuth,\n BitbucketAuth,\n BitbucketServerAuth,\n OAuthRequestManager,\n WebStorage,\n OneLoginAuth,\n UnhandledErrorForwarder,\n AtlassianAuth,\n createFetchApi,\n FetchMiddlewares,\n VMwareCloudAuth,\n FrontendHostDiscovery,\n} from '@backstage/core-app-api';\n\nimport {\n createApiFactory,\n alertApiRef,\n analyticsApiRef,\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 {\n permissionApiRef,\n IdentityPermissionApi,\n} from '@backstage/plugin-permission-react';\n\nexport const apis = [\n createApiFactory({\n api: discoveryApiRef,\n deps: { configApi: configApiRef },\n factory: ({ configApi }) => FrontendHostDiscovery.fromConfig(configApi),\n }),\n createApiFactory({\n api: alertApiRef,\n deps: {},\n factory: () => new AlertApiForwarder(),\n }),\n createApiFactory({\n api: analyticsApiRef,\n deps: {},\n factory: () => new NoOpAnalyticsApi(),\n }),\n createApiFactory({\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 createApiFactory({\n api: storageApiRef,\n deps: { errorApi: errorApiRef },\n factory: ({ errorApi }) => WebStorage.create({ errorApi }),\n }),\n createApiFactory({\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 createApiFactory({\n api: oauthRequestApiRef,\n deps: {},\n factory: () => new OAuthRequestManager(),\n }),\n createApiFactory({\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 createApiFactory({\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 createApiFactory({\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 createApiFactory({\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 createApiFactory({\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 createApiFactory({\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 createApiFactory({\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 createApiFactory({\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 createApiFactory({\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 createApiFactory({\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 createApiFactory({\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"],"names":[],"mappings":";;;;AAkEoB;AAAA,EAClB,gBAAA,CAAiB;AAAA,IACf,GAAA,EAAK,eAAA;AAAA,IACL,IAAA,EAAM,EAAE,SAAA,EAAW,YAAA,EAAa;AAAA,IAChC,SAAS,CAAC,EAAE,WAAU,KAAM,qBAAA,CAAsB,WAAW,SAAS;AAAA,GACvE,CAAA;AAAA,EACD,gBAAA,CAAiB;AAAA,IACf,GAAA,EAAK,WAAA;AAAA,IACL,MAAM,EAAC;AAAA,IACP,OAAA,EAAS,MAAM,IAAI,iBAAA;AAAkB,GACtC,CAAA;AAAA,EACD,gBAAA,CAAiB;AAAA,IACf,GAAA,EAAK,eAAA;AAAA,IACL,MAAM,EAAC;AAAA,IACP,OAAA,EAAS,MAAM,IAAI,gBAAA;AAAiB,GACrC,CAAA;AAAA,EACD,gBAAA,CAAiB;AAAA,IACf,GAAA,EAAK,WAAA;AAAA,IACL,IAAA,EAAM,EAAE,QAAA,EAAU,WAAA,EAAY;AAAA,IAC9B,OAAA,EAAS,CAAC,EAAE,QAAA,EAAS,KAAM;AACzB,MAAA,MAAM,WAAW,IAAI,YAAA,CAAa,QAAA,EAAU,IAAI,mBAAmB,CAAA;AACnE,MAAA,uBAAA,CAAwB,OAAA,CAAQ,QAAA,EAAU,EAAE,MAAA,EAAQ,OAAO,CAAA;AAC3D,MAAA,OAAO,QAAA;AAAA,IACT;AAAA,GACD,CAAA;AAAA,EACD,gBAAA,CAAiB;AAAA,IACf,GAAA,EAAK,aAAA;AAAA,IACL,IAAA,EAAM,EAAE,QAAA,EAAU,WAAA,EAAY;AAAA,IAC9B,OAAA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AAA,OAC5D,CAAA;AAAA,IACH;AAAA,GACD,CAAA;AAAA,EACD,gBAAA,CAAiB;AAAA,IACf,GAAA,EAAK,gBAAA;AAAA,IACL,IAAA,EAAM;AAAA,MACJ,SAAA,EAAW,eAAA;AAAA,MACX,QAAA,EAAU,cAAA;AAAA,MACV,MAAA,EAAQ;AAAA,KACV;AAAA,IACA,OAAA,EAAS,CAAC,EAAE,MAAA,EAAQ,SAAA,EAAW,QAAA,EAAS,KACtC,qBAAA,CAAsB,MAAA,CAAO,EAAE,MAAA,EAAQ,SAAA,EAAW,UAAU;AAAA,GAC/D;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"icons.esm.js","sources":["../../../../../../../packages/app-defaults/src/defaults/icons.tsx"],"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\nimport { IconComponent } from '@backstage/core-plugin-api';\nimport MuiApartmentIcon from '@material-ui/icons/Apartment';\nimport MuiBrokenImageIcon from '@material-ui/icons/BrokenImage';\nimport MuiCategoryIcon from '@material-ui/icons/Category';\nimport MuiCreateNewFolderIcon from '@material-ui/icons/CreateNewFolder';\nimport MuiSubjectIcon from '@material-ui/icons/Subject';\nimport MuiSearchIcon from '@material-ui/icons/Search';\nimport MuiChatIcon from '@material-ui/icons/Chat';\nimport MuiDashboardIcon from '@material-ui/icons/Dashboard';\nimport MuiDocsIcon from '@material-ui/icons/Description';\nimport MuiEmailIcon from '@material-ui/icons/Email';\nimport MuiExtensionIcon from '@material-ui/icons/Extension';\nimport MuiGitHubIcon from '@material-ui/icons/GitHub';\nimport MuiHelpIcon from '@material-ui/icons/Help';\nimport MuiLocationOnIcon from '@material-ui/icons/LocationOn';\nimport MuiMemoryIcon from '@material-ui/icons/Memory';\nimport MuiMenuBookIcon from '@material-ui/icons/MenuBook';\nimport MuiPeopleIcon from '@material-ui/icons/People';\nimport MuiPersonIcon from '@material-ui/icons/Person';\nimport MuiWarningIcon from '@material-ui/icons/Warning';\nimport MuiStorageIcon from '@material-ui/icons/Storage';\nimport MuiFeaturedPlayListIcon from '@material-ui/icons/FeaturedPlayList';\nimport Star from '@material-ui/icons/Star';\nimport StarBorder from '@material-ui/icons/StarBorder';\nimport OpenInNew from '@material-ui/icons/OpenInNew';\n\nexport const icons = {\n brokenImage: MuiBrokenImageIcon as IconComponent,\n // To be confirmed: see https://github.com/backstage/backstage/issues/4970\n catalog: MuiMenuBookIcon as IconComponent,\n scaffolder: MuiCreateNewFolderIcon as IconComponent,\n techdocs: MuiSubjectIcon as IconComponent,\n search: MuiSearchIcon as IconComponent,\n chat: MuiChatIcon as IconComponent,\n dashboard: MuiDashboardIcon as IconComponent,\n docs: MuiDocsIcon as IconComponent,\n email: MuiEmailIcon as IconComponent,\n github: MuiGitHubIcon as IconComponent,\n group: MuiPeopleIcon as IconComponent,\n help: MuiHelpIcon as IconComponent,\n 'kind:api': MuiExtensionIcon as IconComponent,\n 'kind:component': MuiMemoryIcon as IconComponent,\n 'kind:domain': MuiApartmentIcon as IconComponent,\n 'kind:group': MuiPeopleIcon as IconComponent,\n 'kind:location': MuiLocationOnIcon as IconComponent,\n 'kind:system': MuiCategoryIcon as IconComponent,\n 'kind:user': MuiPersonIcon as IconComponent,\n 'kind:resource': MuiStorageIcon as IconComponent,\n 'kind:template': MuiFeaturedPlayListIcon as IconComponent,\n user: MuiPersonIcon as IconComponent,\n warning: MuiWarningIcon as IconComponent,\n star: Star as IconComponent,\n unstarred: StarBorder as IconComponent,\n externalLink: OpenInNew as IconComponent,\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA0CO,MAAM,KAAQ,GAAA;AAAA,EACnB,WAAa,EAAA,kBAAA;AAAA;AAAA,EAEb,OAAS,EAAA,eAAA;AAAA,EACT,UAAY,EAAA,sBAAA;AAAA,EACZ,QAAU,EAAA,cAAA;AAAA,EACV,MAAQ,EAAA,aAAA;AAAA,EACR,IAAM,EAAA,WAAA;AAAA,EACN,SAAW,EAAA,gBAAA;AAAA,EACX,IAAM,EAAA,WAAA;AAAA,EACN,KAAO,EAAA,YAAA;AAAA,EACP,MAAQ,EAAA,aAAA;AAAA,EACR,KAAO,EAAA,aAAA;AAAA,EACP,IAAM,EAAA,WAAA;AAAA,EACN,UAAY,EAAA,gBAAA;AAAA,EACZ,gBAAkB,EAAA,aAAA;AAAA,EAClB,aAAe,EAAA,gBAAA;AAAA,EACf,YAAc,EAAA,aAAA;AAAA,EACd,eAAiB,EAAA,iBAAA;AAAA,EACjB,aAAe,EAAA,eAAA;AAAA,EACf,WAAa,EAAA,aAAA;AAAA,EACb,eAAiB,EAAA,cAAA;AAAA,EACjB,eAAiB,EAAA,uBAAA;AAAA,EACjB,IAAM,EAAA,aAAA;AAAA,EACN,OAAS,EAAA,cAAA;AAAA,EACT,IAAM,EAAA,IAAA;AAAA,EACN,SAAW,EAAA,UAAA;AAAA,EACX,YAAc,EAAA;AAChB;;;;"}
1
+ {"version":3,"file":"icons.esm.js","sources":["../../../../../../../packages/app-defaults/src/defaults/icons.tsx"],"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\nimport { IconComponent } from '@backstage/core-plugin-api';\nimport MuiApartmentIcon from '@material-ui/icons/Apartment';\nimport MuiBrokenImageIcon from '@material-ui/icons/BrokenImage';\nimport MuiCategoryIcon from '@material-ui/icons/Category';\nimport MuiCreateNewFolderIcon from '@material-ui/icons/CreateNewFolder';\nimport MuiSubjectIcon from '@material-ui/icons/Subject';\nimport MuiSearchIcon from '@material-ui/icons/Search';\nimport MuiChatIcon from '@material-ui/icons/Chat';\nimport MuiDashboardIcon from '@material-ui/icons/Dashboard';\nimport MuiDocsIcon from '@material-ui/icons/Description';\nimport MuiEmailIcon from '@material-ui/icons/Email';\nimport MuiExtensionIcon from '@material-ui/icons/Extension';\nimport MuiGitHubIcon from '@material-ui/icons/GitHub';\nimport MuiHelpIcon from '@material-ui/icons/Help';\nimport MuiLocationOnIcon from '@material-ui/icons/LocationOn';\nimport MuiMemoryIcon from '@material-ui/icons/Memory';\nimport MuiMenuBookIcon from '@material-ui/icons/MenuBook';\nimport MuiPeopleIcon from '@material-ui/icons/People';\nimport MuiPersonIcon from '@material-ui/icons/Person';\nimport MuiWarningIcon from '@material-ui/icons/Warning';\nimport MuiStorageIcon from '@material-ui/icons/Storage';\nimport MuiFeaturedPlayListIcon from '@material-ui/icons/FeaturedPlayList';\nimport Star from '@material-ui/icons/Star';\nimport StarBorder from '@material-ui/icons/StarBorder';\nimport OpenInNew from '@material-ui/icons/OpenInNew';\n\nexport const icons = {\n brokenImage: MuiBrokenImageIcon as IconComponent,\n // To be confirmed: see https://github.com/backstage/backstage/issues/4970\n catalog: MuiMenuBookIcon as IconComponent,\n scaffolder: MuiCreateNewFolderIcon as IconComponent,\n techdocs: MuiSubjectIcon as IconComponent,\n search: MuiSearchIcon as IconComponent,\n chat: MuiChatIcon as IconComponent,\n dashboard: MuiDashboardIcon as IconComponent,\n docs: MuiDocsIcon as IconComponent,\n email: MuiEmailIcon as IconComponent,\n github: MuiGitHubIcon as IconComponent,\n group: MuiPeopleIcon as IconComponent,\n help: MuiHelpIcon as IconComponent,\n 'kind:api': MuiExtensionIcon as IconComponent,\n 'kind:component': MuiMemoryIcon as IconComponent,\n 'kind:domain': MuiApartmentIcon as IconComponent,\n 'kind:group': MuiPeopleIcon as IconComponent,\n 'kind:location': MuiLocationOnIcon as IconComponent,\n 'kind:system': MuiCategoryIcon as IconComponent,\n 'kind:user': MuiPersonIcon as IconComponent,\n 'kind:resource': MuiStorageIcon as IconComponent,\n 'kind:template': MuiFeaturedPlayListIcon as IconComponent,\n user: MuiPersonIcon as IconComponent,\n warning: MuiWarningIcon as IconComponent,\n star: Star as IconComponent,\n unstarred: StarBorder as IconComponent,\n externalLink: OpenInNew as IconComponent,\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA0CO,MAAM,KAAA,GAAQ;AAAA,EACnB,WAAA,EAAa,kBAAA;AAAA;AAAA,EAEb,OAAA,EAAS,eAAA;AAAA,EACT,UAAA,EAAY,sBAAA;AAAA,EACZ,QAAA,EAAU,cAAA;AAAA,EACV,MAAA,EAAQ,aAAA;AAAA,EACR,IAAA,EAAM,WAAA;AAAA,EACN,SAAA,EAAW,gBAAA;AAAA,EACX,IAAA,EAAM,WAAA;AAAA,EACN,KAAA,EAAO,YAAA;AAAA,EACP,MAAA,EAAQ,aAAA;AAAA,EACR,KAAA,EAAO,aAAA;AAAA,EACP,IAAA,EAAM,WAAA;AAAA,EACN,UAAA,EAAY,gBAAA;AAAA,EACZ,gBAAA,EAAkB,aAAA;AAAA,EAClB,aAAA,EAAe,gBAAA;AAAA,EACf,YAAA,EAAc,aAAA;AAAA,EACd,eAAA,EAAiB,iBAAA;AAAA,EACjB,aAAA,EAAe,eAAA;AAAA,EACf,WAAA,EAAa,aAAA;AAAA,EACb,eAAA,EAAiB,cAAA;AAAA,EACjB,eAAA,EAAiB,uBAAA;AAAA,EACjB,IAAA,EAAM,aAAA;AAAA,EACN,OAAA,EAAS,cAAA;AAAA,EACT,IAAA,EAAM,IAAA;AAAA,EACN,SAAA,EAAW,UAAA;AAAA,EACX,YAAA,EAAc;AAChB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"AlertApiForwarder.esm.js","sources":["../../../../../../../../../packages/core-app-api/src/apis/implementations/AlertApi/AlertApiForwarder.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\nimport { AlertApi, AlertMessage } from '@backstage/core-plugin-api';\nimport { Observable } from '@backstage/types';\nimport { PublishSubject } from '../../../lib/subjects';\n\n/**\n * Base implementation for the AlertApi that simply forwards alerts to consumers.\n *\n * @public\n */\nexport class AlertApiForwarder implements AlertApi {\n private readonly subject = new PublishSubject<AlertMessage>();\n\n post(alert: AlertMessage) {\n this.subject.next(alert);\n }\n\n alert$(): Observable<AlertMessage> {\n return this.subject;\n }\n}\n"],"names":[],"mappings":";;AAyBO,MAAM,iBAAsC,CAAA;AAAA,EAChC,OAAA,GAAU,IAAI,cAA6B,EAAA;AAAA,EAE5D,KAAK,KAAqB,EAAA;AACxB,IAAK,IAAA,CAAA,OAAA,CAAQ,KAAK,KAAK,CAAA;AAAA;AACzB,EAEA,MAAmC,GAAA;AACjC,IAAA,OAAO,IAAK,CAAA,OAAA;AAAA;AAEhB;;;;"}
1
+ {"version":3,"file":"AlertApiForwarder.esm.js","sources":["../../../../../../../../../packages/core-app-api/src/apis/implementations/AlertApi/AlertApiForwarder.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\nimport { AlertApi, AlertMessage } from '@backstage/core-plugin-api';\nimport { Observable } from '@backstage/types';\nimport { PublishSubject } from '../../../lib/subjects';\n\n/**\n * Base implementation for the AlertApi that simply forwards alerts to consumers.\n *\n * @public\n */\nexport class AlertApiForwarder implements AlertApi {\n private readonly subject = new PublishSubject<AlertMessage>();\n\n post(alert: AlertMessage) {\n this.subject.next(alert);\n }\n\n alert$(): Observable<AlertMessage> {\n return this.subject;\n }\n}\n"],"names":[],"mappings":";;AAyBO,MAAM,iBAAA,CAAsC;AAAA,EAChC,OAAA,GAAU,IAAI,cAAA,EAA6B;AAAA,EAE5D,KAAK,KAAA,EAAqB;AACxB,IAAA,IAAA,CAAK,OAAA,CAAQ,KAAK,KAAK,CAAA;AAAA,EACzB;AAAA,EAEA,MAAA,GAAmC;AACjC,IAAA,OAAO,IAAA,CAAK,OAAA;AAAA,EACd;AACF;;;;"}