@red-hat-developer-hub/backstage-plugin-dynamic-home-page 1.4.2 → 1.5.2

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.
Files changed (59) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/app-config.dynamic.yaml +21 -21
  3. package/dist/components/CustomizableGrid.esm.js +7 -6
  4. package/dist/components/CustomizableGrid.esm.js.map +1 -1
  5. package/dist/components/CustomizableHomePage.esm.js +12 -8
  6. package/dist/components/CustomizableHomePage.esm.js.map +1 -1
  7. package/dist/components/DynamicCustomizableHomePage.esm.js +2 -2
  8. package/dist/components/DynamicCustomizableHomePage.esm.js.map +1 -1
  9. package/dist/components/DynamicHomePage.esm.js +2 -2
  10. package/dist/components/DynamicHomePage.esm.js.map +1 -1
  11. package/dist/components/EntitySection/EntityCard.esm.js +60 -58
  12. package/dist/components/EntitySection/EntityCard.esm.js.map +1 -1
  13. package/dist/components/EntitySection/EntitySection.esm.js +152 -122
  14. package/dist/components/EntitySection/EntitySection.esm.js.map +1 -1
  15. package/dist/components/EntitySection/TagList.esm.js +45 -43
  16. package/dist/components/EntitySection/TagList.esm.js.map +1 -1
  17. package/dist/components/EntitySection/ViewMoreLink.esm.js +2 -2
  18. package/dist/components/EntitySection/ViewMoreLink.esm.js.map +1 -1
  19. package/dist/components/FeaturedDocsCard.esm.js +2 -2
  20. package/dist/components/FeaturedDocsCard.esm.js.map +1 -1
  21. package/dist/components/Header.esm.js +18 -15
  22. package/dist/components/Header.esm.js.map +1 -1
  23. package/dist/components/Headline.esm.js +2 -2
  24. package/dist/components/Headline.esm.js.map +1 -1
  25. package/dist/components/HomePage.esm.js +12 -8
  26. package/dist/components/HomePage.esm.js.map +1 -1
  27. package/dist/components/LocalClock.esm.js +9 -8
  28. package/dist/components/LocalClock.esm.js.map +1 -1
  29. package/dist/components/Markdown.esm.js +12 -9
  30. package/dist/components/Markdown.esm.js.map +1 -1
  31. package/dist/components/MarkdownCard.esm.js +2 -2
  32. package/dist/components/MarkdownCard.esm.js.map +1 -1
  33. package/dist/components/OnboardingSection/OnboardingCard.esm.js +50 -44
  34. package/dist/components/OnboardingSection/OnboardingCard.esm.js.map +1 -1
  35. package/dist/components/OnboardingSection/OnboardingSection.esm.js +69 -67
  36. package/dist/components/OnboardingSection/OnboardingSection.esm.js.map +1 -1
  37. package/dist/components/Placeholder.esm.js +2 -2
  38. package/dist/components/Placeholder.esm.js.map +1 -1
  39. package/dist/components/QuickAccessCard.esm.js +14 -14
  40. package/dist/components/QuickAccessCard.esm.js.map +1 -1
  41. package/dist/components/ReadOnlyGrid.esm.js +18 -14
  42. package/dist/components/ReadOnlyGrid.esm.js.map +1 -1
  43. package/dist/components/SearchBar.esm.js +3 -2
  44. package/dist/components/SearchBar.esm.js.map +1 -1
  45. package/dist/components/TemplateSection/TemplateCard.esm.js +66 -64
  46. package/dist/components/TemplateSection/TemplateCard.esm.js.map +1 -1
  47. package/dist/components/TemplateSection/TemplateSection.esm.js +77 -67
  48. package/dist/components/TemplateSection/TemplateSection.esm.js.map +1 -1
  49. package/dist/components/TemplateSection/ViewMoreLink.esm.js +2 -2
  50. package/dist/components/TemplateSection/ViewMoreLink.esm.js.map +1 -1
  51. package/dist/components/VisitListener.esm.js +4 -3
  52. package/dist/components/VisitListener.esm.js.map +1 -1
  53. package/dist/components/WorldClock.esm.js +3 -3
  54. package/dist/components/WorldClock.esm.js.map +1 -1
  55. package/dist/hooks/useGreeting.esm.js +3 -3
  56. package/dist/hooks/useGreeting.esm.js.map +1 -1
  57. package/dist/index.d.ts +59 -20
  58. package/dist/plugin.esm.js.map +1 -1
  59. package/package.json +24 -24
@@ -1 +1 @@
1
- {"version":3,"file":"OnboardingSection.esm.js","sources":["../../../src/components/OnboardingSection/OnboardingSection.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React from 'react';\n\nimport { useUserProfile } from '@backstage/plugin-user-settings';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { UserEntity } from '@backstage/catalog-model';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\n\nimport Grid from '@mui/material/Grid';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport Card from '@mui/material/Card';\nimport { useTheme } from '@mui/material/styles';\n\nimport OnboardingCard from './OnboardingCard';\nimport HomePageIllustrationDark from '../../images/homepage-illustration-dark.svg';\nimport HomePageIllustrationLight from '../../images/homepage-illustration-light.svg';\nimport { LEARNING_SECTION_ITEMS } from '../../utils/constants';\nimport useGreeting from '../../hooks/useGreeting';\n\nexport const OnboardingSection = () => {\n const [user, setUser] = React.useState<string | null>();\n const theme = useTheme();\n const isDarkMode = theme.palette.mode === 'dark';\n const greeting = useGreeting();\n const {\n displayName,\n backstageIdentity,\n loading: profileLoading,\n } = useUserProfile();\n const catalogApi = useApi(catalogApiRef);\n\n React.useEffect(() => {\n const fetchUserEntity = async () => {\n if (!backstageIdentity?.userEntityRef) {\n return;\n }\n try {\n const userEntity = (await catalogApi.getEntityByRef(\n backstageIdentity.userEntityRef,\n )) as unknown as UserEntity;\n setUser(\n userEntity?.spec?.profile?.displayName ?? userEntity?.metadata?.title,\n );\n } catch (_err) {\n setUser(null);\n }\n };\n\n fetchUserEntity();\n }, [backstageIdentity, catalogApi]);\n\n const profileDisplayName = () => {\n const name = user ?? displayName;\n const regex = /^[^:/]+:[^/]+\\/[^/]+$/;\n if (regex.test(name)) {\n return name\n .charAt(name.indexOf('/') + 1)\n .toLocaleUpperCase('en-US')\n .concat(name.substring(name.indexOf('/') + 2));\n }\n return name;\n };\n\n const content = (\n <Box>\n <Grid container margin=\"auto\">\n <Grid\n item\n xs={12}\n md={6}\n lg={3}\n display=\"flex\"\n justifyContent=\"left\"\n alignItems=\"center\"\n >\n <Box\n component=\"img\"\n src={\n isDarkMode ? HomePageIllustrationDark : HomePageIllustrationLight\n }\n alt=\"\"\n sx={{\n width: 'clamp(200px, 20vw, 264px)',\n }}\n />\n </Grid>\n {LEARNING_SECTION_ITEMS.map(item => (\n <Grid\n item\n xs={12}\n md={6}\n lg={3}\n key={item.title}\n display=\"flex\"\n justifyContent=\"left\"\n alignItems=\"center\"\n >\n <OnboardingCard\n title={item.title}\n description={item.description}\n buttonText={item.buttonText}\n buttonLink={item.buttonLink}\n target={item.target}\n ariaLabel={item.ariaLabel}\n />\n </Grid>\n ))}\n </Grid>\n </Box>\n );\n\n return (\n <Card\n elevation={0}\n sx={{\n padding: '24px',\n border: muiTheme => `1px solid ${muiTheme.palette.grey[300]}`,\n overflow: 'auto',\n '$::-webkit-scrollbar': {\n display: 'none',\n },\n scrollbarWidth: 'none',\n }}\n >\n {!profileLoading && (\n <Typography\n variant=\"h3\"\n sx={{\n display: 'flex',\n alignItems: 'center',\n fontWeight: '500',\n fontSize: '1.5rem',\n }}\n >\n {`${greeting} ${profileDisplayName() || 'Guest'}!`}\n </Typography>\n )}\n {content}\n </Card>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAkCO,MAAM,oBAAoB,MAAM;AACrC,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,MAAM,QAAwB,EAAA;AACtD,EAAA,MAAM,QAAQ,QAAS,EAAA;AACvB,EAAM,MAAA,UAAA,GAAa,KAAM,CAAA,OAAA,CAAQ,IAAS,KAAA,MAAA;AAC1C,EAAA,MAAM,WAAW,WAAY,EAAA;AAC7B,EAAM,MAAA;AAAA,IACJ,WAAA;AAAA,IACA,iBAAA;AAAA,IACA,OAAS,EAAA;AAAA,MACP,cAAe,EAAA;AACnB,EAAM,MAAA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AS,OAAQ,CAAA,IAAA,CAAK,GAAG,CAAC,CAAA,CAAA;AAAA,QAC3D,QAAU,EAAA,MAAA;AAAA,QACV,sBAAwB,EAAA;AAAA,UACtB,OAAS,EAAA;AAAA,SACX;AAAA,QACA,cAAgB,EAAA;AAAA;AAClB,KAAA;AAAA,IAEC,CAAC,cACA,oBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,OAAQ,EAAA,IAAA;AAAA,QACR,EAAI,EAAA;AAAA,UACF,OAAS,EAAA,MAAA;AAAA,UACT,UAAY,EAAA,QAAA;AAAA,UACZ,UAAY,EAAA,KAAA;AAAA,UACZ,QAAU,EAAA;AAAA;AACZ,OAAA;AAAA,MAEC,CAAG,EAAA,QAAQ,CAAI,CAAA,EAAA,kBAAA,MAAwB,OAAO,CAAA,CAAA;AAAA,KACjD;AAAA,IAED;AAAA,GACH;AAEJ;;;;"}
1
+ {"version":3,"file":"OnboardingSection.esm.js","sources":["../../../src/components/OnboardingSection/OnboardingSection.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 { useState, useEffect } from 'react';\n\nimport { useUserProfile } from '@backstage/plugin-user-settings';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { UserEntity } from '@backstage/catalog-model';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\n\nimport Grid from '@mui/material/Grid';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport Card from '@mui/material/Card';\nimport { useTheme } from '@mui/material/styles';\n\nimport OnboardingCard from './OnboardingCard';\nimport HomePageIllustrationDark from '../../images/homepage-illustration-dark.svg';\nimport HomePageIllustrationLight from '../../images/homepage-illustration-light.svg';\nimport { LEARNING_SECTION_ITEMS } from '../../utils/constants';\nimport useGreeting from '../../hooks/useGreeting';\n\nexport const OnboardingSection = () => {\n const [user, setUser] = useState<string | null>();\n const theme = useTheme();\n const isDarkMode = theme.palette.mode === 'dark';\n const greeting = useGreeting();\n const {\n displayName,\n backstageIdentity,\n loading: profileLoading,\n } = useUserProfile();\n const catalogApi = useApi(catalogApiRef);\n\n useEffect(() => {\n const fetchUserEntity = async () => {\n if (!backstageIdentity?.userEntityRef) {\n return;\n }\n try {\n const userEntity = (await catalogApi.getEntityByRef(\n backstageIdentity.userEntityRef,\n )) as unknown as UserEntity;\n setUser(\n userEntity?.spec?.profile?.displayName ?? userEntity?.metadata?.title,\n );\n } catch (_err) {\n setUser(null);\n }\n };\n\n fetchUserEntity();\n }, [backstageIdentity, catalogApi]);\n\n const profileDisplayName = () => {\n const name = user ?? displayName;\n const regex = /^[^:/]+:[^/]+\\/[^/]+$/;\n if (regex.test(name)) {\n return name\n .charAt(name.indexOf('/') + 1)\n .toLocaleUpperCase('en-US')\n .concat(name.substring(name.indexOf('/') + 2));\n }\n return name;\n };\n\n const content = (\n <Box>\n <Grid container margin=\"auto\">\n <Grid\n item\n xs={12}\n md={6}\n lg={3}\n display=\"flex\"\n justifyContent=\"left\"\n alignItems=\"center\"\n >\n <Box\n component=\"img\"\n src={\n isDarkMode ? HomePageIllustrationDark : HomePageIllustrationLight\n }\n alt=\"\"\n sx={{\n width: 'clamp(200px, 20vw, 264px)',\n }}\n />\n </Grid>\n {LEARNING_SECTION_ITEMS.map(item => (\n <Grid\n item\n xs={12}\n md={6}\n lg={3}\n key={item.title}\n display=\"flex\"\n justifyContent=\"left\"\n alignItems=\"center\"\n >\n <OnboardingCard\n title={item.title}\n description={item.description}\n buttonText={item.buttonText}\n buttonLink={item.buttonLink}\n target={item.target}\n ariaLabel={item.ariaLabel}\n />\n </Grid>\n ))}\n </Grid>\n </Box>\n );\n\n return (\n <Card\n elevation={0}\n sx={{\n padding: '24px',\n border: muiTheme => `1px solid ${muiTheme.palette.grey[300]}`,\n overflow: 'auto',\n }}\n >\n {!profileLoading && (\n <Typography\n variant=\"h3\"\n sx={{\n display: 'flex',\n alignItems: 'center',\n fontWeight: '500',\n fontSize: '1.5rem',\n }}\n >\n {`${greeting} ${profileDisplayName() || 'Guest'}!`}\n </Typography>\n )}\n {content}\n </Card>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAkCO,MAAM,oBAAoB,MAAM;AACrC,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,QAAwB,EAAA;AAChD,EAAA,MAAM,QAAQ,QAAS,EAAA;AACvB,EAAM,MAAA,UAAA,GAAa,KAAM,CAAA,OAAA,CAAQ,IAAS,KAAA,MAAA;AAC1C,EAAA,MAAM,WAAW,WAAY,EAAA;AAC7B,EAAM,MAAA;AAAA,IACJ,WAAA;AAAA,IACA,iBAAA;AAAA,IACA,OAAS,EAAA;AAAA,MACP,cAAe,EAAA;AACnB,EAAM,MAAA,UAAA,GAAa,OAAO,aAAa,CAAA;AAEvC,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,kBAAkB,YAAY;AAClC,MAAI,IAAA,CAAC,mBAAmB,aAAe,EAAA;AACrC,QAAA;AAAA;AAEF,MAAI,IAAA;AACF,QAAM,MAAA,UAAA,GAAc,MAAM,UAAW,CAAA,cAAA;AAAA,UACnC,iBAAkB,CAAA;AAAA,SACpB;AACA,QAAA,OAAA;AAAA,UACE,UAAY,EAAA,IAAA,EAAM,OAAS,EAAA,WAAA,IAAe,YAAY,QAAU,EAAA;AAAA,SAClE;AAAA,eACO,IAAM,EAAA;AACb,QAAA,OAAA,CAAQ,IAAI,CAAA;AAAA;AACd,KACF;AAEA,IAAgB,eAAA,EAAA;AAAA,GACf,EAAA,CAAC,iBAAmB,EAAA,UAAU,CA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@
1
- import React from 'react';
1
+ import { jsx } from 'react/jsx-runtime';
2
2
  import { makeStyles } from 'tss-react/mui';
3
3
 
4
4
  const useStyles = makeStyles()({
@@ -21,7 +21,7 @@ const Placeholder = (props) => {
21
21
  props.debugContent ? classes.centerDebugContent : undefined,
22
22
  props.showBorder ? classes.showBorder : undefined
23
23
  ].filter(Boolean).join(" ");
24
- return /* @__PURE__ */ React.createElement("div", { "data-testid": "placeholder", className }, props.debugContent);
24
+ return /* @__PURE__ */ jsx("div", { "data-testid": "placeholder", className, children: props.debugContent });
25
25
  };
26
26
 
27
27
  export { Placeholder };
@@ -1 +1 @@
1
- {"version":3,"file":"Placeholder.esm.js","sources":["../../src/components/Placeholder.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 { makeStyles } from 'tss-react/mui';\n\n/**\n * @public\n */\nexport interface PlaceholderProps {\n showBorder?: boolean;\n debugContent?: string;\n}\n\nconst useStyles = makeStyles()({\n centerDebugContent: {\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n // Make card content scrollable (so that cards don't overlap)\n showBorder: {\n border: '1px solid gray',\n width: '100%',\n height: '100%',\n },\n});\n\n/**\n * @public\n */\nexport const Placeholder = (props: PlaceholderProps) => {\n const { classes } = useStyles();\n const className = [\n props.debugContent ? classes.centerDebugContent : undefined,\n props.showBorder ? classes.showBorder : undefined,\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <div data-testid=\"placeholder\" className={className}>\n {props.debugContent}\n </div>\n );\n};\n"],"names":[],"mappings":";;;AA4BA,MAAM,SAAA,GAAY,YAAa,CAAA;AAAA,EAC7B,kBAAoB,EAAA;AAAA,IAClB,MAAQ,EAAA,MAAA;AAAA,IACR,OAAS,EAAA,MAAA;AAAA,IACT,UAAY,EAAA,QAAA;AAAA,IACZ,cAAgB,EAAA;AAAA,GAClB;AAAA;AAAA,EAEA,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,gBAAA;AAAA,IACR,KAAO,EAAA,MAAA;AAAA,IACP,MAAQ,EAAA;AAAA;AAEZ,CAAC,CAAA;AAKY,MAAA,WAAA,GAAc,CAAC,KAA4B,KAAA;AACtD,EAAM,MAAA,EAAE,OAAQ,EAAA,GAAI,SAAU,EAAA;AAC9B,EAAA,MAAM,SAAY,GAAA;AAAA,IAChB,KAAA,CAAM,YAAe,GAAA,OAAA,CAAQ,kBAAqB,GAAA,SAAA;AAAA,IAClD,KAAA,CAAM,UAAa,GAAA,OAAA,CAAQ,UAAa,GAAA;AAAA,GAEvC,CAAA,MAAA,CAAO,OAAO,CAAA,CACd,KAAK,GAAG,CAAA;AACX,EAAA,2CACG,KAAI,EAAA,EAAA,aAAA,EAAY,aAAc,EAAA,SAAA,EAAA,EAC5B,MAAM,YACT,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Placeholder.esm.js","sources":["../../src/components/Placeholder.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 { makeStyles } from 'tss-react/mui';\n\n/**\n * @public\n */\nexport interface PlaceholderProps {\n showBorder?: boolean;\n debugContent?: string;\n}\n\nconst useStyles = makeStyles()({\n centerDebugContent: {\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n // Make card content scrollable (so that cards don't overlap)\n showBorder: {\n border: '1px solid gray',\n width: '100%',\n height: '100%',\n },\n});\n\n/**\n * @public\n */\nexport const Placeholder = (props: PlaceholderProps) => {\n const { classes } = useStyles();\n const className = [\n props.debugContent ? classes.centerDebugContent : undefined,\n props.showBorder ? classes.showBorder : undefined,\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <div data-testid=\"placeholder\" className={className}>\n {props.debugContent}\n </div>\n );\n};\n"],"names":[],"mappings":";;;AA0BA,MAAM,SAAA,GAAY,YAAa,CAAA;AAAA,EAC7B,kBAAoB,EAAA;AAAA,IAClB,MAAQ,EAAA,MAAA;AAAA,IACR,OAAS,EAAA,MAAA;AAAA,IACT,UAAY,EAAA,QAAA;AAAA,IACZ,cAAgB,EAAA;AAAA,GAClB;AAAA;AAAA,EAEA,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,gBAAA;AAAA,IACR,KAAO,EAAA,MAAA;AAAA,IACP,MAAQ,EAAA;AAAA;AAEZ,CAAC,CAAA;AAKY,MAAA,WAAA,GAAc,CAAC,KAA4B,KAAA;AACtD,EAAM,MAAA,EAAE,OAAQ,EAAA,GAAI,SAAU,EAAA;AAC9B,EAAA,MAAM,SAAY,GAAA;AAAA,IAChB,KAAA,CAAM,YAAe,GAAA,OAAA,CAAQ,kBAAqB,GAAA,SAAA;AAAA,IAClD,KAAA,CAAM,UAAa,GAAA,OAAA,CAAQ,UAAa,GAAA;AAAA,GAEvC,CAAA,MAAA,CAAO,OAAO,CAAA,CACd,KAAK,GAAG,CAAA;AACX,EAAA,2BACG,KAAI,EAAA,EAAA,aAAA,EAAY,aAAc,EAAA,SAAA,EAC5B,gBAAM,YACT,EAAA,CAAA;AAEJ;;;;"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx, Fragment } from 'react/jsx-runtime';
2
2
  import { WarningPanel, CodeSnippet, InfoCard } from '@backstage/core-components';
3
3
  import { HomePageToolkit, ComponentAccordion } from '@backstage/plugin-home';
4
4
  import CircularProgress from '@mui/material/CircularProgress';
@@ -27,24 +27,23 @@ const QuickAccessCard = (props) => {
27
27
  const { data, error, isLoading } = useQuickAccessLinks(props.path);
28
28
  let content;
29
29
  if (isLoading) {
30
- content = /* @__PURE__ */ React.createElement("div", { className: classes.center }, /* @__PURE__ */ React.createElement(CircularProgress, null));
30
+ content = /* @__PURE__ */ jsx("div", { className: classes.center, children: /* @__PURE__ */ jsx(CircularProgress, {}) });
31
31
  } else if (!data) {
32
- content = /* @__PURE__ */ React.createElement(WarningPanel, { severity: "error", title: "Could not fetch data." }, /* @__PURE__ */ React.createElement(
32
+ content = /* @__PURE__ */ jsx(WarningPanel, { severity: "error", title: "Could not fetch data.", children: /* @__PURE__ */ jsx(
33
33
  CodeSnippet,
34
34
  {
35
35
  language: "text",
36
36
  text: error?.toString() ?? "Unknown error"
37
37
  }
38
- ));
38
+ ) });
39
39
  } else {
40
- content = /* @__PURE__ */ React.createElement(React.Fragment, null, data.map((item) => /* @__PURE__ */ React.createElement(
40
+ content = /* @__PURE__ */ jsx(Fragment, { children: data.map((item) => /* @__PURE__ */ jsx(
41
41
  HomePageToolkit,
42
42
  {
43
- key: item.title,
44
43
  title: item.title,
45
44
  tools: item.links.map((link) => ({
46
45
  ...link,
47
- icon: /* @__PURE__ */ React.createElement(
46
+ icon: /* @__PURE__ */ jsx(
48
47
  "img",
49
48
  {
50
49
  className: classes.img,
@@ -53,18 +52,19 @@ const QuickAccessCard = (props) => {
53
52
  }
54
53
  )
55
54
  })),
56
- Renderer: (renderProps) => /* @__PURE__ */ React.createElement(ComponentAccordion, { expanded: item.isExpanded, ...renderProps })
57
- }
58
- )));
55
+ Renderer: (renderProps) => /* @__PURE__ */ jsx(ComponentAccordion, { expanded: item.isExpanded, ...renderProps })
56
+ },
57
+ item.title
58
+ )) });
59
59
  }
60
- return /* @__PURE__ */ React.createElement(
60
+ return /* @__PURE__ */ jsx(
61
61
  InfoCard,
62
62
  {
63
63
  title: props.title ?? "Quick Access",
64
64
  noPadding: true,
65
- className: classes.title
66
- },
67
- content
65
+ className: classes.title,
66
+ children: content
67
+ }
68
68
  );
69
69
  };
70
70
 
@@ -1 +1 @@
1
- {"version":3,"file":"QuickAccessCard.esm.js","sources":["../../src/components/QuickAccessCard.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 {\n CodeSnippet,\n InfoCard,\n WarningPanel,\n} from '@backstage/core-components';\nimport { ComponentAccordion, HomePageToolkit } from '@backstage/plugin-home';\n\nimport CircularProgress from '@mui/material/CircularProgress';\nimport { makeStyles } from 'tss-react/mui';\n\nimport { useQuickAccessLinks } from '../hooks/useQuickAccessLinks';\n\nconst useStyles = makeStyles()({\n center: {\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n img: {\n height: '40px',\n width: 'auto',\n },\n title: {\n '& div > div > div > div > p': {\n textTransform: 'uppercase',\n },\n },\n});\n\n/**\n * @public\n */\nexport interface QuickAccessCardProps {\n title?: string;\n path?: string;\n}\n\n/**\n * @public\n */\nexport const QuickAccessCard = (props: QuickAccessCardProps) => {\n const { classes } = useStyles();\n const { data, error, isLoading } = useQuickAccessLinks(props.path);\n\n let content: React.ReactNode;\n\n if (isLoading) {\n content = (\n <div className={classes.center}>\n <CircularProgress />\n </div>\n );\n } else if (!data) {\n content = (\n <WarningPanel severity=\"error\" title=\"Could not fetch data.\">\n <CodeSnippet\n language=\"text\"\n text={error?.toString() ?? 'Unknown error'}\n />\n </WarningPanel>\n );\n } else {\n content = (\n <>\n {data.map(item => (\n <HomePageToolkit\n key={item.title}\n title={item.title}\n tools={item.links.map(link => ({\n ...link,\n icon: (\n <img\n className={classes.img}\n src={link.iconUrl}\n alt={link.label}\n />\n ),\n }))}\n // Component creation is allowed inside component props only\n // if prop name starts with `render`.\n // We accept it here since the upstream package use `Renderer` instead.\n Renderer={(\n renderProps, // NOSONAR\n ) => (\n <ComponentAccordion expanded={item.isExpanded} {...renderProps} />\n )}\n />\n ))}\n </>\n );\n }\n\n return (\n <InfoCard\n title={props.title ?? 'Quick Access'}\n noPadding\n className={classes.title}\n >\n {content}\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;;;;;AA8BA,MAAM,SAAA,GAAY,YAAa,CAAA;AAAA,EAC7B,MAAQ,EAAA;AAAA,IACN,MAAQ,EAAA,MAAA;AAAA,IACR,OAAS,EAAA,MAAA;AAAA,IACT,UAAY,EAAA,QAAA;AAAA,IACZ,cAAgB,EAAA;AAAA,GAClB;AAAA,EACA,GAAK,EAAA;AAAA,IACH,MAAQ,EAAA,MAAA;AAAA,IACR,KAAO,EAAA;AAAA,GACT;AAAA,EACA,KAAO,EAAA;AAAA,IACL,6BAA+B,EAAA;AAAA,MAC7B,aAAe,EAAA;AAAA;AACjB;AAEJ,CAAC,CAAA;AAaY,MAAA,eAAA,GAAkB,CAAC,KAAgC,KAAA;AAC9D,EAAM,MAAA,EAAE,OAAQ,EAAA,GAAI,SAAU,EAAA;AAC9B,EAAA,MAAM,EAAE,IAAM,EAAA,KAAA,EAAO,WAAc,GAAA,mBAAA,CAAoB,MAAM,IAAI,CAAA;AAEjE,EAAI,IAAA,OAAA;AAEJ,EAAA,IAAI,SAAW,EAAA;AACb,IAAA,OAAA,uCACG,KAAI,EAAA,EAAA,SAAA,EAAW,QAAQ,MACtB,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,sBAAiB,CACpB,CAAA;AAA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AA;AAAA,IAElB;AAAA,GACH;AAEJ;;;;"}
1
+ {"version":3,"file":"QuickAccessCard.esm.js","sources":["../../src/components/QuickAccessCard.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 type { ReactNode } from 'react';\n\nimport {\n CodeSnippet,\n InfoCard,\n WarningPanel,\n} from '@backstage/core-components';\nimport { ComponentAccordion, HomePageToolkit } from '@backstage/plugin-home';\n\nimport CircularProgress from '@mui/material/CircularProgress';\nimport { makeStyles } from 'tss-react/mui';\n\nimport { useQuickAccessLinks } from '../hooks/useQuickAccessLinks';\n\nconst useStyles = makeStyles()({\n center: {\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n img: {\n height: '40px',\n width: 'auto',\n },\n title: {\n '& div > div > div > div > p': {\n textTransform: 'uppercase',\n },\n },\n});\n\n/**\n * @public\n */\nexport interface QuickAccessCardProps {\n title?: string;\n path?: string;\n}\n\n/**\n * @public\n */\nexport const QuickAccessCard = (props: QuickAccessCardProps) => {\n const { classes } = useStyles();\n const { data, error, isLoading } = useQuickAccessLinks(props.path);\n\n let content: ReactNode;\n\n if (isLoading) {\n content = (\n <div className={classes.center}>\n <CircularProgress />\n </div>\n );\n } else if (!data) {\n content = (\n <WarningPanel severity=\"error\" title=\"Could not fetch data.\">\n <CodeSnippet\n language=\"text\"\n text={error?.toString() ?? 'Unknown error'}\n />\n </WarningPanel>\n );\n } else {\n content = (\n <>\n {data.map(item => (\n <HomePageToolkit\n key={item.title}\n title={item.title}\n tools={item.links.map(link => ({\n ...link,\n icon: (\n <img\n className={classes.img}\n src={link.iconUrl}\n alt={link.label}\n />\n ),\n }))}\n // Component creation is allowed inside component props only\n // if prop name starts with `render`.\n // We accept it here since the upstream package use `Renderer` instead.\n Renderer={(\n renderProps, // NOSONAR\n ) => (\n <ComponentAccordion expanded={item.isExpanded} {...renderProps} />\n )}\n />\n ))}\n </>\n );\n }\n\n return (\n <InfoCard\n title={props.title ?? 'Quick Access'}\n noPadding\n className={classes.title}\n >\n {content}\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;;;;;AA8BA,MAAM,SAAA,GAAY,YAAa,CAAA;AAAA,EAC7B,MAAQ,EAAA;AAAA,IACN,MAAQ,EAAA,MAAA;AAAA,IACR,OAAS,EAAA,MAAA;AAAA,IACT,UAAY,EAAA,QAAA;AAAA,IACZ,cAAgB,EAAA;AAAA,GAClB;AAAA,EACA,GAAK,EAAA;AAAA,IACH,MAAQ,EAAA,MAAA;AAAA,IACR,KAAO,EAAA;AAAA,GACT;AAAA,EACA,KAAO,EAAA;AAAA,IACL,6BAA+B,EAAA;AAAA,MAC7B,aAAe,EAAA;AAAA;AACjB;AAEJ,CAAC,CAAA;AAaY,MAAA,eAAA,GAAkB,CAAC,KAAgC,KAAA;AAC9D,EAAM,MAAA,EAAE,OAAQ,EAAA,GAAI,SAAU,EAAA;AAC9B,EAAA,MAAM,EAAE,IAAM,EAAA,KAAA,EAAO,WAAc,GAAA,mBAAA,CAAoB,MAAM,IAAI,CAAA;AAEjE,EAAI,IAAA,OAAA;AAEJ,EAAA,IAAI,SAAW,EAAA;AACb,IAAA,OAAA,uBACG,KAAI,EAAA,EAAA,SAAA,EAAW,QAAQ,MACtB,EAAA,QAAA,kBAAA,GAAA,CAAC,oBAAiB,CACpB,EAAA,CAAA;AAAA,GAEJ,MAAA,IAAW,CAAC,IAAM,EAAA;AAChB,IAAA,OAAA,mBACG,GAAA,CAAA,YAAA,EAAA,EAAa,QAAS,EAAA,OAAA,EAAQ,OAAM,uBACnC,EAAA,QAAA,kBAAA,GAAA;AAAA,MAAC,WAAA;AAAA,MAAA;AAAA,QACC,QAAS,EAAA,MAAA;AAAA,QACT,IAAA,EAAM,KAAO,EAAA,QAAA,EAAc,IAAA;AAAA;AAAA,KAE/B,EAAA,CAAA;AAAA,GAEG,MAAA;AACL,IACE,OAAA,mBAAA,GAAA,CAAA,QAAA,EAAA,EACG,QAAK,EAAA,IAAA,CAAA,GAAA,CAAI,CACR,IAAA,qBAAA,GAAA;AAAA,MAAC,eAAA;AAAA,MAAA;AAAA,QAEC,OAAO,IAAK,CAAA,KAAA;AAAA,QACZ,KAAO,EAAA,IAAA,CAAK,KAAM,CAAA,GAAA,CAAI,CAAS,IAAA,MAAA;AAAA,UAC7B,GAAG,IAAA;AAAA,UACH,IACE,kBAAA,GAAA;AAAA,YAAC,KAAA;AAAA,YAAA;AAAA,cACC,WAAW,OAAQ,CAAA,GAAA;AAAA,cACnB,KAAK,IAAK,CAAA,OAAA;AAAA,cACV,KAAK,IAAK,CAAA;AAAA;AAAA;AACZ,SAEF,CAAA,CAAA;AAAA,QAIF,QAAA,EAAU,CACR,WAEA,qBAAA,GAAA,CAAC,sBAAmB,QAAU,EAAA,IAAA,CAAK,UAAa,EAAA,GAAG,WAAa,EAAA;AAAA,OAAA;AAAA,MAlB7D,IAAK,CAAA;AAAA,KAqBb,CACH,EAAA,CAAA;AAAA;AAIJ,EACE,uBAAA,GAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,MAAM,KAAS,IAAA,cAAA;AAAA,MACtB,SAAS,EAAA,IAAA;AAAA,MACT,WAAW,OAAQ,CAAA,KAAA;AAAA,MAElB,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ;;;;"}
@@ -1,4 +1,5 @@
1
- import React, { useMemo } from 'react';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { useMemo } from 'react';
2
3
  import { Responsive } from 'react-grid-layout';
3
4
  import { ErrorBoundary } from '@backstage/core-components';
4
5
  import { makeStyles } from 'tss-react/mui';
@@ -102,27 +103,30 @@ const ReadOnlyGrid = (props) => {
102
103
  return result;
103
104
  }, [cards]);
104
105
  const children = useMemo(() => {
105
- return cards.map((card) => /* @__PURE__ */ React.createElement(
106
+ return cards.map((card) => /* @__PURE__ */ jsx(
106
107
  "div",
107
108
  {
108
- key: card.id,
109
109
  "data-cardid": card.id,
110
110
  "data-testid": `home-page card ${card.id}`,
111
111
  "data-layout": JSON.stringify(card.layouts),
112
- className: classes.cardWrapper
112
+ className: classes.cardWrapper,
113
+ children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(card.Component, { ...card.props }) })
113
114
  },
114
- /* @__PURE__ */ React.createElement(ErrorBoundary, null, /* @__PURE__ */ React.createElement(card.Component, { ...card.props }))
115
+ card.id
115
116
  ));
116
117
  }, [cards, classes.cardWrapper]);
117
- return /* @__PURE__ */ React.createElement("div", { style: { margin: -16 } }, /* @__PURE__ */ React.createElement("div", { ref: measureRef }), measureRect.width ? /* @__PURE__ */ React.createElement(
118
- Responsive,
119
- {
120
- ...defaultProps,
121
- width: measureRect.width,
122
- layouts
123
- },
124
- children
125
- ) : null);
118
+ return /* @__PURE__ */ jsxs("div", { style: { margin: -16 }, children: [
119
+ /* @__PURE__ */ jsx("div", { ref: measureRef }),
120
+ measureRect.width ? /* @__PURE__ */ jsx(
121
+ Responsive,
122
+ {
123
+ ...defaultProps,
124
+ width: measureRect.width,
125
+ layouts,
126
+ children
127
+ }
128
+ ) : null
129
+ ] });
126
130
  };
127
131
 
128
132
  export { ReadOnlyGrid };
@@ -1 +1 @@
1
- {"version":3,"file":"ReadOnlyGrid.esm.js","sources":["../../src/components/ReadOnlyGrid.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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\n// This complete read-only home page grid picks up the idea and styles from\n// https://github.com/backstage/backstage/blob/master/plugins/home\n// Esp. from the CustomHomepageGrid component:\n// https://github.com/backstage/backstage/blob/master/plugins/home/src/components/CustomHomepage/CustomHomepageGrid.tsx\n// but without the drag and drop functionality.\n\nimport React, { useMemo } from 'react';\nimport {\n Layout,\n Layouts,\n Responsive,\n ResponsiveProps,\n} from 'react-grid-layout';\n\nimport { ErrorBoundary } from '@backstage/core-components';\n\nimport { makeStyles } from 'tss-react/mui';\n\n// Removes the doubled scrollbar\nimport 'react-grid-layout/css/styles.css';\n\nimport useMeasure from 'react-use/lib/useMeasure';\n\nimport { HomePageCardMountPoint } from '../types';\n\ninterface Card {\n id: string;\n Component: React.ComponentType<any>;\n props?: Record<string, any>;\n layouts: Record<string, Layout>;\n}\n\nconst gridGap = 16;\n\nconst defaultProps: ResponsiveProps = {\n // Aligned with the 1.0-1.2 home page gap.\n margin: [gridGap, gridGap],\n // Same as in home-plugin CustomHomepageGrid\n rowHeight: 60,\n\n // We use always a 12-column grid, but each cards can define\n // their number of columns (width) and start column (x) per breakpoint.\n breakpoints: {\n xl: 1600,\n lg: 1200,\n md: 996,\n sm: 768,\n xs: 480,\n xxs: 0,\n },\n cols: {\n xl: 12,\n lg: 12,\n md: 12,\n sm: 12,\n xs: 12,\n xxs: 12,\n },\n\n isDraggable: false,\n isResizable: false,\n compactType: null,\n};\n\nconst useStyles = makeStyles()({\n // Make card content scrollable (so that cards don't overlap)\n cardWrapper: {\n '& > div[class*=\"MuiCard-root\"]': {\n width: '100%',\n height: '100%',\n },\n '& div[class*=\"MuiCardContent-root\"]': {\n overflow: 'auto',\n },\n },\n});\n\n/**\n * @public\n */\nexport interface ReadOnlyGridProps {\n mountPoints: HomePageCardMountPoint[];\n breakpoints?: Record<string, number>;\n cols?: Record<string, number>;\n}\n\n/**\n * @public\n */\nexport const ReadOnlyGrid = (props: ReadOnlyGridProps) => {\n const { classes } = useStyles();\n const [measureRef, measureRect] = useMeasure<HTMLDivElement>();\n\n const cards = useMemo<Card[]>(() => {\n return props.mountPoints.map<Card>((mountPoint, index) => {\n const id = (index + 1).toString();\n const layouts: Record<string, Layout> = {};\n\n if (mountPoint.config?.layouts) {\n for (const [breakpoint, layout] of Object.entries(\n mountPoint.config.layouts,\n )) {\n layouts[breakpoint] = {\n i: id,\n x: layout.x ?? 0,\n y: layout.y ?? 0,\n w: layout.w ?? 12,\n h: layout.h ?? 4,\n isDraggable: false,\n isResizable: false,\n };\n }\n } else {\n // Default layout for cards without a layout configuration\n ['xl', 'lg', 'md', 'sm', 'xs', 'xxs'].forEach(breakpoint => {\n layouts[breakpoint] = {\n i: id,\n x: 0,\n y: 0,\n w: 12,\n h: 4,\n isDraggable: false,\n isResizable: false,\n };\n });\n }\n\n return {\n id,\n Component: mountPoint.Component,\n props: mountPoint.config?.props,\n layouts,\n };\n });\n }, [props.mountPoints]);\n\n const layouts = useMemo<Layouts>(() => {\n const result: Layouts = {};\n for (const card of cards) {\n for (const [breakpoint, layoutPerBreakpoint] of Object.entries(\n card.layouts,\n )) {\n if (!result[breakpoint]) {\n result[breakpoint] = [];\n }\n result[breakpoint].push(layoutPerBreakpoint);\n }\n }\n return result;\n }, [cards]);\n\n const children = useMemo(() => {\n return cards.map(card => (\n <div\n key={card.id}\n data-cardid={card.id}\n data-testid={`home-page card ${card.id}`}\n data-layout={JSON.stringify(card.layouts)}\n className={classes.cardWrapper}\n >\n <ErrorBoundary>\n <card.Component {...card.props} />\n </ErrorBoundary>\n </div>\n ));\n }, [cards, classes.cardWrapper]);\n\n return (\n <div style={{ margin: -gridGap }}>\n <div ref={measureRef} />\n {measureRect.width ? (\n <Responsive\n {...defaultProps}\n width={measureRect.width}\n layouts={layouts}\n >\n {children}\n </Responsive>\n ) : null}\n </div>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B,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,KAAI,EAAA,EAAA,GAAA,EAAK,UAAY,EAAA,CAAA,EACrB,YAAY,KACX,mBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACE,GAAG,YAAA;AAAA,MACJ,OAAO,WAAY,CAAA,KAAA;AAAA,MACnB;AAAA,KAAA;AAAA,IAEC;AAAA,MAED,IACN,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"ReadOnlyGrid.esm.js","sources":["../../src/components/ReadOnlyGrid.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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\n// This complete read-only home page grid picks up the idea and styles from\n// https://github.com/backstage/backstage/blob/master/plugins/home\n// Esp. from the CustomHomepageGrid component:\n// https://github.com/backstage/backstage/blob/master/plugins/home/src/components/CustomHomepage/CustomHomepageGrid.tsx\n// but without the drag and drop functionality.\n\nimport type { ComponentType } from 'react';\n\nimport { useMemo } from 'react';\nimport {\n Layout,\n Layouts,\n Responsive,\n ResponsiveProps,\n} from 'react-grid-layout';\n\nimport { ErrorBoundary } from '@backstage/core-components';\n\nimport { makeStyles } from 'tss-react/mui';\n\n// Removes the doubled scrollbar\nimport 'react-grid-layout/css/styles.css';\n\nimport useMeasure from 'react-use/lib/useMeasure';\n\nimport { HomePageCardMountPoint } from '../types';\n\ninterface Card {\n id: string;\n Component: ComponentType<any>;\n props?: Record<string, any>;\n layouts: Record<string, Layout>;\n}\n\nconst gridGap = 16;\n\nconst defaultProps: ResponsiveProps = {\n // Aligned with the 1.0-1.2 home page gap.\n margin: [gridGap, gridGap],\n // Same as in home-plugin CustomHomepageGrid\n rowHeight: 60,\n\n // We use always a 12-column grid, but each cards can define\n // their number of columns (width) and start column (x) per breakpoint.\n breakpoints: {\n xl: 1600,\n lg: 1200,\n md: 996,\n sm: 768,\n xs: 480,\n xxs: 0,\n },\n cols: {\n xl: 12,\n lg: 12,\n md: 12,\n sm: 12,\n xs: 12,\n xxs: 12,\n },\n\n isDraggable: false,\n isResizable: false,\n compactType: null,\n};\n\nconst useStyles = makeStyles()({\n // Make card content scrollable (so that cards don't overlap)\n cardWrapper: {\n '& > div[class*=\"MuiCard-root\"]': {\n width: '100%',\n height: '100%',\n },\n '& div[class*=\"MuiCardContent-root\"]': {\n overflow: 'auto',\n },\n },\n});\n\n/**\n * @public\n */\nexport interface ReadOnlyGridProps {\n mountPoints: HomePageCardMountPoint[];\n breakpoints?: Record<string, number>;\n cols?: Record<string, number>;\n}\n\n/**\n * @public\n */\nexport const ReadOnlyGrid = (props: ReadOnlyGridProps) => {\n const { classes } = useStyles();\n const [measureRef, measureRect] = useMeasure<HTMLDivElement>();\n\n const cards = useMemo<Card[]>(() => {\n return props.mountPoints.map<Card>((mountPoint, index) => {\n const id = (index + 1).toString();\n const layouts: Record<string, Layout> = {};\n\n if (mountPoint.config?.layouts) {\n for (const [breakpoint, layout] of Object.entries(\n mountPoint.config.layouts,\n )) {\n layouts[breakpoint] = {\n i: id,\n x: layout.x ?? 0,\n y: layout.y ?? 0,\n w: layout.w ?? 12,\n h: layout.h ?? 4,\n isDraggable: false,\n isResizable: false,\n };\n }\n } else {\n // Default layout for cards without a layout configuration\n ['xl', 'lg', 'md', 'sm', 'xs', 'xxs'].forEach(breakpoint => {\n layouts[breakpoint] = {\n i: id,\n x: 0,\n y: 0,\n w: 12,\n h: 4,\n isDraggable: false,\n isResizable: false,\n };\n });\n }\n\n return {\n id,\n Component: mountPoint.Component,\n props: mountPoint.config?.props,\n layouts,\n };\n });\n }, [props.mountPoints]);\n\n const layouts = useMemo<Layouts>(() => {\n const result: Layouts = {};\n for (const card of cards) {\n for (const [breakpoint, layoutPerBreakpoint] of Object.entries(\n card.layouts,\n )) {\n if (!result[breakpoint]) {\n result[breakpoint] = [];\n }\n result[breakpoint].push(layoutPerBreakpoint);\n }\n }\n return result;\n }, [cards]);\n\n const children = useMemo(() => {\n return cards.map(card => (\n <div\n key={card.id}\n data-cardid={card.id}\n data-testid={`home-page card ${card.id}`}\n data-layout={JSON.stringify(card.layouts)}\n className={classes.cardWrapper}\n >\n <ErrorBoundary>\n <card.Component {...card.props} />\n </ErrorBoundary>\n </div>\n ));\n }, [cards, classes.cardWrapper]);\n\n return (\n <div style={{ margin: -gridGap }}>\n <div ref={measureRef} />\n {measureRect.width ? (\n <Responsive\n {...defaultProps}\n width={measureRect.width}\n layouts={layouts}\n >\n {children}\n </Responsive>\n ) : null}\n </div>\n );\n};\n"],"names":["layouts"],"mappings":";;;;;;;;AAkDA,MAAM,OAAU,GAAA,EAAA;AAEhB,MAAM,YAAgC,GAAA;AAAA;AAAA,EAEpC,MAAA,EAAQ,CAAC,OAAA,EAAS,OAAO,CAAA;AAAA;AAAA,EAEzB,SAAW,EAAA,EAAA;AAAA;AAAA;AAAA,EAIX,WAAa,EAAA;AAAA,IACX,EAAI,EAAA,IAAA;AAAA,IACJ,EAAI,EAAA,IAAA;AAAA,IACJ,EAAI,EAAA,GAAA;AAAA,IACJ,EAAI,EAAA,GAAA;AAAA,IACJ,EAAI,EAAA,GAAA;AAAA,IACJ,GAAK,EAAA;AAAA,GACP;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,EAAI,EAAA,EAAA;AAAA,IACJ,EAAI,EAAA,EAAA;AAAA,IACJ,EAAI,EAAA,EAAA;AAAA,IACJ,EAAI,EAAA,EAAA;AAAA,IACJ,EAAI,EAAA,EAAA;AAAA,IACJ,GAAK,EAAA;AAAA,GACP;AAAA,EAEA,WAAa,EAAA,KAAA;AAAA,EACb,WAAa,EAAA,KAAA;AAAA,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AAA,QAClB,aAAA,EAAa,CAAkB,eAAA,EAAA,IAAA,CAAK,EAAE,CAAA,CAAA;AAAA,QACtC,aAAa,EAAA,IAAA,CAAK,SAAU,CAAA,IAAA,CAAK,OAAO,CAAA;AAAA,QACxC,WAAW,OAAQ,CAAA,WAAA;AAAA,QAEnB,QAAA,kBAAA,GAAA,CAAC,iBACC,QAAC,kBAAA,GAAA,CAAA,IAAA,CAAK,WAAL,EAAgB,GAAG,IAAK,CAAA,KAAA,EAAO,CAClC,EAAA;AAAA,OAAA;AAAA,MARK,IAAK,CAAA;AAAA,KAUb,CAAA;AAAA,GACA,EAAA,CAAC,KAAO,EAAA,OAAA,CAAQ,WAAW,CAAC,CAAA;AAE/B,EAAA,4BACG,KAAI,EAAA,EAAA,KAAA,EAAO,EAAE,MAAQ,EAAA,KACpB,EAAA,QAAA,EAAA;AAAA,oBAAC,GAAA,CAAA,KAAA,EAAA,EAAI,KAAK,UAAY,EAAA,CAAA;AAAA,IACrB,YAAY,KACX,mBAAA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACE,GAAG,YAAA;AAAA,QACJ,OAAO,WAAY,CAAA,KAAA;AAAA,QACnB,OAAA;AAAA,QAEC;AAAA;AAAA,KAED,GAAA;AAAA,GACN,EAAA,CAAA;AAEJ;;;;"}
@@ -1,4 +1,5 @@
1
- import React, { useState, useRef, useCallback } from 'react';
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useState, useRef, useCallback } from 'react';
2
3
  import { useNavigate } from 'react-router-dom';
3
4
  import { SearchBarBase } from '@backstage/plugin-search-react';
4
5
  import { makeStyles } from 'tss-react/mui';
@@ -32,7 +33,7 @@ const SearchBar = ({ path, queryParam }) => {
32
33
  const search = url.searchParams.toString();
33
34
  navigate(`${url.pathname}${search ? "?" : ""}${search}`);
34
35
  }, [navigate, path, queryParam]);
35
- return /* @__PURE__ */ React.createElement(
36
+ return /* @__PURE__ */ jsx(
36
37
  SearchBarBase,
37
38
  {
38
39
  placeholder: "Search",
@@ -1 +1 @@
1
- {"version":3,"file":"SearchBar.esm.js","sources":["../../src/components/SearchBar.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useCallback, useRef, useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\n\nimport { SearchBarBase } from '@backstage/plugin-search-react';\n\nimport { makeStyles } from 'tss-react/mui';\n\nconst useStyles = makeStyles()(theme => ({\n searchBar: {\n '&&': {\n backgroundColor: theme.palette.mode === 'dark' ? '#36373A' : '#FFFFFF',\n boxShadow: 'none',\n border: `1px solid ${\n theme.palette.mode === 'dark' ? '#57585a' : '#E4E4E4'\n }`,\n borderRadius: '50px',\n margin: 0,\n },\n },\n notchedOutline: {\n '&&': {\n borderStyle: 'none',\n },\n },\n}));\n\n/**\n * @public\n */\nexport interface SearchBarProps {\n path?: string;\n queryParam?: string;\n}\n\n/**\n * @public\n */\nexport const SearchBar = ({ path, queryParam }: SearchBarProps) => {\n const { classes } = useStyles();\n const [value, setValue] = useState('');\n const ref = useRef<HTMLInputElement | null>(null);\n const navigate = useNavigate();\n\n // This handler is called when \"enter\" is pressed\n const handleSubmit = useCallback(() => {\n const query = ref.current?.value ?? '';\n\n const url = new URL(window.location.toString());\n url.pathname = path ?? '/search';\n url.searchParams.set(queryParam ?? 'query', query);\n const search = url.searchParams.toString();\n\n navigate(`${url.pathname}${search ? '?' : ''}${search}`);\n }, [navigate, path, queryParam]);\n\n return (\n <SearchBarBase\n placeholder=\"Search\"\n value={value}\n onChange={setValue}\n onSubmit={handleSubmit}\n inputProps={{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IAAM,MAAA,MAAA,GAAS,GAAI,CAAA,YAAA,CAAa,QAAS,EAAA;AAEzC,IAAS,QAAA,CAAA,CAAA,EAAG,IAAI,QAAQ,CAAA,EAAG,SAAS,GAAM,GAAA,EAAE,CAAG,EAAA,MAAM,CAAE,CAAA,CAAA;AAAA,GACtD,EAAA,CAAC,QAAU,EAAA,IAAA,EAAM,UAAU,CAAC,CAAA;AAE/B,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,aAAA;AAAA,IAAA;AAAA,MACC,WAAY,EAAA,QAAA;AAAA,MACZ,KAAA;AAAA,MACA,QAAU,EAAA,QAAA;AAAA,MACV,QAAU,EAAA,YAAA;AAAA,MACV,UAAA,EAAY,EAAE,GAAI,EAAA;AAAA,MAClB,OAAS,EAAA;AAAA,QACP,MAAM,OAAQ,CAAA;AAAA,OAChB;AAAA,MACA,UAAY,EAAA;AAAA,QACV,OAAS,EAAA;AAAA,UACP,gBAAgB,OAAQ,CAAA;AAAA;AAC1B;AACF;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"SearchBar.esm.js","sources":["../../src/components/SearchBar.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 { useCallback, useRef, useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\n\nimport { SearchBarBase } from '@backstage/plugin-search-react';\n\nimport { makeStyles } from 'tss-react/mui';\n\nconst useStyles = makeStyles()(theme => ({\n searchBar: {\n '&&': {\n backgroundColor: theme.palette.mode === 'dark' ? '#36373A' : '#FFFFFF',\n boxShadow: 'none',\n border: `1px solid ${\n theme.palette.mode === 'dark' ? '#57585a' : '#E4E4E4'\n }`,\n borderRadius: '50px',\n margin: 0,\n },\n },\n notchedOutline: {\n '&&': {\n borderStyle: 'none',\n },\n },\n}));\n\n/**\n * @public\n */\nexport interface SearchBarProps {\n path?: string;\n queryParam?: string;\n}\n\n/**\n * @public\n */\nexport const SearchBar = ({ path, queryParam }: SearchBarProps) => {\n const { classes } = useStyles();\n const [value, setValue] = useState('');\n const ref = useRef<HTMLInputElement | null>(null);\n const navigate = useNavigate();\n\n // This handler is called when \"enter\" is pressed\n const handleSubmit = useCallback(() => {\n const query = ref.current?.value ?? '';\n\n const url = new URL(window.location.toString());\n url.pathname = path ?? '/search';\n url.searchParams.set(queryParam ?? 'query', query);\n const search = url.searchParams.toString();\n\n navigate(`${url.pathname}${search ? '?' : ''}${search}`);\n }, [navigate, path, queryParam]);\n\n return (\n <SearchBarBase\n placeholder=\"Search\"\n value={value}\n onChange={setValue}\n onSubmit={handleSubmit}\n inputProps={{ ref }}\n classes={{\n root: classes.searchBar,\n }}\n InputProps={{\n classes: {\n notchedOutline: classes.notchedOutline,\n },\n }}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;AAuBA,MAAM,SAAA,GAAY,UAAW,EAAA,CAAE,CAAU,KAAA,MAAA;AAAA,EACvC,SAAW,EAAA;AAAA,IACT,IAAM,EAAA;AAAA,MACJ,eAAiB,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,KAAS,SAAS,SAAY,GAAA,SAAA;AAAA,MAC7D,SAAW,EAAA,MAAA;AAAA,MACX,QAAQ,CACN,UAAA,EAAA,KAAA,CAAM,QAAQ,IAAS,KAAA,MAAA,GAAS,YAAY,SAC9C,CAAA,CAAA;AAAA,MACA,YAAc,EAAA,MAAA;AAAA,MACd,MAAQ,EAAA;AAAA;AACV,GACF;AAAA,EACA,cAAgB,EAAA;AAAA,IACd,IAAM,EAAA;AAAA,MACJ,WAAa,EAAA;AAAA;AACf;AAEJ,CAAE,CAA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F;AAAA,GACF;AAEJ;;;;"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { Link, MarkdownContent } from '@backstage/core-components';
3
3
  import Box from '@mui/material/Box';
4
4
  import CardContent from '@mui/material/CardContent';
@@ -12,7 +12,7 @@ const TemplateCard = ({
12
12
  description,
13
13
  kind
14
14
  }) => {
15
- return /* @__PURE__ */ React.createElement(
15
+ return /* @__PURE__ */ jsx(
16
16
  Card,
17
17
  {
18
18
  elevation: 0,
@@ -20,73 +20,75 @@ const TemplateCard = ({
20
20
  border: (theme) => `1px solid ${theme.palette.grey[400]}`,
21
21
  overflow: "auto",
22
22
  maxHeight: "100%"
23
- }
24
- },
25
- /* @__PURE__ */ React.createElement(
26
- CardContent,
27
- {
28
- sx: {
29
- pb: 2,
30
- "&:last-child": {
31
- pb: 2
32
- },
33
- backgroundColor: "transparent"
34
- }
35
23
  },
36
- /* @__PURE__ */ React.createElement(Box, { sx: { padding: "8px 0" } }, /* @__PURE__ */ React.createElement(
37
- Chip,
38
- {
39
- label: /* @__PURE__ */ React.createElement(Typography, { sx: { fontSize: "0.8rem", fontWeight: 400 } }, kind),
40
- key: kind,
41
- size: "small"
42
- }
43
- )),
44
- /* @__PURE__ */ React.createElement(Box, { sx: { margin: "8px 0", height: "21px", overflow: "hidden" } }, /* @__PURE__ */ React.createElement(
45
- Link,
46
- {
47
- to: link,
48
- underline: "always",
49
- style: {
50
- display: "-webkit-box",
51
- WebkitBoxOrient: "vertical",
52
- WebkitLineClamp: 1,
53
- overflow: "hidden",
54
- textOverflow: "ellipsis",
55
- fontSize: "0.9rem",
56
- fontWeight: "500"
57
- }
58
- },
59
- title
60
- )),
61
- /* @__PURE__ */ React.createElement(
62
- Box,
24
+ children: /* @__PURE__ */ jsxs(
25
+ CardContent,
63
26
  {
64
27
  sx: {
65
- padding: "8px 0",
66
- height: "90px",
67
- overflow: "hidden"
68
- }
69
- },
70
- /* @__PURE__ */ React.createElement(
71
- Typography,
72
- {
73
- variant: "body2",
74
- paragraph: true,
75
- sx: {
76
- display: "-webkit-box",
77
- WebkitLineClamp: 4,
78
- WebkitBoxOrient: "vertical",
79
- overflow: "hidden",
80
- textOverflow: "ellipsis",
81
- "& p": {
82
- margin: "auto"
83
- }
84
- }
28
+ pb: 2,
29
+ "&:last-child": {
30
+ pb: 2
31
+ },
32
+ backgroundColor: "transparent"
85
33
  },
86
- /* @__PURE__ */ React.createElement(MarkdownContent, { content: description })
87
- )
34
+ children: [
35
+ /* @__PURE__ */ jsx(Box, { sx: { padding: "8px 0" }, children: /* @__PURE__ */ jsx(
36
+ Chip,
37
+ {
38
+ label: /* @__PURE__ */ jsx(Typography, { sx: { fontSize: "0.8rem", fontWeight: 400 }, children: kind }),
39
+ size: "small"
40
+ },
41
+ kind
42
+ ) }),
43
+ /* @__PURE__ */ jsx(Box, { sx: { margin: "8px 0", height: "21px", overflow: "hidden" }, children: /* @__PURE__ */ jsx(
44
+ Link,
45
+ {
46
+ to: link,
47
+ underline: "always",
48
+ style: {
49
+ display: "-webkit-box",
50
+ WebkitBoxOrient: "vertical",
51
+ WebkitLineClamp: 1,
52
+ overflow: "hidden",
53
+ textOverflow: "ellipsis",
54
+ fontSize: "0.9rem",
55
+ fontWeight: "500"
56
+ },
57
+ children: title
58
+ }
59
+ ) }),
60
+ /* @__PURE__ */ jsx(
61
+ Box,
62
+ {
63
+ sx: {
64
+ padding: "8px 0",
65
+ height: "90px",
66
+ overflow: "hidden"
67
+ },
68
+ children: /* @__PURE__ */ jsx(
69
+ Typography,
70
+ {
71
+ variant: "body2",
72
+ paragraph: true,
73
+ sx: {
74
+ display: "-webkit-box",
75
+ WebkitLineClamp: 4,
76
+ WebkitBoxOrient: "vertical",
77
+ overflow: "hidden",
78
+ textOverflow: "ellipsis",
79
+ "& p": {
80
+ margin: "auto"
81
+ }
82
+ },
83
+ children: /* @__PURE__ */ jsx(MarkdownContent, { content: description })
84
+ }
85
+ )
86
+ }
87
+ )
88
+ ]
89
+ }
88
90
  )
89
- )
91
+ }
90
92
  );
91
93
  };
92
94
 
@@ -1 +1 @@
1
- {"version":3,"file":"TemplateCard.esm.js","sources":["../../../src/components/TemplateSection/TemplateCard.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React from 'react';\n\nimport { Link } from '@backstage/core-components';\nimport { MarkdownContent } from '@backstage/core-components';\n\nimport Box from '@mui/material/Box';\nimport CardContent from '@mui/material/CardContent';\nimport Chip from '@mui/material/Chip';\nimport Typography from '@mui/material/Typography';\nimport Card from '@mui/material/Card';\n\ninterface TemplateCardProps {\n link: string;\n title: string;\n description: string;\n kind: string;\n}\n\nconst TemplateCard: React.FC<TemplateCardProps> = ({\n link,\n title,\n description,\n kind,\n}) => {\n return (\n <Card\n elevation={0}\n sx={{\n border: theme => `1px solid ${theme.palette.grey[400]}`,\n overflow: 'auto',\n maxHeight: '100%',\n }}\n >\n <CardContent\n sx={{\n pb: 2,\n '&:last-child': {\n pb: 2,\n },\n backgroundColor: 'transparent',\n }}\n >\n <Box sx={{ padding: '8px 0' }}>\n <Chip\n label={\n <Typography sx={{ fontSize: '0.8rem', fontWeight: 400 }}>\n {kind}\n </Typography>\n }\n key={kind}\n size=\"small\"\n />\n </Box>\n <Box sx={{ margin: '8px 0', height: '21px', overflow: 'hidden' }}>\n <Link\n to={link}\n underline=\"always\"\n style={{\n display: '-webkit-box',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: 1,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n fontSize: '0.9rem',\n fontWeight: '500',\n }}\n >\n {title}\n </Link>\n </Box>\n <Box\n sx={{\n padding: '8px 0',\n height: '90px',\n overflow: 'hidden',\n }}\n >\n <Typography\n variant=\"body2\"\n paragraph\n sx={{\n display: '-webkit-box',\n WebkitLineClamp: 4,\n WebkitBoxOrient: 'vertical',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n '& p': {\n margin: 'auto',\n },\n }}\n >\n <MarkdownContent content={description} />\n </Typography>\n </Box>\n </CardContent>\n </Card>\n );\n};\n\nexport default TemplateCard;\n"],"names":[],"mappings":";;;;;;;;AAiCA,MAAM,eAA4C,CAAC;AAAA,EACjD,IAAA;AAAA,EACA,KAAA;AAAA,EACA,WAAA;AAAA,EACA;AACF,CAAM,KAAA;AACJ,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,SAAW,EAAA,CAAA;AAAA,MACX,EAAI,EAAA;AAAA,QACF,QAAQ,CAAS,KAAA,KAAA,CAAA,UAAA,EAAa,MAAM,OAAQ,CAAA,IAAA,CAAK,GAAG,CAAC,CAAA,CAAA;AAAA,QACrD,QAAU,EAAA,MAAA;AAAA,QACV,SAAW,EAAA;AAAA;AACb,KAAA;AAAA,oBAEA,KAAA,CAAA,aAAA;AAAA,MAAC,WAAA;AAAA,MAAA;AAAA,QACC,EAAI,EAAA;AAAA,UACF,EAAI,EAAA,CAAA;AAAA,UACJ,cAAgB,EAAA;AAAA,YACd,EAAI,EAAA;AAAA,WACN;AAAA,UACA,eAAiB,EAAA;AAAA;AACnB,OAAA;AAAA,0CAEC,GAAI,EAAA,EAAA,EAAA,EAAI,EAAE,OAAA,EAAS,SAClB,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,QAAC,IAAA;AAAA,QAAA;AAAA,UACC,KAAA,kBACG,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,EAAI,EAAA,EAAE,UAAU,QAAU,EAAA,UAAA,EAAY,GAAI,EAAA,EAAA,E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EAAS,WAAa,EAAA;AAAA;AACzC;AACF;AACF,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"TemplateCard.esm.js","sources":["../../../src/components/TemplateSection/TemplateCard.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 type { FC } from 'react';\n\nimport { Link } from '@backstage/core-components';\nimport { MarkdownContent } from '@backstage/core-components';\n\nimport Box from '@mui/material/Box';\nimport CardContent from '@mui/material/CardContent';\nimport Chip from '@mui/material/Chip';\nimport Typography from '@mui/material/Typography';\nimport Card from '@mui/material/Card';\n\ninterface TemplateCardProps {\n link: string;\n title: string;\n description: string;\n kind: string;\n}\n\nconst TemplateCard: FC<TemplateCardProps> = ({\n link,\n title,\n description,\n kind,\n}) => {\n return (\n <Card\n elevation={0}\n sx={{\n border: theme => `1px solid ${theme.palette.grey[400]}`,\n overflow: 'auto',\n maxHeight: '100%',\n }}\n >\n <CardContent\n sx={{\n pb: 2,\n '&:last-child': {\n pb: 2,\n },\n backgroundColor: 'transparent',\n }}\n >\n <Box sx={{ padding: '8px 0' }}>\n <Chip\n label={\n <Typography sx={{ fontSize: '0.8rem', fontWeight: 400 }}>\n {kind}\n </Typography>\n }\n key={kind}\n size=\"small\"\n />\n </Box>\n <Box sx={{ margin: '8px 0', height: '21px', overflow: 'hidden' }}>\n <Link\n to={link}\n underline=\"always\"\n style={{\n display: '-webkit-box',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: 1,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n fontSize: '0.9rem',\n fontWeight: '500',\n }}\n >\n {title}\n </Link>\n </Box>\n <Box\n sx={{\n padding: '8px 0',\n height: '90px',\n overflow: 'hidden',\n }}\n >\n <Typography\n variant=\"body2\"\n paragraph\n sx={{\n display: '-webkit-box',\n WebkitLineClamp: 4,\n WebkitBoxOrient: 'vertical',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n '& p': {\n margin: 'auto',\n },\n }}\n >\n <MarkdownContent content={description} />\n </Typography>\n </Box>\n </CardContent>\n </Card>\n );\n};\n\nexport default TemplateCard;\n"],"names":[],"mappings":";;;;;;;;AAiCA,MAAM,eAAsC,CAAC;AAAA,EAC3C,IAAA;AAAA,EACA,KAAA;AAAA,EACA,WAAA;AAAA,EACA;AACF,CAAM,KAAA;AACJ,EACE,uBAAA,GAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,SAAW,EAAA,CAAA;AAAA,MACX,EAAI,EAAA;AAAA,QACF,QAAQ,CAAS,KAAA,KAAA,CAAA,UAAA,EAAa,MAAM,OAAQ,CAAA,IAAA,CAAK,GAAG,CAAC,CAAA,CAAA;AAAA,QACrD,QAAU,EAAA,MAAA;AAAA,QACV,SAAW,EAAA;AAAA,OACb;AAAA,MAEA,QAAA,kBAAA,IAAA;AAAA,QAAC,WAAA;AAAA,QAAA;AAAA,UACC,EAAI,EAAA;AAAA,YACF,EAAI,EAAA,CAAA;AAAA,YACJ,cAAgB,EAAA;AAAA,cACd,EAAI,EAAA;AAAA,aACN;AAAA,YACA,eAAiB,EAAA;AAAA,WACnB;AAAA,UAEA,QAAA,EAAA;AAAA,4BAAA,GAAA,CAAC,GAAI,EAAA,EAAA,EAAA,EAAI,EAAE,OAAA,EAAS,SAClB,EAAA,QAAA,kBAAA,GAAA;AAAA,cAAC,IAAA;AAAA,cAAA;AAAA,gBACC,KAAA,kBACG,GAAA,CAAA,UAAA,EAAA,EAAW,EAAI,EAAA,EAAE,UAAU,QAAU,EAAA,UAAA,EAAY,GAAI,EAAA,EACnD,QACH,EAAA,IAAA,EAAA,CAA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