@drodil/backstage-plugin-qeta-react 3.50.0 → 3.51.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AnswerCard/AnswerCard.esm.js +9 -3
- package/dist/components/AnswerCard/AnswerCard.esm.js.map +1 -1
- package/dist/components/AnswerForm/AnswerForm.esm.js +6 -1
- package/dist/components/AnswerForm/AnswerForm.esm.js.map +1 -1
- package/dist/components/ArticleContent/ArticleButtons.esm.js +45 -40
- package/dist/components/ArticleContent/ArticleButtons.esm.js.map +1 -1
- package/dist/components/ArticleContent/ArticleContent.esm.js +2 -0
- package/dist/components/ArticleContent/ArticleContent.esm.js.map +1 -1
- package/dist/components/AuthorBox/AuthorBox.esm.js +18 -3
- package/dist/components/AuthorBox/AuthorBox.esm.js.map +1 -1
- package/dist/components/Buttons/FavoriteButton.esm.js +2 -2
- package/dist/components/Buttons/FavoriteButton.esm.js.map +1 -1
- package/dist/components/Buttons/VoteButtons.esm.js +6 -3
- package/dist/components/Buttons/VoteButtons.esm.js.map +1 -1
- package/dist/components/CommentSection/CommentListItem.esm.js +2 -2
- package/dist/components/CommentSection/CommentListItem.esm.js.map +1 -1
- package/dist/components/CommentSection/CommentSection.esm.js +3 -2
- package/dist/components/CommentSection/CommentSection.esm.js.map +1 -1
- package/dist/components/LeftMenu/LeftMenu.esm.js +8 -3
- package/dist/components/LeftMenu/LeftMenu.esm.js.map +1 -1
- package/dist/components/LinkCard/LinkCard.esm.js +43 -38
- package/dist/components/LinkCard/LinkCard.esm.js.map +1 -1
- package/dist/components/Links/Links.esm.js +17 -1
- package/dist/components/Links/Links.esm.js.map +1 -1
- package/dist/components/Modals/DeleteModal.esm.js.map +1 -0
- package/dist/components/Modals/ObsoleteModal.esm.js +94 -0
- package/dist/components/Modals/ObsoleteModal.esm.js.map +1 -0
- package/dist/components/Modals/ValidReviewModal.esm.js +94 -0
- package/dist/components/Modals/ValidReviewModal.esm.js.map +1 -0
- package/dist/components/PostAnonymouslyCheckbox/PostAnonymouslyCheckbox.esm.js +2 -1
- package/dist/components/PostAnonymouslyCheckbox/PostAnonymouslyCheckbox.esm.js.map +1 -1
- package/dist/components/PostForm/PostForm.esm.js +2 -0
- package/dist/components/PostForm/PostForm.esm.js.map +1 -1
- package/dist/components/PostsContainer/PostListItem.esm.js +51 -14
- package/dist/components/PostsContainer/PostListItem.esm.js.map +1 -1
- package/dist/components/PostsGrid/PostsGridItem.esm.js +15 -4
- package/dist/components/PostsGrid/PostsGridItem.esm.js.map +1 -1
- package/dist/components/QuestionCard/QuestionCard.esm.js +42 -37
- package/dist/components/QuestionCard/QuestionCard.esm.js.map +1 -1
- package/dist/components/StatsChart/StatsChart.esm.js +27 -0
- package/dist/components/StatsChart/StatsChart.esm.js.map +1 -1
- package/dist/components/SuggestionsCard/SuggestionsCard.esm.js +2 -2
- package/dist/components/SuggestionsCard/SuggestionsCard.esm.js.map +1 -1
- package/dist/components/TagsGrid/TagGridItem.esm.js +8 -3
- package/dist/components/TagsGrid/TagGridItem.esm.js.map +1 -1
- package/dist/components/TagsGrid/TagsGrid.esm.js +3 -1
- package/dist/components/TagsGrid/TagsGrid.esm.js.map +1 -1
- package/dist/components/TemplateList/TemplateForm.esm.js +3 -0
- package/dist/components/TemplateList/TemplateForm.esm.js.map +1 -1
- package/dist/components/TemplateList/TemplateList.esm.js +3 -0
- package/dist/components/TemplateList/TemplateList.esm.js.map +1 -1
- package/dist/components/Utility/ObsoleteBanner.esm.js +31 -0
- package/dist/components/Utility/ObsoleteBanner.esm.js.map +1 -0
- package/dist/hooks/useCanReview.esm.js +42 -0
- package/dist/hooks/useCanReview.esm.js.map +1 -0
- package/dist/index.d.ts +71 -1
- package/dist/index.esm.js +6 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/routes.esm.js +6 -1
- package/dist/routes.esm.js.map +1 -1
- package/dist/translation.esm.js +61 -1
- package/dist/translation.esm.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/DeleteModal/DeleteModal.esm.js.map +0 -1
- /package/dist/components/{DeleteModal → Modals}/DeleteModal.esm.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateList.esm.js","sources":["../../../src/components/TemplateList/TemplateList.tsx"],"sourcesContent":["import { useIsModerator, useQetaApi } from '../../hooks';\nimport { Progress, WarningPanel } from '@backstage/core-components';\nimport { useEffect, useState } from 'react';\nimport { useApi } from '@backstage/core-plugin-api';\nimport EditIcon from '@material-ui/icons/Edit';\nimport { qetaApiRef } from '../../api';\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport { TemplateForm } from './TemplateForm';\nimport { useNavigate } from 'react-router-dom';\nimport { useLocation } from 'react-use';\nimport {\n Box,\n Button,\n IconButton,\n List,\n ListItem,\n ListItemSecondaryAction,\n ListItemText,\n} from '@material-ui/core';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { qetaTranslationRef } from '../../translation.ts';\n\nexport const TemplateList = () => {\n const { isModerator } = useIsModerator();\n\n const [mode, setMode] = useState<'list' | 'create' | 'edit'>('list');\n const [id, setId] = useState<number | undefined>(undefined);\n const qetaApi = useApi(qetaApiRef);\n const navigate = useNavigate();\n const { hash } = useLocation();\n const { value, loading, error, retry } = useQetaApi(api =>\n api.getTemplates(),\n );\n const { t } = useTranslationRef(qetaTranslationRef);\n\n useEffect(() => {\n const [, hashMode] = (hash ?? '').split(':');\n if (hashMode === 'new') {\n setMode('create');\n } else {\n const hashId = parseInt(hashMode, 10);\n if (!isNaN(hashId)) {\n setId(hashId);\n setMode('edit');\n } else {\n setMode('list');\n }\n }\n }, [hash]);\n\n if (!isModerator) {\n return null;\n }\n\n const onDelete = (templateId: number) => {\n qetaApi.deleteTemplate(templateId).then(() => retry());\n };\n\n if (loading) {\n return <Progress />;\n }\n\n if (error || value === undefined) {\n return (\n <WarningPanel severity=\"error\" title={t('templateList.errorLoading')}>\n {error?.message}\n </WarningPanel>\n );\n }\n\n if (mode === 'create' || mode === 'edit') {\n return (\n <TemplateForm\n onPost={() => {\n retry();\n navigate('#template:list');\n }}\n id={id}\n />\n );\n }\n\n return (\n <>\n <Button\n variant=\"contained\"\n color=\"primary\"\n onClick={() => {\n navigate('#template:new');\n }}\n >\n Create New Template\n </Button>\n <Box\n sx={{ width: '100%', bgcolor: 'background.paper', marginTop: '1em' }}\n >\n <List style={{ width: '100%' }}>\n {value.total === 0 && (\n <ListItem>\n <ListItemText\n primary={t('templateList.noTemplates')}\n secondary={t('templateList.noTemplatesDescription')}\n />\n </ListItem>\n )}\n {value.templates.map((template, index) => (\n <ListItem key={index}>\n <ListItemText\n primary={template.title}\n secondary={template.description}\n />\n <ListItemSecondaryAction>\n <IconButton\n onClick={() => {\n navigate(`#template:${template.id}`);\n }}\n >\n <EditIcon />\n </IconButton>\n <IconButton onClick={() => onDelete(template.id)}>\n <DeleteIcon />\n </IconButton>\n </ListItemSecondaryAction>\n </ListItem>\n ))}\n </List>\n </Box>\n </>\n );\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TemplateList.esm.js","sources":["../../../src/components/TemplateList/TemplateList.tsx"],"sourcesContent":["import { useIsModerator, useQetaApi } from '../../hooks';\nimport { Progress, WarningPanel } from '@backstage/core-components';\nimport { useEffect, useState } from 'react';\nimport { useApi } from '@backstage/core-plugin-api';\nimport EditIcon from '@material-ui/icons/Edit';\nimport { qetaApiRef } from '../../api';\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport { TemplateForm } from './TemplateForm';\nimport { useNavigate } from 'react-router-dom';\nimport { useLocation } from 'react-use';\nimport {\n Box,\n Button,\n IconButton,\n List,\n ListItem,\n ListItemSecondaryAction,\n ListItemText,\n} from '@material-ui/core';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { qetaTranslationRef } from '../../translation.ts';\n\nexport const TemplateList = () => {\n const { isModerator } = useIsModerator();\n\n const [mode, setMode] = useState<'list' | 'create' | 'edit'>('list');\n const [id, setId] = useState<number | undefined>(undefined);\n const qetaApi = useApi(qetaApiRef);\n const navigate = useNavigate();\n const { hash } = useLocation();\n const { value, loading, error, retry } = useQetaApi(api =>\n api.getTemplates(),\n );\n const { t } = useTranslationRef(qetaTranslationRef);\n\n useEffect(() => {\n const [, hashMode] = (hash ?? '').split(':');\n if (hashMode === 'new') {\n setMode('create');\n } else {\n const hashId = parseInt(hashMode, 10);\n if (!isNaN(hashId)) {\n setId(hashId);\n setMode('edit');\n } else {\n setMode('list');\n }\n }\n }, [hash]);\n\n if (!isModerator) {\n return null;\n }\n\n const onDelete = (templateId: number) => {\n qetaApi.deleteTemplate(templateId).then(() => retry());\n };\n\n if (loading) {\n return <Progress />;\n }\n\n if (error || value === undefined) {\n return (\n <WarningPanel severity=\"error\" title={t('templateList.errorLoading')}>\n {error?.message}\n </WarningPanel>\n );\n }\n\n if (mode === 'create' || mode === 'edit') {\n return (\n <TemplateForm\n onPost={() => {\n retry();\n navigate('#template:list');\n }}\n id={id}\n />\n );\n }\n\n return (\n <>\n <Button\n variant=\"contained\"\n color=\"primary\"\n onClick={() => {\n navigate('#template:new');\n }}\n >\n Create New Template\n </Button>\n <Box\n sx={{ width: '100%', bgcolor: 'background.paper', marginTop: '1em' }}\n >\n <List style={{ width: '100%' }}>\n {value.total === 0 && (\n <ListItem>\n <ListItemText\n primary={t('templateList.noTemplates')}\n secondary={t('templateList.noTemplatesDescription')}\n />\n </ListItem>\n )}\n {value.templates.map((template, index) => (\n <ListItem key={index}>\n <ListItemText\n primary={template.title}\n secondary={template.description}\n />\n <ListItemSecondaryAction>\n <IconButton\n onClick={() => {\n navigate(`#template:${template.id}`);\n }}\n >\n <EditIcon />\n </IconButton>\n <IconButton onClick={() => onDelete(template.id)}>\n <DeleteIcon />\n </IconButton>\n </ListItemSecondaryAction>\n </ListItem>\n ))}\n </List>\n </Box>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsBO,MAAM,eAAe,MAAM;AAChC,EAAM,MA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,cACrC,SAAA,EAAW,EAAE,qCAAqC;AAAA;AAAA,WAEtD,EAAA,CAAA;AAAA,UAED,MAAM,SAAU,CAAA,GAAA,CAAI,CAAC,QAAU,EAAA,KAAA,0BAC7B,QACC,EAAA,EAAA,QAAA,EAAA;AAAA,4BAAA,GAAA;AAAA,cAAC,YAAA;AAAA,cAAA;AAAA,gBACC,SAAS,QAAS,CAAA,KAAA;AAAA,gBAClB,WAAW,QAAS,CAAA;AAAA;AAAA,aACtB;AAAA,iCACC,uBACC,EAAA,EAAA,QAAA,EAAA;AAAA,8BAAA,GAAA;AAAA,gBAAC,UAAA;AAAA,gBAAA;AAAA,kBACC,SAAS,MAAM;AACb,oBAAS,QAAA,CAAA,CAAA,UAAA,EAAa,QAAS,CAAA,EAAE,CAAE,CAAA,CAAA;AAAA,mBACrC;AAAA,kBAEA,8BAAC,QAAS,EAAA,EAAA;AAAA;AAAA,eACZ;AAAA,8BACA,GAAA,CAAC,UAAW,EAAA,EAAA,OAAA,EAAS,MAAM,QAAA,CAAS,SAAS,EAAE,CAAA,EAC7C,QAAC,kBAAA,GAAA,CAAA,UAAA,EAAA,EAAW,CACd,EAAA;AAAA,aACF,EAAA;AAAA,WAAA,EAAA,EAhBa,KAiBf,CACD;AAAA,SACH,EAAA;AAAA;AAAA;AACF,GACF,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { makeStyles, Paper, Typography } from '@material-ui/core';
|
|
3
|
+
import WarningIcon from '@material-ui/icons/Warning';
|
|
4
|
+
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
5
|
+
import { qetaTranslationRef } from '../../translation.esm.js';
|
|
6
|
+
|
|
7
|
+
const useStyles = makeStyles(
|
|
8
|
+
(theme) => ({
|
|
9
|
+
obsoleteBanner: {
|
|
10
|
+
backgroundColor: theme.palette.warning.main,
|
|
11
|
+
color: theme.palette.warning.contrastText,
|
|
12
|
+
padding: "8px 16px",
|
|
13
|
+
marginBottom: "16px",
|
|
14
|
+
display: "flex",
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
gap: "8px"
|
|
17
|
+
}
|
|
18
|
+
}),
|
|
19
|
+
{ name: "QetaObsoleteBanner" }
|
|
20
|
+
);
|
|
21
|
+
const ObsoleteBanner = () => {
|
|
22
|
+
const styles = useStyles();
|
|
23
|
+
const { t } = useTranslationRef(qetaTranslationRef);
|
|
24
|
+
return /* @__PURE__ */ jsxs(Paper, { className: styles.obsoleteBanner, elevation: 0, children: [
|
|
25
|
+
/* @__PURE__ */ jsx(WarningIcon, { fontSize: "small" }),
|
|
26
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: t("questionPage.obsoleteStatus") })
|
|
27
|
+
] });
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { ObsoleteBanner };
|
|
31
|
+
//# sourceMappingURL=ObsoleteBanner.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObsoleteBanner.esm.js","sources":["../../../src/components/Utility/ObsoleteBanner.tsx"],"sourcesContent":["import { makeStyles, Paper, Typography } from '@material-ui/core';\nimport WarningIcon from '@material-ui/icons/Warning';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { qetaTranslationRef } from '../../translation.ts';\n\nconst useStyles = makeStyles(\n theme => ({\n obsoleteBanner: {\n backgroundColor: theme.palette.warning.main,\n color: theme.palette.warning.contrastText,\n padding: '8px 16px',\n marginBottom: '16px',\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n },\n }),\n { name: 'QetaObsoleteBanner' },\n);\n\nexport const ObsoleteBanner = () => {\n const styles = useStyles();\n const { t } = useTranslationRef(qetaTranslationRef);\n\n return (\n <Paper className={styles.obsoleteBanner} elevation={0}>\n <WarningIcon fontSize=\"small\" />\n <Typography variant=\"body2\">\n {t('questionPage.obsoleteStatus')}\n </Typography>\n </Paper>\n );\n};\n"],"names":[],"mappings":";;;;;;AAKA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB,CAAU,KAAA,MAAA;AAAA,IACR,cAAgB,EAAA;AAAA,MACd,eAAA,EAAiB,KAAM,CAAA,OAAA,CAAQ,OAAQ,CAAA,IAAA;AAAA,MACvC,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,OAAQ,CAAA,YAAA;AAAA,MAC7B,OAAS,EAAA,UAAA;AAAA,MACT,YAAc,EAAA,MAAA;AAAA,MACd,OAAS,EAAA,MAAA;AAAA,MACT,UAAY,EAAA,QAAA;AAAA,MACZ,GAAK,EAAA;AAAA;AACP,GACF,CAAA;AAAA,EACA,EAAE,MAAM,oBAAqB;AAC/B,CAAA;AAEO,MAAM,iBAAiB,MAAM;AAClC,EAAA,MAAM,SAAS,SAAU,EAAA;AACzB,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,kBAAkB,CAAA;AAElD,EAAA,4BACG,KAAM,EAAA,EAAA,SAAA,EAAW,MAAO,CAAA,cAAA,EAAgB,WAAW,CAClD,EAAA,QAAA,EAAA;AAAA,oBAAC,GAAA,CAAA,WAAA,EAAA,EAAY,UAAS,OAAQ,EAAA,CAAA;AAAA,wBAC7B,UAAW,EAAA,EAAA,OAAA,EAAQ,OACjB,EAAA,QAAA,EAAA,CAAA,CAAE,6BAA6B,CAClC,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { useApi, configApiRef } from '@backstage/core-plugin-api';
|
|
2
|
+
import { useState, useMemo, useEffect } from 'react';
|
|
3
|
+
import { permissionApiRef } from '@backstage/plugin-permission-react';
|
|
4
|
+
import { qetaCreatePostReviewPermission, qetaReadPostReviewPermission } from '@drodil/backstage-plugin-qeta-common';
|
|
5
|
+
import { AuthorizeResult } from '@backstage/plugin-permission-common';
|
|
6
|
+
import { useIsModerator } from './useIsModerator.esm.js';
|
|
7
|
+
|
|
8
|
+
const useCanReview = () => {
|
|
9
|
+
const configApi = useApi(configApiRef);
|
|
10
|
+
const permissionApi = useApi(permissionApiRef);
|
|
11
|
+
const { isModerator } = useIsModerator();
|
|
12
|
+
const [canReview, setCanReview] = useState(false);
|
|
13
|
+
const [canRead, setCanRead] = useState(false);
|
|
14
|
+
const [loading, setLoading] = useState(true);
|
|
15
|
+
const usePermissions = useMemo(
|
|
16
|
+
() => configApi.getOptionalBoolean("qeta.permissions") ?? false,
|
|
17
|
+
[configApi]
|
|
18
|
+
);
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
if (usePermissions) {
|
|
21
|
+
permissionApi.authorize({ permission: qetaCreatePostReviewPermission }).then((resp) => {
|
|
22
|
+
setCanReview(resp.result === AuthorizeResult.ALLOW);
|
|
23
|
+
}).catch(() => {
|
|
24
|
+
setCanReview(false);
|
|
25
|
+
});
|
|
26
|
+
permissionApi.authorize({ permission: qetaReadPostReviewPermission }).then((resp) => {
|
|
27
|
+
setCanRead(resp.result === AuthorizeResult.ALLOW);
|
|
28
|
+
}).catch(() => {
|
|
29
|
+
setCanRead(false);
|
|
30
|
+
});
|
|
31
|
+
setLoading(false);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
setCanReview(isModerator);
|
|
35
|
+
setCanRead(isModerator);
|
|
36
|
+
setLoading(false);
|
|
37
|
+
}, [isModerator, permissionApi, usePermissions]);
|
|
38
|
+
return { canReview, canRead, loading };
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export { useCanReview };
|
|
42
|
+
//# sourceMappingURL=useCanReview.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCanReview.esm.js","sources":["../../src/hooks/useCanReview.ts"],"sourcesContent":["import { configApiRef, useApi } from '@backstage/core-plugin-api';\nimport { useEffect, useMemo, useState } from 'react';\nimport { permissionApiRef } from '@backstage/plugin-permission-react';\nimport {\n qetaCreatePostReviewPermission,\n qetaReadPostReviewPermission,\n} from '@drodil/backstage-plugin-qeta-common';\nimport { AuthorizeResult } from '@backstage/plugin-permission-common';\nimport { useIsModerator } from './useIsModerator';\n\nexport const useCanReview = () => {\n const configApi = useApi(configApiRef);\n const permissionApi = useApi(permissionApiRef);\n const { isModerator } = useIsModerator();\n const [canReview, setCanReview] = useState(false);\n const [canRead, setCanRead] = useState(false);\n const [loading, setLoading] = useState(true);\n\n const usePermissions = useMemo(\n () => configApi.getOptionalBoolean('qeta.permissions') ?? false,\n [configApi],\n );\n\n useEffect(() => {\n if (usePermissions) {\n permissionApi\n .authorize({ permission: qetaCreatePostReviewPermission })\n .then(resp => {\n setCanReview(resp.result === AuthorizeResult.ALLOW);\n })\n .catch(() => {\n setCanReview(false);\n });\n permissionApi\n .authorize({ permission: qetaReadPostReviewPermission })\n .then(resp => {\n setCanRead(resp.result === AuthorizeResult.ALLOW);\n })\n .catch(() => {\n setCanRead(false);\n });\n setLoading(false);\n return;\n }\n\n setCanReview(isModerator);\n setCanRead(isModerator);\n setLoading(false);\n }, [isModerator, permissionApi, usePermissions]);\n\n return { canReview, canRead, loading };\n};\n"],"names":[],"mappings":";;;;;;;AAUO,MAAM,eAAe,MAAM;AAChC,EAAM,MAAA,SAAA,GAAY,OAAO,YAAY,CAAA;AACrC,EAAM,MAAA,aAAA,GAAgB,OAAO,gBAAgB,CAAA;AAC7C,EAAM,MAAA,EAAE,WAAY,EAAA,GAAI,cAAe,EAAA;AACvC,EAAA,MAAM,CAAC,SAAA,EAAW,YAAY,CAAA,GAAI,SAAS,KAAK,CAAA;AAChD,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,SAAS,KAAK,CAAA;AAC5C,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,SAAS,IAAI,CAAA;AAE3C,EAAA,MAAM,cAAiB,GAAA,OAAA;AAAA,IACrB,MAAM,SAAA,CAAU,kBAAmB,CAAA,kBAAkB,CAAK,IAAA,KAAA;AAAA,IAC1D,CAAC,SAAS;AAAA,GACZ;AAEA,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,cAAgB,EAAA;AAClB,MAAA,aAAA,CACG,UAAU,EAAE,UAAA,EAAY,gCAAgC,CAAA,CACxD,KAAK,CAAQ,IAAA,KAAA;AACZ,QAAa,YAAA,CAAA,IAAA,CAAK,MAAW,KAAA,eAAA,CAAgB,KAAK,CAAA;AAAA,OACnD,CACA,CAAA,KAAA,CAAM,MAAM;AACX,QAAA,YAAA,CAAa,KAAK,CAAA;AAAA,OACnB,CAAA;AACH,MAAA,aAAA,CACG,UAAU,EAAE,UAAA,EAAY,8BAA8B,CAAA,CACtD,KAAK,CAAQ,IAAA,KAAA;AACZ,QAAW,UAAA,CAAA,IAAA,CAAK,MAAW,KAAA,eAAA,CAAgB,KAAK,CAAA;AAAA,OACjD,CACA,CAAA,KAAA,CAAM,MAAM;AACX,QAAA,UAAA,CAAW,KAAK,CAAA;AAAA,OACjB,CAAA;AACH,MAAA,UAAA,CAAW,KAAK,CAAA;AAChB,MAAA;AAAA;AAGF,IAAA,YAAA,CAAa,WAAW,CAAA;AACxB,IAAA,UAAA,CAAW,WAAW,CAAA;AACtB,IAAA,UAAA,CAAW,KAAK,CAAA;AAAA,GACf,EAAA,CAAC,WAAa,EAAA,aAAA,EAAe,cAAc,CAAC,CAAA;AAE/C,EAAO,OAAA,EAAE,SAAW,EAAA,OAAA,EAAS,OAAQ,EAAA;AACvC;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ declare const tagRouteRef: _backstage_core_plugin_api.SubRouteRef<_backstage_cor
|
|
|
40
40
|
declare const entitiesRouteRef: _backstage_core_plugin_api.SubRouteRef<undefined>;
|
|
41
41
|
declare const entityRouteRef: _backstage_core_plugin_api.SubRouteRef<_backstage_core_plugin_api.PathParams<"/entities/:entityRef">>;
|
|
42
42
|
declare const moderatorRouteRef: _backstage_core_plugin_api.SubRouteRef<undefined>;
|
|
43
|
+
declare const reviewRouteRef: _backstage_core_plugin_api.SubRouteRef<undefined>;
|
|
43
44
|
|
|
44
45
|
declare const qetaApiRef: _backstage_frontend_plugin_api.ApiRef<QetaApi>;
|
|
45
46
|
|
|
@@ -306,6 +307,20 @@ declare const DeleteModal: (props: {
|
|
|
306
307
|
onDelete?: (entity: PostResponse | AnswerResponse | CollectionResponse | TagResponse) => void;
|
|
307
308
|
}) => react_jsx_runtime.JSX.Element;
|
|
308
309
|
|
|
310
|
+
declare const ObsoleteModal: (props: {
|
|
311
|
+
post: PostResponse;
|
|
312
|
+
open: boolean;
|
|
313
|
+
onClose: () => void;
|
|
314
|
+
onConfirm?: () => void;
|
|
315
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
316
|
+
|
|
317
|
+
declare const ValidReviewModal: (props: {
|
|
318
|
+
post: PostResponse;
|
|
319
|
+
open: boolean;
|
|
320
|
+
onClose: () => void;
|
|
321
|
+
onConfirm?: () => void;
|
|
322
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
323
|
+
|
|
309
324
|
type AnswerCardClassKeys = 'root' | 'highlight' | 'buttons' | 'metadata' | 'markdownContainer' | 'contentContainer';
|
|
310
325
|
declare const AnswerCard: (props: {
|
|
311
326
|
answer: AnswerResponse;
|
|
@@ -348,6 +363,7 @@ declare const UserLink: (props: {
|
|
|
348
363
|
entityRef: string;
|
|
349
364
|
anonymous?: boolean;
|
|
350
365
|
linkProps?: LinkProps;
|
|
366
|
+
noLink?: boolean;
|
|
351
367
|
}) => react_jsx_runtime.JSX.Element;
|
|
352
368
|
declare const AuthorLink: (props: {
|
|
353
369
|
entity: Post | Answer | Comment;
|
|
@@ -497,6 +513,8 @@ declare const DeletedBanner: () => react_jsx_runtime.JSX.Element;
|
|
|
497
513
|
|
|
498
514
|
declare const DraftBanner: () => react_jsx_runtime.JSX.Element;
|
|
499
515
|
|
|
516
|
+
declare const ObsoleteBanner: () => react_jsx_runtime.JSX.Element;
|
|
517
|
+
|
|
500
518
|
interface StatusChipProps {
|
|
501
519
|
status?: string;
|
|
502
520
|
className?: string;
|
|
@@ -620,6 +638,12 @@ declare const useAI: () => {
|
|
|
620
638
|
summarizeArticle: (articleId: number, options?: AIQuery) => Promise<_drodil_backstage_plugin_qeta_common.AIResponse | null>;
|
|
621
639
|
};
|
|
622
640
|
|
|
641
|
+
declare const useCanReview: () => {
|
|
642
|
+
canReview: boolean;
|
|
643
|
+
canRead: boolean;
|
|
644
|
+
loading: boolean;
|
|
645
|
+
};
|
|
646
|
+
|
|
623
647
|
/** @alpha */
|
|
624
648
|
declare const qetaTranslationRef: _backstage_frontend_plugin_api.TranslationRef<"qeta", {
|
|
625
649
|
readonly "answer.questionTitle": "Q: {{question}}";
|
|
@@ -657,6 +681,7 @@ declare const qetaTranslationRef: _backstage_frontend_plugin_api.TranslationRef<
|
|
|
657
681
|
readonly "common.post": "post";
|
|
658
682
|
readonly "common.collection": "collection";
|
|
659
683
|
readonly "common.favorite": "Favorite";
|
|
684
|
+
readonly "common.obsolete": "Obsolete";
|
|
660
685
|
readonly "common.question": "question";
|
|
661
686
|
readonly "common.article": "article";
|
|
662
687
|
readonly "common.link": "link";
|
|
@@ -864,6 +889,20 @@ declare const qetaTranslationRef: _backstage_frontend_plugin_api.TranslationRef<
|
|
|
864
889
|
readonly "deleteModal.articleDeleted": "Article deleted";
|
|
865
890
|
readonly "deleteModal.answerDeleted": "Answer deleted";
|
|
866
891
|
readonly "deleteModal.linkDeleted": "Link deleted";
|
|
892
|
+
readonly "obsoleteModal.comment": "Comment (optional)";
|
|
893
|
+
readonly "obsoleteModal.title": "Mark post as obsolete";
|
|
894
|
+
readonly "obsoleteModal.description": "Marking a post as obsolete indicates that the content is outdated and no longer relevant. Obsolete posts cannot be edited or receive new answers.";
|
|
895
|
+
readonly "obsoleteModal.cancelButton": "Cancel";
|
|
896
|
+
readonly "obsoleteModal.confirmButton": "Mark as obsolete";
|
|
897
|
+
readonly "obsoleteModal.errorMarking": "Failed to mark as obsolete";
|
|
898
|
+
readonly "obsoleteModal.success": "Post marked as obsolete";
|
|
899
|
+
readonly "validReviewModal.comment": "Comment (optional)";
|
|
900
|
+
readonly "validReviewModal.title": "Mark post as valid";
|
|
901
|
+
readonly "validReviewModal.description": "Confirming this post is still valid indicates that the content is up-to-date and relevant. This will reset the review timer.";
|
|
902
|
+
readonly "validReviewModal.cancelButton": "Cancel";
|
|
903
|
+
readonly "validReviewModal.confirmButton": "Confirm valid";
|
|
904
|
+
readonly "validReviewModal.errorMarking": "Failed to mark as valid";
|
|
905
|
+
readonly "validReviewModal.success": "Post marked as valid";
|
|
867
906
|
readonly "favoritePage.title": "Favorited posts";
|
|
868
907
|
readonly "leftMenu.tags": "Tags";
|
|
869
908
|
readonly "leftMenu.entities": "Entities";
|
|
@@ -875,6 +914,7 @@ declare const qetaTranslationRef: _backstage_frontend_plugin_api.TranslationRef<
|
|
|
875
914
|
readonly "leftMenu.questions": "Questions";
|
|
876
915
|
readonly "leftMenu.articles": "Articles";
|
|
877
916
|
readonly "leftMenu.moderate": "Moderate";
|
|
917
|
+
readonly "leftMenu.review": "Review";
|
|
878
918
|
readonly "leftMenu.manage": "Manage";
|
|
879
919
|
readonly "leftMenu.buttonLabel": "Menu";
|
|
880
920
|
readonly "leftMenu.home": "Home";
|
|
@@ -940,6 +980,7 @@ declare const qetaTranslationRef: _backstage_frontend_plugin_api.TranslationRef<
|
|
|
940
980
|
readonly "rightMenu.followedCollections": "Followed collections";
|
|
941
981
|
readonly "rightMenu.followedUsers": "Followed users";
|
|
942
982
|
readonly "rightMenu.similarQuestions": "Similar questions";
|
|
983
|
+
readonly "rightMenu.similarPosts": "Similar posts";
|
|
943
984
|
readonly "highlights.loadError": "Failed to load questions";
|
|
944
985
|
readonly "highlights.own.title": "Your latest questions";
|
|
945
986
|
readonly "highlights.own.noQuestionsLabel": "No questions";
|
|
@@ -1001,6 +1042,8 @@ declare const qetaTranslationRef: _backstage_frontend_plugin_api.TranslationRef<
|
|
|
1001
1042
|
readonly "questionPage.restoreButton": "Restore";
|
|
1002
1043
|
readonly "questionPage.draftStatus": "This is a draft post. Please edit and publish it to make it visible to others.";
|
|
1003
1044
|
readonly "questionPage.deletedStatus": "This post has been deleted. You can delete it permanently or restore it.";
|
|
1045
|
+
readonly "questionPage.obsoleteTitle": "Obsolete Content";
|
|
1046
|
+
readonly "questionPage.obsoleteStatus": "This post has been marked as obsolete. It may contain outdated information. Commenting and answering are disabled.";
|
|
1004
1047
|
readonly "questionPage.answerButton": "Answer";
|
|
1005
1048
|
readonly "questionPage.sortAnswers.default": "Default";
|
|
1006
1049
|
readonly "questionPage.sortAnswers.label": "Sort answers";
|
|
@@ -1164,6 +1207,9 @@ declare const qetaTranslationRef: _backstage_frontend_plugin_api.TranslationRef<
|
|
|
1164
1207
|
readonly "stats.totalUsers": "Total users";
|
|
1165
1208
|
readonly "stats.totalTags": "Total tags";
|
|
1166
1209
|
readonly "stats.totalFollowers": "Total followers";
|
|
1210
|
+
readonly "stats.answerScore": "Answer score";
|
|
1211
|
+
readonly "stats.postScore": "Post score";
|
|
1212
|
+
readonly "stats.correctAnswers": "Correct answers";
|
|
1167
1213
|
readonly "collectionButton.follow": "Follow";
|
|
1168
1214
|
readonly "collectionButton.tooltip": "By following a collection, you will get notified when ever a new post is added to the collection";
|
|
1169
1215
|
readonly "collectionButton.unfollow": "Unfollow";
|
|
@@ -1180,6 +1226,30 @@ declare const qetaTranslationRef: _backstage_frontend_plugin_api.TranslationRef<
|
|
|
1180
1226
|
readonly "userButton.unfollow": "Unfollow";
|
|
1181
1227
|
readonly "viewToggle.listView": "List View";
|
|
1182
1228
|
readonly "viewToggle.gridView": "Grid View";
|
|
1229
|
+
readonly "contentHealth.obsolete": "Obsolete";
|
|
1230
|
+
readonly "contentHealth.valid": "Valid";
|
|
1231
|
+
readonly "contentHealth.description": "This content has been marked as potentially outdated. Please review it and mark it as valid or obsolete.";
|
|
1232
|
+
readonly "contentHealth.cardTitle": "Content Health";
|
|
1233
|
+
readonly "contentHealth.healthScore": "Health Score: {{score}}%";
|
|
1234
|
+
readonly "contentHealth.obsoleteWarning": "This content has been marked as obsolete.";
|
|
1235
|
+
readonly "contentHealth.markValid": "Mark as Valid";
|
|
1236
|
+
readonly "contentHealth.markObsolete": "Mark as Obsolete";
|
|
1237
|
+
readonly "contentHealth.reviewHistory": "Review History";
|
|
1238
|
+
readonly "reviewPage.title": "Review";
|
|
1239
|
+
readonly "reviewPage.description": "Review posts that are possibly outdated.";
|
|
1240
|
+
readonly "reviewPage.dialog.title": "Mark Post as Obsolete";
|
|
1241
|
+
readonly "reviewPage.dialog.cancel": "Cancel";
|
|
1242
|
+
readonly "reviewPage.dialog.commentLabel": "Comment (Optional)";
|
|
1243
|
+
readonly "reviewPage.dialog.confirm": "Mark as Obsolete";
|
|
1244
|
+
readonly "reviewPage.table.author": "Author";
|
|
1245
|
+
readonly "reviewPage.table.score": "Health Score";
|
|
1246
|
+
readonly "reviewPage.table.created": "Created";
|
|
1247
|
+
readonly "reviewPage.table.title": "Title";
|
|
1248
|
+
readonly "reviewPage.table.healthScore": "Health";
|
|
1249
|
+
readonly "reviewPage.table.actions": "Actions";
|
|
1250
|
+
readonly "reviewPage.errorLoading": "Could not load posts for review";
|
|
1251
|
+
readonly "reviewPage.actions.markValid": "Mark Valid";
|
|
1252
|
+
readonly "reviewPage.actions.markObsolete": "Mark Obsolete";
|
|
1183
1253
|
}>;
|
|
1184
1254
|
declare const qetaTranslations: _backstage_frontend_plugin_api.TranslationResource<"qeta">;
|
|
1185
1255
|
|
|
@@ -1215,4 +1285,4 @@ type QetaOverrides = Overrides & {
|
|
|
1215
1285
|
[Name in keyof QetaComponentsNameToClassKey]?: Partial<StyleRules<QetaComponentsNameToClassKey[Name]>>;
|
|
1216
1286
|
};
|
|
1217
1287
|
|
|
1218
|
-
export { AIAnswerCard, AddToCollectionButton, AnswerCard, AnswerForm, AnswerList, AnswerListItem, AnswersContainer, ArticleContent, AskQuestionButton, AuthorLink, BadgeChip, ButtonContainer, CollectionFollowButton, CollectionForm, CollectionsGrid, ContentHeader, ContentHeaderButton, ContentHeaderCard, type ContentHeaderCardProps, type ContentHeaderProps, CreateCollectionButton, CreateLinkButton, DeleteModal, DeletedBanner, DraftBanner, EntitiesGrid, EntityFollowButton, FaviconItem, FilterPanel, FollowedCollectionsList, FollowedEntitiesList, FollowedTagsList, FollowedUsersList, ImpactCard, LeftMenu, LeftMenuButton, LinkCard, MarkdownRenderer, OpenLinkButton, PostForm, type PostGridProps, PostHighlightList, PostHighlightListContainer, PostHighlightListContent, PostList, PostListItem, PostsCard, PostsContainer, type PostsContainerProps, PostsGrid, PostsTable, QetaContext, type QetaContextProps, type QetaOverrides, QetaProvider, QuestionCard, type QuestionFormValues, QuestionsTable, RelativeTimeWithTooltip, SelectTemplateList, StatsChart, StatusChip, SuggestionsCard, type TagAndEntitiesFormValues, TagFollowButton, TagsGrid, type TemplateFormValues, TemplateList, TopRankingUsers, TrophyIcon, UpdatedByLink, UserBadges, UserFollowButton, UserLink, UsersGrid, ViewToggle, type ViewType, WriteArticleButton, articleRouteRef, articlesRouteRef, askRouteRef, collectionCreateRouteRef, collectionEditRouteRef, collectionRouteRef, collectionsRouteRef, createLinkRouteRef, editArticleRouteRef, editLinkRouteRef, editQuestionRouteRef, entitiesRouteRef, entityRouteRef, favoriteQuestionsRouteRef, linkRouteRef, linksRouteRef, moderatorRouteRef, qetaApiRef, qetaRouteRef, qetaTranslationRef, qetaTranslations, questionRouteRef, questionsRouteRef, statisticsRouteRef, tagRouteRef, tagsRouteRef, useAI, useCollectionsFollow, useEntityAuthor, useEntityFollow, useIdentityApi, useIsModerator, useQetaApi, useQetaContext, useTagsFollow, useUserFollow, useUserInfo, userRouteRef, usersRouteRef, writeRouteRef };
|
|
1288
|
+
export { AIAnswerCard, AddToCollectionButton, AnswerCard, AnswerForm, AnswerList, AnswerListItem, AnswersContainer, ArticleContent, AskQuestionButton, AuthorLink, BadgeChip, ButtonContainer, CollectionFollowButton, CollectionForm, CollectionsGrid, ContentHeader, ContentHeaderButton, ContentHeaderCard, type ContentHeaderCardProps, type ContentHeaderProps, CreateCollectionButton, CreateLinkButton, DeleteModal, DeletedBanner, DraftBanner, EntitiesGrid, EntityFollowButton, FaviconItem, FilterPanel, FollowedCollectionsList, FollowedEntitiesList, FollowedTagsList, FollowedUsersList, ImpactCard, LeftMenu, LeftMenuButton, LinkCard, MarkdownRenderer, ObsoleteBanner, ObsoleteModal, OpenLinkButton, PostForm, type PostGridProps, PostHighlightList, PostHighlightListContainer, PostHighlightListContent, PostList, PostListItem, PostsCard, PostsContainer, type PostsContainerProps, PostsGrid, PostsTable, QetaContext, type QetaContextProps, type QetaOverrides, QetaProvider, QuestionCard, type QuestionFormValues, QuestionsTable, RelativeTimeWithTooltip, SelectTemplateList, StatsChart, StatusChip, SuggestionsCard, type TagAndEntitiesFormValues, TagFollowButton, TagsGrid, type TemplateFormValues, TemplateList, TopRankingUsers, TrophyIcon, UpdatedByLink, UserBadges, UserFollowButton, UserLink, UsersGrid, ValidReviewModal, ViewToggle, type ViewType, WriteArticleButton, articleRouteRef, articlesRouteRef, askRouteRef, collectionCreateRouteRef, collectionEditRouteRef, collectionRouteRef, collectionsRouteRef, createLinkRouteRef, editArticleRouteRef, editLinkRouteRef, editQuestionRouteRef, entitiesRouteRef, entityRouteRef, favoriteQuestionsRouteRef, linkRouteRef, linksRouteRef, moderatorRouteRef, qetaApiRef, qetaRouteRef, qetaTranslationRef, qetaTranslations, questionRouteRef, questionsRouteRef, reviewRouteRef, statisticsRouteRef, tagRouteRef, tagsRouteRef, useAI, useCanReview, useCollectionsFollow, useEntityAuthor, useEntityFollow, useIdentityApi, useIsModerator, useQetaApi, useQetaContext, useTagsFollow, useUserFollow, useUserInfo, userRouteRef, usersRouteRef, writeRouteRef };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { articleRouteRef, articlesRouteRef, askRouteRef, collectionCreateRouteRef, collectionEditRouteRef, collectionRouteRef, collectionsRouteRef, createLinkRouteRef, editArticleRouteRef, editLinkRouteRef, editQuestionRouteRef, entitiesRouteRef, entityRouteRef, favoriteQuestionsRouteRef, linkRouteRef, linksRouteRef, moderatorRouteRef, qetaRouteRef, questionRouteRef, questionsRouteRef, statisticsRouteRef, tagRouteRef, tagsRouteRef, userRouteRef, usersRouteRef, writeRouteRef } from './routes.esm.js';
|
|
1
|
+
export { articleRouteRef, articlesRouteRef, askRouteRef, collectionCreateRouteRef, collectionEditRouteRef, collectionRouteRef, collectionsRouteRef, createLinkRouteRef, editArticleRouteRef, editLinkRouteRef, editQuestionRouteRef, entitiesRouteRef, entityRouteRef, favoriteQuestionsRouteRef, linkRouteRef, linksRouteRef, moderatorRouteRef, qetaRouteRef, questionRouteRef, questionsRouteRef, reviewRouteRef, statisticsRouteRef, tagRouteRef, tagsRouteRef, userRouteRef, usersRouteRef, writeRouteRef } from './routes.esm.js';
|
|
2
2
|
export { qetaApiRef } from './api.esm.js';
|
|
3
3
|
export { PostForm } from './components/PostForm/PostForm.esm.js';
|
|
4
4
|
export { PostsContainer } from './components/PostsContainer/PostsContainer.esm.js';
|
|
@@ -23,7 +23,9 @@ export { ContentHeaderButton } from './components/Buttons/ContentHeaderButton.es
|
|
|
23
23
|
export { PostHighlightList, PostHighlightListContent } from './components/PostHighlightList/PostHighlightList.esm.js';
|
|
24
24
|
export { PostHighlightListContainer } from './components/PostHighlightList/PostHighlightListContainer.esm.js';
|
|
25
25
|
export { MarkdownRenderer } from './components/MarkdownRenderer/MarkdownRenderer.esm.js';
|
|
26
|
-
export { DeleteModal } from './components/
|
|
26
|
+
export { DeleteModal } from './components/Modals/DeleteModal.esm.js';
|
|
27
|
+
export { ObsoleteModal } from './components/Modals/ObsoleteModal.esm.js';
|
|
28
|
+
export { ValidReviewModal } from './components/Modals/ValidReviewModal.esm.js';
|
|
27
29
|
export { AnswerCard } from './components/AnswerCard/AnswerCard.esm.js';
|
|
28
30
|
export { QuestionCard } from './components/QuestionCard/QuestionCard.esm.js';
|
|
29
31
|
export { PostsCard } from './components/HomePageCards/PostsCard.esm.js';
|
|
@@ -61,6 +63,7 @@ import 'react/jsx-runtime';
|
|
|
61
63
|
import 'react-router-dom';
|
|
62
64
|
export { DeletedBanner } from './components/Utility/DeletedBanner.esm.js';
|
|
63
65
|
export { DraftBanner } from './components/Utility/DraftBanner.esm.js';
|
|
66
|
+
export { ObsoleteBanner } from './components/Utility/ObsoleteBanner.esm.js';
|
|
64
67
|
export { StatusChip } from './components/Utility/StatusChip.esm.js';
|
|
65
68
|
export { ContentHeaderCard } from './components/ContentHeaderCard/ContentHeaderCard.esm.js';
|
|
66
69
|
export { ContentHeader } from './components/ContentHeader/ContentHeader.esm.js';
|
|
@@ -74,5 +77,6 @@ export { useIdentityApi } from './hooks/useIdentityApi.esm.js';
|
|
|
74
77
|
export { useCollectionsFollow } from './hooks/useCollectionsFollow.esm.js';
|
|
75
78
|
export { useIsModerator } from './hooks/useIsModerator.esm.js';
|
|
76
79
|
export { useAI } from './hooks/useAI.esm.js';
|
|
80
|
+
export { useCanReview } from './hooks/useCanReview.esm.js';
|
|
77
81
|
export { qetaTranslationRef, qetaTranslations } from './translation.esm.js';
|
|
78
82
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/routes.esm.js
CHANGED
|
@@ -128,6 +128,11 @@ const moderatorRouteRef = createSubRouteRef({
|
|
|
128
128
|
parent: qetaRouteRef,
|
|
129
129
|
path: "/moderate"
|
|
130
130
|
});
|
|
131
|
+
const reviewRouteRef = createSubRouteRef({
|
|
132
|
+
id: "qeta.review",
|
|
133
|
+
parent: qetaRouteRef,
|
|
134
|
+
path: "/review"
|
|
135
|
+
});
|
|
131
136
|
|
|
132
|
-
export { articleRouteRef, articlesRouteRef, askRouteRef, collectionCreateRouteRef, collectionEditRouteRef, collectionRouteRef, collectionsRouteRef, createLinkRouteRef, editArticleRouteRef, editLinkRouteRef, editQuestionRouteRef, entitiesRouteRef, entityRouteRef, favoriteQuestionsRouteRef, linkRouteRef, linksRouteRef, moderatorRouteRef, qetaRouteRef, questionRouteRef, questionsRouteRef, statisticsRouteRef, tagRouteRef, tagsRouteRef, userRouteRef, usersRouteRef, writeRouteRef };
|
|
137
|
+
export { articleRouteRef, articlesRouteRef, askRouteRef, collectionCreateRouteRef, collectionEditRouteRef, collectionRouteRef, collectionsRouteRef, createLinkRouteRef, editArticleRouteRef, editLinkRouteRef, editQuestionRouteRef, entitiesRouteRef, entityRouteRef, favoriteQuestionsRouteRef, linkRouteRef, linksRouteRef, moderatorRouteRef, qetaRouteRef, questionRouteRef, questionsRouteRef, reviewRouteRef, statisticsRouteRef, tagRouteRef, tagsRouteRef, userRouteRef, usersRouteRef, writeRouteRef };
|
|
133
138
|
//# sourceMappingURL=routes.esm.js.map
|
package/dist/routes.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["import { createRouteRef, createSubRouteRef } from '@backstage/core-plugin-api';\n\nexport const qetaRouteRef = createRouteRef({\n id: 'qeta',\n});\n\nexport const askRouteRef = createSubRouteRef({\n id: 'qeta.ask',\n parent: qetaRouteRef,\n path: '/questions/ask',\n});\n\nexport const favoriteQuestionsRouteRef = createSubRouteRef({\n id: 'qeta.favoriteQuestions',\n parent: qetaRouteRef,\n path: '/favorites',\n});\n\nexport const statisticsRouteRef = createSubRouteRef({\n id: 'qeta.statistics',\n parent: qetaRouteRef,\n path: '/statistics',\n});\n\nexport const questionsRouteRef = createSubRouteRef({\n id: 'qeta.questions',\n parent: qetaRouteRef,\n path: '/questions',\n});\n\nexport const questionRouteRef = createSubRouteRef({\n id: 'qeta.question',\n parent: qetaRouteRef,\n path: '/questions/:id',\n});\n\nexport const collectionsRouteRef = createSubRouteRef({\n id: 'qeta.collections',\n parent: qetaRouteRef,\n path: '/collections',\n});\n\nexport const collectionRouteRef = createSubRouteRef({\n id: 'qeta.collection',\n parent: qetaRouteRef,\n path: '/collections/:id',\n});\n\nexport const collectionCreateRouteRef = createSubRouteRef({\n id: 'qeta.collection.create',\n parent: qetaRouteRef,\n path: '/collections/create',\n});\n\nexport const collectionEditRouteRef = createSubRouteRef({\n id: 'qeta.collection.edit',\n parent: qetaRouteRef,\n path: '/collections/:id/edit',\n});\n\nexport const writeRouteRef = createSubRouteRef({\n id: 'qeta.write',\n parent: qetaRouteRef,\n path: '/articles/write',\n});\n\nexport const articlesRouteRef = createSubRouteRef({\n id: 'qeta.articles',\n parent: qetaRouteRef,\n path: '/articles',\n});\n\nexport const articleRouteRef = createSubRouteRef({\n id: 'qeta.article',\n parent: qetaRouteRef,\n path: '/articles/:id',\n});\n\nexport const linksRouteRef = createSubRouteRef({\n id: 'qeta.links',\n parent: qetaRouteRef,\n path: '/links',\n});\n\nexport const createLinkRouteRef = createSubRouteRef({\n id: 'qeta.createLink',\n parent: qetaRouteRef,\n path: '/links/create',\n});\n\nexport const linkRouteRef = createSubRouteRef({\n id: 'qeta.link',\n parent: qetaRouteRef,\n path: '/links/:id',\n});\n\nexport const usersRouteRef = createSubRouteRef({\n id: 'qeta.users',\n parent: qetaRouteRef,\n path: '/users',\n});\n\nexport const userRouteRef = createSubRouteRef({\n id: 'qeta.user',\n parent: qetaRouteRef,\n path: '/users/*',\n});\n\nexport const editQuestionRouteRef = createSubRouteRef({\n id: 'qeta.editQuestion',\n parent: qetaRouteRef,\n path: '/questions/:id/edit',\n});\n\nexport const editArticleRouteRef = createSubRouteRef({\n id: 'qeta.editArticle',\n parent: qetaRouteRef,\n path: '/articles/:id/edit',\n});\n\nexport const editLinkRouteRef = createSubRouteRef({\n id: 'qeta.editLink',\n parent: qetaRouteRef,\n path: '/links/:id/edit',\n});\n\nexport const tagsRouteRef = createSubRouteRef({\n id: 'qeta.tags',\n parent: qetaRouteRef,\n path: '/tags',\n});\n\nexport const tagRouteRef = createSubRouteRef({\n id: 'qeta.tag',\n parent: qetaRouteRef,\n path: '/tags/:tag',\n});\n\nexport const entitiesRouteRef = createSubRouteRef({\n id: 'qeta.entities',\n parent: qetaRouteRef,\n path: '/entities',\n});\n\nexport const entityRouteRef = createSubRouteRef({\n id: 'qeta.entity',\n parent: qetaRouteRef,\n path: '/entities/:entityRef',\n});\n\nexport const moderatorRouteRef = createSubRouteRef({\n id: 'qeta.moderator',\n parent: qetaRouteRef,\n path: '/moderate',\n});\n"],"names":[],"mappings":";;AAEO,MAAM,eAAe,cAAe,CAAA;AAAA,EACzC,EAAI,EAAA;AACN,CAAC;AAEM,MAAM,cAAc,iBAAkB,CAAA;AAAA,EAC3C,EAAI,EAAA,UAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEM,MAAM,4BAA4B,iBAAkB,CAAA;AAAA,EACzD,EAAI,EAAA,wBAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEM,MAAM,qBAAqB,iBAAkB,CAAA;AAAA,EAClD,EAAI,EAAA,iBAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEM,MAAM,oBAAoB,iBAAkB,CAAA;AAAA,EACjD,EAAI,EAAA,gBAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEM,MAAM,mBAAmB,iBAAkB,CAAA;AAAA,EAChD,EAAI,EAAA,eAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEM,MAAM,sBAAsB,iBA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M,oBAAoB,iBAAkB,CAAA;AAAA,EACjD,EAAI,EAAA,gBAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["import { createRouteRef, createSubRouteRef } from '@backstage/core-plugin-api';\n\nexport const qetaRouteRef = createRouteRef({\n id: 'qeta',\n});\n\nexport const askRouteRef = createSubRouteRef({\n id: 'qeta.ask',\n parent: qetaRouteRef,\n path: '/questions/ask',\n});\n\nexport const favoriteQuestionsRouteRef = createSubRouteRef({\n id: 'qeta.favoriteQuestions',\n parent: qetaRouteRef,\n path: '/favorites',\n});\n\nexport const statisticsRouteRef = createSubRouteRef({\n id: 'qeta.statistics',\n parent: qetaRouteRef,\n path: '/statistics',\n});\n\nexport const questionsRouteRef = createSubRouteRef({\n id: 'qeta.questions',\n parent: qetaRouteRef,\n path: '/questions',\n});\n\nexport const questionRouteRef = createSubRouteRef({\n id: 'qeta.question',\n parent: qetaRouteRef,\n path: '/questions/:id',\n});\n\nexport const collectionsRouteRef = createSubRouteRef({\n id: 'qeta.collections',\n parent: qetaRouteRef,\n path: '/collections',\n});\n\nexport const collectionRouteRef = createSubRouteRef({\n id: 'qeta.collection',\n parent: qetaRouteRef,\n path: '/collections/:id',\n});\n\nexport const collectionCreateRouteRef = createSubRouteRef({\n id: 'qeta.collection.create',\n parent: qetaRouteRef,\n path: '/collections/create',\n});\n\nexport const collectionEditRouteRef = createSubRouteRef({\n id: 'qeta.collection.edit',\n parent: qetaRouteRef,\n path: '/collections/:id/edit',\n});\n\nexport const writeRouteRef = createSubRouteRef({\n id: 'qeta.write',\n parent: qetaRouteRef,\n path: '/articles/write',\n});\n\nexport const articlesRouteRef = createSubRouteRef({\n id: 'qeta.articles',\n parent: qetaRouteRef,\n path: '/articles',\n});\n\nexport const articleRouteRef = createSubRouteRef({\n id: 'qeta.article',\n parent: qetaRouteRef,\n path: '/articles/:id',\n});\n\nexport const linksRouteRef = createSubRouteRef({\n id: 'qeta.links',\n parent: qetaRouteRef,\n path: '/links',\n});\n\nexport const createLinkRouteRef = createSubRouteRef({\n id: 'qeta.createLink',\n parent: qetaRouteRef,\n path: '/links/create',\n});\n\nexport const linkRouteRef = createSubRouteRef({\n id: 'qeta.link',\n parent: qetaRouteRef,\n path: '/links/:id',\n});\n\nexport const usersRouteRef = createSubRouteRef({\n id: 'qeta.users',\n parent: qetaRouteRef,\n path: '/users',\n});\n\nexport const userRouteRef = createSubRouteRef({\n id: 'qeta.user',\n parent: qetaRouteRef,\n path: '/users/*',\n});\n\nexport const editQuestionRouteRef = createSubRouteRef({\n id: 'qeta.editQuestion',\n parent: qetaRouteRef,\n path: '/questions/:id/edit',\n});\n\nexport const editArticleRouteRef = createSubRouteRef({\n id: 'qeta.editArticle',\n parent: qetaRouteRef,\n path: '/articles/:id/edit',\n});\n\nexport const editLinkRouteRef = createSubRouteRef({\n id: 'qeta.editLink',\n parent: qetaRouteRef,\n path: '/links/:id/edit',\n});\n\nexport const tagsRouteRef = createSubRouteRef({\n id: 'qeta.tags',\n parent: qetaRouteRef,\n path: '/tags',\n});\n\nexport const tagRouteRef = createSubRouteRef({\n id: 'qeta.tag',\n parent: qetaRouteRef,\n path: '/tags/:tag',\n});\n\nexport const entitiesRouteRef = createSubRouteRef({\n id: 'qeta.entities',\n parent: qetaRouteRef,\n path: '/entities',\n});\n\nexport const entityRouteRef = createSubRouteRef({\n id: 'qeta.entity',\n parent: qetaRouteRef,\n path: '/entities/:entityRef',\n});\n\nexport const moderatorRouteRef = createSubRouteRef({\n id: 'qeta.moderator',\n parent: qetaRouteRef,\n path: '/moderate',\n});\n\nexport const reviewRouteRef = createSubRouteRef({\n id: 'qeta.review',\n parent: qetaRouteRef,\n path: '/review',\n});\n"],"names":[],"mappings":";;AAEO,MAAM,eAAe,cAAe,CAAA;AAAA,EACzC,EAAI,EAAA;AACN,CAAC;AAEM,MAAM,cAAc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;AAEM,MAAM,mBAAmB,iBAAkB,CAAA;AAAA,EAChD,EAAI,EAAA,eAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEM,MAAM,eAAe,iBAAkB,CAAA;AAAA,EAC5C,EAAI,EAAA,WAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEM,MAAM,cAAc,iBAAkB,CAAA;AAAA,EAC3C,EAAI,EAAA,UAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEM,MAAM,mBAAmB,iBAAkB,CAAA;AAAA,EAChD,EAAI,EAAA,eAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEM,MAAM,iBAAiB,iBAAkB,CAAA;AAAA,EAC9C,EAAI,EAAA,aAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEM,MAAM,oBAAoB,iBAAkB,CAAA;AAAA,EACjD,EAAI,EAAA,gBAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEM,MAAM,iBAAiB,iBAAkB,CAAA;AAAA,EAC9C,EAAI,EAAA,aAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;;;;"}
|
package/dist/translation.esm.js
CHANGED
|
@@ -31,6 +31,7 @@ const qetaTranslationRef = createTranslationRef({
|
|
|
31
31
|
anonymousAuthor: "Anonymous",
|
|
32
32
|
search: "Search",
|
|
33
33
|
favorite: "Favorite",
|
|
34
|
+
obsolete: "Obsolete",
|
|
34
35
|
readMore: "Read more",
|
|
35
36
|
clear: "Clear search",
|
|
36
37
|
cancel: "Cancel",
|
|
@@ -311,6 +312,24 @@ const qetaTranslationRef = createTranslationRef({
|
|
|
311
312
|
answerDeleted: "Answer deleted",
|
|
312
313
|
linkDeleted: "Link deleted"
|
|
313
314
|
},
|
|
315
|
+
obsoleteModal: {
|
|
316
|
+
title: "Mark post as obsolete",
|
|
317
|
+
description: "Marking a post as obsolete indicates that the content is outdated and no longer relevant. Obsolete posts cannot be edited or receive new answers.",
|
|
318
|
+
comment: "Comment (optional)",
|
|
319
|
+
confirmButton: "Mark as obsolete",
|
|
320
|
+
cancelButton: "Cancel",
|
|
321
|
+
errorMarking: "Failed to mark as obsolete",
|
|
322
|
+
success: "Post marked as obsolete"
|
|
323
|
+
},
|
|
324
|
+
validReviewModal: {
|
|
325
|
+
title: "Mark post as valid",
|
|
326
|
+
description: "Confirming this post is still valid indicates that the content is up-to-date and relevant. This will reset the review timer.",
|
|
327
|
+
comment: "Comment (optional)",
|
|
328
|
+
confirmButton: "Confirm valid",
|
|
329
|
+
cancelButton: "Cancel",
|
|
330
|
+
errorMarking: "Failed to mark as valid",
|
|
331
|
+
success: "Post marked as valid"
|
|
332
|
+
},
|
|
314
333
|
favoritePage: {
|
|
315
334
|
title: "Favorited posts"
|
|
316
335
|
},
|
|
@@ -331,6 +350,7 @@ const qetaTranslationRef = createTranslationRef({
|
|
|
331
350
|
users: "Users",
|
|
332
351
|
manage: "Manage",
|
|
333
352
|
moderate: "Moderate",
|
|
353
|
+
review: "Review",
|
|
334
354
|
expand: "Expand menu",
|
|
335
355
|
collapse: "Collapse menu"
|
|
336
356
|
},
|
|
@@ -400,6 +420,7 @@ const qetaTranslationRef = createTranslationRef({
|
|
|
400
420
|
followedCollections: "Followed collections",
|
|
401
421
|
followedUsers: "Followed users",
|
|
402
422
|
similarQuestions: "Similar questions",
|
|
423
|
+
similarPosts: "Similar posts",
|
|
403
424
|
expand: "Expand sidebar",
|
|
404
425
|
collapse: "Collapse sidebar"
|
|
405
426
|
},
|
|
@@ -515,6 +536,8 @@ const qetaTranslationRef = createTranslationRef({
|
|
|
515
536
|
notFound: "Could not find the question",
|
|
516
537
|
draftStatus: "This is a draft post. Please edit and publish it to make it visible to others.",
|
|
517
538
|
deletedStatus: "This post has been deleted. You can delete it permanently or restore it.",
|
|
539
|
+
obsoleteTitle: "Obsolete Content",
|
|
540
|
+
obsoleteStatus: "This post has been marked as obsolete. It may contain outdated information. Commenting and answering are disabled.",
|
|
518
541
|
answerButton: "Answer",
|
|
519
542
|
sortAnswers: {
|
|
520
543
|
label: "Sort answers",
|
|
@@ -799,7 +822,10 @@ const qetaTranslationRef = createTranslationRef({
|
|
|
799
822
|
totalArticles: "Total articles",
|
|
800
823
|
totalLinks: "Total links",
|
|
801
824
|
totalFollowers: "Total followers",
|
|
802
|
-
reputation: "Reputation"
|
|
825
|
+
reputation: "Reputation",
|
|
826
|
+
answerScore: "Answer score",
|
|
827
|
+
postScore: "Post score",
|
|
828
|
+
correctAnswers: "Correct answers"
|
|
803
829
|
},
|
|
804
830
|
collectionButton: {
|
|
805
831
|
follow: "Follow",
|
|
@@ -826,6 +852,40 @@ const qetaTranslationRef = createTranslationRef({
|
|
|
826
852
|
viewToggle: {
|
|
827
853
|
listView: "List View",
|
|
828
854
|
gridView: "Grid View"
|
|
855
|
+
},
|
|
856
|
+
contentHealth: {
|
|
857
|
+
cardTitle: "Content Health",
|
|
858
|
+
description: "This content has been marked as potentially outdated. Please review it and mark it as valid or obsolete.",
|
|
859
|
+
healthScore: "Health Score: {{score}}%",
|
|
860
|
+
obsoleteWarning: "This content has been marked as obsolete.",
|
|
861
|
+
markValid: "Mark as Valid",
|
|
862
|
+
markObsolete: "Mark as Obsolete",
|
|
863
|
+
valid: "Valid",
|
|
864
|
+
obsolete: "Obsolete",
|
|
865
|
+
reviewHistory: "Review History"
|
|
866
|
+
},
|
|
867
|
+
reviewPage: {
|
|
868
|
+
title: "Review",
|
|
869
|
+
description: "Review posts that are possibly outdated.",
|
|
870
|
+
errorLoading: "Could not load posts for review",
|
|
871
|
+
table: {
|
|
872
|
+
title: "Title",
|
|
873
|
+
author: "Author",
|
|
874
|
+
created: "Created",
|
|
875
|
+
score: "Health Score",
|
|
876
|
+
healthScore: "Health",
|
|
877
|
+
actions: "Actions"
|
|
878
|
+
},
|
|
879
|
+
actions: {
|
|
880
|
+
markObsolete: "Mark Obsolete",
|
|
881
|
+
markValid: "Mark Valid"
|
|
882
|
+
},
|
|
883
|
+
dialog: {
|
|
884
|
+
title: "Mark Post as Obsolete",
|
|
885
|
+
commentLabel: "Comment (Optional)",
|
|
886
|
+
cancel: "Cancel",
|
|
887
|
+
confirm: "Mark as Obsolete"
|
|
888
|
+
}
|
|
829
889
|
}
|
|
830
890
|
}
|
|
831
891
|
});
|