@backstage/plugin-home 0.4.30-next.2 → 0.4.31-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 +24 -0
- package/dist/esm/{index-36ac98a7.esm.js → index-4517c5bc.esm.js} +4 -3
- package/dist/esm/{index-36ac98a7.esm.js.map → index-4517c5bc.esm.js.map} +1 -1
- package/dist/esm/{index-23e684fc.esm.js → index-830d4f5f.esm.js} +3 -2
- package/dist/esm/{index-23e684fc.esm.js.map → index-830d4f5f.esm.js.map} +1 -1
- package/dist/esm/{index-301c38cb.esm.js → index-c04bccf7.esm.js} +1 -1
- package/dist/esm/{index-301c38cb.esm.js.map → index-c04bccf7.esm.js.map} +1 -1
- package/dist/esm/{index-7dc252d5.esm.js → index-e9c329fa.esm.js} +1 -1
- package/dist/esm/{index-7dc252d5.esm.js.map → index-e9c329fa.esm.js.map} +1 -1
- package/dist/index.esm.js +6 -6
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @backstage/plugin-home
|
|
2
2
|
|
|
3
|
+
## 0.4.31-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/plugin-catalog-react@1.3.0-next.0
|
|
9
|
+
- @backstage/catalog-model@1.1.6-next.0
|
|
10
|
+
- @backstage/plugin-stack-overflow@0.1.11-next.0
|
|
11
|
+
|
|
12
|
+
## 0.4.30
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- 27a5e90e97: Small updates to some paragraph components to ensure theme typography properties are inherited correctly.
|
|
17
|
+
- 80ce4e8c29: Small updates to some components to ensure theme typography properties are inherited correctly.
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
- @backstage/catalog-model@1.1.5
|
|
20
|
+
- @backstage/plugin-catalog-react@1.2.4
|
|
21
|
+
- @backstage/core-components@0.12.3
|
|
22
|
+
- @backstage/plugin-stack-overflow@0.1.10
|
|
23
|
+
- @backstage/core-plugin-api@1.3.0
|
|
24
|
+
- @backstage/config@1.0.6
|
|
25
|
+
- @backstage/theme@0.2.16
|
|
26
|
+
|
|
3
27
|
## 0.4.30-next.2
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { createContext } from 'react';
|
|
2
2
|
import { Button, FormControl, FormLabel, RadioGroup, FormControlLabel, Radio } from '@material-ui/core';
|
|
3
|
+
import Typography from '@material-ui/core/Typography';
|
|
3
4
|
import upperFirst from 'lodash/upperFirst';
|
|
4
5
|
|
|
5
6
|
const Context = createContext(void 0);
|
|
@@ -54,8 +55,8 @@ const Actions = () => {
|
|
|
54
55
|
const Content = () => {
|
|
55
56
|
const { joke, loading } = useRandomJoke();
|
|
56
57
|
if (loading)
|
|
57
|
-
return /* @__PURE__ */ React.createElement(
|
|
58
|
-
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
|
|
58
|
+
return /* @__PURE__ */ React.createElement(Typography, { paragraph: true }, "Loading...");
|
|
59
|
+
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Typography, { paragraph: true }, joke.setup), /* @__PURE__ */ React.createElement(Typography, { paragraph: true }, joke.punchline));
|
|
59
60
|
};
|
|
60
61
|
|
|
61
62
|
const Settings = () => {
|
|
@@ -81,4 +82,4 @@ const Settings = () => {
|
|
|
81
82
|
};
|
|
82
83
|
|
|
83
84
|
export { Actions, Content, ContextProvider, Settings };
|
|
84
|
-
//# sourceMappingURL=index-
|
|
85
|
+
//# sourceMappingURL=index-4517c5bc.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-4517c5bc.esm.js","sources":["../../src/homePageComponents/RandomJoke/Context.tsx","../../src/homePageComponents/RandomJoke/Actions.tsx","../../src/homePageComponents/RandomJoke/Content.tsx","../../src/homePageComponents/RandomJoke/Settings.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, { createContext } from 'react';\n\nexport type JokeType = 'any' | 'programming';\n\ntype Joke = {\n setup: string;\n punchline: string;\n};\n\ntype RandomJokeContextValue = {\n loading: boolean;\n joke: Joke;\n type: JokeType;\n rerollJoke: Function;\n handleChangeType: Function;\n};\n\nconst Context = createContext<RandomJokeContextValue | undefined>(undefined);\n\nconst getNewJoke = (type: string): Promise<Joke> =>\n fetch(\n `https://official-joke-api.appspot.com/jokes${\n type !== 'any' ? `/${type}` : ''\n }/random`,\n )\n .then(res => res.json())\n .then(data => (Array.isArray(data) ? data[0] : data));\n\nexport const ContextProvider = (props: {\n children: JSX.Element;\n defaultCategory?: JokeType;\n}) => {\n const { children, defaultCategory } = props;\n\n const [loading, setLoading] = React.useState(true);\n const [joke, setJoke] = React.useState<Joke>({\n setup: '',\n punchline: '',\n });\n const [type, setType] = React.useState<JokeType>(\n defaultCategory || ('programming' as JokeType),\n );\n\n const rerollJoke = React.useCallback(() => {\n setLoading(true);\n getNewJoke(type).then(newJoke => setJoke(newJoke));\n }, [type]);\n\n const handleChangeType = (newType: JokeType) => {\n setType(newType);\n };\n\n React.useEffect(() => {\n setLoading(false);\n }, [joke]);\n\n React.useEffect(() => {\n rerollJoke();\n }, [rerollJoke]);\n\n const value: RandomJokeContextValue = {\n loading,\n joke,\n type,\n rerollJoke,\n handleChangeType,\n };\n\n return <Context.Provider value={value}>{children}</Context.Provider>;\n};\n\nexport const useRandomJoke = () => {\n const value = React.useContext(Context);\n\n if (value === undefined) {\n throw new Error('useRandomJoke must be used within a RandomJokeProvider');\n }\n\n return value;\n};\n\nexport default Context;\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\nimport { Button } from '@material-ui/core';\nimport { useRandomJoke } from './Context';\n\nexport const Actions = () => {\n const { rerollJoke } = useRandomJoke();\n return (\n <Button variant=\"contained\" color=\"primary\" onClick={() => rerollJoke()}>\n Reroll\n </Button>\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 Typography from '@material-ui/core/Typography';\nimport React from 'react';\nimport { useRandomJoke } from './Context';\n\nexport const Content = () => {\n const { joke, loading } = useRandomJoke();\n\n if (loading) return <Typography paragraph>Loading...</Typography>;\n\n return (\n <div>\n <Typography paragraph>{joke.setup}</Typography>\n <Typography paragraph>{joke.punchline}</Typography>\n </div>\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 {\n FormControl,\n FormLabel,\n RadioGroup,\n FormControlLabel,\n Radio,\n} from '@material-ui/core';\nimport React from 'react';\nimport { useRandomJoke, JokeType } from './Context';\nimport upperFirst from 'lodash/upperFirst';\n\nexport const Settings = () => {\n const { type, handleChangeType } = useRandomJoke();\n const JOKE_TYPES: JokeType[] = ['any' as JokeType, 'programming' as JokeType];\n return (\n <FormControl component=\"fieldset\">\n <FormLabel component=\"legend\">Joke Type</FormLabel>\n <RadioGroup\n aria-label=\"joke type\"\n value={type}\n onChange={e => handleChangeType(e.target.value)}\n >\n {JOKE_TYPES.map(t => (\n <FormControlLabel\n key={t}\n value={t}\n control={<Radio />}\n label={upperFirst(t)}\n />\n ))}\n </RadioGroup>\n </FormControl>\n );\n};\n"],"names":[],"mappings":";;;;;AAiCA,MAAM,OAAA,GAAU,cAAkD,KAAS,CAAA,CAAA,CAAA;AAE3E,MAAM,UAAA,GAAa,CAAC,IAClB,KAAA,KAAA;AAAA,EACE,CACE,2CAAA,EAAA,IAAA,KAAS,KAAQ,GAAA,CAAA,CAAA,EAAI,IAAS,CAAA,CAAA,GAAA,EAAA,CAAA,OAAA,CAAA;AAElC,CAAA,CACG,IAAK,CAAA,CAAA,GAAA,KAAO,GAAI,CAAA,IAAA,EAAM,CACtB,CAAA,IAAA,CAAK,CAAS,IAAA,KAAA,KAAA,CAAM,QAAQ,IAAI,CAAA,GAAI,IAAK,CAAA,CAAC,IAAI,IAAK,CAAA,CAAA;AAE3C,MAAA,eAAA,GAAkB,CAAC,KAG1B,KAAA;AACJ,EAAM,MAAA,EAAE,QAAU,EAAA,eAAA,EAAoB,GAAA,KAAA,CAAA;AAEtC,EAAA,MAAM,CAAC,OAAS,EAAA,UAAU,CAAI,GAAA,KAAA,CAAM,SAAS,IAAI,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,KAAA,CAAA,aAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,YAAW,EAAA,WAAA;AAAA,MACX,KAAO,EAAA,IAAA;AAAA,MACP,QAAU,EAAA,CAAA,CAAA,KAAK,gBAAiB,CAAA,CAAA,CAAE,OAAO,KAAK,CAAA;AAAA,KAAA;AAAA,IAE7C,UAAA,CAAW,IAAI,CACd,CAAA,qBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,gBAAA;AAAA,MAAA;AAAA,QACC,GAAK,EAAA,CAAA;AAAA,QACL,KAAO,EAAA,CAAA;AAAA,QACP,OAAA,sCAAU,KAAM,EAAA,IAAA,CAAA;AAAA,QAChB,KAAA,EAAO,WAAW,CAAC,CAAA;AAAA,OAAA;AAAA,KAEtB,CAAA;AAAA,GAEL,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useApi, identityApiRef, alertApiRef } from '@backstage/core-plugin-api';
|
|
2
2
|
import { Tooltip } from '@material-ui/core';
|
|
3
|
+
import Typography from '@material-ui/core/Typography';
|
|
3
4
|
import React, { useMemo, useEffect } from 'react';
|
|
4
5
|
import useAsync from 'react-use/lib/useAsync';
|
|
5
6
|
|
|
@@ -620,8 +621,8 @@ const WelcomeTitle = () => {
|
|
|
620
621
|
});
|
|
621
622
|
}
|
|
622
623
|
}, [error, alertApi]);
|
|
623
|
-
return /* @__PURE__ */ React.createElement(Tooltip, { title: greeting.language }, /* @__PURE__ */ React.createElement("span"
|
|
624
|
+
return /* @__PURE__ */ React.createElement(Tooltip, { title: greeting.language }, /* @__PURE__ */ React.createElement(Typography, { component: "span" }, `${greeting.greeting}${(profile == null ? void 0 : profile.displayName) ? `, ${profile == null ? void 0 : profile.displayName}` : ""}!`));
|
|
624
625
|
};
|
|
625
626
|
|
|
626
627
|
export { WelcomeTitle };
|
|
627
|
-
//# sourceMappingURL=index-
|
|
628
|
+
//# sourceMappingURL=index-830d4f5f.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-830d4f5f.esm.js","sources":["../../src/homePageComponents/WelcomeTitle/timeUtil.ts","../../src/homePageComponents/WelcomeTitle/WelcomeTitle.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport goodMorning from './locales/goodMorning.locales.json';\nimport goodAfternoon from './locales/goodAfternoon.locales.json';\nimport goodEvening from './locales/goodEvening.locales.json';\n\n// Select a large random integer at startup, to prevent the greetings to change\n// every time the user navigates.\nconst greetingRandomSeed = Math.floor(Math.random() * 1000000);\n\nexport function getTimeBasedGreeting(): { language: string; greeting: string } {\n const random = (array: string[]) => array[greetingRandomSeed % array.length];\n\n const currentHour = new Date(Date.now()).getHours();\n if (currentHour >= 23) {\n return {\n language: 'Seriously',\n greeting: 'Get some rest',\n };\n }\n const timeOfDay = (hour: number): { [language: string]: string } => {\n if (hour < 12) return goodMorning;\n if (hour < 17) return goodAfternoon;\n return goodEvening;\n };\n const greetings = timeOfDay(currentHour);\n const greetingsKey = random(Object.keys(greetings));\n return {\n language: greetingsKey,\n greeting: greetings[greetingsKey],\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 {\n alertApiRef,\n identityApiRef,\n useApi,\n} from '@backstage/core-plugin-api';\nimport { Tooltip } from '@material-ui/core';\nimport Typography from '@material-ui/core/Typography';\nimport React, { useEffect, useMemo } from 'react';\nimport useAsync from 'react-use/lib/useAsync';\nimport { getTimeBasedGreeting } from './timeUtil';\n\nexport const WelcomeTitle = () => {\n const identityApi = useApi(identityApiRef);\n const alertApi = useApi(alertApiRef);\n const greeting = useMemo(() => getTimeBasedGreeting(), []);\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\">{`${greeting.greeting}${\n profile?.displayName ? `, ${profile?.displayName}` : ''\n }!`}</Typography>\n </Tooltip>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AM,EAAE,KAAA,EAAO,OAAS,EAAA,KAAA,EAAU,GAAA,QAAA;AAAA,IAAS,MACzC,YAAY,cAAe,EAAA;AAAA,GAC7B,CAAA;AAEA,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,KAAO,EAAA;AACT,MAAA,QAAA,CAAS,IAAK,CAAA;AAAA,QACZ,SAAS,CAAiC,8BAAA,EAAA,KAAA,CAAA,CAAA;AAAA,QAC1C,QAAU,EAAA,OAAA;AAAA,OACX,CAAA,CAAA;AAAA,KACH;AAAA,GACC,EAAA,CAAC,KAAO,EAAA,QAAQ,CAAC,CAAA,CAAA;AAEpB,EAAA,2CACG,OAAQ,EAAA,EAAA,KAAA,EAAO,SAAS,QACvB,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,cAAW,SAAU,EAAA,MAAA,EAAA,EAAQ,CAAG,EAAA,QAAA,CAAS,YACxC,OAAS,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,OAAA,CAAA,WAAA,IAAc,KAAK,OAAS,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,OAAA,CAAA,WAAA,CAAA,CAAA,GAAgB,KACnD,CACN,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-c04bccf7.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 contentContainer: {\n width: '100%',\n },\n}));\n\nexport const ComponentAccordion = (props: {\n title: string;\n expanded?: boolean;\n Content: () => JSX.Element;\n Actions?: () => JSX.Element;\n Settings?: () => JSX.Element;\n ContextProvider?: (props: any) => JSX.Element;\n}) => {\n const {\n title,\n expanded = false,\n Content,\n Actions,\n Settings,\n ContextProvider,\n ...childProps\n } = props;\n\n const classes = useStyles();\n const [settingsIsExpanded, setSettingsIsExpanded] = React.useState(false);\n const [isExpanded, setIsExpanded] = React.useState(expanded);\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, expandedValue: boolean) =>\n setIsExpanded(expandedValue)\n }\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 className={classes.contentContainer}>\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 = (props: { title: string; tabs: TabType[] }) => {\n const { title, tabs } = props;\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 = (props: {\n title: string;\n Content: () => JSX.Element;\n ContextProvider?: (props: any) => JSX.Element;\n}) => {\n const { title, Content, ContextProvider, ...childProps } = props;\n\n return ContextProvider ? (\n <ContextProvider {...childProps}>\n <Content />\n </ContextProvider>\n ) : (\n <Content />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AA+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AAA;AAEA,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,KACR,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,IAAK,EAAA,EAAA,KAAA,EAAc,QAAU,EAAA,YAAA,EAAA,EAC3B,IAAK,CAAA,GAAA,CAAI,CACR,CAAA,qBAAA,KAAA,CAAA,aAAA,CAAC,GAAI,EAAA,EAAA,GAAA,EAAK,CAAE,CAAA,KAAA,EAAO,KAAO,EAAA,CAAA,CAAE,KAAO,EAAA,CACpC,CACH,CAAA,EACC,IAAK,CAAA,GAAA,CAAI,CAAC,EAAE,SAAU,EAAA,EAAG,GACxB,qBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAK,EAAA,GAAA;AAAA,MACJ,GAAI,GAAQ,KAAA,KAAA,GAAQ,EAAE,KAAA,EAAO,EAAE,OAAS,EAAA,MAAA,EAAS,EAAA,GAAI,EAAC;AAAA,KAAA;AAAA,wCAEtD,SAAU,EAAA,IAAA,CAAA;AAAA,GAEd,CACH,CAAA,CAAA;AAEJ;;ACjCa,MAAA,YAAA,GAAe,CAAC,KAIvB,KAAA;AACJ,EAAA,MAAM,EAAE,KAAO,EAAA,OAAA,EAAS,eAAiB,EAAA,GAAG,YAAe,GAAA,KAAA,CAAA;AAE3D,EAAO,OAAA,eAAA,mBACJ,KAAA,CAAA,aAAA,CAAA,eAAA,EAAA,EAAiB,GAAG,UAAA,EAAA,sCAClB,OAAQ,EAAA,IAAA,CACX,CAEA,mBAAA,KAAA,CAAA,aAAA,CAAC,OAAQ,EAAA,IAAA,CAAA,CAAA;AAEb;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-e9c329fa.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-dom';\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":";;;;;;;;AAmBa,MAAA,uBAAA,GAA0B,CAAC,KAGlC,KAAA;AAtBN,EAAA,IAAA,EAAA,CAAA;AAuBE,EAAA,MAAM,SAAS,SAAU,EAAA,CAAA;AACzB,EAAM,MAAA,QAAA,GAAA,CAAW,EAAM,GAAA,KAAA,CAAA,QAAA,KAAN,IAAkB,GAAA,EAAA,GAAA,MAAA,CAAA;AACnC,EAAA,iEAAU,QAAS,CAAA,CAAA;AACrB;;;;"}
|
package/dist/index.esm.js
CHANGED
|
@@ -75,7 +75,7 @@ const homePlugin = createPlugin({
|
|
|
75
75
|
const HomepageCompositionRoot = homePlugin.provide(
|
|
76
76
|
createRoutableExtension({
|
|
77
77
|
name: "HomepageCompositionRoot",
|
|
78
|
-
component: () => import('./esm/index-
|
|
78
|
+
component: () => import('./esm/index-e9c329fa.esm.js').then((m) => m.HomepageCompositionRoot),
|
|
79
79
|
mountPoint: rootRouteRef
|
|
80
80
|
})
|
|
81
81
|
);
|
|
@@ -83,7 +83,7 @@ const ComponentAccordion = homePlugin.provide(
|
|
|
83
83
|
createComponentExtension({
|
|
84
84
|
name: "ComponentAccordion",
|
|
85
85
|
component: {
|
|
86
|
-
lazy: () => import('./esm/index-
|
|
86
|
+
lazy: () => import('./esm/index-c04bccf7.esm.js').then((m) => m.ComponentAccordion)
|
|
87
87
|
}
|
|
88
88
|
})
|
|
89
89
|
);
|
|
@@ -91,7 +91,7 @@ const ComponentTabs = homePlugin.provide(
|
|
|
91
91
|
createComponentExtension({
|
|
92
92
|
name: "ComponentTabs",
|
|
93
93
|
component: {
|
|
94
|
-
lazy: () => import('./esm/index-
|
|
94
|
+
lazy: () => import('./esm/index-c04bccf7.esm.js').then((m) => m.ComponentTabs)
|
|
95
95
|
}
|
|
96
96
|
})
|
|
97
97
|
);
|
|
@@ -99,7 +99,7 @@ const ComponentTab = homePlugin.provide(
|
|
|
99
99
|
createComponentExtension({
|
|
100
100
|
name: "ComponentTab",
|
|
101
101
|
component: {
|
|
102
|
-
lazy: () => import('./esm/index-
|
|
102
|
+
lazy: () => import('./esm/index-c04bccf7.esm.js').then((m) => m.ComponentTab)
|
|
103
103
|
}
|
|
104
104
|
})
|
|
105
105
|
);
|
|
@@ -107,7 +107,7 @@ const WelcomeTitle = homePlugin.provide(
|
|
|
107
107
|
createComponentExtension({
|
|
108
108
|
name: "WelcomeTitle",
|
|
109
109
|
component: {
|
|
110
|
-
lazy: () => import('./esm/index-
|
|
110
|
+
lazy: () => import('./esm/index-830d4f5f.esm.js').then((m) => m.WelcomeTitle)
|
|
111
111
|
}
|
|
112
112
|
})
|
|
113
113
|
);
|
|
@@ -123,7 +123,7 @@ const HomePageRandomJoke = homePlugin.provide(
|
|
|
123
123
|
createCardExtension({
|
|
124
124
|
name: "HomePageRandomJoke",
|
|
125
125
|
title: "Random Joke",
|
|
126
|
-
components: () => import('./esm/index-
|
|
126
|
+
components: () => import('./esm/index-4517c5bc.esm.js')
|
|
127
127
|
})
|
|
128
128
|
);
|
|
129
129
|
const HomePageToolkit = homePlugin.provide(
|
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.31-next.0",
|
|
5
5
|
"main": "dist/index.esm.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"clean": "backstage-cli package clean"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@backstage/catalog-model": "^1.1.
|
|
37
|
-
"@backstage/config": "^1.0.6
|
|
38
|
-
"@backstage/core-components": "^0.12.3
|
|
39
|
-
"@backstage/core-plugin-api": "^1.3.0
|
|
40
|
-
"@backstage/plugin-catalog-react": "^1.
|
|
41
|
-
"@backstage/plugin-stack-overflow": "^0.1.
|
|
36
|
+
"@backstage/catalog-model": "^1.1.6-next.0",
|
|
37
|
+
"@backstage/config": "^1.0.6",
|
|
38
|
+
"@backstage/core-components": "^0.12.3",
|
|
39
|
+
"@backstage/core-plugin-api": "^1.3.0",
|
|
40
|
+
"@backstage/plugin-catalog-react": "^1.3.0-next.0",
|
|
41
|
+
"@backstage/plugin-stack-overflow": "^0.1.11-next.0",
|
|
42
42
|
"@backstage/theme": "^0.2.16",
|
|
43
43
|
"@material-ui/core": "^4.12.2",
|
|
44
44
|
"@material-ui/icons": "^4.9.1",
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@backstage/cli": "^0.22.1
|
|
56
|
-
"@backstage/core-app-api": "^1.4.0
|
|
57
|
-
"@backstage/dev-utils": "^1.0.
|
|
58
|
-
"@backstage/test-utils": "^1.2.4
|
|
55
|
+
"@backstage/cli": "^0.22.1",
|
|
56
|
+
"@backstage/core-app-api": "^1.4.0",
|
|
57
|
+
"@backstage/dev-utils": "^1.0.12-next.0",
|
|
58
|
+
"@backstage/test-utils": "^1.2.4",
|
|
59
59
|
"@testing-library/jest-dom": "^5.10.1",
|
|
60
60
|
"@testing-library/react": "^12.1.3",
|
|
61
61
|
"@testing-library/user-event": "^14.0.0",
|