@backstage/plugin-user-settings 0.7.9-next.3 → 0.7.10
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 +22 -0
- package/alpha/package.json +1 -1
- package/dist/alpha.d.ts +11 -14
- package/dist/alpha.esm.js +1 -1
- package/dist/esm/{index-37e5b999.esm.js → index-f399d158.esm.js} +2 -3
- package/dist/esm/index-f399d158.esm.js.map +1 -0
- package/dist/esm/{translation-7ceb8968.esm.js → translation-d20c444b.esm.js} +2 -5
- package/dist/esm/{translation-7ceb8968.esm.js.map → translation-d20c444b.esm.js.map} +1 -1
- package/dist/index.esm.js +25 -38
- package/dist/index.esm.js.map +1 -1
- package/package.json +12 -12
- package/dist/esm/index-37e5b999.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @backstage/plugin-user-settings
|
|
2
2
|
|
|
3
|
+
## 0.7.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 406b786a2a2c: Mark package as being free of side effects, allowing more optimized Webpack builds.
|
|
8
|
+
- ce77b23423cb: conditionally rendering the user email in user profile card
|
|
9
|
+
- e03f3ee2be94: changed auto theme tooltip title to camel case
|
|
10
|
+
- 8cec7664e146: Removed `@types/node` dependency
|
|
11
|
+
- 6e30769cc627: Introduced experimental support for internationalization.
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
- @backstage/plugin-catalog-react@1.8.4
|
|
14
|
+
- @backstage/core-components@0.13.5
|
|
15
|
+
- @backstage/core-app-api@1.10.0
|
|
16
|
+
- @backstage/core-plugin-api@1.6.0
|
|
17
|
+
- @backstage/errors@1.2.2
|
|
18
|
+
- @backstage/theme@0.4.2
|
|
19
|
+
- @backstage/types@1.1.1
|
|
20
|
+
|
|
21
|
+
## 0.7.9
|
|
22
|
+
|
|
23
|
+
Skipped due to publishing issues.
|
|
24
|
+
|
|
3
25
|
## 0.7.9-next.3
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/alpha.d.ts
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
import * as _backstage_core_plugin_api_alpha from '@backstage/core-plugin-api/alpha';
|
|
2
2
|
|
|
3
3
|
/** @alpha */
|
|
4
|
-
declare const userSettingsTranslationRef: _backstage_core_plugin_api_alpha.TranslationRef<{
|
|
5
|
-
language:
|
|
6
|
-
change_the_language:
|
|
7
|
-
theme:
|
|
8
|
-
theme_light:
|
|
9
|
-
theme_dark:
|
|
10
|
-
theme_auto:
|
|
11
|
-
change_the_theme_mode:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
select_theme_custom: string;
|
|
16
|
-
lng: string;
|
|
17
|
-
select_lng: string;
|
|
4
|
+
declare const userSettingsTranslationRef: _backstage_core_plugin_api_alpha.TranslationRef<"user-settings", {
|
|
5
|
+
readonly language: "Language";
|
|
6
|
+
readonly change_the_language: "Change the language";
|
|
7
|
+
readonly theme: "Theme";
|
|
8
|
+
readonly theme_light: "Light";
|
|
9
|
+
readonly theme_dark: "Dark";
|
|
10
|
+
readonly theme_auto: "Auto";
|
|
11
|
+
readonly change_the_theme_mode: "Change the theme mode";
|
|
12
|
+
readonly select_theme: "Select {{theme}}";
|
|
13
|
+
readonly select_theme_auto: "Select Auto Theme";
|
|
14
|
+
readonly select_lng: "Select language {{language}}";
|
|
18
15
|
}>;
|
|
19
16
|
|
|
20
17
|
export { userSettingsTranslationRef };
|
package/dist/alpha.esm.js
CHANGED
|
@@ -18,9 +18,8 @@ import '@material-ui/icons/BrightnessAuto';
|
|
|
18
18
|
import '@material-ui/lab/ToggleButton';
|
|
19
19
|
import '@material-ui/lab/ToggleButtonGroup';
|
|
20
20
|
import '@backstage/core-plugin-api/alpha';
|
|
21
|
-
import './translation-
|
|
22
|
-
import 'react-i18next';
|
|
21
|
+
import './translation-d20c444b.esm.js';
|
|
23
22
|
import '@backstage/plugin-catalog-react';
|
|
24
23
|
import '@material-ui/core/Grid';
|
|
25
24
|
import '@material-ui/core/Typography';
|
|
26
|
-
//# sourceMappingURL=index-
|
|
25
|
+
//# sourceMappingURL=index-f399d158.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-f399d158.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -10,14 +10,11 @@ const userSettingsTranslationRef = createTranslationRef({
|
|
|
10
10
|
theme_dark: "Dark",
|
|
11
11
|
theme_auto: "Auto",
|
|
12
12
|
change_the_theme_mode: "Change the theme mode",
|
|
13
|
-
|
|
14
|
-
select_theme_dark: "Select dark",
|
|
13
|
+
select_theme: "Select {{theme}}",
|
|
15
14
|
select_theme_auto: "Select Auto Theme",
|
|
16
|
-
select_theme_custom: "Select {{custom}}",
|
|
17
|
-
lng: "{{language}}",
|
|
18
15
|
select_lng: "Select language {{language}}"
|
|
19
16
|
}
|
|
20
17
|
});
|
|
21
18
|
|
|
22
19
|
export { userSettingsTranslationRef as u };
|
|
23
|
-
//# sourceMappingURL=translation-
|
|
20
|
+
//# sourceMappingURL=translation-d20c444b.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation-
|
|
1
|
+
{"version":3,"file":"translation-d20c444b.esm.js","sources":["../../src/translation.ts"],"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 { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @alpha */\nexport const userSettingsTranslationRef = createTranslationRef({\n id: 'user-settings',\n messages: {\n language: 'Language',\n change_the_language: 'Change the language',\n theme: 'Theme',\n theme_light: 'Light',\n theme_dark: 'Dark',\n theme_auto: 'Auto',\n change_the_theme_mode: 'Change the theme mode',\n select_theme: 'Select {{theme}}',\n select_theme_auto: 'Select Auto Theme',\n select_lng: 'Select language {{language}}',\n },\n});\n"],"names":[],"mappings":";;AAmBO,MAAM,6BAA6B,oBAAqB,CAAA;AAAA,EAC7D,EAAI,EAAA,eAAA;AAAA,EACJ,QAAU,EAAA;AAAA,IACR,QAAU,EAAA,UAAA;AAAA,IACV,mBAAqB,EAAA,qBAAA;AAAA,IACrB,KAAO,EAAA,OAAA;AAAA,IACP,WAAa,EAAA,OAAA;AAAA,IACb,UAAY,EAAA,MAAA;AAAA,IACZ,UAAY,EAAA,MAAA;AAAA,IACZ,qBAAuB,EAAA,uBAAA;AAAA,IACvB,YAAc,EAAA,kBAAA;AAAA,IACd,iBAAmB,EAAA,mBAAA;AAAA,IACnB,UAAY,EAAA,8BAAA;AAAA,GACd;AACF,CAAC;;;;"}
|
package/dist/index.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import { WebStorage } from '@backstage/core-app-api';
|
|
|
2
2
|
import { ResponseError } from '@backstage/errors';
|
|
3
3
|
import ObservableImpl from 'zen-observable';
|
|
4
4
|
import { createRouteRef, createPlugin, createRoutableExtension, useRouteRef, useApi, errorApiRef, SessionState, googleAuthApiRef, microsoftAuthApiRef, githubAuthApiRef, gitlabAuthApiRef, oktaAuthApiRef, bitbucketAuthApiRef, oneloginAuthApiRef, atlassianAuthApiRef, bitbucketServerAuthApiRef, configApiRef, featureFlagsApiRef, FeatureFlagState, identityApiRef, alertApiRef, appThemeApiRef, attachComponentData, useElementFilter } from '@backstage/core-plugin-api';
|
|
5
|
-
import React, { useState, useEffect, useCallback, cloneElement
|
|
5
|
+
import React, { useState, useEffect, useCallback, cloneElement } from 'react';
|
|
6
6
|
import SettingsIcon from '@material-ui/icons/Settings';
|
|
7
7
|
import { SidebarItem, EmptyState, CodeSnippet, sidebarConfig, InfoCard, useSidebarPinState, Page, Header, RoutedTabs } from '@backstage/core-components';
|
|
8
8
|
import { useOutlet } from 'react-router-dom';
|
|
@@ -16,9 +16,8 @@ import useObservable from 'react-use/lib/useObservable';
|
|
|
16
16
|
import AutoIcon from '@material-ui/icons/BrightnessAuto';
|
|
17
17
|
import ToggleButton from '@material-ui/lab/ToggleButton';
|
|
18
18
|
import ToggleButtonGroup from '@material-ui/lab/ToggleButtonGroup';
|
|
19
|
-
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
20
|
-
import { u as userSettingsTranslationRef } from './esm/translation-
|
|
21
|
-
import { useTranslation } from 'react-i18next';
|
|
19
|
+
import { useTranslationRef, appLanguageApiRef } from '@backstage/core-plugin-api/alpha';
|
|
20
|
+
import { u as userSettingsTranslationRef } from './esm/translation-d20c444b.esm.js';
|
|
22
21
|
import { EntityRefLinks } from '@backstage/plugin-catalog-react';
|
|
23
22
|
import Grid$1 from '@material-ui/core/Grid';
|
|
24
23
|
import Typography$1 from '@material-ui/core/Typography';
|
|
@@ -183,7 +182,7 @@ const userSettingsPlugin = createPlugin({
|
|
|
183
182
|
const UserSettingsPage = userSettingsPlugin.provide(
|
|
184
183
|
createRoutableExtension({
|
|
185
184
|
name: "UserSettingsPage",
|
|
186
|
-
component: () => import('./esm/index-
|
|
185
|
+
component: () => import('./esm/index-f399d158.esm.js').then((m) => m.SettingsPage),
|
|
187
186
|
mountPoint: settingsRouteRef
|
|
188
187
|
})
|
|
189
188
|
);
|
|
@@ -696,7 +695,7 @@ const UserSettingsThemeToggle = () => {
|
|
|
696
695
|
appThemeApi.getActiveThemeId()
|
|
697
696
|
);
|
|
698
697
|
const themeIds = appThemeApi.getInstalledThemes();
|
|
699
|
-
const t = useTranslationRef(userSettingsTranslationRef);
|
|
698
|
+
const { t } = useTranslationRef(userSettingsTranslationRef);
|
|
700
699
|
const handleSetTheme = (_event, newThemeId) => {
|
|
701
700
|
if (themeIds.some((it) => it.id === newThemeId)) {
|
|
702
701
|
appThemeApi.setActiveThemeId(newThemeId);
|
|
@@ -730,21 +729,15 @@ const UserSettingsThemeToggle = () => {
|
|
|
730
729
|
var _a;
|
|
731
730
|
const themeIcon = (_a = themeIds.find((it) => it.id === theme.id)) == null ? void 0 : _a.icon;
|
|
732
731
|
const themeId = theme.id;
|
|
732
|
+
const themeTitle = theme.title || (themeId === "light" || themeId === "dark" ? t(`theme_${themeId}`) : themeId);
|
|
733
733
|
return /* @__PURE__ */ React.createElement(
|
|
734
734
|
TooltipToggleButton$1,
|
|
735
735
|
{
|
|
736
|
-
key:
|
|
737
|
-
title:
|
|
738
|
-
value:
|
|
736
|
+
key: themeId,
|
|
737
|
+
title: t("select_theme", { theme: themeTitle }),
|
|
738
|
+
value: themeId
|
|
739
739
|
},
|
|
740
|
-
/* @__PURE__ */ React.createElement(React.Fragment, null,
|
|
741
|
-
ThemeIcon,
|
|
742
|
-
{
|
|
743
|
-
id: theme.id,
|
|
744
|
-
icon: themeIcon,
|
|
745
|
-
activeId: themeId
|
|
746
|
-
}
|
|
747
|
-
))
|
|
740
|
+
/* @__PURE__ */ React.createElement(React.Fragment, null, themeTitle, "\xA0", /* @__PURE__ */ React.createElement(ThemeIcon, { id: themeId, icon: themeIcon, activeId: themeId }))
|
|
748
741
|
);
|
|
749
742
|
}),
|
|
750
743
|
/* @__PURE__ */ React.createElement(Tooltip, { placement: "top", arrow: true, title: t("select_theme_auto") }, /* @__PURE__ */ React.createElement(ToggleButton, { value: "auto", selected: activeThemeId === void 0 }, t("theme_auto"), "\xA0", /* @__PURE__ */ React.createElement(
|
|
@@ -797,21 +790,19 @@ const TooltipToggleButton = ({
|
|
|
797
790
|
}) => /* @__PURE__ */ React.createElement(Tooltip, { placement: "top", arrow: true, title }, /* @__PURE__ */ React.createElement(ToggleButton, { value, ...props }, children));
|
|
798
791
|
const UserSettingsLanguageToggle = () => {
|
|
799
792
|
const classes = useStyles();
|
|
800
|
-
const
|
|
801
|
-
const t = useTranslationRef(userSettingsTranslationRef);
|
|
802
|
-
const
|
|
803
|
-
|
|
804
|
-
|
|
793
|
+
const languageApi = useApi(appLanguageApiRef);
|
|
794
|
+
const { t } = useTranslationRef(userSettingsTranslationRef);
|
|
795
|
+
const [languageObservable] = useState(() => languageApi.language$());
|
|
796
|
+
const { language: currentLanguage } = useObservable(
|
|
797
|
+
languageObservable,
|
|
798
|
+
languageApi.getLanguage()
|
|
805
799
|
);
|
|
806
|
-
|
|
800
|
+
const { languages } = languageApi.getAvailableLanguages();
|
|
801
|
+
if (languages.length <= 1) {
|
|
807
802
|
return null;
|
|
808
803
|
}
|
|
809
804
|
const handleSetLanguage = (_event, newLanguage) => {
|
|
810
|
-
|
|
811
|
-
i18n.changeLanguage(newLanguage);
|
|
812
|
-
} else {
|
|
813
|
-
i18n.changeLanguage(void 0);
|
|
814
|
-
}
|
|
805
|
+
languageApi.setLanguage(newLanguage);
|
|
815
806
|
};
|
|
816
807
|
return /* @__PURE__ */ React.createElement(
|
|
817
808
|
ListItem,
|
|
@@ -832,22 +823,18 @@ const UserSettingsLanguageToggle = () => {
|
|
|
832
823
|
{
|
|
833
824
|
exclusive: true,
|
|
834
825
|
size: "small",
|
|
835
|
-
value:
|
|
826
|
+
value: currentLanguage,
|
|
836
827
|
onChange: handleSetLanguage
|
|
837
828
|
},
|
|
838
|
-
|
|
829
|
+
languages.map((language) => {
|
|
839
830
|
return /* @__PURE__ */ React.createElement(
|
|
840
831
|
TooltipToggleButton,
|
|
841
832
|
{
|
|
842
|
-
key:
|
|
843
|
-
title: t("select_lng", {
|
|
844
|
-
|
|
845
|
-
}),
|
|
846
|
-
value: lng
|
|
833
|
+
key: language,
|
|
834
|
+
title: t("select_lng", { language }),
|
|
835
|
+
value: language
|
|
847
836
|
},
|
|
848
|
-
/* @__PURE__ */ React.createElement(React.Fragment, null,
|
|
849
|
-
language: lng
|
|
850
|
-
}))
|
|
837
|
+
/* @__PURE__ */ React.createElement(React.Fragment, null, language)
|
|
851
838
|
);
|
|
852
839
|
})
|
|
853
840
|
))
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/apis/StorageApi/UserSettingsStorage.ts","../src/plugin.ts","../src/components/Settings.tsx","../src/components/AuthProviders/EmptyProviders.tsx","../src/components/AuthProviders/ProviderSettingsAvatar.tsx","../src/components/AuthProviders/ProviderSettingsItem.tsx","../src/components/AuthProviders/DefaultProviderSettings.tsx","../src/components/AuthProviders/UserSettingsAuthProviders.tsx","../src/components/FeatureFlags/EmptyFlags.tsx","../src/components/FeatureFlags/FeatureFlagsItem.tsx","../src/components/FeatureFlags/UserSettingsFeatureFlags.tsx","../src/components/useUserProfileInfo.ts","../src/components/General/UserSettingsSignInAvatar.tsx","../src/components/General/UserSettingsMenu.tsx","../src/components/General/UserSettingsProfileCard.tsx","../src/components/General/UserSettingsPinToggle.tsx","../src/components/General/UserSettingsThemeToggle.tsx","../src/components/General/UserSettingsLanguageToggle.tsx","../src/components/General/UserSettingsAppearanceCard.tsx","../src/components/General/UserSettingsIdentityCard.tsx","../src/components/General/UserSettingsGeneral.tsx","../src/components/SettingsLayout/SettingsLayout.tsx","../src/components/DefaultSettingsPage/DefaultSettingsPage.tsx","../src/components/SettingsPage/SettingsPage.tsx","../src/components/UserSettingsTab/UserSettingsTab.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 { WebStorage } from '@backstage/core-app-api';\nimport {\n DiscoveryApi,\n ErrorApi,\n FetchApi,\n IdentityApi,\n StorageApi,\n StorageValueSnapshot,\n} from '@backstage/core-plugin-api';\nimport { ResponseError } from '@backstage/errors';\nimport { JsonValue, Observable } from '@backstage/types';\nimport ObservableImpl from 'zen-observable';\n\nconst JSON_HEADERS = {\n 'Content-Type': 'application/json; charset=utf-8',\n Accept: 'application/json',\n};\n\nconst buckets = new Map<string, UserSettingsStorage>();\n\n/**\n * An implementation of the storage API, that uses the user-settings backend to\n * persist the data in the DB.\n *\n * @public\n */\nexport class UserSettingsStorage implements StorageApi {\n private subscribers = new Set<\n ZenObservable.SubscriptionObserver<StorageValueSnapshot<JsonValue>>\n >();\n\n private readonly observables = new Map<\n string,\n Observable<StorageValueSnapshot<JsonValue>>\n >();\n\n private constructor(\n private readonly namespace: string,\n private readonly fetchApi: FetchApi,\n private readonly discoveryApi: DiscoveryApi,\n private readonly errorApi: ErrorApi,\n private readonly identityApi: IdentityApi,\n private readonly fallback: WebStorage,\n ) {}\n\n static create(options: {\n fetchApi: FetchApi;\n discoveryApi: DiscoveryApi;\n errorApi: ErrorApi;\n identityApi: IdentityApi;\n namespace?: string;\n }): UserSettingsStorage {\n return new UserSettingsStorage(\n options.namespace ?? 'default',\n options.fetchApi,\n options.discoveryApi,\n options.errorApi,\n options.identityApi,\n WebStorage.create({\n namespace: options.namespace,\n errorApi: options.errorApi,\n }),\n );\n }\n\n forBucket(name: string): StorageApi {\n // use dot instead of slash separator to have nicer URLs\n const bucketPath = `${this.namespace}.${name}`;\n\n if (!buckets.has(bucketPath)) {\n buckets.set(\n bucketPath,\n new UserSettingsStorage(\n bucketPath,\n this.fetchApi,\n this.discoveryApi,\n this.errorApi,\n this.identityApi,\n this.fallback,\n ),\n );\n }\n\n return buckets.get(bucketPath)!;\n }\n\n async remove(key: string): Promise<void> {\n const fetchUrl = await this.getFetchUrl(key);\n\n const response = await this.fetchApi.fetch(fetchUrl, {\n method: 'DELETE',\n });\n\n if (!response.ok && response.status !== 404) {\n throw await ResponseError.fromResponse(response);\n }\n\n this.notifyChanges({ key, presence: 'absent' });\n }\n\n async set<T extends JsonValue>(key: string, data: T): Promise<void> {\n if (!(await this.isSignedIn())) {\n await this.fallback.set(key, data);\n this.notifyChanges({ key, presence: 'present', value: data });\n return;\n }\n\n const fetchUrl = await this.getFetchUrl(key);\n\n const response = await this.fetchApi.fetch(fetchUrl, {\n method: 'PUT',\n headers: JSON_HEADERS,\n body: JSON.stringify({ value: data }),\n });\n\n if (!response.ok) {\n throw await ResponseError.fromResponse(response);\n }\n\n const { value } = await response.json();\n\n this.notifyChanges({ key, value, presence: 'present' });\n }\n\n observe$<T extends JsonValue>(\n key: string,\n ): Observable<StorageValueSnapshot<T>> {\n if (!this.observables.has(key)) {\n this.observables.set(\n key,\n new ObservableImpl<StorageValueSnapshot<JsonValue>>(subscriber => {\n this.subscribers.add(subscriber);\n\n // TODO(freben): Introduce server polling or similar, to ensure that different devices update when values change\n Promise.resolve()\n .then(() => this.get(key))\n .then(snapshot => subscriber.next(snapshot))\n .catch(error => this.errorApi.post(error));\n\n return () => {\n this.subscribers.delete(subscriber);\n };\n }).filter(({ key: messageKey }) => messageKey === key),\n );\n }\n\n return this.observables.get(key) as Observable<StorageValueSnapshot<T>>;\n }\n\n snapshot<T extends JsonValue>(key: string): StorageValueSnapshot<T> {\n return { key, presence: 'unknown' };\n }\n\n private async get<T extends JsonValue>(\n key: string,\n ): Promise<StorageValueSnapshot<T>> {\n if (!(await this.isSignedIn())) {\n // This explicitly uses WebStorage, which we know is synchronous and doesn't return presence: unknown\n return this.fallback.snapshot(key);\n }\n\n const fetchUrl = await this.getFetchUrl(key);\n const response = await this.fetchApi.fetch(fetchUrl);\n\n if (response.status === 404) {\n return { key, presence: 'absent' };\n }\n\n if (!response.ok) {\n throw await ResponseError.fromResponse(response);\n }\n\n try {\n const { value: rawValue } = await response.json();\n const value = JSON.parse(JSON.stringify(rawValue), (_key, val) => {\n if (typeof val === 'object' && val !== null) {\n Object.freeze(val);\n }\n return val;\n });\n\n return { key, presence: 'present', value };\n } catch {\n // If the value is not valid JSON, we return an unknown presence. This should never happen\n return { key, presence: 'absent' };\n }\n }\n\n private async getFetchUrl(key: string) {\n const baseUrl = await this.discoveryApi.getBaseUrl('user-settings');\n const encodedNamespace = encodeURIComponent(this.namespace);\n const encodedKey = encodeURIComponent(key);\n return `${baseUrl}/buckets/${encodedNamespace}/keys/${encodedKey}`;\n }\n\n private async notifyChanges<T extends JsonValue>(\n snapshot: StorageValueSnapshot<T>,\n ) {\n for (const subscription of this.subscribers) {\n try {\n subscription.next(snapshot);\n } catch {\n // ignore\n }\n }\n }\n\n private async isSignedIn(): Promise<boolean> {\n try {\n const credentials = await this.identityApi.getCredentials();\n return credentials?.token ? true : false;\n } catch {\n return false;\n }\n }\n}\n","/*\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 createPlugin,\n createRoutableExtension,\n createRouteRef,\n} from '@backstage/core-plugin-api';\n\nexport const settingsRouteRef = createRouteRef({\n id: 'user-settings',\n});\n\n/** @public */\nexport const userSettingsPlugin = createPlugin({\n id: 'user-settings',\n routes: {\n settingsPage: settingsRouteRef,\n },\n});\n\n/** @public */\nexport const UserSettingsPage = userSettingsPlugin.provide(\n createRoutableExtension({\n name: 'UserSettingsPage',\n component: () =>\n import('./components/SettingsPage').then(m => m.SettingsPage),\n mountPoint: settingsRouteRef,\n }),\n);\n","/*\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 React from 'react';\nimport SettingsIcon from '@material-ui/icons/Settings';\nimport { settingsRouteRef } from '../plugin';\nimport { SidebarItem } from '@backstage/core-components';\nimport { useRouteRef, IconComponent } from '@backstage/core-plugin-api';\n\n/** @public */\nexport const Settings = (props: { icon?: IconComponent }) => {\n const routePath = useRouteRef(settingsRouteRef);\n const Icon = props.icon ? props.icon : SettingsIcon;\n return <SidebarItem text=\"Settings\" to={routePath()} icon={Icon} />;\n};\n","/*\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 React from 'react';\nimport { Button, Typography } from '@material-ui/core';\nimport { CodeSnippet, EmptyState } from '@backstage/core-components';\n\nconst EXAMPLE = `auth:\n providers:\n google:\n development:\n clientId: \\${AUTH_GOOGLE_CLIENT_ID}\n clientSecret: \\${AUTH_GOOGLE_CLIENT_SECRET}\n`;\n\nexport const EmptyProviders = () => (\n <EmptyState\n missing=\"content\"\n title=\"No Authentication Providers\"\n description=\"You can add Authentication Providers to Backstage which allows you to use these providers to authenticate yourself.\"\n action={\n <>\n <Typography variant=\"body1\">\n Open <code>app-config.yaml</code> and make the changes as highlighted\n below:\n </Typography>\n <CodeSnippet\n text={EXAMPLE}\n language=\"yaml\"\n showLineNumbers\n highlightedNumbers={[3, 4, 5, 6, 7, 8]}\n customStyle={{ background: 'inherit', fontSize: '115%' }}\n />\n <Button\n variant=\"contained\"\n color=\"primary\"\n href=\"https://backstage.io/docs/auth/add-auth-provider\"\n >\n Read More\n </Button>\n </>\n }\n />\n);\n","/*\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 React from 'react';\nimport { BackstageTheme } from '@backstage/theme';\nimport { makeStyles, Avatar } from '@material-ui/core';\nimport { sidebarConfig } from '@backstage/core-components';\n\nconst useStyles = makeStyles<BackstageTheme, { size: number }>(theme => ({\n avatar: {\n width: ({ size }) => size,\n height: ({ size }) => size,\n fontSize: ({ size }) => size * 0.7,\n border: `1px solid ${theme.palette.textSubtle}`,\n },\n}));\n\ntype Props = { size?: number; picture: string | undefined };\n\nexport const ProviderSettingsAvatar = ({ size, picture }: Props) => {\n const { iconSize } = sidebarConfig;\n const classes = useStyles(size ? { size } : { size: iconSize });\n\n return <Avatar src={picture} className={classes.avatar} />;\n};\n","/*\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 React, { useEffect, useState } from 'react';\nimport {\n Button,\n Grid,\n ListItem,\n ListItemIcon,\n ListItemSecondaryAction,\n ListItemText,\n Tooltip,\n Typography,\n} from '@material-ui/core';\nimport {\n ApiRef,\n SessionApi,\n SessionState,\n ProfileInfoApi,\n ProfileInfo,\n useApi,\n errorApiRef,\n IconComponent,\n} from '@backstage/core-plugin-api';\nimport { ProviderSettingsAvatar } from './ProviderSettingsAvatar';\n\nconst emptyProfile: ProfileInfo = {};\n\n/** @public */\nexport const ProviderSettingsItem = (props: {\n title: string;\n description: string;\n icon: IconComponent;\n apiRef: ApiRef<ProfileInfoApi & SessionApi>;\n}) => {\n const { title, description, icon: Icon, apiRef } = props;\n\n const api = useApi(apiRef);\n const errorApi = useApi(errorApiRef);\n const [signedIn, setSignedIn] = useState(false);\n const [profile, setProfile] = useState<ProfileInfo>(emptyProfile);\n\n useEffect(() => {\n let didCancel = false;\n\n const subscription = api\n .sessionState$()\n .subscribe((sessionState: SessionState) => {\n if (sessionState !== SessionState.SignedIn) {\n setProfile(emptyProfile);\n setSignedIn(false);\n }\n if (!didCancel) {\n api\n .getProfile({ optional: true })\n .then((profileResponse: ProfileInfo | undefined) => {\n if (!didCancel) {\n if (sessionState === SessionState.SignedIn) {\n setSignedIn(true);\n }\n if (profileResponse) {\n setProfile(profileResponse);\n }\n }\n });\n }\n });\n\n return () => {\n didCancel = true;\n subscription.unsubscribe();\n };\n }, [api]);\n\n return (\n <ListItem>\n <ListItemIcon>\n <Icon />\n </ListItemIcon>\n <ListItemText\n primary={title}\n secondary={\n <Tooltip placement=\"top\" arrow title={description}>\n <Grid container spacing={6}>\n <Grid item>\n <ProviderSettingsAvatar size={48} picture={profile.picture} />\n </Grid>\n <Grid item xs={12} sm container>\n <Grid item xs container direction=\"column\" spacing={2}>\n <Grid item xs>\n <Typography\n variant=\"subtitle1\"\n color=\"textPrimary\"\n gutterBottom\n >\n {profile.displayName}\n </Typography>\n <Typography variant=\"body2\" color=\"textSecondary\">\n {profile.email}\n </Typography>\n <Typography variant=\"body2\" color=\"textSecondary\">\n {description}\n </Typography>\n </Grid>\n </Grid>\n </Grid>\n </Grid>\n </Tooltip>\n }\n secondaryTypographyProps={{ noWrap: true, style: { width: '80%' } }}\n />\n <ListItemSecondaryAction>\n <Tooltip\n placement=\"top\"\n arrow\n title={signedIn ? `Sign out from ${title}` : `Sign in to ${title}`}\n >\n <Button\n variant=\"outlined\"\n color=\"primary\"\n onClick={() => {\n const action = signedIn ? api.signOut() : api.signIn();\n action.catch(error => errorApi.post(error));\n }}\n >\n {signedIn ? `Sign out` : `Sign in`}\n </Button>\n </Tooltip>\n </ListItemSecondaryAction>\n </ListItem>\n );\n};\n","/*\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 Star from '@material-ui/icons/Star';\nimport React from 'react';\nimport { ProviderSettingsItem } from './ProviderSettingsItem';\nimport {\n githubAuthApiRef,\n gitlabAuthApiRef,\n googleAuthApiRef,\n oktaAuthApiRef,\n microsoftAuthApiRef,\n bitbucketAuthApiRef,\n bitbucketServerAuthApiRef,\n atlassianAuthApiRef,\n oneloginAuthApiRef,\n} from '@backstage/core-plugin-api';\n\n/** @public */\nexport const DefaultProviderSettings = (props: {\n configuredProviders: string[];\n}) => {\n const { configuredProviders } = props;\n return (\n <>\n {configuredProviders.includes('google') && (\n <ProviderSettingsItem\n title=\"Google\"\n description=\"Provides authentication towards Google APIs and identities\"\n apiRef={googleAuthApiRef}\n icon={Star}\n />\n )}\n {configuredProviders.includes('microsoft') && (\n <ProviderSettingsItem\n title=\"Microsoft\"\n description=\"Provides authentication towards Microsoft APIs and identities\"\n apiRef={microsoftAuthApiRef}\n icon={Star}\n />\n )}\n {configuredProviders.includes('github') && (\n <ProviderSettingsItem\n title=\"GitHub\"\n description=\"Provides authentication towards GitHub APIs\"\n apiRef={githubAuthApiRef}\n icon={Star}\n />\n )}\n {configuredProviders.includes('gitlab') && (\n <ProviderSettingsItem\n title=\"GitLab\"\n description=\"Provides authentication towards GitLab APIs\"\n apiRef={gitlabAuthApiRef}\n icon={Star}\n />\n )}\n {configuredProviders.includes('okta') && (\n <ProviderSettingsItem\n title=\"Okta\"\n description=\"Provides authentication towards Okta APIs\"\n apiRef={oktaAuthApiRef}\n icon={Star}\n />\n )}\n {configuredProviders.includes('bitbucket') && (\n <ProviderSettingsItem\n title=\"Bitbucket\"\n description=\"Provides authentication towards Bitbucket APIs\"\n apiRef={bitbucketAuthApiRef}\n icon={Star}\n />\n )}\n {configuredProviders.includes('onelogin') && (\n <ProviderSettingsItem\n title=\"OneLogin\"\n description=\"Provides authentication towards OneLogin APIs\"\n apiRef={oneloginAuthApiRef}\n icon={Star}\n />\n )}\n {configuredProviders.includes('atlassian') && (\n <ProviderSettingsItem\n title=\"Atlassian\"\n description=\"Provides authentication towards Atlassian APIs\"\n apiRef={atlassianAuthApiRef}\n icon={Star}\n />\n )}\n {configuredProviders.includes('bitbucketServer') && (\n <ProviderSettingsItem\n title=\"Bitbucket Server\"\n description=\"Provides authentication towards Bitbucket Server APIs\"\n apiRef={bitbucketServerAuthApiRef}\n icon={Star}\n />\n )}\n </>\n );\n};\n","/*\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 React from 'react';\nimport { List } from '@material-ui/core';\nimport { EmptyProviders } from './EmptyProviders';\nimport { DefaultProviderSettings } from './DefaultProviderSettings';\nimport { configApiRef, useApi } from '@backstage/core-plugin-api';\nimport { InfoCard } from '@backstage/core-components';\n\n/** @public */\nexport const UserSettingsAuthProviders = (props: {\n providerSettings?: JSX.Element;\n}) => {\n const { providerSettings } = props;\n const configApi = useApi(configApiRef);\n const providersConfig = configApi.getOptionalConfig('auth.providers');\n const configuredProviders = providersConfig?.keys() || [];\n const providers = providerSettings ?? (\n <DefaultProviderSettings configuredProviders={configuredProviders} />\n );\n\n if (!providerSettings && !configuredProviders?.length) {\n return <EmptyProviders />;\n }\n\n return (\n <InfoCard title=\"Available Providers\">\n <List dense>{providers}</List>\n </InfoCard>\n );\n};\n","/*\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 React from 'react';\nimport { Button, Typography } from '@material-ui/core';\nimport { CodeSnippet, EmptyState } from '@backstage/core-components';\n\nconst EXAMPLE = `import { createPlugin } from '@backstage/core-plugin-api';\n\nexport default createPlugin({\n id: 'plugin-name',\n featureFlags: [{ name: 'enable-example-feature' }],\n});\n`;\n\nexport const EmptyFlags = () => (\n <EmptyState\n missing=\"content\"\n title=\"No Feature Flags\"\n description=\"Feature Flags make it possible for plugins to register features in Backstage for users to opt into. You can use this to split out logic in your code for manual A/B testing, etc.\"\n action={\n <>\n <Typography variant=\"body1\">\n An example for how to add a feature flag is highlighted below:\n </Typography>\n <CodeSnippet\n text={EXAMPLE}\n language=\"typescript\"\n showLineNumbers\n highlightedNumbers={[6]}\n customStyle={{ background: 'inherit', fontSize: '115%' }}\n />\n <Button\n variant=\"contained\"\n color=\"primary\"\n href=\"https://backstage.io/docs/api/utility-apis\"\n >\n Read More\n </Button>\n </>\n }\n />\n);\n","/*\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 React from 'react';\nimport {\n ListItem,\n ListItemText,\n ListItemIcon,\n Switch,\n Tooltip,\n} from '@material-ui/core';\nimport { FeatureFlag } from '@backstage/core-plugin-api';\n\ntype Props = {\n flag: FeatureFlag;\n enabled: boolean;\n toggleHandler: Function;\n};\n\nconst getSecondaryText = (flag: FeatureFlag) => {\n if (flag.description) {\n return flag.description;\n }\n return flag.pluginId\n ? `Registered in ${flag.pluginId} plugin`\n : 'Registered in the application';\n};\n\nexport const FlagItem = ({ flag, enabled, toggleHandler }: Props) => (\n <ListItem divider button onClick={() => toggleHandler(flag.name)}>\n <ListItemIcon>\n <Tooltip placement=\"top\" arrow title={enabled ? 'Disable' : 'Enable'}>\n <Switch color=\"primary\" checked={enabled} name={flag.name} />\n </Tooltip>\n </ListItemIcon>\n <ListItemText primary={flag.name} secondary={getSecondaryText(flag)} />\n </ListItem>\n);\n","/*\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 React, { useCallback, useState } from 'react';\nimport {\n List,\n TextField,\n IconButton,\n Grid,\n Typography,\n} from '@material-ui/core';\nimport { EmptyFlags } from './EmptyFlags';\nimport { FlagItem } from './FeatureFlagsItem';\nimport {\n FeatureFlag,\n FeatureFlagsApi,\n featureFlagsApiRef,\n FeatureFlagState,\n useApi,\n} from '@backstage/core-plugin-api';\nimport { InfoCard } from '@backstage/core-components';\nimport ClearIcon from '@material-ui/icons/Clear';\n\nexport const sortFlags = (\n flags: FeatureFlag[],\n featureFlagsApi: FeatureFlagsApi,\n): FeatureFlag[] => {\n const activeFlags = flags.filter(flag => featureFlagsApi.isActive(flag.name));\n const idleFlags = flags.filter(flag => !featureFlagsApi.isActive(flag.name));\n return [...activeFlags, ...idleFlags];\n};\n\n/** @public */\nexport const UserSettingsFeatureFlags = () => {\n const featureFlagsApi = useApi(featureFlagsApiRef);\n const inputRef = React.useRef<HTMLElement>();\n\n const initialFeatureFlags = featureFlagsApi.getRegisteredFlags();\n const initialFeatureFlagsSorted = sortFlags(\n initialFeatureFlags,\n featureFlagsApi,\n );\n const [featureFlags] = useState(initialFeatureFlagsSorted);\n\n const initialFlagState = Object.fromEntries(\n featureFlags.map(({ name }) => [name, featureFlagsApi.isActive(name)]),\n );\n\n const [state, setState] = useState<Record<string, boolean>>(initialFlagState);\n const [filterInput, setFilterInput] = useState<string>('');\n\n const toggleFlag = useCallback(\n (flagName: string) => {\n const newState = featureFlagsApi.isActive(flagName)\n ? FeatureFlagState.None\n : FeatureFlagState.Active;\n\n featureFlagsApi.save({\n states: { [flagName]: newState },\n merge: true,\n });\n\n setState(prevState => ({\n ...prevState,\n [flagName]: newState === FeatureFlagState.Active,\n }));\n },\n [featureFlagsApi],\n );\n\n if (!featureFlags.length) {\n return <EmptyFlags />;\n }\n\n const clearFilterInput = () => {\n setFilterInput('');\n inputRef?.current?.focus();\n };\n\n const filteredFeatureFlags = featureFlags.filter(featureFlag => {\n const featureFlagName = featureFlag.name.toLocaleLowerCase('en-US');\n return featureFlagName.includes(filterInput.toLocaleLowerCase('en-US'));\n });\n\n const Header = () => (\n <Grid container style={{ justifyContent: 'space-between' }}>\n <Grid item xs={6} md={8}>\n <Typography variant=\"h5\">Feature Flags</Typography>\n <Typography variant=\"subtitle1\">\n Please refresh the page when toggling feature flags\n </Typography>\n </Grid>\n {featureFlags.length >= 10 && (\n <Grid item xs={6} md={4}>\n <TextField\n label=\"Filter\"\n style={{ display: 'flex', justifyContent: 'flex-end' }}\n inputRef={ref => ref && ref.focus()}\n InputProps={{\n ...(filterInput.length && {\n endAdornment: (\n <IconButton\n aria-label=\"Clear filter\"\n onClick={clearFilterInput}\n edge=\"end\"\n >\n <ClearIcon />\n </IconButton>\n ),\n }),\n }}\n onChange={e => setFilterInput(e.target.value)}\n value={filterInput}\n />\n </Grid>\n )}\n </Grid>\n );\n\n return (\n <InfoCard title={<Header />}>\n <List dense>\n {filteredFeatureFlags.map(featureFlag => {\n const enabled = Boolean(state[featureFlag.name]);\n\n return (\n <FlagItem\n key={featureFlag.name}\n flag={featureFlag}\n enabled={enabled}\n toggleHandler={toggleFlag}\n />\n );\n })}\n </List>\n </InfoCard>\n );\n};\n","/*\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 alertApiRef,\n identityApiRef,\n ProfileInfo,\n useApi,\n} from '@backstage/core-plugin-api';\nimport { useEffect } from 'react';\nimport useAsync from 'react-use/lib/useAsync';\n\n/** @public */\nexport const useUserProfile = () => {\n const identityApi = useApi(identityApiRef);\n const alertApi = useApi(alertApiRef);\n\n const { value, loading, error } = useAsync(async () => {\n return {\n profile: await identityApi.getProfileInfo(),\n identity: await identityApi.getBackstageIdentity(),\n };\n }, []);\n\n useEffect(() => {\n if (error) {\n alertApi.post({\n message: `Failed to load user identity: ${error}`,\n severity: 'error',\n });\n }\n }, [error, alertApi]);\n\n if (loading || error) {\n return {\n profile: {} as ProfileInfo,\n displayName: '',\n loading,\n };\n }\n\n return {\n profile: value!.profile,\n backstageIdentity: value!.identity,\n displayName: value!.profile.displayName ?? value!.identity.userEntityRef,\n loading,\n };\n};\n","/*\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 React from 'react';\nimport { BackstageTheme } from '@backstage/theme';\nimport { makeStyles, Avatar } from '@material-ui/core';\nimport { useUserProfile } from '../useUserProfileInfo';\nimport { sidebarConfig } from '@backstage/core-components';\n\nconst useStyles = makeStyles<BackstageTheme, { size: number }>(theme => ({\n avatar: {\n width: ({ size }) => size,\n height: ({ size }) => size,\n fontSize: ({ size }) => size * 0.7,\n border: `1px solid ${theme.palette.textSubtle}`,\n },\n}));\n\n/** @public */\nexport const UserSettingsSignInAvatar = (props: { size?: number }) => {\n const { size } = props;\n\n const { iconSize } = sidebarConfig;\n const classes = useStyles(size ? { size } : { size: iconSize });\n const { profile } = useUserProfile();\n\n return (\n <Avatar\n src={profile.picture}\n className={classes.avatar}\n alt=\"Profile picture\"\n />\n );\n};\n","/*\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 React from 'react';\nimport { IconButton, ListItemIcon, Menu, MenuItem } from '@material-ui/core';\nimport SignOutIcon from '@material-ui/icons/MeetingRoom';\nimport MoreVertIcon from '@material-ui/icons/MoreVert';\nimport {\n identityApiRef,\n errorApiRef,\n useApi,\n} from '@backstage/core-plugin-api';\n\n/** @public */\nexport const UserSettingsMenu = () => {\n const errorApi = useApi(errorApiRef);\n const identityApi = useApi(identityApiRef);\n const [open, setOpen] = React.useState(false);\n const [anchorEl, setAnchorEl] = React.useState<undefined | HTMLElement>(\n undefined,\n );\n\n const handleOpen = (event: React.MouseEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget);\n setOpen(true);\n };\n\n const handleClose = () => {\n setAnchorEl(undefined);\n setOpen(false);\n };\n\n return (\n <>\n <IconButton\n data-testid=\"user-settings-menu\"\n aria-label=\"more\"\n onClick={handleOpen}\n >\n <MoreVertIcon />\n </IconButton>\n <Menu anchorEl={anchorEl} open={open} onClose={handleClose}>\n <MenuItem\n data-testid=\"sign-out\"\n onClick={() =>\n identityApi.signOut().catch(error => errorApi.post(error))\n }\n >\n <ListItemIcon>\n <SignOutIcon />\n </ListItemIcon>\n Sign Out\n </MenuItem>\n </Menu>\n </>\n );\n};\n","/*\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 { Grid, Typography } from '@material-ui/core';\nimport React from 'react';\nimport { UserSettingsSignInAvatar } from './UserSettingsSignInAvatar';\nimport { UserSettingsMenu } from './UserSettingsMenu';\nimport { useUserProfile } from '../useUserProfileInfo';\nimport { InfoCard } from '@backstage/core-components';\n\n/** @public */\nexport const UserSettingsProfileCard = () => {\n const { profile, displayName } = useUserProfile();\n\n return (\n <InfoCard title=\"Profile\" variant=\"gridItem\">\n <Grid container spacing={6}>\n <Grid item>\n <UserSettingsSignInAvatar size={96} />\n </Grid>\n <Grid item xs={12} sm container>\n <Grid item xs container direction=\"column\" spacing={2}>\n <Grid item xs>\n <Typography variant=\"subtitle1\" gutterBottom>\n {displayName}\n </Typography>\n {profile.email && (\n <Typography variant=\"body2\" color=\"textSecondary\">\n {profile.email}\n </Typography>\n )}\n </Grid>\n </Grid>\n <Grid item>\n <UserSettingsMenu />\n </Grid>\n </Grid>\n </Grid>\n </InfoCard>\n );\n};\n","/*\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 React from 'react';\nimport {\n ListItem,\n ListItemSecondaryAction,\n ListItemText,\n Switch,\n Tooltip,\n} from '@material-ui/core';\nimport { useSidebarPinState } from '@backstage/core-components';\n\n/** @public */\nexport const UserSettingsPinToggle = () => {\n const { isPinned, toggleSidebarPinState } = useSidebarPinState();\n\n return (\n <ListItem>\n <ListItemText\n primary=\"Pin Sidebar\"\n secondary=\"Prevent the sidebar from collapsing\"\n />\n <ListItemSecondaryAction>\n <Tooltip\n placement=\"top\"\n arrow\n title={`${isPinned ? 'Unpin' : 'Pin'} Sidebar`}\n >\n <Switch\n color=\"primary\"\n checked={isPinned}\n onChange={() => toggleSidebarPinState()}\n name=\"pin\"\n inputProps={{ 'aria-label': 'Pin Sidebar Switch' }}\n />\n </Tooltip>\n </ListItemSecondaryAction>\n </ListItem>\n );\n};\n","/*\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 React, { cloneElement } from 'react';\nimport useObservable from 'react-use/lib/useObservable';\nimport AutoIcon from '@material-ui/icons/BrightnessAuto';\nimport ToggleButton from '@material-ui/lab/ToggleButton';\nimport ToggleButtonGroup from '@material-ui/lab/ToggleButtonGroup';\nimport {\n ListItem,\n ListItemText,\n ListItemSecondaryAction,\n Tooltip,\n makeStyles,\n} from '@material-ui/core';\nimport { appThemeApiRef, useApi } from '@backstage/core-plugin-api';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { userSettingsTranslationRef } from '../../translation';\n\ntype ThemeIconProps = {\n id: string;\n activeId: string | undefined;\n icon: JSX.Element | undefined;\n};\n\nconst ThemeIcon = ({ id, activeId, icon }: ThemeIconProps) =>\n icon ? (\n cloneElement(icon, {\n color: activeId === id ? 'primary' : undefined,\n })\n ) : (\n <AutoIcon color={activeId === id ? 'primary' : undefined} />\n );\n\ntype TooltipToggleButtonProps = {\n children: JSX.Element;\n title: string;\n value: string;\n};\n\nconst useStyles = makeStyles(theme => ({\n container: {\n display: 'flex',\n flexWrap: 'wrap',\n width: '100%',\n justifyContent: 'space-between',\n alignItems: 'center',\n paddingBottom: 8,\n paddingRight: 16,\n },\n list: {\n width: 'initial',\n [theme.breakpoints.down('xs')]: {\n width: '100%',\n padding: `0 0 12px`,\n },\n },\n listItemText: {\n paddingRight: 0,\n paddingLeft: 0,\n },\n listItemSecondaryAction: {\n position: 'relative',\n transform: 'unset',\n top: 'auto',\n right: 'auto',\n paddingLeft: 16,\n [theme.breakpoints.down('xs')]: {\n paddingLeft: 0,\n },\n },\n}));\n\n// ToggleButtonGroup uses React.children.map instead of context\n// so wrapping with Tooltip breaks ToggleButton functionality.\nconst TooltipToggleButton = ({\n children,\n title,\n value,\n ...props\n}: TooltipToggleButtonProps) => (\n <Tooltip placement=\"top\" arrow title={title}>\n <ToggleButton value={value} {...props}>\n {children}\n </ToggleButton>\n </Tooltip>\n);\n\n/** @public */\nexport const UserSettingsThemeToggle = () => {\n const classes = useStyles();\n const appThemeApi = useApi(appThemeApiRef);\n const activeThemeId = useObservable(\n appThemeApi.activeThemeId$(),\n appThemeApi.getActiveThemeId(),\n );\n\n const themeIds = appThemeApi.getInstalledThemes();\n\n const t = useTranslationRef(userSettingsTranslationRef);\n\n const handleSetTheme = (\n _event: React.MouseEvent<HTMLElement>,\n newThemeId: string | undefined,\n ) => {\n if (themeIds.some(it => it.id === newThemeId)) {\n appThemeApi.setActiveThemeId(newThemeId);\n } else {\n appThemeApi.setActiveThemeId(undefined);\n }\n };\n\n return (\n <ListItem\n className={classes.list}\n classes={{ container: classes.container }}\n >\n <ListItemText\n className={classes.listItemText}\n primary={t('theme')}\n secondary={t('change_the_theme_mode')}\n />\n <ListItemSecondaryAction className={classes.listItemSecondaryAction}>\n <ToggleButtonGroup\n exclusive\n size=\"small\"\n value={activeThemeId ?? 'auto'}\n onChange={handleSetTheme}\n >\n {themeIds.map(theme => {\n const themeIcon = themeIds.find(it => it.id === theme.id)?.icon;\n const themeId = theme.id as 'light' | 'dark';\n return (\n <TooltipToggleButton\n key={theme.id}\n title={\n theme.title\n ? t('select_theme_custom', { custom: theme.title })\n : t(`select_theme_${themeId}`)\n }\n value={theme.id}\n >\n <>\n {theme.title || t(`theme_${themeId}`)} \n <ThemeIcon\n id={theme.id}\n icon={themeIcon}\n activeId={themeId}\n />\n </>\n </TooltipToggleButton>\n );\n })}\n <Tooltip placement=\"top\" arrow title={t('select_theme_auto')}>\n <ToggleButton value=\"auto\" selected={activeThemeId === undefined}>\n {t('theme_auto')} \n <AutoIcon\n color={activeThemeId === undefined ? 'primary' : undefined}\n />\n </ToggleButton>\n </Tooltip>\n </ToggleButtonGroup>\n </ListItemSecondaryAction>\n </ListItem>\n );\n};\n","/*\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 React, { useMemo } from 'react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport ToggleButton from '@material-ui/lab/ToggleButton';\nimport ToggleButtonGroup from '@material-ui/lab/ToggleButtonGroup';\nimport {\n ListItem,\n ListItemText,\n ListItemSecondaryAction,\n Tooltip,\n makeStyles,\n} from '@material-ui/core';\nimport { userSettingsTranslationRef } from '../../translation';\nimport { useTranslation } from 'react-i18next';\n\ntype TooltipToggleButtonProps = {\n children: JSX.Element;\n title: string;\n value: string;\n};\n\nconst useStyles = makeStyles(theme => ({\n container: {\n display: 'flex',\n flexWrap: 'wrap',\n width: '100%',\n justifyContent: 'space-between',\n alignItems: 'center',\n paddingBottom: 8,\n paddingRight: 16,\n },\n list: {\n width: 'initial',\n [theme.breakpoints.down('xs')]: {\n width: '100%',\n padding: `0 0 12px`,\n },\n },\n listItemText: {\n paddingRight: 0,\n paddingLeft: 0,\n },\n listItemSecondaryAction: {\n position: 'relative',\n transform: 'unset',\n top: 'auto',\n right: 'auto',\n paddingLeft: 16,\n [theme.breakpoints.down('xs')]: {\n paddingLeft: 0,\n },\n },\n}));\n\n// ToggleButtonGroup uses React.children.map instead of context\n// so wrapping with Tooltip breaks ToggleButton functionality.\nconst TooltipToggleButton = ({\n children,\n title,\n value,\n ...props\n}: TooltipToggleButtonProps) => (\n <Tooltip placement=\"top\" arrow title={title}>\n <ToggleButton value={value} {...props}>\n {children}\n </ToggleButton>\n </Tooltip>\n);\n\n/** @public */\nexport const UserSettingsLanguageToggle = () => {\n const classes = useStyles();\n const { i18n } = useTranslation();\n const t = useTranslationRef(userSettingsTranslationRef);\n\n const supportedLngs = useMemo(\n () => (i18n.options.supportedLngs || []).filter(lng => lng !== 'cimode'),\n [i18n],\n );\n\n if (supportedLngs.length <= 1) {\n return null;\n }\n\n const handleSetLanguage = (\n _event: React.MouseEvent<HTMLElement>,\n newLanguage: string | undefined,\n ) => {\n if (supportedLngs.some(it => it === newLanguage)) {\n i18n.changeLanguage(newLanguage);\n } else {\n i18n.changeLanguage(undefined);\n }\n };\n\n return (\n <ListItem\n className={classes.list}\n classes={{ container: classes.container }}\n >\n <ListItemText\n className={classes.listItemText}\n primary={t('language')}\n secondary={t('change_the_language')}\n />\n <ListItemSecondaryAction className={classes.listItemSecondaryAction}>\n <ToggleButtonGroup\n exclusive\n size=\"small\"\n value={i18n.language}\n onChange={handleSetLanguage}\n >\n {supportedLngs.map(lng => {\n return (\n <TooltipToggleButton\n key={lng}\n title={t('select_lng', {\n language: lng,\n })}\n value={lng}\n >\n <>\n {t('lng', {\n language: lng,\n })}\n </>\n </TooltipToggleButton>\n );\n })}\n </ToggleButtonGroup>\n </ListItemSecondaryAction>\n </ListItem>\n );\n};\n","/*\n * Copyright 2021 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 { InfoCard, useSidebarPinState } from '@backstage/core-components';\nimport { List } from '@material-ui/core';\nimport React from 'react';\nimport { UserSettingsPinToggle } from './UserSettingsPinToggle';\nimport { UserSettingsThemeToggle } from './UserSettingsThemeToggle';\nimport { UserSettingsLanguageToggle } from './UserSettingsLanguageToggle';\n\n/** @public */\nexport const UserSettingsAppearanceCard = () => {\n const { isMobile } = useSidebarPinState();\n\n return (\n <InfoCard title=\"Appearance\" variant=\"gridItem\">\n <List dense>\n <UserSettingsThemeToggle />\n <UserSettingsLanguageToggle />\n {!isMobile && <UserSettingsPinToggle />}\n </List>\n </InfoCard>\n );\n};\n","/*\n * Copyright 2022 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 { InfoCard } from '@backstage/core-components';\nimport { EntityRefLinks } from '@backstage/plugin-catalog-react';\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport React from 'react';\nimport { useUserProfile } from '../useUserProfileInfo';\n\nconst Contents = () => {\n const { backstageIdentity } = useUserProfile();\n\n if (!backstageIdentity) {\n return <Typography>No Backstage Identity</Typography>;\n }\n\n return (\n <Grid container spacing={1}>\n <Grid item xs={12}>\n <Typography variant=\"subtitle1\" gutterBottom>\n User Entity:{' '}\n <EntityRefLinks\n entityRefs={[backstageIdentity.userEntityRef]}\n getTitle={ref => ref}\n />\n </Typography>\n </Grid>\n <Grid item xs={12}>\n <Typography variant=\"subtitle1\">\n Ownership Entities:{' '}\n <EntityRefLinks\n entityRefs={backstageIdentity.ownershipEntityRefs}\n getTitle={ref => ref}\n />\n </Typography>\n </Grid>\n </Grid>\n );\n};\n\n/** @public */\nexport const UserSettingsIdentityCard = () => (\n <InfoCard title=\"Backstage Identity\">\n <Contents />\n </InfoCard>\n);\n","/*\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 { Grid } from '@material-ui/core';\nimport React from 'react';\nimport { UserSettingsProfileCard } from './UserSettingsProfileCard';\nimport { UserSettingsAppearanceCard } from './UserSettingsAppearanceCard';\nimport { UserSettingsIdentityCard } from './UserSettingsIdentityCard';\n\n/** @public */\nexport const UserSettingsGeneral = () => {\n return (\n <Grid container direction=\"row\" spacing={3}>\n <Grid item xs={12} md={6}>\n <UserSettingsProfileCard />\n </Grid>\n <Grid item xs={12} md={6}>\n <UserSettingsAppearanceCard />\n </Grid>\n <Grid item xs={12} md={6}>\n <UserSettingsIdentityCard />\n </Grid>\n </Grid>\n );\n};\n","/*\n * Copyright 2022 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 React from 'react';\nimport { TabProps } from '@material-ui/core';\nimport {\n Header,\n Page,\n RoutedTabs,\n useSidebarPinState,\n} from '@backstage/core-components';\nimport {\n attachComponentData,\n useElementFilter,\n} from '@backstage/core-plugin-api';\n\n/** @public */\nexport type SettingsLayoutRouteProps = {\n path: string;\n title: string;\n children: JSX.Element;\n tabProps?: TabProps<React.ElementType, { component?: React.ElementType }>;\n};\n\nexport const LAYOUT_DATA_KEY = 'plugin.user-settings.settingsLayout';\nexport const LAYOUT_ROUTE_DATA_KEY = 'plugin.user-settings.settingsLayoutRoute';\n\nconst Route: (props: SettingsLayoutRouteProps) => null = () => null;\nattachComponentData(Route, LAYOUT_ROUTE_DATA_KEY, true);\n\n// This causes all mount points that are discovered within this route to use the path of the route itself\nattachComponentData(Route, 'core.gatherMountPoints', true);\n\n/** @public */\nexport type SettingsLayoutProps = {\n title?: string;\n subtitle?: string;\n children?: React.ReactNode;\n};\n\n/**\n * @public\n */\nexport const SettingsLayout = (props: SettingsLayoutProps) => {\n const { title, children } = props;\n const { isMobile } = useSidebarPinState();\n\n const routes = useElementFilter(children, elements =>\n elements\n .selectByComponentData({\n key: LAYOUT_ROUTE_DATA_KEY,\n withStrictError:\n 'Child of SettingsLayout must be an SettingsLayout.Route',\n })\n .getElements<SettingsLayoutRouteProps>()\n .map(child => child.props),\n );\n\n return (\n <Page themeId=\"home\">\n {!isMobile && <Header title={title ?? 'Settings'} />}\n <RoutedTabs routes={routes} />\n </Page>\n );\n};\n\nattachComponentData(SettingsLayout, LAYOUT_DATA_KEY, true);\n\nSettingsLayout.Route = Route;\n","/*\n * Copyright 2022 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 React from 'react';\nimport { UserSettingsAuthProviders } from '../AuthProviders';\nimport { UserSettingsFeatureFlags } from '../FeatureFlags';\nimport { UserSettingsGeneral } from '../General';\nimport { SettingsLayout, SettingsLayoutRouteProps } from '../SettingsLayout';\n\n/**\n * @public\n */\nexport const DefaultSettingsPage = (props: {\n tabs?: React.ReactElement<SettingsLayoutRouteProps>[];\n providerSettings?: JSX.Element;\n}) => {\n const { providerSettings, tabs } = props;\n\n return (\n <SettingsLayout>\n <SettingsLayout.Route path=\"general\" title=\"General\">\n <UserSettingsGeneral />\n </SettingsLayout.Route>\n <SettingsLayout.Route\n path=\"auth-providers\"\n title=\"Authentication Providers\"\n >\n <UserSettingsAuthProviders providerSettings={providerSettings} />\n </SettingsLayout.Route>\n <SettingsLayout.Route path=\"feature-flags\" title=\"Feature Flags\">\n <UserSettingsFeatureFlags />\n </SettingsLayout.Route>\n {tabs}\n </SettingsLayout>\n );\n};\n","/*\n * Copyright 2022 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 { useOutlet } from 'react-router-dom';\nimport React from 'react';\nimport { DefaultSettingsPage } from '../DefaultSettingsPage';\nimport { useElementFilter } from '@backstage/core-plugin-api';\nimport {\n SettingsLayoutProps,\n SettingsLayoutRouteProps,\n} from '../SettingsLayout';\nimport {\n LAYOUT_DATA_KEY,\n LAYOUT_ROUTE_DATA_KEY,\n} from '../SettingsLayout/SettingsLayout';\n\n/** @public */\nexport const SettingsPage = (props: { providerSettings?: JSX.Element }) => {\n const { providerSettings } = props;\n const outlet = useOutlet();\n const layout = useElementFilter(outlet, elements =>\n elements\n .selectByComponentData({\n key: LAYOUT_DATA_KEY,\n })\n .getElements<SettingsLayoutProps>(),\n );\n const tabs = useElementFilter(outlet, elements =>\n elements\n .selectByComponentData({\n key: LAYOUT_ROUTE_DATA_KEY,\n })\n .getElements<SettingsLayoutRouteProps>(),\n );\n\n return (\n <>\n {(layout.length !== 0 && layout) || (\n <DefaultSettingsPage tabs={tabs} providerSettings={providerSettings} />\n )}\n </>\n );\n};\n","/*\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 */\nimport React, { PropsWithChildren } from 'react';\nimport { attachComponentData } from '@backstage/core-plugin-api';\nimport {\n LAYOUT_ROUTE_DATA_KEY,\n SettingsLayout,\n} from '../SettingsLayout/SettingsLayout';\n\n/** @public @deprecated Use SettingsLayout.Route approach instead */\nexport const USER_SETTINGS_TAB_KEY = LAYOUT_ROUTE_DATA_KEY;\n\n/** @public @deprecated Use SettingsLayoutRouteProps instead */\nexport type UserSettingsTabProps = PropsWithChildren<{\n /**\n * The path to the tab in the settings route\n * @example `/settings/advanced`\n */\n path: string;\n /** The title of the tab. It will also reflect in the document title when the tab is active */\n title: string;\n}>;\n\n/**\n * Renders a tab inside the settings page\n * @param props - Component props\n * @public\n * @deprecated Use SettingsLayout.Route instead\n */\nexport const UserSettingsTab = (props: UserSettingsTabProps) => (\n <SettingsLayout.Route path={props.path} title={props.title}>\n <>props.children</>\n </SettingsLayout.Route>\n);\n\nattachComponentData(UserSettingsTab, USER_SETTINGS_TAB_KEY, 'UserSettingsTab');\n"],"names":["EXAMPLE","useStyles","TooltipToggleButton","Typography","Grid"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAM,YAAe,GAAA;AAAA,EACnB,cAAgB,EAAA,iCAAA;AAAA,EAChB,MAAQ,EAAA,kBAAA;AACV,CAAA,CAAA;AAEA,MAAM,OAAA,uBAAc,GAAiC,EAAA,CAAA;AAQ9C,MAAM,mBAA0C,CAAA;AA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AAoB,CAAA,eAAA,EAAiB,uBAAuB,iBAAiB,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/apis/StorageApi/UserSettingsStorage.ts","../src/plugin.ts","../src/components/Settings.tsx","../src/components/AuthProviders/EmptyProviders.tsx","../src/components/AuthProviders/ProviderSettingsAvatar.tsx","../src/components/AuthProviders/ProviderSettingsItem.tsx","../src/components/AuthProviders/DefaultProviderSettings.tsx","../src/components/AuthProviders/UserSettingsAuthProviders.tsx","../src/components/FeatureFlags/EmptyFlags.tsx","../src/components/FeatureFlags/FeatureFlagsItem.tsx","../src/components/FeatureFlags/UserSettingsFeatureFlags.tsx","../src/components/useUserProfileInfo.ts","../src/components/General/UserSettingsSignInAvatar.tsx","../src/components/General/UserSettingsMenu.tsx","../src/components/General/UserSettingsProfileCard.tsx","../src/components/General/UserSettingsPinToggle.tsx","../src/components/General/UserSettingsThemeToggle.tsx","../src/components/General/UserSettingsLanguageToggle.tsx","../src/components/General/UserSettingsAppearanceCard.tsx","../src/components/General/UserSettingsIdentityCard.tsx","../src/components/General/UserSettingsGeneral.tsx","../src/components/SettingsLayout/SettingsLayout.tsx","../src/components/DefaultSettingsPage/DefaultSettingsPage.tsx","../src/components/SettingsPage/SettingsPage.tsx","../src/components/UserSettingsTab/UserSettingsTab.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 { WebStorage } from '@backstage/core-app-api';\nimport {\n DiscoveryApi,\n ErrorApi,\n FetchApi,\n IdentityApi,\n StorageApi,\n StorageValueSnapshot,\n} from '@backstage/core-plugin-api';\nimport { ResponseError } from '@backstage/errors';\nimport { JsonValue, Observable } from '@backstage/types';\nimport ObservableImpl from 'zen-observable';\n\nconst JSON_HEADERS = {\n 'Content-Type': 'application/json; charset=utf-8',\n Accept: 'application/json',\n};\n\nconst buckets = new Map<string, UserSettingsStorage>();\n\n/**\n * An implementation of the storage API, that uses the user-settings backend to\n * persist the data in the DB.\n *\n * @public\n */\nexport class UserSettingsStorage implements StorageApi {\n private subscribers = new Set<\n ZenObservable.SubscriptionObserver<StorageValueSnapshot<JsonValue>>\n >();\n\n private readonly observables = new Map<\n string,\n Observable<StorageValueSnapshot<JsonValue>>\n >();\n\n private constructor(\n private readonly namespace: string,\n private readonly fetchApi: FetchApi,\n private readonly discoveryApi: DiscoveryApi,\n private readonly errorApi: ErrorApi,\n private readonly identityApi: IdentityApi,\n private readonly fallback: WebStorage,\n ) {}\n\n static create(options: {\n fetchApi: FetchApi;\n discoveryApi: DiscoveryApi;\n errorApi: ErrorApi;\n identityApi: IdentityApi;\n namespace?: string;\n }): UserSettingsStorage {\n return new UserSettingsStorage(\n options.namespace ?? 'default',\n options.fetchApi,\n options.discoveryApi,\n options.errorApi,\n options.identityApi,\n WebStorage.create({\n namespace: options.namespace,\n errorApi: options.errorApi,\n }),\n );\n }\n\n forBucket(name: string): StorageApi {\n // use dot instead of slash separator to have nicer URLs\n const bucketPath = `${this.namespace}.${name}`;\n\n if (!buckets.has(bucketPath)) {\n buckets.set(\n bucketPath,\n new UserSettingsStorage(\n bucketPath,\n this.fetchApi,\n this.discoveryApi,\n this.errorApi,\n this.identityApi,\n this.fallback,\n ),\n );\n }\n\n return buckets.get(bucketPath)!;\n }\n\n async remove(key: string): Promise<void> {\n const fetchUrl = await this.getFetchUrl(key);\n\n const response = await this.fetchApi.fetch(fetchUrl, {\n method: 'DELETE',\n });\n\n if (!response.ok && response.status !== 404) {\n throw await ResponseError.fromResponse(response);\n }\n\n this.notifyChanges({ key, presence: 'absent' });\n }\n\n async set<T extends JsonValue>(key: string, data: T): Promise<void> {\n if (!(await this.isSignedIn())) {\n await this.fallback.set(key, data);\n this.notifyChanges({ key, presence: 'present', value: data });\n return;\n }\n\n const fetchUrl = await this.getFetchUrl(key);\n\n const response = await this.fetchApi.fetch(fetchUrl, {\n method: 'PUT',\n headers: JSON_HEADERS,\n body: JSON.stringify({ value: data }),\n });\n\n if (!response.ok) {\n throw await ResponseError.fromResponse(response);\n }\n\n const { value } = await response.json();\n\n this.notifyChanges({ key, value, presence: 'present' });\n }\n\n observe$<T extends JsonValue>(\n key: string,\n ): Observable<StorageValueSnapshot<T>> {\n if (!this.observables.has(key)) {\n this.observables.set(\n key,\n new ObservableImpl<StorageValueSnapshot<JsonValue>>(subscriber => {\n this.subscribers.add(subscriber);\n\n // TODO(freben): Introduce server polling or similar, to ensure that different devices update when values change\n Promise.resolve()\n .then(() => this.get(key))\n .then(snapshot => subscriber.next(snapshot))\n .catch(error => this.errorApi.post(error));\n\n return () => {\n this.subscribers.delete(subscriber);\n };\n }).filter(({ key: messageKey }) => messageKey === key),\n );\n }\n\n return this.observables.get(key) as Observable<StorageValueSnapshot<T>>;\n }\n\n snapshot<T extends JsonValue>(key: string): StorageValueSnapshot<T> {\n return { key, presence: 'unknown' };\n }\n\n private async get<T extends JsonValue>(\n key: string,\n ): Promise<StorageValueSnapshot<T>> {\n if (!(await this.isSignedIn())) {\n // This explicitly uses WebStorage, which we know is synchronous and doesn't return presence: unknown\n return this.fallback.snapshot(key);\n }\n\n const fetchUrl = await this.getFetchUrl(key);\n const response = await this.fetchApi.fetch(fetchUrl);\n\n if (response.status === 404) {\n return { key, presence: 'absent' };\n }\n\n if (!response.ok) {\n throw await ResponseError.fromResponse(response);\n }\n\n try {\n const { value: rawValue } = await response.json();\n const value = JSON.parse(JSON.stringify(rawValue), (_key, val) => {\n if (typeof val === 'object' && val !== null) {\n Object.freeze(val);\n }\n return val;\n });\n\n return { key, presence: 'present', value };\n } catch {\n // If the value is not valid JSON, we return an unknown presence. This should never happen\n return { key, presence: 'absent' };\n }\n }\n\n private async getFetchUrl(key: string) {\n const baseUrl = await this.discoveryApi.getBaseUrl('user-settings');\n const encodedNamespace = encodeURIComponent(this.namespace);\n const encodedKey = encodeURIComponent(key);\n return `${baseUrl}/buckets/${encodedNamespace}/keys/${encodedKey}`;\n }\n\n private async notifyChanges<T extends JsonValue>(\n snapshot: StorageValueSnapshot<T>,\n ) {\n for (const subscription of this.subscribers) {\n try {\n subscription.next(snapshot);\n } catch {\n // ignore\n }\n }\n }\n\n private async isSignedIn(): Promise<boolean> {\n try {\n const credentials = await this.identityApi.getCredentials();\n return credentials?.token ? true : false;\n } catch {\n return false;\n }\n }\n}\n","/*\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 createPlugin,\n createRoutableExtension,\n createRouteRef,\n} from '@backstage/core-plugin-api';\n\nexport const settingsRouteRef = createRouteRef({\n id: 'user-settings',\n});\n\n/** @public */\nexport const userSettingsPlugin = createPlugin({\n id: 'user-settings',\n routes: {\n settingsPage: settingsRouteRef,\n },\n});\n\n/** @public */\nexport const UserSettingsPage = userSettingsPlugin.provide(\n createRoutableExtension({\n name: 'UserSettingsPage',\n component: () =>\n import('./components/SettingsPage').then(m => m.SettingsPage),\n mountPoint: settingsRouteRef,\n }),\n);\n","/*\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 React from 'react';\nimport SettingsIcon from '@material-ui/icons/Settings';\nimport { settingsRouteRef } from '../plugin';\nimport { SidebarItem } from '@backstage/core-components';\nimport { useRouteRef, IconComponent } from '@backstage/core-plugin-api';\n\n/** @public */\nexport const Settings = (props: { icon?: IconComponent }) => {\n const routePath = useRouteRef(settingsRouteRef);\n const Icon = props.icon ? props.icon : SettingsIcon;\n return <SidebarItem text=\"Settings\" to={routePath()} icon={Icon} />;\n};\n","/*\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 React from 'react';\nimport { Button, Typography } from '@material-ui/core';\nimport { CodeSnippet, EmptyState } from '@backstage/core-components';\n\nconst EXAMPLE = `auth:\n providers:\n google:\n development:\n clientId: \\${AUTH_GOOGLE_CLIENT_ID}\n clientSecret: \\${AUTH_GOOGLE_CLIENT_SECRET}\n`;\n\nexport const EmptyProviders = () => (\n <EmptyState\n missing=\"content\"\n title=\"No Authentication Providers\"\n description=\"You can add Authentication Providers to Backstage which allows you to use these providers to authenticate yourself.\"\n action={\n <>\n <Typography variant=\"body1\">\n Open <code>app-config.yaml</code> and make the changes as highlighted\n below:\n </Typography>\n <CodeSnippet\n text={EXAMPLE}\n language=\"yaml\"\n showLineNumbers\n highlightedNumbers={[3, 4, 5, 6, 7, 8]}\n customStyle={{ background: 'inherit', fontSize: '115%' }}\n />\n <Button\n variant=\"contained\"\n color=\"primary\"\n href=\"https://backstage.io/docs/auth/add-auth-provider\"\n >\n Read More\n </Button>\n </>\n }\n />\n);\n","/*\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 React from 'react';\nimport { BackstageTheme } from '@backstage/theme';\nimport { makeStyles, Avatar } from '@material-ui/core';\nimport { sidebarConfig } from '@backstage/core-components';\n\nconst useStyles = makeStyles<BackstageTheme, { size: number }>(theme => ({\n avatar: {\n width: ({ size }) => size,\n height: ({ size }) => size,\n fontSize: ({ size }) => size * 0.7,\n border: `1px solid ${theme.palette.textSubtle}`,\n },\n}));\n\ntype Props = { size?: number; picture: string | undefined };\n\nexport const ProviderSettingsAvatar = ({ size, picture }: Props) => {\n const { iconSize } = sidebarConfig;\n const classes = useStyles(size ? { size } : { size: iconSize });\n\n return <Avatar src={picture} className={classes.avatar} />;\n};\n","/*\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 React, { useEffect, useState } from 'react';\nimport {\n Button,\n Grid,\n ListItem,\n ListItemIcon,\n ListItemSecondaryAction,\n ListItemText,\n Tooltip,\n Typography,\n} from '@material-ui/core';\nimport {\n ApiRef,\n SessionApi,\n SessionState,\n ProfileInfoApi,\n ProfileInfo,\n useApi,\n errorApiRef,\n IconComponent,\n} from '@backstage/core-plugin-api';\nimport { ProviderSettingsAvatar } from './ProviderSettingsAvatar';\n\nconst emptyProfile: ProfileInfo = {};\n\n/** @public */\nexport const ProviderSettingsItem = (props: {\n title: string;\n description: string;\n icon: IconComponent;\n apiRef: ApiRef<ProfileInfoApi & SessionApi>;\n}) => {\n const { title, description, icon: Icon, apiRef } = props;\n\n const api = useApi(apiRef);\n const errorApi = useApi(errorApiRef);\n const [signedIn, setSignedIn] = useState(false);\n const [profile, setProfile] = useState<ProfileInfo>(emptyProfile);\n\n useEffect(() => {\n let didCancel = false;\n\n const subscription = api\n .sessionState$()\n .subscribe((sessionState: SessionState) => {\n if (sessionState !== SessionState.SignedIn) {\n setProfile(emptyProfile);\n setSignedIn(false);\n }\n if (!didCancel) {\n api\n .getProfile({ optional: true })\n .then((profileResponse: ProfileInfo | undefined) => {\n if (!didCancel) {\n if (sessionState === SessionState.SignedIn) {\n setSignedIn(true);\n }\n if (profileResponse) {\n setProfile(profileResponse);\n }\n }\n });\n }\n });\n\n return () => {\n didCancel = true;\n subscription.unsubscribe();\n };\n }, [api]);\n\n return (\n <ListItem>\n <ListItemIcon>\n <Icon />\n </ListItemIcon>\n <ListItemText\n primary={title}\n secondary={\n <Tooltip placement=\"top\" arrow title={description}>\n <Grid container spacing={6}>\n <Grid item>\n <ProviderSettingsAvatar size={48} picture={profile.picture} />\n </Grid>\n <Grid item xs={12} sm container>\n <Grid item xs container direction=\"column\" spacing={2}>\n <Grid item xs>\n <Typography\n variant=\"subtitle1\"\n color=\"textPrimary\"\n gutterBottom\n >\n {profile.displayName}\n </Typography>\n <Typography variant=\"body2\" color=\"textSecondary\">\n {profile.email}\n </Typography>\n <Typography variant=\"body2\" color=\"textSecondary\">\n {description}\n </Typography>\n </Grid>\n </Grid>\n </Grid>\n </Grid>\n </Tooltip>\n }\n secondaryTypographyProps={{ noWrap: true, style: { width: '80%' } }}\n />\n <ListItemSecondaryAction>\n <Tooltip\n placement=\"top\"\n arrow\n title={signedIn ? `Sign out from ${title}` : `Sign in to ${title}`}\n >\n <Button\n variant=\"outlined\"\n color=\"primary\"\n onClick={() => {\n const action = signedIn ? api.signOut() : api.signIn();\n action.catch(error => errorApi.post(error));\n }}\n >\n {signedIn ? `Sign out` : `Sign in`}\n </Button>\n </Tooltip>\n </ListItemSecondaryAction>\n </ListItem>\n );\n};\n","/*\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 Star from '@material-ui/icons/Star';\nimport React from 'react';\nimport { ProviderSettingsItem } from './ProviderSettingsItem';\nimport {\n githubAuthApiRef,\n gitlabAuthApiRef,\n googleAuthApiRef,\n oktaAuthApiRef,\n microsoftAuthApiRef,\n bitbucketAuthApiRef,\n bitbucketServerAuthApiRef,\n atlassianAuthApiRef,\n oneloginAuthApiRef,\n} from '@backstage/core-plugin-api';\n\n/** @public */\nexport const DefaultProviderSettings = (props: {\n configuredProviders: string[];\n}) => {\n const { configuredProviders } = props;\n return (\n <>\n {configuredProviders.includes('google') && (\n <ProviderSettingsItem\n title=\"Google\"\n description=\"Provides authentication towards Google APIs and identities\"\n apiRef={googleAuthApiRef}\n icon={Star}\n />\n )}\n {configuredProviders.includes('microsoft') && (\n <ProviderSettingsItem\n title=\"Microsoft\"\n description=\"Provides authentication towards Microsoft APIs and identities\"\n apiRef={microsoftAuthApiRef}\n icon={Star}\n />\n )}\n {configuredProviders.includes('github') && (\n <ProviderSettingsItem\n title=\"GitHub\"\n description=\"Provides authentication towards GitHub APIs\"\n apiRef={githubAuthApiRef}\n icon={Star}\n />\n )}\n {configuredProviders.includes('gitlab') && (\n <ProviderSettingsItem\n title=\"GitLab\"\n description=\"Provides authentication towards GitLab APIs\"\n apiRef={gitlabAuthApiRef}\n icon={Star}\n />\n )}\n {configuredProviders.includes('okta') && (\n <ProviderSettingsItem\n title=\"Okta\"\n description=\"Provides authentication towards Okta APIs\"\n apiRef={oktaAuthApiRef}\n icon={Star}\n />\n )}\n {configuredProviders.includes('bitbucket') && (\n <ProviderSettingsItem\n title=\"Bitbucket\"\n description=\"Provides authentication towards Bitbucket APIs\"\n apiRef={bitbucketAuthApiRef}\n icon={Star}\n />\n )}\n {configuredProviders.includes('onelogin') && (\n <ProviderSettingsItem\n title=\"OneLogin\"\n description=\"Provides authentication towards OneLogin APIs\"\n apiRef={oneloginAuthApiRef}\n icon={Star}\n />\n )}\n {configuredProviders.includes('atlassian') && (\n <ProviderSettingsItem\n title=\"Atlassian\"\n description=\"Provides authentication towards Atlassian APIs\"\n apiRef={atlassianAuthApiRef}\n icon={Star}\n />\n )}\n {configuredProviders.includes('bitbucketServer') && (\n <ProviderSettingsItem\n title=\"Bitbucket Server\"\n description=\"Provides authentication towards Bitbucket Server APIs\"\n apiRef={bitbucketServerAuthApiRef}\n icon={Star}\n />\n )}\n </>\n );\n};\n","/*\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 React from 'react';\nimport { List } from '@material-ui/core';\nimport { EmptyProviders } from './EmptyProviders';\nimport { DefaultProviderSettings } from './DefaultProviderSettings';\nimport { configApiRef, useApi } from '@backstage/core-plugin-api';\nimport { InfoCard } from '@backstage/core-components';\n\n/** @public */\nexport const UserSettingsAuthProviders = (props: {\n providerSettings?: JSX.Element;\n}) => {\n const { providerSettings } = props;\n const configApi = useApi(configApiRef);\n const providersConfig = configApi.getOptionalConfig('auth.providers');\n const configuredProviders = providersConfig?.keys() || [];\n const providers = providerSettings ?? (\n <DefaultProviderSettings configuredProviders={configuredProviders} />\n );\n\n if (!providerSettings && !configuredProviders?.length) {\n return <EmptyProviders />;\n }\n\n return (\n <InfoCard title=\"Available Providers\">\n <List dense>{providers}</List>\n </InfoCard>\n );\n};\n","/*\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 React from 'react';\nimport { Button, Typography } from '@material-ui/core';\nimport { CodeSnippet, EmptyState } from '@backstage/core-components';\n\nconst EXAMPLE = `import { createPlugin } from '@backstage/core-plugin-api';\n\nexport default createPlugin({\n id: 'plugin-name',\n featureFlags: [{ name: 'enable-example-feature' }],\n});\n`;\n\nexport const EmptyFlags = () => (\n <EmptyState\n missing=\"content\"\n title=\"No Feature Flags\"\n description=\"Feature Flags make it possible for plugins to register features in Backstage for users to opt into. You can use this to split out logic in your code for manual A/B testing, etc.\"\n action={\n <>\n <Typography variant=\"body1\">\n An example for how to add a feature flag is highlighted below:\n </Typography>\n <CodeSnippet\n text={EXAMPLE}\n language=\"typescript\"\n showLineNumbers\n highlightedNumbers={[6]}\n customStyle={{ background: 'inherit', fontSize: '115%' }}\n />\n <Button\n variant=\"contained\"\n color=\"primary\"\n href=\"https://backstage.io/docs/api/utility-apis\"\n >\n Read More\n </Button>\n </>\n }\n />\n);\n","/*\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 React from 'react';\nimport {\n ListItem,\n ListItemText,\n ListItemIcon,\n Switch,\n Tooltip,\n} from '@material-ui/core';\nimport { FeatureFlag } from '@backstage/core-plugin-api';\n\ntype Props = {\n flag: FeatureFlag;\n enabled: boolean;\n toggleHandler: Function;\n};\n\nconst getSecondaryText = (flag: FeatureFlag) => {\n if (flag.description) {\n return flag.description;\n }\n return flag.pluginId\n ? `Registered in ${flag.pluginId} plugin`\n : 'Registered in the application';\n};\n\nexport const FlagItem = ({ flag, enabled, toggleHandler }: Props) => (\n <ListItem divider button onClick={() => toggleHandler(flag.name)}>\n <ListItemIcon>\n <Tooltip placement=\"top\" arrow title={enabled ? 'Disable' : 'Enable'}>\n <Switch color=\"primary\" checked={enabled} name={flag.name} />\n </Tooltip>\n </ListItemIcon>\n <ListItemText primary={flag.name} secondary={getSecondaryText(flag)} />\n </ListItem>\n);\n","/*\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 React, { useCallback, useState } from 'react';\nimport {\n List,\n TextField,\n IconButton,\n Grid,\n Typography,\n} from '@material-ui/core';\nimport { EmptyFlags } from './EmptyFlags';\nimport { FlagItem } from './FeatureFlagsItem';\nimport {\n FeatureFlag,\n FeatureFlagsApi,\n featureFlagsApiRef,\n FeatureFlagState,\n useApi,\n} from '@backstage/core-plugin-api';\nimport { InfoCard } from '@backstage/core-components';\nimport ClearIcon from '@material-ui/icons/Clear';\n\nexport const sortFlags = (\n flags: FeatureFlag[],\n featureFlagsApi: FeatureFlagsApi,\n): FeatureFlag[] => {\n const activeFlags = flags.filter(flag => featureFlagsApi.isActive(flag.name));\n const idleFlags = flags.filter(flag => !featureFlagsApi.isActive(flag.name));\n return [...activeFlags, ...idleFlags];\n};\n\n/** @public */\nexport const UserSettingsFeatureFlags = () => {\n const featureFlagsApi = useApi(featureFlagsApiRef);\n const inputRef = React.useRef<HTMLElement>();\n\n const initialFeatureFlags = featureFlagsApi.getRegisteredFlags();\n const initialFeatureFlagsSorted = sortFlags(\n initialFeatureFlags,\n featureFlagsApi,\n );\n const [featureFlags] = useState(initialFeatureFlagsSorted);\n\n const initialFlagState = Object.fromEntries(\n featureFlags.map(({ name }) => [name, featureFlagsApi.isActive(name)]),\n );\n\n const [state, setState] = useState<Record<string, boolean>>(initialFlagState);\n const [filterInput, setFilterInput] = useState<string>('');\n\n const toggleFlag = useCallback(\n (flagName: string) => {\n const newState = featureFlagsApi.isActive(flagName)\n ? FeatureFlagState.None\n : FeatureFlagState.Active;\n\n featureFlagsApi.save({\n states: { [flagName]: newState },\n merge: true,\n });\n\n setState(prevState => ({\n ...prevState,\n [flagName]: newState === FeatureFlagState.Active,\n }));\n },\n [featureFlagsApi],\n );\n\n if (!featureFlags.length) {\n return <EmptyFlags />;\n }\n\n const clearFilterInput = () => {\n setFilterInput('');\n inputRef?.current?.focus();\n };\n\n const filteredFeatureFlags = featureFlags.filter(featureFlag => {\n const featureFlagName = featureFlag.name.toLocaleLowerCase('en-US');\n return featureFlagName.includes(filterInput.toLocaleLowerCase('en-US'));\n });\n\n const Header = () => (\n <Grid container style={{ justifyContent: 'space-between' }}>\n <Grid item xs={6} md={8}>\n <Typography variant=\"h5\">Feature Flags</Typography>\n <Typography variant=\"subtitle1\">\n Please refresh the page when toggling feature flags\n </Typography>\n </Grid>\n {featureFlags.length >= 10 && (\n <Grid item xs={6} md={4}>\n <TextField\n label=\"Filter\"\n style={{ display: 'flex', justifyContent: 'flex-end' }}\n inputRef={ref => ref && ref.focus()}\n InputProps={{\n ...(filterInput.length && {\n endAdornment: (\n <IconButton\n aria-label=\"Clear filter\"\n onClick={clearFilterInput}\n edge=\"end\"\n >\n <ClearIcon />\n </IconButton>\n ),\n }),\n }}\n onChange={e => setFilterInput(e.target.value)}\n value={filterInput}\n />\n </Grid>\n )}\n </Grid>\n );\n\n return (\n <InfoCard title={<Header />}>\n <List dense>\n {filteredFeatureFlags.map(featureFlag => {\n const enabled = Boolean(state[featureFlag.name]);\n\n return (\n <FlagItem\n key={featureFlag.name}\n flag={featureFlag}\n enabled={enabled}\n toggleHandler={toggleFlag}\n />\n );\n })}\n </List>\n </InfoCard>\n );\n};\n","/*\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 alertApiRef,\n identityApiRef,\n ProfileInfo,\n useApi,\n} from '@backstage/core-plugin-api';\nimport { useEffect } from 'react';\nimport useAsync from 'react-use/lib/useAsync';\n\n/** @public */\nexport const useUserProfile = () => {\n const identityApi = useApi(identityApiRef);\n const alertApi = useApi(alertApiRef);\n\n const { value, loading, error } = useAsync(async () => {\n return {\n profile: await identityApi.getProfileInfo(),\n identity: await identityApi.getBackstageIdentity(),\n };\n }, []);\n\n useEffect(() => {\n if (error) {\n alertApi.post({\n message: `Failed to load user identity: ${error}`,\n severity: 'error',\n });\n }\n }, [error, alertApi]);\n\n if (loading || error) {\n return {\n profile: {} as ProfileInfo,\n displayName: '',\n loading,\n };\n }\n\n return {\n profile: value!.profile,\n backstageIdentity: value!.identity,\n displayName: value!.profile.displayName ?? value!.identity.userEntityRef,\n loading,\n };\n};\n","/*\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 React from 'react';\nimport { BackstageTheme } from '@backstage/theme';\nimport { makeStyles, Avatar } from '@material-ui/core';\nimport { useUserProfile } from '../useUserProfileInfo';\nimport { sidebarConfig } from '@backstage/core-components';\n\nconst useStyles = makeStyles<BackstageTheme, { size: number }>(theme => ({\n avatar: {\n width: ({ size }) => size,\n height: ({ size }) => size,\n fontSize: ({ size }) => size * 0.7,\n border: `1px solid ${theme.palette.textSubtle}`,\n },\n}));\n\n/** @public */\nexport const UserSettingsSignInAvatar = (props: { size?: number }) => {\n const { size } = props;\n\n const { iconSize } = sidebarConfig;\n const classes = useStyles(size ? { size } : { size: iconSize });\n const { profile } = useUserProfile();\n\n return (\n <Avatar\n src={profile.picture}\n className={classes.avatar}\n alt=\"Profile picture\"\n />\n );\n};\n","/*\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 React from 'react';\nimport { IconButton, ListItemIcon, Menu, MenuItem } from '@material-ui/core';\nimport SignOutIcon from '@material-ui/icons/MeetingRoom';\nimport MoreVertIcon from '@material-ui/icons/MoreVert';\nimport {\n identityApiRef,\n errorApiRef,\n useApi,\n} from '@backstage/core-plugin-api';\n\n/** @public */\nexport const UserSettingsMenu = () => {\n const errorApi = useApi(errorApiRef);\n const identityApi = useApi(identityApiRef);\n const [open, setOpen] = React.useState(false);\n const [anchorEl, setAnchorEl] = React.useState<undefined | HTMLElement>(\n undefined,\n );\n\n const handleOpen = (event: React.MouseEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget);\n setOpen(true);\n };\n\n const handleClose = () => {\n setAnchorEl(undefined);\n setOpen(false);\n };\n\n return (\n <>\n <IconButton\n data-testid=\"user-settings-menu\"\n aria-label=\"more\"\n onClick={handleOpen}\n >\n <MoreVertIcon />\n </IconButton>\n <Menu anchorEl={anchorEl} open={open} onClose={handleClose}>\n <MenuItem\n data-testid=\"sign-out\"\n onClick={() =>\n identityApi.signOut().catch(error => errorApi.post(error))\n }\n >\n <ListItemIcon>\n <SignOutIcon />\n </ListItemIcon>\n Sign Out\n </MenuItem>\n </Menu>\n </>\n );\n};\n","/*\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 { Grid, Typography } from '@material-ui/core';\nimport React from 'react';\nimport { UserSettingsSignInAvatar } from './UserSettingsSignInAvatar';\nimport { UserSettingsMenu } from './UserSettingsMenu';\nimport { useUserProfile } from '../useUserProfileInfo';\nimport { InfoCard } from '@backstage/core-components';\n\n/** @public */\nexport const UserSettingsProfileCard = () => {\n const { profile, displayName } = useUserProfile();\n\n return (\n <InfoCard title=\"Profile\" variant=\"gridItem\">\n <Grid container spacing={6}>\n <Grid item>\n <UserSettingsSignInAvatar size={96} />\n </Grid>\n <Grid item xs={12} sm container>\n <Grid item xs container direction=\"column\" spacing={2}>\n <Grid item xs>\n <Typography variant=\"subtitle1\" gutterBottom>\n {displayName}\n </Typography>\n {profile.email && (\n <Typography variant=\"body2\" color=\"textSecondary\">\n {profile.email}\n </Typography>\n )}\n </Grid>\n </Grid>\n <Grid item>\n <UserSettingsMenu />\n </Grid>\n </Grid>\n </Grid>\n </InfoCard>\n );\n};\n","/*\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 React from 'react';\nimport {\n ListItem,\n ListItemSecondaryAction,\n ListItemText,\n Switch,\n Tooltip,\n} from '@material-ui/core';\nimport { useSidebarPinState } from '@backstage/core-components';\n\n/** @public */\nexport const UserSettingsPinToggle = () => {\n const { isPinned, toggleSidebarPinState } = useSidebarPinState();\n\n return (\n <ListItem>\n <ListItemText\n primary=\"Pin Sidebar\"\n secondary=\"Prevent the sidebar from collapsing\"\n />\n <ListItemSecondaryAction>\n <Tooltip\n placement=\"top\"\n arrow\n title={`${isPinned ? 'Unpin' : 'Pin'} Sidebar`}\n >\n <Switch\n color=\"primary\"\n checked={isPinned}\n onChange={() => toggleSidebarPinState()}\n name=\"pin\"\n inputProps={{ 'aria-label': 'Pin Sidebar Switch' }}\n />\n </Tooltip>\n </ListItemSecondaryAction>\n </ListItem>\n );\n};\n","/*\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 React, { cloneElement } from 'react';\nimport useObservable from 'react-use/lib/useObservable';\nimport AutoIcon from '@material-ui/icons/BrightnessAuto';\nimport ToggleButton from '@material-ui/lab/ToggleButton';\nimport ToggleButtonGroup from '@material-ui/lab/ToggleButtonGroup';\nimport {\n ListItem,\n ListItemText,\n ListItemSecondaryAction,\n Tooltip,\n makeStyles,\n} from '@material-ui/core';\nimport { appThemeApiRef, useApi } from '@backstage/core-plugin-api';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { userSettingsTranslationRef } from '../../translation';\n\ntype ThemeIconProps = {\n id: string;\n activeId: string | undefined;\n icon: JSX.Element | undefined;\n};\n\nconst ThemeIcon = ({ id, activeId, icon }: ThemeIconProps) =>\n icon ? (\n cloneElement(icon, {\n color: activeId === id ? 'primary' : undefined,\n })\n ) : (\n <AutoIcon color={activeId === id ? 'primary' : undefined} />\n );\n\ntype TooltipToggleButtonProps = {\n children: JSX.Element;\n title: string;\n value: string;\n};\n\nconst useStyles = makeStyles(theme => ({\n container: {\n display: 'flex',\n flexWrap: 'wrap',\n width: '100%',\n justifyContent: 'space-between',\n alignItems: 'center',\n paddingBottom: 8,\n paddingRight: 16,\n },\n list: {\n width: 'initial',\n [theme.breakpoints.down('xs')]: {\n width: '100%',\n padding: `0 0 12px`,\n },\n },\n listItemText: {\n paddingRight: 0,\n paddingLeft: 0,\n },\n listItemSecondaryAction: {\n position: 'relative',\n transform: 'unset',\n top: 'auto',\n right: 'auto',\n paddingLeft: 16,\n [theme.breakpoints.down('xs')]: {\n paddingLeft: 0,\n },\n },\n}));\n\n// ToggleButtonGroup uses React.children.map instead of context\n// so wrapping with Tooltip breaks ToggleButton functionality.\nconst TooltipToggleButton = ({\n children,\n title,\n value,\n ...props\n}: TooltipToggleButtonProps) => (\n <Tooltip placement=\"top\" arrow title={title}>\n <ToggleButton value={value} {...props}>\n {children}\n </ToggleButton>\n </Tooltip>\n);\n\n/** @public */\nexport const UserSettingsThemeToggle = () => {\n const classes = useStyles();\n const appThemeApi = useApi(appThemeApiRef);\n const activeThemeId = useObservable(\n appThemeApi.activeThemeId$(),\n appThemeApi.getActiveThemeId(),\n );\n\n const themeIds = appThemeApi.getInstalledThemes();\n\n const { t } = useTranslationRef(userSettingsTranslationRef);\n\n const handleSetTheme = (\n _event: React.MouseEvent<HTMLElement>,\n newThemeId: string | undefined,\n ) => {\n if (themeIds.some(it => it.id === newThemeId)) {\n appThemeApi.setActiveThemeId(newThemeId);\n } else {\n appThemeApi.setActiveThemeId(undefined);\n }\n };\n\n return (\n <ListItem\n className={classes.list}\n classes={{ container: classes.container }}\n >\n <ListItemText\n className={classes.listItemText}\n primary={t('theme')}\n secondary={t('change_the_theme_mode')}\n />\n <ListItemSecondaryAction className={classes.listItemSecondaryAction}>\n <ToggleButtonGroup\n exclusive\n size=\"small\"\n value={activeThemeId ?? 'auto'}\n onChange={handleSetTheme}\n >\n {themeIds.map(theme => {\n const themeIcon = themeIds.find(it => it.id === theme.id)?.icon;\n const themeId = theme.id;\n const themeTitle =\n theme.title ||\n (themeId === 'light' || themeId === 'dark'\n ? t(`theme_${themeId}`)\n : themeId);\n return (\n <TooltipToggleButton\n key={themeId}\n title={t('select_theme', { theme: themeTitle })}\n value={themeId}\n >\n <>\n {themeTitle} \n <ThemeIcon id={themeId} icon={themeIcon} activeId={themeId} />\n </>\n </TooltipToggleButton>\n );\n })}\n <Tooltip placement=\"top\" arrow title={t('select_theme_auto')}>\n <ToggleButton value=\"auto\" selected={activeThemeId === undefined}>\n {t('theme_auto')} \n <AutoIcon\n color={activeThemeId === undefined ? 'primary' : undefined}\n />\n </ToggleButton>\n </Tooltip>\n </ToggleButtonGroup>\n </ListItemSecondaryAction>\n </ListItem>\n );\n};\n","/*\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 React, { useState } from 'react';\nimport {\n useTranslationRef,\n appLanguageApiRef,\n} from '@backstage/core-plugin-api/alpha';\nimport ToggleButton from '@material-ui/lab/ToggleButton';\nimport ToggleButtonGroup from '@material-ui/lab/ToggleButtonGroup';\nimport {\n ListItem,\n ListItemText,\n ListItemSecondaryAction,\n Tooltip,\n makeStyles,\n} from '@material-ui/core';\nimport { userSettingsTranslationRef } from '../../translation';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useObservable from 'react-use/lib/useObservable';\n\ntype TooltipToggleButtonProps = {\n children: JSX.Element;\n title: string;\n value: string;\n};\n\nconst useStyles = makeStyles(theme => ({\n container: {\n display: 'flex',\n flexWrap: 'wrap',\n width: '100%',\n justifyContent: 'space-between',\n alignItems: 'center',\n paddingBottom: 8,\n paddingRight: 16,\n },\n list: {\n width: 'initial',\n [theme.breakpoints.down('xs')]: {\n width: '100%',\n padding: `0 0 12px`,\n },\n },\n listItemText: {\n paddingRight: 0,\n paddingLeft: 0,\n },\n listItemSecondaryAction: {\n position: 'relative',\n transform: 'unset',\n top: 'auto',\n right: 'auto',\n paddingLeft: 16,\n [theme.breakpoints.down('xs')]: {\n paddingLeft: 0,\n },\n },\n}));\n\n// ToggleButtonGroup uses React.children.map instead of context\n// so wrapping with Tooltip breaks ToggleButton functionality.\nconst TooltipToggleButton = ({\n children,\n title,\n value,\n ...props\n}: TooltipToggleButtonProps) => (\n <Tooltip placement=\"top\" arrow title={title}>\n <ToggleButton value={value} {...props}>\n {children}\n </ToggleButton>\n </Tooltip>\n);\n\n/** @public */\nexport const UserSettingsLanguageToggle = () => {\n const classes = useStyles();\n const languageApi = useApi(appLanguageApiRef);\n const { t } = useTranslationRef(userSettingsTranslationRef);\n\n const [languageObservable] = useState(() => languageApi.language$());\n const { language: currentLanguage } = useObservable(\n languageObservable,\n languageApi.getLanguage(),\n );\n\n const { languages } = languageApi.getAvailableLanguages();\n\n if (languages.length <= 1) {\n return null;\n }\n\n const handleSetLanguage = (\n _event: React.MouseEvent<HTMLElement>,\n newLanguage: string | undefined,\n ) => {\n languageApi.setLanguage(newLanguage);\n };\n\n return (\n <ListItem\n className={classes.list}\n classes={{ container: classes.container }}\n >\n <ListItemText\n className={classes.listItemText}\n primary={t('language')}\n secondary={t('change_the_language')}\n />\n <ListItemSecondaryAction className={classes.listItemSecondaryAction}>\n <ToggleButtonGroup\n exclusive\n size=\"small\"\n value={currentLanguage}\n onChange={handleSetLanguage}\n >\n {languages.map(language => {\n return (\n <TooltipToggleButton\n key={language}\n title={t('select_lng', { language })}\n value={language}\n >\n <>{language}</>\n </TooltipToggleButton>\n );\n })}\n </ToggleButtonGroup>\n </ListItemSecondaryAction>\n </ListItem>\n );\n};\n","/*\n * Copyright 2021 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 { InfoCard, useSidebarPinState } from '@backstage/core-components';\nimport { List } from '@material-ui/core';\nimport React from 'react';\nimport { UserSettingsPinToggle } from './UserSettingsPinToggle';\nimport { UserSettingsThemeToggle } from './UserSettingsThemeToggle';\nimport { UserSettingsLanguageToggle } from './UserSettingsLanguageToggle';\n\n/** @public */\nexport const UserSettingsAppearanceCard = () => {\n const { isMobile } = useSidebarPinState();\n\n return (\n <InfoCard title=\"Appearance\" variant=\"gridItem\">\n <List dense>\n <UserSettingsThemeToggle />\n <UserSettingsLanguageToggle />\n {!isMobile && <UserSettingsPinToggle />}\n </List>\n </InfoCard>\n );\n};\n","/*\n * Copyright 2022 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 { InfoCard } from '@backstage/core-components';\nimport { EntityRefLinks } from '@backstage/plugin-catalog-react';\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport React from 'react';\nimport { useUserProfile } from '../useUserProfileInfo';\n\nconst Contents = () => {\n const { backstageIdentity } = useUserProfile();\n\n if (!backstageIdentity) {\n return <Typography>No Backstage Identity</Typography>;\n }\n\n return (\n <Grid container spacing={1}>\n <Grid item xs={12}>\n <Typography variant=\"subtitle1\" gutterBottom>\n User Entity:{' '}\n <EntityRefLinks\n entityRefs={[backstageIdentity.userEntityRef]}\n getTitle={ref => ref}\n />\n </Typography>\n </Grid>\n <Grid item xs={12}>\n <Typography variant=\"subtitle1\">\n Ownership Entities:{' '}\n <EntityRefLinks\n entityRefs={backstageIdentity.ownershipEntityRefs}\n getTitle={ref => ref}\n />\n </Typography>\n </Grid>\n </Grid>\n );\n};\n\n/** @public */\nexport const UserSettingsIdentityCard = () => (\n <InfoCard title=\"Backstage Identity\">\n <Contents />\n </InfoCard>\n);\n","/*\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 { Grid } from '@material-ui/core';\nimport React from 'react';\nimport { UserSettingsProfileCard } from './UserSettingsProfileCard';\nimport { UserSettingsAppearanceCard } from './UserSettingsAppearanceCard';\nimport { UserSettingsIdentityCard } from './UserSettingsIdentityCard';\n\n/** @public */\nexport const UserSettingsGeneral = () => {\n return (\n <Grid container direction=\"row\" spacing={3}>\n <Grid item xs={12} md={6}>\n <UserSettingsProfileCard />\n </Grid>\n <Grid item xs={12} md={6}>\n <UserSettingsAppearanceCard />\n </Grid>\n <Grid item xs={12} md={6}>\n <UserSettingsIdentityCard />\n </Grid>\n </Grid>\n );\n};\n","/*\n * Copyright 2022 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 React from 'react';\nimport { TabProps } from '@material-ui/core';\nimport {\n Header,\n Page,\n RoutedTabs,\n useSidebarPinState,\n} from '@backstage/core-components';\nimport {\n attachComponentData,\n useElementFilter,\n} from '@backstage/core-plugin-api';\n\n/** @public */\nexport type SettingsLayoutRouteProps = {\n path: string;\n title: string;\n children: JSX.Element;\n tabProps?: TabProps<React.ElementType, { component?: React.ElementType }>;\n};\n\nexport const LAYOUT_DATA_KEY = 'plugin.user-settings.settingsLayout';\nexport const LAYOUT_ROUTE_DATA_KEY = 'plugin.user-settings.settingsLayoutRoute';\n\nconst Route: (props: SettingsLayoutRouteProps) => null = () => null;\nattachComponentData(Route, LAYOUT_ROUTE_DATA_KEY, true);\n\n// This causes all mount points that are discovered within this route to use the path of the route itself\nattachComponentData(Route, 'core.gatherMountPoints', true);\n\n/** @public */\nexport type SettingsLayoutProps = {\n title?: string;\n subtitle?: string;\n children?: React.ReactNode;\n};\n\n/**\n * @public\n */\nexport const SettingsLayout = (props: SettingsLayoutProps) => {\n const { title, children } = props;\n const { isMobile } = useSidebarPinState();\n\n const routes = useElementFilter(children, elements =>\n elements\n .selectByComponentData({\n key: LAYOUT_ROUTE_DATA_KEY,\n withStrictError:\n 'Child of SettingsLayout must be an SettingsLayout.Route',\n })\n .getElements<SettingsLayoutRouteProps>()\n .map(child => child.props),\n );\n\n return (\n <Page themeId=\"home\">\n {!isMobile && <Header title={title ?? 'Settings'} />}\n <RoutedTabs routes={routes} />\n </Page>\n );\n};\n\nattachComponentData(SettingsLayout, LAYOUT_DATA_KEY, true);\n\nSettingsLayout.Route = Route;\n","/*\n * Copyright 2022 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 React from 'react';\nimport { UserSettingsAuthProviders } from '../AuthProviders';\nimport { UserSettingsFeatureFlags } from '../FeatureFlags';\nimport { UserSettingsGeneral } from '../General';\nimport { SettingsLayout, SettingsLayoutRouteProps } from '../SettingsLayout';\n\n/**\n * @public\n */\nexport const DefaultSettingsPage = (props: {\n tabs?: React.ReactElement<SettingsLayoutRouteProps>[];\n providerSettings?: JSX.Element;\n}) => {\n const { providerSettings, tabs } = props;\n\n return (\n <SettingsLayout>\n <SettingsLayout.Route path=\"general\" title=\"General\">\n <UserSettingsGeneral />\n </SettingsLayout.Route>\n <SettingsLayout.Route\n path=\"auth-providers\"\n title=\"Authentication Providers\"\n >\n <UserSettingsAuthProviders providerSettings={providerSettings} />\n </SettingsLayout.Route>\n <SettingsLayout.Route path=\"feature-flags\" title=\"Feature Flags\">\n <UserSettingsFeatureFlags />\n </SettingsLayout.Route>\n {tabs}\n </SettingsLayout>\n );\n};\n","/*\n * Copyright 2022 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 { useOutlet } from 'react-router-dom';\nimport React from 'react';\nimport { DefaultSettingsPage } from '../DefaultSettingsPage';\nimport { useElementFilter } from '@backstage/core-plugin-api';\nimport {\n SettingsLayoutProps,\n SettingsLayoutRouteProps,\n} from '../SettingsLayout';\nimport {\n LAYOUT_DATA_KEY,\n LAYOUT_ROUTE_DATA_KEY,\n} from '../SettingsLayout/SettingsLayout';\n\n/** @public */\nexport const SettingsPage = (props: { providerSettings?: JSX.Element }) => {\n const { providerSettings } = props;\n const outlet = useOutlet();\n const layout = useElementFilter(outlet, elements =>\n elements\n .selectByComponentData({\n key: LAYOUT_DATA_KEY,\n })\n .getElements<SettingsLayoutProps>(),\n );\n const tabs = useElementFilter(outlet, elements =>\n elements\n .selectByComponentData({\n key: LAYOUT_ROUTE_DATA_KEY,\n })\n .getElements<SettingsLayoutRouteProps>(),\n );\n\n return (\n <>\n {(layout.length !== 0 && layout) || (\n <DefaultSettingsPage tabs={tabs} providerSettings={providerSettings} />\n )}\n </>\n );\n};\n","/*\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 */\nimport React, { PropsWithChildren } from 'react';\nimport { attachComponentData } from '@backstage/core-plugin-api';\nimport {\n LAYOUT_ROUTE_DATA_KEY,\n SettingsLayout,\n} from '../SettingsLayout/SettingsLayout';\n\n/** @public @deprecated Use SettingsLayout.Route approach instead */\nexport const USER_SETTINGS_TAB_KEY = LAYOUT_ROUTE_DATA_KEY;\n\n/** @public @deprecated Use SettingsLayoutRouteProps instead */\nexport type UserSettingsTabProps = PropsWithChildren<{\n /**\n * The path to the tab in the settings route\n * @example `/settings/advanced`\n */\n path: string;\n /** The title of the tab. It will also reflect in the document title when the tab is active */\n title: string;\n}>;\n\n/**\n * Renders a tab inside the settings page\n * @param props - Component props\n * @public\n * @deprecated Use SettingsLayout.Route instead\n */\nexport const UserSettingsTab = (props: UserSettingsTabProps) => (\n <SettingsLayout.Route path={props.path} title={props.title}>\n <>props.children</>\n </SettingsLayout.Route>\n);\n\nattachComponentData(UserSettingsTab, USER_SETTINGS_TAB_KEY, 'UserSettingsTab');\n"],"names":["EXAMPLE","useStyles","TooltipToggleButton","Typography","Grid"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAM,YAAe,GAAA;AAAA,EACnB,cAAgB,EAAA,iCAAA;AAAA,EAChB,MAAQ,EAAA,kBAAA;AACV,CAAA,CAAA;AAEA,MAAM,OAAA,uBAAc,GAAiC,EAAA,CAAA;AAQ9C,MAAM,mBAA0C,CAAA;AAAA,EAU7C,YACW,SACA,EAAA,QAAA,EACA,YACA,EAAA,QAAA,EACA,aACA,QACjB,EAAA;AANiB,I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B,EAAA,MAAM,SAAS,SAAU,EAAA,CAAA;AACzB,EAAA,MAAM,MAAS,GAAA,gBAAA;AAAA,IAAiB,MAAA;AAAA,IAAQ,CAAA,QAAA,KACtC,SACG,qBAAsB,CAAA;AAAA,MACrB,GAAK,EAAA,eAAA;AAAA,KACN,EACA,WAAiC,EAAA;AAAA,GACtC,CAAA;AACA,EAAA,MAAM,IAAO,GAAA,gBAAA;AAAA,IAAiB,MAAA;AAAA,IAAQ,CAAA,QAAA,KACpC,SACG,qBAAsB,CAAA;AAAA,MACrB,GAAK,EAAA,qBAAA;AAAA,KACN,EACA,WAAsC,EAAA;AAAA,GAC3C,CAAA;AAEA,EACE,uBAAA,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EACI,OAAO,MAAW,KAAA,CAAA,IAAK,0BACtB,KAAA,CAAA,aAAA,CAAA,mBAAA,EAAA,EAAoB,IAAY,EAAA,gBAAA,EAAoC,CAEzE,CAAA,CAAA;AAEJ;;AC/BO,MAAM,qBAAwB,GAAA,sBAAA;AAmB9B,MAAM,eAAkB,GAAA,CAAC,KAC9B,qBAAA,KAAA,CAAA,aAAA,CAAC,eAAe,KAAf,EAAA,EAAqB,IAAM,EAAA,KAAA,CAAM,MAAM,KAAO,EAAA,KAAA,CAAM,KACnD,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EAAE,gBAAc,CAClB,EAAA;AAGF,mBAAoB,CAAA,eAAA,EAAiB,uBAAuB,iBAAiB,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-user-settings",
|
|
3
3
|
"description": "A Backstage plugin that provides a settings page",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.10",
|
|
5
5
|
"main": "./dist/index.esm.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -44,18 +44,17 @@
|
|
|
44
44
|
"clean": "backstage-cli package clean"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@backstage/core-app-api": "^1.10.0
|
|
48
|
-
"@backstage/core-components": "^0.13.5
|
|
49
|
-
"@backstage/core-plugin-api": "^1.6.0
|
|
50
|
-
"@backstage/errors": "^1.2.2
|
|
51
|
-
"@backstage/plugin-catalog-react": "^1.8.4
|
|
52
|
-
"@backstage/theme": "^0.4.2
|
|
53
|
-
"@backstage/types": "^1.1.1
|
|
47
|
+
"@backstage/core-app-api": "^1.10.0",
|
|
48
|
+
"@backstage/core-components": "^0.13.5",
|
|
49
|
+
"@backstage/core-plugin-api": "^1.6.0",
|
|
50
|
+
"@backstage/errors": "^1.2.2",
|
|
51
|
+
"@backstage/plugin-catalog-react": "^1.8.4",
|
|
52
|
+
"@backstage/theme": "^0.4.2",
|
|
53
|
+
"@backstage/types": "^1.1.1",
|
|
54
54
|
"@material-ui/core": "^4.12.2",
|
|
55
55
|
"@material-ui/icons": "^4.9.1",
|
|
56
56
|
"@material-ui/lab": "4.0.0-alpha.61",
|
|
57
57
|
"@types/react": "^16.13.1 || ^17.0.0",
|
|
58
|
-
"react-i18next": "^12.3.1",
|
|
59
58
|
"react-use": "^17.2.4",
|
|
60
59
|
"zen-observable": "^0.10.0"
|
|
61
60
|
},
|
|
@@ -65,9 +64,10 @@
|
|
|
65
64
|
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
66
65
|
},
|
|
67
66
|
"devDependencies": {
|
|
68
|
-
"@backstage/cli": "^0.22.13
|
|
69
|
-
"@backstage/dev-utils": "^1.0.21
|
|
70
|
-
"@backstage/
|
|
67
|
+
"@backstage/cli": "^0.22.13",
|
|
68
|
+
"@backstage/dev-utils": "^1.0.21",
|
|
69
|
+
"@backstage/plugin-catalog": "^1.13.0",
|
|
70
|
+
"@backstage/test-utils": "^1.4.3",
|
|
71
71
|
"@testing-library/dom": "^8.0.0",
|
|
72
72
|
"@testing-library/jest-dom": "^5.10.1",
|
|
73
73
|
"@testing-library/react": "^12.1.3",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-37e5b999.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
|