@red-hat-developer-hub/backstage-plugin-quickstart 1.5.0 → 1.6.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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # @red-hat-developer-hub/backstage-plugin-quickstart
2
2
 
3
+ ## 1.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - dcda8f3: Adding localization support for quickstart steps.
8
+
9
+ ### Patch Changes
10
+
11
+ - b887a58: French translation updated
12
+
13
+ ## 1.5.1
14
+
15
+ ### Patch Changes
16
+
17
+ - 9057587: Fix Quickstart drawer re-opening on close by scoping drawer flags per user, caching resolved role per session, and filtering items only when the drawer is open; preserves first-time auto-open and respects manual close.
18
+
3
19
  ## 1.5.0
4
20
 
5
21
  ### Minor Changes
package/config.d.ts CHANGED
@@ -29,6 +29,11 @@ export interface Config {
29
29
  * @visibility frontend
30
30
  */
31
31
  title: string;
32
+ /**
33
+ * The roles associated with the quickstart.
34
+ * @visibility frontend
35
+ */
36
+ titleKey?: string;
32
37
  /**
33
38
  * The roles associated with the quickstart.
34
39
  * @visibility frontend
@@ -44,6 +49,11 @@ export interface Config {
44
49
  * @visibility frontend
45
50
  */
46
51
  description: string;
52
+ /**
53
+ * Optional action item for quickstart.
54
+ * @visibility frontend
55
+ */
56
+ descriptionKey?: string;
47
57
  /**
48
58
  * Optional action item for quickstart.
49
59
  * @visibility frontend
@@ -54,6 +64,11 @@ export interface Config {
54
64
  * @visibility frontend
55
65
  */
56
66
  text: string;
67
+ /**
68
+ * Action item link.
69
+ * @visibility frontend
70
+ */
71
+ textKey?: string;
57
72
  /**
58
73
  * Action item link.
59
74
  * @visibility frontend
@@ -1,8 +1,11 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import OpenInNewIcon from '@mui/icons-material/OpenInNew';
3
3
  import { LinkButton } from '@backstage/core-components';
4
+ import { useTranslation } from '../../hooks/useTranslation.esm.js';
5
+ import { getTranslatedTextWithFallback } from '../../utils/translationUtils.esm.js';
4
6
 
5
7
  const QuickstartCtaLink = ({ cta, onClick }) => {
8
+ const { t } = useTranslation();
6
9
  if (!cta) {
7
10
  return /* @__PURE__ */ jsx(
8
11
  LinkButton,
@@ -14,10 +17,11 @@ const QuickstartCtaLink = ({ cta, onClick }) => {
14
17
  e.preventDefault();
15
18
  onClick();
16
19
  },
17
- children: "Got it!"
20
+ children: t("button.gotIt")
18
21
  }
19
22
  );
20
23
  }
24
+ const finalText = getTranslatedTextWithFallback(t, cta.textKey, cta.text);
21
25
  const isExternalLink = cta.link.startsWith("http://") || cta.link.startsWith("https://");
22
26
  return isExternalLink ? /* @__PURE__ */ jsxs(
23
27
  LinkButton,
@@ -30,7 +34,7 @@ const QuickstartCtaLink = ({ cta, onClick }) => {
30
34
  to: cta.link,
31
35
  onClick,
32
36
  children: [
33
- cta.text,
37
+ finalText,
34
38
  "\xA0",
35
39
  /* @__PURE__ */ jsx(
36
40
  OpenInNewIcon,
@@ -49,7 +53,7 @@ const QuickstartCtaLink = ({ cta, onClick }) => {
49
53
  variant: "outlined",
50
54
  to: cta.link,
51
55
  onClick,
52
- children: cta.text
56
+ children: finalText
53
57
  }
54
58
  );
55
59
  };
@@ -1 +1 @@
1
- {"version":3,"file":"QuickstartCtaLink.esm.js","sources":["../../../src/components/QuickstartContent/QuickstartCtaLink.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 OpenInNewIcon from '@mui/icons-material/OpenInNew';\nimport { QuickstartItemCtaData } from '../../types';\nimport { LinkButton } from '@backstage/core-components';\n\nexport type QuickstartCtaLinkProps = {\n cta?: QuickstartItemCtaData;\n onClick: () => void;\n};\n\nexport const QuickstartCtaLink = ({ cta, onClick }: QuickstartCtaLinkProps) => {\n // If no CTA is provided, show a default \"Got it!\" button\n if (!cta) {\n return (\n <LinkButton\n color=\"primary\"\n variant=\"outlined\"\n to=\"#\"\n onClick={e => {\n e.preventDefault();\n onClick();\n }}\n >\n Got it!\n </LinkButton>\n );\n }\n\n const isExternalLink =\n cta.link.startsWith('http://') || cta.link.startsWith('https://');\n\n return isExternalLink ? (\n <LinkButton\n color=\"primary\"\n style={{\n gap: '5px',\n }}\n variant=\"outlined\"\n to={cta.link}\n onClick={onClick}\n >\n {cta.text}&nbsp;\n <OpenInNewIcon\n sx={{\n fontSize: '15px',\n }}\n />\n </LinkButton>\n ) : (\n <LinkButton\n color=\"primary\"\n variant=\"outlined\"\n to={cta.link}\n onClick={onClick}\n >\n {cta.text}\n </LinkButton>\n );\n};\n"],"names":[],"mappings":";;;;AAwBO,MAAM,iBAAoB,GAAA,CAAC,EAAE,GAAA,EAAK,SAAsC,KAAA;AAE7E,EAAA,IAAI,CAAC,GAAK,EAAA;AACR,IACE,uBAAA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,KAAM,EAAA,SAAA;AAAA,QACN,OAAQ,EAAA,UAAA;AAAA,QACR,EAAG,EAAA,GAAA;AAAA,QACH,SAAS,CAAK,CAAA,KAAA;AACZ,UAAA,CAAA,CAAE,cAAe,EAAA;AACjB,UAAQ,OAAA,EAAA;AAAA,SACV;AAAA,QACD,QAAA,EAAA;AAAA;AAAA,KAED;AAAA;AAIJ,EAAM,MAAA,cAAA,GACJ,IAAI,IAAK,CAAA,UAAA,CAAW,SAAS,CAAK,IAAA,GAAA,CAAI,IAAK,CAAA,UAAA,CAAW,UAAU,CAAA;AAElE,EAAA,OAAO,cACL,mBAAA,IAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,KAAM,EAAA,SAAA;AAAA,MACN,KAAO,EAAA;AAAA,QACL,GAAK,EAAA;AAAA,OACP;AAAA,MACA,OAAQ,EAAA,UAAA;AAAA,MACR,IAAI,GAAI,CAAA,IAAA;AAAA,MACR,OAAA;AAAA,MAEC,QAAA,EAAA;AAAA,QAAI,GAAA,CAAA,IAAA;AAAA,QAAK,MAAA;AAAA,wBACV,GAAA;AAAA,UAAC,aAAA;AAAA,UAAA;AAAA,YACC,EAAI,EAAA;AAAA,cACF,QAAU,EAAA;AAAA;AACZ;AAAA;AACF;AAAA;AAAA,GAGF,mBAAA,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,KAAM,EAAA,SAAA;AAAA,MACN,OAAQ,EAAA,UAAA;AAAA,MACR,IAAI,GAAI,CAAA,IAAA;AAAA,MACR,OAAA;AAAA,MAEC,QAAI,EAAA,GAAA,CAAA;AAAA;AAAA,GACP;AAEJ;;;;"}
1
+ {"version":3,"file":"QuickstartCtaLink.esm.js","sources":["../../../src/components/QuickstartContent/QuickstartCtaLink.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 OpenInNewIcon from '@mui/icons-material/OpenInNew';\nimport { QuickstartItemCtaData } from '../../types';\nimport { LinkButton } from '@backstage/core-components';\nimport { useTranslation } from '../../hooks/useTranslation';\nimport { getTranslatedTextWithFallback } from '../../utils';\n\nexport type QuickstartCtaLinkProps = {\n cta?: QuickstartItemCtaData;\n onClick: () => void;\n};\n\nexport const QuickstartCtaLink = ({ cta, onClick }: QuickstartCtaLinkProps) => {\n const { t } = useTranslation();\n // If no CTA is provided, show a default \"Got it!\" button\n if (!cta) {\n return (\n <LinkButton\n color=\"primary\"\n variant=\"outlined\"\n to=\"#\"\n onClick={e => {\n e.preventDefault();\n onClick();\n }}\n >\n {t('button.gotIt')}\n </LinkButton>\n );\n }\n\n const finalText = getTranslatedTextWithFallback(t, cta.textKey, cta.text);\n\n const isExternalLink =\n cta.link.startsWith('http://') || cta.link.startsWith('https://');\n\n return isExternalLink ? (\n <LinkButton\n color=\"primary\"\n style={{\n gap: '5px',\n }}\n variant=\"outlined\"\n to={cta.link}\n onClick={onClick}\n >\n {finalText}\n &nbsp;\n <OpenInNewIcon\n sx={{\n fontSize: '15px',\n }}\n />\n </LinkButton>\n ) : (\n <LinkButton\n color=\"primary\"\n variant=\"outlined\"\n to={cta.link}\n onClick={onClick}\n >\n {finalText}\n </LinkButton>\n );\n};\n"],"names":[],"mappings":";;;;;;AA0BO,MAAM,iBAAoB,GAAA,CAAC,EAAE,GAAA,EAAK,SAAsC,KAAA;AAC7E,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAE7B,EAAA,IAAI,CAAC,GAAK,EAAA;AACR,IACE,uBAAA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,KAAM,EAAA,SAAA;AAAA,QACN,OAAQ,EAAA,UAAA;AAAA,QACR,EAAG,EAAA,GAAA;AAAA,QACH,SAAS,CAAK,CAAA,KAAA;AACZ,UAAA,CAAA,CAAE,cAAe,EAAA;AACjB,UAAQ,OAAA,EAAA;AAAA,SACV;AAAA,QAEC,YAAE,cAAc;AAAA;AAAA,KACnB;AAAA;AAIJ,EAAA,MAAM,YAAY,6BAA8B,CAAA,CAAA,EAAG,GAAI,CAAA,OAAA,EAAS,IAAI,IAAI,CAAA;AAExE,EAAM,MAAA,cAAA,GACJ,IAAI,IAAK,CAAA,UAAA,CAAW,SAAS,CAAK,IAAA,GAAA,CAAI,IAAK,CAAA,UAAA,CAAW,UAAU,CAAA;AAElE,EAAA,OAAO,cACL,mBAAA,IAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,KAAM,EAAA,SAAA;AAAA,MACN,KAAO,EAAA;AAAA,QACL,GAAK,EAAA;AAAA,OACP;AAAA,MACA,OAAQ,EAAA,UAAA;AAAA,MACR,IAAI,GAAI,CAAA,IAAA;AAAA,MACR,OAAA;AAAA,MAEC,QAAA,EAAA;AAAA,QAAA,SAAA;AAAA,QAAU,MAAA;AAAA,wBAEX,GAAA;AAAA,UAAC,aAAA;AAAA,UAAA;AAAA,YACC,EAAI,EAAA;AAAA,cACF,QAAU,EAAA;AAAA;AACZ;AAAA;AACF;AAAA;AAAA,GAGF,mBAAA,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,KAAM,EAAA,SAAA;AAAA,MACN,OAAQ,EAAA,UAAA;AAAA,MACR,IAAI,GAAI,CAAA,IAAA;AAAA,MACR,OAAA;AAAA,MAEC,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ;;;;"}
@@ -12,6 +12,7 @@ import { QuickstartItemIcon } from './QuickstartItemIcon.esm.js';
12
12
  import { QuickstartCtaLink } from './QuickstartCtaLink.esm.js';
13
13
  import IconButton from '@mui/material/IconButton';
14
14
  import { useTranslation } from '../../hooks/useTranslation.esm.js';
15
+ import { getTranslatedTextWithFallback } from '../../utils/translationUtils.esm.js';
15
16
 
16
17
  const QuickstartItem = ({
17
18
  item,
@@ -79,7 +80,7 @@ const QuickstartItem = ({
79
80
  /* @__PURE__ */ jsx(
80
81
  ListItemText,
81
82
  {
82
- primary: item.title,
83
+ primary: getTranslatedTextWithFallback(t, item.titleKey, item.title),
83
84
  sx: {
84
85
  "& .v5-MuiTypography-root": {
85
86
  fontWeight: (theme) => `${theme.typography.fontWeightMedium}!important`
@@ -114,7 +115,16 @@ const QuickstartItem = ({
114
115
  paddingBottom: "10px"
115
116
  },
116
117
  children: [
117
- /* @__PURE__ */ jsx(ListItem, { children: /* @__PURE__ */ jsx(ListItemText, { primary: item.description }) }),
118
+ /* @__PURE__ */ jsx(ListItem, { children: /* @__PURE__ */ jsx(
119
+ ListItemText,
120
+ {
121
+ primary: getTranslatedTextWithFallback(
122
+ t,
123
+ item.descriptionKey,
124
+ item.description
125
+ )
126
+ }
127
+ ) }),
118
128
  /* @__PURE__ */ jsx(ListItem, { children: /* @__PURE__ */ jsx(
119
129
  QuickstartCtaLink,
120
130
  {
@@ -1 +1 @@
1
- {"version":3,"file":"QuickstartItem.esm.js","sources":["../../../src/components/QuickstartContent/QuickstartItem.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 ExpandLess from '@mui/icons-material/ExpandLess';\nimport ExpandMore from '@mui/icons-material/ExpandMore';\nimport Box from '@mui/material/Box';\nimport Collapse from '@mui/material/Collapse';\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport { useEffect, useState } from 'react';\nimport { QuickstartItemIcon } from './QuickstartItemIcon';\nimport { QuickstartCtaLink } from './QuickstartCtaLink';\nimport IconButton from '@mui/material/IconButton';\nimport { QuickstartItemData } from '../../types';\nimport { useTranslation } from '../../hooks/useTranslation';\n\nexport type QuickstartItemProps = {\n item: QuickstartItemData;\n setProgress: () => void;\n index: number;\n open: boolean;\n handleOpen: () => void;\n};\n\nexport const QuickstartItem = ({\n item,\n setProgress,\n index,\n open,\n handleOpen,\n}: QuickstartItemProps) => {\n const { t } = useTranslation();\n const [stepCompleted, setStepCompleted] = useState<boolean>(false);\n const itemKey = `${item.title}-${index}`;\n\n useEffect(() => {\n const stepState = localStorage.getItem(itemKey);\n if (stepState === 'true') {\n setStepCompleted(true);\n }\n }, [itemKey]);\n\n useEffect(() => {\n localStorage.setItem(itemKey, stepCompleted.toString());\n }, [itemKey, stepCompleted]);\n\n useEffect(() => {\n if (stepCompleted) {\n setProgress();\n }\n }, [stepCompleted, setProgress]);\n\n return (\n <Box sx={{ marginBottom: theme => `${theme.spacing(0.2)}` }}>\n <ListItem\n key={itemKey}\n onClick={handleOpen}\n role=\"button\"\n aria-expanded={open}\n aria-label={\n open\n ? t('item.collapseAriaLabel' as any, { title: item.title })\n : t('item.expandAriaLabel' as any, { title: item.title })\n }\n tabIndex={0}\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleOpen();\n }\n }}\n sx={{\n cursor: 'pointer',\n ...(stepCompleted\n ? {\n backgroundColor: theme =>\n theme.palette.mode === 'light' ? '#F3FAF2' : '#223D2D',\n }\n : { backgroundColor: theme => theme.palette.background.paper }),\n }}\n >\n <ListItemIcon\n sx={{\n minWidth: '40px',\n }}\n >\n <QuickstartItemIcon\n icon={item.icon}\n sx={{\n ...(open\n ? { color: theme => theme.palette.text.primary }\n : { color: theme => theme.palette.text.secondary }),\n }}\n />\n </ListItemIcon>\n <ListItemText\n primary={item.title}\n sx={{\n '& .v5-MuiTypography-root': {\n fontWeight: theme =>\n `${theme.typography.fontWeightMedium}!important`,\n },\n ...(open\n ? { color: theme => theme.palette.text.primary }\n : { color: theme => theme.palette.text.secondary }),\n }}\n />\n <IconButton\n aria-label={\n open\n ? t('item.collapseButtonAriaLabel')\n : t('item.expandButtonAriaLabel')\n }\n sx={{\n ...(open\n ? { color: theme => theme.palette.text.primary }\n : { color: theme => theme.palette.text.secondary }),\n }}\n >\n {open ? <ExpandLess /> : <ExpandMore />}\n </IconButton>\n </ListItem>\n <Collapse in={open} timeout=\"auto\" unmountOnExit>\n <List\n component=\"div\"\n disablePadding\n sx={{\n ...(stepCompleted\n ? {\n backgroundColor: theme =>\n theme.palette.mode === 'light' ? '#F3FAF2' : '#223D2D',\n }\n : { backgroundColor: theme => theme.palette.background.paper }),\n paddingBottom: '10px',\n }}\n >\n <ListItem>\n <ListItemText primary={item.description} />\n </ListItem>\n <ListItem>\n <QuickstartCtaLink\n cta={item.cta}\n onClick={() => {\n setStepCompleted(true);\n }}\n />\n </ListItem>\n </List>\n </Collapse>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAuCO,MAAM,iBAAiB,CAAC;AAAA,EAC7B,IAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,CAA2B,KAAA;AACzB,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAC7B,EAAA,MAAM,CAAC,aAAA,EAAe,gBAAgB,CAAA,GAAI,SAAkB,KAAK,CAAA;AACjE,EAAA,MAAM,OAAU,GAAA,CAAA,EAAG,IAAK,CAAA,KAAK,IAAI,KAAK,CAAA,CAAA;AAEtC,EAAA,SAAA,CAAU,MAAM;AACd,IAAM,MAAA,SAAA,GAAY,YAAa,CAAA,OAAA,CAAQ,OAAO,CAAA;AAC9C,IAAA,IAAI,cAAc,MAAQ,EAAA;AACxB,MAAA,gBAAA,CAAiB,IAAI,CAAA;AAAA;AACvB,GACF,EAAG,CAAC,OAAO,CAAC,CAAA;AAEZ,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,YAAA,CAAa,OAAQ,CAAA,OAAA,EAAS,aAAc,CAAA,QAAA,EAAU,CAAA;AAAA,GACrD,EAAA,CAAC,OAAS,EAAA,aAAa,CAAC,CAAA;AAE3B,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,aAAe,EAAA;AACjB,MAAY,WAAA,EAAA;AAAA;AACd,GACC,EAAA,CAAC,aAAe,EAAA,WAAW,CAAC,CAAA;AAE/B,EAAA,uBACG,IAAA,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AAa,IAC9C,EAAA,QAAA,kBAAA,IAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,SAAU,EAAA,KAAA;AAAA,QACV,cAAc,EAAA,IAAA;AAAA,QACd,EAAI,EAAA;AAAA,UACF,GAAI,aACA,GAAA;AAAA,YACE,iBAAiB,CACf,KAAA,KAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,KAAS,UAAU,SAAY,GAAA;AAAA,cAEjD,EAAE,eAAA,EAAiB,WAAS,KAAM,CAAA,OAAA,CAAQ,WAAW,KAAM,EAAA;AAAA,UAC/D,aAAe,EAAA;AAAA,SACjB;AAAA,QAEA,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,YACC,QAAC,kBAAA,GAAA,CAAA,YAAA,EAAA,EAAa,OAAS,EAAA,IAAA,CAAK,aAAa,CAC3C,EAAA,CAAA;AAAA,8BACC,QACC,EAAA,EAAA,QAAA,kBAAA,GAAA;AAAA,YAAC,iBAAA;AAAA,YAAA;AAAA,cACC,KAAK,IAAK,CAAA,GAAA;AAAA,cACV,SAAS,MAAM;AACb,gBAAA,gBAAA,CAAiB,IAAI,CAAA;AAAA;AACvB;AAAA,WAEJ,EAAA;AAAA;AAAA;AAAA,KAEJ,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"QuickstartItem.esm.js","sources":["../../../src/components/QuickstartContent/QuickstartItem.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 ExpandLess from '@mui/icons-material/ExpandLess';\nimport ExpandMore from '@mui/icons-material/ExpandMore';\nimport Box from '@mui/material/Box';\nimport Collapse from '@mui/material/Collapse';\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport { useEffect, useState } from 'react';\nimport { QuickstartItemIcon } from './QuickstartItemIcon';\nimport { QuickstartCtaLink } from './QuickstartCtaLink';\nimport IconButton from '@mui/material/IconButton';\nimport { QuickstartItemData } from '../../types';\nimport { useTranslation } from '../../hooks/useTranslation';\nimport { getTranslatedTextWithFallback } from '../../utils';\n\nexport type QuickstartItemProps = {\n item: QuickstartItemData;\n setProgress: () => void;\n index: number;\n open: boolean;\n handleOpen: () => void;\n};\n\nexport const QuickstartItem = ({\n item,\n setProgress,\n index,\n open,\n handleOpen,\n}: QuickstartItemProps) => {\n const { t } = useTranslation();\n const [stepCompleted, setStepCompleted] = useState<boolean>(false);\n const itemKey = `${item.title}-${index}`;\n\n useEffect(() => {\n const stepState = localStorage.getItem(itemKey);\n if (stepState === 'true') {\n setStepCompleted(true);\n }\n }, [itemKey]);\n\n useEffect(() => {\n localStorage.setItem(itemKey, stepCompleted.toString());\n }, [itemKey, stepCompleted]);\n\n useEffect(() => {\n if (stepCompleted) {\n setProgress();\n }\n }, [stepCompleted, setProgress]);\n\n return (\n <Box sx={{ marginBottom: theme => `${theme.spacing(0.2)}` }}>\n <ListItem\n key={itemKey}\n onClick={handleOpen}\n role=\"button\"\n aria-expanded={open}\n aria-label={\n open\n ? t('item.collapseAriaLabel' as any, { title: item.title })\n : t('item.expandAriaLabel' as any, { title: item.title })\n }\n tabIndex={0}\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleOpen();\n }\n }}\n sx={{\n cursor: 'pointer',\n ...(stepCompleted\n ? {\n backgroundColor: theme =>\n theme.palette.mode === 'light' ? '#F3FAF2' : '#223D2D',\n }\n : { backgroundColor: theme => theme.palette.background.paper }),\n }}\n >\n <ListItemIcon\n sx={{\n minWidth: '40px',\n }}\n >\n <QuickstartItemIcon\n icon={item.icon}\n sx={{\n ...(open\n ? { color: theme => theme.palette.text.primary }\n : { color: theme => theme.palette.text.secondary }),\n }}\n />\n </ListItemIcon>\n <ListItemText\n primary={getTranslatedTextWithFallback(t, item.titleKey, item.title)}\n sx={{\n '& .v5-MuiTypography-root': {\n fontWeight: theme =>\n `${theme.typography.fontWeightMedium}!important`,\n },\n ...(open\n ? { color: theme => theme.palette.text.primary }\n : { color: theme => theme.palette.text.secondary }),\n }}\n />\n <IconButton\n aria-label={\n open\n ? t('item.collapseButtonAriaLabel')\n : t('item.expandButtonAriaLabel')\n }\n sx={{\n ...(open\n ? { color: theme => theme.palette.text.primary }\n : { color: theme => theme.palette.text.secondary }),\n }}\n >\n {open ? <ExpandLess /> : <ExpandMore />}\n </IconButton>\n </ListItem>\n <Collapse in={open} timeout=\"auto\" unmountOnExit>\n <List\n component=\"div\"\n disablePadding\n sx={{\n ...(stepCompleted\n ? {\n backgroundColor: theme =>\n theme.palette.mode === 'light' ? '#F3FAF2' : '#223D2D',\n }\n : { backgroundColor: theme => theme.palette.background.paper }),\n paddingBottom: '10px',\n }}\n >\n <ListItem>\n <ListItemText\n primary={getTranslatedTextWithFallback(\n t,\n item.descriptionKey,\n item.description,\n )}\n />\n </ListItem>\n <ListItem>\n <QuickstartCtaLink\n cta={item.cta}\n onClick={() => {\n setStepCompleted(true);\n }}\n />\n </ListItem>\n </List>\n </Collapse>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAwCO,MAAM,iBAAiB,CAAC;AAAA,EAC7B,IAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,CAA2B,KAAA;AACzB,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAC7B,EAAA,MAAM,CAAC,aAAA,EAAe,gBAAgB,CAAA,GAAI,SAAkB,KAAK,CAAA;AAC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AA;AAAA,gBACA,IAAK,CAAA,cAAA;AAAA,gBACL,IAAK,CAAA;AAAA;AACP;AAAA,WAEJ,EAAA,CAAA;AAAA,8BACC,QACC,EAAA,EAAA,QAAA,kBAAA,GAAA;AAAA,YAAC,iBAAA;AAAA,YAAA;AAAA,cACC,KAAK,IAAK,CAAA,GAAA;AAAA,cACV,SAAS,MAAM;AACb,gBAAA,gBAAA,CAAiB,IAAI,CAAA;AAAA;AACvB;AAAA,WAEJ,EAAA;AAAA;AAAA;AAAA,KAEJ,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
@@ -5,31 +5,27 @@ import { Quickstart } from './Quickstart.esm.js';
5
5
  import { useQuickstartDrawerContext } from '../hooks/useQuickstartDrawerContext.esm.js';
6
6
  import { filterQuickstartItemsByRole } from '../utils/filterQuickstartItems.esm.js';
7
7
  import { useQuickstartRole } from '../hooks/useQuickstartRole.esm.js';
8
- import { useRef, useEffect } from 'react';
8
+ import { useMemo } from 'react';
9
9
 
10
10
  const QuickstartDrawer = () => {
11
- const { isDrawerOpen, closeDrawer, openDrawer, drawerWidth } = useQuickstartDrawerContext();
12
- const hasAutoOpened = useRef(false);
11
+ const { isDrawerOpen, closeDrawer, drawerWidth } = useQuickstartDrawerContext();
13
12
  const apiHolder = useApiHolder();
14
13
  const config = apiHolder.get(configApiRef);
15
- const quickstartItems = config?.has("app.quickstart") ? config.get("app.quickstart") : [];
14
+ const quickstartItems = useMemo(() => {
15
+ return config?.has("app.quickstart") ? config.get("app.quickstart") : [];
16
+ }, [config]);
16
17
  const { isLoading, userRole } = useQuickstartRole();
17
- const filteredItems = !isLoading && userRole ? filterQuickstartItemsByRole(quickstartItems, userRole) : [];
18
- useEffect(() => {
19
- if (!isLoading && filteredItems.length > 0 && !isDrawerOpen && !hasAutoOpened.current) {
20
- openDrawer();
21
- hasAutoOpened.current = true;
22
- }
23
- }, [isLoading, filteredItems.length, isDrawerOpen, openDrawer]);
24
- if (!isLoading && filteredItems.length === 0) {
25
- if (isDrawerOpen) {
26
- closeDrawer();
27
- }
18
+ const eligibleItems = useMemo(() => {
19
+ return !isLoading && userRole ? filterQuickstartItemsByRole(quickstartItems, userRole) : [];
20
+ }, [isLoading, userRole, quickstartItems]);
21
+ const filteredItems = useMemo(() => {
22
+ return isDrawerOpen ? eligibleItems : [];
23
+ }, [isDrawerOpen, eligibleItems]);
24
+ if (quickstartItems.length === 0) {
28
25
  return null;
29
26
  }
30
- if (isLoading && isDrawerOpen) {
31
- closeDrawer();
32
- hasAutoOpened.current = false;
27
+ if (!isLoading && eligibleItems.length === 0) {
28
+ return null;
33
29
  }
34
30
  return /* @__PURE__ */ jsx(
35
31
  Drawer,
@@ -1 +1 @@
1
- {"version":3,"file":"QuickstartDrawer.esm.js","sources":["../../src/components/QuickstartDrawer.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 Drawer from '@mui/material/Drawer';\nimport { ThemeConfig } from '@red-hat-developer-hub/backstage-plugin-theme';\nimport { configApiRef, useApiHolder } from '@backstage/core-plugin-api';\nimport { Quickstart } from './Quickstart';\nimport { useQuickstartDrawerContext } from '../hooks/useQuickstartDrawerContext';\nimport { QuickstartItemData } from '../types';\nimport { filterQuickstartItemsByRole } from '../utils';\nimport { useQuickstartRole } from '../hooks/useQuickstartRole';\nimport { useEffect, useRef } from 'react';\n\nexport const QuickstartDrawer = () => {\n const { isDrawerOpen, closeDrawer, openDrawer, drawerWidth } =\n useQuickstartDrawerContext();\n\n // Track if we've already auto-opened the drawer to prevent re-opening after manual close\n const hasAutoOpened = useRef(false);\n\n const apiHolder = useApiHolder();\n const config = apiHolder.get(configApiRef);\n const quickstartItems: QuickstartItemData[] = config?.has('app.quickstart')\n ? config.get('app.quickstart')\n : [];\n\n const { isLoading, userRole } = useQuickstartRole();\n const filteredItems =\n !isLoading && userRole\n ? filterQuickstartItemsByRole(quickstartItems, userRole)\n : [];\n\n // Auto-open drawer when user logs in and has quickstart items available\n // Only do this once, and respect user's manual close action\n useEffect(() => {\n if (\n !isLoading &&\n filteredItems.length > 0 &&\n !isDrawerOpen &&\n !hasAutoOpened.current\n ) {\n openDrawer();\n hasAutoOpened.current = true;\n }\n }, [isLoading, filteredItems.length, isDrawerOpen, openDrawer]);\n\n // Hide the drawer entirely if there are no quickstart items for the user\n // Do this check first, before any rendering happens\n if (!isLoading && filteredItems.length === 0) {\n // Also close the drawer context if it's currently open to prevent layout issues\n if (isDrawerOpen) {\n closeDrawer();\n }\n return null;\n }\n\n // During loading, if drawer is open but we don't know if user will have items yet,\n // close it preemptively to prevent flash and reset auto-open tracking\n if (isLoading && isDrawerOpen) {\n closeDrawer();\n hasAutoOpened.current = false; // Reset for new user\n }\n\n return (\n <Drawer\n sx={{\n '& .v5-MuiDrawer-paper': {\n width: drawerWidth,\n boxSizing: 'border-box',\n backgroundColor: theme =>\n `${\n (theme as ThemeConfig).palette?.rhdh?.general\n .sidebarBackgroundColor\n }`,\n justifyContent: 'space-between',\n },\n // Only apply header offset when global header exists\n 'body:has(#global-header) &': {\n '& .v5-MuiDrawer-paper': {\n top: '64px !important',\n height: 'calc(100vh - 64px) !important',\n },\n },\n }}\n variant=\"persistent\"\n anchor=\"right\"\n open={isDrawerOpen}\n >\n <Quickstart\n quickstartItems={filteredItems}\n handleDrawerClose={closeDrawer}\n isLoading={isLoading}\n />\n </Drawer>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AA0BO,MAAM,mBAAmB,MAAM;AACpC,EAAA,MAAM,EAAE,YAAc,EAAA,WAAA,EAAa,UAAY,EAAA,WAAA,KAC7C,0BA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A,IAAA,EAAM,QACnC,sBACL,CAAA,CAAA;AAAA,UACF,cAAgB,EAAA;AAAA,SAClB;AAAA;AAAA,QAEA,4BAA8B,EAAA;AAAA,UAC5B,uBAAyB,EAAA;AAAA,YACvB,GAAK,EAAA,iBAAA;AAAA,YACL,MAAQ,EAAA;AAAA;AACV;AACF,OACF;AAAA,MACA,OAAQ,EAAA,YAAA;AAAA,MACR,MAAO,EAAA,OAAA;AAAA,MACP,IAAM,EAAA,YAAA;AAAA,MAEN,QAAA,kBAAA,GAAA;AAAA,QAAC,UAAA;AAAA,QAAA;AAAA,UACC,eAAiB,EAAA,aAAA;AAAA,UACjB,iBAAmB,EAAA,WAAA;AAAA,UACnB;AAAA;AAAA;AACF;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"QuickstartDrawer.esm.js","sources":["../../src/components/QuickstartDrawer.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 Drawer from '@mui/material/Drawer';\nimport { ThemeConfig } from '@red-hat-developer-hub/backstage-plugin-theme';\nimport { configApiRef, useApiHolder } from '@backstage/core-plugin-api';\nimport { Quickstart } from './Quickstart';\nimport { useQuickstartDrawerContext } from '../hooks/useQuickstartDrawerContext';\nimport { QuickstartItemData } from '../types';\nimport { filterQuickstartItemsByRole } from '../utils';\nimport { useQuickstartRole } from '../hooks/useQuickstartRole';\nimport { useMemo } from 'react';\n\nexport const QuickstartDrawer = () => {\n const { isDrawerOpen, closeDrawer, drawerWidth } =\n useQuickstartDrawerContext();\n\n const apiHolder = useApiHolder();\n const config = apiHolder.get(configApiRef);\n const quickstartItems: QuickstartItemData[] = useMemo(() => {\n return config?.has('app.quickstart')\n ? (config.get('app.quickstart') as QuickstartItemData[])\n : [];\n }, [config]);\n\n const { isLoading, userRole } = useQuickstartRole();\n\n // Items available to the user based on cached/derived role\n const eligibleItems = useMemo(() => {\n return !isLoading && userRole\n ? filterQuickstartItemsByRole(quickstartItems, userRole)\n : [];\n }, [isLoading, userRole, quickstartItems]);\n\n // Only expose items to the body when drawer is open to avoid re-renders during close\n const filteredItems = useMemo(() => {\n return isDrawerOpen ? eligibleItems : [];\n }, [isDrawerOpen, eligibleItems]);\n\n // No auto-open logic here; the provider initializes per user (visited/open)\n\n // If no quickstart items are configured at all, don't render the drawer to avoid reserving space\n if (quickstartItems.length === 0) {\n return null;\n }\n\n // If there are no items for the user, hide the drawer entirely\n if (!isLoading && eligibleItems.length === 0) {\n return null;\n }\n\n // No role-fetching or filtering here when the drawer is closed\n\n return (\n <Drawer\n sx={{\n '& .v5-MuiDrawer-paper': {\n width: drawerWidth,\n boxSizing: 'border-box',\n backgroundColor: theme =>\n `${\n (theme as ThemeConfig).palette?.rhdh?.general\n .sidebarBackgroundColor\n }`,\n justifyContent: 'space-between',\n },\n // Only apply header offset when global header exists\n 'body:has(#global-header) &': {\n '& .v5-MuiDrawer-paper': {\n top: '64px !important',\n height: 'calc(100vh - 64px) !important',\n },\n },\n }}\n variant=\"persistent\"\n anchor=\"right\"\n open={isDrawerOpen}\n >\n <Quickstart\n quickstartItems={filteredItems}\n handleDrawerClose={closeDrawer}\n isLoading={isLoading}\n />\n </Drawer>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AA0BO,MAAM,mBAAmB,MAAM;AACpC,EAAA,MAAM,EAAE,YAAA,EAAc,WAAa,EAAA,WAAA,KACjC,0BAA2B,EAAA;AAE7B,EAAA,MAAM,YAAY,YAAa,EAAA;AAC/B,EAAM,MAAA,MAAA,GAAS,SAAU,CAAA,GAAA,CAAI,YAAY,CAAA;AACzC,EAAM,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AAA;AAAA,MACR,MAAO,EAAA,OAAA;AAAA,MACP,IAAM,EAAA,YAAA;AAAA,MAEN,QAAA,kBAAA,GAAA;AAAA,QAAC,UAAA;AAAA,QAAA;AAAA,UACC,eAAiB,EAAA,aAAA;AAAA,UACjB,iBAAmB,EAAA,WAAA;AAAA,UACnB;AAAA;AAAA;AACF;AAAA,GACF;AAEJ;;;;"}
@@ -1,5 +1,6 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { useState, useEffect } from 'react';
3
+ import { useApi, identityApiRef, configApiRef } from '@backstage/core-plugin-api';
3
4
  import Snackbar from '@mui/material/Snackbar';
4
5
  import CloseIcon from '@mui/icons-material/Close';
5
6
  import IconButton from '@mui/material/IconButton';
@@ -11,6 +12,9 @@ const QuickstartDrawerProvider = ({ children }) => {
11
12
  const [showNotification, setShowNotification] = useState(false);
12
13
  const [hasShownNotification, setHasShownNotification] = useState(false);
13
14
  const [drawerWidth, setDrawerWidth] = useState(500);
15
+ const [userKey, setUserKey] = useState("guest");
16
+ const identityApi = useApi(identityApiRef);
17
+ const configApi = useApi(configApiRef);
14
18
  useEffect(() => {
15
19
  if (isDrawerOpen) {
16
20
  document.body.classList.add("quickstart-drawer-open");
@@ -28,36 +32,74 @@ const QuickstartDrawerProvider = ({ children }) => {
28
32
  };
29
33
  }, [isDrawerOpen, drawerWidth]);
30
34
  useEffect(() => {
31
- const wasOpen = localStorage.getItem("quickstart-open");
32
- const hasVisited = localStorage.getItem("quickstart-visited");
33
- const notificationShown = localStorage.getItem(
34
- "quickstart-notification-shown"
35
- );
35
+ let cancelled = false;
36
+ (async () => {
37
+ try {
38
+ const identity = await identityApi.getBackstageIdentity();
39
+ const ref = identity?.userEntityRef?.toLowerCase() || "guest";
40
+ if (!cancelled) setUserKey(ref);
41
+ } catch (e) {
42
+ if (!cancelled) setUserKey("guest");
43
+ }
44
+ })();
45
+ return () => {
46
+ cancelled = true;
47
+ };
48
+ }, [identityApi]);
49
+ useEffect(() => {
50
+ if (!userKey) return;
51
+ const hasAnyQuickstarts = (() => {
52
+ try {
53
+ if (!configApi?.has("app.quickstart")) return false;
54
+ const items = configApi.get("app.quickstart");
55
+ return Array.isArray(items) && items.length > 0;
56
+ } catch {
57
+ return false;
58
+ }
59
+ })();
60
+ const openKey = `quickstart-open:${userKey}`;
61
+ const visitedKey = `quickstart-visited:${userKey}`;
62
+ const notificationKey = `quickstart-notification-shown:${userKey}`;
63
+ if (!hasAnyQuickstarts) {
64
+ setIsDrawerOpen(false);
65
+ localStorage.setItem(openKey, "false");
66
+ return;
67
+ }
68
+ const wasOpen = localStorage.getItem(openKey);
69
+ const hasVisited = localStorage.getItem(visitedKey);
70
+ const notificationShown = localStorage.getItem(notificationKey);
36
71
  if (!hasVisited) {
37
72
  setIsDrawerOpen(true);
38
- localStorage.setItem("quickstart-visited", "true");
39
- localStorage.setItem("quickstart-open", "true");
73
+ localStorage.setItem(visitedKey, "true");
74
+ localStorage.setItem(openKey, "true");
40
75
  } else if (wasOpen === "true") {
41
76
  setIsDrawerOpen(true);
77
+ } else {
78
+ setIsDrawerOpen(false);
42
79
  }
43
80
  setHasShownNotification(notificationShown === "true");
44
- }, []);
81
+ }, [userKey, configApi]);
45
82
  const openDrawer = () => {
46
83
  setIsDrawerOpen(true);
47
- localStorage.setItem("quickstart-open", "true");
84
+ const openKey = `quickstart-open:${userKey}`;
85
+ localStorage.setItem(openKey, "true");
48
86
  };
49
87
  const closeDrawer = () => {
50
88
  setIsDrawerOpen(false);
51
89
  if (!hasShownNotification) {
52
90
  setShowNotification(true);
53
91
  setHasShownNotification(true);
54
- localStorage.setItem("quickstart-notification-shown", "true");
92
+ const notificationKey = `quickstart-notification-shown:${userKey}`;
93
+ localStorage.setItem(notificationKey, "true");
55
94
  }
56
- localStorage.setItem("quickstart-open", "false");
95
+ const openKey = `quickstart-open:${userKey}`;
96
+ localStorage.setItem(openKey, "false");
57
97
  };
58
98
  const toggleDrawer = () => {
59
- setIsDrawerOpen(!isDrawerOpen);
60
- localStorage.setItem("quickstart-open", (!isDrawerOpen).toString());
99
+ const next = !isDrawerOpen;
100
+ setIsDrawerOpen(next);
101
+ const openKey = `quickstart-open:${userKey}`;
102
+ localStorage.setItem(openKey, next.toString());
61
103
  };
62
104
  const handleNotificationClose = () => setShowNotification(false);
63
105
  return /* @__PURE__ */ jsxs(
@@ -1 +1 @@
1
- {"version":3,"file":"QuickstartDrawerProvider.esm.js","sources":["../../src/components/QuickstartDrawerProvider.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 { useEffect, PropsWithChildren, useState } from 'react';\nimport Snackbar from '@mui/material/Snackbar';\nimport CloseIcon from '@mui/icons-material/Close';\nimport IconButton from '@mui/material/IconButton';\nimport { QuickstartDrawerContext } from './QuickstartDrawerContext';\nimport { QuickstartDrawer } from './QuickstartDrawer';\n\nexport const QuickstartDrawerProvider = ({ children }: PropsWithChildren) => {\n const [isDrawerOpen, setIsDrawerOpen] = useState<boolean>(false);\n const [showNotification, setShowNotification] = useState(false);\n const [hasShownNotification, setHasShownNotification] = useState(false);\n const [drawerWidth, setDrawerWidth] = useState<number>(500);\n\n // Single useEffect - sets class on document.body\n useEffect(() => {\n if (isDrawerOpen) {\n document.body.classList.add('quickstart-drawer-open');\n document.body.style.setProperty(\n '--quickstart-drawer-width',\n `${drawerWidth}px`,\n );\n } else {\n document.body.classList.remove('quickstart-drawer-open');\n document.body.style.removeProperty('--quickstart-drawer-width');\n }\n\n return () => {\n document.body.classList.remove('quickstart-drawer-open');\n document.body.style.removeProperty('--quickstart-drawer-width');\n };\n }, [isDrawerOpen, drawerWidth]);\n\n useEffect(() => {\n const wasOpen = localStorage.getItem('quickstart-open');\n const hasVisited = localStorage.getItem('quickstart-visited');\n const notificationShown = localStorage.getItem(\n 'quickstart-notification-shown',\n );\n\n if (!hasVisited) {\n setIsDrawerOpen(true);\n localStorage.setItem('quickstart-visited', 'true');\n localStorage.setItem('quickstart-open', 'true');\n } else if (wasOpen === 'true') {\n setIsDrawerOpen(true);\n }\n\n setHasShownNotification(notificationShown === 'true');\n }, []);\n\n const openDrawer = () => {\n setIsDrawerOpen(true);\n localStorage.setItem('quickstart-open', 'true');\n };\n\n const closeDrawer = () => {\n setIsDrawerOpen(false);\n if (!hasShownNotification) {\n setShowNotification(true);\n setHasShownNotification(true);\n localStorage.setItem('quickstart-notification-shown', 'true');\n }\n localStorage.setItem('quickstart-open', 'false');\n };\n\n const toggleDrawer = () => {\n setIsDrawerOpen(!isDrawerOpen);\n localStorage.setItem('quickstart-open', (!isDrawerOpen).toString());\n };\n\n const handleNotificationClose = () => setShowNotification(false);\n\n return (\n <QuickstartDrawerContext.Provider\n value={{\n isDrawerOpen,\n openDrawer,\n closeDrawer,\n toggleDrawer,\n setDrawerWidth,\n drawerWidth,\n }}\n >\n {children}\n <QuickstartDrawer />\n <Snackbar\n sx={{ top: '80px !important' }}\n open={showNotification}\n autoHideDuration={10000}\n onClose={handleNotificationClose}\n anchorOrigin={{ vertical: 'top', horizontal: 'right' }}\n message=\"Need help? Visit the Quick Start Guide by clicking on this (?) icon in the header!\"\n action={\n <IconButton\n size=\"small\"\n aria-label=\"close\"\n color=\"inherit\"\n onClick={handleNotificationClose}\n >\n <CloseIcon fontSize=\"small\" />\n </IconButton>\n }\n />\n </QuickstartDrawerContext.Provider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAuBO,MAAM,wBAA2B,GAAA,CAAC,EAAE,QAAA,EAAkC,KAAA;AAC3E,EAAA,MAAM,CAAC,YAAA,EAAc,eAAe,CAAA,GAAI,SAAk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CAAA;AAAA,wBAClB,GAAA;AAAA,UAAC,QAAA;AAAA,UAAA;AAAA,YACC,EAAA,EAAI,EAAE,GAAA,EAAK,iBAAkB,EAAA;AAAA,YAC7B,IAAM,EAAA,gBAAA;AAAA,YACN,gBAAkB,EAAA,GAAA;AAAA,YAClB,OAAS,EAAA,uBAAA;AAAA,YACT,YAAc,EAAA,EAAE,QAAU,EAAA,KAAA,EAAO,YAAY,OAAQ,EAAA;AAAA,YACrD,OAAQ,EAAA,oFAAA;AAAA,YACR,MACE,kBAAA,GAAA;AAAA,cAAC,UAAA;AAAA,cAAA;AAAA,gBACC,IAAK,EAAA,OAAA;AAAA,gBACL,YAAW,EAAA,OAAA;AAAA,gBACX,KAAM,EAAA,SAAA;AAAA,gBACN,OAAS,EAAA,uBAAA;AAAA,gBAET,QAAA,kBAAA,GAAA,CAAC,SAAU,EAAA,EAAA,QAAA,EAAS,OAAQ,EAAA;AAAA;AAAA;AAC9B;AAAA;AAEJ;AAAA;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"QuickstartDrawerProvider.esm.js","sources":["../../src/components/QuickstartDrawerProvider.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 { useEffect, PropsWithChildren, useState } from 'react';\nimport {\n configApiRef,\n identityApiRef,\n useApi,\n} from '@backstage/core-plugin-api';\nimport Snackbar from '@mui/material/Snackbar';\nimport CloseIcon from '@mui/icons-material/Close';\nimport IconButton from '@mui/material/IconButton';\nimport { QuickstartDrawerContext } from './QuickstartDrawerContext';\nimport { QuickstartDrawer } from './QuickstartDrawer';\n\nexport const QuickstartDrawerProvider = ({ children }: PropsWithChildren) => {\n const [isDrawerOpen, setIsDrawerOpen] = useState<boolean>(false);\n const [showNotification, setShowNotification] = useState(false);\n const [hasShownNotification, setHasShownNotification] = useState(false);\n const [drawerWidth, setDrawerWidth] = useState<number>(500);\n const [userKey, setUserKey] = useState<string>('guest');\n const identityApi = useApi(identityApiRef);\n const configApi = useApi(configApiRef);\n\n // Single useEffect - sets class on document.body\n useEffect(() => {\n if (isDrawerOpen) {\n document.body.classList.add('quickstart-drawer-open');\n document.body.style.setProperty(\n '--quickstart-drawer-width',\n `${drawerWidth}px`,\n );\n } else {\n document.body.classList.remove('quickstart-drawer-open');\n document.body.style.removeProperty('--quickstart-drawer-width');\n }\n\n return () => {\n document.body.classList.remove('quickstart-drawer-open');\n document.body.style.removeProperty('--quickstart-drawer-width');\n };\n }, [isDrawerOpen, drawerWidth]);\n\n // Resolve the current user's identity to scope localStorage keys per user\n useEffect(() => {\n let cancelled = false;\n (async () => {\n try {\n const identity = await identityApi.getBackstageIdentity();\n const ref = identity?.userEntityRef?.toLowerCase() || 'guest';\n if (!cancelled) setUserKey(ref);\n } catch (e) {\n if (!cancelled) setUserKey('guest');\n }\n })();\n return () => {\n cancelled = true;\n };\n }, [identityApi]);\n\n // Initialize drawer state based on per-user keys and only when quickstarts exist\n useEffect(() => {\n if (!userKey) return;\n\n // Determine if there are any quickstart items configured globally\n const hasAnyQuickstarts = (() => {\n try {\n if (!configApi?.has('app.quickstart')) return false;\n const items = configApi.get('app.quickstart') as unknown;\n return Array.isArray(items) && items.length > 0;\n } catch {\n return false;\n }\n })();\n\n const openKey = `quickstart-open:${userKey}`;\n const visitedKey = `quickstart-visited:${userKey}`;\n const notificationKey = `quickstart-notification-shown:${userKey}`;\n\n // If no quickstarts are configured, ensure the drawer is closed and don't mark as visited\n if (!hasAnyQuickstarts) {\n setIsDrawerOpen(false);\n // Avoid persisting visited so future addition of items can auto-open\n localStorage.setItem(openKey, 'false');\n return;\n }\n\n const wasOpen = localStorage.getItem(openKey);\n const hasVisited = localStorage.getItem(visitedKey);\n const notificationShown = localStorage.getItem(notificationKey);\n\n if (!hasVisited) {\n setIsDrawerOpen(true);\n localStorage.setItem(visitedKey, 'true');\n localStorage.setItem(openKey, 'true');\n } else if (wasOpen === 'true') {\n setIsDrawerOpen(true);\n } else {\n setIsDrawerOpen(false);\n }\n\n setHasShownNotification(notificationShown === 'true');\n }, [userKey, configApi]);\n\n const openDrawer = () => {\n setIsDrawerOpen(true);\n const openKey = `quickstart-open:${userKey}`;\n localStorage.setItem(openKey, 'true');\n };\n\n const closeDrawer = () => {\n setIsDrawerOpen(false);\n if (!hasShownNotification) {\n setShowNotification(true);\n setHasShownNotification(true);\n const notificationKey = `quickstart-notification-shown:${userKey}`;\n localStorage.setItem(notificationKey, 'true');\n }\n const openKey = `quickstart-open:${userKey}`;\n localStorage.setItem(openKey, 'false');\n };\n\n const toggleDrawer = () => {\n const next = !isDrawerOpen;\n setIsDrawerOpen(next);\n const openKey = `quickstart-open:${userKey}`;\n localStorage.setItem(openKey, next.toString());\n };\n\n const handleNotificationClose = () => setShowNotification(false);\n\n return (\n <QuickstartDrawerContext.Provider\n value={{\n isDrawerOpen,\n openDrawer,\n closeDrawer,\n toggleDrawer,\n setDrawerWidth,\n drawerWidth,\n }}\n >\n {children}\n <QuickstartDrawer />\n <Snackbar\n sx={{ top: '80px !important' }}\n open={showNotification}\n autoHideDuration={10000}\n onClose={handleNotificationClose}\n anchorOrigin={{ vertical: 'top', horizontal: 'right' }}\n message=\"Need help? Visit the Quick Start Guide by clicking on this (?) icon in the header!\"\n action={\n <IconButton\n size=\"small\"\n aria-label=\"close\"\n color=\"inherit\"\n onClick={handleNotificationClose}\n >\n <CloseIcon fontSize=\"small\" />\n </IconButton>\n }\n />\n </QuickstartDrawerContext.Provider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AA4BO,MAAM,wBAA2B,GAAA,CAAC,EAAE,QAAA,EAAkC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entials = await identityApi.getCredentials();
16
16
  const identity = await identityApi.getBackstageIdentity();
17
17
  const hasValidToken = credentials?.token && credentials.token.length > 10;
18
- const userEntityRef = identity?.userEntityRef || "";
18
+ const userEntityRef2 = identity?.userEntityRef || "";
19
19
  const ownershipRefs = identity?.ownershipEntityRefs || [];
20
- const isGuest = userEntityRef.toLowerCase().includes("guest") || userEntityRef === "user:default/guest" || !hasValidToken && ownershipRefs.length === 0;
20
+ const isGuest = userEntityRef2.toLowerCase().includes("guest") || userEntityRef2 === "user:default/guest" || !hasValidToken && ownershipRefs.length === 0;
21
21
  const isAuthenticated = !isGuest;
22
22
  return { isAuthenticated, identity, credentials };
23
23
  } catch (error) {
24
24
  return { isAuthenticated: false, identity: null, credentials: null };
25
25
  }
26
26
  }, [identityApi]);
27
- if (authLoading || loading) return { isLoading: true, userRole: null };
27
+ if (authLoading) return { isLoading: true, userRole: null };
28
+ const userEntityRef = authResult?.identity?.userEntityRef || "guest";
29
+ const cacheKey = `quickstart-role:${userEntityRef}:rbac:${isRBACEnabled ? "1" : "0"}`;
30
+ const cachedRole = typeof window !== "undefined" ? sessionStorage.getItem(cacheKey) : null;
31
+ if (cachedRole === "admin" || cachedRole === "developer") {
32
+ return { isLoading: false, userRole: cachedRole };
33
+ }
34
+ if (loading) return { isLoading: true, userRole: null };
28
35
  const isUserAuthorized = authResult?.isAuthenticated ?? false;
29
36
  if (!isUserAuthorized) {
30
37
  return { isLoading: false, userRole: "admin" };
31
38
  }
32
- if (!isRBACEnabled) return { isLoading: false, userRole: "admin" };
33
- if (allowed) return { isLoading: false, userRole: "admin" };
39
+ if (!isRBACEnabled) {
40
+ if (typeof window !== "undefined")
41
+ sessionStorage.setItem(cacheKey, "admin");
42
+ return { isLoading: false, userRole: "admin" };
43
+ }
44
+ if (allowed) {
45
+ if (typeof window !== "undefined")
46
+ sessionStorage.setItem(cacheKey, "admin");
47
+ return { isLoading: false, userRole: "admin" };
48
+ }
49
+ if (typeof window !== "undefined")
50
+ sessionStorage.setItem(cacheKey, "developer");
34
51
  return { isLoading: false, userRole: "developer" };
35
52
  };
36
53
 
@@ -1 +1 @@
1
- {"version":3,"file":"useQuickstartRole.esm.js","sources":["../../src/hooks/useQuickstartRole.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 { usePermission } from '@backstage/plugin-permission-react';\nimport {\n configApiRef,\n identityApiRef,\n useApi,\n} from '@backstage/core-plugin-api';\nimport { policyEntityCreatePermission } from '@backstage-community/plugin-rbac-common';\nimport { useAsync } from 'react-use';\nimport { UserRole } from '../types';\n\n/**\n * Determines the user's role for quickstart functionality based on RBAC permissions and user authorization.\n *\n * Business Logic:\n * - Guest user(unauthorized): show admin items\n * - Authorized user + NO RBAC enabled: show admin items\n * - Authorized user + RBAC enabled:\n * - if user has admin permission => show configured admin items\n * - if user doesn't have admin permission => show configured developer items\n *\n * @returns Object with isLoading boolean and userRole ('admin' | 'developer' | null)\n */\nexport const useQuickstartRole = (): {\n isLoading: boolean;\n userRole: UserRole | null;\n} => {\n const config = useApi(configApiRef);\n const identityApi = useApi(identityApiRef);\n const isRBACEnabled =\n config.getOptionalBoolean('permission.enabled') ?? false;\n const { loading, allowed } = usePermission({\n permission: policyEntityCreatePermission,\n });\n\n // Check user authorization status by examining identity and credentials\n const { value: authResult, loading: authLoading } = useAsync(async () => {\n try {\n const credentials = await identityApi.getCredentials();\n const identity = await identityApi.getBackstageIdentity();\n\n // Check multiple indicators to determine if user is authenticated (not a guest)\n const hasValidToken = credentials?.token && credentials.token.length > 10; // Real tokens are longer\n const userEntityRef = identity?.userEntityRef || '';\n const ownershipRefs = identity?.ownershipEntityRefs || [];\n\n const isGuest =\n userEntityRef.toLowerCase().includes('guest') ||\n userEntityRef === 'user:default/guest' ||\n (!hasValidToken && ownershipRefs.length === 0);\n\n const isAuthenticated = !isGuest;\n\n return { isAuthenticated, identity, credentials };\n } catch (error) {\n return { isAuthenticated: false, identity: null, credentials: null };\n }\n }, [identityApi]);\n\n // If still loading authorization or permissions, return loading state\n if (authLoading || loading) return { isLoading: true, userRole: null };\n\n // Check if user is authorized (authenticated, not a guest)\n const isUserAuthorized = authResult?.isAuthenticated ?? false;\n\n // Unauthorized user: show admin items\n if (!isUserAuthorized) {\n return { isLoading: false, userRole: 'admin' };\n }\n\n // Authorized user + NO RBAC enabled: show admin items\n if (!isRBACEnabled) return { isLoading: false, userRole: 'admin' };\n\n // Authorized user + RBAC enabled: check permissions\n // If user has admin permission => show configured admin items\n if (allowed) return { isLoading: false, userRole: 'admin' };\n\n // If user doesn't have admin permission => show configured developer items\n return { isLoading: false, userRole: 'developer' };\n};\n"],"names":[],"mappings":";;;;;AAsCO,MAAM,oBAAoB,MAG5B;AACH,EAAM,MAAA,MAAA,GAAS,OAAO,YAAY,CAAA;AAClC,EAAM,MAAA,WAAA,GAAc,OAAO,cAAc,CAAA;AACzC,EAAA,MAAM,aACJ,GAAA,MAAA,CAAO,kBAAmB,CAAA,oBAAoB,CAAK,IAAA,KAAA;AACrD,EAAA,MAAM,EAAE,OAAA,EAAS,OAAQ,EAAA,GAAI,aAAc,CAAA;AAAA,IACzC,UAAY,EAAA;AAAA,GACb,CAAA;AAGD,EAAA,MAAM,EAAE,KAAO,EAAA,UAAA,EAAY,SAAS,WAAY,EAAA,GAAI,SAAS,YAAY;AACvE,IAAI,IAAA;AACF,MAAM,MAAA,WAAA,GAAc,MAAM,WAAA,CAAY,cAAe,EAAA;AACrD,MAAM,MAAA,QAAA,GAAW,MAAM,WAAA,CAAY,oBAAqB,EAAA;AAGxD,MAAA,MAAM,aAAgB,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right 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 { usePermission } from '@backstage/plugin-permission-react';\nimport {\n configApiRef,\n identityApiRef,\n useApi,\n} from '@backstage/core-plugin-api';\nimport { policyEntityCreatePermission } from '@backstage-community/plugin-rbac-common';\nimport { useAsync } from 'react-use';\nimport { UserRole } from '../types';\n\n/**\n * Determines the user's role for quickstart functionality based on RBAC permissions and user authorization.\n *\n * Business Logic:\n * - Guest user(unauthorized): show admin items\n * - Authorized user + NO RBAC enabled: show admin items\n * - Authorized user + RBAC enabled:\n * - if user has admin permission => show configured admin items\n * - if user doesn't have admin permission => show configured developer items\n *\n * @returns Object with isLoading boolean and userRole ('admin' | 'developer' | null)\n */\nexport const useQuickstartRole = (): {\n isLoading: boolean;\n userRole: UserRole | null;\n} => {\n const config = useApi(configApiRef);\n const identityApi = useApi(identityApiRef);\n const isRBACEnabled =\n config.getOptionalBoolean('permission.enabled') ?? false;\n const { loading, allowed } = usePermission({\n permission: policyEntityCreatePermission,\n });\n\n // Check user authorization status by examining identity and credentials\n const { value: authResult, loading: authLoading } = useAsync(async () => {\n try {\n const credentials = await identityApi.getCredentials();\n const identity = await identityApi.getBackstageIdentity();\n\n // Check multiple indicators to determine if user is authenticated (not a guest)\n const hasValidToken = credentials?.token && credentials.token.length > 10; // Real tokens are longer\n const userEntityRef = identity?.userEntityRef || '';\n const ownershipRefs = identity?.ownershipEntityRefs || [];\n\n const isGuest =\n userEntityRef.toLowerCase().includes('guest') ||\n userEntityRef === 'user:default/guest' ||\n (!hasValidToken && ownershipRefs.length === 0);\n\n const isAuthenticated = !isGuest;\n\n return { isAuthenticated, identity, credentials };\n } catch (error) {\n return { isAuthenticated: false, identity: null, credentials: null };\n }\n }, [identityApi]);\n\n // When auth is still resolving, return loading\n if (authLoading) return { isLoading: true, userRole: null };\n\n // After auth resolves, attempt to serve cached role (session scoped)\n const userEntityRef = authResult?.identity?.userEntityRef || 'guest';\n const cacheKey = `quickstart-role:${userEntityRef}:rbac:${\n isRBACEnabled ? '1' : '0'\n }`;\n const cachedRole =\n typeof window !== 'undefined' ? sessionStorage.getItem(cacheKey) : null;\n if (cachedRole === 'admin' || cachedRole === 'developer') {\n return { isLoading: false, userRole: cachedRole as UserRole };\n }\n\n // If permission is still loading and there's no cache, report loading\n if (loading) return { isLoading: true, userRole: null };\n\n // Check if user is authorized (authenticated, not a guest)\n const isUserAuthorized = authResult?.isAuthenticated ?? false;\n\n // Unauthorized user: show admin items\n if (!isUserAuthorized) {\n return { isLoading: false, userRole: 'admin' };\n }\n\n // Authorized user + NO RBAC enabled: show admin items\n if (!isRBACEnabled) {\n if (typeof window !== 'undefined')\n sessionStorage.setItem(cacheKey, 'admin');\n return { isLoading: false, userRole: 'admin' };\n }\n\n // Authorized user + RBAC enabled: check permissions\n // If user has admin permission => show configured admin items\n if (allowed) {\n if (typeof window !== 'undefined')\n sessionStorage.setItem(cacheKey, 'admin');\n return { isLoading: false, userRole: 'admin' };\n }\n\n // If user doesn't have admin permission => show configured developer items\n if (typeof window !== 'undefined')\n sessionStorage.setItem(cacheKey, 'developer');\n return { isLoading: false, userRole: 'developer' };\n};\n"],"names":["userEntityRef"],"mappings":";;;;;AAsCO,MAAM,oBAAoB,MAG5B;AACH,EAAM,MAAA,MAAA,GAAS,OAAO,YAAY,CAAA;AAClC,EAAM,MAAA,WAAA,GAAc,OAAO,cAAc,CAAA;AACzC,EAAA,MAAM,aACJ,GAAA,MAAA,CAAO,kBAAmB,CAAA,oBAAoB,CAAK,IAAA,KAAA;AACrD,EAAA,MAAM,EAAE,OAAA,EAAS,OAAQ,EAAA,GAAI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AAW,cAAc,cAAe,CAAA,OAAA,CAAQ,QAAQ,CAAI,GAAA,IAAA;AACrE,EAAI,IAAA,UAAA,KAAe,OAAW,IAAA,UAAA,KAAe,WAAa,EAAA;AACxD,IAAA,OAAO,EAAE,SAAA,EAAW,KAAO,EAAA,QAAA,EAAU,UAAuB,EAAA;AAAA;AAI9D,EAAA,IAAI,SAAgB,OAAA,EAAE,SAAW,EAAA,IAAA,EAAM,UAAU,IAAK,EAAA;AAGtD,EAAM,MAAA,gBAAA,GAAmB,YAAY,eAAmB,IAAA,KAAA;AAGxD,EAAA,IAAI,CAAC,gBAAkB,EAAA;AACrB,IAAA,OAAO,EAAE,SAAA,EAAW,KAAO,EAAA,QAAA,EAAU,OAAQ,EAAA;AAAA;AAI/C,EAAA,IAAI,CAAC,aAAe,EAAA;AAClB,IAAA,IAAI,OAAO,MAAW,KAAA,WAAA;AACpB,MAAe,cAAA,CAAA,OAAA,CAAQ,UAAU,OAAO,CAAA;AAC1C,IAAA,OAAO,EAAE,SAAA,EAAW,KAAO,EAAA,QAAA,EAAU,OAAQ,EAAA;AAAA;AAK/C,EAAA,IAAI,OAAS,EAAA;AACX,IAAA,IAAI,OAAO,MAAW,KAAA,WAAA;AACpB,MAAe,cAAA,CAAA,OAAA,CAAQ,UAAU,OAAO,CAAA;AAC1C,IAAA,OAAO,EAAE,SAAA,EAAW,KAAO,EAAA,QAAA,EAAU,OAAQ,EAAA;AAAA;AAI/C,EAAA,IAAI,OAAO,MAAW,KAAA,WAAA;AACpB,IAAe,cAAA,CAAA,OAAA,CAAQ,UAAU,WAAW,CAAA;AAC9C,EAAA,OAAO,EAAE,SAAA,EAAW,KAAO,EAAA,QAAA,EAAU,WAAY,EAAA;AACnD;;;;"}
package/dist/index.d.ts CHANGED
@@ -81,11 +81,68 @@ interface QuickstartDrawerContextType {
81
81
  */
82
82
  declare const useQuickstartDrawerContext: () => QuickstartDrawerContextType;
83
83
 
84
+ /**
85
+ * Translation reference for Quickstart plugin
86
+ * @public
87
+ */
88
+ declare const quickstartTranslationRef: _backstage_core_plugin_api_alpha.TranslationRef<"plugin.quickstart", {
89
+ readonly "button.quickstart": string;
90
+ readonly "button.openQuickstartGuide": string;
91
+ readonly "button.closeDrawer": string;
92
+ readonly "button.gotIt": string;
93
+ readonly "footer.progress": string;
94
+ readonly "footer.hide": string;
95
+ readonly "footer.notStarted": string;
96
+ readonly "header.title": string;
97
+ readonly "header.subtitle": string;
98
+ readonly "content.emptyState.title": string;
99
+ readonly "item.expandAriaLabel": string;
100
+ readonly "item.collapseAriaLabel": string;
101
+ readonly "item.expandButtonAriaLabel": string;
102
+ readonly "item.collapseButtonAriaLabel": string;
103
+ readonly "steps.setupAuthentication.title": string;
104
+ readonly "steps.setupAuthentication.description": string;
105
+ readonly "steps.setupAuthentication.ctaTitle": string;
106
+ readonly "steps.configureRbac.title": string;
107
+ readonly "steps.configureRbac.description": string;
108
+ readonly "steps.configureRbac.ctaTitle": string;
109
+ readonly "steps.configureGit.title": string;
110
+ readonly "steps.configureGit.description": string;
111
+ readonly "steps.configureGit.ctaTitle": string;
112
+ readonly "steps.managePlugins.title": string;
113
+ readonly "steps.managePlugins.description": string;
114
+ readonly "steps.managePlugins.ctaTitle": string;
115
+ readonly "steps.importApplication.title": string;
116
+ readonly "steps.importApplication.description": string;
117
+ readonly "steps.importApplication.ctaTitle": string;
118
+ readonly "steps.learnAboutCatalog.title": string;
119
+ readonly "steps.learnAboutCatalog.description": string;
120
+ readonly "steps.learnAboutCatalog.ctaTitle": string;
121
+ readonly "steps.exploreSelfServiceTemplates.title": string;
122
+ readonly "steps.exploreSelfServiceTemplates.description": string;
123
+ readonly "steps.exploreSelfServiceTemplates.ctaTitle": string;
124
+ readonly "steps.findAllLearningPaths.title": string;
125
+ readonly "steps.findAllLearningPaths.description": string;
126
+ readonly "steps.findAllLearningPaths.ctaTitle": string;
127
+ readonly "dev.pageTitle": string;
128
+ readonly "dev.pageDescription": string;
129
+ readonly "dev.drawerControls": string;
130
+ readonly "dev.currentState": string;
131
+ readonly "dev.stateOpen": string;
132
+ readonly "dev.stateClosed": string;
133
+ readonly "dev.instructions": string;
134
+ readonly "dev.step1": string;
135
+ readonly "dev.step2": string;
136
+ readonly "dev.step3": string;
137
+ readonly "dev.step4": string;
138
+ readonly "dev.step5": string;
139
+ }>;
140
+
84
141
  /**
85
142
  * Translation Resource for Quickstart
86
143
  * @public
87
144
  */
88
145
  declare const quickstartTranslations: _backstage_core_plugin_api_alpha.TranslationResource<"plugin.quickstart">;
89
146
 
90
- export { QuickstartButton, QuickstartDrawerProvider, quickstartPlugin, quickstartTranslations, useQuickstartDrawerContext };
147
+ export { QuickstartButton, QuickstartDrawerProvider, quickstartPlugin, quickstartTranslationRef, quickstartTranslations, useQuickstartDrawerContext };
91
148
  export type { QuickstartButtonProps, QuickstartDrawerContextType };
package/dist/index.esm.js CHANGED
@@ -2,6 +2,7 @@ import { unstable_ClassNameGenerator } from '@mui/material/className';
2
2
  export { QuickstartButton, QuickstartDrawerProvider, quickstartPlugin } from './plugin.esm.js';
3
3
  export { useQuickstartDrawerContext } from './hooks/useQuickstartDrawerContext.esm.js';
4
4
  export { quickstartTranslations } from './translations/index.esm.js';
5
+ export { quickstartTranslationRef } from './translations/ref.esm.js';
5
6
 
6
7
  unstable_ClassNameGenerator.configure((componentName) => {
7
8
  return componentName.startsWith("v5-") ? componentName : `v5-${componentName}`;
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../src/index.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 { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/material/className';\n\nClassNameGenerator.configure(componentName => {\n return componentName.startsWith('v5-')\n ? componentName\n : `v5-${componentName}`;\n});\n\nexport * from './plugin';\n\nexport { useQuickstartDrawerContext } from './hooks/useQuickstartDrawerContext';\nexport type { QuickstartDrawerContextType } from './components/QuickstartDrawerContext';\n\nexport { quickstartTranslations } from './translations';\n"],"names":["ClassNameGenerator"],"mappings":";;;;;AAkBAA,2BAAA,CAAmB,UAAU,CAAiB,aAAA,KAAA;AAC5C,EAAA,OAAO,cAAc,UAAW,CAAA,KAAK,CACjC,GAAA,aAAA,GACA,MAAM,aAAa,CAAA,CAAA;AACzB,CAAC,CAAA"}
1
+ {"version":3,"file":"index.esm.js","sources":["../src/index.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 { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/material/className';\n\nClassNameGenerator.configure(componentName => {\n return componentName.startsWith('v5-')\n ? componentName\n : `v5-${componentName}`;\n});\n\nexport * from './plugin';\n\nexport { useQuickstartDrawerContext } from './hooks/useQuickstartDrawerContext';\nexport type { QuickstartDrawerContextType } from './components/QuickstartDrawerContext';\n\nexport {\n quickstartTranslations,\n quickstartTranslationRef,\n} from './translations';\n"],"names":["ClassNameGenerator"],"mappings":";;;;;;AAkBAA,2BAAA,CAAmB,UAAU,CAAiB,aAAA,KAAA;AAC5C,EAAA,OAAO,cAAc,UAAW,CAAA,KAAK,CACjC,GAAA,aAAA,GACA,MAAM,aAAa,CAAA,CAAA;AACzB,CAAC,CAAA"}
@@ -6,9 +6,34 @@ const quickstartTranslationDe = createTranslationMessages({
6
6
  messages: {
7
7
  "header.title": "Erste Schritte mit dem Developer Hub",
8
8
  "header.subtitle": "Wir f\xFChren Sie durch einige schnelle Schritte",
9
+ "steps.setupAuthentication.title": "Authentifizierung einrichten",
10
+ "steps.setupAuthentication.description": "Richten Sie sichere Anmeldedaten ein, um Ihr Konto vor unbefugtem Zugriff zu sch\xFCtzen.",
11
+ "steps.setupAuthentication.ctaTitle": "Mehr erfahren",
12
+ "steps.configureRbac.title": "RBAC konfigurieren",
13
+ "steps.configureRbac.description": "Weisen Sie Rollen und Berechtigungen zu, um zu kontrollieren, wer Ressourcen anzeigen, erstellen oder bearbeiten kann.",
14
+ "steps.configureRbac.ctaTitle": "Zugriff verwalten",
15
+ "steps.configureGit.title": "Git konfigurieren",
16
+ "steps.configureGit.description": "Verbinden Sie Ihre Git-Anbieter wie GitHub, um Code zu verwalten, Workflows zu automatisieren und mit Plattformfunktionen zu integrieren.",
17
+ "steps.configureGit.ctaTitle": "Mehr erfahren",
18
+ "steps.managePlugins.title": "Plugins verwalten",
19
+ "steps.managePlugins.description": "Durchsuchen und installieren Sie Erweiterungen, um Funktionen hinzuzuf\xFCgen, externe Tools zu verbinden und Ihre Erfahrung anzupassen.",
20
+ "steps.managePlugins.ctaTitle": "Plugins erkunden",
21
+ "steps.importApplication.title": "Anwendung importieren",
22
+ "steps.importApplication.description": "Importieren Sie Ihren vorhandenen Code und Ihre Dienste in den Katalog, um sie \xFCber Ihr Entwicklerportal zu organisieren und darauf zuzugreifen.",
23
+ "steps.importApplication.ctaTitle": "Importieren",
24
+ "steps.learnAboutCatalog.title": "\xDCber den Katalog lernen",
25
+ "steps.learnAboutCatalog.description": "Entdecken Sie alle Softwarekomponenten, Dienste und APIs und sehen Sie deren Eigent\xFCmer und Dokumentation.",
26
+ "steps.learnAboutCatalog.ctaTitle": "Katalog anzeigen",
27
+ "steps.exploreSelfServiceTemplates.title": "Self-Service-Vorlagen erkunden",
28
+ "steps.exploreSelfServiceTemplates.description": "Verwenden Sie unsere Self-Service-Vorlagen, um schnell neue Projekte, Dienste oder Dokumentationen einzurichten.",
29
+ "steps.exploreSelfServiceTemplates.ctaTitle": "Vorlagen erkunden",
30
+ "steps.findAllLearningPaths.title": "Alle Lernpfade finden",
31
+ "steps.findAllLearningPaths.description": "Integrieren Sie ma\xDFgeschneidertes E-Learning in Ihre Workflows mit Lernpfaden, um das Onboarding zu beschleunigen, Qualifikationsl\xFCcken zu schlie\xDFen und bew\xE4hrte Praktiken zu f\xF6rdern.",
32
+ "steps.findAllLearningPaths.ctaTitle": "Lernpfade anzeigen",
9
33
  "button.quickstart": "Schnellstart",
10
34
  "button.openQuickstartGuide": "Schnellstart-Leitfaden \xF6ffnen",
11
35
  "button.closeDrawer": "Drawer schlie\xDFen",
36
+ "button.gotIt": "Verstanden!",
12
37
  "footer.progress": "{{progress}}% Fortschritt",
13
38
  "footer.notStarted": "Nicht begonnen",
14
39
  "footer.hide": "Ausblenden",
@@ -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 { quickstartTranslationRef } from './ref';\n\nconst quickstartTranslationDe = createTranslationMessages({\n ref: quickstartTranslationRef,\n messages: {\n 'header.title': 'Erste Schritte mit dem Developer Hub',\n 'header.subtitle': 'Wir führen Sie durch einige schnelle Schritte',\n 'button.quickstart': 'Schnellstart',\n 'button.openQuickstartGuide': 'Schnellstart-Leitfaden öffnen',\n 'button.closeDrawer': 'Drawer schließen',\n 'footer.progress': '{{progress}}% Fortschritt',\n 'footer.notStarted': 'Nicht begonnen',\n 'footer.hide': 'Ausblenden',\n 'content.emptyState.title':\n 'Schnellstart-Inhalte sind für Ihre Rolle nicht verfügbar.',\n 'item.expandAriaLabel': '{{title}} Details erweitern',\n 'item.collapseAriaLabel': '{{title}} Details einklappen',\n 'item.expandButtonAriaLabel': 'Element erweitern',\n 'item.collapseButtonAriaLabel': 'Element einklappen',\n 'dev.pageTitle': 'Quickstart Plugin Testseite',\n 'dev.pageDescription':\n 'Dies ist eine Testseite für das Quickstart-Plugin. Verwenden Sie die Schaltflächen unten, um mit dem Quickstart-Drawer zu interagieren.',\n 'dev.drawerControls': 'Drawer-Steuerungen',\n 'dev.currentState': 'Aktueller Drawer-Status: {{state}}',\n 'dev.stateOpen': 'Offen',\n 'dev.stateClosed': 'Geschlossen',\n 'dev.instructions': 'Anweisungen',\n 'dev.step1':\n '1. Klicken Sie auf \"Schnellstart-Leitfaden öffnen\", um den Drawer zu öffnen',\n 'dev.step2': '2. Navigieren Sie durch die Schnellstart-Schritte',\n 'dev.step3':\n '3. Testen Sie die Fortschrittsverfolgung durch Abschließen von Schritten',\n 'dev.step4':\n '4. Der Drawer kann mit der Schließen-Schaltfläche oder den eigenen Steuerelementen des Drawers geschlossen werden',\n 'dev.step5':\n '5. Der Fortschritt wird automatisch in localStorage gespeichert',\n },\n});\n\nexport default quickstartTranslationDe;\n"],"names":[],"mappings":";;;AAmBA,MAAM,0BAA0B,yBAA0B,CAAA;AAAA,EACxD,GAAK,EAAA,wBAAA;AAAA,EACL,QAAU,EAAA;AAAA,IACR,cAAgB,EAAA,sCAAA;AAAA,IAChB,iBAAmB,EAAA,kDAAA;AAAA,IACnB,mBAAqB,EAAA,cAAA;AAAA,IACrB,4BAA8B,EAAA,kCAAA;AAAA,IAC9B,oBAAsB,EAAA,qBAAA;AAAA,IACtB,iBAAmB,EAAA,2BAAA;AAAA,IACnB,mBAAqB,EAAA,gBAAA;AAAA,IACrB,aAAe,EAAA,YAAA;AAAA,IACf,0BACE,EAAA,iEAAA;AAAA,IACF,sBAAwB,EAAA,6BAAA;AAAA,IACxB,wBAA0B,EAAA,8BAAA;AAAA,IAC1B,4BAA8B,EAAA,mBAAA;AAAA,IAC9B,8BAAgC,EAAA,oBAAA;AAAA,IAChC,eAAiB,EAAA,6BAAA;AAAA,IACjB,qBACE,EAAA,+IAAA;AAAA,IACF,oBAAsB,EAAA,oBAAA;AAAA,IACtB,kBAAoB,EAAA,oCAAA;AAAA,IACpB,eAAiB,EAAA,OAAA;AAAA,IACjB,iBAAmB,EAAA,aAAA;AAAA,IACnB,kBAAoB,EAAA,aAAA;AAAA,IACpB,WACE,EAAA,mFAAA;AAAA,IACF,WAAa,EAAA,mDAAA;AAAA,IACb,WACE,EAAA,6EAAA;AAAA,IACF,WACE,EAAA,yHAAA;AAAA,IACF,WACE,EAAA;AAAA;AAEN,CAAC;;;;"}
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 { quickstartTranslationRef } from './ref';\n\nconst quickstartTranslationDe = createTranslationMessages({\n ref: quickstartTranslationRef,\n messages: {\n 'header.title': 'Erste Schritte mit dem Developer Hub',\n 'header.subtitle': 'Wir führen Sie durch einige schnelle Schritte',\n 'steps.setupAuthentication.title': 'Authentifizierung einrichten',\n 'steps.setupAuthentication.description':\n 'Richten Sie sichere Anmeldedaten ein, um Ihr Konto vor unbefugtem Zugriff zu schützen.',\n 'steps.setupAuthentication.ctaTitle': 'Mehr erfahren',\n 'steps.configureRbac.title': 'RBAC konfigurieren',\n 'steps.configureRbac.description':\n 'Weisen Sie Rollen und Berechtigungen zu, um zu kontrollieren, wer Ressourcen anzeigen, erstellen oder bearbeiten kann.',\n 'steps.configureRbac.ctaTitle': 'Zugriff verwalten',\n 'steps.configureGit.title': 'Git konfigurieren',\n 'steps.configureGit.description':\n 'Verbinden Sie Ihre Git-Anbieter wie GitHub, um Code zu verwalten, Workflows zu automatisieren und mit Plattformfunktionen zu integrieren.',\n 'steps.configureGit.ctaTitle': 'Mehr erfahren',\n 'steps.managePlugins.title': 'Plugins verwalten',\n 'steps.managePlugins.description':\n 'Durchsuchen und installieren Sie Erweiterungen, um Funktionen hinzuzufügen, externe Tools zu verbinden und Ihre Erfahrung anzupassen.',\n 'steps.managePlugins.ctaTitle': 'Plugins erkunden',\n 'steps.importApplication.title': 'Anwendung importieren',\n 'steps.importApplication.description':\n 'Importieren Sie Ihren vorhandenen Code und Ihre Dienste in den Katalog, um sie über Ihr Entwicklerportal zu organisieren und darauf zuzugreifen.',\n 'steps.importApplication.ctaTitle': 'Importieren',\n 'steps.learnAboutCatalog.title': 'Über den Katalog lernen',\n 'steps.learnAboutCatalog.description':\n 'Entdecken Sie alle Softwarekomponenten, Dienste und APIs und sehen Sie deren Eigentümer und Dokumentation.',\n 'steps.learnAboutCatalog.ctaTitle': 'Katalog anzeigen',\n 'steps.exploreSelfServiceTemplates.title': 'Self-Service-Vorlagen erkunden',\n 'steps.exploreSelfServiceTemplates.description':\n 'Verwenden Sie unsere Self-Service-Vorlagen, um schnell neue Projekte, Dienste oder Dokumentationen einzurichten.',\n 'steps.exploreSelfServiceTemplates.ctaTitle': 'Vorlagen erkunden',\n 'steps.findAllLearningPaths.title': 'Alle Lernpfade finden',\n 'steps.findAllLearningPaths.description':\n 'Integrieren Sie maßgeschneidertes E-Learning in Ihre Workflows mit Lernpfaden, um das Onboarding zu beschleunigen, Qualifikationslücken zu schließen und bewährte Praktiken zu fördern.',\n 'steps.findAllLearningPaths.ctaTitle': 'Lernpfade anzeigen',\n 'button.quickstart': 'Schnellstart',\n 'button.openQuickstartGuide': 'Schnellstart-Leitfaden öffnen',\n 'button.closeDrawer': 'Drawer schließen',\n 'button.gotIt': 'Verstanden!',\n 'footer.progress': '{{progress}}% Fortschritt',\n 'footer.notStarted': 'Nicht begonnen',\n 'footer.hide': 'Ausblenden',\n 'content.emptyState.title':\n 'Schnellstart-Inhalte sind für Ihre Rolle nicht verfügbar.',\n 'item.expandAriaLabel': '{{title}} Details erweitern',\n 'item.collapseAriaLabel': '{{title}} Details einklappen',\n 'item.expandButtonAriaLabel': 'Element erweitern',\n 'item.collapseButtonAriaLabel': 'Element einklappen',\n 'dev.pageTitle': 'Quickstart Plugin Testseite',\n 'dev.pageDescription':\n 'Dies ist eine Testseite für das Quickstart-Plugin. Verwenden Sie die Schaltflächen unten, um mit dem Quickstart-Drawer zu interagieren.',\n 'dev.drawerControls': 'Drawer-Steuerungen',\n 'dev.currentState': 'Aktueller Drawer-Status: {{state}}',\n 'dev.stateOpen': 'Offen',\n 'dev.stateClosed': 'Geschlossen',\n 'dev.instructions': 'Anweisungen',\n 'dev.step1':\n '1. Klicken Sie auf \"Schnellstart-Leitfaden öffnen\", um den Drawer zu öffnen',\n 'dev.step2': '2. Navigieren Sie durch die Schnellstart-Schritte',\n 'dev.step3':\n '3. Testen Sie die Fortschrittsverfolgung durch Abschließen von Schritten',\n 'dev.step4':\n '4. Der Drawer kann mit der Schließen-Schaltfläche oder den eigenen Steuerelementen des Drawers geschlossen werden',\n 'dev.step5':\n '5. Der Fortschritt wird automatisch in localStorage gespeichert',\n },\n});\n\nexport default quickstartTranslationDe;\n"],"names":[],"mappings":";;;AAmBA,MAAM,0BAA0B,yBAA0B,CAAA;AAAA,EACxD,GAAK,EAAA,wBAAA;AAAA,EACL,QAAU,EAAA;AAAA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oBAAA;AAAA,IAChC,eAAiB,EAAA,6BAAA;AAAA,IACjB,qBACE,EAAA,+IAAA;AAAA,IACF,oBAAsB,EAAA,oBAAA;AAAA,IACtB,kBAAoB,EAAA,oCAAA;AAAA,IACpB,eAAiB,EAAA,OAAA;AAAA,IACjB,iBAAmB,EAAA,aAAA;AAAA,IACnB,kBAAoB,EAAA,aAAA;AAAA,IACpB,WACE,EAAA,mFAAA;AAAA,IACF,WAAa,EAAA,mDAAA;AAAA,IACb,WACE,EAAA,6EAAA;AAAA,IACF,WACE,EAAA,yHAAA;AAAA,IACF,WACE,EAAA;AAAA;AAEN,CAAC;;;;"}
@@ -6,7 +6,32 @@ const quickstartTranslationEs = createTranslationMessages({
6
6
  messages: {
7
7
  "header.title": "Comencemos con el Hub del Desarrollador",
8
8
  "header.subtitle": "Te guiaremos a trav\xE9s de algunos pasos r\xE1pidos",
9
+ "steps.setupAuthentication.title": "Configurar autenticaci\xF3n",
10
+ "steps.setupAuthentication.description": "Configure credenciales de inicio de sesi\xF3n seguras para proteger su cuenta del acceso no autorizado.",
11
+ "steps.setupAuthentication.ctaTitle": "Aprender m\xE1s",
12
+ "steps.configureRbac.title": "Configurar RBAC",
13
+ "steps.configureRbac.description": "Asigne roles y permisos para controlar qui\xE9n puede ver, crear o editar recursos, asegurando una colaboraci\xF3n segura y eficiente.",
14
+ "steps.configureRbac.ctaTitle": "Gestionar acceso",
15
+ "steps.configureGit.title": "Configurar Git",
16
+ "steps.configureGit.description": "Conecte sus proveedores de Git, como GitHub, para gestionar c\xF3digo, automatizar flujos de trabajo e integrar con caracter\xEDsticas de la plataforma.",
17
+ "steps.configureGit.ctaTitle": "Aprender m\xE1s",
18
+ "steps.managePlugins.title": "Gestionar plugins",
19
+ "steps.managePlugins.description": "Explore e instale extensiones para agregar caracter\xEDsticas, conectar con herramientas externas y personalizar su experiencia.",
20
+ "steps.managePlugins.ctaTitle": "Explorar plugins",
21
+ "steps.importApplication.title": "Importar aplicaci\xF3n",
22
+ "steps.importApplication.description": "Importe su c\xF3digo y servicios existentes al cat\xE1logo para organizarlos y acceder a ellos a trav\xE9s de su portal de desarrollador.",
23
+ "steps.importApplication.ctaTitle": "Importar",
24
+ "steps.learnAboutCatalog.title": "Aprender sobre el Cat\xE1logo",
25
+ "steps.learnAboutCatalog.description": "Descubra todos los componentes de software, servicios y APIs, y vea sus propietarios y documentaci\xF3n.",
26
+ "steps.learnAboutCatalog.ctaTitle": "Ver cat\xE1logo",
27
+ "steps.exploreSelfServiceTemplates.title": "Explorar plantillas de autoservicio",
28
+ "steps.exploreSelfServiceTemplates.description": "Use nuestras plantillas de autoservicio para configurar r\xE1pidamente nuevos proyectos, servicios o documentaci\xF3n.",
29
+ "steps.exploreSelfServiceTemplates.ctaTitle": "Explorar plantillas",
30
+ "steps.findAllLearningPaths.title": "Encontrar todas las rutas de aprendizaje",
31
+ "steps.findAllLearningPaths.description": "Integre e-learning personalizado en sus flujos de trabajo con rutas de aprendizaje para acelerar la incorporaci\xF3n, cerrar brechas de habilidades y promover mejores pr\xE1cticas.",
32
+ "steps.findAllLearningPaths.ctaTitle": "Ver rutas de aprendizaje",
9
33
  "button.quickstart": "Inicio r\xE1pido",
34
+ "button.gotIt": "\xA1Entendido!",
10
35
  "footer.progress": "{{progress}}% de progreso",
11
36
  "footer.notStarted": "No iniciado",
12
37
  "footer.hide": "Ocultar",
@@ -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 { quickstartTranslationRef } from './ref';\n\nconst quickstartTranslationEs = createTranslationMessages({\n ref: quickstartTranslationRef,\n messages: {\n 'header.title': 'Comencemos con el Hub del Desarrollador',\n 'header.subtitle': 'Te guiaremos a través de algunos pasos rápidos',\n 'button.quickstart': 'Inicio rápido',\n 'footer.progress': '{{progress}}% de progreso',\n 'footer.notStarted': 'No iniciado',\n 'footer.hide': 'Ocultar',\n 'content.emptyState.title':\n 'El contenido de inicio rápido no está disponible para tu rol.',\n 'item.expandAriaLabel': 'Expandir detalles de {{title}}',\n 'item.collapseAriaLabel': 'Contraer detalles de {{title}}',\n 'item.expandButtonAriaLabel': 'Expandir elemento',\n 'item.collapseButtonAriaLabel': 'Contraer elemento',\n 'button.openQuickstartGuide': 'Abrir guía de inicio rápido',\n 'button.closeDrawer': 'Cerrar cajón',\n 'dev.pageTitle': 'Página de prueba del plugin Quickstart',\n 'dev.pageDescription':\n 'Esta es una página de prueba para el plugin Quickstart. Use los botones de abajo para interactuar con el cajón de inicio rápido.',\n 'dev.drawerControls': 'Controles del cajón',\n 'dev.currentState': 'Estado actual del cajón: {{state}}',\n 'dev.stateOpen': 'Abierto',\n 'dev.stateClosed': 'Cerrado',\n 'dev.instructions': 'Instrucciones',\n 'dev.step1':\n '1. Haga clic en \"Abrir guía de inicio rápido\" para abrir el cajón',\n 'dev.step2': '2. Navegue a través de los pasos de inicio rápido',\n 'dev.step3': '3. Pruebe el seguimiento del progreso completando pasos',\n 'dev.step4':\n '4. El cajón puede cerrarse usando el botón de cerrar o los controles propios del cajón',\n 'dev.step5': '5. El progreso se guarda automáticamente en localStorage',\n },\n});\n\nexport default quickstartTranslationEs;\n"],"names":[],"mappings":";;;AAmBA,MAAM,0BAA0B,yBAA0B,CAAA;AAAA,EACxD,GAAK,EAAA,wBAAA;AAAA,EACL,QAAU,EAAA;AAAA,IACR,cAAgB,EAAA,yCAAA;AAAA,IAChB,iBAAmB,EAAA,sDAAA;AAAA,IACnB,mBAAqB,EAAA,kBAAA;AAAA,IACrB,iBAAmB,EAAA,2BAAA;AAAA,IACnB,mBAAqB,EAAA,aAAA;AAAA,IACrB,aAAe,EAAA,SAAA;AAAA,IACf,0BACE,EAAA,qEAAA;AAAA,IACF,sBAAwB,EAAA,gCAAA;AAAA,IACxB,wBAA0B,EAAA,gCAAA;AAAA,IAC1B,4BAA8B,EAAA,mBAAA;AAAA,IAC9B,8BAAgC,EAAA,mBAAA;AAAA,IAChC,4BAA8B,EAAA,mCAAA;AAAA,IAC9B,oBAAsB,EAAA,iBAAA;AAAA,IACtB,eAAiB,EAAA,2CAAA;AAAA,IACjB,qBACE,EAAA,2IAAA;AAAA,IACF,oBAAsB,EAAA,wBAAA;AAAA,IACtB,kBAAoB,EAAA,uCAAA;AAAA,IACpB,eAAiB,EAAA,SAAA;AAAA,IACjB,iBAAmB,EAAA,SAAA;AAAA,IACnB,kBAAoB,EAAA,eAAA;AAAA,IACpB,WACE,EAAA,4EAAA;AAAA,IACF,WAAa,EAAA,yDAAA;AAAA,IACb,WAAa,EAAA,yDAAA;AAAA,IACb,WACE,EAAA,iGAAA;AAAA,IACF,WAAa,EAAA;AAAA;AAEjB,CAAC;;;;"}
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 { quickstartTranslationRef } from './ref';\n\nconst quickstartTranslationEs = createTranslationMessages({\n ref: quickstartTranslationRef,\n messages: {\n 'header.title': 'Comencemos con el Hub del Desarrollador',\n 'header.subtitle': 'Te guiaremos a través de algunos pasos rápidos',\n 'steps.setupAuthentication.title': 'Configurar autenticación',\n 'steps.setupAuthentication.description':\n 'Configure credenciales de inicio de sesión seguras para proteger su cuenta del acceso no autorizado.',\n 'steps.setupAuthentication.ctaTitle': 'Aprender más',\n 'steps.configureRbac.title': 'Configurar RBAC',\n 'steps.configureRbac.description':\n 'Asigne roles y permisos para controlar quién puede ver, crear o editar recursos, asegurando una colaboración segura y eficiente.',\n 'steps.configureRbac.ctaTitle': 'Gestionar acceso',\n 'steps.configureGit.title': 'Configurar Git',\n 'steps.configureGit.description':\n 'Conecte sus proveedores de Git, como GitHub, para gestionar código, automatizar flujos de trabajo e integrar con características de la plataforma.',\n 'steps.configureGit.ctaTitle': 'Aprender más',\n 'steps.managePlugins.title': 'Gestionar plugins',\n 'steps.managePlugins.description':\n 'Explore e instale extensiones para agregar características, conectar con herramientas externas y personalizar su experiencia.',\n 'steps.managePlugins.ctaTitle': 'Explorar plugins',\n 'steps.importApplication.title': 'Importar aplicación',\n 'steps.importApplication.description':\n 'Importe su código y servicios existentes al catálogo para organizarlos y acceder a ellos a través de su portal de desarrollador.',\n 'steps.importApplication.ctaTitle': 'Importar',\n 'steps.learnAboutCatalog.title': 'Aprender sobre el Catálogo',\n 'steps.learnAboutCatalog.description':\n 'Descubra todos los componentes de software, servicios y APIs, y vea sus propietarios y documentación.',\n 'steps.learnAboutCatalog.ctaTitle': 'Ver catálogo',\n 'steps.exploreSelfServiceTemplates.title':\n 'Explorar plantillas de autoservicio',\n 'steps.exploreSelfServiceTemplates.description':\n 'Use nuestras plantillas de autoservicio para configurar rápidamente nuevos proyectos, servicios o documentación.',\n 'steps.exploreSelfServiceTemplates.ctaTitle': 'Explorar plantillas',\n 'steps.findAllLearningPaths.title':\n 'Encontrar todas las rutas de aprendizaje',\n 'steps.findAllLearningPaths.description':\n 'Integre e-learning personalizado en sus flujos de trabajo con rutas de aprendizaje para acelerar la incorporación, cerrar brechas de habilidades y promover mejores prácticas.',\n 'steps.findAllLearningPaths.ctaTitle': 'Ver rutas de aprendizaje',\n 'button.quickstart': 'Inicio rápido',\n 'button.gotIt': '¡Entendido!',\n 'footer.progress': '{{progress}}% de progreso',\n 'footer.notStarted': 'No iniciado',\n 'footer.hide': 'Ocultar',\n 'content.emptyState.title':\n 'El contenido de inicio rápido no está disponible para tu rol.',\n 'item.expandAriaLabel': 'Expandir detalles de {{title}}',\n 'item.collapseAriaLabel': 'Contraer detalles de {{title}}',\n 'item.expandButtonAriaLabel': 'Expandir elemento',\n 'item.collapseButtonAriaLabel': 'Contraer elemento',\n 'button.openQuickstartGuide': 'Abrir guía de inicio rápido',\n 'button.closeDrawer': 'Cerrar cajón',\n 'dev.pageTitle': 'Página de prueba del plugin Quickstart',\n 'dev.pageDescription':\n 'Esta es una página de prueba para el plugin Quickstart. Use los botones de abajo para interactuar con el cajón de inicio rápido.',\n 'dev.drawerControls': 'Controles del cajón',\n 'dev.currentState': 'Estado actual del cajón: {{state}}',\n 'dev.stateOpen': 'Abierto',\n 'dev.stateClosed': 'Cerrado',\n 'dev.instructions': 'Instrucciones',\n 'dev.step1':\n '1. Haga clic en \"Abrir guía de inicio rápido\" para abrir el cajón',\n 'dev.step2': '2. Navegue a través de los pasos de inicio rápido',\n 'dev.step3': '3. Pruebe el seguimiento del progreso completando pasos',\n 'dev.step4':\n '4. El cajón puede cerrarse usando el botón de cerrar o los controles propios del cajón',\n 'dev.step5': '5. El progreso se guarda automáticamente en localStorage',\n },\n});\n\nexport default quickstartTranslationEs;\n"],"names":[],"mappings":";;;AAmBA,MAAM,0BAA0B,yBAA0B,CAAA;AAAA,EACxD,GAAK,EAAA,wBAAA;AAAA,EACL,QAAU,EAAA;AAAA,IACR,cAAgB,EAAA,yCAAA;AAAA,IAChB,iBAAmB,EAAA,sDAAA;AAAA,IACnB,iCAAmC,EAAA,6BAAA;AAAA,IACnC,uCACE,EAAA,yGAAA;AAAA,IACF,oCAAsC,EAAA,iBAA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A,SAAA;AAAA,IACjB,iBAAmB,EAAA,SAAA;AAAA,IACnB,kBAAoB,EAAA,eAAA;AAAA,IACpB,WACE,EAAA,4EAAA;AAAA,IACF,WAAa,EAAA,yDAAA;AAAA,IACb,WAAa,EAAA,yDAAA;AAAA,IACb,WACE,EAAA,iGAAA;AAAA,IACF,WAAa,EAAA;AAAA;AAEjB,CAAC;;;;"}
@@ -4,31 +4,57 @@ import { quickstartTranslationRef } from './ref.esm.js';
4
4
  const quickstartTranslationFr = createTranslationMessages({
5
5
  ref: quickstartTranslationRef,
6
6
  messages: {
7
- "header.title": "Commen\xE7ons avec le Hub D\xE9veloppeur",
8
- "header.subtitle": "Nous vous guiderons \xE0 travers quelques \xE9tapes rapides",
7
+ "button.closeDrawer": "Fermer le tiroir",
8
+ "button.openQuickstartGuide": "Ouvrir le guide de d\xE9marrage rapide",
9
9
  "button.quickstart": "D\xE9marrage rapide",
10
- "footer.progress": "{{progress}}% de progression",
11
- "footer.notStarted": "Pas encore commenc\xE9",
12
- "footer.hide": "Masquer",
13
10
  "content.emptyState.title": "Le contenu de d\xE9marrage rapide n'est pas disponible pour votre r\xF4le.",
14
- "item.expandAriaLabel": "D\xE9velopper les d\xE9tails de {{title}}",
15
- "item.collapseAriaLabel": "R\xE9duire les d\xE9tails de {{title}}",
16
- "item.expandButtonAriaLabel": "D\xE9velopper l'\xE9l\xE9ment",
17
- "item.collapseButtonAriaLabel": "R\xE9duire l'\xE9l\xE9ment",
18
- "button.openQuickstartGuide": "Ouvrir le guide de d\xE9marrage rapide",
19
- "button.closeDrawer": "Fermer le tiroir",
20
- "dev.pageTitle": "Page de test du plugin Quickstart",
11
+ "dev.currentState": "\xC9tat actuel du tiroir\xA0: {{state}}",
12
+ "dev.drawerControls": "Commandes des tiroirs",
13
+ "dev.instructions": "Instructions",
21
14
  "dev.pageDescription": "Ceci est une page de test pour le plugin Quickstart. Utilisez les boutons ci-dessous pour interagir avec le tiroir de d\xE9marrage rapide.",
22
- "dev.drawerControls": "Contr\xF4les du tiroir",
23
- "dev.currentState": "\xC9tat actuel du tiroir : {{state}}",
24
- "dev.stateOpen": "Ouvert",
15
+ "dev.pageTitle": "Page de test du plugin de d\xE9marrage rapide",
25
16
  "dev.stateClosed": "Ferm\xE9",
26
- "dev.instructions": "Instructions",
27
- "dev.step1": '1. Cliquez sur "Ouvrir le guide de d\xE9marrage rapide" pour ouvrir le tiroir',
28
- "dev.step2": "2. Naviguez \xE0 travers les \xE9tapes de d\xE9marrage rapide",
29
- "dev.step3": "3. Testez le suivi de progression en compl\xE9tant les \xE9tapes",
30
- "dev.step4": "4. Le tiroir peut \xEAtre ferm\xE9 en utilisant le bouton de fermeture ou les contr\xF4les propres du tiroir",
31
- "dev.step5": "5. La progression est automatiquement sauvegard\xE9e dans localStorage"
17
+ "dev.stateOpen": "Ouvrir",
18
+ "dev.step1": "1. Cliquez sur \xAB\xA0Ouvrir le guide de d\xE9marrage rapide\xA0\xBB pour ouvrir le tiroir",
19
+ "dev.step2": "2. Parcourez les \xE9tapes de d\xE9marrage rapide",
20
+ "dev.step3": "3. Testez le suivi de la progression en compl\xE9tant les \xE9tapes",
21
+ "dev.step4": "4. Le tiroir peut \xEAtre ferm\xE9 \xE0 l'aide du bouton de fermeture ou des commandes du tiroir",
22
+ "dev.step5": "5. La progression est automatiquement enregistr\xE9e dans le stockage local",
23
+ "footer.hide": "Cacher",
24
+ "footer.notStarted": "Non d\xE9marr\xE9",
25
+ "footer.progress": "{{progress}}% de progr\xE8s",
26
+ "header.subtitle": "Nous vous guiderons \xE0 travers quelques \xE9tapes rapides",
27
+ "header.title": "Commen\xE7ons par vous familiariser avec Developer Hub",
28
+ "item.collapseAriaLabel": "R\xE9duire les d\xE9tails de {{title}}",
29
+ "item.collapseButtonAriaLabel": "R\xE9duire l'\xE9l\xE9ment",
30
+ "item.expandAriaLabel": "D\xE9velopper les d\xE9tails de {{title}}",
31
+ "item.expandButtonAriaLabel": "D\xE9velopper l'\xE9l\xE9ment",
32
+ // New keys https://github.com/redhat-developer/rhdh-plugins/pull/1514
33
+ "button.gotIt": "Compris !",
34
+ "steps.setupAuthentication.title": "Configurer l'authentification",
35
+ "steps.setupAuthentication.description": "Configurez des identifiants de connexion s\xE9curis\xE9s pour prot\xE9ger votre compte contre l'acc\xE8s non autoris\xE9.",
36
+ "steps.setupAuthentication.ctaTitle": "En savoir plus",
37
+ "steps.configureRbac.title": "Configurer RBAC",
38
+ "steps.configureRbac.description": "Attribuez des r\xF4les et des permissions pour contr\xF4ler qui peut voir, cr\xE9er ou modifier des ressources, assurant une collaboration s\xE9curis\xE9e et efficace.",
39
+ "steps.configureRbac.ctaTitle": "G\xE9rer l'acc\xE8s",
40
+ "steps.configureGit.title": "Configurer Git",
41
+ "steps.configureGit.description": "Connectez vos fournisseurs Git, comme GitHub, pour g\xE9rer le code, automatiser les flux de travail et int\xE9grer avec les fonctionnalit\xE9s de la plateforme.",
42
+ "steps.configureGit.ctaTitle": "En savoir plus",
43
+ "steps.managePlugins.title": "G\xE9rer les plugins",
44
+ "steps.managePlugins.description": "Parcourez et installez des extensions pour ajouter des fonctionnalit\xE9s, connecter avec des outils externes et personnaliser votre exp\xE9rience.",
45
+ "steps.managePlugins.ctaTitle": "Explorer les plugins",
46
+ "steps.importApplication.title": "Importer une application",
47
+ "steps.importApplication.description": "Importez votre code et vos services existants dans le catalogue pour les organiser et y acc\xE9der via votre portail d\xE9veloppeur.",
48
+ "steps.importApplication.ctaTitle": "Importer",
49
+ "steps.learnAboutCatalog.title": "Apprendre le Catalogue",
50
+ "steps.learnAboutCatalog.description": "D\xE9couvrez tous les composants logiciels, services et API, et consultez leurs propri\xE9taires et leur documentation.",
51
+ "steps.learnAboutCatalog.ctaTitle": "Voir le catalogue",
52
+ "steps.exploreSelfServiceTemplates.title": "Explorer les mod\xE8les en libre-service",
53
+ "steps.exploreSelfServiceTemplates.description": "Utilisez nos mod\xE8les en libre-service pour configurer rapidement de nouveaux projets, services ou documentation.",
54
+ "steps.exploreSelfServiceTemplates.ctaTitle": "Explorer les mod\xE8les",
55
+ "steps.findAllLearningPaths.title": "Trouver tous les parcours d'apprentissage",
56
+ "steps.findAllLearningPaths.description": "Int\xE9grez l'e-learning sur mesure dans vos flux de travail avec des parcours d'apprentissage pour acc\xE9l\xE9rer l'int\xE9gration, combler les lacunes de comp\xE9tences et promouvoir les meilleures pratiques.",
57
+ "steps.findAllLearningPaths.ctaTitle": "Voir les parcours d'apprentissage"
32
58
  }
33
59
  });
34
60
 
@@ -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 { quickstartTranslationRef } from './ref';\n\nconst quickstartTranslationFr = createTranslationMessages({\n ref: quickstartTranslationRef,\n messages: {\n 'header.title': 'Commençons avec le Hub Développeur',\n 'header.subtitle': 'Nous vous guiderons à travers quelques étapes rapides',\n 'button.quickstart': 'Démarrage rapide',\n 'footer.progress': '{{progress}}% de progression',\n 'footer.notStarted': 'Pas encore commencé',\n 'footer.hide': 'Masquer',\n 'content.emptyState.title':\n \"Le contenu de démarrage rapide n'est pas disponible pour votre rôle.\",\n 'item.expandAriaLabel': 'Développer les détails de {{title}}',\n 'item.collapseAriaLabel': 'Réduire les détails de {{title}}',\n 'item.expandButtonAriaLabel': \"Développer l'élément\",\n 'item.collapseButtonAriaLabel': \"Réduire l'élément\",\n 'button.openQuickstartGuide': 'Ouvrir le guide de démarrage rapide',\n 'button.closeDrawer': 'Fermer le tiroir',\n 'dev.pageTitle': 'Page de test du plugin Quickstart',\n 'dev.pageDescription':\n 'Ceci est une page de test pour le plugin Quickstart. Utilisez les boutons ci-dessous pour interagir avec le tiroir de démarrage rapide.',\n 'dev.drawerControls': 'Contrôles du tiroir',\n 'dev.currentState': 'État actuel du tiroir : {{state}}',\n 'dev.stateOpen': 'Ouvert',\n 'dev.stateClosed': 'Fermé',\n 'dev.instructions': 'Instructions',\n 'dev.step1':\n '1. Cliquez sur \"Ouvrir le guide de démarrage rapide\" pour ouvrir le tiroir',\n 'dev.step2': '2. Naviguez à travers les étapes de démarrage rapide',\n 'dev.step3': '3. Testez le suivi de progression en complétant les étapes',\n 'dev.step4':\n '4. Le tiroir peut être fermé en utilisant le bouton de fermeture ou les contrôles propres du tiroir',\n 'dev.step5':\n '5. La progression est automatiquement sauvegardée dans localStorage',\n },\n});\n\nexport default quickstartTranslationFr;\n"],"names":[],"mappings":";;;AAmBA,MAAM,0BAA0B,yBAA0B,CAAA;AAAA,EACxD,GAAK,EAAA,wBAAA;AAAA,EACL,QAAU,EAAA;AAAA,IACR,cAAgB,EAAA,0CAAA;AAAA,IAChB,iBAAmB,EAAA,6DAAA;AAAA,IACnB,mBAAqB,EAAA,qBAAA;AAAA,IACrB,iBAAmB,EAAA,8BAAA;AAAA,IACnB,mBAAqB,EAAA,wBAAA;AAAA,IACrB,aAAe,EAAA,SAAA;AAAA,IACf,0BACE,EAAA,4EAAA;AAAA,IACF,sBAAwB,EAAA,2CAAA;AAAA,IACxB,wBAA0B,EAAA,wCAAA;AAAA,IAC1B,4BAA8B,EAAA,+BAAA;AAAA,IAC9B,8BAAgC,EAAA,4BAAA;AAAA,IAChC,4BAA8B,EAAA,wCAAA;AAAA,IAC9B,oBAAsB,EAAA,kBAAA;AAAA,IACtB,eAAiB,EAAA,mCAAA;AAAA,IACjB,qBACE,EAAA,4IAAA;AAAA,IACF,oBAAsB,EAAA,wBAAA;AAAA,IACtB,kBAAoB,EAAA,sCAAA;AAAA,IACpB,eAAiB,EAAA,QAAA;AAAA,IACjB,iBAAmB,EAAA,UAAA;AAAA,IACnB,kBAAoB,EAAA,cAAA;AAAA,IACpB,WACE,EAAA,+EAAA;AAAA,IACF,WAAa,EAAA,+DAAA;AAAA,IACb,WAAa,EAAA,kEAAA;AAAA,IACb,WACE,EAAA,8GAAA;AAAA,IACF,WACE,EAAA;AAAA;AAEN,CAAC;;;;"}
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 { quickstartTranslationRef } from './ref';\n\nconst quickstartTranslationFr = createTranslationMessages({\n ref: quickstartTranslationRef,\n messages: {\n 'button.closeDrawer': 'Fermer le tiroir',\n 'button.openQuickstartGuide': 'Ouvrir le guide de démarrage rapide',\n 'button.quickstart': 'Démarrage rapide',\n 'content.emptyState.title':\n \"Le contenu de démarrage rapide n'est pas disponible pour votre rôle.\",\n 'dev.currentState': 'État actuel du tiroir : {{state}}',\n 'dev.drawerControls': 'Commandes des tiroirs',\n 'dev.instructions': 'Instructions',\n 'dev.pageDescription':\n 'Ceci est une page de test pour le plugin Quickstart. Utilisez les boutons ci-dessous pour interagir avec le tiroir de démarrage rapide.',\n 'dev.pageTitle': 'Page de test du plugin de démarrage rapide',\n 'dev.stateClosed': 'Fermé',\n 'dev.stateOpen': 'Ouvrir',\n 'dev.step1':\n '1. Cliquez sur « Ouvrir le guide de démarrage rapide » pour ouvrir le tiroir',\n 'dev.step2': '2. Parcourez les étapes de démarrage rapide',\n 'dev.step3':\n '3. Testez le suivi de la progression en complétant les étapes',\n 'dev.step4':\n \"4. Le tiroir peut être fermé à l'aide du bouton de fermeture ou des commandes du tiroir\",\n 'dev.step5':\n '5. La progression est automatiquement enregistrée dans le stockage local',\n 'footer.hide': 'Cacher',\n 'footer.notStarted': 'Non démarré',\n 'footer.progress': '{{progress}}% de progrès',\n 'header.subtitle': 'Nous vous guiderons à travers quelques étapes rapides',\n 'header.title': 'Commençons par vous familiariser avec Developer Hub',\n 'item.collapseAriaLabel': 'Réduire les détails de {{title}}',\n 'item.collapseButtonAriaLabel': \"Réduire l'élément\",\n 'item.expandAriaLabel': 'Développer les détails de {{title}}',\n 'item.expandButtonAriaLabel': \"Développer l'élément\",\n\n // New keys https://github.com/redhat-developer/rhdh-plugins/pull/1514\n 'button.gotIt': 'Compris !',\n 'steps.setupAuthentication.title': \"Configurer l'authentification\",\n 'steps.setupAuthentication.description':\n \"Configurez des identifiants de connexion sécurisés pour protéger votre compte contre l'accès non autorisé.\",\n 'steps.setupAuthentication.ctaTitle': 'En savoir plus',\n 'steps.configureRbac.title': 'Configurer RBAC',\n 'steps.configureRbac.description':\n 'Attribuez des rôles et des permissions pour contrôler qui peut voir, créer ou modifier des ressources, assurant une collaboration sécurisée et efficace.',\n 'steps.configureRbac.ctaTitle': \"Gérer l'accès\",\n 'steps.configureGit.title': 'Configurer Git',\n 'steps.configureGit.description':\n 'Connectez vos fournisseurs Git, comme GitHub, pour gérer le code, automatiser les flux de travail et intégrer avec les fonctionnalités de la plateforme.',\n 'steps.configureGit.ctaTitle': 'En savoir plus',\n 'steps.managePlugins.title': 'Gérer les plugins',\n 'steps.managePlugins.description':\n 'Parcourez et installez des extensions pour ajouter des fonctionnalités, connecter avec des outils externes et personnaliser votre expérience.',\n 'steps.managePlugins.ctaTitle': 'Explorer les plugins',\n 'steps.importApplication.title': 'Importer une application',\n 'steps.importApplication.description':\n 'Importez votre code et vos services existants dans le catalogue pour les organiser et y accéder via votre portail développeur.',\n 'steps.importApplication.ctaTitle': 'Importer',\n 'steps.learnAboutCatalog.title': 'Apprendre le Catalogue',\n 'steps.learnAboutCatalog.description':\n 'Découvrez tous les composants logiciels, services et API, et consultez leurs propriétaires et leur documentation.',\n 'steps.learnAboutCatalog.ctaTitle': 'Voir le catalogue',\n 'steps.exploreSelfServiceTemplates.title':\n 'Explorer les modèles en libre-service',\n 'steps.exploreSelfServiceTemplates.description':\n 'Utilisez nos modèles en libre-service pour configurer rapidement de nouveaux projets, services ou documentation.',\n 'steps.exploreSelfServiceTemplates.ctaTitle': 'Explorer les modèles',\n 'steps.findAllLearningPaths.title':\n \"Trouver tous les parcours d'apprentissage\",\n 'steps.findAllLearningPaths.description':\n \"Intégrez l'e-learning sur mesure dans vos flux de travail avec des parcours d'apprentissage pour accélérer l'intégration, combler les lacunes de compétences et promouvoir les meilleures pratiques.\",\n 'steps.findAllLearningPaths.ctaTitle': \"Voir les parcours d'apprentissage\",\n },\n});\n\nexport default quickstartTranslationFr;\n"],"names":[],"mappings":";;;AAmBA,MAAM,0BAA0B,yBAA0B,CAAA;AAAA,EACxD,GAAK,EAAA,wBAAA;AAAA,EACL,QAAU,EAAA;AAAA,IACR,oBAAsB,EAAA,kBAAA;AAAA,IACtB,4BAA8B,EAAA,wCAAA;AAAA,IAC9B,mBAAqB,EAAA,qBAAA;AAAA,IACrB,0BACE,EAAA,4EAAA;AAAA,IACF,kBAAoB,EAAA,yCAAA;AAAA,IACpB,oBAAsB,EAAA,uBAAA;AAAA,IACtB,kBAAoB,EAAA,cAAA;AAAA,IACpB,qBACE,EAAA,4IAAA;AAAA,IACF,eAAiB,EAAA,+CAAA;AAAA,IACjB,iBAAmB,EAAA,UAAA;AAAA,IACnB,eAAiB,EAAA,QAAA;AAAA,IACjB,WACE,EAAA,6FAAA;AAAA,IACF,WAAa,EAAA,mDAAA;AAAA,IACb,WACE,EAAA,qEAAA;AAAA,IACF,WACE,EAAA,kGAAA;AAAA,IACF,WACE,EAAA,6EAAA;AAAA,IACF,aAAe,EAAA,QAAA;AAAA,IACf,mBAAqB,EAAA,mBAAA;AAAA,IACrB,iBAAmB,EAAA,6BAAA;AAAA,IACnB,iBAAmB,EAAA,6DAAA;AAAA,IACnB,cAAgB,EAAA,wDAAA;AAAA,IAChB,wBAA0B,EAAA,wCAAA;AAAA,IAC1B,8BAAgC,EAAA,4BAAA;AAAA,IAChC,sBAAwB,EAAA,2CAAA;AAAA,IACxB,4BAA8B,EAAA,+BAAA;AAAA;AAAA,IAG9B,cAAgB,EAAA,WAAA;AAAA,IAChB,iCAAmC,EAAA,+BAAA;AAAA,IACnC,uCACE,EAAA,2HAAA;AAAA,IACF,oCAAsC,EAAA,gBAAA;AAAA,IACtC,2BAA6B,EAAA,iBAAA;AAAA,IAC7B,iCACE,EAAA,yKAAA;AAAA,IACF,8BAAgC,EAAA,qBAAA;AAAA,IAChC,0BAA4B,EAAA,gBAAA;AAAA,IAC5B,gCACE,EAAA,mKAAA;AAAA,IACF,6BAA+B,EAAA,gBAAA;AAAA,IAC/B,2BAA6B,EAAA,sBAAA;AAAA,IAC7B,iCACE,EAAA,qJAAA;AAAA,IACF,8BAAgC,EAAA,sBAAA;AAAA,IAChC,+BAAiC,EAAA,0BAAA;AAAA,IACjC,qCACE,EAAA,sIAAA;AAAA,IACF,kCAAoC,EAAA,UAAA;AAAA,IACpC,+BAAiC,EAAA,wBAAA;AAAA,IACjC,qCACE,EAAA,yHAAA;AAAA,IACF,kCAAoC,EAAA,mBAAA;AAAA,IACpC,yCACE,EAAA,0CAAA;AAAA,IACF,+CACE,EAAA,qHAAA;AAAA,IACF,4CAA8C,EAAA,yBAAA;AAAA,IAC9C,kCACE,EAAA,2CAAA;AAAA,IACF,wCACE,EAAA,qNAAA;AAAA,IACF,qCAAuC,EAAA;AAAA;AAE3C,CAAC;;;;"}
@@ -5,10 +5,53 @@ const quickstartMessages = {
5
5
  title: "Let's get you started with Developer Hub",
6
6
  subtitle: "We'll guide you through a few quick steps"
7
7
  },
8
+ steps: {
9
+ setupAuthentication: {
10
+ title: "Set up authentication",
11
+ description: "Set up secure login credentials to protect your account from unauthorized access.",
12
+ ctaTitle: "Learn more"
13
+ },
14
+ configureRbac: {
15
+ title: "Configure RBAC",
16
+ description: "Assign roles and permissions to control who can view, create, or edit resources, ensuring secure and efficient collaboration.",
17
+ ctaTitle: "Manage access"
18
+ },
19
+ configureGit: {
20
+ title: "Configure Git",
21
+ description: "Connect your Git providers, such as GitHub to manage code, automate workflows, and integrate with platform features.",
22
+ ctaTitle: "Learn more"
23
+ },
24
+ managePlugins: {
25
+ title: "Manage plugins",
26
+ description: "Browse and install extensions to add features, connect with external tools, and customize your experience.",
27
+ ctaTitle: "Explore plugins"
28
+ },
29
+ importApplication: {
30
+ title: "Import application",
31
+ description: "Import your existing code and services into the catalog to organize and access them through your developer portal.",
32
+ ctaTitle: "Import"
33
+ },
34
+ learnAboutCatalog: {
35
+ title: "Learn about the Catalog",
36
+ description: "Discover all software components, services, and APIs, and view their owners and documentation.",
37
+ ctaTitle: "View Catalog"
38
+ },
39
+ exploreSelfServiceTemplates: {
40
+ title: "Explore Self-service templates",
41
+ description: "Use our self-service templates to quickly set up new projects, services, or documentation.",
42
+ ctaTitle: "Explore templates"
43
+ },
44
+ findAllLearningPaths: {
45
+ title: "Find all Learning Paths",
46
+ description: "Integrate tailored e-learning into your workflows with Learning Paths to accelerate onboarding, close skill gaps, and promote best practices.",
47
+ ctaTitle: "View Learning Paths"
48
+ }
49
+ },
8
50
  button: {
9
51
  quickstart: "Quick start",
10
52
  openQuickstartGuide: "Open Quickstart Guide",
11
- closeDrawer: "Close Drawer"
53
+ closeDrawer: "Close Drawer",
54
+ gotIt: "Got it!"
12
55
  },
13
56
  footer: {
14
57
  progress: "{{progress}}% progress",
@@ -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 * @public\n */\nexport const quickstartMessages = {\n header: {\n title: \"Let's get you started with Developer Hub\",\n subtitle: \"We'll guide you through a few quick steps\",\n },\n button: {\n quickstart: 'Quick start',\n openQuickstartGuide: 'Open Quickstart Guide',\n closeDrawer: 'Close Drawer',\n },\n footer: {\n progress: '{{progress}}% progress',\n notStarted: 'Not started',\n hide: 'Hide',\n },\n content: {\n emptyState: {\n title: 'Quickstart content not available for your role.',\n },\n },\n item: {\n expandAriaLabel: 'Expand {{title}} details',\n collapseAriaLabel: 'Collapse {{title}} details',\n expandButtonAriaLabel: 'Expand item',\n collapseButtonAriaLabel: 'Collapse item',\n },\n dev: {\n pageTitle: 'Quickstart Plugin Test Page',\n pageDescription:\n 'This is a test page for the Quickstart plugin. Use the buttons below to interact with the quickstart drawer.',\n drawerControls: 'Drawer Controls',\n currentState: 'Current drawer state: {{state}}',\n stateOpen: 'Open',\n stateClosed: 'Closed',\n instructions: 'Instructions',\n step1: '1. Click \"Open Quickstart Guide\" to open the drawer',\n step2: '2. Navigate through the quickstart steps',\n step3: '3. Test the progress tracking by completing steps',\n step4:\n \"4. The drawer can be closed using the close button or the drawer's own controls\",\n step5: '5. Progress is automatically saved to localStorage',\n },\n};\n\n/**\n * Translation reference for Quickstart plugin\n * @public\n */\nexport const quickstartTranslationRef = createTranslationRef({\n id: 'plugin.quickstart',\n messages: quickstartMessages,\n});\n"],"names":[],"mappings":";;AAuBO,MAAM,kBAAqB,GAAA;AAAA,EAChC,MAAQ,EAAA;AAAA,IACN,KAAO,EAAA,0CAAA;AAAA,IACP,QAAU,EAAA;AAAA,GACZ;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,UAAY,EAAA,aAAA;AAAA,IACZ,mBAAqB,EAAA,uBAAA;AAAA,IACrB,WAAa,EAAA;AAAA,GACf;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,QAAU,EAAA,wBAAA;AAAA,IACV,UAAY,EAAA,aAAA;AAAA,IACZ,IAAM,EAAA;AAAA,GACR;AAAA,EACA,OAAS,EAAA;AAAA,IACP,UAAY,EAAA;AAAA,MACV,KAAO,EAAA;AAAA;AACT,GACF;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,eAAiB,EAAA,0BAAA;AAAA,IACjB,iBAAmB,EAAA,4BAAA;AAAA,IACnB,qBAAuB,EAAA,aAAA;AAAA,IACvB,uBAAyB,EAAA;AAAA,GAC3B;AAAA,EACA,GAAK,EAAA;AAAA,IACH,SAAW,EAAA,6BAAA;AAAA,IACX,eACE,EAAA,8GAAA;AAAA,IACF,cAAgB,EAAA,iBAAA;AAAA,IAChB,YAAc,EAAA,iCAAA;AAAA,IACd,SAAW,EAAA,MAAA;AAAA,IACX,WAAa,EAAA,QAAA;AAAA,IACb,YAAc,EAAA,cAAA;AAAA,IACd,KAAO,EAAA,qDAAA;AAAA,IACP,KAAO,EAAA,0CAAA;AAAA,IACP,KAAO,EAAA,mDAAA;AAAA,IACP,KACE,EAAA,iFAAA;AAAA,IACF,KAAO,EAAA;AAAA;AAEX;AAMO,MAAM,2BAA2B,oBAAqB,CAAA;AAAA,EAC3D,EAAI,EAAA,mBAAA;AAAA,EACJ,QAAU,EAAA;AACZ,CAAC;;;;"}
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 * @public\n */\nexport const quickstartMessages = {\n header: {\n title: \"Let's get you started with Developer Hub\",\n subtitle: \"We'll guide you through a few quick steps\",\n },\n steps: {\n setupAuthentication: {\n title: 'Set up authentication',\n description:\n 'Set up secure login credentials to protect your account from unauthorized access.',\n ctaTitle: 'Learn more',\n },\n configureRbac: {\n title: 'Configure RBAC',\n description:\n 'Assign roles and permissions to control who can view, create, or edit resources, ensuring secure and efficient collaboration.',\n ctaTitle: 'Manage access',\n },\n configureGit: {\n title: 'Configure Git',\n description:\n 'Connect your Git providers, such as GitHub to manage code, automate workflows, and integrate with platform features.',\n ctaTitle: 'Learn more',\n },\n managePlugins: {\n title: 'Manage plugins',\n description:\n 'Browse and install extensions to add features, connect with external tools, and customize your experience.',\n ctaTitle: 'Explore plugins',\n },\n importApplication: {\n title: 'Import application',\n description:\n 'Import your existing code and services into the catalog to organize and access them through your developer portal.',\n ctaTitle: 'Import',\n },\n learnAboutCatalog: {\n title: 'Learn about the Catalog',\n description:\n 'Discover all software components, services, and APIs, and view their owners and documentation.',\n ctaTitle: 'View Catalog',\n },\n exploreSelfServiceTemplates: {\n title: 'Explore Self-service templates',\n description:\n 'Use our self-service templates to quickly set up new projects, services, or documentation.',\n ctaTitle: 'Explore templates',\n },\n findAllLearningPaths: {\n title: 'Find all Learning Paths',\n description:\n 'Integrate tailored e-learning into your workflows with Learning Paths to accelerate onboarding, close skill gaps, and promote best practices.',\n ctaTitle: 'View Learning Paths',\n },\n },\n button: {\n quickstart: 'Quick start',\n openQuickstartGuide: 'Open Quickstart Guide',\n closeDrawer: 'Close Drawer',\n gotIt: 'Got it!',\n },\n footer: {\n progress: '{{progress}}% progress',\n notStarted: 'Not started',\n hide: 'Hide',\n },\n content: {\n emptyState: {\n title: 'Quickstart content not available for your role.',\n },\n },\n item: {\n expandAriaLabel: 'Expand {{title}} details',\n collapseAriaLabel: 'Collapse {{title}} details',\n expandButtonAriaLabel: 'Expand item',\n collapseButtonAriaLabel: 'Collapse item',\n },\n dev: {\n pageTitle: 'Quickstart Plugin Test Page',\n pageDescription:\n 'This is a test page for the Quickstart plugin. Use the buttons below to interact with the quickstart drawer.',\n drawerControls: 'Drawer Controls',\n currentState: 'Current drawer state: {{state}}',\n stateOpen: 'Open',\n stateClosed: 'Closed',\n instructions: 'Instructions',\n step1: '1. Click \"Open Quickstart Guide\" to open the drawer',\n step2: '2. Navigate through the quickstart steps',\n step3: '3. Test the progress tracking by completing steps',\n step4:\n \"4. The drawer can be closed using the close button or the drawer's own controls\",\n step5: '5. Progress is automatically saved to localStorage',\n },\n};\n\n/**\n * Translation reference for Quickstart plugin\n * @public\n */\nexport const quickstartTranslationRef = createTranslationRef({\n id: 'plugin.quickstart',\n messages: quickstartMessages,\n});\n"],"names":[],"mappings":";;AAuBO,MAAM,kBAAqB,GAAA;AAAA,EAChC,MAAQ,EAAA;AAAA,IACN,KAAO,EAAA,0CAAA;AAAA,IACP,QAAU,EAAA;AAAA,GACZ;AAAA,EACA,KAAO,EAAA;AAAA,IACL,mBAAqB,EAAA;AAAA,MACnB,KAAO,EAAA,uBAAA;AAAA,MACP,WACE,EAAA,mFAAA;AAAA,MACF,QAAU,EAAA;AAAA,KACZ;AAAA,IACA,aAAe,EAAA;AAAA,MACb,KAAO,EAAA,gBAAA;AAAA,MACP,WACE,EAAA,+HAAA;AAAA,MACF,QAAU,EAAA;AAAA,KACZ;AAAA,IACA,YAAc,EAAA;AAAA,MACZ,KAAO,EAAA,eAAA;AAAA,MACP,WACE,EAAA,sHAAA;AAAA,MACF,QAAU,EAAA;AAAA,KACZ;AAAA,IACA,aAAe,EAA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A,iCAAA;AAAA,IACd,SAAW,EAAA,MAAA;AAAA,IACX,WAAa,EAAA,QAAA;AAAA,IACb,YAAc,EAAA,cAAA;AAAA,IACd,KAAO,EAAA,qDAAA;AAAA,IACP,KAAO,EAAA,0CAAA;AAAA,IACP,KAAO,EAAA,mDAAA;AAAA,IACP,KACE,EAAA,iFAAA;AAAA,IACF,KAAO,EAAA;AAAA;AAEX;AAMO,MAAM,2BAA2B,oBAAqB,CAAA;AAAA,EAC3D,EAAI,EAAA,mBAAA;AAAA,EACJ,QAAU,EAAA;AACZ,CAAC;;;;"}
@@ -0,0 +1,10 @@
1
+ const getTranslatedTextWithFallback = (t, translationKey, fallbackText) => {
2
+ if (!translationKey) {
3
+ return fallbackText;
4
+ }
5
+ const translation = t(translationKey, {});
6
+ return translation !== translationKey ? translation : fallbackText;
7
+ };
8
+
9
+ export { getTranslatedTextWithFallback };
10
+ //# sourceMappingURL=translationUtils.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translationUtils.esm.js","sources":["../../src/utils/translationUtils.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 { TranslationFunction } from '@backstage/core-plugin-api/alpha';\nimport { quickstartTranslationRef } from '../translations';\n\n/**\n * Utility function to get translated text with fallback to original text\n *\n * @param t - Translation function\n * @param translationKey - Optional translation key to look up\n * @param fallbackText - Text to display if translation key is not provided or translation is not found\n * @returns Translated text or fallback text\n */\nexport const getTranslatedTextWithFallback = (\n t: TranslationFunction<typeof quickstartTranslationRef.T>,\n translationKey: string | undefined,\n fallbackText: string,\n): string => {\n if (!translationKey) {\n return fallbackText;\n }\n\n const translation = t(translationKey as keyof typeof t, {});\n return translation !== translationKey ? translation : fallbackText;\n};\n"],"names":[],"mappings":"AA2BO,MAAM,6BAAgC,GAAA,CAC3C,CACA,EAAA,cAAA,EACA,YACW,KAAA;AACX,EAAA,IAAI,CAAC,cAAgB,EAAA;AACnB,IAAO,OAAA,YAAA;AAAA;AAGT,EAAA,MAAM,WAAc,GAAA,CAAA,CAAE,cAAkC,EAAA,EAAE,CAAA;AAC1D,EAAO,OAAA,WAAA,KAAgB,iBAAiB,WAAc,GAAA,YAAA;AACxD;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@red-hat-developer-hub/backstage-plugin-quickstart",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",