@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.
- package/CHANGELOG.md +26 -0
- package/app-config.dynamic.yaml +21 -21
- package/dist/components/CustomizableGrid.esm.js +7 -6
- package/dist/components/CustomizableGrid.esm.js.map +1 -1
- package/dist/components/CustomizableHomePage.esm.js +12 -8
- package/dist/components/CustomizableHomePage.esm.js.map +1 -1
- package/dist/components/DynamicCustomizableHomePage.esm.js +2 -2
- package/dist/components/DynamicCustomizableHomePage.esm.js.map +1 -1
- package/dist/components/DynamicHomePage.esm.js +2 -2
- package/dist/components/DynamicHomePage.esm.js.map +1 -1
- package/dist/components/EntitySection/EntityCard.esm.js +60 -58
- package/dist/components/EntitySection/EntityCard.esm.js.map +1 -1
- package/dist/components/EntitySection/EntitySection.esm.js +152 -122
- package/dist/components/EntitySection/EntitySection.esm.js.map +1 -1
- package/dist/components/EntitySection/TagList.esm.js +45 -43
- package/dist/components/EntitySection/TagList.esm.js.map +1 -1
- package/dist/components/EntitySection/ViewMoreLink.esm.js +2 -2
- package/dist/components/EntitySection/ViewMoreLink.esm.js.map +1 -1
- package/dist/components/FeaturedDocsCard.esm.js +2 -2
- package/dist/components/FeaturedDocsCard.esm.js.map +1 -1
- package/dist/components/Header.esm.js +18 -15
- package/dist/components/Header.esm.js.map +1 -1
- package/dist/components/Headline.esm.js +2 -2
- package/dist/components/Headline.esm.js.map +1 -1
- package/dist/components/HomePage.esm.js +12 -8
- package/dist/components/HomePage.esm.js.map +1 -1
- package/dist/components/LocalClock.esm.js +9 -8
- package/dist/components/LocalClock.esm.js.map +1 -1
- package/dist/components/Markdown.esm.js +12 -9
- package/dist/components/Markdown.esm.js.map +1 -1
- package/dist/components/MarkdownCard.esm.js +2 -2
- package/dist/components/MarkdownCard.esm.js.map +1 -1
- package/dist/components/OnboardingSection/OnboardingCard.esm.js +50 -44
- package/dist/components/OnboardingSection/OnboardingCard.esm.js.map +1 -1
- package/dist/components/OnboardingSection/OnboardingSection.esm.js +69 -67
- package/dist/components/OnboardingSection/OnboardingSection.esm.js.map +1 -1
- package/dist/components/Placeholder.esm.js +2 -2
- package/dist/components/Placeholder.esm.js.map +1 -1
- package/dist/components/QuickAccessCard.esm.js +14 -14
- package/dist/components/QuickAccessCard.esm.js.map +1 -1
- package/dist/components/ReadOnlyGrid.esm.js +18 -14
- package/dist/components/ReadOnlyGrid.esm.js.map +1 -1
- package/dist/components/SearchBar.esm.js +3 -2
- package/dist/components/SearchBar.esm.js.map +1 -1
- package/dist/components/TemplateSection/TemplateCard.esm.js +66 -64
- package/dist/components/TemplateSection/TemplateCard.esm.js.map +1 -1
- package/dist/components/TemplateSection/TemplateSection.esm.js +77 -67
- package/dist/components/TemplateSection/TemplateSection.esm.js.map +1 -1
- package/dist/components/TemplateSection/ViewMoreLink.esm.js +2 -2
- package/dist/components/TemplateSection/ViewMoreLink.esm.js.map +1 -1
- package/dist/components/VisitListener.esm.js +4 -3
- package/dist/components/VisitListener.esm.js.map +1 -1
- package/dist/components/WorldClock.esm.js +3 -3
- package/dist/components/WorldClock.esm.js.map +1 -1
- package/dist/hooks/useGreeting.esm.js +3 -3
- package/dist/hooks/useGreeting.esm.js.map +1 -1
- package/dist/index.d.ts +59 -20
- package/dist/plugin.esm.js.map +1 -1
- package/package.json +24 -24
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @red-hat-developer-hub/backstage-plugin-dynamic-home-page
|
|
2
2
|
|
|
3
|
+
## 1.5.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 041b242: Updated dependency `@mui/icons-material` to `5.18.0`.
|
|
8
|
+
Updated dependency `@mui/material` to `5.18.0`.
|
|
9
|
+
Updated dependency `@mui/styles` to `5.18.0`.
|
|
10
|
+
- 9dc8c46: Updated dependency `tss-react` to `4.9.19`.
|
|
11
|
+
|
|
12
|
+
## 1.5.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- 3282796: Default homepage cards update to new design
|
|
17
|
+
- 33ab96f: Updated dependency `react-grid-layout` to `1.5.2`.
|
|
18
|
+
|
|
19
|
+
## 1.5.0
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- 6681eb9: Bump to backstage version 1.39.1
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- 4face49: Updated dependency `@red-hat-developer-hub/backstage-plugin-theme` to `^0.9.0`.
|
|
28
|
+
|
|
3
29
|
## 1.4.2
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/app-config.dynamic.yaml
CHANGED
|
@@ -7,32 +7,32 @@ dynamicPlugins:
|
|
|
7
7
|
importName: DynamicHomePage
|
|
8
8
|
mountPoints:
|
|
9
9
|
- mountPoint: home.page/cards
|
|
10
|
-
importName:
|
|
10
|
+
importName: OnboardingSection
|
|
11
11
|
config:
|
|
12
12
|
layouts:
|
|
13
|
-
xl: { w:
|
|
14
|
-
lg: { w:
|
|
15
|
-
md: { w:
|
|
16
|
-
sm: { w:
|
|
17
|
-
xs: { w: 12, h:
|
|
18
|
-
xxs: { w: 12, h:
|
|
13
|
+
xl: { w: 12, h: 5 }
|
|
14
|
+
lg: { w: 12, h: 5 }
|
|
15
|
+
md: { w: 12, h: 5 }
|
|
16
|
+
sm: { w: 12, h: 5 }
|
|
17
|
+
xs: { w: 12, h: 7 }
|
|
18
|
+
xxs: { w: 12, h: 13 }
|
|
19
19
|
- mountPoint: home.page/cards
|
|
20
|
-
importName:
|
|
20
|
+
importName: EntitySection
|
|
21
21
|
config:
|
|
22
22
|
layouts:
|
|
23
|
-
xl: { w:
|
|
24
|
-
lg: { w:
|
|
25
|
-
md: { w:
|
|
26
|
-
sm: { w: 12, h:
|
|
27
|
-
xs: { w: 12, h:
|
|
28
|
-
xxs: { w: 12, h:
|
|
23
|
+
xl: { w: 12, h: 6 }
|
|
24
|
+
lg: { w: 12, h: 6 }
|
|
25
|
+
md: { w: 12, h: 6 }
|
|
26
|
+
sm: { w: 12, h: 6 }
|
|
27
|
+
xs: { w: 12, h: 10 }
|
|
28
|
+
xxs: { w: 12, h: 14.5 }
|
|
29
29
|
- mountPoint: home.page/cards
|
|
30
|
-
importName:
|
|
30
|
+
importName: TemplateSection
|
|
31
31
|
config:
|
|
32
32
|
layouts:
|
|
33
|
-
xl: { w:
|
|
34
|
-
lg: { w:
|
|
35
|
-
md: { w:
|
|
36
|
-
sm: { w: 12, h:
|
|
37
|
-
xs: { w: 12, h:
|
|
38
|
-
xxs: { w: 12, h:
|
|
33
|
+
xl: { w: 12, h: 5 }
|
|
34
|
+
lg: { w: 12, h: 5 }
|
|
35
|
+
md: { w: 12, h: 5 }
|
|
36
|
+
sm: { w: 12, h: 5 }
|
|
37
|
+
xs: { w: 12, h: 7.5 }
|
|
38
|
+
xxs: { w: 12, h: 13.5 }
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useMemo } from 'react';
|
|
2
3
|
import { ErrorBoundary } from '@backstage/core-components';
|
|
3
4
|
import { CustomHomepageGrid } from '@backstage/plugin-home';
|
|
4
5
|
import { makeStyles } from 'tss-react/mui';
|
|
@@ -58,19 +59,19 @@ const CustomizableGrid = (props) => {
|
|
|
58
59
|
});
|
|
59
60
|
}, [props.mountPoints]);
|
|
60
61
|
const children = useMemo(() => {
|
|
61
|
-
return cards.map((card) => /* @__PURE__ */
|
|
62
|
+
return cards.map((card) => /* @__PURE__ */ jsx(
|
|
62
63
|
"div",
|
|
63
64
|
{
|
|
64
|
-
key: card.id,
|
|
65
65
|
"data-cardid": card.id,
|
|
66
66
|
"data-testid": `home-page card ${card.id}`,
|
|
67
67
|
"data-layout": JSON.stringify(card.layouts),
|
|
68
|
-
className: classes.cardWrapper
|
|
68
|
+
className: classes.cardWrapper,
|
|
69
|
+
children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(card.Component, { ...card.props }) })
|
|
69
70
|
},
|
|
70
|
-
|
|
71
|
+
card.id
|
|
71
72
|
));
|
|
72
73
|
}, [cards, classes.cardWrapper]);
|
|
73
|
-
return /* @__PURE__ */
|
|
74
|
+
return /* @__PURE__ */ jsx(CustomHomepageGrid, { children });
|
|
74
75
|
};
|
|
75
76
|
|
|
76
77
|
export { CustomizableGrid };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomizableGrid.esm.js","sources":["../../src/components/CustomizableGrid.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
|
|
1
|
+
{"version":3,"file":"CustomizableGrid.esm.js","sources":["../../src/components/CustomizableGrid.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 { Layout } from 'react-grid-layout';\n\nimport { ErrorBoundary } from '@backstage/core-components';\nimport { CustomHomepageGrid } from '@backstage/plugin-home';\n\nimport { makeStyles } from 'tss-react/mui';\n\n// Removes the doubled scrollbar\nimport 'react-grid-layout/css/styles.css';\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 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 CustomizableGridProps {\n mountPoints: HomePageCardMountPoint[];\n breakpoints?: Record<string, number>;\n cols?: Record<string, number>;\n}\n\n/**\n * @public\n */\nexport const CustomizableGrid = (props: CustomizableGridProps) => {\n const { classes } = useStyles();\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 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 <CustomHomepageGrid>{children}</CustomHomepageGrid>;\n};\n"],"names":[],"mappings":";;;;;;;AA4CA,MAAM,SAAA,GAAY,YAAa,CAAA;AAAA;AAAA,EAE7B,WAAa,EAAA;AAAA,IACX,gCAAkC,EAAA;AAAA,MAChC,KAAO,EAAA,MAAA;AAAA,MACP,MAAQ,EAAA;AAAA,KACV;AAAA,IACA,qCAAuC,EAAA;AAAA,MACrC,QAAU,EAAA;AAAA;AACZ;AAEJ,CAAC,CAAA;AAcY,MAAA,gBAAA,GAAmB,CAAC,KAAiC,KAAA;AAChE,EAAM,MAAA,EAAE,OAAQ,EAAA,GAAI,SAAU,EAAA;AAE9B,EAAM,MAAA,KAAA,GAAQ,QAAgB,MAAM;AAClC,IAAA,OAAO,KAAM,CAAA,WAAA,CAAY,GAAU,CAAA,CAAC,YAAY,KAAU,KAAA;AACxD,MAAM,MAAA,EAAA,GAAA,CAAM,KAAQ,GAAA,CAAA,EAAG,QAAS,EAAA;AAChC,MAAA,MAAM,UAAkC,EAAC;AAEzC,MAAI,IAAA,UAAA,CAAW,QAAQ,OAAS,EAAA;AAC9B,QAAA,KAAA,MAAW,CAAC,UAAA,EAAY,MAAM,CAAA,IAAK,MAAO,CAAA,OAAA;AAAA,UACxC,WAAW,MAAO,CAAA;AAAA,SACjB,EAAA;AACD,UAAA,OAAA,CAAQ,UAAU,CAAI,GAAA;AAAA,YAC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,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,EAAO,uBAAA,GAAA,CAAC,sBAAoB,QAAS,EAAA,CAAA;AACvC;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
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 { CustomizableGrid } from './CustomizableGrid.esm.js';
|
|
@@ -16,13 +17,16 @@ const CustomizableHomePage = (props) => {
|
|
|
16
17
|
);
|
|
17
18
|
return filteredAndSorted;
|
|
18
19
|
}, [props.cards]);
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
|
|
21
|
-
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
return /* @__PURE__ */ jsxs(Page, { themeId: "home", children: [
|
|
21
|
+
/* @__PURE__ */ jsx(Header, { ...props }),
|
|
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(CustomizableGrid, { mountPoints: filteredAndSortedHomePageCards }) })
|
|
29
|
+
] });
|
|
26
30
|
};
|
|
27
31
|
|
|
28
32
|
export { CustomizableHomePage };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomizableHomePage.esm.js","sources":["../../src/components/CustomizableHomePage.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
|
|
1
|
+
{"version":3,"file":"CustomizableHomePage.esm.js","sources":["../../src/components/CustomizableHomePage.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 { CustomizableGrid } from './CustomizableGrid';\n\nexport interface HomePageProps extends HeaderProps {\n cards?: HomePageCardMountPoint[];\n}\n\nexport const CustomizableHomePage = (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} />\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 <CustomizableGrid mountPoints={filteredAndSortedHomePageCards} />\n )}\n </Content>\n </Page>\n );\n};\n"],"names":[],"mappings":";;;;;;AA6Ba,MAAA,oBAAA,GAAuB,CAAC,KAAyB,KAAA;AAC5D,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,oBAAC,GAAA,CAAA,MAAA,EAAA,EAAQ,GAAG,KAAO,EAAA,CAAA;AAAA,oBAClB,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,gBAAiB,EAAA,EAAA,WAAA,EAAa,gCAAgC,CAEnE,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useDynamicHomePageCards } from '../hooks/useDynamicHomePageCards.esm.js';
|
|
3
3
|
import { CustomizableHomePage } from './CustomizableHomePage.esm.js';
|
|
4
4
|
|
|
5
5
|
const DynamicCustomizableHomePage = (props) => {
|
|
6
6
|
const cards = useDynamicHomePageCards();
|
|
7
|
-
return /* @__PURE__ */
|
|
7
|
+
return /* @__PURE__ */ jsx(CustomizableHomePage, { ...props, cards });
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export { DynamicCustomizableHomePage };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicCustomizableHomePage.esm.js","sources":["../../src/components/DynamicCustomizableHomePage.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
|
|
1
|
+
{"version":3,"file":"DynamicCustomizableHomePage.esm.js","sources":["../../src/components/DynamicCustomizableHomePage.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 { ClockConfig } from '@backstage/plugin-home';\n\nimport { useDynamicHomePageCards } from '../hooks/useDynamicHomePageCards';\nimport { CustomizableHomePage } from './CustomizableHomePage';\nimport type { LocalClockProps } from './LocalClock';\n\n/**\n * This type is similar to Omit<HomePageProps, 'cards'>.\n * We redefine it here to avoid the need to export HomePageProps to the API export!\n * @public\n */\nexport interface DynamicCustomizableHomePageProps {\n title?: string;\n personalizedTitle?: string;\n pageTitle?: string;\n subtitle?: string;\n localClock?: LocalClockProps;\n worldClocks?: ClockConfig[];\n}\n\n/**\n * @public\n */\nexport const DynamicCustomizableHomePage = (\n props: DynamicCustomizableHomePageProps,\n) => {\n const cards = useDynamicHomePageCards();\n\n return <CustomizableHomePage {...props} cards={cards} />;\n};\n"],"names":[],"mappings":";;;;AAuCa,MAAA,2BAAA,GAA8B,CACzC,KACG,KAAA;AACH,EAAA,MAAM,QAAQ,uBAAwB,EAAA;AAEtC,EAAA,uBAAQ,GAAA,CAAA,oBAAA,EAAA,EAAsB,GAAG,KAAA,EAAO,KAAc,EAAA,CAAA;AACxD;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useDynamicHomePageCards } from '../hooks/useDynamicHomePageCards.esm.js';
|
|
3
3
|
import { HomePage } from './HomePage.esm.js';
|
|
4
4
|
|
|
5
5
|
const DynamicHomePage = (props) => {
|
|
6
6
|
const cards = useDynamicHomePageCards();
|
|
7
|
-
return /* @__PURE__ */
|
|
7
|
+
return /* @__PURE__ */ jsx(HomePage, { ...props, cards });
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export { DynamicHomePage };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicHomePage.esm.js","sources":["../../src/components/DynamicHomePage.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
|
|
1
|
+
{"version":3,"file":"DynamicHomePage.esm.js","sources":["../../src/components/DynamicHomePage.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 { ClockConfig } from '@backstage/plugin-home';\n\nimport { useDynamicHomePageCards } from '../hooks/useDynamicHomePageCards';\nimport { HomePage } from './HomePage';\nimport type { LocalClockProps } from './LocalClock';\n\n/**\n * This type is similar to Omit<HomePageProps, 'cards'>.\n * We redefine it here to avoid the need to export HomePageProps to the API export!\n * @public\n */\nexport interface DynamicHomePageProps {\n title?: string;\n personalizedTitle?: string;\n pageTitle?: string;\n subtitle?: string;\n localClock?: LocalClockProps;\n worldClocks?: ClockConfig[];\n}\n\n/**\n * @public\n */\nexport const DynamicHomePage = (props: DynamicHomePageProps) => {\n const cards = useDynamicHomePageCards();\n\n return <HomePage {...props} cards={cards} />;\n};\n"],"names":[],"mappings":";;;;AAuCa,MAAA,eAAA,GAAkB,CAAC,KAAgC,KAAA;AAC9D,EAAA,MAAM,QAAQ,uBAAwB,EAAA;AAEtC,EAAA,uBAAQ,GAAA,CAAA,QAAA,EAAA,EAAU,GAAG,KAAA,EAAO,KAAc,EAAA,CAAA;AAC5C;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { EntityRefLink } from '@backstage/plugin-catalog-react';
|
|
3
3
|
import { MarkdownContent } from '@backstage/core-components';
|
|
4
4
|
import CardContent from '@mui/material/CardContent';
|
|
@@ -14,7 +14,7 @@ const EntityCard = ({
|
|
|
14
14
|
kind,
|
|
15
15
|
entity
|
|
16
16
|
}) => {
|
|
17
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ jsx(
|
|
18
18
|
Card,
|
|
19
19
|
{
|
|
20
20
|
elevation: 0,
|
|
@@ -22,66 +22,68 @@ const EntityCard = ({
|
|
|
22
22
|
border: (theme) => `1px solid ${theme.palette.grey[400]}`,
|
|
23
23
|
overflow: "auto",
|
|
24
24
|
maxHeight: "100%"
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
/* @__PURE__ */ React.createElement(
|
|
28
|
-
CardContent,
|
|
29
|
-
{
|
|
30
|
-
sx: {
|
|
31
|
-
pb: 2,
|
|
32
|
-
"&:last-child": {
|
|
33
|
-
pb: 2
|
|
34
|
-
},
|
|
35
|
-
backgroundColor: "transparent"
|
|
36
|
-
}
|
|
37
25
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
{
|
|
41
|
-
entityRef: entity,
|
|
42
|
-
style: {
|
|
43
|
-
display: "-webkit-box",
|
|
44
|
-
WebkitBoxOrient: "vertical",
|
|
45
|
-
WebkitLineClamp: 1,
|
|
46
|
-
overflow: "hidden",
|
|
47
|
-
textOverflow: "ellipsis",
|
|
48
|
-
fontSize: "0.875rem",
|
|
49
|
-
fontWeight: "500",
|
|
50
|
-
textDecoration: "underline"
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
title
|
|
54
|
-
)),
|
|
55
|
-
/* @__PURE__ */ React.createElement(
|
|
56
|
-
Box,
|
|
26
|
+
children: /* @__PURE__ */ jsxs(
|
|
27
|
+
CardContent,
|
|
57
28
|
{
|
|
58
29
|
sx: {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
/* @__PURE__ */ React.createElement(
|
|
65
|
-
Typography,
|
|
66
|
-
{
|
|
67
|
-
variant: "body2",
|
|
68
|
-
paragraph: true,
|
|
69
|
-
sx: {
|
|
70
|
-
display: "-webkit-box",
|
|
71
|
-
WebkitLineClamp: 8,
|
|
72
|
-
WebkitBoxOrient: "vertical",
|
|
73
|
-
overflow: "hidden",
|
|
74
|
-
textOverflow: "ellipsis",
|
|
75
|
-
"& p": {
|
|
76
|
-
margin: "auto"
|
|
77
|
-
}
|
|
78
|
-
}
|
|
30
|
+
pb: 2,
|
|
31
|
+
"&:last-child": {
|
|
32
|
+
pb: 2
|
|
33
|
+
},
|
|
34
|
+
backgroundColor: "transparent"
|
|
79
35
|
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ jsx(Box, { sx: { overflow: "hidden" }, children: /* @__PURE__ */ jsx(
|
|
38
|
+
EntityRefLink,
|
|
39
|
+
{
|
|
40
|
+
entityRef: entity,
|
|
41
|
+
style: {
|
|
42
|
+
display: "-webkit-box",
|
|
43
|
+
WebkitBoxOrient: "vertical",
|
|
44
|
+
WebkitLineClamp: 1,
|
|
45
|
+
overflow: "hidden",
|
|
46
|
+
textOverflow: "ellipsis",
|
|
47
|
+
fontSize: "0.875rem",
|
|
48
|
+
fontWeight: "500",
|
|
49
|
+
textDecoration: "underline"
|
|
50
|
+
},
|
|
51
|
+
children: title
|
|
52
|
+
}
|
|
53
|
+
) }),
|
|
54
|
+
/* @__PURE__ */ jsx(
|
|
55
|
+
Box,
|
|
56
|
+
{
|
|
57
|
+
sx: {
|
|
58
|
+
pt: 2,
|
|
59
|
+
height: "175px",
|
|
60
|
+
overflow: "hidden"
|
|
61
|
+
},
|
|
62
|
+
children: /* @__PURE__ */ jsx(
|
|
63
|
+
Typography,
|
|
64
|
+
{
|
|
65
|
+
variant: "body2",
|
|
66
|
+
paragraph: true,
|
|
67
|
+
sx: {
|
|
68
|
+
display: "-webkit-box",
|
|
69
|
+
WebkitLineClamp: 8,
|
|
70
|
+
WebkitBoxOrient: "vertical",
|
|
71
|
+
overflow: "hidden",
|
|
72
|
+
textOverflow: "ellipsis",
|
|
73
|
+
"& p": {
|
|
74
|
+
margin: "auto"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
children: /* @__PURE__ */ jsx(MarkdownContent, { content: description })
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
/* @__PURE__ */ jsx(TagList, { kind, tags })
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
}
|
|
85
87
|
);
|
|
86
88
|
};
|
|
87
89
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityCard.esm.js","sources":["../../../src/components/EntitySection/EntityCard.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
|
|
1
|
+
{"version":3,"file":"EntityCard.esm.js","sources":["../../../src/components/EntitySection/EntityCard.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 { EntityRefLink } from '@backstage/plugin-catalog-react';\nimport { Entity } from '@backstage/catalog-model';\nimport { MarkdownContent } from '@backstage/core-components';\n\nimport CardContent from '@mui/material/CardContent';\nimport Typography from '@mui/material/Typography';\nimport Box from '@mui/material/Box';\nimport Card from '@mui/material/Card';\n\nimport TagList from './TagList';\n\ninterface EntityCardProps {\n title: string;\n version?: string;\n description: string;\n tags: string[];\n kind: string;\n entity: Entity;\n}\n\nconst EntityCard: FC<EntityCardProps> = ({\n title,\n description,\n tags,\n kind,\n entity,\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={{ overflow: 'hidden' }}>\n <EntityRefLink\n entityRef={entity}\n style={{\n display: '-webkit-box',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: 1,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n fontSize: '0.875rem',\n fontWeight: '500',\n textDecoration: 'underline',\n }}\n >\n {title}\n </EntityRefLink>\n </Box>\n <Box\n sx={{\n pt: 2,\n height: '175px',\n overflow: 'hidden',\n }}\n >\n <Typography\n variant=\"body2\"\n paragraph\n sx={{\n display: '-webkit-box',\n WebkitLineClamp: 8,\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 <TagList kind={kind} tags={tags} />\n </CardContent>\n </Card>\n );\n};\n\nexport default EntityCard;\n"],"names":[],"mappings":";;;;;;;;;AAqCA,MAAM,aAAkC,CAAC;AAAA,EACvC,K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