@backstage/plugin-home 0.4.9 → 0.4.12
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 +36 -0
- package/README.md +6 -4
- package/dist/esm/{index-aa90b415.esm.js → index-405b0ea2.esm.js} +1 -1
- package/dist/esm/{index-aa90b415.esm.js.map → index-405b0ea2.esm.js.map} +1 -1
- package/dist/esm/index-e6d55b70.esm.js +47 -0
- package/dist/esm/index-e6d55b70.esm.js.map +1 -0
- package/dist/esm/index-e9dbf86a.esm.js +16 -0
- package/dist/esm/index-e9dbf86a.esm.js.map +1 -0
- package/dist/esm/{index-8eb7327b.esm.js → index-eddf0731.esm.js} +1 -1
- package/dist/esm/{index-8eb7327b.esm.js.map → index-eddf0731.esm.js.map} +1 -1
- package/dist/index.d.ts +46 -8
- package/dist/index.esm.js +21 -11
- package/dist/index.esm.js.map +1 -1
- package/package.json +9 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# @backstage/plugin-home
|
|
2
2
|
|
|
3
|
+
## 0.4.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/core-components@0.8.6
|
|
9
|
+
- @backstage/plugin-search@0.6.0
|
|
10
|
+
|
|
11
|
+
## 0.4.11
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
- @backstage/core-components@0.8.5
|
|
17
|
+
- @backstage/plugin-search@0.5.6
|
|
18
|
+
- @backstage/core-plugin-api@0.6.0
|
|
19
|
+
|
|
20
|
+
## 0.4.11-next.0
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
- @backstage/core-components@0.8.5-next.0
|
|
26
|
+
- @backstage/core-plugin-api@0.6.0-next.0
|
|
27
|
+
- @backstage/plugin-search@0.5.6-next.0
|
|
28
|
+
|
|
29
|
+
## 0.4.10
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- bdf1419d20: Adds two new home components - CompanyLogo and Toolkit.
|
|
34
|
+
- Updated dependencies
|
|
35
|
+
- @backstage/core-components@0.8.4
|
|
36
|
+
- @backstage/core-plugin-api@0.5.0
|
|
37
|
+
- @backstage/plugin-search@0.5.5
|
|
38
|
+
|
|
3
39
|
## 0.4.9
|
|
4
40
|
|
|
5
41
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
# Home
|
|
2
2
|
|
|
3
|
-
Development is ongoing. You can follow the progress and contribute at the Backstage [Home Project Board](https://github.com/backstage/backstage/projects/7) or reach out to us in the [`#support` Discord channel](https://discord.com/channels/687207715902193673/687235481154617364).
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
3
|
The Home plugin introduces a system for composing a Home Page for Backstage in order to surface relevant info and provide convenient shortcuts for common tasks. It's designed with composability in mind with an open ecosystem that allows anyone to contribute with any component, to be included in any Home Page.
|
|
8
4
|
|
|
9
5
|
For App Integrators, the system is designed to be composable to give total freedom in designing a Home Page that suits the needs of the organization. From the perspective of a Component Developer who wishes to contribute with building blocks to be included in Home Pages, there's a convenient interface for bundling the different parts and exporting them with both error boundary and lazy loading handled under the surface.
|
|
@@ -90,6 +86,12 @@ Additionally, the App Integrator is provided an escape hatch in case the way the
|
|
|
90
86
|
|
|
91
87
|
## Contributing
|
|
92
88
|
|
|
89
|
+
### Homepage Components
|
|
90
|
+
|
|
93
91
|
We believe that people have great ideas for what makes a useful Home Page, and we want to make it easy for every to benefit from the effort you put in to create something cool for the Home Page. Therefore, a great way of contributing is by simply creating more Home Page Components, than can then be used by everyone when composing their own Home Page. If they are tightly coupled to an existing plugin, it is recommended to allow them to live within that plugin, for convenience and to limit complex dependencies. On the other hand, if there's no clear plugin that the component is based on, it's also fine to contribute them into the [home plugin](/plugins/home/src/homePageComponents)
|
|
94
92
|
|
|
95
93
|
Additionally, the API is at a very early state, so contributing with additional use cases may expose weaknesses in the current solution that we may iterate on, to provide more flexibility and ease of use for those who wish to develop components for the Home Page.
|
|
94
|
+
|
|
95
|
+
### Homepage Templates
|
|
96
|
+
|
|
97
|
+
We are hoping that we together can build up a collection of Homepage templates. We therefore put together a place where we can collect all the templates for the Home Plugin in the [storybook](https://backstage.io/storybook/?path=/story/plugins-home-templates). If you would like to contribute with a template, start by taking a look at the [DefaultTemplate storybook example to create your own](/plugins/home/src/templates/DefaultTemplate.stories.tsx), and then open a PR with your suggestion.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-405b0ea2.esm.js","sources":["../../src/components/HomepageCompositionRoot.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 */\n\nimport React, { ReactNode } from 'react';\nimport { useOutlet } from 'react-router';\n\nexport const HomepageCompositionRoot = (props: {\n title?: string;\n children?: ReactNode;\n}) => {\n const outlet = useOutlet();\n const children = props.children ?? outlet;\n return <>{children}</>;\n};\n"],"names":[],"mappings":";;;;;;;;MAmBa,0BAA0B,CAAC,UAGlC;AAtBN;AAuBE,QAAM,SAAS;AACf,QAAM,WAAW,YAAM,aAAN,YAAkB;AACnC,mEAAU;AAAA;;;;"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Link } from '@backstage/core-components';
|
|
2
|
+
import { makeStyles, List, ListItemIcon, ListItemText } from '@material-ui/core';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
const useStyles = makeStyles((theme) => ({
|
|
6
|
+
toolkit: {
|
|
7
|
+
display: "flex",
|
|
8
|
+
flexWrap: "wrap",
|
|
9
|
+
textAlign: "center"
|
|
10
|
+
},
|
|
11
|
+
tool: {
|
|
12
|
+
margin: theme.spacing(0.5, 1)
|
|
13
|
+
},
|
|
14
|
+
label: {
|
|
15
|
+
marginTop: theme.spacing(1),
|
|
16
|
+
fontSize: "0.9em",
|
|
17
|
+
lineHeight: "1.25",
|
|
18
|
+
color: theme.palette.text.secondary
|
|
19
|
+
},
|
|
20
|
+
icon: {
|
|
21
|
+
width: "64px",
|
|
22
|
+
height: "64px",
|
|
23
|
+
borderRadius: "50px",
|
|
24
|
+
justifyContent: "center",
|
|
25
|
+
alignItems: "center",
|
|
26
|
+
boxShadow: theme.shadows[1],
|
|
27
|
+
backgroundColor: theme.palette.background.default
|
|
28
|
+
}
|
|
29
|
+
}));
|
|
30
|
+
const Content = (props) => {
|
|
31
|
+
const classes = useStyles();
|
|
32
|
+
return /* @__PURE__ */ React.createElement(List, {
|
|
33
|
+
className: classes.toolkit
|
|
34
|
+
}, props.tools.map((tool) => /* @__PURE__ */ React.createElement(Link, {
|
|
35
|
+
key: tool.url,
|
|
36
|
+
to: tool.url,
|
|
37
|
+
className: classes.tool
|
|
38
|
+
}, /* @__PURE__ */ React.createElement(ListItemIcon, {
|
|
39
|
+
className: classes.icon
|
|
40
|
+
}, tool.icon), /* @__PURE__ */ React.createElement(ListItemText, {
|
|
41
|
+
secondaryTypographyProps: { className: classes.label },
|
|
42
|
+
secondary: tool.label
|
|
43
|
+
}))));
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export { Content };
|
|
47
|
+
//# sourceMappingURL=index-e6d55b70.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-e6d55b70.esm.js","sources":["../../src/homePageComponents/Toolkit/Content.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 */\n\nimport { Link } from '@backstage/core-components';\nimport {\n makeStyles,\n List,\n ListItemIcon,\n ListItemText,\n} from '@material-ui/core';\nimport React from 'react';\n\nconst useStyles = makeStyles(theme => ({\n toolkit: {\n display: 'flex',\n flexWrap: 'wrap',\n textAlign: 'center',\n },\n tool: {\n margin: theme.spacing(0.5, 1),\n },\n label: {\n marginTop: theme.spacing(1),\n fontSize: '0.9em',\n lineHeight: '1.25',\n color: theme.palette.text.secondary,\n },\n icon: {\n width: '64px',\n height: '64px',\n borderRadius: '50px',\n justifyContent: 'center',\n alignItems: 'center',\n boxShadow: theme.shadows[1],\n backgroundColor: theme.palette.background.default,\n },\n}));\n\ntype Tool = {\n label: string;\n url: string;\n icon: React.ReactNode;\n};\n\n/**\n * Props for Toolkit content component {@link Content}.\n *\n * @public\n */\nexport type ToolkitContentProps = {\n tools: Tool[];\n};\n\n/**\n * A component to display a list of tools for the user.\n *\n * @public\n */\nexport const Content = (props: ToolkitContentProps) => {\n const classes = useStyles();\n\n return (\n <List className={classes.toolkit}>\n {props.tools.map((tool: Tool) => (\n <Link key={tool.url} to={tool.url} className={classes.tool}>\n <ListItemIcon className={classes.icon}>{tool.icon}</ListItemIcon>\n <ListItemText\n secondaryTypographyProps={{ className: classes.label }}\n secondary={tool.label}\n />\n </Link>\n ))}\n </List>\n );\n};\n"],"names":[],"mappings":";;;;AAyBA,MAAM,YAAY,WAAW;AAAU,EACrC,SAAS;AAAA,IACP,SAAS;AAAA,IACT,UAAU;AAAA,IACV,WAAW;AAAA;AAAA,EAEb,MAAM;AAAA,IACJ,QAAQ,MAAM,QAAQ,KAAK;AAAA;AAAA,EAE7B,OAAO;AAAA,IACL,WAAW,MAAM,QAAQ;AAAA,IACzB,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,OAAO,MAAM,QAAQ,KAAK;AAAA;AAAA,EAE5B,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,WAAW,MAAM,QAAQ;AAAA,IACzB,iBAAiB,MAAM,QAAQ,WAAW;AAAA;AAAA;MAwBjC,UAAU,CAAC,UAA+B;AACrD,QAAM,UAAU;AAEhB,6CACG,MAAD;AAAA,IAAM,WAAW,QAAQ;AAAA,KACtB,MAAM,MAAM,IAAI,CAAC,6CACf,MAAD;AAAA,IAAM,KAAK,KAAK;AAAA,IAAK,IAAI,KAAK;AAAA,IAAK,WAAW,QAAQ;AAAA,yCACnD,cAAD;AAAA,IAAc,WAAW,QAAQ;AAAA,KAAO,KAAK,2CAC5C,cAAD;AAAA,IACE,0BAA0B,EAAE,WAAW,QAAQ;AAAA,IAC/C,WAAW,KAAK;AAAA;AAAA;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Typography } from '@material-ui/core';
|
|
2
|
+
import { useApi, configApiRef } from '@backstage/core-plugin-api';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
const CompanyLogo = (props) => {
|
|
6
|
+
const { logo, className } = props;
|
|
7
|
+
const configApi = useApi(configApiRef);
|
|
8
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
9
|
+
className
|
|
10
|
+
}, logo ? /* @__PURE__ */ React.createElement(React.Fragment, null, logo) : /* @__PURE__ */ React.createElement(Typography, {
|
|
11
|
+
variant: "h1"
|
|
12
|
+
}, configApi.getString("app.title")));
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { CompanyLogo };
|
|
16
|
+
//# sourceMappingURL=index-e9dbf86a.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-e9dbf86a.esm.js","sources":["../../src/homePageComponents/CompanyLogo/CompanyLogo.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 { Typography } from '@material-ui/core';\nimport { configApiRef, useApi } from '@backstage/core-plugin-api';\nimport React from 'react';\n\ntype CompanyLogoProps = {\n logo?: React.ReactNode;\n className?: string;\n};\n\n/**\n * A component to display a company logo for the user.\n *\n * @public\n */\nexport const CompanyLogo = (props: CompanyLogoProps) => {\n const { logo, className } = props;\n const configApi = useApi(configApiRef);\n\n return (\n <div className={className}>\n {logo ? (\n <>{logo}</>\n ) : (\n <Typography variant=\"h1\">{configApi.getString('app.title')}</Typography>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;MA6Ba,cAAc,CAAC,UAA4B;AACtD,QAAM,EAAE,MAAM,cAAc;AAC5B,QAAM,YAAY,OAAO;AAEzB,6CACG,OAAD;AAAA,IAAK;AAAA,KACF,iEACI,4CAEF,YAAD;AAAA,IAAY,SAAQ;AAAA,KAAM,UAAU,UAAU;AAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-eddf0731.esm.js","sources":["../../src/componentRenderers/ComponentAccordion.tsx","../../src/componentRenderers/ComponentTabs/ComponentTabs.tsx","../../src/componentRenderers/ComponentTabs/ComponentTab.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 */\n\nimport React from 'react';\nimport {\n Accordion,\n AccordionDetails,\n AccordionSummary,\n Typography,\n IconButton,\n Theme,\n} from '@material-ui/core';\nimport { makeStyles } from '@material-ui/core/styles';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport SettingsIcon from '@material-ui/icons/Settings';\n\nimport { SettingsModal } from '../components';\n\nconst useStyles = makeStyles((theme: Theme) => ({\n settingsIconButton: {\n padding: theme.spacing(0, 1, 0, 0),\n },\n}));\n\nexport const ComponentAccordion = ({\n title,\n Content,\n Actions,\n Settings,\n ContextProvider,\n ...childProps\n}: {\n title: string;\n Content: () => JSX.Element;\n Actions?: () => JSX.Element;\n Settings?: () => JSX.Element;\n ContextProvider?: (props: any) => JSX.Element;\n}) => {\n const classes = useStyles();\n const [settingsIsExpanded, setSettingsIsExpanded] = React.useState(false);\n const [isExpanded, setIsExpanded] = React.useState(false);\n\n const handleOpenSettings = (e: any) => {\n e.stopPropagation();\n setSettingsIsExpanded(prevState => !prevState);\n };\n\n const innerContent = (\n <>\n {Settings && (\n <SettingsModal\n open={settingsIsExpanded}\n close={() => setSettingsIsExpanded(false)}\n componentName={title}\n >\n <Settings />\n </SettingsModal>\n )}\n <Accordion\n expanded={isExpanded}\n onChange={(_e: any, expanded: boolean) => setIsExpanded(expanded)}\n >\n <AccordionSummary expandIcon={<ExpandMoreIcon />}>\n {Settings && (\n <IconButton\n onClick={handleOpenSettings}\n className={classes.settingsIconButton}\n >\n <SettingsIcon />\n </IconButton>\n )}\n <Typography>{title}</Typography>\n </AccordionSummary>\n <AccordionDetails>\n <div>\n <Content />\n {Actions && <Actions />}\n </div>\n </AccordionDetails>\n </Accordion>\n </>\n );\n\n return ContextProvider ? (\n <ContextProvider {...childProps}>{innerContent}</ContextProvider>\n ) : (\n innerContent\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 React from 'react';\nimport { Tabs, Tab } from '@material-ui/core';\nimport { InfoCard } from '@backstage/core-components';\n\ntype TabType = {\n label: string;\n Component: () => JSX.Element;\n};\n\nexport const ComponentTabs = ({\n title,\n tabs,\n}: {\n title: string;\n tabs: TabType[];\n}) => {\n const [value, setValue] = React.useState(0);\n\n const handleChange = (_event: any, newValue: number) => {\n setValue(newValue);\n };\n\n return (\n <InfoCard title={title}>\n <Tabs value={value} onChange={handleChange}>\n {tabs.map(t => (\n <Tab key={t.label} label={t.label} />\n ))}\n </Tabs>\n {tabs.map(({ Component }, idx) => (\n <div\n key={idx}\n {...(idx !== value ? { style: { display: 'none' } } : {})}\n >\n <Component />\n </div>\n ))}\n </InfoCard>\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 React from 'react';\n\nexport const ComponentTab = ({\n title,\n Content,\n ContextProvider,\n ...childProps\n}: {\n title: string;\n Content: () => JSX.Element;\n ContextProvider?: (props: any) => JSX.Element;\n}) => {\n return ContextProvider ? (\n <ContextProvider {...childProps}>\n <Content />\n </ContextProvider>\n ) : (\n <Content />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AA+BA,MAAM,YAAY,WAAW,CAAC;AAAkB,EAC9C,oBAAoB;AAAA,IAClB,SAAS,MAAM,QAAQ,GAAG,GAAG,GAAG;AAAA;AAAA;MAIvB,qBAAqB,CAAC;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,KACG;AAAA,MAOC;AACJ,QAAM,UAAU;AAChB,QAAM,CAAC,oBAAoB,yBAAyB,MAAM,SAAS;AACnE,QAAM,CAAC,YAAY,iBAAiB,MAAM,SAAS;AAEnD,QAAM,qBAAqB,CAAC,MAAW;AACrC,MAAE;AACF,0BAAsB,eAAa,CAAC;AAAA;AAGtC,QAAM,yEAED,gDACE,eAAD;AAAA,IACE,MAAM;AAAA,IACN,OAAO,MAAM,sBAAsB;AAAA,IACnC,eAAe;AAAA,yCAEd,UAAD,4CAGH,WAAD;AAAA,IACE,UAAU;AAAA,IACV,UAAU,CAAC,IAAS,aAAsB,cAAc;AAAA,yCAEvD,kBAAD;AAAA,IAAkB,gDAAa,gBAAD;AAAA,KAC3B,gDACE,YAAD;AAAA,IACE,SAAS;AAAA,IACT,WAAW,QAAQ;AAAA,yCAElB,cAAD,4CAGH,YAAD,MAAa,6CAEd,kBAAD,0CACG,OAAD,0CACG,SAAD,OACC,+CAAY,SAAD;AAOtB,SAAO,sDACJ,iBAAD;AAAA,OAAqB;AAAA,KAAa,gBAElC;AAAA;;MC1ES,gBAAgB,CAAC;AAAA,EAC5B;AAAA,EACA;AAAA,MAII;AACJ,QAAM,CAAC,OAAO,YAAY,MAAM,SAAS;AAEzC,QAAM,eAAe,CAAC,QAAa,aAAqB;AACtD,aAAS;AAAA;AAGX,6CACG,UAAD;AAAA,IAAU;AAAA,yCACP,MAAD;AAAA,IAAM;AAAA,IAAc,UAAU;AAAA,KAC3B,KAAK,IAAI,2CACP,KAAD;AAAA,IAAK,KAAK,EAAE;AAAA,IAAO,OAAO,EAAE;AAAA,QAG/B,KAAK,IAAI,CAAC,EAAE,aAAa,4CACvB,OAAD;AAAA,IACE,KAAK;AAAA,OACA,QAAQ,QAAQ,EAAE,OAAO,EAAE,SAAS,aAAa;AAAA,yCAErD,WAAD;AAAA;;MChCG,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,KACG;AAAA,MAKC;AACJ,SAAO,sDACJ,iBAAD;AAAA,OAAqB;AAAA,yCAClB,SAAD,6CAGD,SAAD;AAAA;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
3
|
-
import * as
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import React__default from 'react';
|
|
4
5
|
|
|
5
6
|
declare type ComponentRenderer = {
|
|
6
7
|
Renderer?: (props: RendererProps) => JSX.Element;
|
|
7
8
|
};
|
|
8
9
|
declare type ComponentParts = {
|
|
9
|
-
Content: () => JSX.Element;
|
|
10
|
+
Content: (props?: any) => JSX.Element;
|
|
10
11
|
Actions?: () => JSX.Element;
|
|
11
12
|
Settings?: () => JSX.Element;
|
|
12
13
|
ContextProvider?: (props: any) => JSX.Element;
|
|
@@ -14,20 +15,40 @@ declare type ComponentParts = {
|
|
|
14
15
|
declare type RendererProps = {
|
|
15
16
|
title: string;
|
|
16
17
|
} & ComponentParts;
|
|
18
|
+
declare type CardExtensionProps<T> = ComponentRenderer & {
|
|
19
|
+
title?: string;
|
|
20
|
+
} & T;
|
|
21
|
+
/**
|
|
22
|
+
* An extension creator to create card based components for the homepage
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
17
26
|
declare function createCardExtension<T>({ title, components, name, }: {
|
|
18
27
|
title: string;
|
|
19
28
|
components: () => Promise<ComponentParts>;
|
|
20
29
|
name?: string;
|
|
21
|
-
}): _backstage_core_plugin_api.Extension<(
|
|
22
|
-
|
|
23
|
-
|
|
30
|
+
}): _backstage_core_plugin_api.Extension<(props: CardExtensionProps<T>) => JSX.Element>;
|
|
31
|
+
|
|
32
|
+
declare type Tool = {
|
|
33
|
+
label: string;
|
|
34
|
+
url: string;
|
|
35
|
+
icon: React__default.ReactNode;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Props for Toolkit content component {@link Content}.
|
|
39
|
+
*
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
declare type ToolkitContentProps = {
|
|
43
|
+
tools: Tool[];
|
|
44
|
+
};
|
|
24
45
|
|
|
25
46
|
declare const homePlugin: _backstage_core_plugin_api.BackstagePlugin<{
|
|
26
47
|
root: _backstage_core_plugin_api.RouteRef<undefined>;
|
|
27
48
|
}, {}>;
|
|
28
49
|
declare const HomepageCompositionRoot: (props: {
|
|
29
50
|
title?: string | undefined;
|
|
30
|
-
children?:
|
|
51
|
+
children?: React.ReactNode;
|
|
31
52
|
}) => JSX.Element;
|
|
32
53
|
declare const ComponentAccordion: ({ title, Content, Actions, Settings, ContextProvider, ...childProps }: {
|
|
33
54
|
title: string;
|
|
@@ -54,11 +75,28 @@ declare const ComponentTab: ({ title, Content, ContextProvider, ...childProps }:
|
|
|
54
75
|
* @public
|
|
55
76
|
*/
|
|
56
77
|
declare const WelcomeTitle: () => JSX.Element;
|
|
57
|
-
|
|
78
|
+
/**
|
|
79
|
+
* A component to display a company logo for the user.
|
|
80
|
+
*
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
declare const HomePageCompanyLogo: (props: {
|
|
84
|
+
logo?: React.ReactNode;
|
|
85
|
+
className?: string | undefined;
|
|
86
|
+
}) => JSX.Element;
|
|
87
|
+
declare const HomePageRandomJoke: (props: ComponentRenderer & {
|
|
58
88
|
title?: string | undefined;
|
|
59
89
|
} & {
|
|
60
90
|
defaultCategory?: "any" | "programming" | undefined;
|
|
61
91
|
}) => JSX.Element;
|
|
92
|
+
/**
|
|
93
|
+
* A component to display a list of tools for the user.
|
|
94
|
+
*
|
|
95
|
+
* @public
|
|
96
|
+
*/
|
|
97
|
+
declare const HomePageToolkit: (props: ComponentRenderer & {
|
|
98
|
+
title?: string | undefined;
|
|
99
|
+
} & ToolkitContentProps) => JSX.Element;
|
|
62
100
|
|
|
63
101
|
declare const SettingsModal: ({ open, close, componentName, children, }: {
|
|
64
102
|
open: boolean;
|
|
@@ -75,4 +113,4 @@ declare const HeaderWorldClock: ({ clockConfigs, }: {
|
|
|
75
113
|
clockConfigs: ClockConfig[];
|
|
76
114
|
}) => JSX.Element | null;
|
|
77
115
|
|
|
78
|
-
export { ClockConfig, ComponentAccordion, ComponentTab, ComponentTabs, HeaderWorldClock, HomePageRandomJoke, HomepageCompositionRoot, SettingsModal, WelcomeTitle, createCardExtension, homePlugin };
|
|
116
|
+
export { ClockConfig, ComponentAccordion, ComponentTab, ComponentTabs, HeaderWorldClock, HomePageCompanyLogo, HomePageRandomJoke, HomePageToolkit, HomepageCompositionRoot, SettingsModal, WelcomeTitle, createCardExtension, homePlugin };
|
package/dist/index.esm.js
CHANGED
|
@@ -83,11 +83,8 @@ function createCardExtension({
|
|
|
83
83
|
name,
|
|
84
84
|
component: {
|
|
85
85
|
lazy: () => components().then(({ Content, Actions, Settings, ContextProvider }) => {
|
|
86
|
-
const CardExtension = ({
|
|
87
|
-
Renderer,
|
|
88
|
-
title: overrideTitle,
|
|
89
|
-
...childProps
|
|
90
|
-
}) => {
|
|
86
|
+
const CardExtension = (props) => {
|
|
87
|
+
const { Renderer, title: overrideTitle, ...childProps } = props;
|
|
91
88
|
const app = useApp();
|
|
92
89
|
const { Progress } = app.getComponents();
|
|
93
90
|
const [settingsOpen, setSettingsOpen] = React.useState(false);
|
|
@@ -122,7 +119,9 @@ function createCardExtension({
|
|
|
122
119
|
open: settingsOpen,
|
|
123
120
|
componentName: title,
|
|
124
121
|
close: () => setSettingsOpen(false)
|
|
125
|
-
}, /* @__PURE__ */ React.createElement(Settings, null)), /* @__PURE__ */ React.createElement(Content,
|
|
122
|
+
}, /* @__PURE__ */ React.createElement(Settings, null)), /* @__PURE__ */ React.createElement(Content, {
|
|
123
|
+
...childProps
|
|
124
|
+
}));
|
|
126
125
|
return /* @__PURE__ */ React.createElement(Suspense, {
|
|
127
126
|
fallback: /* @__PURE__ */ React.createElement(Progress, null)
|
|
128
127
|
}, ContextProvider ? /* @__PURE__ */ React.createElement(ContextProvider, {
|
|
@@ -147,25 +146,25 @@ const homePlugin = createPlugin({
|
|
|
147
146
|
});
|
|
148
147
|
const HomepageCompositionRoot = homePlugin.provide(createRoutableExtension({
|
|
149
148
|
name: "HomepageCompositionRoot",
|
|
150
|
-
component: () => import('./esm/index-
|
|
149
|
+
component: () => import('./esm/index-405b0ea2.esm.js').then((m) => m.HomepageCompositionRoot),
|
|
151
150
|
mountPoint: rootRouteRef
|
|
152
151
|
}));
|
|
153
152
|
const ComponentAccordion = homePlugin.provide(createComponentExtension({
|
|
154
153
|
name: "ComponentAccordion",
|
|
155
154
|
component: {
|
|
156
|
-
lazy: () => import('./esm/index-
|
|
155
|
+
lazy: () => import('./esm/index-eddf0731.esm.js').then((m) => m.ComponentAccordion)
|
|
157
156
|
}
|
|
158
157
|
}));
|
|
159
158
|
const ComponentTabs = homePlugin.provide(createComponentExtension({
|
|
160
159
|
name: "ComponentTabs",
|
|
161
160
|
component: {
|
|
162
|
-
lazy: () => import('./esm/index-
|
|
161
|
+
lazy: () => import('./esm/index-eddf0731.esm.js').then((m) => m.ComponentTabs)
|
|
163
162
|
}
|
|
164
163
|
}));
|
|
165
164
|
const ComponentTab = homePlugin.provide(createComponentExtension({
|
|
166
165
|
name: "ComponentTab",
|
|
167
166
|
component: {
|
|
168
|
-
lazy: () => import('./esm/index-
|
|
167
|
+
lazy: () => import('./esm/index-eddf0731.esm.js').then((m) => m.ComponentTab)
|
|
169
168
|
}
|
|
170
169
|
}));
|
|
171
170
|
const WelcomeTitle = homePlugin.provide(createComponentExtension({
|
|
@@ -174,11 +173,22 @@ const WelcomeTitle = homePlugin.provide(createComponentExtension({
|
|
|
174
173
|
lazy: () => import('./esm/index-56def6f8.esm.js').then((m) => m.WelcomeTitle)
|
|
175
174
|
}
|
|
176
175
|
}));
|
|
176
|
+
const HomePageCompanyLogo = homePlugin.provide(createComponentExtension({
|
|
177
|
+
name: "CompanyLogo",
|
|
178
|
+
component: {
|
|
179
|
+
lazy: () => import('./esm/index-e9dbf86a.esm.js').then((m) => m.CompanyLogo)
|
|
180
|
+
}
|
|
181
|
+
}));
|
|
177
182
|
const HomePageRandomJoke = homePlugin.provide(createCardExtension({
|
|
178
183
|
name: "HomePageRandomJoke",
|
|
179
184
|
title: "Random Joke",
|
|
180
185
|
components: () => import('./esm/index-22929ade.esm.js')
|
|
181
186
|
}));
|
|
187
|
+
const HomePageToolkit = homePlugin.provide(createCardExtension({
|
|
188
|
+
name: "HomePageToolkit",
|
|
189
|
+
title: "Toolkit",
|
|
190
|
+
components: () => import('./esm/index-e6d55b70.esm.js')
|
|
191
|
+
}));
|
|
182
192
|
|
|
183
|
-
export { ComponentAccordion, ComponentTab, ComponentTabs, HeaderWorldClock, HomePageRandomJoke, HomepageCompositionRoot, SettingsModal, WelcomeTitle, createCardExtension, homePlugin };
|
|
193
|
+
export { ComponentAccordion, ComponentTab, ComponentTabs, HeaderWorldClock, HomePageCompanyLogo, HomePageRandomJoke, HomePageToolkit, HomepageCompositionRoot, SettingsModal, WelcomeTitle, createCardExtension, homePlugin };
|
|
184
194
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/components/SettingsModal.tsx","../src/components/HeaderWorldClock/HeaderWorldClock.tsx","../src/extensions.tsx","../src/routes.ts","../src/plugin.ts"],"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 */\n\nimport React from 'react';\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n} from '@material-ui/core';\n\nexport const SettingsModal = ({\n open,\n close,\n componentName,\n children,\n}: {\n open: boolean;\n close: Function;\n componentName: string;\n children: JSX.Element;\n}) => {\n return (\n <Dialog open={open} onClose={() => close()}>\n <DialogTitle>Settings - {componentName}</DialogTitle>\n <DialogContent>{children}</DialogContent>\n <DialogActions>\n <Button onClick={() => close()} color=\"primary\" variant=\"contained\">\n Close\n </Button>\n </DialogActions>\n </Dialog>\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 { HeaderLabel } from '@backstage/core-components';\n\nconst timeFormat: Intl.DateTimeFormatOptions = {\n hour: '2-digit',\n minute: '2-digit',\n};\n\ntype TimeObj = {\n time: string;\n label: string;\n};\n\nexport type ClockConfig = {\n label: string;\n timeZone: string;\n};\n\nfunction getTimes(clockConfigs: ClockConfig[]) {\n const d = new Date();\n const lang = window.navigator.language;\n\n const clocks: TimeObj[] = [];\n\n if (!clockConfigs) {\n return clocks;\n }\n\n for (const clockConfig of clockConfigs) {\n let label = clockConfig.label;\n\n const options: Intl.DateTimeFormatOptions = {\n timeZone: clockConfig.timeZone,\n ...timeFormat,\n };\n\n try {\n new Date().toLocaleString(lang, options);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn(\n `The timezone ${options.timeZone} is invalid. Defaulting to GMT`,\n );\n options.timeZone = 'GMT';\n label = 'GMT';\n }\n\n const time = d.toLocaleTimeString(lang, options);\n clocks.push({ time, label });\n }\n\n return clocks;\n}\n\nexport const HeaderWorldClock = ({\n clockConfigs,\n}: {\n clockConfigs: ClockConfig[];\n}) => {\n const defaultTimes: TimeObj[] = [];\n const [clocks, setTimes] = React.useState(defaultTimes);\n\n React.useEffect(() => {\n setTimes(getTimes(clockConfigs));\n\n const intervalId = setInterval(() => {\n setTimes(getTimes(clockConfigs));\n }, 1000);\n\n return () => {\n clearInterval(intervalId);\n };\n }, [clockConfigs]);\n\n if (clocks.length !== 0) {\n return (\n <>\n {clocks.map(clock => (\n <HeaderLabel\n label={clock.label}\n value={clock.time}\n key={clock.label}\n />\n ))}\n </>\n );\n }\n return null;\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 React, { Suspense } from 'react';\nimport { IconButton } from '@material-ui/core';\nimport SettingsIcon from '@material-ui/icons/Settings';\nimport { InfoCard } from '@backstage/core-components';\nimport { SettingsModal } from './components';\nimport { createReactExtension, useApp } from '@backstage/core-plugin-api';\n\nexport type ComponentRenderer = {\n Renderer?: (props: RendererProps) => JSX.Element;\n};\n\ntype ComponentParts = {\n Content: () => JSX.Element;\n Actions?: () => JSX.Element;\n Settings?: () => JSX.Element;\n ContextProvider?: (props: any) => JSX.Element;\n};\n\ntype RendererProps = { title: string } & ComponentParts;\n\nexport function createCardExtension<T>({\n title,\n components,\n name,\n}: {\n title: string;\n components: () => Promise<ComponentParts>;\n name?: string;\n}) {\n return createReactExtension({\n name,\n component: {\n lazy: () =>\n components().then(({ Content, Actions, Settings, ContextProvider }) => {\n const CardExtension = ({\n Renderer,\n title: overrideTitle,\n ...childProps\n }: ComponentRenderer & { title?: string } & T) => {\n const app = useApp();\n const { Progress } = app.getComponents();\n const [settingsOpen, setSettingsOpen] = React.useState(false);\n\n if (Renderer) {\n return (\n <Suspense fallback={<Progress />}>\n <Renderer\n title={overrideTitle || title}\n {...{\n Content,\n ...(Actions ? { Actions } : {}),\n ...(Settings ? { Settings } : {}),\n ...(ContextProvider ? { ContextProvider } : {}),\n ...childProps,\n }}\n />\n </Suspense>\n );\n }\n\n const cardProps = {\n title: overrideTitle ?? title,\n ...(Settings\n ? {\n action: (\n <IconButton onClick={() => setSettingsOpen(true)}>\n <SettingsIcon>Settings</SettingsIcon>\n </IconButton>\n ),\n }\n : {}),\n ...(Actions\n ? {\n actions: <Actions />,\n }\n : {}),\n };\n\n const innerContent = (\n <InfoCard {...cardProps}>\n {Settings && (\n <SettingsModal\n open={settingsOpen}\n componentName={title}\n close={() => setSettingsOpen(false)}\n >\n <Settings />\n </SettingsModal>\n )}\n <Content />\n </InfoCard>\n );\n\n return (\n <Suspense fallback={<Progress />}>\n {ContextProvider ? (\n <ContextProvider {...childProps}>\n {innerContent}\n </ContextProvider>\n ) : (\n innerContent\n )}\n </Suspense>\n );\n };\n return CardExtension;\n }),\n },\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 */\nimport { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'home',\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 */\nimport {\n createComponentExtension,\n createPlugin,\n createRoutableExtension,\n} from '@backstage/core-plugin-api';\nimport { createCardExtension } from './extensions';\n\nimport { rootRouteRef } from './routes';\n\nexport const homePlugin = createPlugin({\n id: 'home',\n routes: {\n root: rootRouteRef,\n },\n});\n\nexport const HomepageCompositionRoot = homePlugin.provide(\n createRoutableExtension({\n name: 'HomepageCompositionRoot',\n component: () =>\n import('./components').then(m => m.HomepageCompositionRoot),\n mountPoint: rootRouteRef,\n }),\n);\n\nexport const ComponentAccordion = homePlugin.provide(\n createComponentExtension({\n name: 'ComponentAccordion',\n component: {\n lazy: () =>\n import('./componentRenderers').then(m => m.ComponentAccordion),\n },\n }),\n);\nexport const ComponentTabs = homePlugin.provide(\n createComponentExtension({\n name: 'ComponentTabs',\n component: {\n lazy: () => import('./componentRenderers').then(m => m.ComponentTabs),\n },\n }),\n);\nexport const ComponentTab = homePlugin.provide(\n createComponentExtension({\n name: 'ComponentTab',\n component: {\n lazy: () => import('./componentRenderers').then(m => m.ComponentTab),\n },\n }),\n);\n\n/**\n * A component to display a playful greeting for the user.\n *\n * @public\n */\nexport const WelcomeTitle = homePlugin.provide(\n createComponentExtension({\n name: 'WelcomeTitle',\n component: {\n lazy: () =>\n import('./homePageComponents/WelcomeTitle').then(m => m.WelcomeTitle),\n },\n }),\n);\n\nexport const HomePageRandomJoke = homePlugin.provide(\n createCardExtension<{ defaultCategory?: 'any' | 'programming' }>({\n name: 'HomePageRandomJoke',\n title: 'Random Joke',\n components: () => import('./homePageComponents/RandomJoke'),\n }),\n);\n"],"names":[],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/components/SettingsModal.tsx","../src/components/HeaderWorldClock/HeaderWorldClock.tsx","../src/extensions.tsx","../src/routes.ts","../src/plugin.ts"],"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 */\n\nimport React from 'react';\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n} from '@material-ui/core';\n\nexport const SettingsModal = ({\n open,\n close,\n componentName,\n children,\n}: {\n open: boolean;\n close: Function;\n componentName: string;\n children: JSX.Element;\n}) => {\n return (\n <Dialog open={open} onClose={() => close()}>\n <DialogTitle>Settings - {componentName}</DialogTitle>\n <DialogContent>{children}</DialogContent>\n <DialogActions>\n <Button onClick={() => close()} color=\"primary\" variant=\"contained\">\n Close\n </Button>\n </DialogActions>\n </Dialog>\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 { HeaderLabel } from '@backstage/core-components';\n\nconst timeFormat: Intl.DateTimeFormatOptions = {\n hour: '2-digit',\n minute: '2-digit',\n};\n\ntype TimeObj = {\n time: string;\n label: string;\n};\n\nexport type ClockConfig = {\n label: string;\n timeZone: string;\n};\n\nfunction getTimes(clockConfigs: ClockConfig[]) {\n const d = new Date();\n const lang = window.navigator.language;\n\n const clocks: TimeObj[] = [];\n\n if (!clockConfigs) {\n return clocks;\n }\n\n for (const clockConfig of clockConfigs) {\n let label = clockConfig.label;\n\n const options: Intl.DateTimeFormatOptions = {\n timeZone: clockConfig.timeZone,\n ...timeFormat,\n };\n\n try {\n new Date().toLocaleString(lang, options);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn(\n `The timezone ${options.timeZone} is invalid. Defaulting to GMT`,\n );\n options.timeZone = 'GMT';\n label = 'GMT';\n }\n\n const time = d.toLocaleTimeString(lang, options);\n clocks.push({ time, label });\n }\n\n return clocks;\n}\n\nexport const HeaderWorldClock = ({\n clockConfigs,\n}: {\n clockConfigs: ClockConfig[];\n}) => {\n const defaultTimes: TimeObj[] = [];\n const [clocks, setTimes] = React.useState(defaultTimes);\n\n React.useEffect(() => {\n setTimes(getTimes(clockConfigs));\n\n const intervalId = setInterval(() => {\n setTimes(getTimes(clockConfigs));\n }, 1000);\n\n return () => {\n clearInterval(intervalId);\n };\n }, [clockConfigs]);\n\n if (clocks.length !== 0) {\n return (\n <>\n {clocks.map(clock => (\n <HeaderLabel\n label={clock.label}\n value={clock.time}\n key={clock.label}\n />\n ))}\n </>\n );\n }\n return null;\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 React, { Suspense } from 'react';\nimport { IconButton } from '@material-ui/core';\nimport SettingsIcon from '@material-ui/icons/Settings';\nimport { InfoCard } from '@backstage/core-components';\nimport { SettingsModal } from './components';\nimport { createReactExtension, useApp } from '@backstage/core-plugin-api';\n\nexport type ComponentRenderer = {\n Renderer?: (props: RendererProps) => JSX.Element;\n};\n\ntype ComponentParts = {\n Content: (props?: any) => JSX.Element;\n Actions?: () => JSX.Element;\n Settings?: () => JSX.Element;\n ContextProvider?: (props: any) => JSX.Element;\n};\n\ntype RendererProps = { title: string } & ComponentParts;\n\ntype CardExtensionProps<T> = ComponentRenderer & { title?: string } & T;\n\n/**\n * An extension creator to create card based components for the homepage\n *\n * @public\n */\nexport function createCardExtension<T>({\n title,\n components,\n name,\n}: {\n title: string;\n components: () => Promise<ComponentParts>;\n name?: string;\n}) {\n return createReactExtension({\n name,\n component: {\n lazy: () =>\n components().then(({ Content, Actions, Settings, ContextProvider }) => {\n const CardExtension = (props: CardExtensionProps<T>) => {\n const { Renderer, title: overrideTitle, ...childProps } = props;\n const app = useApp();\n const { Progress } = app.getComponents();\n const [settingsOpen, setSettingsOpen] = React.useState(false);\n\n if (Renderer) {\n return (\n <Suspense fallback={<Progress />}>\n <Renderer\n title={overrideTitle || title}\n {...{\n Content,\n ...(Actions ? { Actions } : {}),\n ...(Settings ? { Settings } : {}),\n ...(ContextProvider ? { ContextProvider } : {}),\n ...childProps,\n }}\n />\n </Suspense>\n );\n }\n\n const cardProps = {\n title: overrideTitle ?? title,\n ...(Settings\n ? {\n action: (\n <IconButton onClick={() => setSettingsOpen(true)}>\n <SettingsIcon>Settings</SettingsIcon>\n </IconButton>\n ),\n }\n : {}),\n ...(Actions\n ? {\n actions: <Actions />,\n }\n : {}),\n };\n\n const innerContent = (\n <InfoCard {...cardProps}>\n {Settings && (\n <SettingsModal\n open={settingsOpen}\n componentName={title}\n close={() => setSettingsOpen(false)}\n >\n <Settings />\n </SettingsModal>\n )}\n <Content {...childProps} />\n </InfoCard>\n );\n\n return (\n <Suspense fallback={<Progress />}>\n {ContextProvider ? (\n <ContextProvider {...childProps}>\n {innerContent}\n </ContextProvider>\n ) : (\n innerContent\n )}\n </Suspense>\n );\n };\n return CardExtension;\n }),\n },\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 */\nimport { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'home',\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 */\nimport {\n createComponentExtension,\n createPlugin,\n createRoutableExtension,\n} from '@backstage/core-plugin-api';\nimport { createCardExtension } from './extensions';\nimport { ToolkitContentProps } from './homePageComponents';\n\nimport { rootRouteRef } from './routes';\n\nexport const homePlugin = createPlugin({\n id: 'home',\n routes: {\n root: rootRouteRef,\n },\n});\n\nexport const HomepageCompositionRoot = homePlugin.provide(\n createRoutableExtension({\n name: 'HomepageCompositionRoot',\n component: () =>\n import('./components').then(m => m.HomepageCompositionRoot),\n mountPoint: rootRouteRef,\n }),\n);\n\nexport const ComponentAccordion = homePlugin.provide(\n createComponentExtension({\n name: 'ComponentAccordion',\n component: {\n lazy: () =>\n import('./componentRenderers').then(m => m.ComponentAccordion),\n },\n }),\n);\nexport const ComponentTabs = homePlugin.provide(\n createComponentExtension({\n name: 'ComponentTabs',\n component: {\n lazy: () => import('./componentRenderers').then(m => m.ComponentTabs),\n },\n }),\n);\nexport const ComponentTab = homePlugin.provide(\n createComponentExtension({\n name: 'ComponentTab',\n component: {\n lazy: () => import('./componentRenderers').then(m => m.ComponentTab),\n },\n }),\n);\n\n/**\n * A component to display a playful greeting for the user.\n *\n * @public\n */\nexport const WelcomeTitle = homePlugin.provide(\n createComponentExtension({\n name: 'WelcomeTitle',\n component: {\n lazy: () =>\n import('./homePageComponents/WelcomeTitle').then(m => m.WelcomeTitle),\n },\n }),\n);\n\n/**\n * A component to display a company logo for the user.\n *\n * @public\n */\nexport const HomePageCompanyLogo = homePlugin.provide(\n createComponentExtension({\n name: 'CompanyLogo',\n component: {\n lazy: () =>\n import('./homePageComponents/CompanyLogo').then(m => m.CompanyLogo),\n },\n }),\n);\n\nexport const HomePageRandomJoke = homePlugin.provide(\n createCardExtension<{ defaultCategory?: 'any' | 'programming' }>({\n name: 'HomePageRandomJoke',\n title: 'Random Joke',\n components: () => import('./homePageComponents/RandomJoke'),\n }),\n);\n\n/**\n * A component to display a list of tools for the user.\n *\n * @public\n */\nexport const HomePageToolkit = homePlugin.provide(\n createCardExtension<ToolkitContentProps>({\n name: 'HomePageToolkit',\n title: 'Toolkit',\n components: () => import('./homePageComponents/Toolkit'),\n }),\n);\n"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-home",
|
|
3
3
|
"description": "A Backstage plugin that helps you build a home page",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.12",
|
|
5
5
|
"main": "dist/index.esm.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -21,8 +21,9 @@
|
|
|
21
21
|
"clean": "backstage-cli clean"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@backstage/core-components": "^0.8.
|
|
25
|
-
"@backstage/core-plugin-api": "^0.
|
|
24
|
+
"@backstage/core-components": "^0.8.6",
|
|
25
|
+
"@backstage/core-plugin-api": "^0.6.0",
|
|
26
|
+
"@backstage/plugin-search": "^0.6.0",
|
|
26
27
|
"@backstage/theme": "^0.2.14",
|
|
27
28
|
"@material-ui/core": "^4.12.2",
|
|
28
29
|
"@material-ui/icons": "^4.9.1",
|
|
@@ -36,10 +37,10 @@
|
|
|
36
37
|
"react": "^16.13.1 || ^17.0.0"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
|
-
"@backstage/cli": "^0.
|
|
40
|
-
"@backstage/core-app-api": "^0.
|
|
41
|
-
"@backstage/dev-utils": "^0.2.
|
|
42
|
-
"@backstage/test-utils": "^0.2.
|
|
40
|
+
"@backstage/cli": "^0.13.0",
|
|
41
|
+
"@backstage/core-app-api": "^0.5.1",
|
|
42
|
+
"@backstage/dev-utils": "^0.2.19",
|
|
43
|
+
"@backstage/test-utils": "^0.2.3",
|
|
43
44
|
"@testing-library/jest-dom": "^5.10.1",
|
|
44
45
|
"@testing-library/react": "^11.2.5",
|
|
45
46
|
"@testing-library/user-event": "^13.1.8",
|
|
@@ -51,5 +52,5 @@
|
|
|
51
52
|
"files": [
|
|
52
53
|
"dist"
|
|
53
54
|
],
|
|
54
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "493394603a2c47ea1d141159af9bc7bb84fac9e5"
|
|
55
56
|
}
|