@red-hat-developer-hub/backstage-plugin-dynamic-home-page 1.4.2 → 1.5.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.
Files changed (58) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/components/CustomizableGrid.esm.js +7 -6
  3. package/dist/components/CustomizableGrid.esm.js.map +1 -1
  4. package/dist/components/CustomizableHomePage.esm.js +12 -8
  5. package/dist/components/CustomizableHomePage.esm.js.map +1 -1
  6. package/dist/components/DynamicCustomizableHomePage.esm.js +2 -2
  7. package/dist/components/DynamicCustomizableHomePage.esm.js.map +1 -1
  8. package/dist/components/DynamicHomePage.esm.js +2 -2
  9. package/dist/components/DynamicHomePage.esm.js.map +1 -1
  10. package/dist/components/EntitySection/EntityCard.esm.js +60 -58
  11. package/dist/components/EntitySection/EntityCard.esm.js.map +1 -1
  12. package/dist/components/EntitySection/EntitySection.esm.js +145 -122
  13. package/dist/components/EntitySection/EntitySection.esm.js.map +1 -1
  14. package/dist/components/EntitySection/TagList.esm.js +45 -43
  15. package/dist/components/EntitySection/TagList.esm.js.map +1 -1
  16. package/dist/components/EntitySection/ViewMoreLink.esm.js +2 -2
  17. package/dist/components/EntitySection/ViewMoreLink.esm.js.map +1 -1
  18. package/dist/components/FeaturedDocsCard.esm.js +2 -2
  19. package/dist/components/FeaturedDocsCard.esm.js.map +1 -1
  20. package/dist/components/Header.esm.js +18 -15
  21. package/dist/components/Header.esm.js.map +1 -1
  22. package/dist/components/Headline.esm.js +2 -2
  23. package/dist/components/Headline.esm.js.map +1 -1
  24. package/dist/components/HomePage.esm.js +12 -8
  25. package/dist/components/HomePage.esm.js.map +1 -1
  26. package/dist/components/LocalClock.esm.js +9 -8
  27. package/dist/components/LocalClock.esm.js.map +1 -1
  28. package/dist/components/Markdown.esm.js +12 -9
  29. package/dist/components/Markdown.esm.js.map +1 -1
  30. package/dist/components/MarkdownCard.esm.js +2 -2
  31. package/dist/components/MarkdownCard.esm.js.map +1 -1
  32. package/dist/components/OnboardingSection/OnboardingCard.esm.js +50 -44
  33. package/dist/components/OnboardingSection/OnboardingCard.esm.js.map +1 -1
  34. package/dist/components/OnboardingSection/OnboardingSection.esm.js +68 -62
  35. package/dist/components/OnboardingSection/OnboardingSection.esm.js.map +1 -1
  36. package/dist/components/Placeholder.esm.js +2 -2
  37. package/dist/components/Placeholder.esm.js.map +1 -1
  38. package/dist/components/QuickAccessCard.esm.js +14 -14
  39. package/dist/components/QuickAccessCard.esm.js.map +1 -1
  40. package/dist/components/ReadOnlyGrid.esm.js +18 -14
  41. package/dist/components/ReadOnlyGrid.esm.js.map +1 -1
  42. package/dist/components/SearchBar.esm.js +3 -2
  43. package/dist/components/SearchBar.esm.js.map +1 -1
  44. package/dist/components/TemplateSection/TemplateCard.esm.js +66 -64
  45. package/dist/components/TemplateSection/TemplateCard.esm.js.map +1 -1
  46. package/dist/components/TemplateSection/TemplateSection.esm.js +79 -63
  47. package/dist/components/TemplateSection/TemplateSection.esm.js.map +1 -1
  48. package/dist/components/TemplateSection/ViewMoreLink.esm.js +2 -2
  49. package/dist/components/TemplateSection/ViewMoreLink.esm.js.map +1 -1
  50. package/dist/components/VisitListener.esm.js +4 -3
  51. package/dist/components/VisitListener.esm.js.map +1 -1
  52. package/dist/components/WorldClock.esm.js +3 -3
  53. package/dist/components/WorldClock.esm.js.map +1 -1
  54. package/dist/hooks/useGreeting.esm.js +3 -3
  55. package/dist/hooks/useGreeting.esm.js.map +1 -1
  56. package/dist/index.d.ts +20 -19
  57. package/dist/plugin.esm.js.map +1 -1
  58. package/package.json +19 -19
@@ -1 +1 @@
1
- {"version":3,"file":"Header.esm.js","sources":["../../src/components/Header.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 { identityApiRef, useApi } from '@backstage/core-plugin-api';\nimport { Header as BackstageHeader } from '@backstage/core-components';\nimport { ClockConfig, HeaderWorldClock } from '@backstage/plugin-home';\n\nimport useAsync from 'react-use/esm/useAsync';\n\nimport { LocalClock, LocalClockProps } from './LocalClock';\n\nexport interface HeaderProps {\n title?: string;\n personalizedTitle?: string;\n pageTitle?: string;\n subtitle?: string;\n localClock?: LocalClockProps;\n worldClocks?: ClockConfig[];\n}\n\n// I kept this because I hope that we will add this soon or at least in Dynamic Home Page plugin 1.2 ~ RHDH 1.6.\n// const getTimeBasedTitle = (): string => {\n// const currentHour = new Date(Date.now()).getHours();\n// if (currentHour < 12) {\n// return 'Good morning {{firstName}}';\n// } else if (currentHour < 17) {\n// return 'Good afternoon {{firstName}}';\n// }\n// return 'Good evening {{firstName}}';\n// };\n\nexport const getPersonalizedTitle = (\n title: string,\n displayName: string | undefined,\n) => {\n const firstName = displayName?.split(' ')[0];\n const replacedTitle = title\n .replace('{{firstName}}', firstName ?? '')\n .replace('{{displayName}}', displayName ?? '');\n return replacedTitle;\n};\n\nexport const Header = (props: HeaderProps) => {\n const identityApi = useApi(identityApiRef);\n const { value: profile } = useAsync(() => identityApi.getProfileInfo());\n\n const title = React.useMemo<string>(() => {\n if (profile?.displayName && props.personalizedTitle) {\n return getPersonalizedTitle(props.personalizedTitle, profile.displayName);\n } else if (props.title) {\n return getPersonalizedTitle(props.title, profile?.displayName);\n }\n // return getPersonalizedTitle(getTimeBasedTitle(), profile?.displayName);\n return getPersonalizedTitle('Welcome back!', profile?.displayName);\n }, [profile?.displayName, props.personalizedTitle, props.title]);\n\n const subtitle = React.useMemo<string | undefined>(() => {\n return props.subtitle\n ? getPersonalizedTitle(props.subtitle, profile?.displayName)\n : undefined;\n }, [props.subtitle, profile?.displayName]);\n\n return (\n <BackstageHeader\n title={title}\n subtitle={subtitle}\n pageTitleOverride={props.pageTitle}\n >\n {props.localClock?.format && props.localClock?.format !== 'none' ? (\n <LocalClock\n label={\n props.localClock?.label ??\n (props.worldClocks && props.worldClocks.length > 0\n ? 'Local'\n : undefined)\n }\n format={\n props.localClock?.format ??\n (props.worldClocks && props.worldClocks.length > 0\n ? 'time'\n : undefined)\n }\n lang={props.localClock?.lang}\n />\n ) : null}\n\n {props.worldClocks && props.worldClocks.length > 0 ? (\n <HeaderWorldClock clockConfigs={props.worldClocks} />\n ) : null}\n </BackstageHeader>\n );\n};\n"],"names":["BackstageHeader"],"mappings":";;;;;;;AA8Ca,MAAA,oBAAA,GAAuB,CAClC,KAAA,EACA,WACG,KAAA;AACH,EAAA,MAAM,SAAY,GAAA,WAAA,EAAa,KAAM,CAAA,GAAG,EAAE,CAAC,CAAA;AAC3C,EAAM,MAAA,aAAA,GAAgB,KACnB,CAAA,OAAA,CAAQ,eAAiB,EAAA,SAAA,IAAa,EAAE,CACxC,CAAA,OAAA,CAAQ,iBAAmB,EAAA,WAAA,IAAe,EAAE,CAAA;AAC/C,EAAO,OAAA,aAAA;AACT;AAEa,MAAA,MAAA,GAAS,CAAC,KAAuB,KAAA;AAC5C,EAAM,MAAA,WAAA,GAAc,OAAO,cAAc,CAAA;AACzC,EAAM,MAAA,EAAE,OAAO,OAAQ,EAAA,GAAI,SAAS,MAAM,WAAA,CAAY,gBAAgB,CAAA;AAEtE,EAAM,MAAA,KAAA,GAAQ,KAAM,CAAA,OAAA,CAAgB,MAAM;AACxC,IAAI,IAAA,OAAA,EAAS,WAAe,IAAA,KAAA,CAAM,iBAAmB,EAAA;AACnD,MAAA,OAAO,oBAAqB,CAAA,KAAA,CAAM,iBAAmB,EAAA,OAAA,CAAQ,WAAW,CAAA;AAAA,KAC1E,MAAA,IAAW,MAAM,KAAO,EAAA;AACtB,MAAA,OAAO,oBAAqB,CAAA,KAA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AA,YAAA,EAAc,KAAM,CAAA,WAAA,EAAa,CACjD,GAAA;AAAA,GACN;AAEJ;;;;"}
1
+ {"version":3,"file":"Header.esm.js","sources":["../../src/components/Header.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 { useMemo } from 'react';\n\nimport { identityApiRef, useApi } from '@backstage/core-plugin-api';\nimport { Header as BackstageHeader } from '@backstage/core-components';\nimport { ClockConfig, HeaderWorldClock } from '@backstage/plugin-home';\n\nimport useAsync from 'react-use/esm/useAsync';\n\nimport { LocalClock, LocalClockProps } from './LocalClock';\n\nexport interface HeaderProps {\n title?: string;\n personalizedTitle?: string;\n pageTitle?: string;\n subtitle?: string;\n localClock?: LocalClockProps;\n worldClocks?: ClockConfig[];\n}\n\n// I kept this because I hope that we will add this soon or at least in Dynamic Home Page plugin 1.2 ~ RHDH 1.6.\n// const getTimeBasedTitle = (): string => {\n// const currentHour = new Date(Date.now()).getHours();\n// if (currentHour < 12) {\n// return 'Good morning {{firstName}}';\n// } else if (currentHour < 17) {\n// return 'Good afternoon {{firstName}}';\n// }\n// return 'Good evening {{firstName}}';\n// };\n\nexport const getPersonalizedTitle = (\n title: string,\n displayName: string | undefined,\n) => {\n const firstName = displayName?.split(' ')[0];\n const replacedTitle = title\n .replace('{{firstName}}', firstName ?? '')\n .replace('{{displayName}}', displayName ?? '');\n return replacedTitle;\n};\n\nexport const Header = (props: HeaderProps) => {\n const identityApi = useApi(identityApiRef);\n const { value: profile } = useAsync(() => identityApi.getProfileInfo());\n\n const title = useMemo<string>(() => {\n if (profile?.displayName && props.personalizedTitle) {\n return getPersonalizedTitle(props.personalizedTitle, profile.displayName);\n } else if (props.title) {\n return getPersonalizedTitle(props.title, profile?.displayName);\n }\n // return getPersonalizedTitle(getTimeBasedTitle(), profile?.displayName);\n return getPersonalizedTitle('Welcome back!', profile?.displayName);\n }, [profile?.displayName, props.personalizedTitle, props.title]);\n\n const subtitle = useMemo<string | undefined>(() => {\n return props.subtitle\n ? getPersonalizedTitle(props.subtitle, profile?.displayName)\n : undefined;\n }, [props.subtitle, profile?.displayName]);\n\n return (\n <BackstageHeader\n title={title}\n subtitle={subtitle}\n pageTitleOverride={props.pageTitle}\n >\n {props.localClock?.format && props.localClock?.format !== 'none' ? (\n <LocalClock\n label={\n props.localClock?.label ??\n (props.worldClocks && props.worldClocks.length > 0\n ? 'Local'\n : undefined)\n }\n format={\n props.localClock?.format ??\n (props.worldClocks && props.worldClocks.length > 0\n ? 'time'\n : undefined)\n }\n lang={props.localClock?.lang}\n />\n ) : null}\n\n {props.worldClocks && props.worldClocks.length > 0 ? (\n <HeaderWorldClock clockConfigs={props.worldClocks} />\n ) : null}\n </BackstageHeader>\n );\n};\n"],"names":["BackstageHeader"],"mappings":";;;;;;;;AA8Ca,MAAA,oBAAA,GAAuB,CAClC,KAAA,EACA,WACG,KAAA;AACH,EAAA,MAAM,SAAY,GAAA,WAAA,EAAa,KAAM,CAAA,GAAG,EAAE,CAAC,CAAA;AAC3C,EAAM,MAAA,aAAA,GAAgB,KACnB,CAAA,OAAA,CAAQ,eAAiB,EAAA,SAAA,IAAa,EAAE,CACxC,CAAA,OAAA,CAAQ,iBAAmB,EAAA,WAAA,IAAe,EAAE,CAAA;AAC/C,EAAO,OAAA,aAAA;AACT;AAEa,MAAA,MAAA,GAAS,CAAC,KAAuB,KAAA;AAC5C,EAAM,MAAA,WAAA,GAAc,OAAO,cAAc,CAAA;AACzC,EAAM,MAAA,EAAE,OAAO,OAAQ,EAAA,GAAI,SAAS,MAAM,WAAA,CAAY,gBAAgB,CAAA;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WAAA,CAAY,MAAS,GAAA,CAAA,GAC7C,MACA,GAAA,SAAA,CAAA;AAAA,YAEN,IAAA,EAAM,MAAM,UAAY,EAAA;AAAA;AAAA,SAExB,GAAA,IAAA;AAAA,QAEH,KAAA,CAAM,WAAe,IAAA,KAAA,CAAM,WAAY,CAAA,MAAA,GAAS,CAC/C,mBAAA,GAAA,CAAC,gBAAiB,EAAA,EAAA,YAAA,EAAc,KAAM,CAAA,WAAA,EAAa,CACjD,GAAA;AAAA;AAAA;AAAA,GACN;AAEJ;;;;"}
@@ -1,7 +1,7 @@
1
- import React from 'react';
1
+ import { jsx } from 'react/jsx-runtime';
2
2
 
3
3
  const Headline = (props) => {
4
- return /* @__PURE__ */ React.createElement("h1", { style: { textAlign: props.align } }, props.title);
4
+ return /* @__PURE__ */ jsx("h1", { style: { textAlign: props.align }, children: props.title });
5
5
  };
6
6
 
7
7
  export { Headline };
@@ -1 +1 @@
1
- {"version":3,"file":"Headline.esm.js","sources":["../../src/components/Headline.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\n/**\n * @public\n */\nexport interface HeadlineProps {\n title?: string;\n align?: 'left' | 'center' | 'right';\n}\n\n/**\n * @public\n */\nexport const Headline = (props: HeadlineProps) => {\n return <h1 style={{ textAlign: props.align }}>{props.title}</h1>;\n};\n"],"names":[],"mappings":";;AA6Ba,MAAA,QAAA,GAAW,CAAC,KAAyB,KAAA;AAChD,EAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,QAAG,KAAO,EAAA,EAAE,WAAW,KAAM,CAAA,KAAA,EAAU,EAAA,EAAA,KAAA,CAAM,KAAM,CAAA;AAC7D;;;;"}
1
+ {"version":3,"file":"Headline.esm.js","sources":["../../src/components/Headline.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/**\n * @public\n */\nexport interface HeadlineProps {\n title?: string;\n align?: 'left' | 'center' | 'right';\n}\n\n/**\n * @public\n */\nexport const Headline = (props: HeadlineProps) => {\n return <h1 style={{ textAlign: props.align }}>{props.title}</h1>;\n};\n"],"names":[],"mappings":";;AA2Ba,MAAA,QAAA,GAAW,CAAC,KAAyB,KAAA;AAChD,EAAO,uBAAA,GAAA,CAAC,QAAG,KAAO,EAAA,EAAE,WAAW,KAAM,CAAA,KAAA,EAAU,EAAA,QAAA,EAAA,KAAA,CAAM,KAAM,EAAA,CAAA;AAC7D;;;;"}
@@ -1,4 +1,5 @@
1
- import React, { useMemo } from 'react';
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { useMemo } from 'react';
2
3
  import { Page, Content, EmptyState } from '@backstage/core-components';
3
4
  import { Header } from './Header.esm.js';
4
5
  import { ReadOnlyGrid } from './ReadOnlyGrid.esm.js';
@@ -16,13 +17,16 @@ const HomePage = (props) => {
16
17
  );
17
18
  return filteredAndSorted;
18
19
  }, [props.cards]);
19
- return /* @__PURE__ */ React.createElement(Page, { themeId: "home" }, /* @__PURE__ */ React.createElement(Header, { ...props, title: "Welcome back!" }), /* @__PURE__ */ React.createElement(Content, null, filteredAndSortedHomePageCards.length === 0 ? /* @__PURE__ */ React.createElement(
20
- EmptyState,
21
- {
22
- title: "No home page cards (mount points) configured or found.",
23
- missing: "content"
24
- }
25
- ) : /* @__PURE__ */ React.createElement(ReadOnlyGrid, { mountPoints: filteredAndSortedHomePageCards })));
20
+ return /* @__PURE__ */ jsxs(Page, { themeId: "home", children: [
21
+ /* @__PURE__ */ jsx(Header, { ...props, title: "Welcome back!" }),
22
+ /* @__PURE__ */ jsx(Content, { children: filteredAndSortedHomePageCards.length === 0 ? /* @__PURE__ */ jsx(
23
+ EmptyState,
24
+ {
25
+ title: "No home page cards (mount points) configured or found.",
26
+ missing: "content"
27
+ }
28
+ ) : /* @__PURE__ */ jsx(ReadOnlyGrid, { mountPoints: filteredAndSortedHomePageCards }) })
29
+ ] });
26
30
  };
27
31
 
28
32
  export { HomePage };
@@ -1 +1 @@
1
- {"version":3,"file":"HomePage.esm.js","sources":["../../src/components/HomePage.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, { useMemo } from 'react';\n\nimport { Content, EmptyState, Page } from '@backstage/core-components';\n\nimport { HomePageCardMountPoint } from '../types';\n\nimport { Header, HeaderProps } from './Header';\nimport { ReadOnlyGrid } from './ReadOnlyGrid';\n\nexport interface HomePageProps extends HeaderProps {\n cards?: HomePageCardMountPoint[];\n}\n\nexport const HomePage = (props: HomePageProps) => {\n const filteredAndSortedHomePageCards = useMemo(() => {\n if (!props.cards) {\n return [];\n }\n\n const filteredAndSorted = props.cards.filter(\n card =>\n card.enabled !== false &&\n (!card.config?.priority || card.config.priority >= 0),\n );\n\n filteredAndSorted.sort(\n (a, b) => (b.config?.priority ?? 0) - (a.config?.priority ?? 0),\n );\n\n return filteredAndSorted;\n }, [props.cards]);\n\n return (\n <Page themeId=\"home\">\n <Header {...props} title=\"Welcome back!\" />\n <Content>\n {filteredAndSortedHomePageCards.length === 0 ? (\n <EmptyState\n title=\"No home page cards (mount points) configured or found.\"\n missing=\"content\"\n />\n ) : (\n <ReadOnlyGrid mountPoints={filteredAndSortedHomePageCards} />\n )}\n </Content>\n </Page>\n );\n};\n"],"names":[],"mappings":";;;;;AA6Ba,MAAA,QAAA,GAAW,CAAC,KAAyB,KAAA;AAChD,EAAM,MAAA,8BAAA,GAAiC,QAAQ,MAAM;AACnD,IAAI,IAAA,CAAC,MAAM,KAAO,EAAA;AAChB,MAAA,OAAO,EAAC;AAAA;AAGV,IAAM,MAAA,iBAAA,GAAoB,MAAM,KAAM,CAAA,MAAA;AAAA,MACpC,CAAA,IAAA,KACE,IAAK,CAAA,OAAA,KAAY,KAChB,KAAA,CAAC,KAAK,MAAQ,EAAA,QAAA,IAAY,IAAK,CAAA,MAAA,CAAO,QAAY,IAAA,CAAA;AAAA,KACvD;AAEA,IAAkB,iBAAA,CAAA,IAAA;AAAA,MAChB,CAAC,GAAG,CAAO,KAAA,CAAA,CAAA,CAAE,QAAQ,QAAY,IAAA,CAAA,KAAM,CAAE,CAAA,MAAA,EAAQ,QAAY,IAAA,CAAA;AAAA,KAC/D;AAEA,IAAO,OAAA,iBAAA;AAAA,GACN,EAAA,CAAC,KAAM,CAAA,KAAK,CAAC,CAAA;AAEhB,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,OAAQ,EAAA,MAAA,EAAA,sCACX,MAAQ,EAAA,EAAA,GAAG,KAAO,EAAA,KAAA,EAAM,iBAAgB,CACzC,kBAAA,KAAA,CAAA,aAAA,CAAC,OACE,EAAA,IAAA,EAAA,8BAAA,CAA+B,WAAW,CACzC,mBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,KAAM,EAAA,wDAAA;AAAA,MACN,OAAQ,EAAA;AAAA;AAAA,sBAGT,KAAA,CAAA,aAAA,CAAA,YAAA,EAAA,EAAa,WAAa,EAAA,8BAAA,EAAgC,CAE/D,CACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"HomePage.esm.js","sources":["../../src/components/HomePage.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 { useMemo } from 'react';\n\nimport { Content, EmptyState, Page } from '@backstage/core-components';\n\nimport { HomePageCardMountPoint } from '../types';\n\nimport { Header, HeaderProps } from './Header';\nimport { ReadOnlyGrid } from './ReadOnlyGrid';\n\nexport interface HomePageProps extends HeaderProps {\n cards?: HomePageCardMountPoint[];\n}\n\nexport const HomePage = (props: HomePageProps) => {\n const filteredAndSortedHomePageCards = useMemo(() => {\n if (!props.cards) {\n return [];\n }\n\n const filteredAndSorted = props.cards.filter(\n card =>\n card.enabled !== false &&\n (!card.config?.priority || card.config.priority >= 0),\n );\n\n filteredAndSorted.sort(\n (a, b) => (b.config?.priority ?? 0) - (a.config?.priority ?? 0),\n );\n\n return filteredAndSorted;\n }, [props.cards]);\n\n return (\n <Page themeId=\"home\">\n <Header {...props} title=\"Welcome back!\" />\n <Content>\n {filteredAndSortedHomePageCards.length === 0 ? (\n <EmptyState\n title=\"No home page cards (mount points) configured or found.\"\n missing=\"content\"\n />\n ) : (\n <ReadOnlyGrid mountPoints={filteredAndSortedHomePageCards} />\n )}\n </Content>\n </Page>\n );\n};\n"],"names":[],"mappings":";;;;;;AA6Ba,MAAA,QAAA,GAAW,CAAC,KAAyB,KAAA;AAChD,EAAM,MAAA,8BAAA,GAAiC,QAAQ,MAAM;AACnD,IAAI,IAAA,CAAC,MAAM,KAAO,EAAA;AAChB,MAAA,OAAO,EAAC;AAAA;AAGV,IAAM,MAAA,iBAAA,GAAoB,MAAM,KAAM,CAAA,MAAA;AAAA,MACpC,CAAA,IAAA,KACE,IAAK,CAAA,OAAA,KAAY,KAChB,KAAA,CAAC,KAAK,MAAQ,EAAA,QAAA,IAAY,IAAK,CAAA,MAAA,CAAO,QAAY,IAAA,CAAA;AAAA,KACvD;AAEA,IAAkB,iBAAA,CAAA,IAAA;AAAA,MAChB,CAAC,GAAG,CAAO,KAAA,CAAA,CAAA,CAAE,QAAQ,QAAY,IAAA,CAAA,KAAM,CAAE,CAAA,MAAA,EAAQ,QAAY,IAAA,CAAA;AAAA,KAC/D;AAEA,IAAO,OAAA,iBAAA;AAAA,GACN,EAAA,CAAC,KAAM,CAAA,KAAK,CAAC,CAAA;AAEhB,EACE,uBAAA,IAAA,CAAC,IAAK,EAAA,EAAA,OAAA,EAAQ,MACZ,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,MAAQ,EAAA,EAAA,GAAG,KAAO,EAAA,KAAA,EAAM,eAAgB,EAAA,CAAA;AAAA,oBACxC,GAAA,CAAA,OAAA,EAAA,EACE,QAA+B,EAAA,8BAAA,CAAA,MAAA,KAAW,CACzC,mBAAA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,KAAM,EAAA,wDAAA;AAAA,QACN,OAAQ,EAAA;AAAA;AAAA,KAGV,mBAAA,GAAA,CAAC,YAAa,EAAA,EAAA,WAAA,EAAa,gCAAgC,CAE/D,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
@@ -1,11 +1,12 @@
1
- import React from 'react';
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useState, useEffect } from 'react';
2
3
  import { HeaderLabel } from '@backstage/core-components';
3
4
 
4
5
  const LocalClock = (props) => {
5
6
  const format = props.format ?? "time";
6
7
  const lang = props.lang ?? window.navigator.language;
7
- const [time, setTime] = React.useState(() => /* @__PURE__ */ new Date());
8
- React.useEffect(() => {
8
+ const [time, setTime] = useState(() => /* @__PURE__ */ new Date());
9
+ useEffect(() => {
9
10
  if (format === "none") {
10
11
  return () => null;
11
12
  }
@@ -40,17 +41,17 @@ const LocalClock = (props) => {
40
41
  minute: "2-digit",
41
42
  hour12: false
42
43
  });
43
- return /* @__PURE__ */ React.createElement(
44
+ return /* @__PURE__ */ jsx(
44
45
  HeaderLabel,
45
46
  {
46
47
  label: props.label ?? "",
47
- value: /* @__PURE__ */ React.createElement(
48
+ value: /* @__PURE__ */ jsx(
48
49
  "time",
49
50
  {
50
51
  dateTime,
51
- style: props.label ? {} : { fontSize: "20px", fontWeight: "bold" }
52
- },
53
- value
52
+ style: props.label ? {} : { fontSize: "20px", fontWeight: "bold" },
53
+ children: value
54
+ }
54
55
  )
55
56
  }
56
57
  );
@@ -1 +1 @@
1
- {"version":3,"file":"LocalClock.esm.js","sources":["../../src/components/LocalClock.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 { HeaderLabel } from '@backstage/core-components';\n\n/**\n * @public\n */\nexport interface LocalClockProps {\n label?: string;\n format?:\n | 'none'\n | 'full'\n | 'date'\n | 'datewithweekday'\n | 'time'\n | 'timewithseconds'\n | 'both';\n lang?: string;\n}\n\n/**\n * @public\n */\nexport const LocalClock = (props: LocalClockProps) => {\n const format = props.format ?? 'time';\n const lang = props.lang ?? window.navigator.language;\n\n const [time, setTime] = React.useState(() => new Date());\n\n // Could be optimized to only update the time when needed, but it's aligned with\n // https://github.com/backstage/backstage/blob/master/plugins/home/src/homePageComponents/HeaderWorldClock/HeaderWorldClock.tsx for now\n React.useEffect(() => {\n if (format === 'none') {\n return () => null;\n }\n const intervalId = setInterval(() => setTime(new Date()), 1000);\n return () => clearInterval(intervalId);\n }, [format]);\n\n if (format === 'none') {\n return null;\n }\n\n try {\n const includeDate =\n format === 'full' ||\n format === 'date' ||\n format === 'datewithweekday' ||\n format === 'both';\n const includeTime =\n format === 'full' ||\n format === 'time' ||\n format === 'timewithseconds' ||\n format === 'both';\n\n const value =\n format === 'date' || format === 'datewithweekday'\n ? time.toLocaleDateString(lang, {\n weekday: format === 'datewithweekday' ? 'long' : undefined,\n day: '2-digit',\n month: '2-digit',\n year: 'numeric',\n })\n : time.toLocaleTimeString(lang, {\n weekday: format === 'full' ? 'long' : undefined,\n day: includeDate ? '2-digit' : undefined,\n month: includeDate ? '2-digit' : undefined,\n year: includeDate ? 'numeric' : undefined,\n hour: includeTime ? '2-digit' : undefined,\n minute: includeTime ? '2-digit' : undefined,\n second: format === 'timewithseconds' ? '2-digit' : undefined,\n });\n const dateTime = time.toLocaleTimeString(lang, {\n day: '2-digit',\n month: '2-digit',\n year: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n hour12: false,\n });\n\n return (\n <HeaderLabel\n label={props.label ?? ''}\n value={\n <time\n dateTime={dateTime}\n style={props.label ? {} : { fontSize: '20px', fontWeight: 'bold' }}\n >\n {value}\n </time>\n }\n />\n );\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn('Failed to render clock', e);\n return null;\n }\n};\n"],"names":[],"mappings":";;;AAuCa,MAAA,UAAA,GAAa,CAAC,KAA2B,KAAA;AACpD,EAAM,MAAA,MAAA,GAAS,MAAM,MAAU,IAAA,MAAA;AAC/B,EAAA,MAAM,IAAO,GAAA,KAAA,CAAM,IAAQ,IAAA,MAAA,CAAO,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AAA;AAAA,MAChC,IAAA,EAAM,cAAc,SAAY,GAAA,KAAA,CAAA;AAAA,MAChC,MAAA,EAAQ,cAAc,SAAY,GAAA,KAAA,CAAA;AAAA,MAClC,MAAA,EAAQ,MAAW,KAAA,iBAAA,GAAoB,SAAY,GAAA,KAAA;AAAA,KACpD,CAAA;AACP,IAAM,MAAA,QAAA,GAAW,IAAK,CAAA,kBAAA,CAAmB,IAAM,EAAA;AAAA,MAC7C,GAAK,EAAA,SAAA;AAAA,MACL,KAAO,EAAA,SAAA;AAAA,MACP,IAAM,EAAA,SAAA;AAAA,MACN,IAAM,EAAA,SAAA;AAAA,MACN,MAAQ,EAAA,SAAA;AAAA,MACR,MAAQ,EAAA;AAAA,KACT,CAAA;AAED,IACE,uBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,WAAA;AAAA,MAAA;AAAA,QACC,KAAA,EAAO,MAAM,KAAS,IAAA,EAAA;AAAA,QACtB,KACE,kBAAA,KAAA,CAAA,aAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,QAAA;AAAA,YACA,KAAA,EAAO,MAAM,KAAQ,GAAA,KAAK,EAAE,QAAA,EAAU,MAAQ,EAAA,UAAA,EAAY,MAAO;AAAA,WAAA;AAAA,UAEhE;AAAA;AACH;AAAA,KAEJ;AAAA,WAEK,CAAG,EAAA;AAEV,IAAQ,OAAA,CAAA,IAAA,CAAK,0BAA0B,CAAC,CAAA;AACxC,IAAO,OAAA,IAAA;AAAA;AAEX;;;;"}
1
+ {"version":3,"file":"LocalClock.esm.js","sources":["../../src/components/LocalClock.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 { useState, useEffect } from 'react';\n\nimport { HeaderLabel } from '@backstage/core-components';\n\n/**\n * @public\n */\nexport interface LocalClockProps {\n label?: string;\n format?:\n | 'none'\n | 'full'\n | 'date'\n | 'datewithweekday'\n | 'time'\n | 'timewithseconds'\n | 'both';\n lang?: string;\n}\n\n/**\n * @public\n */\nexport const LocalClock = (props: LocalClockProps) => {\n const format = props.format ?? 'time';\n const lang = props.lang ?? window.navigator.language;\n\n const [time, setTime] = useState(() => new Date());\n\n // Could be optimized to only update the time when needed, but it's aligned with\n // https://github.com/backstage/backstage/blob/master/plugins/home/src/homePageComponents/HeaderWorldClock/HeaderWorldClock.tsx for now\n useEffect(() => {\n if (format === 'none') {\n return () => null;\n }\n const intervalId = setInterval(() => setTime(new Date()), 1000);\n return () => clearInterval(intervalId);\n }, [format]);\n\n if (format === 'none') {\n return null;\n }\n\n try {\n const includeDate =\n format === 'full' ||\n format === 'date' ||\n format === 'datewithweekday' ||\n format === 'both';\n const includeTime =\n format === 'full' ||\n format === 'time' ||\n format === 'timewithseconds' ||\n format === 'both';\n\n const value =\n format === 'date' || format === 'datewithweekday'\n ? time.toLocaleDateString(lang, {\n weekday: format === 'datewithweekday' ? 'long' : undefined,\n day: '2-digit',\n month: '2-digit',\n year: 'numeric',\n })\n : time.toLocaleTimeString(lang, {\n weekday: format === 'full' ? 'long' : undefined,\n day: includeDate ? '2-digit' : undefined,\n month: includeDate ? '2-digit' : undefined,\n year: includeDate ? 'numeric' : undefined,\n hour: includeTime ? '2-digit' : undefined,\n minute: includeTime ? '2-digit' : undefined,\n second: format === 'timewithseconds' ? '2-digit' : undefined,\n });\n const dateTime = time.toLocaleTimeString(lang, {\n day: '2-digit',\n month: '2-digit',\n year: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n hour12: false,\n });\n\n return (\n <HeaderLabel\n label={props.label ?? ''}\n value={\n <time\n dateTime={dateTime}\n style={props.label ? {} : { fontSize: '20px', fontWeight: 'bold' }}\n >\n {value}\n </time>\n }\n />\n );\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn('Failed to render clock', e);\n return null;\n }\n};\n"],"names":[],"mappings":";;;;AAuCa,MAAA,UAAA,GAAa,CAAC,KAA2B,KAAA;AACpD,EAAM,MAAA,MAAA,GAAS,MAAM,MAAU,IAAA,MAAA;AAC/B,EAAA,MAAM,IAAO,GAAA,KAAA,CAAM,IAAQ,IAAA,MAAA,CAAO,SAAU,CAAA,QAAA;AAE5C,EAAM,MAAA,CAAC,MAAM,OAAO,CAAA,GAAI,SAAS,sBAAM,IAAI,MAAM,CAAA;AAIjD,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,WAAW,MAAQ,EAAA;AACrB,MAAA,OAAO,MAAM,IAAA;AAAA;AAEf,IAAM,MAAA,UAAA,GAAa,YAAY,MAAM,OAAA,qBAAY,IAAK,EAAC,GAAG,GAAI,CAAA;AAC9D,IAAO,OAAA,MAAM,cAAc,UAAU,CAAA;AAAA,GACvC,EAAG,CAAC,MAAM,CAAC,CAAA;AAEX,EAAA,IAAI,WAAW,MAAQ,EAAA;AACrB,IAAO,OAAA,IAAA;AAAA;AAGT,EAAI,IAAA;AACF,IAAA,MAAM,cACJ,MAAW,KAAA,MAAA,IACX,WAAW,MACX,IAAA,MAAA,KAAW,qBACX,MAAW,KAAA,MAAA;AACb,IAAA,MAAM,cACJ,MAAW,KAAA,MAAA,IACX,WAAW,MACX,IAAA,MAAA,KAAW,qBACX,MAAW,KAAA,MAAA;AAEb,IAAA,MAAM,QACJ,MAAW,KAAA,MAAA,IAAU,WAAW,iBAC5B,GAAA,IAAA,CAAK,mBAAmB,IAAM,EAAA;AAAA,MAC5B,OAAA,EAAS,MAAW,KAAA,iBAAA,GAAoB,MAAS,GAAA,KAAA,CAAA;AAAA,MACjD,GAAK,EAAA,SAAA;AAAA,MACL,KAAO,EAAA,SAAA;AAAA,MACP,IAAM,EAAA;AAAA,K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'react';
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { MarkdownContent } from '@backstage/core-components';
3
3
  import { makeStyles } from 'tss-react/mui';
4
4
 
@@ -16,14 +16,17 @@ const useStyles = makeStyles()({
16
16
  });
17
17
  const Markdown = (props) => {
18
18
  const { classes } = useStyles();
19
- return /* @__PURE__ */ React.createElement("div", { className: classes.card }, props.title ? /* @__PURE__ */ React.createElement("h1", null, props.title) : null, /* @__PURE__ */ React.createElement(
20
- MarkdownContent,
21
- {
22
- dialect: "gfm",
23
- content: props.content ?? "",
24
- className: classes.content
25
- }
26
- ));
19
+ return /* @__PURE__ */ jsxs("div", { className: classes.card, children: [
20
+ props.title ? /* @__PURE__ */ jsx("h1", { children: props.title }) : null,
21
+ /* @__PURE__ */ jsx(
22
+ MarkdownContent,
23
+ {
24
+ dialect: "gfm",
25
+ content: props.content ?? "",
26
+ className: classes.content
27
+ }
28
+ )
29
+ ] });
27
30
  };
28
31
 
29
32
  export { Markdown };
@@ -1 +1 @@
1
- {"version":3,"file":"Markdown.esm.js","sources":["../../src/components/Markdown.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 { MarkdownContent } from '@backstage/core-components';\n\nimport { makeStyles } from 'tss-react/mui';\n\n/**\n * @public\n */\nexport interface MarkdownProps {\n title?: string;\n content?: string;\n}\n\nconst useStyles = makeStyles()({\n // Make card content scrollable (so that cards don't overlap)\n card: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n height: '100%',\n },\n content: {\n overflow: 'auto',\n },\n});\n\n/**\n * @public\n */\nexport const Markdown = (props: MarkdownProps) => {\n const { classes } = useStyles();\n return (\n <div className={classes.card}>\n {props.title ? <h1>{props.title}</h1> : null}\n <MarkdownContent\n dialect=\"gfm\"\n content={props.content ?? ''}\n className={classes.content}\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;AA8BA,MAAM,SAAA,GAAY,YAAa,CAAA;AAAA;AAAA,EAE7B,IAAM,EAAA;AAAA,IACJ,OAAS,EAAA,MAAA;AAAA,IACT,aAAe,EAAA,QAAA;AAAA,IACf,KAAO,EAAA,MAAA;AAAA,IACP,MAAQ,EAAA;AAAA,GACV;AAAA,EACA,OAAS,EAAA;AAAA,IACP,QAAU,EAAA;AAAA;AAEd,CAAC,CAAA;AAKY,MAAA,QAAA,GAAW,CAAC,KAAyB,KAAA;AAChD,EAAM,MAAA,EAAE,OAAQ,EAAA,GAAI,SAAU,EAAA;AAC9B,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAI,SAAW,EAAA,OAAA,CAAQ,IACrB,EAAA,EAAA,KAAA,CAAM,KAAQ,mBAAA,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,IAAA,EAAA,KAAA,CAAM,KAAM,CAAA,GAAQ,IACxC,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,eAAA;AAAA,IAAA;AAAA,MACC,OAAQ,EAAA,KAAA;AAAA,MACR,OAAA,EAAS,MAAM,OAAW,IAAA,EAAA;AAAA,MAC1B,WAAW,OAAQ,CAAA;AAAA;AAAA,GAEvB,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Markdown.esm.js","sources":["../../src/components/Markdown.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 { MarkdownContent } from '@backstage/core-components';\n\nimport { makeStyles } from 'tss-react/mui';\n\n/**\n * @public\n */\nexport interface MarkdownProps {\n title?: string;\n content?: string;\n}\n\nconst useStyles = makeStyles()({\n // Make card content scrollable (so that cards don't overlap)\n card: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n height: '100%',\n },\n content: {\n overflow: 'auto',\n },\n});\n\n/**\n * @public\n */\nexport const Markdown = (props: MarkdownProps) => {\n const { classes } = useStyles();\n return (\n <div className={classes.card}>\n {props.title ? <h1>{props.title}</h1> : null}\n <MarkdownContent\n dialect=\"gfm\"\n content={props.content ?? ''}\n className={classes.content}\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;AA4BA,MAAM,SAAA,GAAY,YAAa,CAAA;AAAA;AAAA,EAE7B,IAAM,EAAA;AAAA,IACJ,OAAS,EAAA,MAAA;AAAA,IACT,aAAe,EAAA,QAAA;AAAA,IACf,KAAO,EAAA,MAAA;AAAA,IACP,MAAQ,EAAA;AAAA,GACV;AAAA,EACA,OAAS,EAAA;AAAA,IACP,QAAU,EAAA;AAAA;AAEd,CAAC,CAAA;AAKY,MAAA,QAAA,GAAW,CAAC,KAAyB,KAAA;AAChD,EAAM,MAAA,EAAE,OAAQ,EAAA,GAAI,SAAU,EAAA;AAC9B,EAAA,uBACG,IAAA,CAAA,KAAA,EAAA,EAAI,SAAW,EAAA,OAAA,CAAQ,IACrB,EAAA,QAAA,EAAA;AAAA,IAAA,KAAA,CAAM,KAAQ,mBAAA,GAAA,CAAC,IAAI,EAAA,EAAA,QAAA,EAAA,KAAA,CAAM,OAAM,CAAQ,GAAA,IAAA;AAAA,oBACxC,GAAA;AAAA,MAAC,eAAA;AAAA,MAAA;AAAA,QACC,OAAQ,EAAA,KAAA;AAAA,QACR,OAAA,EAAS,MAAM,OAAW,IAAA,EAAA;AAAA,QAC1B,WAAW,OAAQ,CAAA;AAAA;AAAA;AACrB,GACF,EAAA,CAAA;AAEJ;;;;"}
@@ -1,8 +1,8 @@
1
- import React from 'react';
1
+ import { jsx } from 'react/jsx-runtime';
2
2
  import { InfoCard, MarkdownContent } from '@backstage/core-components';
3
3
 
4
4
  const MarkdownCard = (props) => {
5
- return /* @__PURE__ */ React.createElement(InfoCard, { title: props.title }, /* @__PURE__ */ React.createElement(MarkdownContent, { dialect: "gfm", content: props.content ?? "" }));
5
+ return /* @__PURE__ */ jsx(InfoCard, { title: props.title, children: /* @__PURE__ */ jsx(MarkdownContent, { dialect: "gfm", content: props.content ?? "" }) });
6
6
  };
7
7
 
8
8
  export { MarkdownCard };
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownCard.esm.js","sources":["../../src/components/MarkdownCard.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 { InfoCard, MarkdownContent } from '@backstage/core-components';\n\n/**\n * @public\n */\nexport interface MarkdownCardProps {\n title?: string;\n content?: string;\n}\n\n/**\n * @public\n */\nexport const MarkdownCard = (props: MarkdownCardProps) => {\n return (\n <InfoCard title={props.title}>\n <MarkdownContent dialect=\"gfm\" content={props.content ?? ''} />\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;AA+Ba,MAAA,YAAA,GAAe,CAAC,KAA6B,KAAA;AACxD,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,KAAO,EAAA,KAAA,CAAM,KACrB,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,eAAgB,EAAA,EAAA,OAAA,EAAQ,KAAM,EAAA,OAAA,EAAS,KAAM,CAAA,OAAA,IAAW,IAAI,CAC/D,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"MarkdownCard.esm.js","sources":["../../src/components/MarkdownCard.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 { InfoCard, MarkdownContent } from '@backstage/core-components';\n\n/**\n * @public\n */\nexport interface MarkdownCardProps {\n title?: string;\n content?: string;\n}\n\n/**\n * @public\n */\nexport const MarkdownCard = (props: MarkdownCardProps) => {\n return (\n <InfoCard title={props.title}>\n <MarkdownContent dialect=\"gfm\" content={props.content ?? ''} />\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;AA6Ba,MAAA,YAAA,GAAe,CAAC,KAA6B,KAAA;AACxD,EAAA,uBACG,GAAA,CAAA,QAAA,EAAA,EAAS,KAAO,EAAA,KAAA,CAAM,KACrB,EAAA,QAAA,kBAAA,GAAA,CAAC,eAAgB,EAAA,EAAA,OAAA,EAAQ,KAAM,EAAA,OAAA,EAAS,KAAM,CAAA,OAAA,IAAW,IAAI,CAC/D,EAAA,CAAA;AAEJ;;;;"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { Link } from 'react-router-dom';
3
3
  import Box from '@mui/material/Box';
4
4
  import CardContent from '@mui/material/CardContent';
@@ -14,52 +14,58 @@ const OnboardingCard = ({
14
14
  target,
15
15
  ariaLabel
16
16
  }) => {
17
- return /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(CardContent, { sx: { backgroundColor: "transparent" } }, /* @__PURE__ */ React.createElement(
18
- Typography,
19
- {
20
- sx: {
21
- fontSize: "1.75rem",
22
- fontWeight: 500,
23
- m: 0
17
+ return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(CardContent, { sx: { backgroundColor: "transparent" }, children: [
18
+ /* @__PURE__ */ jsx(
19
+ Typography,
20
+ {
21
+ sx: {
22
+ fontSize: "1.75rem",
23
+ fontWeight: 500,
24
+ m: 0
25
+ },
26
+ children: title
24
27
  }
25
- },
26
- title
27
- ), /* @__PURE__ */ React.createElement(
28
- Typography,
29
- {
30
- sx: {
31
- fontSize: "1rem",
32
- fontWeight: 500,
33
- p: "16px",
34
- pt: "8px",
35
- pl: "0px",
36
- display: "-webkit-box",
37
- webkitBoxOrient: "vertical",
38
- width: "240px",
39
- webkitLineClamp: 2,
40
- overflow: "hidden",
41
- textOverflow: "ellipsis"
28
+ ),
29
+ /* @__PURE__ */ jsx(
30
+ Typography,
31
+ {
32
+ sx: {
33
+ fontSize: "1rem",
34
+ fontWeight: 500,
35
+ p: "16px",
36
+ pt: "8px",
37
+ pl: "0px",
38
+ display: "-webkit-box",
39
+ webkitBoxOrient: "vertical",
40
+ width: "240px",
41
+ webkitLineClamp: 2,
42
+ overflow: "hidden",
43
+ textOverflow: "ellipsis"
44
+ },
45
+ children: description
42
46
  }
43
- },
44
- description
45
- ), /* @__PURE__ */ React.createElement(
46
- Button,
47
- {
48
- component: Link,
49
- variant: "outlined",
50
- color: "primary",
51
- to: buttonLink,
52
- target,
53
- "aria-label": ariaLabel,
54
- sx: {
55
- padding: (theme) => theme.spacing(1, 1.5),
56
- fontSize: "16px"
47
+ ),
48
+ /* @__PURE__ */ jsxs(
49
+ Button,
50
+ {
51
+ component: Link,
52
+ variant: "outlined",
53
+ color: "primary",
54
+ to: buttonLink,
55
+ target,
56
+ "aria-label": ariaLabel,
57
+ sx: {
58
+ padding: (theme) => theme.spacing(1, 1.5),
59
+ fontSize: "16px"
60
+ },
61
+ children: [
62
+ buttonText,
63
+ " ",
64
+ /* @__PURE__ */ jsx(ArrowForwardIcon, { style: { paddingLeft: "0.5rem" } })
65
+ ]
57
66
  }
58
- },
59
- buttonText,
60
- " ",
61
- /* @__PURE__ */ React.createElement(ArrowForwardIcon, { style: { paddingLeft: "0.5rem" } })
62
- )));
67
+ )
68
+ ] }) });
63
69
  };
64
70
 
65
71
  export { OnboardingCard as default };
@@ -1 +1 @@
1
- {"version":3,"file":"OnboardingCard.esm.js","sources":["../../../src/components/OnboardingSection/OnboardingCard.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';\nimport { Link as RouterLink } from 'react-router-dom';\n\nimport Box from '@mui/material/Box';\nimport CardContent from '@mui/material/CardContent';\nimport ArrowForwardIcon from '@mui/icons-material/ArrowForward';\nimport Button from '@mui/material/Button';\nimport Typography from '@mui/material/Typography';\n\ninterface OnboardingCardProps {\n title: string;\n description: string;\n buttonText: string;\n buttonLink: string;\n target?: string;\n ariaLabel?: string;\n}\n\nconst OnboardingCard: React.FC<OnboardingCardProps> = ({\n title,\n description,\n buttonText,\n buttonLink,\n target,\n ariaLabel,\n}) => {\n return (\n <Box>\n <CardContent sx={{ backgroundColor: 'transparent' }}>\n <Typography\n sx={{\n fontSize: '1.75rem',\n fontWeight: 500,\n m: 0,\n }}\n >\n {title}\n </Typography>\n <Typography\n sx={{\n fontSize: '1rem',\n fontWeight: 500,\n p: '16px',\n pt: '8px',\n pl: '0px',\n display: '-webkit-box',\n webkitBoxOrient: 'vertical',\n width: '240px',\n webkitLineClamp: 2,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n }}\n >\n {description}\n </Typography>\n <Button\n component={RouterLink}\n variant=\"outlined\"\n color=\"primary\"\n to={buttonLink}\n target={target}\n aria-label={ariaLabel}\n sx={{\n padding: theme => theme.spacing(1, 1.5),\n fontSize: '16px',\n }}\n >\n {buttonText} <ArrowForwardIcon style={{ paddingLeft: '0.5rem' }} />\n </Button>\n </CardContent>\n </Box>\n );\n};\n\nexport default OnboardingCard;\n"],"names":["RouterLink"],"mappings":";;;;;;;;AAiCA,MAAM,iBAAgD,CAAC;AAAA,EACrD,KAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF,CAAM,KAAA;AACJ,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,2BACE,KAAA,CAAA,aAAA,CAAA,WAAA,EAAA,EAAY,IAAI,EAAE,eAAA,EAAiB,eAClC,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,EAAI,EAAA;AAAA,QACF,QAAU,EAAA,SAAA;AAAA,QACV,UAAY,EAAA,GAAA;AAAA,QACZ,CAAG,EAAA;AAAA;AACL,KAAA;AAAA,IAEC;AAAA,GAEH,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,EAAI,EAAA;AAAA,QACF,QAAU,EAAA,MAAA;AAAA,QACV,UAAY,EAAA,GAAA;AAAA,QACZ,CAAG,EAAA,MAAA;AAAA,QACH,EAAI,EAAA,KAAA;AAAA,QACJ,EAAI,EAAA,KAAA;AAAA,QACJ,OAAS,EAAA,aAAA;AAAA,QACT,eAAiB,EAAA,UAAA;AAAA,QACjB,KAAO,EAAA,OAAA;AAAA,QACP,eAAiB,EAAA,CAAA;AAAA,QACjB,QAAU,EAAA,QAAA;AAAA,QACV,YAAc,EAAA;AAAA;AAChB,KAAA;AAAA,IAEC;AAAA,GAEH,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,SAAW,EAAAA,IAAA;AAAA,MACX,OAAQ,EAAA,UAAA;AAAA,MACR,KAAM,EAAA,SAAA;AAAA,MACN,EAAI,EAAA,UAAA;AAAA,MACJ,MAAA;AAAA,MACA,YAAY,EAAA,SAAA;AAAA,MACZ,EAAI,EAAA;AAAA,QACF,OAAS,EAAA,CAAA,KAAA,KAAS,KAAM,CAAA,OAAA,CAAQ,GAAG,GAAG,CAAA;AAAA,QACtC,QAAU,EAAA;AAAA;AACZ,KAAA;AAAA,IAEC,UAAA;AAAA,IAAW,GAAA;AAAA,wCAAE,gBAAiB,EAAA,EAAA,KAAA,EAAO,EAAE,WAAA,EAAa,UAAY,EAAA;AAAA,GAErE,CACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"OnboardingCard.esm.js","sources":["../../../src/components/OnboardingSection/OnboardingCard.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';\nimport { Link as RouterLink } from 'react-router-dom';\n\nimport Box from '@mui/material/Box';\nimport CardContent from '@mui/material/CardContent';\nimport ArrowForwardIcon from '@mui/icons-material/ArrowForward';\nimport Button from '@mui/material/Button';\nimport Typography from '@mui/material/Typography';\n\ninterface OnboardingCardProps {\n title: string;\n description: string;\n buttonText: string;\n buttonLink: string;\n target?: string;\n ariaLabel?: string;\n}\n\nconst OnboardingCard: FC<OnboardingCardProps> = ({\n title,\n description,\n buttonText,\n buttonLink,\n target,\n ariaLabel,\n}) => {\n return (\n <Box>\n <CardContent sx={{ backgroundColor: 'transparent' }}>\n <Typography\n sx={{\n fontSize: '1.75rem',\n fontWeight: 500,\n m: 0,\n }}\n >\n {title}\n </Typography>\n <Typography\n sx={{\n fontSize: '1rem',\n fontWeight: 500,\n p: '16px',\n pt: '8px',\n pl: '0px',\n display: '-webkit-box',\n webkitBoxOrient: 'vertical',\n width: '240px',\n webkitLineClamp: 2,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n }}\n >\n {description}\n </Typography>\n <Button\n component={RouterLink}\n variant=\"outlined\"\n color=\"primary\"\n to={buttonLink}\n target={target}\n aria-label={ariaLabel}\n sx={{\n padding: theme => theme.spacing(1, 1.5),\n fontSize: '16px',\n }}\n >\n {buttonText} <ArrowForwardIcon style={{ paddingLeft: '0.5rem' }} />\n </Button>\n </CardContent>\n </Box>\n );\n};\n\nexport default OnboardingCard;\n"],"names":["RouterLink"],"mappings":";;;;;;;;AAiCA,MAAM,iBAA0C,CAAC;AAAA,EAC/C,KAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF,CAAM,KAAA;AACJ,EACE,uBAAA,GAAA,CAAC,OACC,QAAC,kBAAA,IAAA,CAAA,WAAA,EAAA,EAAY,IAAI,EAAE,eAAA,EAAiB,eAClC,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,EAAI,EAAA;AAAA,UACF,QAAU,EAAA,SAAA;AAAA,UACV,UAAY,EAAA,GAAA;AAAA,UACZ,CAAG,EAAA;AAAA,SACL;AAAA,QAEC,QAAA,EAAA;AAAA;AAAA,KACH;AAAA,oBACA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,EAAI,EAAA;AAAA,UACF,QAAU,EAAA,MAAA;AAAA,UACV,UAAY,EAAA,GAAA;AAAA,UACZ,CAAG,EAAA,MAAA;AAAA,UACH,EAAI,EAAA,KAAA;AAAA,UACJ,EAAI,EAAA,KAAA;AAAA,UACJ,OAAS,EAAA,aAAA;AAAA,UACT,eAAiB,EAAA,UAAA;AAAA,UACjB,KAAO,EAAA,OAAA;AAAA,UACP,eAAiB,EAAA,CAAA;AAAA,UACjB,QAAU,EAAA,QAAA;AAAA,UACV,YAAc,EAAA;AAAA,SAChB;AAAA,QAEC,QAAA,EAAA;AAAA;AAAA,KACH;AAAA,oBACA,IAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,SAAW,EAAAA,IAAA;AAAA,QACX,OAAQ,EAAA,UAAA;AAAA,QACR,KAAM,EAAA,SAAA;AAAA,QACN,EAAI,EAAA,UAAA;AAAA,QACJ,MAAA;AAAA,QACA,YAAY,EAAA,SAAA;AAAA,QACZ,EAAI,EAAA;AAAA,UACF,OAAS,EAAA,CAAA,KAAA,KAAS,KAAM,CAAA,OAAA,CAAQ,GAAG,GAAG,CAAA;AAAA,UACtC,QAAU,EAAA;AAAA,SACZ;AAAA,QAEC,QAAA,EAAA;AAAA,UAAA,UAAA;AAAA,UAAW,GAAA;AAAA,8BAAE,gBAAiB,EAAA,EAAA,KAAA,EAAO,EAAE,WAAA,EAAa,UAAY,EAAA;AAAA;AAAA;AAAA;AACnE,GAAA,EACF,CACF,EAAA,CAAA;AAEJ;;;;"}
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { useState, useEffect } from 'react';
2
3
  import { useUserProfile } from '@backstage/plugin-user-settings';
3
4
  import { useApi } from '@backstage/core-plugin-api';
4
5
  import { catalogApiRef } from '@backstage/plugin-catalog-react';
@@ -14,7 +15,7 @@ import { LEARNING_SECTION_ITEMS } from '../../utils/constants.esm.js';
14
15
  import useGreeting from '../../hooks/useGreeting.esm.js';
15
16
 
16
17
  const OnboardingSection = () => {
17
- const [user, setUser] = React.useState();
18
+ const [user, setUser] = useState();
18
19
  const theme = useTheme();
19
20
  const isDarkMode = theme.palette.mode === "dark";
20
21
  const greeting = useGreeting();
@@ -24,7 +25,7 @@ const OnboardingSection = () => {
24
25
  loading: profileLoading
25
26
  } = useUserProfile();
26
27
  const catalogApi = useApi(catalogApiRef);
27
- React.useEffect(() => {
28
+ useEffect(() => {
28
29
  const fetchUserEntity = async () => {
29
30
  if (!backstageIdentity?.userEntityRef) {
30
31
  return;
@@ -50,53 +51,56 @@ const OnboardingSection = () => {
50
51
  }
51
52
  return name;
52
53
  };
53
- const content = /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(Grid, { container: true, margin: "auto" }, /* @__PURE__ */ React.createElement(
54
- Grid,
55
- {
56
- item: true,
57
- xs: 12,
58
- md: 6,
59
- lg: 3,
60
- display: "flex",
61
- justifyContent: "left",
62
- alignItems: "center"
63
- },
64
- /* @__PURE__ */ React.createElement(
65
- Box,
54
+ const content = /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Grid, { container: true, margin: "auto", children: [
55
+ /* @__PURE__ */ jsx(
56
+ Grid,
66
57
  {
67
- component: "img",
68
- src: isDarkMode ? HomePageIllustrationDark : HomePageIllustrationLight,
69
- alt: "",
70
- sx: {
71
- width: "clamp(200px, 20vw, 264px)"
72
- }
58
+ item: true,
59
+ xs: 12,
60
+ md: 6,
61
+ lg: 3,
62
+ display: "flex",
63
+ justifyContent: "left",
64
+ alignItems: "center",
65
+ children: /* @__PURE__ */ jsx(
66
+ Box,
67
+ {
68
+ component: "img",
69
+ src: isDarkMode ? HomePageIllustrationDark : HomePageIllustrationLight,
70
+ alt: "",
71
+ sx: {
72
+ width: "clamp(200px, 20vw, 264px)"
73
+ }
74
+ }
75
+ )
73
76
  }
74
- )
75
- ), LEARNING_SECTION_ITEMS.map((item) => /* @__PURE__ */ React.createElement(
76
- Grid,
77
- {
78
- item: true,
79
- xs: 12,
80
- md: 6,
81
- lg: 3,
82
- key: item.title,
83
- display: "flex",
84
- justifyContent: "left",
85
- alignItems: "center"
86
- },
87
- /* @__PURE__ */ React.createElement(
88
- OnboardingCard,
77
+ ),
78
+ LEARNING_SECTION_ITEMS.map((item) => /* @__PURE__ */ jsx(
79
+ Grid,
89
80
  {
90
- title: item.title,
91
- description: item.description,
92
- buttonText: item.buttonText,
93
- buttonLink: item.buttonLink,
94
- target: item.target,
95
- ariaLabel: item.ariaLabel
96
- }
97
- )
98
- ))));
99
- return /* @__PURE__ */ React.createElement(
81
+ item: true,
82
+ xs: 12,
83
+ md: 6,
84
+ lg: 3,
85
+ display: "flex",
86
+ justifyContent: "left",
87
+ alignItems: "center",
88
+ children: /* @__PURE__ */ jsx(
89
+ OnboardingCard,
90
+ {
91
+ title: item.title,
92
+ description: item.description,
93
+ buttonText: item.buttonText,
94
+ buttonLink: item.buttonLink,
95
+ target: item.target,
96
+ ariaLabel: item.ariaLabel
97
+ }
98
+ )
99
+ },
100
+ item.title
101
+ ))
102
+ ] }) });
103
+ return /* @__PURE__ */ jsxs(
100
104
  Card,
101
105
  {
102
106
  elevation: 0,
@@ -108,22 +112,24 @@ const OnboardingSection = () => {
108
112
  display: "none"
109
113
  },
110
114
  scrollbarWidth: "none"
111
- }
112
- },
113
- !profileLoading && /* @__PURE__ */ React.createElement(
114
- Typography,
115
- {
116
- variant: "h3",
117
- sx: {
118
- display: "flex",
119
- alignItems: "center",
120
- fontWeight: "500",
121
- fontSize: "1.5rem"
122
- }
123
115
  },
124
- `${greeting} ${profileDisplayName() || "Guest"}!`
125
- ),
126
- content
116
+ children: [
117
+ !profileLoading && /* @__PURE__ */ jsx(
118
+ Typography,
119
+ {
120
+ variant: "h3",
121
+ sx: {
122
+ display: "flex",
123
+ alignItems: "center",
124
+ fontWeight: "500",
125
+ fontSize: "1.5rem"
126
+ },
127
+ children: `${greeting} ${profileDisplayName() || "Guest"}!`
128
+ }
129
+ ),
130
+ content
131
+ ]
132
+ }
127
133
  );
128
134
  };
129
135
 
@@ -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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F,CAAA;AAGF,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,SAAW,EAAA,CAAA;AAAA,MACX,EAAI,EAAA;AAAA,QACF,OAAS,EAAA,MAAA;AAAA,QACT,QAAQ,CAAY,QAAA,KAAA,CAAA,UAAA,EAAa,SAAS,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 '$::-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,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;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AAAA,YACC,OAAQ,EAAA,IAAA;AAAA,YACR,EAAI,EAAA;AAAA,cACF,OAAS,EAAA,MAAA;AAAA,cACT,UAAY,EAAA,QAAA;AAAA,cACZ,UAAY,EAAA,KAAA;AAAA,cACZ,QAAU,EAAA;AAAA,aACZ;AAAA,YAEC,QAAG,EAAA,CAAA,EAAA,QAAQ,CAAI,CAAA,EAAA,kBAAA,MAAwB,OAAO,CAAA,CAAA;AAAA;AAAA,SACjD;AAAA,QAED;AAAA;AAAA;AAAA,GACH;AAEJ;;;;"}
@@ -1,4 +1,4 @@
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;;;;"}