@backstage/plugin-user-settings 0.8.11-next.3 → 0.8.12-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # @backstage/plugin-user-settings
2
2
 
3
+ ## 0.8.12-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - fec8b57: Updated exports to use the new type parameters for extensions and extension blueprints.
8
+ - Updated dependencies
9
+ - @backstage/frontend-plugin-api@0.8.0-next.0
10
+ - @backstage/core-compat-api@0.2.9-next.0
11
+ - @backstage/plugin-catalog-react@1.12.4-next.0
12
+ - @backstage/plugin-signals-react@0.0.5-next.0
13
+ - @backstage/core-app-api@1.14.2
14
+ - @backstage/core-components@0.14.10
15
+ - @backstage/core-plugin-api@1.9.3
16
+ - @backstage/errors@1.2.4
17
+ - @backstage/theme@0.5.6
18
+ - @backstage/types@1.1.1
19
+ - @backstage/plugin-user-settings-common@0.0.1
20
+
21
+ ## 0.8.11
22
+
23
+ ### Patch Changes
24
+
25
+ - c7603e8: Deprecate the old pattern of `create*Extension`, and replace it with the equivalent Blueprint implementation instead
26
+ - 6349099: Added config input type to the extensions
27
+ - Updated dependencies
28
+ - @backstage/frontend-plugin-api@0.7.0
29
+ - @backstage/plugin-catalog-react@1.12.3
30
+ - @backstage/core-components@0.14.10
31
+ - @backstage/core-compat-api@0.2.8
32
+ - @backstage/core-app-api@1.14.2
33
+ - @backstage/core-plugin-api@1.9.3
34
+ - @backstage/errors@1.2.4
35
+ - @backstage/theme@0.5.6
36
+ - @backstage/types@1.1.1
37
+ - @backstage/plugin-signals-react@0.0.4
38
+ - @backstage/plugin-user-settings-common@0.0.1
39
+
3
40
  ## 0.8.11-next.3
4
41
 
5
42
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-user-settings__alpha",
3
- "version": "0.8.11-next.3",
3
+ "version": "0.8.12-next.0",
4
4
  "main": "../dist/alpha.esm.js",
5
5
  "module": "../dist/alpha.esm.js",
6
6
  "types": "../dist/alpha.d.ts"
package/dist/alpha.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
2
+ import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
3
+ import React__default from 'react';
2
4
  import * as _backstage_core_plugin_api_alpha from '@backstage/core-plugin-api/alpha';
3
5
 
4
6
  /** @alpha */
@@ -17,15 +19,57 @@ declare const userSettingsTranslationRef: _backstage_core_plugin_api_alpha.Trans
17
19
 
18
20
  /** @alpha */
19
21
  declare const settingsNavItem: _backstage_frontend_plugin_api.ExtensionDefinition<{
20
- title: string;
21
- }, {
22
- title?: string | undefined;
23
- }, never, never, string | undefined, string | undefined, string | undefined>;
22
+ kind: "nav-item";
23
+ namespace: undefined;
24
+ name: undefined;
25
+ config: {};
26
+ configInput: {};
27
+ output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<{
28
+ title: string;
29
+ icon: _backstage_core_plugin_api.IconComponent;
30
+ routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
31
+ }, "core.nav-item.target", {}>;
32
+ inputs: {};
33
+ }>;
24
34
  /**
25
35
  * @alpha
26
36
  */
27
37
  declare const _default: _backstage_frontend_plugin_api.BackstagePlugin<{
28
38
  root: _backstage_frontend_plugin_api.RouteRef<undefined>;
29
- }, {}, {}>;
39
+ }, {}, {
40
+ "nav-item:user-settings": _backstage_frontend_plugin_api.ExtensionDefinition<{
41
+ kind: "nav-item";
42
+ namespace: undefined;
43
+ name: undefined;
44
+ config: {};
45
+ configInput: {};
46
+ output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<{
47
+ title: string;
48
+ icon: _backstage_core_plugin_api.IconComponent;
49
+ routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
50
+ }, "core.nav-item.target", {}>;
51
+ inputs: {};
52
+ }>;
53
+ "page:user-settings": _backstage_frontend_plugin_api.ExtensionDefinition<{
54
+ config: {
55
+ path: string | undefined;
56
+ };
57
+ configInput: {
58
+ path?: string | undefined;
59
+ };
60
+ output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<React__default.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
61
+ optional: true;
62
+ }>;
63
+ inputs: {
64
+ providerSettings: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<React__default.JSX.Element, "core.reactElement", {}>, {
65
+ singleton: true;
66
+ optional: true;
67
+ }>;
68
+ };
69
+ kind: "page";
70
+ namespace: undefined;
71
+ name: undefined;
72
+ }>;
73
+ }>;
30
74
 
31
75
  export { _default as default, settingsNavItem, userSettingsTranslationRef };
package/dist/alpha.esm.js CHANGED
@@ -1,38 +1,44 @@
1
- import { createPageExtension, createExtensionInput, coreExtensionData, createNavItemExtension, createPlugin } from '@backstage/frontend-plugin-api';
1
+ import { PageBlueprint, createExtensionInput, coreExtensionData, NavItemBlueprint, createFrontendPlugin } from '@backstage/frontend-plugin-api';
2
2
  import { convertLegacyRouteRef, compatWrapper, convertLegacyRouteRefs } from '@backstage/core-compat-api';
3
3
  import SettingsIcon from '@material-ui/icons/Settings';
4
4
  import { settingsRouteRef } from './plugin.esm.js';
5
5
  import React from 'react';
6
6
  export { userSettingsTranslationRef } from './translation.esm.js';
7
7
 
8
- const userSettingsPage = createPageExtension({
9
- defaultPath: "/settings",
10
- routeRef: convertLegacyRouteRef(settingsRouteRef),
8
+ const userSettingsPage = PageBlueprint.makeWithOverrides({
11
9
  inputs: {
12
- providerSettings: createExtensionInput(
13
- {
14
- element: coreExtensionData.reactElement
15
- },
16
- { singleton: true, optional: true }
17
- )
10
+ providerSettings: createExtensionInput([coreExtensionData.reactElement], {
11
+ singleton: true,
12
+ optional: true
13
+ })
18
14
  },
19
- loader: ({ inputs }) => import('./components/SettingsPage/index.esm.js').then(
20
- (m) => compatWrapper(
21
- /* @__PURE__ */ React.createElement(
22
- m.SettingsPage,
23
- {
24
- providerSettings: inputs.providerSettings?.output.element
25
- }
15
+ factory(originalFactory, { inputs }) {
16
+ return originalFactory({
17
+ defaultPath: "/settings",
18
+ routeRef: convertLegacyRouteRef(settingsRouteRef),
19
+ loader: () => import('./components/SettingsPage/index.esm.js').then(
20
+ (m) => compatWrapper(
21
+ /* @__PURE__ */ React.createElement(
22
+ m.SettingsPage,
23
+ {
24
+ providerSettings: inputs.providerSettings?.get(
25
+ coreExtensionData.reactElement
26
+ )
27
+ }
28
+ )
29
+ )
26
30
  )
27
- )
28
- )
31
+ });
32
+ }
29
33
  });
30
- const settingsNavItem = createNavItemExtension({
31
- routeRef: convertLegacyRouteRef(settingsRouteRef),
32
- title: "Settings",
33
- icon: SettingsIcon
34
+ const settingsNavItem = NavItemBlueprint.make({
35
+ params: {
36
+ routeRef: convertLegacyRouteRef(settingsRouteRef),
37
+ title: "Settings",
38
+ icon: SettingsIcon
39
+ }
34
40
  });
35
- var alpha = createPlugin({
41
+ var alpha = createFrontendPlugin({
36
42
  id: "user-settings",
37
43
  extensions: [userSettingsPage, settingsNavItem],
38
44
  routes: convertLegacyRouteRefs({
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.esm.js","sources":["../src/alpha.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n coreExtensionData,\n createExtensionInput,\n createNavItemExtension,\n createPageExtension,\n createPlugin,\n} from '@backstage/frontend-plugin-api';\nimport {\n convertLegacyRouteRef,\n convertLegacyRouteRefs,\n compatWrapper,\n} from '@backstage/core-compat-api';\nimport SettingsIcon from '@material-ui/icons/Settings';\nimport { settingsRouteRef } from './plugin';\n\nimport React from 'react';\n\nexport * from './translation';\n\nconst userSettingsPage = createPageExtension({\n defaultPath: '/settings',\n routeRef: convertLegacyRouteRef(settingsRouteRef),\n inputs: {\n providerSettings: createExtensionInput(\n {\n element: coreExtensionData.reactElement,\n },\n { singleton: true, optional: true },\n ),\n },\n loader: ({ inputs }) =>\n import('./components/SettingsPage').then(m =>\n compatWrapper(\n <m.SettingsPage\n providerSettings={inputs.providerSettings?.output.element}\n />,\n ),\n ),\n});\n\n/** @alpha */\nexport const settingsNavItem = createNavItemExtension({\n routeRef: convertLegacyRouteRef(settingsRouteRef),\n title: 'Settings',\n icon: SettingsIcon,\n});\n\n/**\n * @alpha\n */\nexport default createPlugin({\n id: 'user-settings',\n extensions: [userSettingsPage, settingsNavItem],\n routes: convertLegacyRouteRefs({\n root: settingsRouteRef,\n }),\n});\n"],"names":[],"mappings":";;;;;;;AAkCA,MAAM,mBAAmB,mBAAoB,CAAA;AAAA,EAC3C,WAAa,EAAA,WAAA;AAAA,EACb,QAAA,EAAU,sBAAsB,gBAAgB,CAAA;AAAA,EAChD,MAAQ,EAAA;AAAA,IACN,gBAAkB,EAAA,oBAAA;AAAA,MAChB;AAAA,QACE,SAAS,iBAAkB,CAAA,YAAA;AAAA,OAC7B;AAAA,MACA,EAAE,SAAA,EAAW,IAAM,EAAA,QAAA,EAAU,IAAK,EAAA;AAAA,KACpC;AAAA,GACF;AAAA,EACA,QAAQ,CAAC,EAAE,QACT,KAAA,OAAO,wCAA2B,CAAE,CAAA,IAAA;AAAA,IAAK,CACvC,CAAA,KAAA,aAAA;AAAA,sBACE,KAAA,CAAA,aAAA;AAAA,QAAC,CAAE,CAAA,YAAA;AAAA,QAAF;AAAA,UACC,gBAAA,EAAkB,MAAO,CAAA,gBAAA,EAAkB,MAAO,CAAA,OAAA;AAAA,SAAA;AAAA,OACpD;AAAA,KACF;AAAA,GACF;AACJ,CAAC,CAAA,CAAA;AAGM,MAAM,kBAAkB,sBAAuB,CAAA;AAAA,EACpD,QAAA,EAAU,sBAAsB,gBAAgB,CAAA;AAAA,EAChD,KAAO,EAAA,UAAA;AAAA,EACP,IAAM,EAAA,YAAA;AACR,CAAC,EAAA;AAKD,YAAe,YAAa,CAAA;AAAA,EAC1B,EAAI,EAAA,eAAA;AAAA,EACJ,UAAA,EAAY,CAAC,gBAAA,EAAkB,eAAe,CAAA;AAAA,EAC9C,QAAQ,sBAAuB,CAAA;AAAA,IAC7B,IAAM,EAAA,gBAAA;AAAA,GACP,CAAA;AACH,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"alpha.esm.js","sources":["../src/alpha.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n coreExtensionData,\n createExtensionInput,\n createFrontendPlugin,\n PageBlueprint,\n NavItemBlueprint,\n} from '@backstage/frontend-plugin-api';\nimport {\n convertLegacyRouteRef,\n convertLegacyRouteRefs,\n compatWrapper,\n} from '@backstage/core-compat-api';\nimport SettingsIcon from '@material-ui/icons/Settings';\nimport { settingsRouteRef } from './plugin';\n\nimport React from 'react';\n\nexport * from './translation';\n\nconst userSettingsPage = PageBlueprint.makeWithOverrides({\n inputs: {\n providerSettings: createExtensionInput([coreExtensionData.reactElement], {\n singleton: true,\n optional: true,\n }),\n },\n factory(originalFactory, { inputs }) {\n return originalFactory({\n defaultPath: '/settings',\n routeRef: convertLegacyRouteRef(settingsRouteRef),\n loader: () =>\n import('./components/SettingsPage').then(m =>\n compatWrapper(\n <m.SettingsPage\n providerSettings={inputs.providerSettings?.get(\n coreExtensionData.reactElement,\n )}\n />,\n ),\n ),\n });\n },\n});\n\n/** @alpha */\nexport const settingsNavItem = NavItemBlueprint.make({\n params: {\n routeRef: convertLegacyRouteRef(settingsRouteRef),\n title: 'Settings',\n icon: SettingsIcon,\n },\n});\n\n/**\n * @alpha\n */\nexport default createFrontendPlugin({\n id: 'user-settings',\n extensions: [userSettingsPage, settingsNavItem],\n routes: convertLegacyRouteRefs({\n root: settingsRouteRef,\n }),\n});\n"],"names":[],"mappings":";;;;;;;AAkCA,MAAM,gBAAA,GAAmB,cAAc,iBAAkB,CAAA;AAAA,EACvD,MAAQ,EAAA;AAAA,IACN,gBAAkB,EAAA,oBAAA,CAAqB,CAAC,iBAAA,CAAkB,YAAY,CAAG,EAAA;AAAA,MACvE,SAAW,EAAA,IAAA;AAAA,MACX,QAAU,EAAA,IAAA;AAAA,KACX,CAAA;AAAA,GACH;AAAA,EACA,OAAQ,CAAA,eAAA,EAAiB,EAAE,MAAA,EAAU,EAAA;AACnC,IAAA,OAAO,eAAgB,CAAA;AAAA,MACrB,WAAa,EAAA,WAAA;AAAA,MACb,QAAA,EAAU,sBAAsB,gBAAgB,CAAA;AAAA,MAChD,MAAQ,EAAA,MACN,OAAO,wCAA2B,CAAE,CAAA,IAAA;AAAA,QAAK,CACvC,CAAA,KAAA,aAAA;AAAA,0BACE,KAAA,CAAA,aAAA;AAAA,YAAC,CAAE,CAAA,YAAA;AAAA,YAAF;AAAA,cACC,gBAAA,EAAkB,OAAO,gBAAkB,EAAA,GAAA;AAAA,gBACzC,iBAAkB,CAAA,YAAA;AAAA,eACpB;AAAA,aAAA;AAAA,WACF;AAAA,SACF;AAAA,OACF;AAAA,KACH,CAAA,CAAA;AAAA,GACH;AACF,CAAC,CAAA,CAAA;AAGY,MAAA,eAAA,GAAkB,iBAAiB,IAAK,CAAA;AAAA,EACnD,MAAQ,EAAA;AAAA,IACN,QAAA,EAAU,sBAAsB,gBAAgB,CAAA;AAAA,IAChD,KAAO,EAAA,UAAA;AAAA,IACP,IAAM,EAAA,YAAA;AAAA,GACR;AACF,CAAC,EAAA;AAKD,YAAe,oBAAqB,CAAA;AAAA,EAClC,EAAI,EAAA,eAAA;AAAA,EACJ,UAAA,EAAY,CAAC,gBAAA,EAAkB,eAAe,CAAA;AAAA,EAC9C,QAAQ,sBAAuB,CAAA;AAAA,IAC7B,IAAM,EAAA,gBAAA;AAAA,GACP,CAAA;AACH,CAAC,CAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-user-settings",
3
- "version": "0.8.11-next.3",
3
+ "version": "0.8.12-next.0",
4
4
  "description": "A Backstage plugin that provides a settings page",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin",
@@ -54,14 +54,14 @@
54
54
  "test": "backstage-cli package test"
55
55
  },
56
56
  "dependencies": {
57
- "@backstage/core-app-api": "^1.14.2-next.0",
58
- "@backstage/core-compat-api": "^0.2.8-next.3",
59
- "@backstage/core-components": "^0.14.10-next.0",
57
+ "@backstage/core-app-api": "^1.14.2",
58
+ "@backstage/core-compat-api": "^0.2.9-next.0",
59
+ "@backstage/core-components": "^0.14.10",
60
60
  "@backstage/core-plugin-api": "^1.9.3",
61
61
  "@backstage/errors": "^1.2.4",
62
- "@backstage/frontend-plugin-api": "^0.7.0-next.3",
63
- "@backstage/plugin-catalog-react": "^1.12.3-next.3",
64
- "@backstage/plugin-signals-react": "^0.0.4",
62
+ "@backstage/frontend-plugin-api": "^0.8.0-next.0",
63
+ "@backstage/plugin-catalog-react": "^1.12.4-next.0",
64
+ "@backstage/plugin-signals-react": "^0.0.5-next.0",
65
65
  "@backstage/plugin-user-settings-common": "^0.0.1",
66
66
  "@backstage/theme": "^0.5.6",
67
67
  "@backstage/types": "^1.1.1",
@@ -73,10 +73,10 @@
73
73
  "zen-observable": "^0.10.0"
74
74
  },
75
75
  "devDependencies": {
76
- "@backstage/cli": "^0.27.0-next.4",
77
- "@backstage/dev-utils": "^1.0.37-next.3",
78
- "@backstage/plugin-catalog": "^1.22.0-next.3",
79
- "@backstage/test-utils": "^1.5.10-next.2",
76
+ "@backstage/cli": "^0.27.1-next.0",
77
+ "@backstage/dev-utils": "^1.0.38-next.0",
78
+ "@backstage/plugin-catalog": "^1.22.1-next.0",
79
+ "@backstage/test-utils": "^1.6.0-next.0",
80
80
  "@testing-library/dom": "^10.0.0",
81
81
  "@testing-library/jest-dom": "^6.0.0",
82
82
  "@testing-library/react": "^15.0.0",