@red-hat-developer-hub/backstage-plugin-dynamic-home-page 1.11.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/alpha/components/CustomizableGridLayout.esm.js +17 -7
- package/dist/alpha/components/CustomizableGridLayout.esm.js.map +1 -1
- package/dist/alpha/extensions/homePageCards.esm.js +6 -6
- package/dist/alpha/extensions/homePageCards.esm.js.map +1 -1
- package/dist/alpha.d.ts +1 -1
- package/dist/components/CustomizableGrid.esm.js +17 -7
- package/dist/components/CustomizableGrid.esm.js.map +1 -1
- package/dist/components/EntitySection/EntitySection.esm.js +1 -8
- package/dist/components/EntitySection/EntitySection.esm.js.map +1 -1
- package/dist/hooks/useContainerQuery.esm.js +40 -5
- package/dist/hooks/useContainerQuery.esm.js.map +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/translations/de.esm.js +1 -1
- package/dist/translations/de.esm.js.map +1 -1
- package/dist/translations/es.esm.js +1 -1
- package/dist/translations/es.esm.js.map +1 -1
- package/dist/translations/fr.esm.js +1 -1
- package/dist/translations/fr.esm.js.map +1 -1
- package/dist/translations/it.esm.js +1 -1
- package/dist/translations/it.esm.js.map +1 -1
- package/dist/translations/ja.esm.js +1 -1
- package/dist/translations/ja.esm.js.map +1 -1
- package/dist/translations/ref.esm.js +1 -1
- package/dist/translations/ref.esm.js.map +1 -1
- package/package.json +20 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @red-hat-developer-hub/backstage-plugin-dynamic-home-page
|
|
2
2
|
|
|
3
|
+
## 1.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- e8780ce: Backstage version bump to v1.49.3
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 7ea283a: fixes the responsiveness issue of the customizable home-page
|
|
12
|
+
- 4e40bf1: Fix misleading entity count in EntitySection card link
|
|
13
|
+
|
|
3
14
|
## 1.11.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useMemo, Fragment as Fragment$1 } from 'react';
|
|
2
|
+
import { useRef, useMemo, Fragment as Fragment$1 } from 'react';
|
|
3
3
|
import { CustomHomepageGrid } from '@backstage/plugin-home';
|
|
4
4
|
import { useTheme } from '@mui/material/styles';
|
|
5
5
|
import GlobalStyles from '@mui/material/GlobalStyles';
|
|
6
|
+
import { useContainerQuery } from '../../hooks/useContainerQuery.esm.js';
|
|
6
7
|
import 'react-grid-layout/css/styles.css';
|
|
7
8
|
import { isCardADefaultConfiguration } from '../utils.esm.js';
|
|
8
9
|
|
|
@@ -10,6 +11,8 @@ const CustomizableGridLayout = ({
|
|
|
10
11
|
homepageCards
|
|
11
12
|
}) => {
|
|
12
13
|
const theme = useTheme();
|
|
14
|
+
const gridContainerRef = useRef(null);
|
|
15
|
+
useContainerQuery(gridContainerRef, { notifyWindowResize: true });
|
|
13
16
|
const config = useMemo(() => {
|
|
14
17
|
const defaultConfig = [];
|
|
15
18
|
homepageCards.forEach((homepageCard) => {
|
|
@@ -44,13 +47,20 @@ const CustomizableGridLayout = ({
|
|
|
44
47
|
}
|
|
45
48
|
),
|
|
46
49
|
/* @__PURE__ */ jsx(
|
|
47
|
-
|
|
50
|
+
"div",
|
|
48
51
|
{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
ref: gridContainerRef,
|
|
53
|
+
style: { width: "100%", minWidth: 0, boxSizing: "border-box" },
|
|
54
|
+
children: /* @__PURE__ */ jsx(
|
|
55
|
+
CustomHomepageGrid,
|
|
56
|
+
{
|
|
57
|
+
config,
|
|
58
|
+
preventCollision: false,
|
|
59
|
+
compactType: "vertical",
|
|
60
|
+
style: { margin: "-10px" },
|
|
61
|
+
children: homepageCards.map((card, index) => /* @__PURE__ */ jsx(Fragment$1, { children: card.component }, card.name ?? index))
|
|
62
|
+
}
|
|
63
|
+
)
|
|
54
64
|
}
|
|
55
65
|
)
|
|
56
66
|
] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomizableGridLayout.esm.js","sources":["../../../src/alpha/components/CustomizableGridLayout.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 { Fragment, useMemo } from 'react';\n\nimport {\n CustomHomepageGrid,\n LayoutConfiguration,\n} from '@backstage/plugin-home';\nimport { useTheme } from '@mui/material/styles';\nimport GlobalStyles from '@mui/material/GlobalStyles';\nimport { HomePageCardConfig } from '../../types';\n\nimport 'react-grid-layout/css/styles.css';\nimport { isCardADefaultConfiguration } from '../utils';\n\n/**\n * Props for the customizable grid layout.\n * @alpha\n */\nexport interface CustomizableGridLayoutProps {\n homepageCards: HomePageCardConfig[];\n}\n\n/**\n * Customizable grid layout for the NFS home page (drag, drop, resize).\n *\n * @alpha\n */\nexport const CustomizableGridLayout = ({\n homepageCards,\n}: CustomizableGridLayoutProps) => {\n const theme = useTheme();\n\n const config = useMemo(() => {\n const defaultConfig: LayoutConfiguration[] = [];\n\n homepageCards.forEach(homepageCard => {\n if (!homepageCard.node) {\n return;\n }\n\n if (isCardADefaultConfiguration(homepageCard)) {\n const layout = homepageCard.breakpointLayouts?.xl || {};\n\n defaultConfig.push({\n component: homepageCard.component,\n x: layout.x ?? 0,\n y: layout.y ?? 0,\n width: layout.w ?? 12,\n height: layout.h ?? 4,\n movable: true,\n deletable: true,\n resizable: true,\n });\n }\n });\n\n return defaultConfig;\n }, [homepageCards]);\n\n return (\n <>\n <GlobalStyles\n styles={{\n '[class*=\"makeStyles-settingsOverlay\"]': {\n backgroundColor:\n theme.palette.mode === 'dark'\n ? 'rgba(20, 20, 20, 0.95) !important'\n : 'rgba(40, 40, 40, 0.93) !important',\n },\n }}\n />\n <CustomHomepageGrid\n
|
|
1
|
+
{"version":3,"file":"CustomizableGridLayout.esm.js","sources":["../../../src/alpha/components/CustomizableGridLayout.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 { Fragment, useMemo, useRef } from 'react';\n\nimport {\n CustomHomepageGrid,\n LayoutConfiguration,\n} from '@backstage/plugin-home';\nimport { useTheme } from '@mui/material/styles';\nimport GlobalStyles from '@mui/material/GlobalStyles';\nimport { HomePageCardConfig } from '../../types';\nimport { useContainerQuery } from '../../hooks/useContainerQuery';\n\nimport 'react-grid-layout/css/styles.css';\nimport { isCardADefaultConfiguration } from '../utils';\n\n/**\n * Props for the customizable grid layout.\n * @alpha\n */\nexport interface CustomizableGridLayoutProps {\n homepageCards: HomePageCardConfig[];\n}\n\n/**\n * Customizable grid layout for the NFS home page (drag, drop, resize).\n *\n * @alpha\n */\nexport const CustomizableGridLayout = ({\n homepageCards,\n}: CustomizableGridLayoutProps) => {\n const theme = useTheme();\n const gridContainerRef = useRef<HTMLDivElement>(null);\n useContainerQuery(gridContainerRef, { notifyWindowResize: true });\n\n const config = useMemo(() => {\n const defaultConfig: LayoutConfiguration[] = [];\n\n homepageCards.forEach(homepageCard => {\n if (!homepageCard.node) {\n return;\n }\n\n if (isCardADefaultConfiguration(homepageCard)) {\n const layout = homepageCard.breakpointLayouts?.xl || {};\n\n defaultConfig.push({\n component: homepageCard.component,\n x: layout.x ?? 0,\n y: layout.y ?? 0,\n width: layout.w ?? 12,\n height: layout.h ?? 4,\n movable: true,\n deletable: true,\n resizable: true,\n });\n }\n });\n\n return defaultConfig;\n }, [homepageCards]);\n\n return (\n <>\n <GlobalStyles\n styles={{\n '[class*=\"makeStyles-settingsOverlay\"]': {\n backgroundColor:\n theme.palette.mode === 'dark'\n ? 'rgba(20, 20, 20, 0.95) !important'\n : 'rgba(40, 40, 40, 0.93) !important',\n },\n }}\n />\n <div\n ref={gridContainerRef}\n style={{ width: '100%', minWidth: 0, boxSizing: 'border-box' }}\n >\n <CustomHomepageGrid\n config={config}\n preventCollision={false}\n compactType=\"vertical\"\n style={{ margin: '-10px' }}\n >\n {homepageCards.map((card, index) => (\n <Fragment key={card.name ?? index}>{card.component}</Fragment>\n ))}\n </CustomHomepageGrid>\n </div>\n </>\n );\n};\n"],"names":["Fragment"],"mappings":";;;;;;;;;AAiDO,MAAM,yBAAyB,CAAC;AAAA,EACrC;AACF,CAAmC,KAAA;AACjC,EAAA,MAAM,QAAQ,QAAS,EAAA;AACvB,EAAM,MAAA,gBAAA,GAAmB,OAAuB,IAAI,CAAA;AACpD,EAAA,iBAAA,CAA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WAAW,YAAa,EAAA;AAAA,QAE7D,QAAA,kBAAA,GAAA;AAAA,UAAC,kBAAA;AAAA,UAAA;AAAA,YACC,MAAA;AAAA,YACA,gBAAkB,EAAA,KAAA;AAAA,YAClB,WAAY,EAAA,UAAA;AAAA,YACZ,KAAA,EAAO,EAAE,MAAA,EAAQ,OAAQ,EAAA;AAAA,YAExB,QAAc,EAAA,aAAA,CAAA,GAAA,CAAI,CAAC,IAAA,EAAM,KACxB,qBAAA,GAAA,CAACA,UAAA,EAAA,EAAmC,QAAK,EAAA,IAAA,CAAA,SAAA,EAAA,EAA1B,IAAK,CAAA,IAAA,IAAQ,KAAuB,CACpD;AAAA;AAAA;AACH;AAAA;AACF,GACF,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -18,7 +18,7 @@ const defaultCardLayout = {
|
|
|
18
18
|
const onboardingSectionWidget = HomePageWidgetBlueprint.make({
|
|
19
19
|
name: "rhdh-onboarding-section",
|
|
20
20
|
params: {
|
|
21
|
-
name: "
|
|
21
|
+
name: "Red Hat Developer Hub - Onboarding",
|
|
22
22
|
layout: defaultCardLayout,
|
|
23
23
|
components: () => import('../../components/OnboardingSection/index.esm.js').then((m) => ({
|
|
24
24
|
Content: m.OnboardingSection
|
|
@@ -28,7 +28,7 @@ const onboardingSectionWidget = HomePageWidgetBlueprint.make({
|
|
|
28
28
|
const entitySectionWidget = HomePageWidgetBlueprint.make({
|
|
29
29
|
name: "rhdh-entity-section",
|
|
30
30
|
params: {
|
|
31
|
-
name: "
|
|
31
|
+
name: "Red Hat Developer Hub - Software Catalog",
|
|
32
32
|
layout: defaultCardLayout,
|
|
33
33
|
components: () => import('../../components/EntitySection/index.esm.js').then((m) => ({
|
|
34
34
|
Content: () => compatWrapper(/* @__PURE__ */ jsx(m.EntitySection, {}))
|
|
@@ -38,7 +38,7 @@ const entitySectionWidget = HomePageWidgetBlueprint.make({
|
|
|
38
38
|
const templateSectionWidget = HomePageWidgetBlueprint.make({
|
|
39
39
|
name: "rhdh-template-section",
|
|
40
40
|
params: {
|
|
41
|
-
name: "
|
|
41
|
+
name: "Red Hat Developer Hub - Explore templates",
|
|
42
42
|
layout: defaultCardLayout,
|
|
43
43
|
components: () => import('../../components/TemplateSection/index.esm.js').then((m) => ({
|
|
44
44
|
Content: m.TemplateSection
|
|
@@ -48,7 +48,7 @@ const templateSectionWidget = HomePageWidgetBlueprint.make({
|
|
|
48
48
|
const quickAccessCardWidget = HomePageWidgetBlueprint.make({
|
|
49
49
|
name: "quick-access-card",
|
|
50
50
|
params: {
|
|
51
|
-
name: "
|
|
51
|
+
name: "Quick Access Card",
|
|
52
52
|
layout: defaultCardLayout,
|
|
53
53
|
components: () => import('../../components/QuickAccessCard.esm.js').then((m) => ({
|
|
54
54
|
Content: () => compatWrapper(/* @__PURE__ */ jsx(m.QuickAccessCard, {}))
|
|
@@ -58,7 +58,7 @@ const quickAccessCardWidget = HomePageWidgetBlueprint.make({
|
|
|
58
58
|
const searchBarWidget = HomePageWidgetBlueprint.make({
|
|
59
59
|
name: "search-bar",
|
|
60
60
|
params: {
|
|
61
|
-
name: "
|
|
61
|
+
name: "Search",
|
|
62
62
|
layout: {
|
|
63
63
|
...defaultCardLayout,
|
|
64
64
|
height: {
|
|
@@ -76,7 +76,7 @@ const searchBarWidget = HomePageWidgetBlueprint.make({
|
|
|
76
76
|
const featuredDocsCardWidget = HomePageWidgetBlueprint.make({
|
|
77
77
|
name: "featured-docs-card",
|
|
78
78
|
params: {
|
|
79
|
-
name: "
|
|
79
|
+
name: "Featured docs",
|
|
80
80
|
layout: defaultCardLayout,
|
|
81
81
|
components: () => import('../../components/FeaturedDocsCard.esm.js').then((m) => ({
|
|
82
82
|
Content: m.FeaturedDocsCard
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"homePageCards.esm.js","sources":["../../../src/alpha/extensions/homePageCards.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 { HomePageWidgetBlueprint } from '@backstage/plugin-home-react/alpha';\nimport homePlugin from '@backstage/plugin-home/alpha';\nimport { compatWrapper } from '@backstage/core-compat-api';\n\nconst defaultCardLayout = {\n width: {\n minColumns: 4,\n maxColumns: 12,\n defaultColumns: 12,\n },\n height: {\n minRows: 2,\n maxRows: 12,\n defaultRows: 4,\n },\n} as const;\n\n/**\n * NFS widget: OnboardingSection (migrated from mountPoint home.page/cards).\n * @alpha\n */\nexport const onboardingSectionWidget = HomePageWidgetBlueprint.make({\n name: 'rhdh-onboarding-section',\n params: {\n name: '
|
|
1
|
+
{"version":3,"file":"homePageCards.esm.js","sources":["../../../src/alpha/extensions/homePageCards.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 { HomePageWidgetBlueprint } from '@backstage/plugin-home-react/alpha';\nimport homePlugin from '@backstage/plugin-home/alpha';\nimport { compatWrapper } from '@backstage/core-compat-api';\n\nconst defaultCardLayout = {\n width: {\n minColumns: 4,\n maxColumns: 12,\n defaultColumns: 12,\n },\n height: {\n minRows: 2,\n maxRows: 12,\n defaultRows: 4,\n },\n} as const;\n\n/**\n * NFS widget: OnboardingSection (migrated from mountPoint home.page/cards).\n * @alpha\n */\nexport const onboardingSectionWidget = HomePageWidgetBlueprint.make({\n name: 'rhdh-onboarding-section',\n params: {\n name: 'Red Hat Developer Hub - Onboarding',\n layout: defaultCardLayout,\n components: () =>\n import('../../components/OnboardingSection').then(m => ({\n Content: m.OnboardingSection,\n })),\n },\n});\n\n/**\n * NFS widget: EntitySection (migrated from mountPoint home.page/cards).\n * @alpha\n */\nexport const entitySectionWidget = HomePageWidgetBlueprint.make({\n name: 'rhdh-entity-section',\n params: {\n name: 'Red Hat Developer Hub - Software Catalog',\n layout: defaultCardLayout,\n components: () =>\n import('../../components/EntitySection').then(m => ({\n Content: () => compatWrapper(<m.EntitySection />),\n })),\n },\n});\n\n/**\n * NFS widget: TemplateSection (migrated from mountPoint home.page/cards).\n * @alpha\n */\nexport const templateSectionWidget = HomePageWidgetBlueprint.make({\n name: 'rhdh-template-section',\n params: {\n name: 'Red Hat Developer Hub - Explore templates',\n layout: defaultCardLayout,\n components: () =>\n import('../../components/TemplateSection').then(m => ({\n Content: m.TemplateSection,\n })),\n },\n});\n\n/**\n * NFS widget: QuickAccessCard (migrated from mountPoint home.page/cards).\n * @alpha\n */\nexport const quickAccessCardWidget = HomePageWidgetBlueprint.make({\n name: 'quick-access-card',\n params: {\n name: 'Quick Access Card',\n layout: defaultCardLayout,\n components: () =>\n import('../../components/QuickAccessCard').then(m => ({\n Content: () => compatWrapper(<m.QuickAccessCard />),\n })),\n },\n});\n\n/**\n * NFS widget: SearchBar (migrated from mountPoint home.page/cards).\n * @alpha\n */\nexport const searchBarWidget = HomePageWidgetBlueprint.make({\n name: 'search-bar',\n params: {\n name: 'Search',\n layout: {\n ...defaultCardLayout,\n height: {\n ...defaultCardLayout.height,\n defaultRows: 2,\n minRows: 1,\n maxRows: 1,\n },\n },\n components: () =>\n import('../../components/SearchBar').then(m => ({\n Content: () => compatWrapper(<m.SearchBar />),\n })),\n },\n});\n\n/**\n * NFS widget: FeaturedDocsCard (migrated from mountPoint home.page/cards).\n * @alpha\n */\nexport const featuredDocsCardWidget = HomePageWidgetBlueprint.make({\n name: 'featured-docs-card',\n params: {\n name: 'Featured docs',\n layout: defaultCardLayout,\n components: () =>\n import('../../components/FeaturedDocsCard').then(m => ({\n Content: m.FeaturedDocsCard,\n })),\n },\n});\n\n/**\n * NFS widget: CatalogStarred (migrated from mountPoint home.page/cards).\n * @alpha\n */\nexport const catalogStarredWidget = homePlugin\n .getExtension('home-page-widget:home/starred-entities')\n .override({\n params: {\n name: 'CatalogStarred',\n title: 'Starred catalog entities',\n },\n });\n\n/**\n * Disables the default home plugin toolkit widget.\n * @alpha\n */\nexport const disableToolkit = homePlugin\n .getExtension('home-page-widget:home/toolkit')\n .override({\n disabled: true,\n });\n\n/**\n * NFS widget: RecentlyVisited (migrated from mountPoint home.page/cards).\n * @alpha\n */\nexport const RecentlyVisitedWidget = HomePageWidgetBlueprint.make({\n name: 'recently-visited',\n params: {\n layout: defaultCardLayout,\n name: 'Recently visited',\n components: () =>\n import('@backstage/plugin-home').then(m => ({\n Content: m.HomePageRecentlyVisited,\n })),\n },\n});\n\n/**\n * NFS widget: TopVisited (migrated from mountPoint home.page/cards).\n * @alpha\n */\nexport const TopVisitedWidget = HomePageWidgetBlueprint.make({\n name: 'top-visited',\n params: {\n layout: defaultCardLayout,\n name: 'Top visited',\n components: () =>\n import('@backstage/plugin-home').then(m => ({\n Content: () => <m.HomePageTopVisited />,\n })),\n },\n});\n"],"names":[],"mappings":";;;;;AAoBA,MAAM,iBAAoB,GAAA;AAAA,EACxB,KAAO,EAAA;AAAA,IACL,UAAY,EAAA,CAAA;AAAA,IACZ,UAAY,EAAA,EAAA;AAAA,IACZ,cAAgB,EAAA;AAAA,GAClB;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,OAAS,EAAA,CAAA;AAAA,IACT,OAAS,EAAA,EAAA;AAAA,IACT,WAAa,EAAA;AAAA;AAEjB,CAAA;AAMa,MAAA,uBAAA,GAA0B,wBAAwB,IAAK,CAAA;AAAA,EAClE,IAAM,EA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A,IACR,IAAM,EAAA,kBAAA;AAAA,IACN,YAAY,MACV,OAAO,wBAAwB,CAAA,CAAE,KAAK,CAAM,CAAA,MAAA;AAAA,MAC1C,SAAS,CAAE,CAAA;AAAA,KACX,CAAA;AAAA;AAER,CAAC;AAMY,MAAA,gBAAA,GAAmB,wBAAwB,IAAK,CAAA;AAAA,EAC3D,IAAM,EAAA,aAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,MAAQ,EAAA,iBAAA;AAAA,IACR,IAAM,EAAA,aAAA;AAAA,IACN,YAAY,MACV,OAAO,wBAAwB,CAAA,CAAE,KAAK,CAAM,CAAA,MAAA;AAAA,MAC1C,OAAS,EAAA,sBAAO,GAAA,CAAA,CAAA,CAAE,oBAAF,EAAqB;AAAA,KACrC,CAAA;AAAA;AAER,CAAC;;;;"}
|
package/dist/alpha.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ declare const homepageTranslationRef: _backstage_frontend_plugin_api.Translation
|
|
|
47
47
|
readonly "entities.fetchError": string;
|
|
48
48
|
readonly "entities.emptyDescription": string;
|
|
49
49
|
readonly "entities.register": string;
|
|
50
|
-
readonly "entities.
|
|
50
|
+
readonly "entities.browseTheCatalog": string;
|
|
51
51
|
}>;
|
|
52
52
|
|
|
53
53
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { useMemo } from 'react';
|
|
2
|
+
import { useRef, useMemo } from 'react';
|
|
3
3
|
import { CustomHomepageGrid } from '@backstage/plugin-home';
|
|
4
4
|
import { createCardExtension } from '@backstage/plugin-home-react';
|
|
5
5
|
import GlobalStyles from '@mui/material/GlobalStyles';
|
|
@@ -7,11 +7,14 @@ import { useTheme } from '@mui/material/styles';
|
|
|
7
7
|
import 'react-grid-layout/css/styles.css';
|
|
8
8
|
import { dynamicHomePagePlugin } from '../plugin.esm.js';
|
|
9
9
|
import { useTranslation } from '../hooks/useTranslation.esm.js';
|
|
10
|
+
import { useContainerQuery } from '../hooks/useContainerQuery.esm.js';
|
|
10
11
|
import { getCardTitle, getCardDescription, isCardADefaultConfiguration } from '../utils/customizable-cards.esm.js';
|
|
11
12
|
|
|
12
13
|
const CustomizableGrid = ({ mountPoints }) => {
|
|
13
14
|
const theme = useTheme();
|
|
14
15
|
const { t } = useTranslation();
|
|
16
|
+
const gridContainerRef = useRef(null);
|
|
17
|
+
useContainerQuery(gridContainerRef, { notifyWindowResize: true });
|
|
15
18
|
const { children, config } = useMemo(() => {
|
|
16
19
|
const childDictionary = {};
|
|
17
20
|
const defaultConfig = [];
|
|
@@ -77,13 +80,20 @@ const CustomizableGrid = ({ mountPoints }) => {
|
|
|
77
80
|
}
|
|
78
81
|
),
|
|
79
82
|
/* @__PURE__ */ jsx(
|
|
80
|
-
|
|
83
|
+
"div",
|
|
81
84
|
{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
ref: gridContainerRef,
|
|
86
|
+
style: { width: "100%", minWidth: 0, boxSizing: "border-box" },
|
|
87
|
+
children: /* @__PURE__ */ jsx(
|
|
88
|
+
CustomHomepageGrid,
|
|
89
|
+
{
|
|
90
|
+
config,
|
|
91
|
+
preventCollision: false,
|
|
92
|
+
compactType: "vertical",
|
|
93
|
+
style: { margin: "-10px" },
|
|
94
|
+
children
|
|
95
|
+
}
|
|
96
|
+
)
|
|
87
97
|
}
|
|
88
98
|
)
|
|
89
99
|
] });
|
|
@@ -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 type { ReactElement } from 'react';\nimport { useMemo } from 'react';\n\nimport {\n CustomHomepageGrid,\n LayoutConfiguration,\n} from '@backstage/plugin-home';\nimport {\n ComponentParts,\n createCardExtension,\n} from '@backstage/plugin-home-react';\n\nimport GlobalStyles from '@mui/material/GlobalStyles';\nimport { useTheme } from '@mui/material/styles';\n\n// Removes the doubled scrollbar\nimport 'react-grid-layout/css/styles.css';\n\nimport { HomePageCardMountPoint } from '../types';\nimport { dynamicHomePagePlugin } from '../plugin';\nimport { useTranslation } from '../hooks/useTranslation';\nimport {\n isCardADefaultConfiguration,\n getCardTitle,\n getCardDescription,\n} from '../utils/customizable-cards';\n\n/**\n * @public\n */\nexport interface CustomizableGridProps {\n mountPoints: HomePageCardMountPoint[];\n}\n\n/**\n * @public\n */\nexport const CustomizableGrid = ({ mountPoints }: CustomizableGridProps) => {\n const theme = useTheme();\n const { t } = useTranslation();\n\n const { children, config } = useMemo(() => {\n // Children contains the additional / available cards a user can add.\n // Maps the card name to the actual card component.\n // Contains also the title to allow sorting before rendering.\n const childDictionary: Record<\n string,\n { child: ReactElement; title: string | undefined }\n > = {};\n\n // Config contains the default layout of the homepage\n const defaultConfig: LayoutConfiguration[] = [];\n\n mountPoints.forEach(mountPoint => {\n if (!mountPoint.config?.id) {\n return;\n }\n const id = mountPoint.config.id;\n const title = getCardTitle(t, mountPoint);\n const description = getCardDescription(t, mountPoint);\n\n const automaticallyWrapInInfoCard = false;\n\n const componentParts: ComponentParts = {\n Content: props => (\n <mountPoint.Component {...mountPoint.config!.props} {...props} />\n ),\n // Untested and unsupported for now!\n Actions: mountPoint.Actions as () => JSX.Element,\n // Untested and unsupported for now!\n Settings: mountPoint.Settings as () => JSX.Element,\n // This is a workaround to NOT automatically wrap in an InfoCard\n ContextProvider: automaticallyWrapInInfoCard\n ? undefined\n : props => (\n <mountPoint.Component {...mountPoint.config!.props} {...props} />\n ),\n };\n\n const cardExtension = createCardExtension({\n name: id,\n title,\n description,\n layout: mountPoint.config.cardLayout,\n settings: mountPoint.config.settings,\n components: () => Promise.resolve(componentParts),\n });\n\n const Card = dynamicHomePagePlugin.provide(cardExtension);\n\n childDictionary[id] = {\n child: <Card />,\n title,\n };\n\n if (isCardADefaultConfiguration(mountPoint)) {\n const layout = mountPoint.config?.layouts?.xl || {};\n\n defaultConfig.push({\n component: id,\n x: layout.x ?? 0,\n y: layout.y ?? 0,\n width: layout.w ?? 12,\n height: layout.h ?? 4,\n movable: true,\n deletable: true,\n resizable: true,\n });\n }\n });\n\n return {\n children: Object.values(childDictionary)\n .sort((a, b) =>\n a.title && b.title ? a.title.localeCompare(b.title) : 0,\n )\n .map(e => e.child),\n config: defaultConfig,\n };\n }, [mountPoints, t]);\n\n return (\n <>\n <GlobalStyles\n styles={{\n '[class*=\"makeStyles-settingsOverlay\"]': {\n backgroundColor:\n theme.palette.mode === 'dark'\n ? 'rgba(20, 20, 20, 0.95) !important'\n : 'rgba(40, 40, 40, 0.93) !important',\n },\n }}\n />\n <CustomHomepageGrid\n
|
|
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 { ReactElement } from 'react';\nimport { useMemo, useRef } from 'react';\n\nimport {\n CustomHomepageGrid,\n LayoutConfiguration,\n} from '@backstage/plugin-home';\nimport {\n ComponentParts,\n createCardExtension,\n} from '@backstage/plugin-home-react';\n\nimport GlobalStyles from '@mui/material/GlobalStyles';\nimport { useTheme } from '@mui/material/styles';\n\n// Removes the doubled scrollbar\nimport 'react-grid-layout/css/styles.css';\n\nimport { HomePageCardMountPoint } from '../types';\nimport { dynamicHomePagePlugin } from '../plugin';\nimport { useTranslation } from '../hooks/useTranslation';\nimport { useContainerQuery } from '../hooks/useContainerQuery';\nimport {\n isCardADefaultConfiguration,\n getCardTitle,\n getCardDescription,\n} from '../utils/customizable-cards';\n\n/**\n * @public\n */\nexport interface CustomizableGridProps {\n mountPoints: HomePageCardMountPoint[];\n}\n\n/**\n * @public\n */\nexport const CustomizableGrid = ({ mountPoints }: CustomizableGridProps) => {\n const theme = useTheme();\n const { t } = useTranslation();\n const gridContainerRef = useRef<HTMLDivElement>(null);\n useContainerQuery(gridContainerRef, { notifyWindowResize: true });\n\n const { children, config } = useMemo(() => {\n // Children contains the additional / available cards a user can add.\n // Maps the card name to the actual card component.\n // Contains also the title to allow sorting before rendering.\n const childDictionary: Record<\n string,\n { child: ReactElement; title: string | undefined }\n > = {};\n\n // Config contains the default layout of the homepage\n const defaultConfig: LayoutConfiguration[] = [];\n\n mountPoints.forEach(mountPoint => {\n if (!mountPoint.config?.id) {\n return;\n }\n const id = mountPoint.config.id;\n const title = getCardTitle(t, mountPoint);\n const description = getCardDescription(t, mountPoint);\n\n const automaticallyWrapInInfoCard = false;\n\n const componentParts: ComponentParts = {\n Content: props => (\n <mountPoint.Component {...mountPoint.config!.props} {...props} />\n ),\n // Untested and unsupported for now!\n Actions: mountPoint.Actions as () => JSX.Element,\n // Untested and unsupported for now!\n Settings: mountPoint.Settings as () => JSX.Element,\n // This is a workaround to NOT automatically wrap in an InfoCard\n ContextProvider: automaticallyWrapInInfoCard\n ? undefined\n : props => (\n <mountPoint.Component {...mountPoint.config!.props} {...props} />\n ),\n };\n\n const cardExtension = createCardExtension({\n name: id,\n title,\n description,\n layout: mountPoint.config.cardLayout,\n settings: mountPoint.config.settings,\n components: () => Promise.resolve(componentParts),\n });\n\n const Card = dynamicHomePagePlugin.provide(cardExtension);\n\n childDictionary[id] = {\n child: <Card />,\n title,\n };\n\n if (isCardADefaultConfiguration(mountPoint)) {\n const layout = mountPoint.config?.layouts?.xl || {};\n\n defaultConfig.push({\n component: id,\n x: layout.x ?? 0,\n y: layout.y ?? 0,\n width: layout.w ?? 12,\n height: layout.h ?? 4,\n movable: true,\n deletable: true,\n resizable: true,\n });\n }\n });\n\n return {\n children: Object.values(childDictionary)\n .sort((a, b) =>\n a.title && b.title ? a.title.localeCompare(b.title) : 0,\n )\n .map(e => e.child),\n config: defaultConfig,\n };\n }, [mountPoints, t]);\n\n return (\n <>\n <GlobalStyles\n styles={{\n '[class*=\"makeStyles-settingsOverlay\"]': {\n backgroundColor:\n theme.palette.mode === 'dark'\n ? 'rgba(20, 20, 20, 0.95) !important'\n : 'rgba(40, 40, 40, 0.93) !important',\n },\n }}\n />\n <div\n ref={gridContainerRef}\n style={{ width: '100%', minWidth: 0, boxSizing: 'border-box' }}\n >\n <CustomHomepageGrid\n config={config}\n preventCollision={false}\n compactType=\"vertical\"\n style={{ margin: '-10px' }}\n >\n {children}\n </CustomHomepageGrid>\n </div>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AA4DO,MAAM,gBAAmB,GAAA,CAAC,EAAE,WAAA,EAAyC,KAAA;AAC1E,EAAA,MAAM,QAAQ,QAAS,EAAA;AACvB,EAAM,MAAA,EAAE,CAAE,EA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AA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,YAAA;AAAA,MAAA;AAAA,QACC,MAAQ,EAAA;AAAA,UACN,uCAAyC,EAAA;AAAA,YACvC,eACE,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,KAAS,SACnB,mCACA,GAAA;AAAA;AACR;AACF;AAAA,KACF;AAAA,oBACA,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,GAAK,EAAA,gBAAA;AAAA,QACL,OAAO,EAAE,KAAA,EAAO,QAAQ,QAAU,EAAA,CAAA,EAAG,WAAW,YAAa,EAAA;AAAA,QAE7D,QAAA,kBAAA,GAAA;AAAA,UAAC,kBAAA;AAAA,UAAA;AAAA,YACC,MAAA;AAAA,YACA,gBAAkB,EAAA,KAAA;AAAA,YAClB,WAAY,EAAA,UAAA;AAAA,YACZ,KAAA,EAAO,EAAE,MAAA,EAAQ,OAAQ,EAAA;AAAA,YAExB;AAAA;AAAA;AACH;AAAA;AACF,GACF,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -18,7 +18,6 @@ import HomePageEntityIllustration from '../../images/homepage-entities-1.svg';
|
|
|
18
18
|
import { useEntities } from '../../hooks/useEntities.esm.js';
|
|
19
19
|
import { hasEntityIllustrationUserDismissed, addDismissedEntityIllustrationUsers } from '../../utils/utils.esm.js';
|
|
20
20
|
import { useTranslation } from '../../hooks/useTranslation.esm.js';
|
|
21
|
-
import { Trans } from '../Trans.esm.js';
|
|
22
21
|
import { containerGridItemSx } from '../../utils/GridItem.esm.js';
|
|
23
22
|
import { useContainerQuery } from '../../hooks/useContainerQuery.esm.js';
|
|
24
23
|
|
|
@@ -268,13 +267,7 @@ const EntitySection = () => {
|
|
|
268
267
|
},
|
|
269
268
|
children: [
|
|
270
269
|
content,
|
|
271
|
-
entities?.length > 0 && /* @__PURE__ */ jsx(Box, { sx: { pt: 2 }, children: /* @__PURE__ */ jsx(ViewMoreLink, { to: "/catalog", children:
|
|
272
|
-
Trans,
|
|
273
|
-
{
|
|
274
|
-
message: "entities.viewAll",
|
|
275
|
-
params: { count: data?.totalItems?.toString() || "" }
|
|
276
|
-
}
|
|
277
|
-
) }) })
|
|
270
|
+
entities?.length > 0 && /* @__PURE__ */ jsx(Box, { sx: { pt: 2 }, children: /* @__PURE__ */ jsx(ViewMoreLink, { to: "/catalog", children: t("entities.browseTheCatalog") }) })
|
|
278
271
|
]
|
|
279
272
|
}
|
|
280
273
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntitySection.esm.js","sources":["../../../src/components/EntitySection/EntitySection.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 { ReactNode } from 'react';\n\nimport { useState, useEffect, Fragment, useRef, useCallback } from 'react';\n\nimport {\n CodeSnippet,\n WarningPanel,\n Link as BackstageLink,\n} from '@backstage/core-components';\nimport { useUserProfile } from '@backstage/plugin-user-settings';\n\nimport Grid from '@mui/material/Grid';\nimport Box from '@mui/material/Box';\nimport Card from '@mui/material/Card';\nimport IconButton from '@mui/material/IconButton';\nimport Skeleton from '@mui/material/Skeleton';\nimport Typography from '@mui/material/Typography';\nimport CloseIcon from '@mui/icons-material/Close';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport CardContent from '@mui/material/CardContent';\nimport { useTheme, styled } from '@mui/material/styles';\n\nimport EntityCard from './EntityCard';\nimport { ViewMoreLink } from './ViewMoreLink';\nimport HomePageEntityIllustration from '../../images/homepage-entities-1.svg';\nimport { useEntities } from '../../hooks/useEntities';\nimport {\n addDismissedEntityIllustrationUsers,\n hasEntityIllustrationUserDismissed,\n} from '../../utils/utils';\nimport { useTranslation } from '../../hooks/useTranslation';\nimport { Trans } from '../Trans';\nimport { containerGridItemSx } from '../../utils/GridItem';\nimport {\n useContainerQuery,\n type ContainerSize,\n} from '../../hooks/useContainerQuery';\n\nconst StyledLink = styled(BackstageLink)(({ theme }) => ({\n textDecoration: 'none',\n padding: theme.spacing(1, 1.5),\n fontSize: '16px',\n display: 'inline-flex',\n border: `1px solid ${theme.palette.primary.main}`,\n borderRadius: 4,\n}));\n\nexport const EntitySection = () => {\n const theme = useTheme();\n const { t } = useTranslation();\n const { displayName, loading: profileLoading } = useUserProfile();\n const [isRemoveFirstCard, setIsRemoveFirstCard] = useState(false);\n const [showDiscoveryCard, setShowDiscoveryCard] = useState(true);\n const [imgLoaded, setImgLoaded] = useState(false);\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerSize = useContainerQuery(containerRef);\n\n const entityCardCount =\n containerSize === 'xs' || containerSize === 'sm' ? 2 : 4;\n\n const illustrationWidthMap: Partial<Record<ContainerSize, number>> = {\n md: 180,\n lg: 220,\n xl: 266,\n };\n const illustrationWidth = illustrationWidthMap[containerSize] ?? 266;\n\n const visibleEntitiesCount = (() => {\n const isWide =\n containerSize === 'xl' ||\n containerSize === 'lg' ||\n containerSize === 'md';\n\n if (!isWide) return entityCardCount;\n\n return isRemoveFirstCard ? entityCardCount : entityCardCount - 2;\n })();\n\n useEffect(() => {\n const isUserDismissedEntityIllustration =\n hasEntityIllustrationUserDismissed(displayName);\n setIsRemoveFirstCard(isUserDismissedEntityIllustration);\n }, [displayName]);\n\n const handleClose = useCallback(() => {\n setShowDiscoveryCard(false);\n setTimeout(() => {\n addDismissedEntityIllustrationUsers(displayName);\n setIsRemoveFirstCard(true);\n }, 500);\n }, [displayName]);\n\n const { data, error, isLoading } = useEntities({\n kind: ['Component', 'API', 'Resource', 'System'],\n });\n\n const entities = data?.items ?? [];\n\n let content: ReactNode;\n\n if (isLoading) {\n content = (\n <Box\n sx={{\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n }}\n >\n <CircularProgress />\n </Box>\n );\n } else if (!data) {\n content = (\n <WarningPanel severity=\"error\" title={t('entities.fetchError')}>\n <CodeSnippet\n language=\"text\"\n text={error?.toString() ?? t('entities.error')}\n />\n </WarningPanel>\n );\n } else {\n content = (\n <Box sx={{ padding: '8px 8px 8px 0' }}>\n <Fragment>\n <Grid container spacing={1} alignItems=\"stretch\">\n {/* hiding discovery card on small containers */}\n {!isRemoveFirstCard &&\n !profileLoading &&\n containerSize !== 'xs' &&\n containerSize !== 'sm' && (\n <Grid item sx={containerGridItemSx({ md: 4 })}>\n <Card\n elevation={0}\n sx={{\n height: '100%',\n border: `1px solid ${theme.palette.grey[400]}`,\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n position: 'relative',\n transition:\n 'opacity 0.5s ease-out, transform 0.5s ease-in-out',\n opacity: showDiscoveryCard ? 1 : 0,\n transform: showDiscoveryCard\n ? 'translateX(0)'\n : 'translateX(-50px)',\n }}\n >\n <Box\n sx={{\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n }}\n >\n {!imgLoaded && (\n <Skeleton\n variant=\"rectangular\"\n height={300}\n sx={{\n borderRadius: 3,\n width: illustrationWidth,\n }}\n />\n )}\n <Box\n component=\"img\"\n src={HomePageEntityIllustration}\n onLoad={() => setImgLoaded(true)}\n alt=\"\"\n height={300}\n sx={{\n width: illustrationWidth,\n }}\n />\n <Box sx={{ p: 2 }}>\n <Box sx={{ p: 2 }}>\n <Typography variant=\"body2\" paragraph>\n {t('entities.description')}\n </Typography>\n </Box>\n {entities?.length > 0 && (\n <IconButton\n onClick={handleClose}\n aria-label={t('entities.close')}\n style={{\n position: 'absolute',\n top: '8px',\n right: '8px',\n }}\n >\n <CloseIcon\n style={{ width: '16px', height: '16px' }}\n />\n </IconButton>\n )}\n </Box>\n </Box>\n </Card>\n </Grid>\n )}\n {entities?.slice(0, visibleEntitiesCount).map((item: any) => (\n <Grid\n item\n sx={containerGridItemSx({\n xs: 12,\n sm: 6,\n md: isRemoveFirstCard ? 3 : 4,\n })}\n key={item.metadata.name}\n >\n <EntityCard\n entity={item}\n title={item.metadata.title ?? item.metadata.name}\n version=\"latest\"\n description={item.metadata.description ?? ''}\n tags={item.metadata?.tags ?? []}\n kind={item.kind}\n />\n </Grid>\n ))}\n {entities?.length === 0 && (\n <Grid\n item\n sx={containerGridItemSx({\n sm: 12,\n md: isRemoveFirstCard ? 12 : 8,\n })}\n >\n <Box\n sx={{\n height: '100%',\n minHeight: 300,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n border: muiTheme =>\n `1px solid ${muiTheme.palette.grey[400]}`,\n borderRadius: 3,\n overflow: 'hidden',\n }}\n >\n <CardContent>\n <Typography sx={{ fontSize: '1.125rem', fontWeight: 500 }}>\n {t('entities.empty')}\n </Typography>\n <Typography\n sx={{\n fontSize: '0.875rem',\n fontWeight: 400,\n mt: '20px',\n mb: '16px',\n }}\n >\n {t('entities.emptyDescription')}\n </Typography>\n <StyledLink to=\"/catalog-import\" underline=\"none\">\n {t('entities.register')}\n </StyledLink>\n </CardContent>\n </Box>\n </Grid>\n )}\n </Grid>\n </Fragment>\n </Box>\n );\n }\n\n return (\n <Card\n elevation={0}\n sx={{\n padding: '24px',\n border: muitheme => `1px solid ${muitheme.palette.grey[300]}`,\n containerType: 'inline-size',\n display: 'flex',\n flexDirection: 'column',\n }}\n >\n <Typography\n variant=\"h3\"\n sx={{\n display: 'flex',\n alignItems: 'center',\n fontWeight: '500',\n fontSize: '1.5rem',\n flexShrink: 0,\n }}\n >\n {t('entities.title')}\n </Typography>\n <Box\n ref={containerRef}\n sx={{\n flex: 1,\n minHeight: 0,\n overflowY: 'auto',\n mt: 1,\n }}\n >\n {content}\n {entities?.length > 0 && (\n <Box sx={{ pt: 2 }}>\n <ViewMoreLink to=\"/catalog\">\n <Trans\n message=\"entities.viewAll\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AAA;AAAA,kBACR,QAAQ,EAAE,KAAA,EAAO,MAAM,UAAY,EAAA,QAAA,MAAc,EAAG;AAAA;AAAA,iBAExD,CACF,EAAA;AAAA;AAAA;AAAA;AAEJ;AAAA;AAAA,GACF;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"EntitySection.esm.js","sources":["../../../src/components/EntitySection/EntitySection.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 { ReactNode } from 'react';\n\nimport { useState, useEffect, Fragment, useRef, useCallback } from 'react';\n\nimport {\n CodeSnippet,\n WarningPanel,\n Link as BackstageLink,\n} from '@backstage/core-components';\nimport { useUserProfile } from '@backstage/plugin-user-settings';\n\nimport Grid from '@mui/material/Grid';\nimport Box from '@mui/material/Box';\nimport Card from '@mui/material/Card';\nimport IconButton from '@mui/material/IconButton';\nimport Skeleton from '@mui/material/Skeleton';\nimport Typography from '@mui/material/Typography';\nimport CloseIcon from '@mui/icons-material/Close';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport CardContent from '@mui/material/CardContent';\nimport { useTheme, styled } from '@mui/material/styles';\n\nimport EntityCard from './EntityCard';\nimport { ViewMoreLink } from './ViewMoreLink';\nimport HomePageEntityIllustration from '../../images/homepage-entities-1.svg';\nimport { useEntities } from '../../hooks/useEntities';\nimport {\n addDismissedEntityIllustrationUsers,\n hasEntityIllustrationUserDismissed,\n} from '../../utils/utils';\nimport { useTranslation } from '../../hooks/useTranslation';\nimport { containerGridItemSx } from '../../utils/GridItem';\nimport {\n useContainerQuery,\n type ContainerSize,\n} from '../../hooks/useContainerQuery';\n\nconst StyledLink = styled(BackstageLink)(({ theme }) => ({\n textDecoration: 'none',\n padding: theme.spacing(1, 1.5),\n fontSize: '16px',\n display: 'inline-flex',\n border: `1px solid ${theme.palette.primary.main}`,\n borderRadius: 4,\n}));\n\nexport const EntitySection = () => {\n const theme = useTheme();\n const { t } = useTranslation();\n const { displayName, loading: profileLoading } = useUserProfile();\n const [isRemoveFirstCard, setIsRemoveFirstCard] = useState(false);\n const [showDiscoveryCard, setShowDiscoveryCard] = useState(true);\n const [imgLoaded, setImgLoaded] = useState(false);\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerSize = useContainerQuery(containerRef);\n\n const entityCardCount =\n containerSize === 'xs' || containerSize === 'sm' ? 2 : 4;\n\n const illustrationWidthMap: Partial<Record<ContainerSize, number>> = {\n md: 180,\n lg: 220,\n xl: 266,\n };\n const illustrationWidth = illustrationWidthMap[containerSize] ?? 266;\n\n const visibleEntitiesCount = (() => {\n const isWide =\n containerSize === 'xl' ||\n containerSize === 'lg' ||\n containerSize === 'md';\n\n if (!isWide) return entityCardCount;\n\n return isRemoveFirstCard ? entityCardCount : entityCardCount - 2;\n })();\n\n useEffect(() => {\n const isUserDismissedEntityIllustration =\n hasEntityIllustrationUserDismissed(displayName);\n setIsRemoveFirstCard(isUserDismissedEntityIllustration);\n }, [displayName]);\n\n const handleClose = useCallback(() => {\n setShowDiscoveryCard(false);\n setTimeout(() => {\n addDismissedEntityIllustrationUsers(displayName);\n setIsRemoveFirstCard(true);\n }, 500);\n }, [displayName]);\n\n const { data, error, isLoading } = useEntities({\n kind: ['Component', 'API', 'Resource', 'System'],\n });\n\n const entities = data?.items ?? [];\n\n let content: ReactNode;\n\n if (isLoading) {\n content = (\n <Box\n sx={{\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n }}\n >\n <CircularProgress />\n </Box>\n );\n } else if (!data) {\n content = (\n <WarningPanel severity=\"error\" title={t('entities.fetchError')}>\n <CodeSnippet\n language=\"text\"\n text={error?.toString() ?? t('entities.error')}\n />\n </WarningPanel>\n );\n } else {\n content = (\n <Box sx={{ padding: '8px 8px 8px 0' }}>\n <Fragment>\n <Grid container spacing={1} alignItems=\"stretch\">\n {/* hiding discovery card on small containers */}\n {!isRemoveFirstCard &&\n !profileLoading &&\n containerSize !== 'xs' &&\n containerSize !== 'sm' && (\n <Grid item sx={containerGridItemSx({ md: 4 })}>\n <Card\n elevation={0}\n sx={{\n height: '100%',\n border: `1px solid ${theme.palette.grey[400]}`,\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n position: 'relative',\n transition:\n 'opacity 0.5s ease-out, transform 0.5s ease-in-out',\n opacity: showDiscoveryCard ? 1 : 0,\n transform: showDiscoveryCard\n ? 'translateX(0)'\n : 'translateX(-50px)',\n }}\n >\n <Box\n sx={{\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n }}\n >\n {!imgLoaded && (\n <Skeleton\n variant=\"rectangular\"\n height={300}\n sx={{\n borderRadius: 3,\n width: illustrationWidth,\n }}\n />\n )}\n <Box\n component=\"img\"\n src={HomePageEntityIllustration}\n onLoad={() => setImgLoaded(true)}\n alt=\"\"\n height={300}\n sx={{\n width: illustrationWidth,\n }}\n />\n <Box sx={{ p: 2 }}>\n <Box sx={{ p: 2 }}>\n <Typography variant=\"body2\" paragraph>\n {t('entities.description')}\n </Typography>\n </Box>\n {entities?.length > 0 && (\n <IconButton\n onClick={handleClose}\n aria-label={t('entities.close')}\n style={{\n position: 'absolute',\n top: '8px',\n right: '8px',\n }}\n >\n <CloseIcon\n style={{ width: '16px', height: '16px' }}\n />\n </IconButton>\n )}\n </Box>\n </Box>\n </Card>\n </Grid>\n )}\n {entities?.slice(0, visibleEntitiesCount).map((item: any) => (\n <Grid\n item\n sx={containerGridItemSx({\n xs: 12,\n sm: 6,\n md: isRemoveFirstCard ? 3 : 4,\n })}\n key={item.metadata.name}\n >\n <EntityCard\n entity={item}\n title={item.metadata.title ?? item.metadata.name}\n version=\"latest\"\n description={item.metadata.description ?? ''}\n tags={item.metadata?.tags ?? []}\n kind={item.kind}\n />\n </Grid>\n ))}\n {entities?.length === 0 && (\n <Grid\n item\n sx={containerGridItemSx({\n sm: 12,\n md: isRemoveFirstCard ? 12 : 8,\n })}\n >\n <Box\n sx={{\n height: '100%',\n minHeight: 300,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n border: muiTheme =>\n `1px solid ${muiTheme.palette.grey[400]}`,\n borderRadius: 3,\n overflow: 'hidden',\n }}\n >\n <CardContent>\n <Typography sx={{ fontSize: '1.125rem', fontWeight: 500 }}>\n {t('entities.empty')}\n </Typography>\n <Typography\n sx={{\n fontSize: '0.875rem',\n fontWeight: 400,\n mt: '20px',\n mb: '16px',\n }}\n >\n {t('entities.emptyDescription')}\n </Typography>\n <StyledLink to=\"/catalog-import\" underline=\"none\">\n {t('entities.register')}\n </StyledLink>\n </CardContent>\n </Box>\n </Grid>\n )}\n </Grid>\n </Fragment>\n </Box>\n );\n }\n\n return (\n <Card\n elevation={0}\n sx={{\n padding: '24px',\n border: muitheme => `1px solid ${muitheme.palette.grey[300]}`,\n containerType: 'inline-size',\n display: 'flex',\n flexDirection: 'column',\n }}\n >\n <Typography\n variant=\"h3\"\n sx={{\n display: 'flex',\n alignItems: 'center',\n fontWeight: '500',\n fontSize: '1.5rem',\n flexShrink: 0,\n }}\n >\n {t('entities.title')}\n </Typography>\n <Box\n ref={containerRef}\n sx={{\n flex: 1,\n minHeight: 0,\n overflowY: 'auto',\n mt: 1,\n }}\n >\n {content}\n {entities?.length > 0 && (\n <Box sx={{ pt: 2 }}>\n <ViewMoreLink to=\"/catalog\">\n {t('entities.browseTheCatalog')}\n </ViewMoreLink>\n </Box>\n )}\n </Box>\n </Card>\n );\n};\n"],"names":["BackstageLink"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAoDA,MAAM,aAAa,MAAO,CAAAA,IAAa,EAAE,CAAC,EAAE,OAAa,MAAA;AAAA,EACvD,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A,UAAA,EAAa,SAAS,OAAQ,CAAA,IAAA,CAAK,GAAG,CAAC,CAAA,CAAA;AAAA,QAC3D,aAAe,EAAA,aAAA;AAAA,QACf,OAAS,EAAA,MAAA;AAAA,QACT,aAAe,EAAA;AAAA,OACjB;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAAC,UAAA;AAAA,UAAA;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,QAAA;AAAA,cACV,UAAY,EAAA;AAAA,aACd;AAAA,YAEC,YAAE,gBAAgB;AAAA;AAAA,SACrB;AAAA,wBACA,IAAA;AAAA,UAAC,GAAA;AAAA,UAAA;AAAA,YACC,GAAK,EAAA,YAAA;AAAA,YACL,EAAI,EAAA;AAAA,cACF,IAAM,EAAA,CAAA;AAAA,cACN,SAAW,EAAA,CAAA;AAAA,cACX,SAAW,EAAA,MAAA;AAAA,cACX,EAAI,EAAA;AAAA,aACN;AAAA,YAEC,QAAA,EAAA;AAAA,cAAA,OAAA;AAAA,cACA,UAAU,MAAS,GAAA,CAAA,oBACjB,GAAA,CAAA,GAAA,EAAA,EAAI,IAAI,EAAE,EAAA,EAAI,CAAE,EAAA,EACf,8BAAC,YAAa,EAAA,EAAA,EAAA,EAAG,YACd,QAAE,EAAA,CAAA,CAAA,2BAA2B,GAChC,CACF,EAAA;AAAA;AAAA;AAAA;AAEJ;AAAA;AAAA,GACF;AAEJ;;;;"}
|
|
@@ -19,7 +19,9 @@ const resolveContainerSize = (width) => {
|
|
|
19
19
|
if (width >= CONTAINER_BREAKPOINTS.sm) return "sm";
|
|
20
20
|
return "xs";
|
|
21
21
|
};
|
|
22
|
-
const
|
|
22
|
+
const NOTIFY_WIDTH_EPSILON = 0.5;
|
|
23
|
+
const useContainerQuery = (ref, options) => {
|
|
24
|
+
const notifyWindowResize = options?.notifyWindowResize ?? false;
|
|
23
25
|
const [containerSize, setContainerSize] = useState("lg");
|
|
24
26
|
useLayoutEffect(() => {
|
|
25
27
|
const el = ref.current;
|
|
@@ -28,14 +30,47 @@ const useContainerQuery = (ref) => {
|
|
|
28
30
|
const next = resolveContainerSize(width);
|
|
29
31
|
setContainerSize((prev) => prev === next ? prev : next);
|
|
30
32
|
};
|
|
31
|
-
|
|
33
|
+
let lastNotifiedWidth = null;
|
|
34
|
+
let resizeNotifyRafId = null;
|
|
35
|
+
let pendingNotifyWidth = null;
|
|
36
|
+
const scheduleWindowResizeNotify = (width) => {
|
|
37
|
+
if (!notifyWindowResize || typeof window === "undefined") {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
pendingNotifyWidth = width;
|
|
41
|
+
if (resizeNotifyRafId !== null) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
resizeNotifyRafId = window.requestAnimationFrame(() => {
|
|
45
|
+
resizeNotifyRafId = null;
|
|
46
|
+
const w = pendingNotifyWidth;
|
|
47
|
+
if (w === null) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if (lastNotifiedWidth !== null && Math.abs(w - lastNotifiedWidth) < NOTIFY_WIDTH_EPSILON) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
lastNotifiedWidth = w;
|
|
54
|
+
window.dispatchEvent(new Event("resize"));
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
const onObservedWidth = (width) => {
|
|
58
|
+
updateSize(width);
|
|
59
|
+
scheduleWindowResizeNotify(width);
|
|
60
|
+
};
|
|
61
|
+
onObservedWidth(el.getBoundingClientRect().width);
|
|
32
62
|
const observer = new ResizeObserver((entries) => {
|
|
33
63
|
if (!entries.length) return;
|
|
34
|
-
|
|
64
|
+
onObservedWidth(entries[0].contentRect.width);
|
|
35
65
|
});
|
|
36
66
|
observer.observe(el);
|
|
37
|
-
return () =>
|
|
38
|
-
|
|
67
|
+
return () => {
|
|
68
|
+
observer.disconnect();
|
|
69
|
+
if (resizeNotifyRafId !== null && typeof window !== "undefined") {
|
|
70
|
+
window.cancelAnimationFrame(resizeNotifyRafId);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
}, [ref, notifyWindowResize]);
|
|
39
74
|
return containerSize;
|
|
40
75
|
};
|
|
41
76
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useContainerQuery.esm.js","sources":["../../src/hooks/useContainerQuery.ts"],"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 * A React hook that observes the width of a DOM element and\n * returns a responsive \"container size\" (`xs | sm | md | lg | xl`)\n * based on predefined breakpoints.\n *\n * Unlike window-based media queries, this hook is **container-based**:\n * the returned size depends on the element's own width, not the viewport.\n *\n * Internally, it:\n * - Reads the element's initial layout width on mount\n * - Uses ResizeObserver to track width changes\n * - Maps the width to MUI-like breakpoints\n * - Updates state only when the breakpoint actually changes\n * */\n\nimport { useLayoutEffect, useState, RefObject } from 'react';\n\n// Container Breakpoints (MUI-like, but container-based)\nexport type ContainerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\nexport const CONTAINER_BREAKPOINTS = {\n xs: 0, // <600\n sm: 600, // ≥600\n md: 900, // ≥900\n lg: 1200, // ≥1200\n xl: 1536, // ≥1536\n} as const;\n\n// Width → containerSize mapper\nconst resolveContainerSize = (width: number): ContainerSize => {\n if (width >= CONTAINER_BREAKPOINTS.xl) return 'xl';\n if (width >= CONTAINER_BREAKPOINTS.lg) return 'lg';\n if (width >= CONTAINER_BREAKPOINTS.md) return 'md';\n if (width >= CONTAINER_BREAKPOINTS.sm) return 'sm';\n return 'xs';\n};\n\n// Hook: useContainerQuery\n\nexport const useContainerQuery = (\n ref: RefObject<HTMLElement>,\n): ContainerSize => {\n const [containerSize, setContainerSize] = useState<ContainerSize>('lg');\n\n useLayoutEffect(() => {\n const el = ref.current;\n if (!el) return undefined;\n\n const updateSize = (width: number) => {\n const next = resolveContainerSize(width);\n setContainerSize(prev => (prev === next ? prev : next));\n };\n\n
|
|
1
|
+
{"version":3,"file":"useContainerQuery.esm.js","sources":["../../src/hooks/useContainerQuery.ts"],"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 * A React hook that observes the width of a DOM element and\n * returns a responsive \"container size\" (`xs | sm | md | lg | xl`)\n * based on predefined breakpoints.\n *\n * Unlike window-based media queries, this hook is **container-based**:\n * the returned size depends on the element's own width, not the viewport.\n *\n * Internally, it:\n * - Reads the element's initial layout width on mount\n * - Uses ResizeObserver to track width changes\n * - Maps the width to MUI-like breakpoints\n * - Updates state only when the breakpoint actually changes\n *\n * Optional `notifyWindowResize`: when true, also dispatches a `window` `resize`\n * event when the observed width changes meaningfully. Dispatches are coalesced\n * to at most once per animation frame to avoid resize storms during continuous\n * container resizes. That lets react-grid-layout's `WidthProvider` (used by\n * `CustomHomepageGrid`) remeasure when the main column shrinks without a\n * viewport resize (e.g. RHDH docked drawer).\n * */\n\nimport { useLayoutEffect, useState, RefObject } from 'react';\n\nexport type UseContainerQueryOptions = {\n notifyWindowResize?: boolean;\n};\n\n// Container Breakpoints (MUI-like, but container-based)\nexport type ContainerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\nexport const CONTAINER_BREAKPOINTS = {\n xs: 0, // <600\n sm: 600, // ≥600\n md: 900, // ≥900\n lg: 1200, // ≥1200\n xl: 1536, // ≥1536\n} as const;\n\n// Width → containerSize mapper\nconst resolveContainerSize = (width: number): ContainerSize => {\n if (width >= CONTAINER_BREAKPOINTS.xl) return 'xl';\n if (width >= CONTAINER_BREAKPOINTS.lg) return 'lg';\n if (width >= CONTAINER_BREAKPOINTS.md) return 'md';\n if (width >= CONTAINER_BREAKPOINTS.sm) return 'sm';\n return 'xs';\n};\n\n/** Ignore sub-pixel jitter when deciding whether to fire a synthetic resize. */\nconst NOTIFY_WIDTH_EPSILON = 0.5;\n\n// Hook: useContainerQuery\n\nexport const useContainerQuery = (\n ref: RefObject<HTMLElement>,\n options?: UseContainerQueryOptions,\n): ContainerSize => {\n const notifyWindowResize = options?.notifyWindowResize ?? false;\n const [containerSize, setContainerSize] = useState<ContainerSize>('lg');\n\n useLayoutEffect(() => {\n const el = ref.current;\n if (!el) return undefined;\n\n const updateSize = (width: number) => {\n const next = resolveContainerSize(width);\n setContainerSize(prev => (prev === next ? prev : next));\n };\n\n let lastNotifiedWidth: number | null = null;\n let resizeNotifyRafId: number | null = null;\n let pendingNotifyWidth: number | null = null;\n\n const scheduleWindowResizeNotify = (width: number) => {\n if (!notifyWindowResize || typeof window === 'undefined') {\n return;\n }\n pendingNotifyWidth = width;\n if (resizeNotifyRafId !== null) {\n return;\n }\n resizeNotifyRafId = window.requestAnimationFrame(() => {\n resizeNotifyRafId = null;\n const w = pendingNotifyWidth;\n if (w === null) {\n return;\n }\n if (\n lastNotifiedWidth !== null &&\n Math.abs(w - lastNotifiedWidth) < NOTIFY_WIDTH_EPSILON\n ) {\n return;\n }\n lastNotifiedWidth = w;\n window.dispatchEvent(new Event('resize'));\n });\n };\n\n const onObservedWidth = (width: number) => {\n updateSize(width);\n scheduleWindowResizeNotify(width);\n };\n\n onObservedWidth(el.getBoundingClientRect().width);\n\n const observer = new ResizeObserver(entries => {\n if (!entries.length) return;\n onObservedWidth(entries[0].contentRect.width);\n });\n\n observer.observe(el);\n return () => {\n observer.disconnect();\n if (resizeNotifyRafId !== null && typeof window !== 'undefined') {\n window.cancelAnimationFrame(resizeNotifyRafId);\n }\n };\n }, [ref, notifyWindowResize]);\n\n return containerSize;\n};\n"],"names":[],"mappings":";;AA+CO,MAAM,qBAAwB,GAAA;AAAA,EACnC,EAAI,EAAA,CAAA;AAAA;AAAA,EACJ,EAAI,EAAA,GAAA;AAAA;AAAA,EACJ,EAAI,EAAA,GAAA;AAAA;AAAA,EACJ,EAAI,EAAA,IAAA;AAAA;AAAA,EACJ,EAAI,EAAA;AAAA;AACN;AAGA,MAAM,oBAAA,GAAuB,CAAC,KAAiC,KAAA;AAC7D,EAAI,IAAA,KAAA,IAAS,qBAAsB,CAAA,EAAA,EAAW,OAAA,IAAA;AAC9C,EAAI,IAAA,KAAA,IAAS,qBAAsB,CAAA,EAAA,EAAW,OAAA,IAAA;AAC9C,EAAI,IAAA,KAAA,IAAS,qBAAsB,CAAA,EAAA,EAAW,OAAA,IAAA;AAC9C,EAAI,IAAA,KAAA,IAAS,qBAAsB,CAAA,EAAA,EAAW,OAAA,IAAA;AAC9C,EAAO,OAAA,IAAA;AACT,CAAA;AAGA,MAAM,oBAAuB,GAAA,GAAA;AAIhB,MAAA,iBAAA,GAAoB,CAC/B,GAAA,EACA,OACkB,KAAA;AAClB,EAAM,MAAA,kBAAA,GAAqB,SAAS,kBAAsB,IAAA,KAAA;AAC1D,EAAA,MAAM,CAAC,aAAA,EAAe,gBAAgB,CAAA,GAAI,SAAwB,IAAI,CAAA;AAEtE,EAAA,eAAA,CAAgB,MAAM;AACpB,IAAA,MAAM,KAAK,GAAI,CAAA,OAAA;AACf,IAAI,IAAA,CAAC,IAAW,OAAA,SAAA;AAEhB,IAAM,MAAA,UAA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AI,IAAA,CAAC,QAAQ,MAAQ,EAAA;AACrB,MAAA,eAAA,CAAgB,OAAQ,CAAA,CAAC,CAAE,CAAA,WAAA,CAAY,KAAK,CAAA;AAAA,KAC7C,CAAA;AAED,IAAA,QAAA,CAAS,QAAQ,EAAE,CAAA;AACnB,IAAA,OAAO,MAAM;AACX,MAAA,QAAA,CAAS,UAAW,EAAA;AACpB,MAAA,IAAI,iBAAsB,KAAA,IAAA,IAAQ,OAAO,MAAA,KAAW,WAAa,EAAA;AAC/D,QAAA,MAAA,CAAO,qBAAqB,iBAAiB,CAAA;AAAA;AAC/C,KACF;AAAA,GACC,EAAA,CAAC,GAAK,EAAA,kBAAkB,CAAC,CAAA;AAE5B,EAAO,OAAA,aAAA;AACT;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import { ClockConfig, StarredEntitiesProps, VisitedByTypeProps, FeaturedDocsCardProps } from '@backstage/plugin-home';
|
|
2
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
2
|
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
4
3
|
import { ComponentType } from 'react';
|
|
4
|
+
import { ClockConfig, StarredEntitiesProps, VisitedByTypeProps, FeaturedDocsCardProps } from '@backstage/plugin-home';
|
|
5
5
|
import { CardLayout, CardSettings } from '@backstage/plugin-home-react';
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* @public
|
|
9
|
-
*/
|
|
10
|
-
interface WorldClockProps {
|
|
11
|
-
worldClocks: ClockConfig[];
|
|
12
|
-
timeFormat?: Intl.DateTimeFormatOptions;
|
|
13
|
-
justifyContent?: 'space-between' | 'space-around';
|
|
14
|
-
}
|
|
15
|
-
|
|
16
7
|
/**
|
|
17
8
|
* @public
|
|
18
9
|
*/
|
|
@@ -98,6 +89,15 @@ interface PlaceholderProps {
|
|
|
98
89
|
debugContent?: string;
|
|
99
90
|
}
|
|
100
91
|
|
|
92
|
+
/**
|
|
93
|
+
* @public
|
|
94
|
+
*/
|
|
95
|
+
interface WorldClockProps {
|
|
96
|
+
worldClocks: ClockConfig[];
|
|
97
|
+
timeFormat?: Intl.DateTimeFormatOptions;
|
|
98
|
+
justifyContent?: 'space-between' | 'space-around';
|
|
99
|
+
}
|
|
100
|
+
|
|
101
101
|
/**
|
|
102
102
|
* @public
|
|
103
103
|
*/
|
|
@@ -44,7 +44,7 @@ const homepageTranslationDe = createTranslationMessages({
|
|
|
44
44
|
"entities.empty": "Noch kein Software-Katalog hinzugef\xFCgt",
|
|
45
45
|
"entities.emptyDescription": "Sobald Software-Kataloge hinzugef\xFCgt werden, wird dieser Bereich relevante Inhalte anzeigen, die auf Ihre Erfahrung zugeschnitten sind.",
|
|
46
46
|
"entities.register": "Komponente registrieren",
|
|
47
|
-
"entities.
|
|
47
|
+
"entities.browseTheCatalog": "Katalog durchsuchen"
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"de.esm.js","sources":["../../src/translations/de.ts"],"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 { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { homepageTranslationRef } from './ref';\n\n/**\n * German translation for Homepage.\n * @public\n */\nconst homepageTranslationDe = createTranslationMessages({\n ref: homepageTranslationRef,\n messages: {\n 'header.welcome': 'Willkommen zurück!',\n 'header.welcomePersonalized': 'Willkommen zurück, {{name}}!',\n 'header.local': 'Lokal',\n 'homePage.empty':\n 'Keine Homepage-Karten (Einbindungspunkte) konfiguriert oder gefunden.',\n 'search.placeholder': 'Suchen',\n 'quickAccess.title': 'Schnellzugriff',\n 'quickAccess.fetchError': 'Daten konnten nicht abgerufen werden.',\n 'quickAccess.error': 'Unbekannter Fehler',\n 'featuredDocs.learnMore': ' Mehr erfahren',\n 'templates.title': 'Vorlagen erkunden',\n 'templates.fetchError': 'Daten konnten nicht abgerufen werden.',\n 'templates.error': 'Unbekannter Fehler',\n 'templates.empty': 'Noch keine Vorlagen hinzugefügt',\n 'templates.emptyDescription':\n 'Sobald Vorlagen hinzugefügt werden, wird dieser Bereich relevante Inhalte anzeigen, die auf Ihre Erfahrung zugeschnitten sind.',\n 'templates.register': 'Vorlage registrieren',\n 'templates.viewAll': 'Alle {{count}} Vorlagen anzeigen',\n 'onboarding.greeting.goodMorning': 'Guten Morgen',\n 'onboarding.greeting.goodAfternoon': 'Guten Tag',\n 'onboarding.greeting.goodEvening': 'Guten Abend',\n 'onboarding.guest': 'Gast',\n 'onboarding.getStarted.title': 'Erste Schritte',\n 'onboarding.getStarted.description':\n 'Lernen Sie Red Hat Developer Hub kennen.',\n 'onboarding.getStarted.buttonText': 'Dokumentation lesen',\n 'onboarding.getStarted.ariaLabel':\n 'Dokumentation lesen (öffnet in neuem Tab)',\n 'onboarding.explore.title': 'Erkunden',\n 'onboarding.explore.description':\n 'Erkunden Sie Komponenten, APIs und Vorlagen.',\n 'onboarding.explore.buttonText': 'Zum Katalog gehen',\n 'onboarding.explore.ariaLabel': 'Zum Katalog gehen',\n 'onboarding.learn.title': 'Lernen',\n 'onboarding.learn.description':\n 'Erkunden und entwickeln Sie neue Fähigkeiten.',\n 'onboarding.learn.buttonText': 'Zu Lernpfaden gehen',\n 'onboarding.learn.ariaLabel': 'Zu Lernpfaden gehen',\n 'entities.title': 'Erkunden Sie Ihren Software-Katalog',\n 'entities.fetchError': 'Daten konnten nicht abgerufen werden.',\n 'entities.error': 'Unbekannter Fehler',\n 'entities.description':\n 'Durchsuchen Sie die Systeme, Komponenten, Ressourcen und APIs, die in Ihrer Organisation verfügbar sind.',\n 'entities.close': 'schließen',\n 'entities.empty': 'Noch kein Software-Katalog hinzugefügt',\n 'entities.emptyDescription':\n 'Sobald Software-Kataloge hinzugefügt werden, wird dieser Bereich relevante Inhalte anzeigen, die auf Ihre Erfahrung zugeschnitten sind.',\n 'entities.register': 'Komponente registrieren',\n 'entities.
|
|
1
|
+
{"version":3,"file":"de.esm.js","sources":["../../src/translations/de.ts"],"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 { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { homepageTranslationRef } from './ref';\n\n/**\n * German translation for Homepage.\n * @public\n */\nconst homepageTranslationDe = createTranslationMessages({\n ref: homepageTranslationRef,\n messages: {\n 'header.welcome': 'Willkommen zurück!',\n 'header.welcomePersonalized': 'Willkommen zurück, {{name}}!',\n 'header.local': 'Lokal',\n 'homePage.empty':\n 'Keine Homepage-Karten (Einbindungspunkte) konfiguriert oder gefunden.',\n 'search.placeholder': 'Suchen',\n 'quickAccess.title': 'Schnellzugriff',\n 'quickAccess.fetchError': 'Daten konnten nicht abgerufen werden.',\n 'quickAccess.error': 'Unbekannter Fehler',\n 'featuredDocs.learnMore': ' Mehr erfahren',\n 'templates.title': 'Vorlagen erkunden',\n 'templates.fetchError': 'Daten konnten nicht abgerufen werden.',\n 'templates.error': 'Unbekannter Fehler',\n 'templates.empty': 'Noch keine Vorlagen hinzugefügt',\n 'templates.emptyDescription':\n 'Sobald Vorlagen hinzugefügt werden, wird dieser Bereich relevante Inhalte anzeigen, die auf Ihre Erfahrung zugeschnitten sind.',\n 'templates.register': 'Vorlage registrieren',\n 'templates.viewAll': 'Alle {{count}} Vorlagen anzeigen',\n 'onboarding.greeting.goodMorning': 'Guten Morgen',\n 'onboarding.greeting.goodAfternoon': 'Guten Tag',\n 'onboarding.greeting.goodEvening': 'Guten Abend',\n 'onboarding.guest': 'Gast',\n 'onboarding.getStarted.title': 'Erste Schritte',\n 'onboarding.getStarted.description':\n 'Lernen Sie Red Hat Developer Hub kennen.',\n 'onboarding.getStarted.buttonText': 'Dokumentation lesen',\n 'onboarding.getStarted.ariaLabel':\n 'Dokumentation lesen (öffnet in neuem Tab)',\n 'onboarding.explore.title': 'Erkunden',\n 'onboarding.explore.description':\n 'Erkunden Sie Komponenten, APIs und Vorlagen.',\n 'onboarding.explore.buttonText': 'Zum Katalog gehen',\n 'onboarding.explore.ariaLabel': 'Zum Katalog gehen',\n 'onboarding.learn.title': 'Lernen',\n 'onboarding.learn.description':\n 'Erkunden und entwickeln Sie neue Fähigkeiten.',\n 'onboarding.learn.buttonText': 'Zu Lernpfaden gehen',\n 'onboarding.learn.ariaLabel': 'Zu Lernpfaden gehen',\n 'entities.title': 'Erkunden Sie Ihren Software-Katalog',\n 'entities.fetchError': 'Daten konnten nicht abgerufen werden.',\n 'entities.error': 'Unbekannter Fehler',\n 'entities.description':\n 'Durchsuchen Sie die Systeme, Komponenten, Ressourcen und APIs, die in Ihrer Organisation verfügbar sind.',\n 'entities.close': 'schließen',\n 'entities.empty': 'Noch kein Software-Katalog hinzugefügt',\n 'entities.emptyDescription':\n 'Sobald Software-Kataloge hinzugefügt werden, wird dieser Bereich relevante Inhalte anzeigen, die auf Ihre Erfahrung zugeschnitten sind.',\n 'entities.register': 'Komponente registrieren',\n 'entities.browseTheCatalog': 'Katalog durchsuchen',\n },\n});\n\nexport default homepageTranslationDe;\n"],"names":[],"mappings":";;;AAuBA,MAAM,wBAAwB,yBAA0B,CAAA;AAAA,EACtD,GAAK,EAAA,sBAAA;A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,cAAA;AAAA,IAClB,gBAAkB,EAAA,2CAAA;AAAA,IAClB,2BACE,EAAA,4IAAA;AAAA,IACF,mBAAqB,EAAA,yBAAA;AAAA,IACrB,2BAA6B,EAAA;AAAA;AAEjC,CAAC;;;;"}
|
|
@@ -44,7 +44,7 @@ const homepageTranslationEs = createTranslationMessages({
|
|
|
44
44
|
"entities.empty": "A\xFAn no se ha a\xF1adido cat\xE1logo de software",
|
|
45
45
|
"entities.emptyDescription": "Una vez que se agreguen cat\xE1logos de software, este espacio mostrar\xE1 contenido relevante adaptado a tu experiencia.",
|
|
46
46
|
"entities.register": "Registrar un componente",
|
|
47
|
-
"entities.
|
|
47
|
+
"entities.browseTheCatalog": "Explorar el cat\xE1logo"
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es.esm.js","sources":["../../src/translations/es.ts"],"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 { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { homepageTranslationRef } from './ref';\n\n/**\n * Spanish translation for Homepage.\n * @public\n */\nconst homepageTranslationEs = createTranslationMessages({\n ref: homepageTranslationRef,\n messages: {\n 'header.welcome': '¡Bienvenido de vuelta!',\n 'header.welcomePersonalized': '¡Bienvenido de vuelta, {{name}}!',\n 'header.local': 'Local',\n 'homePage.empty':\n 'No se configuraron o encontraron tarjetas de página de inicio (puntos de montaje).',\n 'search.placeholder': 'Buscar',\n 'quickAccess.title': 'Acceso rápido',\n 'quickAccess.fetchError': 'No se pudieron obtener los datos.',\n 'quickAccess.error': 'Error desconocido',\n 'featuredDocs.learnMore': ' Saber más',\n 'templates.title': 'Explorar plantillas',\n 'templates.fetchError': 'No se pudieron obtener los datos.',\n 'templates.error': 'Error desconocido',\n 'templates.empty': 'Aún no se han añadido plantillas',\n 'templates.emptyDescription':\n 'Una vez que se agreguen plantillas, este espacio mostrará contenido relevante adaptado a tu experiencia.',\n 'templates.register': 'Registrar una plantilla',\n 'templates.viewAll': 'Ver todas las {{count}} plantillas',\n 'onboarding.greeting.goodMorning': 'Buenos días',\n 'onboarding.greeting.goodAfternoon': 'Buenas tardes',\n 'onboarding.greeting.goodEvening': 'Buenas noches',\n 'onboarding.guest': 'Invitado',\n 'onboarding.getStarted.title': 'Comenzar',\n 'onboarding.getStarted.description': 'Aprende sobre Red Hat Developer Hub.',\n 'onboarding.getStarted.buttonText': 'Leer documentación',\n 'onboarding.getStarted.ariaLabel':\n 'Leer documentación (se abre en una nueva pestaña)',\n 'onboarding.explore.title': 'Explorar',\n 'onboarding.explore.description': 'Explora componentes, APIs y plantillas.',\n 'onboarding.explore.buttonText': 'Ir al catálogo',\n 'onboarding.explore.ariaLabel': 'Ir al catálogo',\n 'onboarding.learn.title': 'Aprender',\n 'onboarding.learn.description': 'Explora y desarrolla nuevas habilidades.',\n 'onboarding.learn.buttonText': 'Ir a rutas de aprendizaje',\n 'onboarding.learn.ariaLabel': 'Ir a rutas de aprendizaje',\n 'entities.title': 'Explora tu catálogo de software',\n 'entities.fetchError': 'No se pudieron obtener los datos.',\n 'entities.error': 'Error desconocido',\n 'entities.description':\n 'Explora los sistemas, componentes, recursos y APIs disponibles en tu organización.',\n 'entities.close': 'cerrar',\n 'entities.empty': 'Aún no se ha añadido catálogo de software',\n 'entities.emptyDescription':\n 'Una vez que se agreguen catálogos de software, este espacio mostrará contenido relevante adaptado a tu experiencia.',\n 'entities.register': 'Registrar un componente',\n 'entities.
|
|
1
|
+
{"version":3,"file":"es.esm.js","sources":["../../src/translations/es.ts"],"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 { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { homepageTranslationRef } from './ref';\n\n/**\n * Spanish translation for Homepage.\n * @public\n */\nconst homepageTranslationEs = createTranslationMessages({\n ref: homepageTranslationRef,\n messages: {\n 'header.welcome': '¡Bienvenido de vuelta!',\n 'header.welcomePersonalized': '¡Bienvenido de vuelta, {{name}}!',\n 'header.local': 'Local',\n 'homePage.empty':\n 'No se configuraron o encontraron tarjetas de página de inicio (puntos de montaje).',\n 'search.placeholder': 'Buscar',\n 'quickAccess.title': 'Acceso rápido',\n 'quickAccess.fetchError': 'No se pudieron obtener los datos.',\n 'quickAccess.error': 'Error desconocido',\n 'featuredDocs.learnMore': ' Saber más',\n 'templates.title': 'Explorar plantillas',\n 'templates.fetchError': 'No se pudieron obtener los datos.',\n 'templates.error': 'Error desconocido',\n 'templates.empty': 'Aún no se han añadido plantillas',\n 'templates.emptyDescription':\n 'Una vez que se agreguen plantillas, este espacio mostrará contenido relevante adaptado a tu experiencia.',\n 'templates.register': 'Registrar una plantilla',\n 'templates.viewAll': 'Ver todas las {{count}} plantillas',\n 'onboarding.greeting.goodMorning': 'Buenos días',\n 'onboarding.greeting.goodAfternoon': 'Buenas tardes',\n 'onboarding.greeting.goodEvening': 'Buenas noches',\n 'onboarding.guest': 'Invitado',\n 'onboarding.getStarted.title': 'Comenzar',\n 'onboarding.getStarted.description': 'Aprende sobre Red Hat Developer Hub.',\n 'onboarding.getStarted.buttonText': 'Leer documentación',\n 'onboarding.getStarted.ariaLabel':\n 'Leer documentación (se abre en una nueva pestaña)',\n 'onboarding.explore.title': 'Explorar',\n 'onboarding.explore.description': 'Explora componentes, APIs y plantillas.',\n 'onboarding.explore.buttonText': 'Ir al catálogo',\n 'onboarding.explore.ariaLabel': 'Ir al catálogo',\n 'onboarding.learn.title': 'Aprender',\n 'onboarding.learn.description': 'Explora y desarrolla nuevas habilidades.',\n 'onboarding.learn.buttonText': 'Ir a rutas de aprendizaje',\n 'onboarding.learn.ariaLabel': 'Ir a rutas de aprendizaje',\n 'entities.title': 'Explora tu catálogo de software',\n 'entities.fetchError': 'No se pudieron obtener los datos.',\n 'entities.error': 'Error desconocido',\n 'entities.description':\n 'Explora los sistemas, componentes, recursos y APIs disponibles en tu organización.',\n 'entities.close': 'cerrar',\n 'entities.empty': 'Aún no se ha añadido catálogo de software',\n 'entities.emptyDescription':\n 'Una vez que se agreguen catálogos de software, este espacio mostrará contenido relevante adaptado a tu experiencia.',\n 'entities.register': 'Registrar un componente',\n 'entities.browseTheCatalog': 'Explorar el catálogo',\n },\n});\n\nexport default homepageTranslationEs;\n"],"names":[],"mappings":";;;AAuBA,MAAM,wBAAwB,yBAA0B,CAAA;AAAA,EACtD,GAAK,EAAA,sBAAA;AAAA,EACL,QAAU,EAAA;AAAA,IACR,gBAAkB,EAAA,2BAAA;AAAA,IAClB,4BAA8B,EAAA,qCAAA;AAAA,IAC9B,cAAgB,EAAA,OAAA;AAAA,IAChB,gBACE,EAAA,uFAAA;AAAA,IACF,oBAAsB,EAAA,QAAA;AAAA,IACtB,mBAAqB,EAAA,kBAAA;AAAA,IACrB,wBAA0B,EAAA,mCAAA;AAAA,IAC1B,mBAAqB,EAAA,mBAAA;AAAA,IACrB,wBAA0B,EAAA,eAAA;AAAA,IAC1B,iBAAmB,EAAA,qBAAA;AAAA,IACnB,sBAAwB,EAAA,mCAAA;AAAA,IACxB,iBAAmB,EAAA,mBAAA;AAAA,IACnB,iBAAmB,EAAA,wCAAA;AAAA,IACnB,4BACE,EAAA,6GAAA;AAAA,IACF,oBAAsB,EAAA,yBAAA;AAAA,IACtB,mBAAqB,EAAA,oCAAA;AAAA,IACrB,iCAAmC,EAAA,gBAAA;AAAA,IACnC,mCAAqC,EAAA,eAAA;AAAA,IACrC,iCAAmC,EAAA,eAAA;AAAA,IACnC,kBAAoB,EAAA,UAAA;AAAA,IACpB,6BAA+B,EAAA,UAAA;AAAA,IAC/B,mCAAqC,EAAA,sCAAA;AAAA,IACrC,kCAAoC,EAAA,uBAAA;AAAA,IACpC,iCACE,EAAA,yDAAA;AAAA,IACF,0BAA4B,EAAA,UAAA;AAAA,IAC5B,gCAAkC,EAAA,yCAAA;AAAA,IAClC,+BAAiC,EAAA,mBAAA;AAAA,IACjC,8BAAgC,EAAA,mBAAA;AAAA,IAChC,wBAA0B,EAAA,UAAA;AAAA,IAC1B,8BAAgC,EAAA,0CAAA;AAAA,IAChC,6BAA+B,EAAA,2BAAA;AAAA,IAC/B,4BAA8B,EAAA,2BAAA;AAAA,IAC9B,gBAAkB,EAAA,oCAAA;AAAA,IAClB,qBAAuB,EAAA,mCAAA;AAAA,IACvB,gBAAkB,EAAA,mBAAA;AAAA,IAClB,sBACE,EAAA,uFAAA;AAAA,IACF,gBAAkB,EAAA,QAAA;AAAA,IAClB,gBAAkB,EAAA,oDAAA;AAAA,IAClB,2BACE,EAAA,2HAAA;AAAA,IACF,mBAAqB,EAAA,yBAAA;AAAA,IACrB,2BAA6B,EAAA;AAAA;AAEjC,CAAC;;;;"}
|
|
@@ -44,7 +44,7 @@ const homepageTranslationFr = createTranslationMessages({
|
|
|
44
44
|
"entities.empty": "Aucun catalogue de logiciels n'a encore \xE9t\xE9 ajout\xE9",
|
|
45
45
|
"entities.emptyDescription": "Une fois les catalogues de logiciels ajout\xE9s, cet espace pr\xE9sentera du contenu pertinent adapt\xE9 \xE0 votre exp\xE9rience.",
|
|
46
46
|
"entities.register": "Enregistrer un composant",
|
|
47
|
-
"entities.
|
|
47
|
+
"entities.browseTheCatalog": "Parcourir le catalogue"
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fr.esm.js","sources":["../../src/translations/fr.ts"],"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 { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { homepageTranslationRef } from './ref';\n\n/**\n * fr translation for plugin.dynamic-home-page.\n * @public\n */\nconst homepageTranslationFr = createTranslationMessages({\n ref: homepageTranslationRef,\n messages: {\n 'header.welcome': 'Content de vous revoir!',\n 'header.welcomePersonalized': 'Bienvenue {{name}} !',\n 'header.local': 'Locale',\n 'homePage.empty':\n \"Aucune carte de page d'accueil (points de montage) configurée ou trouvée.\",\n 'search.placeholder': 'Recherche',\n 'quickAccess.title': 'Accès rapide',\n 'quickAccess.fetchError': 'Impossible de récupérer les données.',\n 'quickAccess.error': 'Erreur inconnue',\n 'featuredDocs.learnMore': ' En savoir plus',\n 'templates.title': 'Explorer les modèles',\n 'templates.fetchError': 'Impossible de récupérer les données.',\n 'templates.error': 'Erreur inconnue',\n 'templates.empty': 'Aucun modèle ajouté pour le moment',\n 'templates.emptyDescription':\n 'Une fois les modèles ajoutés, cet espace présentera du contenu pertinent adapté à votre expérience.',\n 'templates.register': 'Enregistrer un modèle',\n 'templates.viewAll': 'Afficher tous les {{count}} modèles',\n 'onboarding.greeting.goodMorning': 'Bonjour',\n 'onboarding.greeting.goodAfternoon': 'Bon après-midi',\n 'onboarding.greeting.goodEvening': 'Bonne soirée',\n 'onboarding.guest': 'Invité',\n 'onboarding.getStarted.title': 'Commencer',\n 'onboarding.getStarted.description':\n 'En savoir plus sur Red Hat Developer Hub.',\n 'onboarding.getStarted.buttonText': 'Lire la documentation',\n 'onboarding.getStarted.ariaLabel':\n \"Lire la documentation (s'ouvre dans un nouvel onglet)\",\n 'onboarding.explore.title': 'Explorer',\n 'onboarding.explore.description':\n 'Explorer les composants, les API et les modèles.',\n 'onboarding.explore.buttonText': 'Accéder au catalogue',\n 'onboarding.explore.ariaLabel': 'Accéder au catalogue',\n 'onboarding.learn.title': 'Apprendre',\n 'onboarding.learn.description':\n 'Explorer et développer de nouvelles compétences.',\n 'onboarding.learn.buttonText': \"Accéder aux parcours d'apprentissage\",\n 'onboarding.learn.ariaLabel': \"Accéder aux parcours d'apprentissage\",\n 'entities.title': 'Explorer votre catalogue de logiciels',\n 'entities.fetchError': 'Impossible de récupérer les données.',\n 'entities.error': 'Erreur inconnue',\n 'entities.description':\n 'Parcourir les systèmes, les composants, les ressources et les API disponibles dans votre organisation.',\n 'entities.close': 'fermer',\n 'entities.empty': \"Aucun catalogue de logiciels n'a encore été ajouté\",\n 'entities.emptyDescription':\n 'Une fois les catalogues de logiciels ajoutés, cet espace présentera du contenu pertinent adapté à votre expérience.',\n 'entities.register': 'Enregistrer un composant',\n 'entities.
|
|
1
|
+
{"version":3,"file":"fr.esm.js","sources":["../../src/translations/fr.ts"],"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 { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { homepageTranslationRef } from './ref';\n\n/**\n * fr translation for plugin.dynamic-home-page.\n * @public\n */\nconst homepageTranslationFr = createTranslationMessages({\n ref: homepageTranslationRef,\n messages: {\n 'header.welcome': 'Content de vous revoir!',\n 'header.welcomePersonalized': 'Bienvenue {{name}} !',\n 'header.local': 'Locale',\n 'homePage.empty':\n \"Aucune carte de page d'accueil (points de montage) configurée ou trouvée.\",\n 'search.placeholder': 'Recherche',\n 'quickAccess.title': 'Accès rapide',\n 'quickAccess.fetchError': 'Impossible de récupérer les données.',\n 'quickAccess.error': 'Erreur inconnue',\n 'featuredDocs.learnMore': ' En savoir plus',\n 'templates.title': 'Explorer les modèles',\n 'templates.fetchError': 'Impossible de récupérer les données.',\n 'templates.error': 'Erreur inconnue',\n 'templates.empty': 'Aucun modèle ajouté pour le moment',\n 'templates.emptyDescription':\n 'Une fois les modèles ajoutés, cet espace présentera du contenu pertinent adapté à votre expérience.',\n 'templates.register': 'Enregistrer un modèle',\n 'templates.viewAll': 'Afficher tous les {{count}} modèles',\n 'onboarding.greeting.goodMorning': 'Bonjour',\n 'onboarding.greeting.goodAfternoon': 'Bon après-midi',\n 'onboarding.greeting.goodEvening': 'Bonne soirée',\n 'onboarding.guest': 'Invité',\n 'onboarding.getStarted.title': 'Commencer',\n 'onboarding.getStarted.description':\n 'En savoir plus sur Red Hat Developer Hub.',\n 'onboarding.getStarted.buttonText': 'Lire la documentation',\n 'onboarding.getStarted.ariaLabel':\n \"Lire la documentation (s'ouvre dans un nouvel onglet)\",\n 'onboarding.explore.title': 'Explorer',\n 'onboarding.explore.description':\n 'Explorer les composants, les API et les modèles.',\n 'onboarding.explore.buttonText': 'Accéder au catalogue',\n 'onboarding.explore.ariaLabel': 'Accéder au catalogue',\n 'onboarding.learn.title': 'Apprendre',\n 'onboarding.learn.description':\n 'Explorer et développer de nouvelles compétences.',\n 'onboarding.learn.buttonText': \"Accéder aux parcours d'apprentissage\",\n 'onboarding.learn.ariaLabel': \"Accéder aux parcours d'apprentissage\",\n 'entities.title': 'Explorer votre catalogue de logiciels',\n 'entities.fetchError': 'Impossible de récupérer les données.',\n 'entities.error': 'Erreur inconnue',\n 'entities.description':\n 'Parcourir les systèmes, les composants, les ressources et les API disponibles dans votre organisation.',\n 'entities.close': 'fermer',\n 'entities.empty': \"Aucun catalogue de logiciels n'a encore été ajouté\",\n 'entities.emptyDescription':\n 'Une fois les catalogues de logiciels ajoutés, cet espace présentera du contenu pertinent adapté à votre expérience.',\n 'entities.register': 'Enregistrer un composant',\n 'entities.browseTheCatalog': 'Parcourir le catalogue',\n },\n});\n\nexport default homepageTranslationFr;\n"],"names":[],"mappings":";;;AAuBA,MAAM,wBAAwB,yBAA0B,CAAA;AAAA,EACtD,GAAK,EAAA,sBAAA;AAAA,EACL,QAAU,EAAA;AAAA,IACR,gBAAkB,EAAA,yBAAA;AAAA,IAClB,4BAA8B,EAAA,yBAAA;AAAA,IAC9B,cAAgB,EAAA,QAAA;AAAA,IAChB,gBACE,EAAA,iFAAA;AAAA,IACF,oBAAsB,EAAA,WAAA;AAAA,IACtB,mBAAqB,EAAA,iBAAA;AAAA,IACrB,wBAA0B,EAAA,+CAAA;AAAA,IAC1B,mBAAqB,EAAA,iBAAA;AAAA,IACrB,wBAA0B,EAAA,iBAAA;AAAA,IAC1B,iBAAmB,EAAA,yBAAA;AAAA,IACnB,sBAAwB,EAAA,+CAAA;AAAA,IACxB,iBAAmB,EAAA,iBAAA;AAAA,IACnB,iBAAmB,EAAA,0CAAA;AAAA,IACnB,4BACE,EAAA,uHAAA;AAAA,IACF,oBAAsB,EAAA,0BAAA;AAAA,IACtB,mBAAqB,EAAA,wCAAA;AAAA,IACrB,iCAAmC,EAAA,SAAA;AAAA,IACnC,mCAAqC,EAAA,mBAAA;AAAA,IACrC,iCAAmC,EAAA,iBAAA;AAAA,IACnC,kBAAoB,EAAA,WAAA;AAAA,IACpB,6BAA+B,EAAA,WAAA;AAAA,IAC/B,mCACE,EAAA,2CAAA;AAAA,IACF,kCAAoC,EAAA,uBAAA;AAAA,IACpC,iCACE,EAAA,uDAAA;AAAA,IACF,0BAA4B,EAAA,UAAA;AAAA,IAC5B,gCACE,EAAA,qDAAA;AAAA,IACF,+BAAiC,EAAA,yBAAA;AAAA,IACjC,8BAAgC,EAAA,yBAAA;AAAA,IAChC,wBAA0B,EAAA,WAAA;AAAA,IAC1B,8BACE,EAAA,wDAAA;AAAA,IACF,6BAA+B,EAAA,yCAAA;AAAA,IAC/B,4BAA8B,EAAA,yCAAA;AAAA,IAC9B,gBAAkB,EAAA,uCAAA;AAAA,IAClB,qBAAuB,EAAA,+CAAA;AAAA,IACvB,gBAAkB,EAAA,iBAAA;AAAA,IAClB,sBACE,EAAA,2GAAA;AAAA,IACF,gBAAkB,EAAA,QAAA;AAAA,IAClB,gBAAkB,EAAA,6DAAA;AAAA,IAClB,2BACE,EAAA,oIAAA;AAAA,IACF,mBAAqB,EAAA,0BAAA;AAAA,IACrB,2BAA6B,EAAA;AAAA;AAEjC,CAAC;;;;"}
|
|
@@ -44,7 +44,7 @@ const homepageTranslationIt = createTranslationMessages({
|
|
|
44
44
|
"entities.empty": "Non \xE8 stato ancora aggiunto alcun catalogo software",
|
|
45
45
|
"entities.emptyDescription": "Una volta aggiunti i cataloghi software, in quest'area verranno visualizzati contenuti pertinenti e personalizzati in base all'esperienza dell'utente.",
|
|
46
46
|
"entities.register": "Registrare un componente",
|
|
47
|
-
"entities.
|
|
47
|
+
"entities.browseTheCatalog": "Esplora il catalogo"
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"it.esm.js","sources":["../../src/translations/it.ts"],"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 { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { homepageTranslationRef } from './ref';\n\n/**\n * Italian translation for plugin.dynamic-home-page.\n * @public\n */\nconst homepageTranslationIt = createTranslationMessages({\n ref: homepageTranslationRef,\n messages: {\n 'header.welcome': 'Bentornato/a!',\n 'header.welcomePersonalized': 'Bentornato/a, {{name}}!',\n 'header.local': 'Locale',\n 'homePage.empty':\n 'Nessuna scheda home page (punto di montaggio) configurata o trovata.',\n 'search.placeholder': 'Ricerca',\n 'quickAccess.title': 'Accesso rapido',\n 'quickAccess.fetchError': 'Impossibile recuperare i dati.',\n 'quickAccess.error': 'Errore sconosciuto',\n 'featuredDocs.learnMore': ' Per saperne di più',\n 'templates.title': 'Esplora i modelli',\n 'templates.fetchError': 'Impossibile recuperare i dati.',\n 'templates.error': 'Errore sconosciuto',\n 'templates.empty': 'Non è stato ancora aggiunto alcun modello',\n 'templates.emptyDescription':\n \"Una volta aggiunti i modelli, in quest'area verranno visualizzati contenuti pertinenti e personalizzati in base all'esperienza dell'utente.\",\n 'templates.register': 'Registra un modello',\n 'templates.viewAll': 'Visualizza tutti i {{count}} modelli',\n 'onboarding.greeting.goodMorning': 'Buon giorno',\n 'onboarding.greeting.goodAfternoon': 'Buon pomeriggio',\n 'onboarding.greeting.goodEvening': 'Buona sera',\n 'onboarding.guest': 'Ospite',\n 'onboarding.getStarted.title': 'Inizia',\n 'onboarding.getStarted.description':\n 'Scopri di più su Red Hat Developer Hub.',\n 'onboarding.getStarted.buttonText': 'Leggi la documentazione',\n 'onboarding.getStarted.ariaLabel':\n 'Leggi la documentazione (si apre in una nuova scheda)',\n 'onboarding.explore.title': 'Esplora',\n 'onboarding.explore.description': 'Esplora componenti, API e modelli.',\n 'onboarding.explore.buttonText': 'Vai al Catalogo',\n 'onboarding.explore.ariaLabel': 'Vai al Catalogo',\n 'onboarding.learn.title': 'Apprendi',\n 'onboarding.learn.description': 'Esplora e sviluppa nuove competenze.',\n 'onboarding.learn.buttonText': 'Vai ai Percorsi di apprendimento',\n 'onboarding.learn.ariaLabel': 'Vai ai Percorsi di apprendimento',\n 'entities.title': 'Esplora il Catalogo software',\n 'entities.fetchError': 'Impossibile recuperare i dati.',\n 'entities.error': 'Errore sconosciuto',\n 'entities.description':\n 'Esplora i sistemi, i componenti, le risorse e le API disponibili nella tua organizzazione.',\n 'entities.close': 'chiudi',\n 'entities.empty': 'Non è stato ancora aggiunto alcun catalogo software',\n 'entities.emptyDescription':\n \"Una volta aggiunti i cataloghi software, in quest'area verranno visualizzati contenuti pertinenti e personalizzati in base all'esperienza dell'utente.\",\n 'entities.register': 'Registrare un componente',\n 'entities.
|
|
1
|
+
{"version":3,"file":"it.esm.js","sources":["../../src/translations/it.ts"],"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 { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { homepageTranslationRef } from './ref';\n\n/**\n * Italian translation for plugin.dynamic-home-page.\n * @public\n */\nconst homepageTranslationIt = createTranslationMessages({\n ref: homepageTranslationRef,\n messages: {\n 'header.welcome': 'Bentornato/a!',\n 'header.welcomePersonalized': 'Bentornato/a, {{name}}!',\n 'header.local': 'Locale',\n 'homePage.empty':\n 'Nessuna scheda home page (punto di montaggio) configurata o trovata.',\n 'search.placeholder': 'Ricerca',\n 'quickAccess.title': 'Accesso rapido',\n 'quickAccess.fetchError': 'Impossibile recuperare i dati.',\n 'quickAccess.error': 'Errore sconosciuto',\n 'featuredDocs.learnMore': ' Per saperne di più',\n 'templates.title': 'Esplora i modelli',\n 'templates.fetchError': 'Impossibile recuperare i dati.',\n 'templates.error': 'Errore sconosciuto',\n 'templates.empty': 'Non è stato ancora aggiunto alcun modello',\n 'templates.emptyDescription':\n \"Una volta aggiunti i modelli, in quest'area verranno visualizzati contenuti pertinenti e personalizzati in base all'esperienza dell'utente.\",\n 'templates.register': 'Registra un modello',\n 'templates.viewAll': 'Visualizza tutti i {{count}} modelli',\n 'onboarding.greeting.goodMorning': 'Buon giorno',\n 'onboarding.greeting.goodAfternoon': 'Buon pomeriggio',\n 'onboarding.greeting.goodEvening': 'Buona sera',\n 'onboarding.guest': 'Ospite',\n 'onboarding.getStarted.title': 'Inizia',\n 'onboarding.getStarted.description':\n 'Scopri di più su Red Hat Developer Hub.',\n 'onboarding.getStarted.buttonText': 'Leggi la documentazione',\n 'onboarding.getStarted.ariaLabel':\n 'Leggi la documentazione (si apre in una nuova scheda)',\n 'onboarding.explore.title': 'Esplora',\n 'onboarding.explore.description': 'Esplora componenti, API e modelli.',\n 'onboarding.explore.buttonText': 'Vai al Catalogo',\n 'onboarding.explore.ariaLabel': 'Vai al Catalogo',\n 'onboarding.learn.title': 'Apprendi',\n 'onboarding.learn.description': 'Esplora e sviluppa nuove competenze.',\n 'onboarding.learn.buttonText': 'Vai ai Percorsi di apprendimento',\n 'onboarding.learn.ariaLabel': 'Vai ai Percorsi di apprendimento',\n 'entities.title': 'Esplora il Catalogo software',\n 'entities.fetchError': 'Impossibile recuperare i dati.',\n 'entities.error': 'Errore sconosciuto',\n 'entities.description':\n 'Esplora i sistemi, i componenti, le risorse e le API disponibili nella tua organizzazione.',\n 'entities.close': 'chiudi',\n 'entities.empty': 'Non è stato ancora aggiunto alcun catalogo software',\n 'entities.emptyDescription':\n \"Una volta aggiunti i cataloghi software, in quest'area verranno visualizzati contenuti pertinenti e personalizzati in base all'esperienza dell'utente.\",\n 'entities.register': 'Registrare un componente',\n 'ent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AC9B,gBAAkB,EAAA,8BAAA;AAAA,IAClB,qBAAuB,EAAA,gCAAA;AAAA,IACvB,gBAAkB,EAAA,oBAAA;AAAA,IAClB,sBACE,EAAA,4FAAA;AAAA,IACF,gBAAkB,EAAA,QAAA;AAAA,IAClB,gBAAkB,EAAA,wDAAA;AAAA,IAClB,2BACE,EAAA,wJAAA;AAAA,IACF,mBAAqB,EAAA,0BAAA;AAAA,IACrB,2BAA6B,EAAA;AAAA;AAEjC,CAAC;;;;"}
|
|
@@ -44,7 +44,7 @@ const homepageTranslationJa = createTranslationMessages({
|
|
|
44
44
|
"entities.empty": "\u30BD\u30D5\u30C8\u30A6\u30A7\u30A2\u30AB\u30BF\u30ED\u30B0\u306F\u307E\u3060\u8FFD\u52A0\u3055\u308C\u3066\u3044\u307E\u305B\u3093",
|
|
45
45
|
"entities.emptyDescription": "\u30BD\u30D5\u30C8\u30A6\u30A7\u30A2\u30AB\u30BF\u30ED\u30B0\u304C\u8FFD\u52A0\u3055\u308C\u308B\u3068\u3001\u5229\u7528\u72B6\u6CC1\u306B\u5408\u308F\u305B\u3066\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3055\u308C\u305F\u95A2\u9023\u30B3\u30F3\u30C6\u30F3\u30C4\u304C\u3053\u306E\u30B9\u30DA\u30FC\u30B9\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002",
|
|
46
46
|
"entities.register": "\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u767B\u9332",
|
|
47
|
-
"entities.
|
|
47
|
+
"entities.browseTheCatalog": "\u30AB\u30BF\u30ED\u30B0\u3092\u95B2\u89A7"
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ja.esm.js","sources":["../../src/translations/ja.ts"],"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 { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { homepageTranslationRef } from './ref';\n\n/**\n * Japanese translation for plugin.dynamic-home-page.\n * @public\n */\nconst homepageTranslationJa = createTranslationMessages({\n ref: homepageTranslationRef,\n messages: {\n 'header.welcome': 'おかえりなさい!',\n 'header.welcomePersonalized': 'おかえりなさい、{{name}}!',\n 'header.local': 'ローカル',\n 'homePage.empty':\n 'ホームページカード (マウントポイント) が設定されていないか見つかりません。',\n 'search.placeholder': '検索',\n 'quickAccess.title': 'クイックアクセス',\n 'quickAccess.fetchError': 'データを取得できませんでした。',\n 'quickAccess.error': '不明なエラー',\n 'featuredDocs.learnMore': ' 詳細',\n 'templates.title': 'テンプレートの探索',\n 'templates.fetchError': 'データを取得できませんでした。',\n 'templates.error': '不明なエラー',\n 'templates.empty': 'テンプレートはまだ追加されていません',\n 'templates.emptyDescription':\n 'テンプレートが追加されると、利用状況に合わせてカスタマイズされた関連コンテンツがこのスペースに表示されます。',\n 'templates.register': 'テンプレートの登録',\n 'templates.viewAll': '{{count}} 個のテンプレートをすべて表示する',\n 'onboarding.greeting.goodMorning': 'おはようございます',\n 'onboarding.greeting.goodAfternoon': 'こんにちは',\n 'onboarding.greeting.goodEvening': 'こんばんは',\n 'onboarding.guest': 'ゲスト',\n 'onboarding.getStarted.title': 'スタート',\n 'onboarding.getStarted.description':\n 'Red Hat Developer Hub について学習しましょう。',\n 'onboarding.getStarted.buttonText': 'ドキュメントを読む',\n 'onboarding.getStarted.ariaLabel':\n 'ドキュメントを読む (新しいタブで開きます)',\n 'onboarding.explore.title': '探索',\n 'onboarding.explore.description':\n 'コンポーネント、API、テンプレートを探索しましょう。',\n 'onboarding.explore.buttonText': 'カタログに移動',\n 'onboarding.explore.ariaLabel': 'カタログに移動',\n 'onboarding.learn.title': '学習',\n 'onboarding.learn.description': '新しいスキルを探索して習得しましょう。',\n 'onboarding.learn.buttonText': 'ラーニングパスに移動',\n 'onboarding.learn.ariaLabel': 'ラーニングパスに移動',\n 'entities.title': 'ソフトウェアカタログの探索',\n 'entities.fetchError': 'データを取得できませんでした。',\n 'entities.error': '不明なエラー',\n 'entities.description':\n '組織内で利用可能なシステム、コンポーネント、リソース、API を閲覧します。',\n 'entities.close': '閉じる',\n 'entities.empty': 'ソフトウェアカタログはまだ追加されていません',\n 'entities.emptyDescription':\n 'ソフトウェアカタログが追加されると、利用状況に合わせてカスタマイズされた関連コンテンツがこのスペースに表示されます。',\n 'entities.register': 'コンポーネントの登録',\n 'entities.
|
|
1
|
+
{"version":3,"file":"ja.esm.js","sources":["../../src/translations/ja.ts"],"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 { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { homepageTranslationRef } from './ref';\n\n/**\n * Japanese translation for plugin.dynamic-home-page.\n * @public\n */\nconst homepageTranslationJa = createTranslationMessages({\n ref: homepageTranslationRef,\n messages: {\n 'header.welcome': 'おかえりなさい!',\n 'header.welcomePersonalized': 'おかえりなさい、{{name}}!',\n 'header.local': 'ローカル',\n 'homePage.empty':\n 'ホームページカード (マウントポイント) が設定されていないか見つかりません。',\n 'search.placeholder': '検索',\n 'quickAccess.title': 'クイックアクセス',\n 'quickAccess.fetchError': 'データを取得できませんでした。',\n 'quickAccess.error': '不明なエラー',\n 'featuredDocs.learnMore': ' 詳細',\n 'templates.title': 'テンプレートの探索',\n 'templates.fetchError': 'データを取得できませんでした。',\n 'templates.error': '不明なエラー',\n 'templates.empty': 'テンプレートはまだ追加されていません',\n 'templates.emptyDescription':\n 'テンプレートが追加されると、利用状況に合わせてカスタマイズされた関連コンテンツがこのスペースに表示されます。',\n 'templates.register': 'テンプレートの登録',\n 'templates.viewAll': '{{count}} 個のテンプレートをすべて表示する',\n 'onboarding.greeting.goodMorning': 'おはようございます',\n 'onboarding.greeting.goodAfternoon': 'こんにちは',\n 'onboarding.greeting.goodEvening': 'こんばんは',\n 'onboarding.guest': 'ゲスト',\n 'onboarding.getStarted.title': 'スタート',\n 'onboarding.getStarted.description':\n 'Red Hat Developer Hub について学習しましょう。',\n 'onboarding.getStarted.buttonText': 'ドキュメントを読む',\n 'onboarding.getStarted.ariaLabel':\n 'ドキュメントを読む (新しいタブで開きます)',\n 'onboarding.explore.title': '探索',\n 'onboarding.explore.description':\n 'コンポーネント、API、テンプレートを探索しましょう。',\n 'onboarding.explore.buttonText': 'カタログに移動',\n 'onboarding.explore.ariaLabel': 'カタログに移動',\n 'onboarding.learn.title': '学習',\n 'onboarding.learn.description': '新しいスキルを探索して習得しましょう。',\n 'onboarding.learn.buttonText': 'ラーニングパスに移動',\n 'onboarding.learn.ariaLabel': 'ラーニングパスに移動',\n 'entities.title': 'ソフトウェアカタログの探索',\n 'entities.fetchError': 'データを取得できませんでした。',\n 'entities.error': '不明なエラー',\n 'entities.description':\n '組織内で利用可能なシステム、コンポーネント、リソース、API を閲覧します。',\n 'entities.close': '閉じる',\n 'entities.empty': 'ソフトウェアカタログはまだ追加されていません',\n 'entities.emptyDescription':\n 'ソフトウェアカタログが追加されると、利用状況に合わせてカスタマイズされた関連コンテンツがこのスペースに表示されます。',\n 'entities.register': 'コンポーネントの登録',\n 'entities.browseTheCatalog': 'カタログを閲覧',\n },\n});\n\nexport default homepage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uB,EAAA,4FAAA;AAAA,IACvB,gBAAkB,EAAA,sCAAA;AAAA,IAClB,sBACE,EAAA,kNAAA;AAAA,IACF,gBAAkB,EAAA,oBAAA;AAAA,IAClB,gBAAkB,EAAA,sIAAA;AAAA,IAClB,2BACE,EAAA,8VAAA;AAAA,IACF,mBAAqB,EAAA,8DAAA;AAAA,IACrB,2BAA6B,EAAA;AAAA;AAEjC,CAAC;;;;"}
|
|
@@ -64,7 +64,7 @@ const homepageMessages = {
|
|
|
64
64
|
empty: "No software catalog added yet",
|
|
65
65
|
emptyDescription: "Once software catalogs are added, this space will showcase relevant content tailored to your experience.",
|
|
66
66
|
register: "Register a component",
|
|
67
|
-
|
|
67
|
+
browseTheCatalog: "Browse the catalog"
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
const homepageTranslationRef = createTranslationRef({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ref.esm.js","sources":["../../src/translations/ref.ts"],"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 { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/**\n * Messages object containing all English translations.\n * This is our single source of truth for translations.\n *\n * @public\n */\nexport const homepageMessages = {\n header: {\n welcome: 'Welcome back!',\n welcomePersonalized: 'Welcome back, {{name}}!',\n local: 'Local',\n },\n homePage: {\n empty: 'No home page cards (mount points) configured or found.',\n },\n search: {\n placeholder: 'Search',\n },\n quickAccess: {\n title: 'Quick Access',\n fetchError: 'Could not fetch data.',\n error: 'Unknown error',\n },\n featuredDocs: {\n learnMore: ' Learn more',\n },\n templates: {\n title: 'Explore Templates',\n fetchError: 'Could not fetch data.',\n error: 'Unknown error',\n empty: 'No templates added yet',\n emptyDescription:\n 'Once templates are added, this space will showcase relevant content tailored to your experience.',\n register: 'Register a template',\n viewAll: 'View all {{count}} templates',\n },\n onboarding: {\n greeting: {\n goodMorning: 'Good morning',\n goodAfternoon: 'Good afternoon',\n goodEvening: 'Good evening',\n },\n guest: 'Guest',\n getStarted: {\n title: 'Get started',\n description: 'Learn about Red Hat Developer Hub.',\n buttonText: 'Read documentation',\n ariaLabel: 'Read documentation (opens in a new tab)',\n },\n explore: {\n title: 'Explore',\n description: 'Explore components, APIs and templates.',\n buttonText: 'Go to Catalog',\n ariaLabel: 'Go to Catalog',\n },\n learn: {\n title: 'Learn',\n description: 'Explore and develop new skills.',\n buttonText: 'Go to Learning Paths',\n ariaLabel: 'Go to Learning Paths',\n },\n },\n entities: {\n title: 'Explore Your Software Catalog',\n fetchError: 'Could not fetch data.',\n error: 'Unknown error',\n description:\n 'Browse the Systems, Components, Resources, and APIs that are available in your organization.',\n close: 'close',\n empty: 'No software catalog added yet',\n emptyDescription:\n 'Once software catalogs are added, this space will showcase relevant content tailored to your experience.',\n register: 'Register a component',\n
|
|
1
|
+
{"version":3,"file":"ref.esm.js","sources":["../../src/translations/ref.ts"],"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 { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/**\n * Messages object containing all English translations.\n * This is our single source of truth for translations.\n *\n * @public\n */\nexport const homepageMessages = {\n header: {\n welcome: 'Welcome back!',\n welcomePersonalized: 'Welcome back, {{name}}!',\n local: 'Local',\n },\n homePage: {\n empty: 'No home page cards (mount points) configured or found.',\n },\n search: {\n placeholder: 'Search',\n },\n quickAccess: {\n title: 'Quick Access',\n fetchError: 'Could not fetch data.',\n error: 'Unknown error',\n },\n featuredDocs: {\n learnMore: ' Learn more',\n },\n templates: {\n title: 'Explore Templates',\n fetchError: 'Could not fetch data.',\n error: 'Unknown error',\n empty: 'No templates added yet',\n emptyDescription:\n 'Once templates are added, this space will showcase relevant content tailored to your experience.',\n register: 'Register a template',\n viewAll: 'View all {{count}} templates',\n },\n onboarding: {\n greeting: {\n goodMorning: 'Good morning',\n goodAfternoon: 'Good afternoon',\n goodEvening: 'Good evening',\n },\n guest: 'Guest',\n getStarted: {\n title: 'Get started',\n description: 'Learn about Red Hat Developer Hub.',\n buttonText: 'Read documentation',\n ariaLabel: 'Read documentation (opens in a new tab)',\n },\n explore: {\n title: 'Explore',\n description: 'Explore components, APIs and templates.',\n buttonText: 'Go to Catalog',\n ariaLabel: 'Go to Catalog',\n },\n learn: {\n title: 'Learn',\n description: 'Explore and develop new skills.',\n buttonText: 'Go to Learning Paths',\n ariaLabel: 'Go to Learning Paths',\n },\n },\n entities: {\n title: 'Explore Your Software Catalog',\n fetchError: 'Could not fetch data.',\n error: 'Unknown error',\n description:\n 'Browse the Systems, Components, Resources, and APIs that are available in your organization.',\n close: 'close',\n empty: 'No software catalog added yet',\n emptyDescription:\n 'Once software catalogs are added, this space will showcase relevant content tailored to your experience.',\n register: 'Register a component',\n browseTheCatalog: 'Browse the catalog',\n },\n};\n\n/**\n * Translation ref for the Dynamic Home Page plugin.\n * Defines all translation keys used in the plugin.\n *\n * @public\n */\nexport const homepageTranslationRef = createTranslationRef({\n id: 'plugin.homepage',\n messages: homepageMessages,\n});\n"],"names":[],"mappings":";;AAwBO,MAAM,gBAAmB,GAAA;AAAA,EAC9B,MAAQ,EAAA;AAAA,IACN,OAAS,EAAA,eAAA;AAAA,IACT,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,EAAA,+BAAA;AAAA,IACP,UAAY,EAAA,uBAAA;AAAA,IACZ,KAAO,EAAA,eAAA;AAAA,IACP,WACE,EAAA,8FAAA;AAAA,IACF,KAAO,EAAA,OAAA;AAAA,IACP,KAAO,EAAA,+BAAA;AAAA,IACP,gBACE,EAAA,0GAAA;AAAA,IACF,QAAU,EAAA,sBAAA;AAAA,IACV,gBAAkB,EAAA;AAAA;AAEtB;AAQO,MAAM,yBAAyB,oBAAqB,CAAA;AAAA,EACzD,EAAI,EAAA,iBAAA;AAAA,EACJ,QAAU,EAAA;AACZ,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@red-hat-developer-hub/backstage-plugin-dynamic-home-page",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"main": "./dist/index.esm.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -54,17 +54,17 @@
|
|
|
54
54
|
"postpack": "backstage-cli package postpack"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@backstage/catalog-client": "^1.
|
|
58
|
-
"@backstage/catalog-model": "^1.7.
|
|
59
|
-
"@backstage/core-components": "^0.18.
|
|
60
|
-
"@backstage/core-plugin-api": "^1.12.
|
|
61
|
-
"@backstage/plugin-app-react": "^0.1
|
|
62
|
-
"@backstage/plugin-catalog-react": "^1.
|
|
63
|
-
"@backstage/plugin-home": "^0.9.
|
|
64
|
-
"@backstage/plugin-home-react": "^0.1.
|
|
65
|
-
"@backstage/plugin-search-react": "^1.
|
|
66
|
-
"@backstage/plugin-user-settings": "^0.
|
|
67
|
-
"@backstage/theme": "^0.7.
|
|
57
|
+
"@backstage/catalog-client": "^1.14.0",
|
|
58
|
+
"@backstage/catalog-model": "^1.7.7",
|
|
59
|
+
"@backstage/core-components": "^0.18.8",
|
|
60
|
+
"@backstage/core-plugin-api": "^1.12.4",
|
|
61
|
+
"@backstage/plugin-app-react": "^0.2.1",
|
|
62
|
+
"@backstage/plugin-catalog-react": "^2.1.1",
|
|
63
|
+
"@backstage/plugin-home": "^0.9.3",
|
|
64
|
+
"@backstage/plugin-home-react": "^0.1.36",
|
|
65
|
+
"@backstage/plugin-search-react": "^1.11.0",
|
|
66
|
+
"@backstage/plugin-user-settings": "^0.9.1",
|
|
67
|
+
"@backstage/theme": "^0.7.2",
|
|
68
68
|
"@mui/icons-material": "5.18.0",
|
|
69
69
|
"@mui/material": "5.18.0",
|
|
70
70
|
"@mui/styles": "5.18.0",
|
|
@@ -78,14 +78,14 @@
|
|
|
78
78
|
"react-router-dom": "6.30.3"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@backstage/cli": "^0.
|
|
82
|
-
"@backstage/core-app-api": "^1.19.
|
|
83
|
-
"@backstage/dev-utils": "^1.1.
|
|
84
|
-
"@backstage/frontend-defaults": "^0.
|
|
85
|
-
"@backstage/plugin-catalog": "^
|
|
86
|
-
"@backstage/plugin-search": "^1.
|
|
87
|
-
"@backstage/test-utils": "^1.7.
|
|
88
|
-
"@backstage/ui": "^0.
|
|
81
|
+
"@backstage/cli": "^0.36.0",
|
|
82
|
+
"@backstage/core-app-api": "^1.19.6",
|
|
83
|
+
"@backstage/dev-utils": "^1.1.21",
|
|
84
|
+
"@backstage/frontend-defaults": "^0.5.0",
|
|
85
|
+
"@backstage/plugin-catalog": "^2.0.1",
|
|
86
|
+
"@backstage/plugin-search": "^1.7.0",
|
|
87
|
+
"@backstage/test-utils": "^1.7.16",
|
|
88
|
+
"@backstage/ui": "^0.13.2",
|
|
89
89
|
"@openshift/dynamic-plugin-sdk": "5.0.1",
|
|
90
90
|
"@red-hat-developer-hub/backstage-plugin-theme": "^0.13.0",
|
|
91
91
|
"@testing-library/jest-dom": "6.9.1",
|