@backstage/plugin-home 0.8.8-next.3 → 0.8.8

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,35 @@
1
1
  # @backstage/plugin-home
2
2
 
3
+ ## 0.8.8
4
+
5
+ ### Patch Changes
6
+
7
+ - f7ca0fe: Added the Catalog presentation API to the HomePageRecentlyVisited and HomePageTopVisited components
8
+ - fb58f20: Internal update to use the new `pluginId` option of `createFrontendPlugin`.
9
+ - eddd96c: Added optional title prop to `customHomePageGrid`
10
+ - 16eb4bf: Export ContentModal from `@backstage/plugin-home-react` so people can use this in other scenarios.
11
+ Renamed `CatalogReactComponentsNameToClassKey` to `PluginHomeComponentsNameToClassKey` in `overridableComponents.ts`
12
+
13
+ Made QuickStartCard `docsLinkTitle` prop more flexible to allow for any React.JSX.Element instead of just a string.
14
+ Added QuickStartCard prop `additionalContent` which can eventually replace the prop `video`.
15
+
16
+ - 2c1761f: Added a `variant` prop to the `WelcomeTitle` component making it work with the Customizable Home page feature. Adding it like this `<WelcomeTitle variant='h1' />` to the list of items under `CustomHomepageGrid` will allow it to render with a size that works well.
17
+ - 195323f: Export root page route from the home plugin to enable adding links/nav to it from outside the plugin
18
+ - 72d019d: Removed various typos
19
+ - d710d74: docs: Update default for `preventCollision` prop
20
+ - Updated dependencies
21
+ - @backstage/frontend-plugin-api@0.10.2
22
+ - @backstage/theme@0.6.6
23
+ - @backstage/core-app-api@1.17.0
24
+ - @backstage/core-components@0.17.2
25
+ - @backstage/catalog-model@1.7.4
26
+ - @backstage/core-compat-api@0.4.2
27
+ - @backstage/plugin-home-react@0.1.26
28
+ - @backstage/plugin-catalog-react@1.18.0
29
+ - @backstage/core-plugin-api@1.10.7
30
+ - @backstage/catalog-client@1.10.0
31
+ - @backstage/config@1.3.2
32
+
3
33
  ## 0.8.8-next.3
4
34
 
5
35
  ### Patch Changes
@@ -6,7 +6,10 @@ import { useMemo, useEffect } from 'react';
6
6
  import useAsync from 'react-use/esm/useAsync';
7
7
  import { getTimeBasedGreeting } from './timeUtil.esm.js';
8
8
 
9
- const WelcomeTitle = ({ language }) => {
9
+ const WelcomeTitle = ({
10
+ language,
11
+ variant
12
+ }) => {
10
13
  const identityApi = useApi(identityApiRef);
11
14
  const alertApi = useApi(alertApiRef);
12
15
  const greeting = useMemo(() => getTimeBasedGreeting(language), [language]);
@@ -21,7 +24,7 @@ const WelcomeTitle = ({ language }) => {
21
24
  });
22
25
  }
23
26
  }, [error, alertApi]);
24
- return /* @__PURE__ */ jsx(Tooltip, { title: greeting.language, children: /* @__PURE__ */ jsx(Typography, { component: "span", variant: "inherit", children: `${greeting.greeting}${profile?.displayName ? `, ${profile?.displayName}` : ""}!` }) });
27
+ return /* @__PURE__ */ jsx(Tooltip, { title: greeting.language, children: /* @__PURE__ */ jsx(Typography, { component: "span", variant, children: `${greeting.greeting}${profile?.displayName ? `, ${profile?.displayName}` : ""}!` }) });
25
28
  };
26
29
 
27
30
  export { WelcomeTitle };
@@ -1 +1 @@
1
- {"version":3,"file":"WelcomeTitle.esm.js","sources":["../../../src/homePageComponents/WelcomeTitle/WelcomeTitle.tsx"],"sourcesContent":["/*\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 */\nimport {\n alertApiRef,\n identityApiRef,\n useApi,\n} from '@backstage/core-plugin-api';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Typography from '@material-ui/core/Typography';\nimport { useEffect, useMemo } from 'react';\nimport useAsync from 'react-use/esm/useAsync';\nimport { getTimeBasedGreeting } from './timeUtil';\n\n/** @public */\nexport type WelcomeTitleLanguageProps = {\n language?: string[];\n};\n\nexport const WelcomeTitle = ({ language }: WelcomeTitleLanguageProps) => {\n const identityApi = useApi(identityApiRef);\n const alertApi = useApi(alertApiRef);\n const greeting = useMemo(() => getTimeBasedGreeting(language), [language]);\n\n const { value: profile, error } = useAsync(() =>\n identityApi.getProfileInfo(),\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 return (\n <Tooltip title={greeting.language}>\n <Typography component=\"span\" variant=\"inherit\">{`${greeting.greeting}${\n profile?.displayName ? `, ${profile?.displayName}` : ''\n }!`}</Typography>\n </Tooltip>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AA+BO,MAAM,YAAe,GAAA,CAAC,EAAE,QAAA,EAA0C,KAAA;AACvE,EAAM,MAAA,WAAA,GAAc,OAAO,cAAc,CAAA;AACzC,EAAM,MAAA,QAAA,GAAW,OAAO,WAAW,CAAA;AACnC,EAAM,MAAA,QAAA,GAAW,QAAQ,MAAM,oBAAA,CAAqB,QAAQ,CAAG,EAAA,CAAC,QAAQ,CAAC,CAAA;AAEzE,EAAA,MAAM,EAAE,KAAA,EAAO,OAAS,EAAA,KAAA,EAAU,GAAA,QAAA;AAAA,IAAS,MACzC,YAAY,cAAe;AAAA,GAC7B;AAEA,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,KAAO,EAAA;AACT,MAAA,QAAA,CAAS,IAAK,CAAA;AAAA,QACZ,OAAA,EAAS,iCAAiC,KAAK,CAAA,CAAA;AAAA,QAC/C,QAAU,EAAA;AAAA,OACX,CAAA;AAAA;AACH,GACC,EAAA,CAAC,KAAO,EAAA,QAAQ,CAAC,CAAA;AAEpB,EACE,uBAAA,GAAA,CAAC,WAAQ,KAAO,EAAA,QAAA,CAAS,UACvB,QAAC,kBAAA,GAAA,CAAA,UAAA,EAAA,EAAW,SAAU,EAAA,MAAA,EAAO,OAAQ,EAAA,SAAA,EAAW,aAAG,QAAS,CAAA,QAAQ,CAClE,EAAA,OAAA,EAAS,WAAc,GAAA,CAAA,EAAA,EAAK,SAAS,WAAW,CAAA,CAAA,GAAK,EACvD,CAAA,CAAA,CAAA,EAAI,CACN,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"WelcomeTitle.esm.js","sources":["../../../src/homePageComponents/WelcomeTitle/WelcomeTitle.tsx"],"sourcesContent":["/*\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 */\nimport {\n alertApiRef,\n identityApiRef,\n useApi,\n} from '@backstage/core-plugin-api';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Typography from '@material-ui/core/Typography';\nimport { useEffect, useMemo } from 'react';\nimport useAsync from 'react-use/esm/useAsync';\nimport { getTimeBasedGreeting } from './timeUtil';\nimport { Variant } from '@material-ui/core/styles/createTypography';\n\n/** @public */\nexport type WelcomeTitleLanguageProps = {\n language?: string[];\n variant?: Variant | 'inherit';\n};\n\nexport const WelcomeTitle = ({\n language,\n variant,\n}: WelcomeTitleLanguageProps) => {\n const identityApi = useApi(identityApiRef);\n const alertApi = useApi(alertApiRef);\n const greeting = useMemo(() => getTimeBasedGreeting(language), [language]);\n\n const { value: profile, error } = useAsync(() =>\n identityApi.getProfileInfo(),\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 return (\n <Tooltip title={greeting.language}>\n <Typography component=\"span\" variant={variant}>{`${greeting.greeting}${\n profile?.displayName ? `, ${profile?.displayName}` : ''\n }!`}</Typography>\n </Tooltip>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAiCO,MAAM,eAAe,CAAC;AAAA,EAC3B,QAAA;AAAA,EACA;AACF,CAAiC,KAAA;AAC/B,EAAM,MAAA,WAAA,GAAc,OAAO,cAAc,CAAA;AACzC,EAAM,MAAA,QAAA,GAAW,OAAO,WAAW,CAAA;AACnC,EAAM,MAAA,QAAA,GAAW,QAAQ,MAAM,oBAAA,CAAqB,QAAQ,CAAG,EAAA,CAAC,QAAQ,CAAC,CAAA;AAEzE,EAAA,MAAM,EAAE,KAAA,EAAO,OAAS,EAAA,KAAA,EAAU,GAAA,QAAA;AAAA,IAAS,MACzC,YAAY,cAAe;AAAA,GAC7B;AAEA,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,KAAO,EAAA;AACT,MAAA,QAAA,CAAS,IAAK,CAAA;AAAA,QACZ,OAAA,EAAS,iCAAiC,KAAK,CAAA,CAAA;AAAA,QAC/C,QAAU,EAAA;AAAA,OACX,CAAA;AAAA;AACH,GACC,EAAA,CAAC,KAAO,EAAA,QAAQ,CAAC,CAAA;AAEpB,EACE,uBAAA,GAAA,CAAC,WAAQ,KAAO,EAAA,QAAA,CAAS,UACvB,QAAC,kBAAA,GAAA,CAAA,UAAA,EAAA,EAAW,SAAU,EAAA,MAAA,EAAO,OAAmB,EAAA,QAAA,EAAA,CAAA,EAAG,SAAS,QAAQ,CAAA,EAClE,SAAS,WAAc,GAAA,CAAA,EAAA,EAAK,SAAS,WAAW,CAAA,CAAA,GAAK,EACvD,CAAA,CAAA,CAAA,EAAI,CACN,EAAA,CAAA;AAEJ;;;;"}
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ import { createCardExtension as createCardExtension$1, CardExtensionProps as Car
3
3
  import * as react from 'react';
4
4
  import { ReactNode, JSX as JSX$1, CSSProperties, ReactElement } from 'react';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
+ import { Variant } from '@material-ui/core/styles/createTypography';
6
7
  import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
7
8
  import { StorageApi, IdentityApi, ErrorApi } from '@backstage/core-plugin-api';
8
9
  import { EntityFilterQuery } from '@backstage/catalog-client';
@@ -32,6 +33,7 @@ type ClockConfig = {
32
33
  /** @public */
33
34
  type WelcomeTitleLanguageProps = {
34
35
  language?: string[];
36
+ variant?: Variant | 'inherit';
35
37
  };
36
38
 
37
39
  /**
@@ -290,7 +292,7 @@ declare const ComponentTab: (props: {
290
292
  *
291
293
  * @public
292
294
  */
293
- declare const WelcomeTitle: ({ language }: WelcomeTitleLanguageProps) => react_jsx_runtime.JSX.Element;
295
+ declare const WelcomeTitle: ({ language, variant, }: WelcomeTitleLanguageProps) => react_jsx_runtime.JSX.Element;
294
296
  /**
295
297
  * A component to display a company logo for the user.
296
298
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-home",
3
- "version": "0.8.8-next.3",
3
+ "version": "0.8.8",
4
4
  "description": "A Backstage plugin that helps you build a home page",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin",
@@ -68,17 +68,17 @@
68
68
  "test": "backstage-cli package test"
69
69
  },
70
70
  "dependencies": {
71
- "@backstage/catalog-client": "1.10.0-next.0",
72
- "@backstage/catalog-model": "1.7.3",
73
- "@backstage/config": "1.3.2",
74
- "@backstage/core-app-api": "1.17.0-next.1",
75
- "@backstage/core-compat-api": "0.4.2-next.3",
76
- "@backstage/core-components": "0.17.2-next.1",
77
- "@backstage/core-plugin-api": "1.10.7-next.0",
78
- "@backstage/frontend-plugin-api": "0.10.2-next.1",
79
- "@backstage/plugin-catalog-react": "1.18.0-next.3",
80
- "@backstage/plugin-home-react": "0.1.26-next.2",
81
- "@backstage/theme": "0.6.6-next.0",
71
+ "@backstage/catalog-client": "^1.10.0",
72
+ "@backstage/catalog-model": "^1.7.4",
73
+ "@backstage/config": "^1.3.2",
74
+ "@backstage/core-app-api": "^1.17.0",
75
+ "@backstage/core-compat-api": "^0.4.2",
76
+ "@backstage/core-components": "^0.17.2",
77
+ "@backstage/core-plugin-api": "^1.10.7",
78
+ "@backstage/frontend-plugin-api": "^0.10.2",
79
+ "@backstage/plugin-catalog-react": "^1.18.0",
80
+ "@backstage/plugin-home-react": "^0.1.26",
81
+ "@backstage/theme": "^0.6.6",
82
82
  "@material-ui/core": "^4.12.2",
83
83
  "@material-ui/icons": "^4.9.1",
84
84
  "@material-ui/lab": "4.0.0-alpha.61",
@@ -94,9 +94,9 @@
94
94
  "zod": "^3.22.4"
95
95
  },
96
96
  "devDependencies": {
97
- "@backstage/cli": "0.32.1-next.3",
98
- "@backstage/dev-utils": "1.1.10-next.3",
99
- "@backstage/test-utils": "1.7.8-next.2",
97
+ "@backstage/cli": "^0.32.1",
98
+ "@backstage/dev-utils": "^1.1.10",
99
+ "@backstage/test-utils": "^1.7.8",
100
100
  "@testing-library/dom": "^10.0.0",
101
101
  "@testing-library/jest-dom": "^6.0.0",
102
102
  "@testing-library/react": "^16.0.0",