@red-hat-developer-hub/backstage-plugin-quickstart 1.1.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/config.d.ts +5 -0
  3. package/dist/components/QuickstartButton/QuickstartButton.esm.js +5 -2
  4. package/dist/components/QuickstartButton/QuickstartButton.esm.js.map +1 -1
  5. package/dist/components/QuickstartContent/QuickstartContent.esm.js +3 -1
  6. package/dist/components/QuickstartContent/QuickstartContent.esm.js.map +1 -1
  7. package/dist/components/QuickstartContent/QuickstartItem.esm.js +4 -2
  8. package/dist/components/QuickstartContent/QuickstartItem.esm.js.map +1 -1
  9. package/dist/components/QuickstartContent/QuickstartItemIcon.esm.js +9 -1
  10. package/dist/components/QuickstartContent/QuickstartItemIcon.esm.js.map +1 -1
  11. package/dist/components/QuickstartDrawer.esm.js +4 -1
  12. package/dist/components/QuickstartDrawer.esm.js.map +1 -1
  13. package/dist/components/QuickstartFooter.esm.js +4 -2
  14. package/dist/components/QuickstartFooter.esm.js.map +1 -1
  15. package/dist/components/QuickstartHeader.esm.js +4 -2
  16. package/dist/components/QuickstartHeader.esm.js.map +1 -1
  17. package/dist/hooks/useTranslation.esm.js +8 -0
  18. package/dist/hooks/useTranslation.esm.js.map +1 -0
  19. package/dist/index.d.ts +8 -1
  20. package/dist/index.esm.js +1 -0
  21. package/dist/index.esm.js.map +1 -1
  22. package/dist/plugin.esm.js +7 -1
  23. package/dist/plugin.esm.js.map +1 -1
  24. package/dist/translations/de.esm.js +36 -0
  25. package/dist/translations/de.esm.js.map +1 -0
  26. package/dist/translations/es.esm.js +36 -0
  27. package/dist/translations/es.esm.js.map +1 -0
  28. package/dist/translations/fr.esm.js +36 -0
  29. package/dist/translations/fr.esm.js.map +1 -0
  30. package/dist/translations/index.esm.js +14 -0
  31. package/dist/translations/index.esm.js.map +1 -0
  32. package/dist/translations/ref.esm.js +50 -0
  33. package/dist/translations/ref.esm.js.map +1 -0
  34. package/dist/utils/filterQuickstartItems.esm.js +9 -0
  35. package/dist/utils/filterQuickstartItems.esm.js.map +1 -0
  36. package/package.json +10 -10
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @red-hat-developer-hub/backstage-plugin-quickstart
2
2
 
3
+ ## 1.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - bc88e5f: Add internationalization (i18n) support with German, French and Spanish translations in quickstart.
8
+
9
+ ## 1.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 0e0f2f5: Backstage version bump to v1.41.2
14
+
15
+ ### Patch Changes
16
+
17
+ - f89f72f: Updated dependency `@mui/icons-material` to `5.18.0`.
18
+ Updated dependency `@mui/material` to `5.18.0`.
19
+
3
20
  ## 1.1.1
4
21
 
5
22
  ### Patch 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
+ roles?: Array<string>;
32
37
  /**
33
38
  * Optional icon for quickstart.
34
39
  * @visibility frontend
@@ -7,16 +7,19 @@ import { useTheme } from '@mui/material/styles';
7
7
  import WavingHandIcon from '@mui/icons-material/WavingHandOutlined';
8
8
  import { useQuickstartPermission } from '../../hooks/useQuickstartPermission.esm.js';
9
9
  import { useQuickstartDrawerContext } from '../../hooks/useQuickstartDrawerContext.esm.js';
10
+ import { useTranslation } from '../../hooks/useTranslation.esm.js';
10
11
 
11
12
  const QuickstartButton = ({
12
- title = "Quick start",
13
+ title,
13
14
  style,
14
15
  onClick = () => {
15
16
  }
16
17
  }) => {
18
+ const { t } = useTranslation();
17
19
  const isAllowed = useQuickstartPermission();
18
20
  const { toggleDrawer } = useQuickstartDrawerContext();
19
21
  const theme = useTheme();
22
+ const defaultTitle = t("button.quickstart");
20
23
  const handleClick = useCallback(() => {
21
24
  toggleDrawer();
22
25
  onClick();
@@ -64,7 +67,7 @@ const QuickstartButton = ({
64
67
  flexDirection: "column",
65
68
  justifyContent: "center"
66
69
  },
67
- children: /* @__PURE__ */ jsx(Typography, { variant: "body2", color: theme.palette.text.primary, children: title })
70
+ children: /* @__PURE__ */ jsx(Typography, { variant: "body2", color: theme.palette.text.primary, children: title || defaultTitle })
68
71
  }
69
72
  )
70
73
  ] })
@@ -1 +1 @@
1
- {"version":3,"file":"QuickstartButton.esm.js","sources":["../../../src/components/QuickstartButton/QuickstartButton.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 { CSSProperties, useCallback } from 'react';\nimport MenuItem from '@mui/material/MenuItem';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport { useTheme } from '@mui/material/styles';\nimport WavingHandIcon from '@mui/icons-material/WavingHandOutlined';\nimport { useQuickstartPermission } from '../../hooks/useQuickstartPermission';\nimport { useQuickstartDrawerContext } from '../../hooks/useQuickstartDrawerContext';\n\n/**\n * Props for the QuickstartButton component\n * @public\n */\nexport interface QuickstartButtonProps {\n /**\n * The title text to display in the button\n * @defaultValue 'Quick start'\n */\n title?: string;\n /**\n * Custom CSS styles to apply to the button\n */\n style?: CSSProperties;\n /**\n * Optional callback function to execute when the button is clicked\n */\n onClick?: () => void;\n}\n\n/**\n * @public\n */\nexport const QuickstartButton = ({\n title = 'Quick start',\n style,\n onClick = () => {},\n}: QuickstartButtonProps) => {\n const isAllowed = useQuickstartPermission();\n const { toggleDrawer } = useQuickstartDrawerContext();\n const theme = useTheme();\n\n const handleClick = useCallback(() => {\n toggleDrawer();\n onClick();\n }, [toggleDrawer, onClick]);\n\n return isAllowed ? (\n <MenuItem\n sx={{\n width: '100%',\n color: 'inherit',\n ...style,\n }}\n data-testid=\"quickstart-button\"\n onClick={handleClick}\n >\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n margin: '8px 0',\n color: 'inherit',\n width: '100%',\n }}\n >\n <Box sx={{ display: 'flex', alignItems: 'center' }}>\n <WavingHandIcon\n sx={{\n fontSize: 20,\n marginRight: '0.5rem',\n flexShrink: 0,\n display: 'flex',\n alignItems: 'center',\n color:\n theme.palette.mode === 'dark'\n ? theme.palette.text.primary\n : theme.palette.text.disabled,\n }}\n />\n <Box\n sx={{\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n }}\n >\n <Typography variant=\"body2\" color={theme.palette.text.primary}>\n {title}\n </Typography>\n </Box>\n </Box>\n </Box>\n </MenuItem>\n ) : null;\n};\n"],"names":[],"mappings":";;;;;;;;;;AAgDO,MAAM,mBAAmB,CAAC;AAAA,EAC/B,KAAQ,GAAA,aAAA;AAAA,EACR,KAAA;AAAA,EACA,UAAU,MAAM;AAAA;AAClB,CAA6B,KAAA;AAC3B,EAAA,MAAM,YAAY,uBAAwB,EAAA;AAC1C,EAAM,MAAA,EAAE,YAAa,EAAA,GAAI,0BAA2B,EAAA;AACpD,EAAA,MAAM,QAAQ,QAAS,EAAA;AAEvB,EAAM,MAAA,WAAA,GAAc,YAAY,MAAM;AACpC,IAAa,YAAA,EAAA;AACb,IAAQ,OAAA,EAAA;AAAA,GACP,EAAA,CAAC,YAAc,EAAA,OAAO,CAAC,CAAA;AAE1B,EAAA,OAAO,SACL,mBAAA,GAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,EAAI,EAAA;AAAA,QACF,KAAO,EAAA,MAAA;AAAA,QACP,KAAO,EAAA,SAAA;AAAA,QACP,GAAG;AAAA,OACL;AAAA,MACA,aAAY,EAAA,mBAAA;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3,"file":"QuickstartButton.esm.js","sources":["../../../src/components/QuickstartButton/QuickstartButton.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 { CSSProperties, useCallback } from 'react';\nimport MenuItem from '@mui/material/MenuItem';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport { useTheme } from '@mui/material/styles';\nimport WavingHandIcon from '@mui/icons-material/WavingHandOutlined';\nimport { useQuickstartPermission } from '../../hooks/useQuickstartPermission';\nimport { useQuickstartDrawerContext } from '../../hooks/useQuickstartDrawerContext';\nimport { useTranslation } from '../../hooks/useTranslation';\n\n/**\n * Props for the QuickstartButton component\n * @public\n */\nexport interface QuickstartButtonProps {\n /**\n * The title text to display in the button\n * @defaultValue 'Quick start'\n */\n title?: string;\n /**\n * Custom CSS styles to apply to the button\n */\n style?: CSSProperties;\n /**\n * Optional callback function to execute when the button is clicked\n */\n onClick?: () => void;\n}\n\n/**\n * @public\n */\nexport const QuickstartButton = ({\n title,\n style,\n onClick = () => {},\n}: QuickstartButtonProps) => {\n const { t } = useTranslation();\n const isAllowed = useQuickstartPermission();\n const { toggleDrawer } = useQuickstartDrawerContext();\n const theme = useTheme();\n\n const defaultTitle = t('button.quickstart');\n\n const handleClick = useCallback(() => {\n toggleDrawer();\n onClick();\n }, [toggleDrawer, onClick]);\n\n return isAllowed ? (\n <MenuItem\n sx={{\n width: '100%',\n color: 'inherit',\n ...style,\n }}\n data-testid=\"quickstart-button\"\n onClick={handleClick}\n >\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n margin: '8px 0',\n color: 'inherit',\n width: '100%',\n }}\n >\n <Box sx={{ display: 'flex', alignItems: 'center' }}>\n <WavingHandIcon\n sx={{\n fontSize: 20,\n marginRight: '0.5rem',\n flexShrink: 0,\n display: 'flex',\n alignItems: 'center',\n color:\n theme.palette.mode === 'dark'\n ? theme.palette.text.primary\n : theme.palette.text.disabled,\n }}\n />\n <Box\n sx={{\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n }}\n >\n <Typography variant=\"body2\" color={theme.palette.text.primary}>\n {title || defaultTitle}\n </Typography>\n </Box>\n </Box>\n </Box>\n </MenuItem>\n ) : null;\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAiDO,MAAM,mBAAmB,CAAC;AAAA,EAC/B,KAAA;AAAA,EACA,KAAA;AAAA,EACA,UAAU,MAAM;AAAA;AAClB,CAA6B,KAAA;AAC3B,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAC7B,EAAA,MAAM,YAAY,uBAAwB,EAAA;AAC1C,EAAM,MAAA,EAAE,YAAa,EAAA,GAAI,0BAA2B,EAAA;AACpD,EAAA,MAAM,QAAQ,QAAS,EAAA;AAEvB,EAAM,MAAA,YAAA,GAAe,EAAE,mBAAmB,CAAA;AAE1C,EAAM,MAAA,WAAA,GAAc,YAAY,MAAM;AACpC,IAAa,YAAA,EAAA;AACb,IAAQ,OAAA,EAAA;AAAA,GACP,EAAA,CAAC,YAAc,EAAA,OAAO,CAAC,CAAA;AAE1B,EAAA,OAAO,SACL,mBAAA,GAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,EAAI,EAAA;AAAA,QACF,KAAO,EAAA,MAAA;AAAA,QACP,KAAO,EAAA,SAAA;AAAA,QACP,GAAG;AAAA,OACL;AAAA,MACA,aAAY,EAAA,mBAAA;AAAA,MACZ,OAAS,EAAA,WAAA;AAAA,MAET,QAAA,kBAAA,GAAA;AAAA,QAAC,GAAA;AAAA,QAAA;AAAA,U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mptyState } from '@backstage/core-components';
6
6
  import { useState } from 'react';
7
+ import { useTranslation } from '../../hooks/useTranslation.esm.js';
7
8
 
8
9
  const QuickstartContent = ({
9
10
  quickstartItems,
10
11
  setProgress,
11
12
  itemCount
12
13
  }) => {
14
+ const { t } = useTranslation();
13
15
  const [openItems, setOpenItems] = useState(
14
16
  new Array(itemCount).fill(false)
15
17
  );
@@ -33,7 +35,7 @@ const QuickstartContent = ({
33
35
  setProgress: () => setProgress(index)
34
36
  },
35
37
  `${item.title}-${index}`
36
- )) }) : /* @__PURE__ */ jsx(EmptyState, { title: "Quickstart content not available.", missing: "data" })
38
+ )) }) : /* @__PURE__ */ jsx(EmptyState, { title: t("content.emptyState.title"), missing: "data" })
37
39
  }
38
40
  );
39
41
  };
@@ -1 +1 @@
1
- {"version":3,"file":"QuickstartContent.esm.js","sources":["../../../src/components/QuickstartContent/QuickstartContent.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 Box from '@mui/material/Box';\nimport List from '@mui/material/List';\nimport { QuickstartItem } from './QuickstartItem';\nimport { EmptyState } from '@backstage/core-components';\nimport { useState } from 'react';\nimport { QuickstartItemData } from '../../types';\n\ntype QuickstartContentProps = {\n quickstartItems: QuickstartItemData[];\n setProgress: (index: number) => void;\n itemCount: number;\n};\n\nexport const QuickstartContent = ({\n quickstartItems,\n setProgress,\n itemCount,\n}: QuickstartContentProps) => {\n const [openItems, setOpenItems] = useState<boolean[]>(\n new Array(itemCount).fill(false),\n );\n\n return (\n <Box\n sx={{\n paddingTop: theme => `${theme.spacing(3)}`,\n }}\n >\n {quickstartItems.length > 0 ? (\n <List disablePadding>\n {quickstartItems.map((item: QuickstartItemData, index: number) => (\n <QuickstartItem\n key={`${item.title}-${index}`}\n item={item}\n index={index}\n open={openItems[index]}\n handleOpen={() =>\n setOpenItems(oi => {\n return oi.map((val, valIndex) =>\n valIndex === index ? !val : false,\n );\n })\n }\n setProgress={() => setProgress(index)}\n />\n ))}\n </List>\n ) : (\n <EmptyState title=\"Quickstart content not available.\" missing=\"data\" />\n )}\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;AA6BO,MAAM,oBAAoB,CAAC;AAAA,EAChC,eAAA;AAAA,EACA,WAAA;AAAA,EACA;AACF,CAA8B,KAAA;AAC5B,EAAM,MAAA,CAAC,SAAW,EAAA,YAAY,CAAI,GAAA,QAAA;AAAA,IAChC,IAAI,KAAA,CAAM,SAAS,CAAA,CAAE,KAAK,KAAK;AAAA,GACjC;AAEA,EACE,uBAAA,GAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACC,EAAI,EAAA;AAAA,QACF,YAAY,CAAS,KAAA,KAAA,CAAA,EAAG,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAC,CAAA;AAAA,OAC1C;AAAA,MAEC,QAAA,EAAA,eAAA,CAAgB,MAAS,GAAA,CAAA,mBACvB,GAAA,CAAA,IAAA,EAAA,EAAK,cAAc,EAAA,IAAA,EACjB,QAAgB,EAAA,eAAA,CAAA,GAAA,CAAI,CAAC,IAAA,EAA0B,KAC9C,qBAAA,GAAA;AAAA,QAAC,cAAA;AAAA,QAAA;AAAA,UAEC,IAAA;AAAA,UACA,KAAA;AAAA,UACA,IAAA,EAAM,UAAU,KAAK,CAAA;AAAA,UACrB,UAAA,EAAY,MACV,YAAA,CAAa,CAAM,EAAA,KAAA;AACjB,YAAA,OAAO,EAAG,CAAA,GAAA;AAAA,cAAI,CAAC,GAAK,EAAA,QAAA,KAClB,QAAa,KAAA,KAAA,GAAQ,CAAC,GAAM,GAAA;AAAA,aAC9B;AAAA,WACD,CAAA;AAAA,UAEH,WAAA,EAAa,MAAM,WAAA,CAAY,KAAK;AAAA,SAAA;AAAA,QAX/B,CAAG,EAAA,IAAA,CAAK,KAAK,CAAA,CAAA,EAAI,KAAK,CAAA;AAAA,OAa9B,GACH,CAEA,mBAAA,GAAA,CAAC,cAAW,KAAM,EAAA,mCAAA,EAAoC,SAAQ,MAAO,EAAA;AAAA;AAAA,GAEzE;AAEJ;;;;"}
1
+ {"version":3,"file":"QuickstartContent.esm.js","sources":["../../../src/components/QuickstartContent/QuickstartContent.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 Box from '@mui/material/Box';\nimport List from '@mui/material/List';\nimport { QuickstartItem } from './QuickstartItem';\nimport { EmptyState } from '@backstage/core-components';\nimport { useState } from 'react';\nimport { QuickstartItemData } from '../../types';\nimport { useTranslation } from '../../hooks/useTranslation';\n\ntype QuickstartContentProps = {\n quickstartItems: QuickstartItemData[];\n setProgress: (index: number) => void;\n itemCount: number;\n};\n\nexport const QuickstartContent = ({\n quickstartItems,\n setProgress,\n itemCount,\n}: QuickstartContentProps) => {\n const { t } = useTranslation();\n const [openItems, setOpenItems] = useState<boolean[]>(\n new Array(itemCount).fill(false),\n );\n\n return (\n <Box\n sx={{\n paddingTop: theme => `${theme.spacing(3)}`,\n }}\n >\n {quickstartItems.length > 0 ? (\n <List disablePadding>\n {quickstartItems.map((item: QuickstartItemData, index: number) => (\n <QuickstartItem\n key={`${item.title}-${index}`}\n item={item}\n index={index}\n open={openItems[index]}\n handleOpen={() =>\n setOpenItems(oi => {\n return oi.map((val, valIndex) =>\n valIndex === index ? !val : false,\n );\n })\n }\n setProgress={() => setProgress(index)}\n />\n ))}\n </List>\n ) : (\n <EmptyState title={t('content.emptyState.title')} missing=\"data\" />\n )}\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AA8BO,MAAM,oBAAoB,CAAC;AAAA,EAChC,eAAA;AAAA,EACA,WAAA;AAAA,EACA;AACF,CAA8B,KAAA;AAC5B,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAC7B,EAAM,MAAA,CAAC,SAAW,EAAA,YAAY,CAAI,GAAA,QAAA;AAAA,IAChC,IAAI,KAAA,CAAM,SAAS,CAAA,CAAE,KAAK,KAAK;AAAA,GACjC;AAEA,EACE,uBAAA,GAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACC,EAAI,EAAA;AAAA,QACF,YAAY,CAAS,KAAA,KAAA,CAAA,EAAG,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAC,CAAA;AAAA,OAC1C;AAAA,MAEC,QAAA,EAAA,eAAA,CAAgB,MAAS,GAAA,CAAA,mBACvB,GAAA,CAAA,IAAA,EAAA,EAAK,cAAc,EAAA,IAAA,EACjB,QAAgB,EAAA,eAAA,CAAA,GAAA,CAAI,CAAC,IAAA,EAA0B,KAC9C,qBAAA,GAAA;AAAA,QAAC,cAAA;AAAA,QAAA;AAAA,UAEC,IAAA;AAAA,UACA,KAAA;AAAA,UACA,IAAA,EAAM,UAAU,KAAK,CAAA;AAAA,UACrB,UAAA,EAAY,MACV,YAAA,CAAa,CAAM,EAAA,KAAA;AACjB,YAAA,OAAO,EAAG,CAAA,GAAA;AAAA,cAAI,CAAC,GAAK,EAAA,QAAA,KAClB,QAAa,KAAA,KAAA,GAAQ,CAAC,GAAM,GAAA;AAAA,aAC9B;AAAA,WACD,CAAA;AAAA,UAEH,WAAA,EAAa,MAAM,WAAA,CAAY,KAAK;AAAA,SAAA;AAAA,QAX/B,CAAG,EAAA,IAAA,CAAK,KAAK,CAAA,CAAA,EAAI,KAAK,CAAA;AAAA,OAa9B,CACH,EAAA,CAAA,mBAEC,GAAA,CAAA,UAAA,EAAA,EAAW,OAAO,CAAE,CAAA,0BAA0B,CAAG,EAAA,OAAA,EAAQ,MAAO,EAAA;AAAA;AAAA,GAErE;AAEJ;;;;"}
@@ -11,6 +11,7 @@ import { useState, useEffect } from 'react';
11
11
  import { QuickstartItemIcon } from './QuickstartItemIcon.esm.js';
12
12
  import { QuickstartCtaLink } from './QuickstartCtaLink.esm.js';
13
13
  import IconButton from '@mui/material/IconButton';
14
+ import { useTranslation } from '../../hooks/useTranslation.esm.js';
14
15
 
15
16
  const QuickstartItem = ({
16
17
  item,
@@ -19,6 +20,7 @@ const QuickstartItem = ({
19
20
  open,
20
21
  handleOpen
21
22
  }) => {
23
+ const { t } = useTranslation();
22
24
  const [stepCompleted, setStepCompleted] = useState(false);
23
25
  const itemKey = `${item.title}-${index}`;
24
26
  useEffect(() => {
@@ -42,7 +44,7 @@ const QuickstartItem = ({
42
44
  onClick: handleOpen,
43
45
  role: "button",
44
46
  "aria-expanded": open,
45
- "aria-label": `${open ? "Collapse" : "Expand"} ${item.title} details`,
47
+ "aria-label": open ? t("item.collapseAriaLabel", { title: item.title }) : t("item.expandAriaLabel", { title: item.title }),
46
48
  tabIndex: 0,
47
49
  onKeyDown: (e) => {
48
50
  if (e.key === "Enter" || e.key === " ") {
@@ -89,7 +91,7 @@ const QuickstartItem = ({
89
91
  /* @__PURE__ */ jsx(
90
92
  IconButton,
91
93
  {
92
- "aria-label": open ? "Collapse item" : "Expand item",
94
+ "aria-label": open ? t("item.collapseButtonAriaLabel") : t("item.expandButtonAriaLabel"),
93
95
  sx: {
94
96
  ...open ? { color: (theme) => theme.palette.text.primary } : { color: (theme) => theme.palette.text.secondary }
95
97
  },
@@ -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';\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 [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={`${open ? 'Collapse' : 'Expand'} ${item.title} details`}\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={open ? 'Collapse item' : 'Expand item'}\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":";;;;;;;;;;;;;;AAsCO,MAAM,iBAAiB,CAAC;AAAA,EAC7B,IAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,CAA2B,KAAA;AAC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,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';\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,CAAA,GAAA,EAAA,EAAI,EAAI,EAAA,EAAE,YAAc,EAAA,CAAA,KAAA,KAAS,CAAG,EAAA,KAAA,C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AAA;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;;;;"}
@@ -4,6 +4,10 @@ import AdminPanelSettingsOutlinedIcon from '@mui/icons-material/AdminPanelSettin
4
4
  import VpnKeyOutlinedIcon from '@mui/icons-material/VpnKeyOutlined';
5
5
  import FileCopyOutlinedIcon from '@mui/icons-material/FileCopyOutlined';
6
6
  import PowerOutlinedIcon from '@mui/icons-material/PowerOutlined';
7
+ import LoginIcon from '@mui/icons-material/Login';
8
+ import CategoryOutlinedIcon from '@mui/icons-material/CategoryOutlined';
9
+ import ControlPointOutlinedIcon from '@mui/icons-material/ControlPointOutlined';
10
+ import SchoolOutlinedIcon from '@mui/icons-material/SchoolOutlined';
7
11
  import { useApp } from '@backstage/core-plugin-api';
8
12
  import Box from '@mui/material/Box';
9
13
 
@@ -11,7 +15,11 @@ const commonIcons = {
11
15
  Admin: /* @__PURE__ */ jsx(AdminPanelSettingsOutlinedIcon, {}),
12
16
  Rbac: /* @__PURE__ */ jsx(VpnKeyOutlinedIcon, {}),
13
17
  Git: /* @__PURE__ */ jsx(FileCopyOutlinedIcon, {}),
14
- Plugins: /* @__PURE__ */ jsx(PowerOutlinedIcon, {})
18
+ Plugins: /* @__PURE__ */ jsx(PowerOutlinedIcon, {}),
19
+ Import: /* @__PURE__ */ jsx(LoginIcon, {}),
20
+ Catalog: /* @__PURE__ */ jsx(CategoryOutlinedIcon, {}),
21
+ SelfService: /* @__PURE__ */ jsx(ControlPointOutlinedIcon, {}),
22
+ Learning: /* @__PURE__ */ jsx(SchoolOutlinedIcon, {})
15
23
  };
16
24
  const QuickstartItemIcon = ({ icon, sx }) => {
17
25
  const app = useApp();
@@ -1 +1 @@
1
- {"version":3,"file":"QuickstartItemIcon.esm.js","sources":["../../../src/components/QuickstartContent/QuickstartItemIcon.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 MuiIcon from '@mui/material/Icon';\nimport AdminPanelSettingsOutlinedIcon from '@mui/icons-material/AdminPanelSettingsOutlined';\nimport VpnKeyOutlinedIcon from '@mui/icons-material/VpnKeyOutlined';\nimport FileCopyOutlinedIcon from '@mui/icons-material/FileCopyOutlined';\nimport PowerOutlinedIcon from '@mui/icons-material/PowerOutlined';\nimport { SxProps, Theme } from '@mui/material/styles';\nimport { useApp } from '@backstage/core-plugin-api';\nimport Box from '@mui/material/Box';\n\nexport interface QuickstartItemIconProps {\n icon?: string;\n sx?: SxProps<Theme>;\n}\n\nconst commonIcons: {\n [k: string]: React.ReactNode;\n} = {\n Admin: <AdminPanelSettingsOutlinedIcon />,\n Rbac: <VpnKeyOutlinedIcon />,\n Git: <FileCopyOutlinedIcon />,\n Plugins: <PowerOutlinedIcon />,\n};\n\nexport const QuickstartItemIcon = ({ icon, sx }: QuickstartItemIconProps) => {\n const app = useApp();\n if (!icon) {\n return null;\n }\n\n const SystemIcon = app.getSystemIcon(icon);\n if (SystemIcon) {\n return (\n <Box sx={{ display: 'flex', alignItems: 'center', ...sx }}>\n <SystemIcon fontSize=\"medium\" />\n </Box>\n );\n }\n\n if (icon.startsWith('<svg')) {\n const svgDataUri = `data:image/svg+xml;base64,${btoa(icon)}`;\n return (\n <MuiIcon fontSize=\"medium\" sx={sx}>\n <img src={svgDataUri} alt=\"\" />\n </MuiIcon>\n );\n }\n\n if (\n icon.startsWith('https://') ||\n icon.startsWith('http://') ||\n icon.startsWith('/')\n ) {\n return (\n <MuiIcon\n fontSize=\"medium\"\n baseClassName=\"material-icons-outlined\"\n sx={sx}\n >\n <img src={icon} alt=\"\" height=\"100%\" width=\"100%\" />\n </MuiIcon>\n );\n }\n\n return (\n <MuiIcon fontSize=\"medium\" baseClassName=\"material-icons-outlined\" sx={sx}>\n {commonIcons[icon] || icon}\n </MuiIcon>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AA8BA,MAAM,WAEF,GAAA;AAAA,EACF,KAAA,sBAAQ,8BAA+B,EAAA,EAAA,CAAA;AAAA,EACvC,IAAA,sBAAO,kBAAmB,EAAA,EAAA,CAAA;AAAA,EAC1B,GAAA,sBAAM,oBAAqB,EAAA,EAAA,CAAA;AAAA,EAC3B,OAAA,sBAAU,iBAAkB,EAAA,EAAA;AAC9B,CAAA;AAEO,MAAM,kBAAqB,GAAA,CAAC,EAAE,IAAA,EAAM,IAAkC,KAAA;AAC3E,EAAA,MAAM,MAAM,MAAO,EAAA;AACnB,EAAA,IAAI,CAAC,IAAM,EAAA;AACT,IAAO,OAAA,IAAA;AAAA;AAGT,EAAM,MAAA,U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A,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"QuickstartItemIcon.esm.js","sources":["../../../src/components/QuickstartContent/QuickstartItemIcon.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 MuiIcon from '@mui/material/Icon';\nimport AdminPanelSettingsOutlinedIcon from '@mui/icons-material/AdminPanelSettingsOutlined';\nimport VpnKeyOutlinedIcon from '@mui/icons-material/VpnKeyOutlined';\nimport FileCopyOutlinedIcon from '@mui/icons-material/FileCopyOutlined';\nimport PowerOutlinedIcon from '@mui/icons-material/PowerOutlined';\nimport LoginIcon from '@mui/icons-material/Login';\nimport CategoryOutlinedIcon from '@mui/icons-material/CategoryOutlined';\nimport ControlPointOutlinedIcon from '@mui/icons-material/ControlPointOutlined';\nimport SchoolOutlinedIcon from '@mui/icons-material/SchoolOutlined';\nimport { SxProps, Theme } from '@mui/material/styles';\nimport { useApp } from '@backstage/core-plugin-api';\nimport Box from '@mui/material/Box';\n\nexport interface QuickstartItemIconProps {\n icon?: string;\n sx?: SxProps<Theme>;\n}\n\nconst commonIcons: {\n [k: string]: React.ReactNode;\n} = {\n Admin: <AdminPanelSettingsOutlinedIcon />,\n Rbac: <VpnKeyOutlinedIcon />,\n Git: <FileCopyOutlinedIcon />,\n Plugins: <PowerOutlinedIcon />,\n Import: <LoginIcon />,\n Catalog: <CategoryOutlinedIcon />,\n SelfService: <ControlPointOutlinedIcon />,\n Learning: <SchoolOutlinedIcon />,\n};\n\nexport const QuickstartItemIcon = ({ icon, sx }: QuickstartItemIconProps) => {\n const app = useApp();\n if (!icon) {\n return null;\n }\n\n const SystemIcon = app.getSystemIcon(icon);\n if (SystemIcon) {\n return (\n <Box sx={{ display: 'flex', alignItems: 'center', ...sx }}>\n <SystemIcon fontSize=\"medium\" />\n </Box>\n );\n }\n\n if (icon.startsWith('<svg')) {\n const svgDataUri = `data:image/svg+xml;base64,${btoa(icon)}`;\n return (\n <MuiIcon fontSize=\"medium\" sx={sx}>\n <img src={svgDataUri} alt=\"\" />\n </MuiIcon>\n );\n }\n\n if (\n icon.startsWith('https://') ||\n icon.startsWith('http://') ||\n icon.startsWith('/')\n ) {\n return (\n <MuiIcon\n fontSize=\"medium\"\n baseClassName=\"material-icons-outlined\"\n sx={sx}\n >\n <img src={icon} alt=\"\" height=\"100%\" width=\"100%\" />\n </MuiIcon>\n );\n }\n\n return (\n <MuiIcon fontSize=\"medium\" baseClassName=\"material-icons-outlined\" sx={sx}>\n {commonIcons[icon] || icon}\n </MuiIcon>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAkCA,MAAM,WAEF,GAAA;AAAA,EACF,KAAA,sBAAQ,8BAA+B,EAAA,EAAA,CAAA;AAAA,EACvC,IAAA,sBAAO,kBAAmB,EAAA,EAAA,CAAA;AAAA,EAC1B,GAAA,sBAAM,oBAAqB,EAAA,EAAA,CAAA;AAAA,EAC3B,OAAA,sBAAU,iBAAkB,EAAA,EAAA,CAAA;AAAA,EAC5B,MAAA,sBAAS,SAAU,EAAA,EAAA,CAAA;AAAA,EACnB,OAAA,sBAAU,oBAAqB,EAAA,EAAA,CAAA;AAAA,EAC/B,WAAA,sBAAc,wBAAyB,EAAA,EAAA,CAAA;AAAA,EACvC,QAAA,sBAAW,kBAAmB,EAAA,EAAA;AAChC,CAAA;AAEO,MAAM,kBAAqB,GAAA,CAAC,EAAE,IAAA,EAAM,IAAkC,KAAA;AAC3E,EAAA,MAAM,MAAM,MAAO,EAAA;AACnB,EAAA,IAAI,CAAC,IAAM,EAAA;AACT,IAAO,OAAA,IAAA;AAAA;AAG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IAAK,IACxB,EAAA,CAAA;AAEJ;;;;"}
@@ -3,12 +3,15 @@ import Drawer from '@mui/material/Drawer';
3
3
  import { useApiHolder, configApiRef } from '@backstage/core-plugin-api';
4
4
  import { Quickstart } from './Quickstart.esm.js';
5
5
  import { useQuickstartDrawerContext } from '../hooks/useQuickstartDrawerContext.esm.js';
6
+ import { filterQuickstartItemsByRole } from '../utils/filterQuickstartItems.esm.js';
6
7
 
7
8
  const QuickstartDrawer = () => {
8
9
  const { isDrawerOpen, closeDrawer, drawerWidth } = useQuickstartDrawerContext();
9
10
  const apiHolder = useApiHolder();
10
11
  const config = apiHolder.get(configApiRef);
11
12
  const quickstartItems = config?.has("app.quickstart") ? config.get("app.quickstart") : [];
13
+ const userRole = "developer";
14
+ const filteredItems = filterQuickstartItemsByRole(quickstartItems, userRole);
12
15
  return /* @__PURE__ */ jsx(
13
16
  Drawer,
14
17
  {
@@ -33,7 +36,7 @@ const QuickstartDrawer = () => {
33
36
  children: /* @__PURE__ */ jsx(
34
37
  Quickstart,
35
38
  {
36
- quickstartItems,
39
+ quickstartItems: filteredItems,
37
40
  handleDrawerClose: closeDrawer
38
41
  }
39
42
  )
@@ -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';\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[] = config?.has('app.quickstart')\n ? config.get('app.quickstart')\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={quickstartItems}\n handleDrawerClose={closeDrawer}\n />\n </Drawer>\n );\n};\n"],"names":[],"mappings":";;;;;;AAuBO,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,MAAA,eAAA,GAAwC,QAAQ,GAAI,CAAA,gBAAgB,IACtE,MAAO,CAAA,GAAA,CAAI,gBAAgB,CAAA,GAC3B,EAAC;AACL,EACE,uBAAA,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,EAAI,EAAA;AAAA,QACF,uBAAyB,EAAA;AAAA,UACvB,KAAO,EAAA,WAAA;AAAA,UACP,SAAW,EAAA,YAAA;AAAA,UACX,iBAAiB,CACf,KAAA,KAAA,CAAA,EACG,MAAsB,OAAS,EAAA,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,eAAA;AAAA,UACA,iBAAmB,EAAA;AAAA;AAAA;AACrB;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';\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[] = config?.has('app.quickstart')\n ? config.get('app.quickstart')\n : [];\n\n // This will be dynamically determined based on the logged-in user\n const userRole = 'developer'; // switch to 'admin', 'developer', or other roles for testing purposes\n\n const filteredItems = filterQuickstartItemsByRole(quickstartItems, userRole);\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 />\n </Drawer>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAwBO,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,MAAA,eAAA,GAAwC,QAAQ,GAAI,CAAA,gBAAgB,IACtE,MAAO,CAAA,GAAA,CAAI,gBAAgB,CAAA,GAC3B,EAAC;AAGL,EAAA,MAAM,QAAW,GAAA,WAAA;AAEjB,EAAM,MAAA,aAAA,GAAgB,2BAA4B,CAAA,eAAA,EAAiB,QAAQ,CAAA;AAE3E,EACE,uBAAA,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,EAAI,EAAA;AAAA,QACF,uBAAyB,EAAA;AAAA,UACvB,KAAO,EAAA,WAAA;AAAA,UACP,SAAW,EAAA,YAAA;AAAA,UACX,iBAAiB,CACf,KAAA,KAAA,CAAA,EACG,MAAsB,OAAS,EAAA,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;AAAA;AAAA;AACrB;AAAA,GACF;AAEJ;;;;"}
@@ -3,11 +3,13 @@ import Box from '@mui/material/Box';
3
3
  import Button from '@mui/material/Button';
4
4
  import LinearProgress from '@mui/material/LinearProgress';
5
5
  import Typography from '@mui/material/Typography';
6
+ import { useTranslation } from '../hooks/useTranslation.esm.js';
6
7
 
7
8
  const QuickstartFooter = ({
8
9
  handleDrawerClose,
9
10
  progress
10
11
  }) => {
12
+ const { t } = useTranslation();
11
13
  return /* @__PURE__ */ jsxs(Box, { children: [
12
14
  /* @__PURE__ */ jsx(LinearProgress, { variant: "determinate", value: progress }),
13
15
  /* @__PURE__ */ jsxs(
@@ -20,8 +22,8 @@ const QuickstartFooter = ({
20
22
  padding: (theme) => `${theme.spacing(2.5)}`
21
23
  },
22
24
  children: [
23
- /* @__PURE__ */ jsx(Typography, { sx: { fontSize: (theme) => theme.typography.caption }, children: progress > 0 ? `${progress}% progress` : "Not started" }),
24
- /* @__PURE__ */ jsx(Button, { onClick: () => handleDrawerClose(), children: "Hide" })
25
+ /* @__PURE__ */ jsx(Typography, { sx: { fontSize: (theme) => theme.typography.caption }, children: progress > 0 ? t("footer.progress", { progress: progress.toString() }) : t("footer.notStarted") }),
26
+ /* @__PURE__ */ jsx(Button, { onClick: () => handleDrawerClose(), children: t("footer.hide") })
25
27
  ]
26
28
  }
27
29
  )
@@ -1 +1 @@
1
- {"version":3,"file":"QuickstartFooter.esm.js","sources":["../../src/components/QuickstartFooter.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 Box from '@mui/material/Box';\nimport Button from '@mui/material/Button';\nimport LinearProgress from '@mui/material/LinearProgress';\nimport Typography from '@mui/material/Typography';\n\nexport type QuickstartFooterProps = {\n handleDrawerClose: () => void;\n progress: number;\n};\n\nexport const QuickstartFooter = ({\n handleDrawerClose,\n progress,\n}: QuickstartFooterProps) => {\n return (\n <Box>\n <LinearProgress variant=\"determinate\" value={progress} />\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n padding: theme => `${theme.spacing(2.5)}`,\n }}\n >\n <Typography sx={{ fontSize: theme => theme.typography.caption }}>\n {progress > 0 ? `${progress}% progress` : 'Not started'}\n </Typography>\n <Button onClick={() => handleDrawerClose()}>Hide</Button>\n </Box>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;AA0BO,MAAM,mBAAmB,CAAC;AAAA,EAC/B,iBAAA;AAAA,EACA;AACF,CAA6B,KAAA;AAC3B,EAAA,4BACG,GACC,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,cAAe,EAAA,EAAA,OAAA,EAAQ,aAAc,EAAA,KAAA,EAAO,QAAU,EAAA,CAAA;AAAA,oBACvD,IAAA;AAAA,MAAC,GAAA;AAAA,MAAA;AAAA,QACC,EAAI,EAAA;AAAA,UACF,OAAS,EAAA,MAAA;AAAA,UACT,UAAY,EAAA,QAAA;AAAA,UACZ,cAAgB,EAAA,eAAA;AAAA,UAChB,SAAS,CAAS,KAAA,KAAA,CAAA,EAAG,KAAM,CAAA,OAAA,CAAQ,GAAG,CAAC,CAAA;AAAA,SACzC;AAAA,QAEA,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,UAAW,EAAA,EAAA,EAAA,EAAI,EAAE,QAAA,EAAU,WAAS,KAAM,CAAA,UAAA,CAAW,OAAQ,EAAA,EAC3D,QAAW,EAAA,QAAA,GAAA,CAAA,GAAI,CAAG,EAAA,QAAQ,eAAe,aAC5C,EAAA,CAAA;AAAA,8BACC,MAAO,EAAA,EAAA,OAAA,EAAS,MAAM,iBAAA,IAAqB,QAAI,EAAA,MAAA,EAAA;AAAA;AAAA;AAAA;AAClD,GACF,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"QuickstartFooter.esm.js","sources":["../../src/components/QuickstartFooter.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 Box from '@mui/material/Box';\nimport Button from '@mui/material/Button';\nimport LinearProgress from '@mui/material/LinearProgress';\nimport Typography from '@mui/material/Typography';\nimport { useTranslation } from '../hooks/useTranslation';\n\nexport type QuickstartFooterProps = {\n handleDrawerClose: () => void;\n progress: number;\n};\n\nexport const QuickstartFooter = ({\n handleDrawerClose,\n progress,\n}: QuickstartFooterProps) => {\n const { t } = useTranslation();\n\n return (\n <Box>\n <LinearProgress variant=\"determinate\" value={progress} />\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n padding: theme => `${theme.spacing(2.5)}`,\n }}\n >\n <Typography sx={{ fontSize: theme => theme.typography.caption }}>\n {progress > 0\n ? t('footer.progress' as any, { progress: progress.toString() })\n : t('footer.notStarted')}\n </Typography>\n <Button onClick={() => handleDrawerClose()}>{t('footer.hide')}</Button>\n </Box>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;AA2BO,MAAM,mBAAmB,CAAC;AAAA,EAC/B,iBAAA;AAAA,EACA;AACF,CAA6B,KAAA;AAC3B,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAE7B,EAAA,4BACG,GACC,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,cAAe,EAAA,EAAA,OAAA,EAAQ,aAAc,EAAA,KAAA,EAAO,QAAU,EAAA,CAAA;AAAA,oBACvD,IAAA;AAAA,MAAC,GAAA;AAAA,MAAA;AAAA,QACC,EAAI,EAAA;AAAA,UACF,OAAS,EAAA,MAAA;AAAA,UACT,UAAY,EAAA,QAAA;AAAA,UACZ,cAAgB,EAAA,eAAA;AAAA,UAChB,SAAS,CAAS,KAAA,KAAA,CAAA,EAAG,KAAM,CAAA,OAAA,CAAQ,GAAG,CAAC,CAAA;AAAA,SACzC;AAAA,QAEA,QAAA,EAAA;AAAA,0BAAC,GAAA,CAAA,UAAA,EAAA,EAAW,IAAI,EAAE,QAAA,EAAU,WAAS,KAAM,CAAA,UAAA,CAAW,OAAQ,EAAA,EAC3D,QAAW,EAAA,QAAA,GAAA,CAAA,GACR,EAAE,iBAA0B,EAAA,EAAE,UAAU,QAAS,CAAA,QAAA,IAAY,CAAA,GAC7D,CAAE,CAAA,mBAAmB,CAC3B,EAAA,CAAA;AAAA,0BACA,GAAA,CAAC,UAAO,OAAS,EAAA,MAAM,mBAAsB,EAAA,QAAA,EAAA,CAAA,CAAE,aAAa,CAAE,EAAA;AAAA;AAAA;AAAA;AAChE,GACF,EAAA,CAAA;AAEJ;;;;"}
@@ -3,8 +3,10 @@ import Box from '@mui/material/Box';
3
3
  import Toolbar from '@mui/material/Toolbar';
4
4
  import Typography from '@mui/material/Typography';
5
5
  import quickstartImage from '../assets/quickstart-image.png';
6
+ import { useTranslation } from '../hooks/useTranslation.esm.js';
6
7
 
7
8
  const QuickstartHeader = () => {
9
+ const { t } = useTranslation();
8
10
  return /* @__PURE__ */ jsxs(
9
11
  Toolbar,
10
12
  {
@@ -33,8 +35,8 @@ const QuickstartHeader = () => {
33
35
  padding: (theme) => `${theme.spacing(3)} 0px`
34
36
  },
35
37
  children: [
36
- /* @__PURE__ */ jsx(Typography, { sx: { fontSize: (theme) => theme.typography.h6 }, children: "Let's get you started with Developer Hub" }),
37
- /* @__PURE__ */ jsx(Typography, { sx: { fontSize: (theme) => theme.typography.caption }, children: "We'll guide you through a few quick steps" })
38
+ /* @__PURE__ */ jsx(Typography, { sx: { fontSize: (theme) => theme.typography.h6 }, children: t("header.title") }),
39
+ /* @__PURE__ */ jsx(Typography, { sx: { fontSize: (theme) => theme.typography.caption }, children: t("header.subtitle") })
38
40
  ]
39
41
  }
40
42
  )
@@ -1 +1 @@
1
- {"version":3,"file":"QuickstartHeader.esm.js","sources":["../../src/components/QuickstartHeader.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 Box from '@mui/material/Box';\nimport Toolbar from '@mui/material/Toolbar';\nimport Typography from '@mui/material/Typography';\nimport quickstartImage from '../assets/quickstart-image.png';\n\nexport const QuickstartHeader = () => {\n return (\n <Toolbar\n sx={{\n justifyContent: 'center',\n display: 'flex',\n flexFlow: 'column',\n }}\n >\n <img\n src={quickstartImage}\n alt=\"\"\n width=\"128px\"\n style={{ backgroundColor: '#f2f2f2' }}\n />\n <Box\n sx={{\n alignItems: 'center',\n display: 'flex',\n flexFlow: 'column',\n padding: theme => `${theme.spacing(3)} 0px`,\n }}\n >\n <Typography sx={{ fontSize: theme => theme.typography.h6 }}>\n Let's get you started with Developer Hub\n </Typography>\n <Typography sx={{ fontSize: theme => theme.typography.caption }}>\n We'll guide you through a few quick steps\n </Typography>\n </Box>\n </Toolbar>\n );\n};\n"],"names":[],"mappings":";;;;;;AAqBO,MAAM,mBAAmB,MAAM;AACpC,EACE,uBAAA,IAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,EAAI,EAAA;AAAA,QACF,cAAgB,EAAA,QAAA;AAAA,QAChB,OAAS,EAAA,MAAA;AAAA,QACT,QAAU,EAAA;AAAA,OACZ;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,GAAK,EAAA,eAAA;AAAA,YACL,GAAI,EAAA,EAAA;AAAA,YACJ,KAAM,EAAA,OAAA;AAAA,YACN,KAAA,EAAO,EAAE,eAAA,EAAiB,SAAU;AAAA;AAAA,SACtC;AAAA,wBACA,IAAA;AAAA,UAAC,GAAA;AAAA,UAAA;AAAA,YACC,EAAI,EAAA;AAAA,cACF,UAAY,EAAA,QAAA;AAAA,cACZ,OAAS,EAAA,MAAA;AAAA,cACT,QAAU,EAAA,QAAA;AAAA,cACV,SAAS,CAAS,KAAA,KAAA,CAAA,EAAG,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAC,CAAA,IAAA;AAAA,aACvC;AAAA,YAEA,QAAA,EAAA;AAAA,8BAAC,GAAA,CAAA,UAAA,EAAA,EAAW,IAAI,EAAE,QAAA,EAAU,WAAS,KAAM,CAAA,UAAA,CAAW,EAAG,EAAA,EAAG,QAE5D,EAAA,0CAAA,EAAA,CAAA;AAAA,8BACA,GAAA,CAAC,UAAW,EAAA,EAAA,EAAA,EAAI,EAAE,QAAA,EAAU,WAAS,KAAM,CAAA,UAAA,CAAW,OAAQ,EAAA,EAAG,QAEjE,EAAA,2CAAA,EAAA;AAAA;AAAA;AAAA;AACF;AAAA;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"QuickstartHeader.esm.js","sources":["../../src/components/QuickstartHeader.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 Box from '@mui/material/Box';\nimport Toolbar from '@mui/material/Toolbar';\nimport Typography from '@mui/material/Typography';\nimport quickstartImage from '../assets/quickstart-image.png';\nimport { useTranslation } from '../hooks/useTranslation';\n\nexport const QuickstartHeader = () => {\n const { t } = useTranslation();\n\n return (\n <Toolbar\n sx={{\n justifyContent: 'center',\n display: 'flex',\n flexFlow: 'column',\n }}\n >\n <img\n src={quickstartImage}\n alt=\"\"\n width=\"128px\"\n style={{ backgroundColor: '#f2f2f2' }}\n />\n <Box\n sx={{\n alignItems: 'center',\n display: 'flex',\n flexFlow: 'column',\n padding: theme => `${theme.spacing(3)} 0px`,\n }}\n >\n <Typography sx={{ fontSize: theme => theme.typography.h6 }}>\n {t('header.title')}\n </Typography>\n <Typography sx={{ fontSize: theme => theme.typography.caption }}>\n {t('header.subtitle')}\n </Typography>\n </Box>\n </Toolbar>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAsBO,MAAM,mBAAmB,MAAM;AACpC,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAE7B,EACE,uBAAA,IAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,EAAI,EAAA;AAAA,QACF,cAAgB,EAAA,QAAA;AAAA,QAChB,OAAS,EAAA,MAAA;AAAA,QACT,QAAU,EAAA;AAAA,OACZ;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,GAAK,EAAA,eAAA;AAAA,YACL,GAAI,EAAA,EAAA;AAAA,YACJ,KAAM,EAAA,OAAA;AAAA,YACN,KAAA,EAAO,EAAE,eAAA,EAAiB,SAAU;AAAA;AAAA,SACtC;AAAA,wBACA,IAAA;AAAA,UAAC,GAAA;AAAA,UAAA;AAAA,YACC,EAAI,EAAA;AAAA,cACF,UAAY,EAAA,QAAA;AAAA,cACZ,OAAS,EAAA,MAAA;AAAA,cACT,QAAU,EAAA,QAAA;AAAA,cACV,SAAS,CAAS,KAAA,KAAA,CAAA,EAAG,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAC,CAAA,IAAA;AAAA,aACvC;AAAA,YAEA,QAAA,EAAA;AAAA,8BAAC,GAAA,CAAA,UAAA,EAAA,EAAW,EAAI,EAAA,EAAE,QAAU,EAAA,CAAA,KAAA,KAAS,KAAM,CAAA,UAAA,CAAW,EAAG,EAAA,EACtD,QAAE,EAAA,CAAA,CAAA,cAAc,CACnB,EAAA,CAAA;AAAA,8BACC,GAAA,CAAA,UAAA,EAAA,EAAW,EAAI,EAAA,EAAE,QAAU,EAAA,CAAA,KAAA,KAAS,KAAM,CAAA,UAAA,CAAW,OAAQ,EAAA,EAC3D,QAAE,EAAA,CAAA,CAAA,iBAAiB,CACtB,EAAA;AAAA;AAAA;AAAA;AACF;AAAA;AAAA,GACF;AAEJ;;;;"}
@@ -0,0 +1,8 @@
1
+ import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
2
+ import '../translations/index.esm.js';
3
+ import { quickstartTranslationRef } from '../translations/ref.esm.js';
4
+
5
+ const useTranslation = () => useTranslationRef(quickstartTranslationRef);
6
+
7
+ export { useTranslation };
8
+ //# sourceMappingURL=useTranslation.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTranslation.esm.js","sources":["../../src/hooks/useTranslation.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 {\n useTranslationRef,\n TranslationFunction,\n} from '@backstage/core-plugin-api/alpha';\nimport { quickstartTranslationRef } from '../translations';\n\nexport const useTranslation = (): {\n t: TranslationFunction<typeof quickstartTranslationRef.T>;\n} => useTranslationRef(quickstartTranslationRef);\n"],"names":[],"mappings":";;;;AAsBa,MAAA,cAAA,GAAiB,MAEzB,iBAAA,CAAkB,wBAAwB;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
3
3
  import { CSSProperties, PropsWithChildren } from 'react';
4
+ import * as _backstage_core_plugin_api_alpha from '@backstage/core-plugin-api/alpha';
4
5
 
5
6
  /**
6
7
  * Props for the QuickstartButton component
@@ -80,5 +81,11 @@ interface QuickstartDrawerContextType {
80
81
  */
81
82
  declare const useQuickstartDrawerContext: () => QuickstartDrawerContextType;
82
83
 
83
- export { QuickstartButton, QuickstartDrawerProvider, quickstartPlugin, useQuickstartDrawerContext };
84
+ /**
85
+ * Translation Resource for Quickstart
86
+ * @public
87
+ */
88
+ declare const quickstartTranslations: _backstage_core_plugin_api_alpha.TranslationResource<"plugin.quickstart">;
89
+
90
+ export { QuickstartButton, QuickstartDrawerProvider, quickstartPlugin, quickstartTranslations, useQuickstartDrawerContext };
84
91
  export type { QuickstartButtonProps, QuickstartDrawerContextType };
package/dist/index.esm.js CHANGED
@@ -1,6 +1,7 @@
1
1
  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
+ export { quickstartTranslations } from './translations/index.esm.js';
4
5
 
5
6
  unstable_ClassNameGenerator.configure((componentName) => {
6
7
  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"],"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 { 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,7 +1,13 @@
1
1
  import { createPlugin, createComponentExtension } from '@backstage/core-plugin-api';
2
+ import './translations/index.esm.js';
3
+ import { quickstartTranslationRef } from './translations/ref.esm.js';
2
4
 
3
5
  const quickstartPlugin = createPlugin({
4
- id: "quickstart"
6
+ id: "quickstart",
7
+ __experimentalTranslations: {
8
+ availableLanguages: ["en", "de", "fr", "es"],
9
+ resources: [quickstartTranslationRef]
10
+ }
5
11
  });
6
12
  const QuickstartDrawerProvider = quickstartPlugin.provide(
7
13
  createComponentExtension({
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.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 {\n createComponentExtension,\n createPlugin,\n} from '@backstage/core-plugin-api';\nimport { PropsWithChildren } from 'react';\nimport { QuickstartButtonProps } from './components/QuickstartButton/QuickstartButton';\n\nexport type { QuickstartButtonProps } from './components/QuickstartButton/QuickstartButton';\n\n/**\n * Quick start plugin\n *\n * @public\n */\nexport const quickstartPlugin = createPlugin({\n id: 'quickstart',\n});\n\n/**\n * Quick start drawer provider\n *\n * @public\n */\nexport const QuickstartDrawerProvider: React.ComponentType<PropsWithChildren> =\n quickstartPlugin.provide(\n createComponentExtension({\n name: 'QuickstartDrawerProvider',\n component: {\n lazy: () =>\n import('./components/QuickstartDrawerProvider').then(\n m => m.QuickstartDrawerProvider,\n ),\n },\n }),\n );\n\n/**\n * Quick start button for global header help dropdown\n *\n * @public\n */\nexport const QuickstartButton: React.ComponentType<QuickstartButtonProps> =\n quickstartPlugin.provide(\n createComponentExtension({\n name: 'QuickstartButton',\n component: {\n lazy: () =>\n import('./components/QuickstartButton/QuickstartButton').then(\n m => m.QuickstartButton,\n ),\n },\n }),\n );\n"],"names":[],"mappings":";;AA8BO,MAAM,mBAAmB,YAAa,CAAA;AAAA,EAC3C,EAAI,EAAA;AACN,CAAC;AAOM,MAAM,2BACX,gBAAiB,CAAA,OAAA;AAAA,EACf,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,0BAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,8CAAuC,CAAE,CAAA,IAAA;AAAA,QAC9C,OAAK,CAAE,CAAA;AAAA;AACT;AACJ,GACD;AACH;AAOK,MAAM,mBACX,gBAAiB,CAAA,OAAA;AAAA,EACf,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,kBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,uDAAgD,CAAE,CAAA,IAAA;AAAA,QACvD,OAAK,CAAE,CAAA;AAAA;AACT;AACJ,GACD;AACH;;;;"}
1
+ {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.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 {\n createComponentExtension,\n createPlugin,\n} from '@backstage/core-plugin-api';\nimport { PropsWithChildren } from 'react';\nimport { QuickstartButtonProps } from './components/QuickstartButton/QuickstartButton';\nimport { quickstartTranslationRef } from './translations';\n\nexport type { QuickstartButtonProps } from './components/QuickstartButton/QuickstartButton';\n\n/**\n * Quick start plugin\n *\n * @public\n */\nexport const quickstartPlugin = createPlugin({\n id: 'quickstart',\n __experimentalTranslations: {\n availableLanguages: ['en', 'de', 'fr', 'es'],\n resources: [quickstartTranslationRef],\n },\n} as any);\n\n/**\n * Quick start drawer provider\n *\n * @public\n */\nexport const QuickstartDrawerProvider: React.ComponentType<PropsWithChildren> =\n quickstartPlugin.provide(\n createComponentExtension({\n name: 'QuickstartDrawerProvider',\n component: {\n lazy: () =>\n import('./components/QuickstartDrawerProvider').then(\n m => m.QuickstartDrawerProvider,\n ),\n },\n }),\n );\n\n/**\n * Quick start button for global header help dropdown\n *\n * @public\n */\nexport const QuickstartButton: React.ComponentType<QuickstartButtonProps> =\n quickstartPlugin.provide(\n createComponentExtension({\n name: 'QuickstartButton',\n component: {\n lazy: () =>\n import('./components/QuickstartButton/QuickstartButton').then(\n m => m.QuickstartButton,\n ),\n },\n }),\n );\n"],"names":[],"mappings":";;;;AA+BO,MAAM,mBAAmB,YAAa,CAAA;AAAA,EAC3C,EAAI,EAAA,YAAA;AAAA,EACJ,0BAA4B,EAAA;AAAA,IAC1B,kBAAoB,EAAA,CAAC,IAAM,EAAA,IAAA,EAAM,MAAM,IAAI,CAAA;AAAA,IAC3C,SAAA,EAAW,CAAC,wBAAwB;AAAA;AAExC,CAAQ;AAOD,MAAM,2BACX,gBAAiB,CAAA,OAAA;AAAA,EACf,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,0BAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,8CAAuC,CAAE,CAAA,IAAA;AAAA,QAC9C,OAAK,CAAE,CAAA;AAAA;AACT;AACJ,GACD;AACH;AAOK,MAAM,mBACX,gBAAiB,CAAA,OAAA;AAAA,EACf,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,kBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,uDAAgD,CAAE,CAAA,IAAA;AAAA,QACvD,OAAK,CAAE,CAAA;AAAA;AACT;AACJ,GACD;AACH;;;;"}
@@ -0,0 +1,36 @@
1
+ import { createTranslationMessages } from '@backstage/core-plugin-api/alpha';
2
+ import { quickstartTranslationRef } from './ref.esm.js';
3
+
4
+ const quickstartTranslationDe = createTranslationMessages({
5
+ ref: quickstartTranslationRef,
6
+ messages: {
7
+ "header.title": "Erste Schritte mit dem Developer Hub",
8
+ "header.subtitle": "Wir f\xFChren Sie durch einige schnelle Schritte",
9
+ "button.quickstart": "Schnellstart",
10
+ "button.openQuickstartGuide": "Schnellstart-Leitfaden \xF6ffnen",
11
+ "button.closeDrawer": "Drawer schlie\xDFen",
12
+ "footer.progress": "{{progress}}% Fortschritt",
13
+ "footer.notStarted": "Nicht begonnen",
14
+ "footer.hide": "Ausblenden",
15
+ "content.emptyState.title": "Schnellstart-Inhalte sind f\xFCr Ihre Rolle nicht verf\xFCgbar.",
16
+ "item.expandAriaLabel": "{{title}} Details erweitern",
17
+ "item.collapseAriaLabel": "{{title}} Details einklappen",
18
+ "item.expandButtonAriaLabel": "Element erweitern",
19
+ "item.collapseButtonAriaLabel": "Element einklappen",
20
+ "dev.pageTitle": "Quickstart Plugin Testseite",
21
+ "dev.pageDescription": "Dies ist eine Testseite f\xFCr das Quickstart-Plugin. Verwenden Sie die Schaltfl\xE4chen unten, um mit dem Quickstart-Drawer zu interagieren.",
22
+ "dev.drawerControls": "Drawer-Steuerungen",
23
+ "dev.currentState": "Aktueller Drawer-Status: {{state}}",
24
+ "dev.stateOpen": "Offen",
25
+ "dev.stateClosed": "Geschlossen",
26
+ "dev.instructions": "Anweisungen",
27
+ "dev.step1": '1. Klicken Sie auf "Schnellstart-Leitfaden \xF6ffnen", um den Drawer zu \xF6ffnen',
28
+ "dev.step2": "2. Navigieren Sie durch die Schnellstart-Schritte",
29
+ "dev.step3": "3. Testen Sie die Fortschrittsverfolgung durch Abschlie\xDFen von Schritten",
30
+ "dev.step4": "4. Der Drawer kann mit der Schlie\xDFen-Schaltfl\xE4che oder den eigenen Steuerelementen des Drawers geschlossen werden",
31
+ "dev.step5": "5. Der Fortschritt wird automatisch in localStorage gespeichert"
32
+ }
33
+ });
34
+
35
+ export { quickstartTranslationDe as default };
36
+ //# sourceMappingURL=de.esm.js.map
@@ -0,0 +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;;;;"}
@@ -0,0 +1,36 @@
1
+ import { createTranslationMessages } from '@backstage/core-plugin-api/alpha';
2
+ import { quickstartTranslationRef } from './ref.esm.js';
3
+
4
+ const quickstartTranslationEs = createTranslationMessages({
5
+ ref: quickstartTranslationRef,
6
+ messages: {
7
+ "header.title": "Comencemos con el Hub del Desarrollador",
8
+ "header.subtitle": "Te guiaremos a trav\xE9s de algunos pasos r\xE1pidos",
9
+ "button.quickstart": "Inicio r\xE1pido",
10
+ "footer.progress": "{{progress}}% de progreso",
11
+ "footer.notStarted": "No iniciado",
12
+ "footer.hide": "Ocultar",
13
+ "content.emptyState.title": "El contenido de inicio r\xE1pido no est\xE1 disponible para tu rol.",
14
+ "item.expandAriaLabel": "Expandir detalles de {{title}}",
15
+ "item.collapseAriaLabel": "Contraer detalles de {{title}}",
16
+ "item.expandButtonAriaLabel": "Expandir elemento",
17
+ "item.collapseButtonAriaLabel": "Contraer elemento",
18
+ "button.openQuickstartGuide": "Abrir gu\xEDa de inicio r\xE1pido",
19
+ "button.closeDrawer": "Cerrar caj\xF3n",
20
+ "dev.pageTitle": "P\xE1gina de prueba del plugin Quickstart",
21
+ "dev.pageDescription": "Esta es una p\xE1gina de prueba para el plugin Quickstart. Use los botones de abajo para interactuar con el caj\xF3n de inicio r\xE1pido.",
22
+ "dev.drawerControls": "Controles del caj\xF3n",
23
+ "dev.currentState": "Estado actual del caj\xF3n: {{state}}",
24
+ "dev.stateOpen": "Abierto",
25
+ "dev.stateClosed": "Cerrado",
26
+ "dev.instructions": "Instrucciones",
27
+ "dev.step1": '1. Haga clic en "Abrir gu\xEDa de inicio r\xE1pido" para abrir el caj\xF3n',
28
+ "dev.step2": "2. Navegue a trav\xE9s de los pasos de inicio r\xE1pido",
29
+ "dev.step3": "3. Pruebe el seguimiento del progreso completando pasos",
30
+ "dev.step4": "4. El caj\xF3n puede cerrarse usando el bot\xF3n de cerrar o los controles propios del caj\xF3n",
31
+ "dev.step5": "5. El progreso se guarda autom\xE1ticamente en localStorage"
32
+ }
33
+ });
34
+
35
+ export { quickstartTranslationEs as default };
36
+ //# sourceMappingURL=es.esm.js.map
@@ -0,0 +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;;;;"}
@@ -0,0 +1,36 @@
1
+ import { createTranslationMessages } from '@backstage/core-plugin-api/alpha';
2
+ import { quickstartTranslationRef } from './ref.esm.js';
3
+
4
+ const quickstartTranslationFr = createTranslationMessages({
5
+ ref: quickstartTranslationRef,
6
+ messages: {
7
+ "header.title": "Commen\xE7ons avec le Hub D\xE9veloppeur",
8
+ "header.subtitle": "Nous vous guiderons \xE0 travers quelques \xE9tapes rapides",
9
+ "button.quickstart": "D\xE9marrage rapide",
10
+ "footer.progress": "{{progress}}% de progression",
11
+ "footer.notStarted": "Pas encore commenc\xE9",
12
+ "footer.hide": "Masquer",
13
+ "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",
21
+ "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",
25
+ "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"
32
+ }
33
+ });
34
+
35
+ export { quickstartTranslationFr as default };
36
+ //# sourceMappingURL=fr.esm.js.map
@@ -0,0 +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;;;;"}
@@ -0,0 +1,14 @@
1
+ import { createTranslationResource } from '@backstage/core-plugin-api/alpha';
2
+ import { quickstartTranslationRef } from './ref.esm.js';
3
+
4
+ const quickstartTranslations = createTranslationResource({
5
+ ref: quickstartTranslationRef,
6
+ translations: {
7
+ de: () => import('./de.esm.js'),
8
+ fr: () => import('./fr.esm.js'),
9
+ es: () => import('./es.esm.js')
10
+ }
11
+ });
12
+
13
+ export { quickstartTranslationRef, quickstartTranslations };
14
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../../src/translations/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 { createTranslationResource } from '@backstage/core-plugin-api/alpha';\nimport { quickstartTranslationRef } from './ref';\n\n/**\n * Translation Resource for Quickstart\n * @public\n */\nexport const quickstartTranslations = createTranslationResource({\n ref: quickstartTranslationRef,\n translations: {\n de: () => import('./de'),\n fr: () => import('./fr'),\n es: () => import('./es'),\n },\n});\n\nexport { quickstartTranslationRef };\n"],"names":[],"mappings":";;;AAuBO,MAAM,yBAAyB,yBAA0B,CAAA;AAAA,EAC9D,GAAK,EAAA,wBAAA;AAAA,EACL,YAAc,EAAA;AAAA,IACZ,EAAA,EAAI,MAAM,OAAO,aAAM,CAAA;AAAA,IACvB,EAAA,EAAI,MAAM,OAAO,aAAM,CAAA;AAAA,IACvB,EAAA,EAAI,MAAM,OAAO,aAAM;AAAA;AAE3B,CAAC;;;;"}
@@ -0,0 +1,50 @@
1
+ import { createTranslationRef } from '@backstage/core-plugin-api/alpha';
2
+
3
+ const quickstartMessages = {
4
+ header: {
5
+ title: "Let's get you started with Developer Hub",
6
+ subtitle: "We'll guide you through a few quick steps"
7
+ },
8
+ button: {
9
+ quickstart: "Quick start",
10
+ openQuickstartGuide: "Open Quickstart Guide",
11
+ closeDrawer: "Close Drawer"
12
+ },
13
+ footer: {
14
+ progress: "{{progress}}% progress",
15
+ notStarted: "Not started",
16
+ hide: "Hide"
17
+ },
18
+ content: {
19
+ emptyState: {
20
+ title: "Quickstart content not available for your role."
21
+ }
22
+ },
23
+ item: {
24
+ expandAriaLabel: "Expand {{title}} details",
25
+ collapseAriaLabel: "Collapse {{title}} details",
26
+ expandButtonAriaLabel: "Expand item",
27
+ collapseButtonAriaLabel: "Collapse item"
28
+ },
29
+ dev: {
30
+ pageTitle: "Quickstart Plugin Test Page",
31
+ pageDescription: "This is a test page for the Quickstart plugin. Use the buttons below to interact with the quickstart drawer.",
32
+ drawerControls: "Drawer Controls",
33
+ currentState: "Current drawer state: {{state}}",
34
+ stateOpen: "Open",
35
+ stateClosed: "Closed",
36
+ instructions: "Instructions",
37
+ step1: '1. Click "Open Quickstart Guide" to open the drawer',
38
+ step2: "2. Navigate through the quickstart steps",
39
+ step3: "3. Test the progress tracking by completing steps",
40
+ step4: "4. The drawer can be closed using the close button or the drawer's own controls",
41
+ step5: "5. Progress is automatically saved to localStorage"
42
+ }
43
+ };
44
+ const quickstartTranslationRef = createTranslationRef({
45
+ id: "plugin.quickstart",
46
+ messages: quickstartMessages
47
+ });
48
+
49
+ export { quickstartMessages, quickstartTranslationRef };
50
+ //# sourceMappingURL=ref.esm.js.map
@@ -0,0 +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;;;;"}
@@ -0,0 +1,9 @@
1
+ const filterQuickstartItemsByRole = (items, userRole) => {
2
+ return items.filter((item) => {
3
+ const roles = item.roles?.length ? item.roles : ["admin"];
4
+ return roles.includes(userRole);
5
+ });
6
+ };
7
+
8
+ export { filterQuickstartItemsByRole };
9
+ //# sourceMappingURL=filterQuickstartItems.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filterQuickstartItems.esm.js","sources":["../../src/utils/filterQuickstartItems.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 { QuickstartItemData } from '../types';\n\nexport const filterQuickstartItemsByRole = (\n items: QuickstartItemData[],\n userRole: string,\n): QuickstartItemData[] => {\n return items.filter(item => {\n // If roles is undefined or empty, default to 'admin'\n const roles = item.roles?.length ? item.roles : ['admin'];\n return roles.includes(userRole);\n });\n};\n"],"names":[],"mappings":"AAkBa,MAAA,2BAAA,GAA8B,CACzC,KAAA,EACA,QACyB,KAAA;AACzB,EAAO,OAAA,KAAA,CAAM,OAAO,CAAQ,IAAA,KAAA;AAE1B,IAAA,MAAM,QAAQ,IAAK,CAAA,KAAA,EAAO,SAAS,IAAK,CAAA,KAAA,GAAQ,CAAC,OAAO,CAAA;AACxD,IAAO,OAAA,KAAA,CAAM,SAAS,QAAQ,CAAA;AAAA,GAC/B,CAAA;AACH;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@red-hat-developer-hub/backstage-plugin-quickstart",
3
- "version": "1.1.1",
3
+ "version": "1.3.0",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",
@@ -32,11 +32,11 @@
32
32
  "postpack": "backstage-cli package postpack"
33
33
  },
34
34
  "dependencies": {
35
- "@backstage/core-components": "^0.17.2",
36
- "@backstage/core-plugin-api": "^1.10.7",
37
- "@backstage/theme": "^0.6.6",
38
- "@mui/icons-material": "5.17.1",
39
- "@mui/material": "5.17.1",
35
+ "@backstage/core-components": "^0.17.4",
36
+ "@backstage/core-plugin-api": "^1.10.9",
37
+ "@backstage/theme": "^0.6.7",
38
+ "@mui/icons-material": "5.18.0",
39
+ "@mui/material": "5.18.0",
40
40
  "@red-hat-developer-hub/backstage-plugin-theme": "^0.9.0",
41
41
  "react-use": "^17.2.4"
42
42
  },
@@ -44,10 +44,10 @@
44
44
  "react": "^16.13.1 || ^17.0.0 || ^18.0.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@backstage/cli": "^0.32.1",
48
- "@backstage/core-app-api": "^1.17.0",
49
- "@backstage/dev-utils": "^1.1.10",
50
- "@backstage/test-utils": "^1.7.8",
47
+ "@backstage/cli": "^0.33.1",
48
+ "@backstage/core-app-api": "^1.18.0",
49
+ "@backstage/dev-utils": "^1.1.12",
50
+ "@backstage/test-utils": "^1.7.10",
51
51
  "@testing-library/jest-dom": "^6.0.0",
52
52
  "@testing-library/react": "^14.0.0",
53
53
  "@testing-library/user-event": "^14.0.0",