@backstage/plugin-app 0.1.11-next.1 → 0.2.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/dist/defaultApis.esm.js +217 -259
- package/dist/defaultApis.esm.js.map +1 -1
- package/dist/extensions/AppLanguageApi.esm.js +6 -7
- package/dist/extensions/AppLanguageApi.esm.js.map +1 -1
- package/dist/extensions/AppNav.esm.js +54 -55
- package/dist/extensions/AppNav.esm.js.map +1 -1
- package/dist/extensions/AppRoutes.esm.js +1 -1
- package/dist/extensions/AppRoutes.esm.js.map +1 -1
- package/dist/extensions/AppThemeApi.esm.js +8 -7
- package/dist/extensions/AppThemeApi.esm.js.map +1 -1
- package/dist/extensions/ComponentsApi.esm.js +8 -7
- package/dist/extensions/ComponentsApi.esm.js.map +1 -1
- package/dist/extensions/FeatureFlagsApi.esm.js +6 -8
- package/dist/extensions/FeatureFlagsApi.esm.js.map +1 -1
- package/dist/extensions/IconsApi.esm.js +8 -7
- package/dist/extensions/IconsApi.esm.js.map +1 -1
- package/dist/extensions/TranslationsApi.esm.js +4 -4
- package/dist/extensions/TranslationsApi.esm.js.map +1 -1
- package/dist/index.d.ts +28 -85
- package/dist/packages/core-app-api/src/lib/AuthSessionManager/RefreshingAuthSessionManager.esm.js +16 -2
- package/dist/packages/core-app-api/src/lib/AuthSessionManager/RefreshingAuthSessionManager.esm.js.map +1 -1
- package/dist/plugins/app/package.json.esm.js +1 -1
- package/package.json +10 -10
- package/dist/packages/app/src/components/Root/LogoFull.esm.js +0 -33
- package/dist/packages/app/src/components/Root/LogoFull.esm.js.map +0 -1
- package/dist/packages/app/src/components/Root/LogoIcon.esm.js +0 -33
- package/dist/packages/app/src/components/Root/LogoIcon.esm.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultApis.esm.js","sources":["../src/defaultApis.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport {\n AlertApiForwarder,\n NoOpAnalyticsApi,\n ErrorApiForwarder,\n ErrorAlerter,\n GoogleAuth,\n GithubAuth,\n OktaAuth,\n GitlabAuth,\n MicrosoftAuth,\n BitbucketAuth,\n BitbucketServerAuth,\n OAuthRequestManager,\n WebStorage,\n UrlPatternDiscovery,\n OneLoginAuth,\n UnhandledErrorForwarder,\n AtlassianAuth,\n createFetchApi,\n FetchMiddlewares,\n VMwareCloudAuth,\n} from '../../../packages/core-app-api/src/apis/implementations';\n\nimport {\n 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 { ApiBlueprint, dialogApiRef } from '@backstage/frontend-plugin-api';\nimport {\n ScmAuth,\n ScmIntegrationsApi,\n scmIntegrationsApiRef,\n} from '@backstage/integration-react';\nimport {\n permissionApiRef,\n IdentityPermissionApi,\n} from '@backstage/plugin-permission-react';\nimport { DefaultDialogApi } from './apis/DefaultDialogApi';\n\nexport const apis = [\n ApiBlueprint.make({\n name: 'dialog',\n params: {\n factory: createApiFactory({\n api: dialogApiRef,\n deps: {},\n factory: () => new DefaultDialogApi(),\n }),\n },\n }),\n ApiBlueprint.make({\n name: 'discovery',\n params: {\n factory: createApiFactory({\n api: discoveryApiRef,\n deps: { configApi: configApiRef },\n factory: ({ configApi }) =>\n UrlPatternDiscovery.compile(\n `${configApi.getString('backend.baseUrl')}/api/{{ pluginId }}`,\n ),\n }),\n },\n }),\n ApiBlueprint.make({\n name: 'alert',\n params: {\n factory: createApiFactory({\n api: alertApiRef,\n deps: {},\n factory: () => new AlertApiForwarder(),\n }),\n },\n }),\n ApiBlueprint.make({\n name: 'analytics',\n params: {\n factory: createApiFactory({\n api: analyticsApiRef,\n deps: {},\n factory: () => new NoOpAnalyticsApi(),\n }),\n },\n }),\n ApiBlueprint.make({\n name: 'error',\n params: {\n factory: 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 },\n }),\n ApiBlueprint.make({\n name: 'storage',\n params: {\n factory: createApiFactory({\n api: storageApiRef,\n deps: { errorApi: errorApiRef },\n factory: ({ errorApi }) => WebStorage.create({ errorApi }),\n }),\n },\n }),\n ApiBlueprint.make({\n name: 'fetch',\n params: {\n factory: 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 },\n }),\n ApiBlueprint.make({\n name: 'oauth-request',\n params: {\n factory: createApiFactory({\n api: oauthRequestApiRef,\n deps: {},\n factory: () => new OAuthRequestManager(),\n }),\n },\n }),\n ApiBlueprint.make({\n name: 'google-auth',\n params: {\n factory: 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 },\n }),\n ApiBlueprint.make({\n name: 'microsoft-auth',\n params: {\n factory: 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 },\n }),\n ApiBlueprint.make({\n name: 'github-auth',\n params: {\n factory: 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 },\n }),\n ApiBlueprint.make({\n name: 'okta-auth',\n params: {\n factory: 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 },\n }),\n ApiBlueprint.make({\n name: 'gitlab-auth',\n params: {\n factory: 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 },\n }),\n ApiBlueprint.make({\n name: 'onelogin-auth',\n params: {\n factory: 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 },\n }),\n ApiBlueprint.make({\n name: 'bitbucket-auth',\n params: {\n factory: 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 },\n }),\n ApiBlueprint.make({\n name: 'bitbucket-server-auth',\n params: {\n factory: 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 },\n }),\n ApiBlueprint.make({\n name: 'atlassian-auth',\n params: {\n factory: 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 },\n }),\n ApiBlueprint.make({\n name: 'vmware-cloud-auth',\n params: {\n factory: 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 },\n }),\n ApiBlueprint.make({\n name: 'permission',\n params: {\n factory: 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 }),\n ApiBlueprint.make({\n name: 'scm-auth',\n params: {\n factory: ScmAuth.createDefaultApiFactory(),\n },\n }),\n ApiBlueprint.make({\n name: 'scm-integrations',\n params: {\n factory: createApiFactory({\n api: scmIntegrationsApiRef,\n deps: { configApi: configApiRef },\n factory: ({ configApi }) => ScmIntegrationsApi.fromConfig(configApi),\n }),\n },\n }),\n] as const;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0EO,MAAM,IAAO,GAAA;AAAA,EAClB,aAAa,IAAK,CAAA;AAAA,IAChB,IAAM,EAAA,QAAA;AAAA,IACN,MAAQ,EAAA;AAAA,MACN,SAAS,gBAAiB,CAAA;AAAA,QACxB,GAAK,EAAA,YAAA;AAAA,QACL,MAAM,EAAC;AAAA,QACP,OAAA,EAAS,MAAM,IAAI,gBAAiB;AAAA,OACrC;AAAA;AACH,GACD,CAAA;AAAA,EACD,aAAa,IAAK,CAAA;AAAA,IAChB,IAAM,EAAA,WAAA;AAAA,IACN,MAAQ,EAAA;AAAA,MACN,SAAS,gBAAiB,CAAA;AAAA,QACxB,GAAK,EAAA,eAAA;AAAA,QACL,IAAA,EAAM,EAAE,SAAA,EAAW,YAAa,EAAA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AiB,WAAgB,KAAA;AACzD,UAAA,OAAO,gBAAgB,MAAO,CAAA;AAAA,YAC5B,SAAA;AAAA,YACA,YAAA;AAAA,YACA,eAAA;AAAA,YACA,WAAA,EAAa,SAAU,CAAA,iBAAA,CAAkB,kBAAkB;AAAA,WAC5D,CAAA;AAAA;AACH,OACD;AAAA;AACH,GACD,CAAA;AAAA,EACD,aAAa,IAAK,CAAA;AAAA,IAChB,IAAM,EAAA,YAAA;AAAA,IACN,MAAQ,EAAA;AAAA,MACN,SAAS,gBAAiB,CAAA;AAAA,QACxB,GAAK,EAAA,gBAAA;AAAA,QACL,IAAM,EAAA;AAAA,UACJ,SAAW,EAAA,eAAA;AAAA,UACX,QAAU,EAAA,cAAA;AAAA,UACV,MAAQ,EAAA;AAAA,SACV;AAAA,QACA,OAAS,EAAA,CAAC,EAAE,MAAA,EAAQ,SAAW,EAAA,QAAA,EAC7B,KAAA,qBAAA,CAAsB,MAAO,CAAA,EAAE,MAAQ,EAAA,SAAA,EAAW,UAAU;AAAA,OAC/D;AAAA;AACH,GACD,CAAA;AAAA,EACD,aAAa,IAAK,CAAA;AAAA,IAChB,IAAM,EAAA,UAAA;AAAA,IACN,MAAQ,EAAA;AAAA,MACN,OAAA,EAAS,QAAQ,uBAAwB;AAAA;AAC3C,GACD,CAAA;AAAA,EACD,aAAa,IAAK,CAAA;AAAA,IAChB,IAAM,EAAA,kBAAA;AAAA,IACN,MAAQ,EAAA;AAAA,MACN,SAAS,gBAAiB,CAAA;AAAA,QACxB,GAAK,EAAA,qBAAA;AAAA,QACL,IAAA,EAAM,EAAE,SAAA,EAAW,YAAa,EAAA;AAAA,QAChC,SAAS,CAAC,EAAE,WAAgB,KAAA,kBAAA,CAAmB,WAAW,SAAS;AAAA,OACpE;AAAA;AACH,GACD;AACH;;;;"}
|
|
1
|
+
{"version":3,"file":"defaultApis.esm.js","sources":["../src/defaultApis.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport {\n AlertApiForwarder,\n NoOpAnalyticsApi,\n ErrorApiForwarder,\n ErrorAlerter,\n GoogleAuth,\n GithubAuth,\n OktaAuth,\n GitlabAuth,\n MicrosoftAuth,\n BitbucketAuth,\n BitbucketServerAuth,\n OAuthRequestManager,\n WebStorage,\n UrlPatternDiscovery,\n OneLoginAuth,\n UnhandledErrorForwarder,\n AtlassianAuth,\n createFetchApi,\n FetchMiddlewares,\n VMwareCloudAuth,\n} from '../../../packages/core-app-api/src/apis/implementations';\n\nimport {\n alertApiRef,\n 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 { ApiBlueprint, dialogApiRef } from '@backstage/frontend-plugin-api';\nimport {\n ScmAuth,\n ScmIntegrationsApi,\n scmIntegrationsApiRef,\n} from '@backstage/integration-react';\nimport {\n permissionApiRef,\n IdentityPermissionApi,\n} from '@backstage/plugin-permission-react';\nimport { DefaultDialogApi } from './apis/DefaultDialogApi';\n\nexport const apis = [\n ApiBlueprint.make({\n name: 'dialog',\n params: define =>\n define({\n api: dialogApiRef,\n deps: {},\n factory: () => new DefaultDialogApi(),\n }),\n }),\n ApiBlueprint.make({\n name: 'discovery',\n params: define =>\n define({\n api: discoveryApiRef,\n deps: { configApi: configApiRef },\n factory: ({ configApi }) =>\n UrlPatternDiscovery.compile(\n `${configApi.getString('backend.baseUrl')}/api/{{ pluginId }}`,\n ),\n }),\n }),\n ApiBlueprint.make({\n name: 'alert',\n params: define =>\n define({\n api: alertApiRef,\n deps: {},\n factory: () => new AlertApiForwarder(),\n }),\n }),\n ApiBlueprint.make({\n name: 'analytics',\n params: define =>\n define({\n api: analyticsApiRef,\n deps: {},\n factory: () => new NoOpAnalyticsApi(),\n }),\n }),\n ApiBlueprint.make({\n name: 'error',\n params: define =>\n define({\n api: errorApiRef,\n deps: { alertApi: alertApiRef },\n factory: ({ alertApi }) => {\n const errorApi = new ErrorAlerter(alertApi, new ErrorApiForwarder());\n UnhandledErrorForwarder.forward(errorApi, { hidden: false });\n return errorApi;\n },\n }),\n }),\n ApiBlueprint.make({\n name: 'storage',\n params: define =>\n define({\n api: storageApiRef,\n deps: { errorApi: errorApiRef },\n factory: ({ errorApi }) => WebStorage.create({ errorApi }),\n }),\n }),\n ApiBlueprint.make({\n name: 'fetch',\n params: define =>\n define({\n api: fetchApiRef,\n deps: {\n configApi: configApiRef,\n identityApi: identityApiRef,\n discoveryApi: discoveryApiRef,\n },\n factory: ({ configApi, identityApi, discoveryApi }) => {\n return createFetchApi({\n middleware: [\n FetchMiddlewares.resolvePluginProtocol({\n discoveryApi,\n }),\n FetchMiddlewares.injectIdentityAuth({\n identityApi,\n config: configApi,\n }),\n ],\n });\n },\n }),\n }),\n ApiBlueprint.make({\n name: 'oauth-request',\n params: define =>\n define({\n api: oauthRequestApiRef,\n deps: {},\n factory: () => new OAuthRequestManager(),\n }),\n }),\n ApiBlueprint.make({\n name: 'google-auth',\n params: define =>\n define({\n api: googleAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n GoogleAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'microsoft-auth',\n params: define =>\n define({\n api: microsoftAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n MicrosoftAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'github-auth',\n params: define =>\n define({\n api: githubAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n GithubAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n defaultScopes: ['read:user'],\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'okta-auth',\n params: define =>\n define({\n api: oktaAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n OktaAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'gitlab-auth',\n params: define =>\n define({\n api: gitlabAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n GitlabAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'onelogin-auth',\n params: define =>\n define({\n api: oneloginAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n OneLoginAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'bitbucket-auth',\n params: define =>\n define({\n api: bitbucketAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n BitbucketAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n defaultScopes: ['account'],\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'bitbucket-server-auth',\n params: define =>\n define({\n api: bitbucketServerAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n BitbucketServerAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n defaultScopes: ['REPO_READ'],\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n }),\n ApiBlueprint.make({\n name: 'atlassian-auth',\n params: define =>\n define({\n api: atlassianAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) => {\n return AtlassianAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n });\n },\n }),\n }),\n ApiBlueprint.make({\n name: 'vmware-cloud-auth',\n params: define =>\n define({\n api: vmwareCloudAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) => {\n return VMwareCloudAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n });\n },\n }),\n }),\n ApiBlueprint.make({\n name: 'permission',\n params: define =>\n define({\n api: permissionApiRef,\n deps: {\n discovery: discoveryApiRef,\n identity: identityApiRef,\n config: configApiRef,\n },\n factory: ({ config, discovery, identity }) =>\n IdentityPermissionApi.create({ config, discovery, identity }),\n }),\n }),\n ApiBlueprint.make({\n name: 'scm-auth',\n params: define => define(ScmAuth.createDefaultApiFactory()),\n }),\n ApiBlueprint.make({\n name: 'scm-integrations',\n params: define =>\n define({\n api: scmIntegrationsApiRef,\n deps: { configApi: configApiRef },\n factory: ({ configApi }) => ScmIntegrationsApi.fromConfig(configApi),\n }),\n }),\n] as const;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEO,MAAM,IAAO,GAAA;AAAA,EAClB,aAAa,IAAK,CAAA;AAAA,IAChB,IAAM,EAAA,QAAA;AAAA,IACN,MAAA,EAAQ,YACN,MAAO,CAAA;AAAA,MACL,GAAK,EAAA,YAAA;AAAA,MACL,MAAM,EAAC;AAAA,MACP,OAAA,EAAS,MAAM,IAAI,gBAAiB;AAAA,KACrC;AAAA,GACJ,CAAA;AAAA,EACD,aAAa,IAAK,CAAA;AAAA,IAChB,IAAM,EAAA,WAAA;AAAA,IACN,MAAA,EAAQ,YACN,MAAO,CAAA;AAAA,MACL,GAAK,EAAA,eAAA;AAAA,MACL,IAAA,EAAM,EAAE,SAAA,EAAW,YAAa,EAAA;AAAA,MAChC,OAAS,EAAA,CAAC,EAAE,SAAA,OACV,mBAAoB,CAAA,OAAA;AAAA,QAClB,CAAG,EAAA,SAAA,CAAU,SAAU,CAAA,iBAAiB,CAAC,CAAA,mBAAA;AAAA;AAC3C,KACH;AAAA,GACJ,CAAA;AAAA,EACD,aAAa,IAAK,CAAA;AAAA,IAChB,IAAM,EAAA,OAAA;AAAA,IACN,MAAA,EAAQ,YACN,MAAO,CAAA;AAAA,MACL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W,UAAU;AAAA,KAC/D;AAAA,GACJ,CAAA;AAAA,EACD,aAAa,IAAK,CAAA;AAAA,IAChB,IAAM,EAAA,UAAA;AAAA,IACN,MAAQ,EAAA,CAAA,MAAA,KAAU,MAAO,CAAA,OAAA,CAAQ,yBAAyB;AAAA,GAC3D,CAAA;AAAA,EACD,aAAa,IAAK,CAAA;AAAA,IAChB,IAAM,EAAA,kBAAA;AAAA,IACN,MAAA,EAAQ,YACN,MAAO,CAAA;AAAA,MACL,GAAK,EAAA,qBAAA;AAAA,MACL,IAAA,EAAM,EAAE,SAAA,EAAW,YAAa,EAAA;AAAA,MAChC,SAAS,CAAC,EAAE,WAAgB,KAAA,kBAAA,CAAmB,WAAW,SAAS;AAAA,KACpE;AAAA,GACJ;AACH;;;;"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { AppLanguageSelector } from '../packages/core-app-api/src/apis/implementations/AppLanguageApi/AppLanguageSelector.esm.js';
|
|
2
2
|
import { appLanguageApiRef } from '@backstage/core-plugin-api/alpha';
|
|
3
|
-
import { ApiBlueprint
|
|
3
|
+
import { ApiBlueprint } from '@backstage/frontend-plugin-api';
|
|
4
4
|
|
|
5
5
|
const AppLanguageApi = ApiBlueprint.make({
|
|
6
6
|
name: "app-language",
|
|
7
|
-
params: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
7
|
+
params: (define) => define({
|
|
8
|
+
api: appLanguageApiRef,
|
|
9
|
+
deps: {},
|
|
10
|
+
factory: () => AppLanguageSelector.createWithStorage()
|
|
11
|
+
})
|
|
13
12
|
});
|
|
14
13
|
|
|
15
14
|
export { AppLanguageApi };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppLanguageApi.esm.js","sources":["../../src/extensions/AppLanguageApi.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { AppLanguageSelector } from '../../../../packages/core-app-api/src/apis/implementations/AppLanguageApi';\nimport { appLanguageApiRef } from '@backstage/core-plugin-api/alpha';\nimport { ApiBlueprint
|
|
1
|
+
{"version":3,"file":"AppLanguageApi.esm.js","sources":["../../src/extensions/AppLanguageApi.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { AppLanguageSelector } from '../../../../packages/core-app-api/src/apis/implementations/AppLanguageApi';\nimport { appLanguageApiRef } from '@backstage/core-plugin-api/alpha';\nimport { ApiBlueprint } from '@backstage/frontend-plugin-api';\n\nexport const AppLanguageApi = ApiBlueprint.make({\n name: 'app-language',\n params: define =>\n define({\n api: appLanguageApiRef,\n deps: {},\n factory: () => AppLanguageSelector.createWithStorage(),\n }),\n});\n"],"names":[],"mappings":";;;;AAqBa,MAAA,cAAA,GAAiB,aAAa,IAAK,CAAA;AAAA,EAC9C,IAAM,EAAA,cAAA;AAAA,EACN,MAAA,EAAQ,YACN,MAAO,CAAA;AAAA,IACL,GAAK,EAAA,iBAAA;AAAA,IACL,MAAM,EAAC;AAAA,IACP,OAAA,EAAS,MAAM,mBAAA,CAAoB,iBAAkB;AAAA,GACtD;AACL,CAAC;;;;"}
|
|
@@ -1,69 +1,68 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { sidebarConfig, Sidebar, SidebarDivider, useSidebarOpenState, Link, SidebarItem } from '@backstage/core-components';
|
|
6
|
-
import LogoIcon from '../packages/app/src/components/Root/LogoIcon.esm.js';
|
|
7
|
-
import LogoFull from '../packages/app/src/components/Root/LogoFull.esm.js';
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { createExtension, createExtensionInput, NavItemBlueprint, NavContentBlueprint, coreExtensionData, useApi, routeResolutionApiRef } from '@backstage/frontend-plugin-api';
|
|
3
|
+
import { Sidebar, SidebarItem } from '@backstage/core-components';
|
|
4
|
+
import { useMemo } from 'react';
|
|
8
5
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
6
|
+
function DefaultNavContent(props) {
|
|
7
|
+
return /* @__PURE__ */ jsx(Sidebar, { children: props.items.map((item, index) => /* @__PURE__ */ jsx(
|
|
8
|
+
SidebarItem,
|
|
9
|
+
{
|
|
10
|
+
to: item.to,
|
|
11
|
+
icon: item.icon,
|
|
12
|
+
text: item.text
|
|
13
|
+
},
|
|
14
|
+
index
|
|
15
|
+
)) });
|
|
16
|
+
}
|
|
17
|
+
function NavContentRenderer(props) {
|
|
18
|
+
const routeResolutionApi = useApi(routeResolutionApiRef);
|
|
19
|
+
const items = useMemo(() => {
|
|
20
|
+
return props.items.flatMap((item) => {
|
|
21
|
+
const link = routeResolutionApi.resolve(item.routeRef);
|
|
22
|
+
if (!link) {
|
|
23
|
+
console.warn(
|
|
24
|
+
`NavItemBlueprint: unable to resolve route ref ${item.routeRef}`
|
|
25
|
+
);
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
return [
|
|
29
|
+
{
|
|
30
|
+
to: link(),
|
|
31
|
+
text: item.title,
|
|
32
|
+
icon: item.icon,
|
|
33
|
+
title: item.title,
|
|
34
|
+
routeRef: item.routeRef
|
|
35
|
+
}
|
|
36
|
+
];
|
|
37
|
+
});
|
|
38
|
+
}, [props.items, routeResolutionApi]);
|
|
39
|
+
return /* @__PURE__ */ jsx(props.Content, { items });
|
|
40
|
+
}
|
|
36
41
|
const AppNav = createExtension({
|
|
37
42
|
name: "nav",
|
|
38
43
|
attachTo: { id: "app/layout", input: "nav" },
|
|
39
44
|
inputs: {
|
|
40
45
|
items: createExtensionInput([NavItemBlueprint.dataRefs.target]),
|
|
41
|
-
|
|
46
|
+
content: createExtensionInput([NavContentBlueprint.dataRefs.component], {
|
|
42
47
|
singleton: true,
|
|
43
48
|
optional: true
|
|
44
49
|
})
|
|
45
50
|
},
|
|
46
51
|
output: [coreExtensionData.reactElement],
|
|
47
|
-
factory
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
key: index
|
|
62
|
-
}
|
|
63
|
-
))
|
|
64
|
-
] })
|
|
65
|
-
)
|
|
66
|
-
]
|
|
52
|
+
*factory({ inputs }) {
|
|
53
|
+
const Content = inputs.content?.get(NavContentBlueprint.dataRefs.component) ?? DefaultNavContent;
|
|
54
|
+
yield coreExtensionData.reactElement(
|
|
55
|
+
/* @__PURE__ */ jsx(
|
|
56
|
+
NavContentRenderer,
|
|
57
|
+
{
|
|
58
|
+
items: inputs.items.map(
|
|
59
|
+
(item) => item.get(NavItemBlueprint.dataRefs.target)
|
|
60
|
+
),
|
|
61
|
+
Content
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
);
|
|
65
|
+
}
|
|
67
66
|
});
|
|
68
67
|
|
|
69
68
|
export { AppNav };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppNav.esm.js","sources":["../../src/extensions/AppNav.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createExtension,\n coreExtensionData,\n createExtensionInput,\n
|
|
1
|
+
{"version":3,"file":"AppNav.esm.js","sources":["../../src/extensions/AppNav.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createExtension,\n coreExtensionData,\n createExtensionInput,\n NavItemBlueprint,\n NavContentBlueprint,\n NavContentComponentProps,\n routeResolutionApiRef,\n IconComponent,\n RouteRef,\n useApi,\n NavContentComponent,\n} from '@backstage/frontend-plugin-api';\nimport { Sidebar, SidebarItem } from '@backstage/core-components';\nimport { useMemo } from 'react';\n\nfunction DefaultNavContent(props: NavContentComponentProps) {\n return (\n <Sidebar>\n {props.items.map((item, index) => (\n <SidebarItem\n to={item.to}\n icon={item.icon}\n text={item.text}\n key={index}\n />\n ))}\n </Sidebar>\n );\n}\n\n// This helps defer rendering until the app is being rendered, which is needed\n// because the RouteResolutionApi can't be called until the app has been fully initialized.\nfunction NavContentRenderer(props: {\n Content: NavContentComponent;\n items: Array<{\n title: string;\n icon: IconComponent;\n routeRef: RouteRef<undefined>;\n }>;\n}) {\n const routeResolutionApi = useApi(routeResolutionApiRef);\n\n const items = useMemo(() => {\n return props.items.flatMap(item => {\n const link = routeResolutionApi.resolve(item.routeRef);\n if (!link) {\n // eslint-disable-next-line no-console\n console.warn(\n `NavItemBlueprint: unable to resolve route ref ${item.routeRef}`,\n );\n return [];\n }\n return [\n {\n to: link(),\n text: item.title,\n icon: item.icon,\n title: item.title,\n routeRef: item.routeRef,\n },\n ];\n });\n }, [props.items, routeResolutionApi]);\n\n return <props.Content items={items} />;\n}\n\nexport const AppNav = createExtension({\n name: 'nav',\n attachTo: { id: 'app/layout', input: 'nav' },\n inputs: {\n items: createExtensionInput([NavItemBlueprint.dataRefs.target]),\n content: createExtensionInput([NavContentBlueprint.dataRefs.component], {\n singleton: true,\n optional: true,\n }),\n },\n output: [coreExtensionData.reactElement],\n *factory({ inputs }) {\n const Content =\n inputs.content?.get(NavContentBlueprint.dataRefs.component) ??\n DefaultNavContent;\n\n yield coreExtensionData.reactElement(\n <NavContentRenderer\n items={inputs.items.map(item =>\n item.get(NavItemBlueprint.dataRefs.target),\n )}\n Content={Content}\n />,\n );\n },\n});\n"],"names":[],"mappings":";;;;;AAgCA,SAAS,kBAAkB,KAAiC,EAAA;AAC1D,EAAA,2BACG,OACE,EAAA,EAAA,QAAA,EAAA,KAAA,CAAM,MAAM,GAAI,CAAA,CAAC,MAAM,KACtB,qBAAA,GAAA;AAAA,IAAC,WAAA;AAAA,IAAA;AAAA,MACC,IAAI,IAAK,CAAA,EAAA;AAA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oB,CAAA,QAAA,CAAS,SAAS,CAAG,EAAA;AAAA,MACtE,SAAW,EAAA,IAAA;AAAA,MACX,QAAU,EAAA;AAAA,KACX;AAAA,GACH;AAAA,EACA,MAAA,EAAQ,CAAC,iBAAA,CAAkB,YAAY,CAAA;AAAA,EACvC,CAAC,OAAA,CAAQ,EAAE,MAAA,EAAU,EAAA;AACnB,IAAA,MAAM,UACJ,MAAO,CAAA,OAAA,EAAS,IAAI,mBAAoB,CAAA,QAAA,CAAS,SAAS,CAC1D,IAAA,iBAAA;AAEF,IAAA,MAAM,iBAAkB,CAAA,YAAA;AAAA,sBACtB,GAAA;AAAA,QAAC,kBAAA;AAAA,QAAA;AAAA,UACC,KAAA,EAAO,OAAO,KAAM,CAAA,GAAA;AAAA,YAAI,CACtB,IAAA,KAAA,IAAA,CAAK,GAAI,CAAA,gBAAA,CAAiB,SAAS,MAAM;AAAA,WAC3C;AAAA,UACA;AAAA;AAAA;AACF,KACF;AAAA;AAEJ,CAAC;;;;"}
|
|
@@ -20,7 +20,7 @@ const AppRoutes = createExtension({
|
|
|
20
20
|
);
|
|
21
21
|
const element = useRoutes([
|
|
22
22
|
...inputs.routes.map((route) => ({
|
|
23
|
-
path: `${route.get(coreExtensionData.routePath)}/*`,
|
|
23
|
+
path: `${route.get(coreExtensionData.routePath).replace(/\/$/, "")}/*`,
|
|
24
24
|
element: route.get(coreExtensionData.reactElement)
|
|
25
25
|
})),
|
|
26
26
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppRoutes.esm.js","sources":["../../src/extensions/AppRoutes.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createExtension,\n coreExtensionData,\n createExtensionInput,\n coreComponentRefs,\n useComponentRef,\n} from '@backstage/frontend-plugin-api';\nimport { useRoutes } from 'react-router-dom';\n\nexport const AppRoutes = createExtension({\n name: 'routes',\n attachTo: { id: 'app/layout', input: 'content' },\n inputs: {\n routes: createExtensionInput([\n coreExtensionData.routePath,\n coreExtensionData.routeRef.optional(),\n coreExtensionData.reactElement,\n ]),\n },\n output: [coreExtensionData.reactElement],\n factory({ inputs }) {\n const Routes = () => {\n const NotFoundErrorPage = useComponentRef(\n coreComponentRefs.notFoundErrorPage,\n );\n\n const element = useRoutes([\n ...inputs.routes.map(route => ({\n path: `${route.get(coreExtensionData.routePath)}/*`,\n element: route.get(coreExtensionData.reactElement),\n })),\n {\n path: '*',\n element: <NotFoundErrorPage />,\n },\n ]);\n\n return element;\n };\n\n return [coreExtensionData.reactElement(<Routes />)];\n },\n});\n"],"names":[],"mappings":";;;;AAyBO,MAAM,YAAY,eAAgB,CAAA;AAAA,EACvC,IAAM,EAAA,QAAA;AAAA,EACN,QAAU,EAAA,EAAE,EAAI,EAAA,YAAA,EAAc,OAAO,SAAU,EAAA;AAAA,EAC/C,MAAQ,EAAA;AAAA,IACN,QAAQ,oBAAqB,CAAA;AAAA,MAC3B,iBAAkB,CAAA,SAAA;AAAA,MAClB,iBAAA,CAAkB,SAAS,QAAS,EAAA;AAAA,MACpC,iBAAkB,CAAA;AAAA,KACnB;AAAA,GACH;AAAA,EACA,MAAA,EAAQ,CAAC,iBAAA,CAAkB,YAAY,CAAA;AAAA,EACvC,OAAA,CAAQ,EAAE,MAAA,EAAU,EAAA;AAClB,IAAA,MAAM,SAAS,MAAM;AACnB,MAAA,MAAM,iBAAoB,GAAA,eAAA;AAAA,QACxB,iBAAkB,CAAA;AAAA,OACpB;AAEA,MAAA,MAAM,UAAU,SAAU,CAAA;AAAA,QACxB,GAAG,MAAA,CAAO,MAAO,CAAA,GAAA,CAAI,CAAU,KAAA,MAAA;AAAA,UAC7B,
|
|
1
|
+
{"version":3,"file":"AppRoutes.esm.js","sources":["../../src/extensions/AppRoutes.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createExtension,\n coreExtensionData,\n createExtensionInput,\n coreComponentRefs,\n useComponentRef,\n} from '@backstage/frontend-plugin-api';\nimport { useRoutes } from 'react-router-dom';\n\nexport const AppRoutes = createExtension({\n name: 'routes',\n attachTo: { id: 'app/layout', input: 'content' },\n inputs: {\n routes: createExtensionInput([\n coreExtensionData.routePath,\n coreExtensionData.routeRef.optional(),\n coreExtensionData.reactElement,\n ]),\n },\n output: [coreExtensionData.reactElement],\n factory({ inputs }) {\n const Routes = () => {\n const NotFoundErrorPage = useComponentRef(\n coreComponentRefs.notFoundErrorPage,\n );\n\n const element = useRoutes([\n ...inputs.routes.map(route => ({\n path: `${route\n .get(coreExtensionData.routePath)\n .replace(/\\/$/, '')}/*`,\n element: route.get(coreExtensionData.reactElement),\n })),\n {\n path: '*',\n element: <NotFoundErrorPage />,\n },\n ]);\n\n return element;\n };\n\n return [coreExtensionData.reactElement(<Routes />)];\n },\n});\n"],"names":[],"mappings":";;;;AAyBO,MAAM,YAAY,eAAgB,CAAA;AAAA,EACvC,IAAM,EAAA,QAAA;AAAA,EACN,QAAU,EAAA,EAAE,EAAI,EAAA,YAAA,EAAc,OAAO,SAAU,EAAA;AAAA,EAC/C,MAAQ,EAAA;AAAA,IACN,QAAQ,oBAAqB,CAAA;AAAA,MAC3B,iBAAkB,CAAA,SAAA;AAAA,MAClB,iBAAA,CAAkB,SAAS,QAAS,EAAA;AAAA,MACpC,iBAAkB,CAAA;AAAA,KACnB;AAAA,GACH;AAAA,EACA,MAAA,EAAQ,CAAC,iBAAA,CAAkB,YAAY,CAAA;AAAA,EACvC,OAAA,CAAQ,EAAE,MAAA,EAAU,EAAA;AAClB,IAAA,MAAM,SAAS,MAAM;AACnB,MAAA,MAAM,iBAAoB,GAAA,eAAA;AAAA,QACxB,iBAAkB,CAAA;AAAA,OACpB;AAEA,MAAA,MAAM,UAAU,SAAU,CAAA;AAAA,QACxB,GAAG,MAAA,CAAO,MAAO,CAAA,GAAA,CAAI,CAAU,KAAA,MAAA;AAAA,UAC7B,IAAA,EAAM,CAAG,EAAA,KAAA,CACN,GAAI,CAAA,iBAAA,CAAkB,SAAS,CAC/B,CAAA,OAAA,CAAQ,KAAO,EAAA,EAAE,CAAC,CAAA,EAAA,CAAA;AAAA,UACrB,OAAS,EAAA,KAAA,CAAM,GAAI,CAAA,iBAAA,CAAkB,YAAY;AAAA,SACjD,CAAA,CAAA;AAAA,QACF;AAAA,UACE,IAAM,EAAA,GAAA;AAAA,UACN,OAAA,sBAAU,iBAAkB,EAAA,EAAA;AAAA;AAC9B,OACD,CAAA;AAED,MAAO,OAAA,OAAA;AAAA,KACT;AAEA,IAAA,OAAO,CAAC,iBAAkB,CAAA,YAAA,iBAAc,GAAA,CAAA,MAAA,EAAA,EAAO,CAAE,CAAC,CAAA;AAAA;AAEtD,CAAC;;;;"}
|
|
@@ -2,7 +2,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { UnifiedThemeProvider, themes } from '@backstage/theme';
|
|
3
3
|
import DarkIcon from '@material-ui/icons/Brightness2';
|
|
4
4
|
import LightIcon from '@material-ui/icons/WbSunny';
|
|
5
|
-
import { ApiBlueprint, createExtensionInput, ThemeBlueprint,
|
|
5
|
+
import { ApiBlueprint, createExtensionInput, ThemeBlueprint, appThemeApiRef } from '@backstage/frontend-plugin-api';
|
|
6
6
|
import 'zen-observable';
|
|
7
7
|
import '@backstage/core-plugin-api';
|
|
8
8
|
import '../packages/core-app-api/src/apis/implementations/auth/saml/types.esm.js';
|
|
@@ -17,14 +17,15 @@ const AppThemeApi = ApiBlueprint.makeWithOverrides({
|
|
|
17
17
|
})
|
|
18
18
|
},
|
|
19
19
|
factory: (originalFactory, { inputs }) => {
|
|
20
|
-
return originalFactory(
|
|
21
|
-
|
|
22
|
-
appThemeApiRef,
|
|
23
|
-
|
|
20
|
+
return originalFactory(
|
|
21
|
+
(define) => define({
|
|
22
|
+
api: appThemeApiRef,
|
|
23
|
+
deps: {},
|
|
24
|
+
factory: () => AppThemeSelector.createWithStorage(
|
|
24
25
|
inputs.themes.map((i) => i.get(ThemeBlueprint.dataRefs.theme))
|
|
25
26
|
)
|
|
26
|
-
)
|
|
27
|
-
|
|
27
|
+
})
|
|
28
|
+
);
|
|
28
29
|
}
|
|
29
30
|
});
|
|
30
31
|
const LightTheme = ThemeBlueprint.make({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppThemeApi.esm.js","sources":["../../src/extensions/AppThemeApi.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n UnifiedThemeProvider,\n themes as builtinThemes,\n} from '@backstage/theme';\nimport DarkIcon from '@material-ui/icons/Brightness2';\nimport LightIcon from '@material-ui/icons/WbSunny';\nimport {\n createExtensionInput,\n ThemeBlueprint,\n ApiBlueprint,\n
|
|
1
|
+
{"version":3,"file":"AppThemeApi.esm.js","sources":["../../src/extensions/AppThemeApi.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n UnifiedThemeProvider,\n themes as builtinThemes,\n} from '@backstage/theme';\nimport DarkIcon from '@material-ui/icons/Brightness2';\nimport LightIcon from '@material-ui/icons/WbSunny';\nimport {\n createExtensionInput,\n ThemeBlueprint,\n ApiBlueprint,\n appThemeApiRef,\n} from '@backstage/frontend-plugin-api';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { AppThemeSelector } from '../../../../packages/core-app-api/src/apis/implementations';\n\n/**\n * Contains the themes installed into the app.\n */\nexport const AppThemeApi = ApiBlueprint.makeWithOverrides({\n name: 'app-theme',\n inputs: {\n themes: createExtensionInput([ThemeBlueprint.dataRefs.theme], {\n replaces: [{ id: 'app', input: 'themes' }],\n }),\n },\n factory: (originalFactory, { inputs }) => {\n return originalFactory(define =>\n define({\n api: appThemeApiRef,\n deps: {},\n factory: () =>\n AppThemeSelector.createWithStorage(\n inputs.themes.map(i => i.get(ThemeBlueprint.dataRefs.theme)),\n ),\n }),\n );\n },\n});\n\nexport const LightTheme = ThemeBlueprint.make({\n name: 'light',\n params: {\n theme: {\n id: 'light',\n title: 'Light Theme',\n variant: 'light',\n icon: <LightIcon />,\n Provider: ({ children }) => (\n <UnifiedThemeProvider theme={builtinThemes.light} children={children} />\n ),\n },\n },\n});\n\nexport const DarkTheme = ThemeBlueprint.make({\n name: 'dark',\n params: {\n theme: {\n id: 'dark',\n title: 'Dark Theme',\n variant: 'dark',\n icon: <DarkIcon />,\n Provider: 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;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,KAAO,EAAA;AAAA,MACL,EAAI,EAAA,MAAA;AAAA,MACJ,KAAO,EAAA,YAAA;AAAA,MACP,OAAS,EAAA,MAAA;AAAA,MACT,IAAA,sBAAO,QAAS,EAAA,EAAA,CAAA;AAAA,MAChB,QAAA,EAAU,CAAC,EAAE,QAAS,EAAA,yBACnB,oBAAqB,EAAA,EAAA,KAAA,EAAOA,MAAc,CAAA,IAAA,EAAM,QAAoB,EAAA;AAAA;AAEzE;AAEJ,CAAC;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiBlueprint, createExtensionInput, createComponentExtension,
|
|
1
|
+
import { ApiBlueprint, createExtensionInput, createComponentExtension, componentsApiRef } from '@backstage/frontend-plugin-api';
|
|
2
2
|
import { DefaultComponentsApi } from '../packages/frontend-app-api/src/apis/implementations/ComponentsApi/DefaultComponentsApi.esm.js';
|
|
3
3
|
|
|
4
4
|
const ComponentsApi = ApiBlueprint.makeWithOverrides({
|
|
@@ -10,16 +10,17 @@ const ComponentsApi = ApiBlueprint.makeWithOverrides({
|
|
|
10
10
|
)
|
|
11
11
|
},
|
|
12
12
|
factory: (originalFactory, { inputs }) => {
|
|
13
|
-
return originalFactory(
|
|
14
|
-
|
|
15
|
-
componentsApiRef,
|
|
16
|
-
|
|
13
|
+
return originalFactory(
|
|
14
|
+
(define) => define({
|
|
15
|
+
api: componentsApiRef,
|
|
16
|
+
deps: {},
|
|
17
|
+
factory: () => DefaultComponentsApi.fromComponents(
|
|
17
18
|
inputs.components.map(
|
|
18
19
|
(i) => i.get(createComponentExtension.componentDataRef)
|
|
19
20
|
)
|
|
20
21
|
)
|
|
21
|
-
)
|
|
22
|
-
|
|
22
|
+
})
|
|
23
|
+
);
|
|
23
24
|
}
|
|
24
25
|
});
|
|
25
26
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentsApi.esm.js","sources":["../../src/extensions/ComponentsApi.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createComponentExtension,\n createExtensionInput,\n ApiBlueprint,\n
|
|
1
|
+
{"version":3,"file":"ComponentsApi.esm.js","sources":["../../src/extensions/ComponentsApi.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createComponentExtension,\n createExtensionInput,\n ApiBlueprint,\n componentsApiRef,\n} from '@backstage/frontend-plugin-api';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { DefaultComponentsApi } from '../../../../packages/frontend-app-api/src/apis/implementations/ComponentsApi';\n\n/**\n * Contains the shareable components installed into the app.\n */\nexport const ComponentsApi = ApiBlueprint.makeWithOverrides({\n name: 'components',\n inputs: {\n components: createExtensionInput(\n [createComponentExtension.componentDataRef],\n { replaces: [{ id: 'app', input: 'components' }] },\n ),\n },\n factory: (originalFactory, { inputs }) => {\n return originalFactory(define =>\n define({\n api: componentsApiRef,\n deps: {},\n factory: () =>\n DefaultComponentsApi.fromComponents(\n inputs.components.map(i =>\n i.get(createComponentExtension.componentDataRef),\n ),\n ),\n }),\n );\n },\n});\n"],"names":[],"mappings":";;;AA4Ba,MAAA,aAAA,GAAgB,aAAa,iBAAkB,CAAA;AAAA,EAC1D,IAAM,EAAA,YAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,UAAY,EAAA,oBAAA;AAAA,MACV,CAAC,yBAAyB,gBAAgB,CAAA;AAAA,MAC1C,EAAE,UAAU,CAAC,EAAE,IAAI,KAAO,EAAA,KAAA,EAAO,YAAa,EAAC,CAAE;AAAA;AACnD,GACF;AAAA,EACA,OAAS,EAAA,CAAC,eAAiB,EAAA,EAAE,QAAa,KAAA;AACxC,IAAO,OAAA,eAAA;AAAA,MAAgB,YACrB,MAAO,CAAA;AAAA,QACL,GAAK,EAAA,gBAAA;AAAA,QACL,MAAM,EAAC;AAAA,QACP,OAAA,EAAS,MACP,oBAAqB,CAAA,cAAA;AAAA,UACnB,OAAO,UAAW,CAAA,GAAA;AAAA,YAAI,CACpB,CAAA,KAAA,CAAA,CAAE,GAAI,CAAA,wBAAA,CAAyB,gBAAgB;AAAA;AACjD;AACF,OACH;AAAA,KACH;AAAA;AAEJ,CAAC;;;;"}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { ApiBlueprint,
|
|
1
|
+
import { ApiBlueprint, featureFlagsApiRef } from '@backstage/frontend-plugin-api';
|
|
2
2
|
import { LocalStorageFeatureFlags } from '../packages/core-app-api/src/apis/implementations/FeatureFlagsApi/LocalStorageFeatureFlags.esm.js';
|
|
3
3
|
|
|
4
4
|
const FeatureFlagsApi = ApiBlueprint.make({
|
|
5
5
|
name: "feature-flags",
|
|
6
|
-
params: {
|
|
6
|
+
params: (define) => define({
|
|
7
7
|
// TODO: properly discovery feature flags, maybe rework the whole thing
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
})
|
|
13
|
-
}
|
|
8
|
+
api: featureFlagsApiRef,
|
|
9
|
+
deps: {},
|
|
10
|
+
factory: () => new LocalStorageFeatureFlags()
|
|
11
|
+
})
|
|
14
12
|
});
|
|
15
13
|
|
|
16
14
|
export { FeatureFlagsApi };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureFlagsApi.esm.js","sources":["../../src/extensions/FeatureFlagsApi.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n ApiBlueprint,\n
|
|
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: define =>\n define({\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,YACN,MAAO,CAAA;AAAA;AAAA,IAEL,GAAK,EAAA,kBAAA;AAAA,IACL,MAAM,EAAC;AAAA,IACP,OAAA,EAAS,MAAM,IAAI,wBAAyB;AAAA,GAC7C;AACL,CAAC;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiBlueprint, createExtensionInput, IconBundleBlueprint,
|
|
1
|
+
import { ApiBlueprint, createExtensionInput, IconBundleBlueprint, iconsApiRef } 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';
|
|
@@ -18,14 +18,15 @@ const IconsApi = ApiBlueprint.makeWithOverrides({
|
|
|
18
18
|
})
|
|
19
19
|
},
|
|
20
20
|
factory: (originalFactory, { inputs }) => {
|
|
21
|
-
return originalFactory(
|
|
22
|
-
|
|
23
|
-
iconsApiRef,
|
|
24
|
-
|
|
21
|
+
return originalFactory(
|
|
22
|
+
(define) => define({
|
|
23
|
+
api: iconsApiRef,
|
|
24
|
+
deps: {},
|
|
25
|
+
factory: () => new DefaultIconsApi(
|
|
25
26
|
inputs.icons.map((i) => i.get(IconBundleBlueprint.dataRefs.icons)).reduce((acc, bundle) => ({ ...acc, ...bundle }), icons)
|
|
26
27
|
)
|
|
27
|
-
)
|
|
28
|
-
|
|
28
|
+
})
|
|
29
|
+
);
|
|
29
30
|
}
|
|
30
31
|
});
|
|
31
32
|
|
|
@@ -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
|
|
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(define =>\n define({\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,YACrB,MAAO,CAAA;AAAA,QACL,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,4 +1,4 @@
|
|
|
1
|
-
import { ApiBlueprint, createExtensionInput, TranslationBlueprint
|
|
1
|
+
import { ApiBlueprint, createExtensionInput, TranslationBlueprint } from '@backstage/frontend-plugin-api';
|
|
2
2
|
import { translationApiRef, appLanguageApiRef } from '@backstage/core-plugin-api/alpha';
|
|
3
3
|
import { I18nextTranslationApi } from '../packages/core-app-api/src/apis/implementations/TranslationApi/I18nextTranslationApi.esm.js';
|
|
4
4
|
|
|
@@ -11,8 +11,8 @@ const TranslationsApi = ApiBlueprint.makeWithOverrides({
|
|
|
11
11
|
)
|
|
12
12
|
},
|
|
13
13
|
factory: (originalFactory, { inputs }) => {
|
|
14
|
-
return originalFactory(
|
|
15
|
-
|
|
14
|
+
return originalFactory(
|
|
15
|
+
(define) => define({
|
|
16
16
|
api: translationApiRef,
|
|
17
17
|
deps: { languageApi: appLanguageApiRef },
|
|
18
18
|
factory: ({ languageApi }) => I18nextTranslationApi.create({
|
|
@@ -22,7 +22,7 @@ const TranslationsApi = ApiBlueprint.makeWithOverrides({
|
|
|
22
22
|
)
|
|
23
23
|
})
|
|
24
24
|
})
|
|
25
|
-
|
|
25
|
+
);
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
|
|
@@ -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
|
|
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(define =>\n define({\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,YACrB,MAAO,CAAA;AAAA,QACL,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;;;;"}
|