@drodil/backstage-plugin-qeta 2.14.0 → 2.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AnswersContainer/AnswerList.esm.js +2 -2
- package/dist/components/AnswersContainer/AnswerList.esm.js.map +1 -1
- package/dist/components/AnswersContainer/AnswerListItem.esm.js +56 -53
- package/dist/components/AnswersContainer/AnswerListItem.esm.js.map +1 -1
- package/dist/components/HomePageCards/ImpactCard.esm.js +3 -1
- package/dist/components/HomePageCards/ImpactCard.esm.js.map +1 -1
- package/dist/components/QuestionsContainer/QuestionList.esm.js +1 -1
- package/dist/components/QuestionsContainer/QuestionList.esm.js.map +1 -1
- package/dist/components/Statistics/StatsChart.esm.js +191 -13
- package/dist/components/Statistics/StatsChart.esm.js.map +1 -1
- package/dist/components/UserPage/UserPage.esm.js +1 -0
- package/dist/components/UserPage/UserPage.esm.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/translation.esm.js +1 -1
- package/dist/translation.esm.js.map +1 -1
- package/package.json +3 -3
|
@@ -55,9 +55,9 @@ const AnswerList = (props) => {
|
|
|
55
55
|
)));
|
|
56
56
|
}
|
|
57
57
|
const pageCount = response.total < props.pageSize ? 1 : Math.ceil(response.total / props.pageSize);
|
|
58
|
-
return /* @__PURE__ */ React.createElement("div", { ref: listRef }, /* @__PURE__ */ React.createElement(Box, { sx: { mt: 2 }, className: "qetaAnswerList" }, /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 2,
|
|
58
|
+
return /* @__PURE__ */ React.createElement("div", { ref: listRef }, /* @__PURE__ */ React.createElement(Box, { sx: { mt: 2 }, className: "qetaAnswerList" }, /* @__PURE__ */ React.createElement(Card, null, /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 2, style: { paddingTop: "1rem" } }, response.answers.map((answer) => {
|
|
59
59
|
return /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12, key: answer.id }, /* @__PURE__ */ React.createElement(AnswerListItem, { answer, entity }), /* @__PURE__ */ React.createElement(Divider, null));
|
|
60
|
-
})), /* @__PURE__ */ React.createElement(
|
|
60
|
+
}))), /* @__PURE__ */ React.createElement(
|
|
61
61
|
Grid,
|
|
62
62
|
{
|
|
63
63
|
container: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnswerList.esm.js","sources":["../../../src/components/AnswersContainer/AnswerList.tsx"],"sourcesContent":["import { useStyles, useTranslation } from '../../utils/hooks';\nimport { Progress, WarningPanel } from '@backstage/core-components';\nimport {\n Box,\n Card,\n CardContent,\n Divider,\n FormControl,\n Grid,\n MenuItem,\n Select,\n Tooltip,\n Typography,\n} from '@material-ui/core';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { Pagination } from '@material-ui/lab';\nimport { AnswersResponse } from '@drodil/backstage-plugin-qeta-common';\nimport { AnswerListItem } from './AnswerListItem';\n\nexport const AnswerList = (props: {\n loading: boolean;\n error: any;\n response?: AnswersResponse;\n onPageChange: (page: number) => void;\n onPageSizeChange: (size: number) => void;\n page: number;\n pageSize: number;\n entity?: string;\n tags?: string[];\n entityPage?: boolean;\n}) => {\n const {\n loading,\n error,\n response,\n onPageChange,\n entity,\n page,\n onPageSizeChange,\n } = props;\n const styles = useStyles();\n const listRef = useRef<HTMLDivElement | null>(null);\n const [initialLoad, setInitialLoad] = useState(true);\n const { t } = useTranslation();\n\n useEffect(() => {\n if (!initialLoad) {\n setInitialLoad(false);\n }\n }, [initialLoad, loading]);\n\n const handlePageChange = (\n _event: React.ChangeEvent<unknown>,\n value: number,\n ) => {\n if (listRef.current) {\n listRef.current.scrollIntoView();\n }\n onPageChange(value);\n };\n\n const handlePageSizeChange = (\n event: React.ChangeEvent<{ value: unknown }>,\n ) => {\n if (listRef.current) {\n listRef.current.scrollIntoView();\n }\n onPageSizeChange(Number.parseInt(event.target.value as string, 10));\n };\n\n if (loading && initialLoad) {\n return <Progress />;\n }\n\n if (error || response === undefined) {\n return (\n <WarningPanel severity=\"error\" title={t('answerList.errorLoading')}>\n {error?.message}\n </WarningPanel>\n );\n }\n\n if (initialLoad && (!response.answers || response.answers.length === 0)) {\n return (\n <Card style={{ marginTop: '2rem' }}>\n <CardContent>\n <Grid\n container\n justifyContent=\"center\"\n alignItems=\"center\"\n direction=\"column\"\n >\n <Grid item>\n <Typography variant=\"h6\">{t('answerList.noAnswers')}</Typography>\n </Grid>\n </Grid>\n </CardContent>\n </Card>\n );\n }\n\n const pageCount =\n response.total < props.pageSize\n ? 1\n : Math.ceil(response.total / props.pageSize);\n\n return (\n <div ref={listRef}>\n <Box sx={{ mt: 2 }} className=\"qetaAnswerList\">\n <Grid container spacing={2}
|
|
1
|
+
{"version":3,"file":"AnswerList.esm.js","sources":["../../../src/components/AnswersContainer/AnswerList.tsx"],"sourcesContent":["import { useStyles, useTranslation } from '../../utils/hooks';\nimport { Progress, WarningPanel } from '@backstage/core-components';\nimport {\n Box,\n Card,\n CardContent,\n Divider,\n FormControl,\n Grid,\n MenuItem,\n Select,\n Tooltip,\n Typography,\n} from '@material-ui/core';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { Pagination } from '@material-ui/lab';\nimport { AnswersResponse } from '@drodil/backstage-plugin-qeta-common';\nimport { AnswerListItem } from './AnswerListItem';\n\nexport const AnswerList = (props: {\n loading: boolean;\n error: any;\n response?: AnswersResponse;\n onPageChange: (page: number) => void;\n onPageSizeChange: (size: number) => void;\n page: number;\n pageSize: number;\n entity?: string;\n tags?: string[];\n entityPage?: boolean;\n}) => {\n const {\n loading,\n error,\n response,\n onPageChange,\n entity,\n page,\n onPageSizeChange,\n } = props;\n const styles = useStyles();\n const listRef = useRef<HTMLDivElement | null>(null);\n const [initialLoad, setInitialLoad] = useState(true);\n const { t } = useTranslation();\n\n useEffect(() => {\n if (!initialLoad) {\n setInitialLoad(false);\n }\n }, [initialLoad, loading]);\n\n const handlePageChange = (\n _event: React.ChangeEvent<unknown>,\n value: number,\n ) => {\n if (listRef.current) {\n listRef.current.scrollIntoView();\n }\n onPageChange(value);\n };\n\n const handlePageSizeChange = (\n event: React.ChangeEvent<{ value: unknown }>,\n ) => {\n if (listRef.current) {\n listRef.current.scrollIntoView();\n }\n onPageSizeChange(Number.parseInt(event.target.value as string, 10));\n };\n\n if (loading && initialLoad) {\n return <Progress />;\n }\n\n if (error || response === undefined) {\n return (\n <WarningPanel severity=\"error\" title={t('answerList.errorLoading')}>\n {error?.message}\n </WarningPanel>\n );\n }\n\n if (initialLoad && (!response.answers || response.answers.length === 0)) {\n return (\n <Card style={{ marginTop: '2rem' }}>\n <CardContent>\n <Grid\n container\n justifyContent=\"center\"\n alignItems=\"center\"\n direction=\"column\"\n >\n <Grid item>\n <Typography variant=\"h6\">{t('answerList.noAnswers')}</Typography>\n </Grid>\n </Grid>\n </CardContent>\n </Card>\n );\n }\n\n const pageCount =\n response.total < props.pageSize\n ? 1\n : Math.ceil(response.total / props.pageSize);\n\n return (\n <div ref={listRef}>\n <Box sx={{ mt: 2 }} className=\"qetaAnswerList\">\n <Card>\n <Grid container spacing={2} style={{ paddingTop: '1rem' }}>\n {response.answers.map(answer => {\n return (\n <Grid item xs={12} key={answer.id}>\n <AnswerListItem answer={answer} entity={entity} />\n <Divider />\n </Grid>\n );\n })}\n </Grid>\n </Card>\n <Grid\n container\n spacing={0}\n className={`qetaAnswerListPaginationGrid ${styles.questionListPagination}`}\n alignItems=\"center\"\n justifyContent=\"space-between\"\n >\n <Tooltip title={t('answerList.limitSelect')} arrow>\n <FormControl variant=\"filled\">\n <Select\n value={props.pageSize}\n onChange={handlePageSizeChange}\n className={`qetaAnswerListPaginationSizeSelect ${styles.questionsPerPage}`}\n inputProps={{ className: styles.questionsPerPageInput }}\n >\n <MenuItem value={5}>5</MenuItem>\n <MenuItem value={10}>10</MenuItem>\n <MenuItem value={25}>25</MenuItem>\n <MenuItem value={50}>50</MenuItem>\n <MenuItem value={100}>100</MenuItem>\n </Select>\n </FormControl>\n </Tooltip>\n <Pagination\n page={page}\n onChange={handlePageChange}\n count={pageCount}\n size=\"large\"\n variant=\"outlined\"\n className=\"qetaAnswerListPagination\"\n showFirstButton\n showLastButton\n />\n </Grid>\n </Box>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAmBa,MAAA,UAAA,GAAa,CAAC,KAWrB,KAAA;AACJ,EAAM,MAAA;AAAA,IACJ,OAAA;AAAA,IACA,KAAA;AAAA,IACA,QAAA;AAAA,IACA,YAAA;AAAA,IACA,MAAA;AAAA,IACA,IAAA;AAAA,IACA,gBAAA;AAAA,GACE,GAAA,KAAA,CAAA;AACJ,EAAA,MAAM,SAAS,SAAU,EAAA,CAAA;AACzB,EAAM,MAAA,OAAA,GAAU,OAA8B,IAAI,CAAA,CAAA;AAClD,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAI,SAAS,IAAI,CAAA,CAAA;AACnD,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA,CAAA;AAE7B,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,CAAC,WAAa,EAAA;AAChB,MAAA,cAAA,CAAe,KAAK,CAAA,CAAA;AAAA,KACtB;AAAA,GACC,EAAA,CAAC,WAAa,EAAA,OAAO,CAAC,CAAA,CAAA;AAEzB,EAAM,MAAA,gBAAA,GAAmB,CACvB,MAAA,EACA,KACG,KAAA;AACH,IAAA,IAAI,QAAQ,OAAS,EAAA;AACnB,MAAA,OAAA,CAAQ,QAAQ,cAAe,EAAA,CAAA;AAAA,KACjC;AACA,IAAA,YAAA,CAAa,KAAK,CAAA,CAAA;AAAA,GACpB,CAAA;AAEA,EAAM,MAAA,oBAAA,GAAuB,CAC3B,KACG,KAAA;AACH,IAAA,IAAI,QAAQ,OAAS,EAAA;AACnB,MAAA,OAAA,CAAQ,QAAQ,cAAe,EAAA,CAAA;AAAA,KACjC;AACA,IAAA,gBAAA,CAAiB,OAAO,QAAS,CAAA,KAAA,CAAM,MAAO,CAAA,KAAA,EAAiB,EAAE,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AAA;AAAA,QACV,SAAA,EAAW,CAAsC,mCAAA,EAAA,MAAA,CAAO,gBAAgB,CAAA,CAAA;AAAA,QACxE,UAAY,EAAA,EAAE,SAAW,EAAA,MAAA,CAAO,qBAAsB,EAAA;AAAA,OAAA;AAAA,sBAErD,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,KAAO,EAAA,CAAA,EAAA,EAAG,GAAC,CAAA;AAAA,sBACpB,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,KAAO,EAAA,EAAA,EAAA,EAAI,IAAE,CAAA;AAAA,sBACtB,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,KAAO,EAAA,EAAA,EAAA,EAAI,IAAE,CAAA;AAAA,sBACtB,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,KAAO,EAAA,EAAA,EAAA,EAAI,IAAE,CAAA;AAAA,sBACtB,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,KAAO,EAAA,GAAA,EAAA,EAAK,KAAG,CAAA;AAAA,KAE7B,CACF,CAAA;AAAA,oBACA,KAAA,CAAA,aAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,IAAA;AAAA,QACA,QAAU,EAAA,gBAAA;AAAA,QACV,KAAO,EAAA,SAAA;AAAA,QACP,IAAK,EAAA,OAAA;AAAA,QACL,OAAQ,EAAA,UAAA;AAAA,QACR,SAAU,EAAA,0BAAA;AAAA,QACV,eAAe,EAAA,IAAA;AAAA,QACf,cAAc,EAAA,IAAA;AAAA,OAAA;AAAA,KAChB;AAAA,GAEJ,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Grid, Typography, Avatar } from '@material-ui/core';
|
|
2
2
|
import { Link } from '@backstage/core-components';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import DOMPurify from 'dompurify';
|
|
@@ -8,6 +8,7 @@ import { questionRouteRef, userRouteRef } from '@drodil/backstage-plugin-qeta-re
|
|
|
8
8
|
import { RelativeTimeWithTooltip } from '../RelativeTimeWithTooltip/RelativeTimeWithTooltip.esm.js';
|
|
9
9
|
import { useStyles, useEntityAuthor, useTranslation } from '../../utils/hooks.esm.js';
|
|
10
10
|
import { TagsAndEntities } from '../QuestionPage/TagsAndEntities.esm.js';
|
|
11
|
+
import { VoteButtons } from '../QuestionPage/VoteButtons.esm.js';
|
|
11
12
|
|
|
12
13
|
const AnswerListItem = (props) => {
|
|
13
14
|
const { answer, entity } = props;
|
|
@@ -23,64 +24,66 @@ const AnswerListItem = (props) => {
|
|
|
23
24
|
id: answer.questionId.toString(10)
|
|
24
25
|
})}/#answer_${answer.id}`;
|
|
25
26
|
};
|
|
26
|
-
return /* @__PURE__ */ React.createElement(
|
|
27
|
-
|
|
27
|
+
return /* @__PURE__ */ React.createElement(
|
|
28
|
+
Grid,
|
|
28
29
|
{
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
className:
|
|
30
|
+
container: true,
|
|
31
|
+
spacing: 0,
|
|
32
|
+
className: styles.questionListItem,
|
|
33
|
+
justifyContent: "flex-start"
|
|
32
34
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
Link,
|
|
36
|
-
{
|
|
37
|
-
to: getAnswerLink(),
|
|
38
|
-
className: "qetaAnswerListItemQuestionBtn"
|
|
39
|
-
},
|
|
40
|
-
t("answer.questionTitle", {
|
|
41
|
-
question: answer.question?.title ?? ""
|
|
42
|
-
})
|
|
43
|
-
)), /* @__PURE__ */ React.createElement(
|
|
44
|
-
Typography,
|
|
45
|
-
{
|
|
46
|
-
variant: "caption",
|
|
47
|
-
noWrap: true,
|
|
48
|
-
component: "div",
|
|
49
|
-
className: "qetaQuestionListItemContent",
|
|
50
|
-
style: { marginBottom: "5px" }
|
|
51
|
-
},
|
|
52
|
-
DOMPurify.sanitize(
|
|
53
|
-
truncate(removeMarkdownFormatting(answer.content), 150)
|
|
54
|
-
)
|
|
55
|
-
), answer.question && /* @__PURE__ */ React.createElement(TagsAndEntities, { question: answer.question }), /* @__PURE__ */ React.createElement(
|
|
56
|
-
Typography,
|
|
57
|
-
{
|
|
58
|
-
variant: "caption",
|
|
59
|
-
display: "inline",
|
|
60
|
-
className: `${styles.questionListItemAuthor} qetaAnswerListItemAuthor`
|
|
61
|
-
},
|
|
62
|
-
/* @__PURE__ */ React.createElement(
|
|
63
|
-
Avatar,
|
|
64
|
-
{
|
|
65
|
-
src: user?.spec?.profile?.picture,
|
|
66
|
-
className: styles.questionListItemAvatar,
|
|
67
|
-
alt: name,
|
|
68
|
-
variant: "rounded"
|
|
69
|
-
},
|
|
70
|
-
initials
|
|
71
|
-
),
|
|
72
|
-
answer.author === "anonymous" ? t("common.anonymousAuthor") : /* @__PURE__ */ React.createElement(Link, { to: `${userRoute()}/${answer.author}` }, name),
|
|
73
|
-
" ",
|
|
74
|
-
/* @__PURE__ */ React.createElement(
|
|
35
|
+
/* @__PURE__ */ React.createElement(Grid, { container: true, item: true, xs: 1, justifyContent: "center" }, /* @__PURE__ */ React.createElement("div", { className: styles.questionCardVote }, /* @__PURE__ */ React.createElement(VoteButtons, { entity: answer }))),
|
|
36
|
+
/* @__PURE__ */ React.createElement(Grid, { item: true, xs: 11, className: styles.questionListItemContent }, /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 1 }, /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(Typography, { variant: "h5", component: "div" }, /* @__PURE__ */ React.createElement(
|
|
75
37
|
Link,
|
|
76
38
|
{
|
|
77
39
|
to: getAnswerLink(),
|
|
78
|
-
className: "
|
|
40
|
+
className: "qetaAnswerListItemQuestionBtn"
|
|
41
|
+
},
|
|
42
|
+
t("answer.questionTitle", {
|
|
43
|
+
question: answer.question?.title ?? ""
|
|
44
|
+
})
|
|
45
|
+
)), /* @__PURE__ */ React.createElement(
|
|
46
|
+
Typography,
|
|
47
|
+
{
|
|
48
|
+
variant: "caption",
|
|
49
|
+
noWrap: true,
|
|
50
|
+
component: "div",
|
|
51
|
+
className: "qetaQuestionListItemContent",
|
|
52
|
+
style: { marginBottom: "5px" }
|
|
53
|
+
},
|
|
54
|
+
DOMPurify.sanitize(
|
|
55
|
+
truncate(removeMarkdownFormatting(answer.content), 150)
|
|
56
|
+
)
|
|
57
|
+
), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, answer.question && /* @__PURE__ */ React.createElement(TagsAndEntities, { question: answer.question }), /* @__PURE__ */ React.createElement(
|
|
58
|
+
Typography,
|
|
59
|
+
{
|
|
60
|
+
variant: "caption",
|
|
61
|
+
display: "inline",
|
|
62
|
+
className: `${styles.questionListItemAuthor} qetaAnswerListItemAuthor`
|
|
79
63
|
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
64
|
+
/* @__PURE__ */ React.createElement(
|
|
65
|
+
Avatar,
|
|
66
|
+
{
|
|
67
|
+
src: user?.spec?.profile?.picture,
|
|
68
|
+
className: styles.questionListItemAvatar,
|
|
69
|
+
alt: name,
|
|
70
|
+
variant: "rounded"
|
|
71
|
+
},
|
|
72
|
+
initials
|
|
73
|
+
),
|
|
74
|
+
answer.author === "anonymous" ? t("common.anonymousAuthor") : /* @__PURE__ */ React.createElement(Link, { to: `${userRoute()}/${answer.author}` }, name),
|
|
75
|
+
" ",
|
|
76
|
+
/* @__PURE__ */ React.createElement(
|
|
77
|
+
Link,
|
|
78
|
+
{
|
|
79
|
+
to: getAnswerLink(),
|
|
80
|
+
className: "qetaQuestionListItemQuestionBtn"
|
|
81
|
+
},
|
|
82
|
+
`${t("answer.answeredTime")} `,
|
|
83
|
+
/* @__PURE__ */ React.createElement(RelativeTimeWithTooltip, { value: answer.created })
|
|
84
|
+
)
|
|
85
|
+
)))))
|
|
86
|
+
);
|
|
84
87
|
};
|
|
85
88
|
|
|
86
89
|
export { AnswerListItem };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnswerListItem.esm.js","sources":["../../../src/components/AnswersContainer/AnswerListItem.tsx"],"sourcesContent":["import { Avatar,
|
|
1
|
+
{"version":3,"file":"AnswerListItem.esm.js","sources":["../../../src/components/AnswersContainer/AnswerListItem.tsx"],"sourcesContent":["import { Avatar, Grid, Typography } from '@material-ui/core';\nimport { Link } from '@backstage/core-components';\nimport React from 'react';\nimport DOMPurify from 'dompurify';\nimport {\n AnswerResponse,\n removeMarkdownFormatting,\n truncate,\n} from '@drodil/backstage-plugin-qeta-common';\nimport { useRouteRef } from '@backstage/core-plugin-api';\nimport {\n questionRouteRef,\n userRouteRef,\n} from '@drodil/backstage-plugin-qeta-react';\nimport { RelativeTimeWithTooltip } from '../RelativeTimeWithTooltip/RelativeTimeWithTooltip';\nimport { useEntityAuthor, useStyles, useTranslation } from '../../utils/hooks';\nimport { TagsAndEntities } from '../QuestionPage/TagsAndEntities';\nimport { VoteButtons } from '../QuestionPage/VoteButtons';\n\nexport interface AnswerListItemProps {\n answer: AnswerResponse;\n entity?: string;\n}\n\nexport const AnswerListItem = (props: AnswerListItemProps) => {\n const { answer, entity } = props;\n\n const questionRoute = useRouteRef(questionRouteRef);\n const userRoute = useRouteRef(userRouteRef);\n const styles = useStyles();\n const { name, initials, user } = useEntityAuthor(answer);\n const { t } = useTranslation();\n\n const getAnswerLink = () => {\n return entity\n ? `${questionRoute({\n id: answer.questionId.toString(10),\n })}?entity=${entity}#answer_${answer.id}`\n : `${questionRoute({\n id: answer.questionId.toString(10),\n })}/#answer_${answer.id}`;\n };\n\n return (\n <Grid\n container\n spacing={0}\n className={styles.questionListItem}\n justifyContent=\"flex-start\"\n >\n <Grid container item xs={1} justifyContent=\"center\">\n <div className={styles.questionCardVote}>\n <VoteButtons entity={answer} />\n </div>\n </Grid>\n <Grid item xs={11} className={styles.questionListItemContent}>\n <Grid container spacing={1}>\n <Grid item xs={12}>\n <Typography variant=\"h5\" component=\"div\">\n <Link\n to={getAnswerLink()}\n className=\"qetaAnswerListItemQuestionBtn\"\n >\n {t('answer.questionTitle', {\n question: answer.question?.title ?? '',\n })}\n </Link>\n </Typography>\n <Typography\n variant=\"caption\"\n noWrap\n component=\"div\"\n className=\"qetaQuestionListItemContent\"\n style={{ marginBottom: '5px' }}\n >\n {DOMPurify.sanitize(\n truncate(removeMarkdownFormatting(answer.content), 150),\n )}\n </Typography>\n <Grid item xs={12}>\n {answer.question && (\n <TagsAndEntities question={answer.question} />\n )}\n <Typography\n variant=\"caption\"\n display=\"inline\"\n className={`${styles.questionListItemAuthor} qetaAnswerListItemAuthor`}\n >\n <Avatar\n src={user?.spec?.profile?.picture}\n className={styles.questionListItemAvatar}\n alt={name}\n variant=\"rounded\"\n >\n {initials}\n </Avatar>\n {answer.author === 'anonymous' ? (\n t('common.anonymousAuthor')\n ) : (\n <Link to={`${userRoute()}/${answer.author}`}>{name}</Link>\n )}{' '}\n <Link\n to={getAnswerLink()}\n className=\"qetaQuestionListItemQuestionBtn\"\n >\n {`${t('answer.answeredTime')} `}\n <RelativeTimeWithTooltip value={answer.created} />\n </Link>\n </Typography>\n </Grid>\n </Grid>\n </Grid>\n </Grid>\n </Grid>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBa,MAAA,cAAA,GAAiB,CAAC,KAA+B,KAAA;AAC5D,EAAM,MAAA,EAAE,MAAQ,EAAA,MAAA,EAAW,GAAA,KAAA,CAAA;AAE3B,EAAM,MAAA,aAAA,GAAgB,YAAY,gBAAgB,CAAA,CAAA;AAClD,EAAM,MAAA,SAAA,GAAY,YAAY,YAAY,CAAA,CAAA;AAC1C,EAAA,MAAM,SAAS,SAAU,EAAA,CAAA;AACzB,EAAA,MAAM,EAAE,IAAM,EAAA,QAAA,EAAU,IAAK,EAAA,GAAI,gBAAgB,MAAM,CAAA,CAAA;AACvD,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA,CAAA;AAE7B,EAAA,MAAM,gBAAgB,MAAM;AAC1B,IAAO,OAAA,MAAA,GAC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,GAAK,EAAA,IAAA;AAAA,UACL,OAAQ,EAAA,SAAA;AAAA,SAAA;AAAA,QAEP,QAAA;AAAA,OACH;AAAA,MACC,OAAO,MAAW,KAAA,WAAA,GACjB,CAAE,CAAA,wBAAwB,oBAEzB,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,EAAI,EAAA,CAAA,EAAG,WAAW,CAAA,CAAA,EAAI,MAAO,CAAA,MAAM,MAAK,IAAK,CAAA;AAAA,MAClD,GAAA;AAAA,sBACH,KAAA,CAAA,aAAA;AAAA,QAAC,IAAA;AAAA,QAAA;AAAA,UACC,IAAI,aAAc,EAAA;AAAA,UAClB,SAAU,EAAA,iCAAA;AAAA,SAAA;AAAA,QAET,CAAA,EAAG,CAAE,CAAA,qBAAqB,CAAC,CAAA,CAAA,CAAA;AAAA,wBAC3B,KAAA,CAAA,aAAA,CAAA,uBAAA,EAAA,EAAwB,KAAO,EAAA,MAAA,CAAO,OAAS,EAAA,CAAA;AAAA,OAClD;AAAA,KAEJ,CACF,CACF,CACF,CAAA;AAAA,GACF,CAAA;AAEJ;;;;"}
|
|
@@ -13,7 +13,9 @@ const ImpactCard = () => {
|
|
|
13
13
|
if (loading || error || !response) {
|
|
14
14
|
return null;
|
|
15
15
|
}
|
|
16
|
-
return /* @__PURE__ */ React.createElement(Box, { display: { md: "none", lg: "block" } }, /* @__PURE__ */ React.createElement(Card, null, /* @__PURE__ */ React.createElement(CardContent, null, /* @__PURE__ */ React.createElement(Typography, { variant: "h5" }, t("impactCard.title")), /* @__PURE__ */ React.createElement(Typography, { variant: "h5" }, response.impact >= 1e3 ? numeral(response.impact).format("0.0 a") : response.impact, /* @__PURE__ */ React.createElement(Typography, { variant: "caption", style: { marginLeft: "1rem" } }, t("impactCard.views"))), /* @__PURE__ */ React.createElement(Typography, { variant: "body2" }, t("impactCard.contributions"
|
|
16
|
+
return /* @__PURE__ */ React.createElement(Box, { display: { md: "none", lg: "block" } }, /* @__PURE__ */ React.createElement(Card, null, /* @__PURE__ */ React.createElement(CardContent, null, /* @__PURE__ */ React.createElement(Typography, { variant: "h5" }, t("impactCard.title")), /* @__PURE__ */ React.createElement(Typography, { variant: "h5" }, response.impact >= 1e3 ? numeral(response.impact).format("0.0 a") : response.impact, /* @__PURE__ */ React.createElement(Typography, { variant: "caption", style: { marginLeft: "1rem" } }, t("impactCard.views"))), /* @__PURE__ */ React.createElement(Typography, { variant: "body2" }, t("impactCard.contributions", {
|
|
17
|
+
lastWeek: response.lastWeekImpact.toString(10)
|
|
18
|
+
})))));
|
|
17
19
|
};
|
|
18
20
|
|
|
19
21
|
export { ImpactCard };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImpactCard.esm.js","sources":["../../../src/components/HomePageCards/ImpactCard.tsx"],"sourcesContent":["import { useQetaApi, useTranslation } from '../../utils/hooks';\nimport React from 'react';\nimport { Box, Card, CardContent, Typography } from '@material-ui/core';\nimport numeral from 'numeral';\n\nexport const ImpactCard = () => {\n const { t } = useTranslation();\n const {\n value: response,\n loading,\n error,\n } = useQetaApi(api => api.getUserImpact(), []);\n\n if (loading || error || !response) {\n return null;\n }\n\n return (\n <Box display={{ md: 'none', lg: 'block' }}>\n <Card>\n <CardContent>\n <Typography variant=\"h5\">{t('impactCard.title')}</Typography>\n <Typography variant=\"h5\">\n {response.impact >= 1000\n ? numeral(response.impact).format('0.0 a')\n : response.impact}\n <Typography variant=\"caption\" style={{ marginLeft: '1rem' }}>\n {t('impactCard.views')}\n </Typography>\n </Typography>\n <Typography variant=\"body2\">\n {t('impactCard.contributions')}\n </Typography>\n </CardContent>\n </Card>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;AAKO,MAAM,aAAa,MAAM;AAC9B,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA,CAAA;AAC7B,EAAM,MAAA;AAAA,IACJ,KAAO,EAAA,QAAA;AAAA,IACP,OAAA;AAAA,IACA,KAAA;AAAA,MACE,UAAW,CAAA,CAAA,GAAA,KAAO,IAAI,aAAc,EAAA,EAAG,EAAE,CAAA,CAAA;AAE7C,EAAI,IAAA,OAAA,IAAW,KAAS,IAAA,CAAC,QAAU,EAAA;AACjC,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AAEA,
|
|
1
|
+
{"version":3,"file":"ImpactCard.esm.js","sources":["../../../src/components/HomePageCards/ImpactCard.tsx"],"sourcesContent":["import { useQetaApi, useTranslation } from '../../utils/hooks';\nimport React from 'react';\nimport { Box, Card, CardContent, Typography } from '@material-ui/core';\nimport numeral from 'numeral';\n\nexport const ImpactCard = () => {\n const { t } = useTranslation();\n const {\n value: response,\n loading,\n error,\n } = useQetaApi(api => api.getUserImpact(), []);\n\n if (loading || error || !response) {\n return null;\n }\n\n return (\n <Box display={{ md: 'none', lg: 'block' }}>\n <Card>\n <CardContent>\n <Typography variant=\"h5\">{t('impactCard.title')}</Typography>\n <Typography variant=\"h5\">\n {response.impact >= 1000\n ? numeral(response.impact).format('0.0 a')\n : response.impact}\n <Typography variant=\"caption\" style={{ marginLeft: '1rem' }}>\n {t('impactCard.views')}\n </Typography>\n </Typography>\n <Typography variant=\"body2\">\n {t('impactCard.contributions', {\n lastWeek: response.lastWeekImpact.toString(10),\n })}\n </Typography>\n </CardContent>\n </Card>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;AAKO,MAAM,aAAa,MAAM;AAC9B,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA,CAAA;AAC7B,EAAM,MAAA;AAAA,IACJ,KAAO,EAAA,QAAA;AAAA,IACP,OAAA;AAAA,IACA,KAAA;AAAA,MACE,UAAW,CAAA,CAAA,GAAA,KAAO,IAAI,aAAc,EAAA,EAAG,EAAE,CAAA,CAAA;AAE7C,EAAI,IAAA,OAAA,IAAW,KAAS,IAAA,CAAC,QAAU,EAAA;AACjC,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AAEA,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,GAAI,EAAA,EAAA,OAAA,EAAS,EAAE,EAAA,EAAI,MAAQ,EAAA,EAAA,EAAI,OAAQ,EAAA,EAAA,kBACrC,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,IAAA,kBACE,KAAA,CAAA,aAAA,CAAA,WAAA,EAAA,IAAA,sCACE,UAAW,EAAA,EAAA,OAAA,EAAQ,IAAM,EAAA,EAAA,CAAA,CAAE,kBAAkB,CAAE,CAChD,kBAAA,KAAA,CAAA,aAAA,CAAC,UAAW,EAAA,EAAA,OAAA,EAAQ,IACjB,EAAA,EAAA,QAAA,CAAS,MAAU,IAAA,GAAA,GAChB,QAAQ,QAAS,CAAA,MAAM,CAAE,CAAA,MAAA,CAAO,OAAO,CAAA,GACvC,QAAS,CAAA,MAAA,kBACZ,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,OAAQ,EAAA,SAAA,EAAU,KAAO,EAAA,EAAE,YAAY,MAAO,EAAA,EAAA,EACvD,CAAE,CAAA,kBAAkB,CACvB,CACF,CACA,kBAAA,KAAA,CAAA,aAAA,CAAC,UAAW,EAAA,EAAA,OAAA,EAAQ,OACjB,EAAA,EAAA,CAAA,CAAE,0BAA4B,EAAA;AAAA,IAC7B,QAAU,EAAA,QAAA,CAAS,cAAe,CAAA,QAAA,CAAS,EAAE,CAAA;AAAA,GAC9C,CACH,CACF,CACF,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -58,7 +58,7 @@ const QuestionList = (props) => {
|
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
60
|
const pageCount = response.total < props.pageSize ? 1 : Math.ceil(response.total / props.pageSize);
|
|
61
|
-
return /* @__PURE__ */ React.createElement("div", { ref: listRef }, /* @__PURE__ */ React.createElement(Box, { sx: { mt: 2 }, className: "qetaQuestionList" }, /* @__PURE__ */ React.createElement(Card, null, /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 2 }, response.questions.map((question) => {
|
|
61
|
+
return /* @__PURE__ */ React.createElement("div", { ref: listRef }, /* @__PURE__ */ React.createElement(Box, { sx: { mt: 2 }, className: "qetaQuestionList" }, /* @__PURE__ */ React.createElement(Card, null, /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 2, style: { paddingTop: "1rem" } }, response.questions.map((question) => {
|
|
62
62
|
return /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12, key: question.id }, /* @__PURE__ */ React.createElement(QuestionListItem, { question, entity }), /* @__PURE__ */ React.createElement(Divider, null));
|
|
63
63
|
}))), /* @__PURE__ */ React.createElement(
|
|
64
64
|
Grid,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuestionList.esm.js","sources":["../../../src/components/QuestionsContainer/QuestionList.tsx"],"sourcesContent":["import { useStyles, useTranslation } from '../../utils/hooks';\nimport { Progress, WarningPanel } from '@backstage/core-components';\nimport {\n Box,\n Card,\n Divider,\n FormControl,\n Grid,\n MenuItem,\n Select,\n Tooltip,\n} from '@material-ui/core';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { QuestionListItem } from './QuestionListItem';\nimport { Pagination } from '@material-ui/lab';\nimport { QuestionsResponse } from '@drodil/backstage-plugin-qeta-common';\nimport { NoQuestionsCard } from './NoQuestionsCard';\n\nexport const QuestionList = (props: {\n loading: boolean;\n error: any;\n response?: QuestionsResponse;\n onPageChange: (page: number) => void;\n onPageSizeChange: (size: number) => void;\n page: number;\n pageSize: number;\n entity?: string;\n tags?: string[];\n showNoQuestionsBtn?: boolean;\n entityPage?: boolean;\n}) => {\n const {\n loading,\n error,\n response,\n onPageChange,\n entity,\n page,\n onPageSizeChange,\n showNoQuestionsBtn = true,\n entityPage,\n tags,\n } = props;\n const styles = useStyles();\n const listRef = useRef<HTMLDivElement | null>(null);\n const [initialLoad, setInitialLoad] = useState(true);\n const { t } = useTranslation();\n\n useEffect(() => {\n if (!initialLoad) {\n setInitialLoad(false);\n }\n }, [initialLoad, loading]);\n\n const handlePageChange = (\n _event: React.ChangeEvent<unknown>,\n value: number,\n ) => {\n if (listRef.current) {\n listRef.current.scrollIntoView();\n }\n onPageChange(value);\n };\n\n const handlePageSizeChange = (\n event: React.ChangeEvent<{ value: unknown }>,\n ) => {\n if (listRef.current) {\n listRef.current.scrollIntoView();\n }\n onPageSizeChange(Number.parseInt(event.target.value as string, 10));\n };\n\n if (loading && initialLoad) {\n return <Progress />;\n }\n\n if (error || response === undefined) {\n return (\n <WarningPanel severity=\"error\" title={t('questionList.errorLoading')}>\n {error?.message}\n </WarningPanel>\n );\n }\n\n if (initialLoad && (!response.questions || response.questions.length === 0)) {\n return (\n <NoQuestionsCard\n showNoQuestionsBtn={showNoQuestionsBtn}\n entity={entity}\n entityPage={entityPage}\n tags={tags}\n />\n );\n }\n\n const pageCount =\n response.total < props.pageSize\n ? 1\n : Math.ceil(response.total / props.pageSize);\n\n return (\n <div ref={listRef}>\n <Box sx={{ mt: 2 }} className=\"qetaQuestionList\">\n <Card>\n <Grid container spacing={2}>\n {response.questions.map(question => {\n return (\n <Grid item xs={12} key={question.id}>\n <QuestionListItem question={question} entity={entity} />\n <Divider />\n </Grid>\n );\n })}\n </Grid>\n </Card>\n <Grid\n container\n spacing={0}\n className={`qetaQuestionListPaginationGrid ${styles.questionListPagination}`}\n alignItems=\"center\"\n justifyContent=\"space-between\"\n >\n <Tooltip title={t('questionList.questionsPerPage')} arrow>\n <FormControl variant=\"filled\">\n <Select\n value={props.pageSize}\n onChange={handlePageSizeChange}\n className={`qetaQuestionListPaginationSizeSelect ${styles.questionsPerPage}`}\n inputProps={{ className: styles.questionsPerPageInput }}\n >\n <MenuItem value={5}>5</MenuItem>\n <MenuItem value={10}>10</MenuItem>\n <MenuItem value={25}>25</MenuItem>\n <MenuItem value={50}>50</MenuItem>\n <MenuItem value={100}>100</MenuItem>\n </Select>\n </FormControl>\n </Tooltip>\n <Pagination\n page={page}\n onChange={handlePageChange}\n count={pageCount}\n size=\"large\"\n variant=\"outlined\"\n className=\"qetaQuestionListPagination\"\n showFirstButton\n showLastButton\n />\n </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AA;AAEA,EAAA,IAAI,WAAW,WAAa,EAAA;AAC1B,IAAA,2CAAQ,QAAS,EAAA,IAAA,CAAA,CAAA;AAAA,GACnB;AAEA,EAAI,IAAA,KAAA,IAAS,aAAa,KAAW,CAAA,EAAA;AACnC,IACE,uBAAA,KAAA,CAAA,aAAA,CAAC,gBAAa,QAAS,EAAA,OAAA,EAAQ,OAAO,CAAE,CAAA,2BAA2B,CAChE,EAAA,EAAA,KAAA,EAAO,OACV,CAAA,CAAA;AAAA,GAEJ;AAEA,EAAA,IAAI,gBAAgB,CAAC,QAAA,CAAS,aAAa,QAAS,CAAA,SAAA,CAAU,WAAW,CAAI,CAAA,EAAA;AAC3E,IACE,uBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,eAAA;AAAA,MAAA;AAAA,QACC,kBAAA;AAAA,QACA,MAAA;AAAA,QACA,UAAA;AAAA,QACA,IAAA;AAAA,OAAA;AAAA,KACF,CAAA;AAAA,GAEJ;AAEA,EAAM,MAAA,SAAA,GACJ,QAAS,CAAA,KAAA,GAAQ,KAAM,CAAA,QAAA,GACnB,CACA,GAAA,IAAA,CAAK,IAAK,CAAA,QAAA,CAAS,KAAQ,GAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AAE/C,
|
|
1
|
+
{"version":3,"file":"QuestionList.esm.js","sources":["../../../src/components/QuestionsContainer/QuestionList.tsx"],"sourcesContent":["import { useStyles, useTranslation } from '../../utils/hooks';\nimport { Progress, WarningPanel } from '@backstage/core-components';\nimport {\n Box,\n Card,\n Divider,\n FormControl,\n Grid,\n MenuItem,\n Select,\n Tooltip,\n} from '@material-ui/core';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { QuestionListItem } from './QuestionListItem';\nimport { Pagination } from '@material-ui/lab';\nimport { QuestionsResponse } from '@drodil/backstage-plugin-qeta-common';\nimport { NoQuestionsCard } from './NoQuestionsCard';\n\nexport const QuestionList = (props: {\n loading: boolean;\n error: any;\n response?: QuestionsResponse;\n onPageChange: (page: number) => void;\n onPageSizeChange: (size: number) => void;\n page: number;\n pageSize: number;\n entity?: string;\n tags?: string[];\n showNoQuestionsBtn?: boolean;\n entityPage?: boolean;\n}) => {\n const {\n loading,\n error,\n response,\n onPageChange,\n entity,\n page,\n onPageSizeChange,\n showNoQuestionsBtn = true,\n entityPage,\n tags,\n } = props;\n const styles = useStyles();\n const listRef = useRef<HTMLDivElement | null>(null);\n const [initialLoad, setInitialLoad] = useState(true);\n const { t } = useTranslation();\n\n useEffect(() => {\n if (!initialLoad) {\n setInitialLoad(false);\n }\n }, [initialLoad, loading]);\n\n const handlePageChange = (\n _event: React.ChangeEvent<unknown>,\n value: number,\n ) => {\n if (listRef.current) {\n listRef.current.scrollIntoView();\n }\n onPageChange(value);\n };\n\n const handlePageSizeChange = (\n event: React.ChangeEvent<{ value: unknown }>,\n ) => {\n if (listRef.current) {\n listRef.current.scrollIntoView();\n }\n onPageSizeChange(Number.parseInt(event.target.value as string, 10));\n };\n\n if (loading && initialLoad) {\n return <Progress />;\n }\n\n if (error || response === undefined) {\n return (\n <WarningPanel severity=\"error\" title={t('questionList.errorLoading')}>\n {error?.message}\n </WarningPanel>\n );\n }\n\n if (initialLoad && (!response.questions || response.questions.length === 0)) {\n return (\n <NoQuestionsCard\n showNoQuestionsBtn={showNoQuestionsBtn}\n entity={entity}\n entityPage={entityPage}\n tags={tags}\n />\n );\n }\n\n const pageCount =\n response.total < props.pageSize\n ? 1\n : Math.ceil(response.total / props.pageSize);\n\n return (\n <div ref={listRef}>\n <Box sx={{ mt: 2 }} className=\"qetaQuestionList\">\n <Card>\n <Grid container spacing={2} style={{ paddingTop: '1rem' }}>\n {response.questions.map(question => {\n return (\n <Grid item xs={12} key={question.id}>\n <QuestionListItem question={question} entity={entity} />\n <Divider />\n </Grid>\n );\n })}\n </Grid>\n </Card>\n <Grid\n container\n spacing={0}\n className={`qetaQuestionListPaginationGrid ${styles.questionListPagination}`}\n alignItems=\"center\"\n justifyContent=\"space-between\"\n >\n <Tooltip title={t('questionList.questionsPerPage')} arrow>\n <FormControl variant=\"filled\">\n <Select\n value={props.pageSize}\n onChange={handlePageSizeChange}\n className={`qetaQuestionListPaginationSizeSelect ${styles.questionsPerPage}`}\n inputProps={{ className: styles.questionsPerPageInput }}\n >\n <MenuItem value={5}>5</MenuItem>\n <MenuItem value={10}>10</MenuItem>\n <MenuItem value={25}>25</MenuItem>\n <MenuItem value={50}>50</MenuItem>\n <MenuItem value={100}>100</MenuItem>\n </Select>\n </FormControl>\n </Tooltip>\n <Pagination\n page={page}\n onChange={handlePageChange}\n count={pageCount}\n size=\"large\"\n variant=\"outlined\"\n className=\"qetaQuestionListPagination\"\n showFirstButton\n showLastButton\n />\n </Grid>\n </Box>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAkBa,MAAA,YAAA,GAAe,CAAC,KAYvB,KAAA;AACJ,EAAM,MAAA;AAAA,IACJ,OAAA;AAAA,IACA,KAAA;AAAA,IACA,QAAA;AAAA,IACA,YAAA;AAAA,IACA,MAAA;AAAA,IACA,IAAA;AAAA,IACA,gBAAA;AAAA,IACA,kBAAqB,GAAA,IAAA;AAAA,IACrB,UAAA;AAAA,IACA,IAAA;AAAA,GACE,GAAA,KAAA,CAAA;AACJ,EAAA,MAAM,SAAS,SAAU,EAAA,CAAA;AACzB,EAAM,MAAA,OAAA,GAAU,OAA8B,IAAI,CAAA,CAAA;AAClD,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAI,SAAS,IAAI,CAAA,CAAA;AACnD,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA,CAAA;AAE7B,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,CAAC,WAAa,EAAA;AAChB,MAAA,cAAA,CAAe,KAAK,CAAA,CAAA;AAAA,KACtB;AAAA,GACC,EAAA,CAAC,WAAa,EAAA,OAAO,CAAC,CAAA,CAAA;AAEzB,EAAM,MAAA,gBAAA,GAAmB,CACvB,MAAA,EACA,KACG,K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AA,QAAA;AAAA,QACb,QAAU,EAAA,oBAAA;AAAA,QACV,SAAA,EAAW,CAAwC,qCAAA,EAAA,MAAA,CAAO,gBAAgB,CAAA,CAAA;AAAA,QAC1E,UAAY,EAAA,EAAE,SAAW,EAAA,MAAA,CAAO,qBAAsB,EAAA;AAAA,OAAA;AAAA,sBAErD,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,KAAO,EAAA,CAAA,EAAA,EAAG,GAAC,CAAA;AAAA,sBACpB,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,KAAO,EAAA,EAAA,EAAA,EAAI,IAAE,CAAA;AAAA,sBACtB,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,KAAO,EAAA,EAAA,EAAA,EAAI,IAAE,CAAA;AAAA,sBACtB,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,KAAO,EAAA,EAAA,EAAA,EAAI,IAAE,CAAA;AAAA,sBACtB,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,KAAO,EAAA,GAAA,EAAA,EAAK,KAAG,CAAA;AAAA,KAE7B,CACF,CAAA;AAAA,oBACA,KAAA,CAAA,aAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,IAAA;AAAA,QACA,QAAU,EAAA,gBAAA;AAAA,QACV,KAAO,EAAA,SAAA;AAAA,QACP,IAAK,EAAA,OAAA;AAAA,QACL,OAAQ,EAAA,UAAA;AAAA,QACR,SAAU,EAAA,4BAAA;AAAA,QACV,eAAe,EAAA,IAAA;AAAA,QACf,cAAc,EAAA,IAAA;AAAA,OAAA;AAAA,KAChB;AAAA,GAEJ,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ResponsiveContainer, BarChart, Tooltip, Bar, CartesianGrid, XAxis, YAxis, Legend } from 'recharts';
|
|
3
|
-
import { makeStyles, createStyles, Typography } from '@material-ui/core';
|
|
4
|
-
import {
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { ResponsiveContainer, BarChart, Tooltip, Bar, CartesianGrid, XAxis, YAxis, Legend, LineChart, Line } from 'recharts';
|
|
3
|
+
import { makeStyles, createStyles, Typography, ButtonGroup, IconButton } from '@material-ui/core';
|
|
4
|
+
import { useTranslation, useIsDarkTheme } from '../../utils/hooks.esm.js';
|
|
5
|
+
import ShowChartIcon from '@material-ui/icons/ShowChart';
|
|
6
|
+
import BarChartIcon from '@material-ui/icons/BarChart';
|
|
5
7
|
|
|
6
8
|
const useStyles = makeStyles(
|
|
7
9
|
(theme) => createStyles({
|
|
@@ -20,23 +22,104 @@ const useStyles = makeStyles(
|
|
|
20
22
|
const isGlobalStat = (stat) => {
|
|
21
23
|
return stat.totalUsers !== void 0;
|
|
22
24
|
};
|
|
23
|
-
const
|
|
25
|
+
const DEFAULT_STATS = [
|
|
26
|
+
{
|
|
27
|
+
dataKey: "totalViews",
|
|
28
|
+
name: "Total views",
|
|
29
|
+
color: "#8884d8",
|
|
30
|
+
enabled: false,
|
|
31
|
+
globalStat: false
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
dataKey: "totalQuestions",
|
|
35
|
+
name: "Total questions",
|
|
36
|
+
color: "#82ca9d",
|
|
37
|
+
enabled: true,
|
|
38
|
+
globalStat: false
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
dataKey: "totalAnswers",
|
|
42
|
+
name: "Total answers",
|
|
43
|
+
color: "#ff7300",
|
|
44
|
+
enabled: true,
|
|
45
|
+
globalStat: false
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
dataKey: "totalComments",
|
|
49
|
+
name: "Total comments",
|
|
50
|
+
color: "#739973",
|
|
51
|
+
enabled: true,
|
|
52
|
+
globalStat: false
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
dataKey: "totalVotes",
|
|
56
|
+
name: "Total votes",
|
|
57
|
+
color: "#d88884",
|
|
58
|
+
enabled: true,
|
|
59
|
+
globalStat: false
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
dataKey: "totalUsers",
|
|
63
|
+
name: "Total users",
|
|
64
|
+
color: "#ff0000",
|
|
65
|
+
enabled: true,
|
|
66
|
+
globalStat: true
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
dataKey: "totalTags",
|
|
70
|
+
name: "Total tags",
|
|
71
|
+
color: "#ff00ff",
|
|
72
|
+
enabled: true,
|
|
73
|
+
globalStat: true
|
|
74
|
+
}
|
|
75
|
+
];
|
|
76
|
+
const useChartState = (data) => {
|
|
24
77
|
const styles = useStyles();
|
|
25
78
|
const isDark = useIsDarkTheme();
|
|
26
|
-
const { t } = useTranslation();
|
|
27
|
-
if (props.data.length === 0) {
|
|
28
|
-
return /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle1" }, t("stats.noStats"));
|
|
29
|
-
}
|
|
30
|
-
const data = props.data.reverse();
|
|
31
79
|
const globalStats = isGlobalStat(data[0]);
|
|
32
|
-
|
|
80
|
+
const [stats, setStats] = React.useState(
|
|
81
|
+
DEFAULT_STATS.filter((stat) => {
|
|
82
|
+
return globalStats || !stat.globalStat;
|
|
83
|
+
})
|
|
84
|
+
);
|
|
85
|
+
const toggleStat = useCallback(
|
|
86
|
+
(name) => {
|
|
87
|
+
setStats(
|
|
88
|
+
(prev) => prev.map(
|
|
89
|
+
(stat) => stat.name === name ? { ...stat, enabled: !stat.enabled } : stat
|
|
90
|
+
)
|
|
91
|
+
);
|
|
92
|
+
},
|
|
93
|
+
[setStats]
|
|
94
|
+
);
|
|
95
|
+
const isDisabled = useCallback(
|
|
96
|
+
(name) => {
|
|
97
|
+
return stats.find((stat) => stat.name === name)?.enabled === false;
|
|
98
|
+
},
|
|
99
|
+
[stats]
|
|
100
|
+
);
|
|
101
|
+
return { styles, isDark, toggleStat, stats, isDisabled };
|
|
102
|
+
};
|
|
103
|
+
const StatsBarChart = (props) => {
|
|
104
|
+
const { styles, isDark, stats, toggleStat, isDisabled } = useChartState(
|
|
105
|
+
props.data
|
|
106
|
+
);
|
|
107
|
+
return /* @__PURE__ */ React.createElement(ResponsiveContainer, { height: 400, width: "100%" }, /* @__PURE__ */ React.createElement(BarChart, { data: props.data, width: 900, height: 300 }, /* @__PURE__ */ React.createElement(
|
|
33
108
|
Tooltip,
|
|
34
109
|
{
|
|
35
110
|
labelClassName: styles.tooltipLabel,
|
|
36
111
|
wrapperClassName: styles.tooltipWrapper,
|
|
37
112
|
cursor: { fill: isDark ? "#4f4f4f" : "#f5f5f5" }
|
|
38
113
|
}
|
|
39
|
-
),
|
|
114
|
+
), stats.map((stat) => /* @__PURE__ */ React.createElement(
|
|
115
|
+
Bar,
|
|
116
|
+
{
|
|
117
|
+
key: stat.dataKey,
|
|
118
|
+
dataKey: stat.enabled ? stat.dataKey : "hidden",
|
|
119
|
+
name: stat.name,
|
|
120
|
+
fill: stat.color
|
|
121
|
+
}
|
|
122
|
+
)), /* @__PURE__ */ React.createElement(CartesianGrid, { stroke: "#ccc" }), /* @__PURE__ */ React.createElement(
|
|
40
123
|
XAxis,
|
|
41
124
|
{
|
|
42
125
|
dataKey: "date",
|
|
@@ -53,7 +136,102 @@ const StatsChart = (props) => {
|
|
|
53
136
|
tickLine: { stroke: isDark ? "white" : "black" },
|
|
54
137
|
tick: { fill: isDark ? "white" : "black" }
|
|
55
138
|
}
|
|
56
|
-
), /* @__PURE__ */ React.createElement(
|
|
139
|
+
), /* @__PURE__ */ React.createElement(
|
|
140
|
+
Legend,
|
|
141
|
+
{
|
|
142
|
+
verticalAlign: "top",
|
|
143
|
+
height: 36,
|
|
144
|
+
wrapperStyle: { cursor: "pointer" },
|
|
145
|
+
formatter: (data) => {
|
|
146
|
+
return isDisabled(data) ? `[ ] ${data}` : `[x] ${data}`;
|
|
147
|
+
},
|
|
148
|
+
onClick: (data) => {
|
|
149
|
+
if (data.value) {
|
|
150
|
+
toggleStat(data.value);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
)));
|
|
155
|
+
};
|
|
156
|
+
const StatsLineChart = (props) => {
|
|
157
|
+
const { styles, isDark, stats, toggleStat, isDisabled } = useChartState(
|
|
158
|
+
props.data
|
|
159
|
+
);
|
|
160
|
+
return /* @__PURE__ */ React.createElement(ResponsiveContainer, { height: 400, width: "100%" }, /* @__PURE__ */ React.createElement(LineChart, { data: props.data, width: 900, height: 300 }, /* @__PURE__ */ React.createElement(
|
|
161
|
+
Tooltip,
|
|
162
|
+
{
|
|
163
|
+
labelClassName: styles.tooltipLabel,
|
|
164
|
+
wrapperClassName: styles.tooltipWrapper,
|
|
165
|
+
cursor: { fill: isDark ? "#4f4f4f" : "#f5f5f5" }
|
|
166
|
+
}
|
|
167
|
+
), stats.map((stat) => /* @__PURE__ */ React.createElement(
|
|
168
|
+
Line,
|
|
169
|
+
{
|
|
170
|
+
key: stat.dataKey,
|
|
171
|
+
dataKey: stat.enabled ? stat.dataKey : "hidden",
|
|
172
|
+
name: stat.name,
|
|
173
|
+
stroke: stat.color
|
|
174
|
+
}
|
|
175
|
+
)), /* @__PURE__ */ React.createElement(CartesianGrid, { stroke: "#ccc" }), /* @__PURE__ */ React.createElement(
|
|
176
|
+
XAxis,
|
|
177
|
+
{
|
|
178
|
+
dataKey: "date",
|
|
179
|
+
tickFormatter: (tick) => new Date(tick).toDateString(),
|
|
180
|
+
axisLine: { stroke: isDark ? "white" : "black" },
|
|
181
|
+
tickLine: { stroke: isDark ? "white" : "black" },
|
|
182
|
+
tick: { fill: isDark ? "white" : "black" }
|
|
183
|
+
}
|
|
184
|
+
), /* @__PURE__ */ React.createElement(
|
|
185
|
+
YAxis,
|
|
186
|
+
{
|
|
187
|
+
allowDecimals: false,
|
|
188
|
+
axisLine: { stroke: isDark ? "white" : "black" },
|
|
189
|
+
tickLine: { stroke: isDark ? "white" : "black" },
|
|
190
|
+
tick: { fill: isDark ? "white" : "black" }
|
|
191
|
+
}
|
|
192
|
+
), /* @__PURE__ */ React.createElement(
|
|
193
|
+
Legend,
|
|
194
|
+
{
|
|
195
|
+
verticalAlign: "top",
|
|
196
|
+
height: 36,
|
|
197
|
+
wrapperStyle: { cursor: "pointer" },
|
|
198
|
+
formatter: (data) => {
|
|
199
|
+
return isDisabled(data) ? `[ ] ${data}` : `[x] ${data}`;
|
|
200
|
+
},
|
|
201
|
+
onClick: (data) => {
|
|
202
|
+
if (data.value) {
|
|
203
|
+
toggleStat(data.value);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
)));
|
|
208
|
+
};
|
|
209
|
+
const StatsChart = (props) => {
|
|
210
|
+
const { t } = useTranslation();
|
|
211
|
+
const [chart, setChart] = React.useState("line");
|
|
212
|
+
if (props.data.length === 0) {
|
|
213
|
+
return /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle1" }, t("stats.noStats"));
|
|
214
|
+
}
|
|
215
|
+
const data = props.data.reverse().map((d) => ({ ...d, hidden: 0 }));
|
|
216
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, chart === "line" ? /* @__PURE__ */ React.createElement(StatsLineChart, { data }) : /* @__PURE__ */ React.createElement(StatsBarChart, { data }), /* @__PURE__ */ React.createElement(ButtonGroup, { "aria-label": "Chart type", style: { float: "right" } }, /* @__PURE__ */ React.createElement(
|
|
217
|
+
IconButton,
|
|
218
|
+
{
|
|
219
|
+
"aria-label": "Line chart",
|
|
220
|
+
onClick: () => {
|
|
221
|
+
setChart("line");
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
/* @__PURE__ */ React.createElement(ShowChartIcon, null)
|
|
225
|
+
), /* @__PURE__ */ React.createElement(
|
|
226
|
+
IconButton,
|
|
227
|
+
{
|
|
228
|
+
"aria-label": "Bar chart",
|
|
229
|
+
onClick: () => {
|
|
230
|
+
setChart("bar");
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
/* @__PURE__ */ React.createElement(BarChartIcon, null)
|
|
234
|
+
)));
|
|
57
235
|
};
|
|
58
236
|
|
|
59
237
|
export { StatsChart };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatsChart.esm.js","sources":["../../../src/components/Statistics/StatsChart.tsx"],"sourcesContent":["import React from 'react';\nimport {\n GlobalStat,\n Stat,\n UserStat,\n} from '@drodil/backstage-plugin-qeta-common';\nimport {\n Bar,\n BarChart,\n CartesianGrid,\n Legend,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from 'recharts';\nimport { createStyles, makeStyles, Theme, Typography } from '@material-ui/core';\nimport { useIsDarkTheme, useTranslation } from '../../utils/hooks';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n tooltipLabel: {\n color: theme.palette.text.primary,\n },\n tooltipWrapper: {\n backgroundColor: `${theme.palette.background.default} !important`,\n border: 'none !important',\n },\n xAxis: {\n color: `${theme.palette.text.primary} !important`,\n },\n }),\n);\n\nconst isGlobalStat = (stat: Stat): stat is GlobalStat => {\n return (stat as GlobalStat).totalUsers !== undefined;\n};\n\nexport const StatsChart = (props: { data: GlobalStat[] | UserStat[] }) => {\n const styles = useStyles();\n const isDark = useIsDarkTheme();\n const { t } = useTranslation();\n\n if (props.data.length === 0) {\n return <Typography variant=\"subtitle1\">{t('stats.noStats')}</Typography>;\n }\n const data = props.data.reverse();\n const globalStats = isGlobalStat(data[0]);\n\n return (\n <ResponsiveContainer height={300} width=\"100%\">\n <BarChart data={data} width={900} height={300}>\n <Tooltip\n labelClassName={styles.tooltipLabel}\n wrapperClassName={styles.tooltipWrapper}\n cursor={{ fill: isDark ? '#4f4f4f' : '#f5f5f5' }}\n />\n <Bar name=\"Total views\" dataKey=\"totalViews\" fill=\"#8884d8\" />\n <Bar name=\"Total questions\" dataKey=\"totalQuestions\" fill=\"#82ca9d\" />\n <Bar name=\"Total answers\" dataKey=\"totalAnswers\" fill=\"#ff7300\" />\n <Bar name=\"Total comments\" dataKey=\"totalComments\" fill=\"#739973\" />\n {globalStats && (\n <Bar name=\"Total users\" dataKey=\"totalUsers\" fill=\"#ff0000\" />\n )}\n <Bar name=\"Total votes\" dataKey=\"totalVotes\" fill=\"#d88884\" />\n {globalStats && (\n <Bar name=\"Total tags\" dataKey=\"totalTags\" fill=\"#ff00ff\" />\n )}\n <CartesianGrid stroke=\"#ccc\" />\n <XAxis\n dataKey=\"date\"\n tickFormatter={(tick: string) => new Date(tick).toDateString()}\n axisLine={{ stroke: isDark ? 'white' : 'black' }}\n tickLine={{ stroke: isDark ? 'white' : 'black' }}\n tick={{ fill: isDark ? 'white' : 'black' }}\n />\n <YAxis\n allowDecimals={false}\n axisLine={{ stroke: isDark ? 'white' : 'black' }}\n tickLine={{ stroke: isDark ? 'white' : 'black' }}\n tick={{ fill: isDark ? 'white' : 'black' }}\n />\n <Legend verticalAlign=\"top\" height={36} />\n </BarChart>\n </ResponsiveContainer>\n );\n};\n"],"names":[],"mappings":";;;;;AAmBA,MAAM,SAAY,GAAA,UAAA;AAAA,EAAW,CAAC,UAC5B,YAAa,CAAA;AAAA,IACX,YAAc,EAAA;AAAA,MACZ,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,OAAA;AAAA,KAC5B;AAAA,IACA,cAAgB,EAAA;AAAA,MACd,eAAiB,EAAA,CAAA,EAAG,KAAM,CAAA,OAAA,CAAQ,WAAW,OAAO,CAAA,WAAA,CAAA;AAAA,MACpD,MAAQ,EAAA,iBAAA;AAAA,KACV;AAAA,IACA,KAAO,EAAA;AAAA,MACL,KAAO,EAAA,CAAA,EAAG,KAAM,CAAA,OAAA,CAAQ,KAAK,OAAO,CAAA,WAAA,CAAA;AAAA,KACtC;AAAA,GACD,CAAA;AACH,CAAA,CAAA;AAEA,MAAM,YAAA,GAAe,CAAC,IAAmC,KAAA;AACvD,EAAA,OAAQ,KAAoB,UAAe,KAAA,KAAA,CAAA,CAAA;AAC7C,CAAA,CAAA;AAEa,MAAA,UAAA,GAAa,CAAC,KAA+C,KAAA;A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AA;AAAA,MAC/C,QAAU,EAAA,EAAE,MAAQ,EAAA,MAAA,GAAS,UAAU,OAAQ,EAAA;AAAA,MAC/C,IAAM,EAAA,EAAE,IAAM,EAAA,MAAA,GAAS,UAAU,OAAQ,EAAA;AAAA,KAAA;AAAA,GAC3C,sCACC,MAAO,EAAA,EAAA,aAAA,EAAc,OAAM,MAAQ,EAAA,EAAA,EAAI,CAC1C,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"StatsChart.esm.js","sources":["../../../src/components/Statistics/StatsChart.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport {\n GlobalStat,\n Stat,\n UserStat,\n} from '@drodil/backstage-plugin-qeta-common';\nimport {\n Bar,\n BarChart,\n CartesianGrid,\n Legend,\n Line,\n LineChart,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from 'recharts';\nimport {\n ButtonGroup,\n createStyles,\n IconButton,\n makeStyles,\n Theme,\n Typography,\n} from '@material-ui/core';\nimport { useIsDarkTheme, useTranslation } from '../../utils/hooks';\nimport ShowChartIcon from '@material-ui/icons/ShowChart';\nimport BarChartIcon from '@material-ui/icons/BarChart';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n tooltipLabel: {\n color: theme.palette.text.primary,\n },\n tooltipWrapper: {\n backgroundColor: `${theme.palette.background.default} !important`,\n border: 'none !important',\n },\n xAxis: {\n color: `${theme.palette.text.primary} !important`,\n },\n }),\n);\n\nconst isGlobalStat = (stat: Stat): stat is GlobalStat => {\n return (stat as GlobalStat).totalUsers !== undefined;\n};\n\ntype StatType = {\n dataKey:\n | 'totalViews'\n | 'totalQuestions'\n | 'totalAnswers'\n | 'totalComments'\n | 'totalVotes'\n | 'totalUsers'\n | 'totalTags';\n name: string;\n color: string;\n enabled: boolean;\n globalStat: boolean;\n};\n\nconst DEFAULT_STATS: StatType[] = [\n {\n dataKey: 'totalViews',\n name: 'Total views',\n color: '#8884d8',\n enabled: false,\n globalStat: false,\n },\n {\n dataKey: 'totalQuestions',\n name: 'Total questions',\n color: '#82ca9d',\n enabled: true,\n globalStat: false,\n },\n {\n dataKey: 'totalAnswers',\n name: 'Total answers',\n color: '#ff7300',\n enabled: true,\n globalStat: false,\n },\n {\n dataKey: 'totalComments',\n name: 'Total comments',\n color: '#739973',\n enabled: true,\n globalStat: false,\n },\n {\n dataKey: 'totalVotes',\n name: 'Total votes',\n color: '#d88884',\n enabled: true,\n globalStat: false,\n },\n {\n dataKey: 'totalUsers',\n name: 'Total users',\n color: '#ff0000',\n enabled: true,\n globalStat: true,\n },\n {\n dataKey: 'totalTags',\n name: 'Total tags',\n color: '#ff00ff',\n enabled: true,\n globalStat: true,\n },\n];\n\nconst useChartState = (data: GlobalStat[] | UserStat[]) => {\n const styles = useStyles();\n const isDark = useIsDarkTheme();\n const globalStats = isGlobalStat(data[0]);\n const [stats, setStats] = React.useState<StatType[]>(\n DEFAULT_STATS.filter(stat => {\n return globalStats || !stat.globalStat;\n }),\n );\n const toggleStat = useCallback(\n (name: string) => {\n setStats(prev =>\n prev.map(stat =>\n stat.name === name ? { ...stat, enabled: !stat.enabled } : stat,\n ),\n );\n },\n [setStats],\n );\n const isDisabled = useCallback(\n (name: string) => {\n return stats.find(stat => stat.name === name)?.enabled === false;\n },\n [stats],\n );\n\n return { styles, isDark, toggleStat, stats, isDisabled };\n};\n\nconst StatsBarChart = (props: { data: GlobalStat[] | UserStat[] }) => {\n const { styles, isDark, stats, toggleStat, isDisabled } = useChartState(\n props.data,\n );\n return (\n <ResponsiveContainer height={400} width=\"100%\">\n <BarChart data={props.data} width={900} height={300}>\n <Tooltip\n labelClassName={styles.tooltipLabel}\n wrapperClassName={styles.tooltipWrapper}\n cursor={{ fill: isDark ? '#4f4f4f' : '#f5f5f5' }}\n />\n {stats.map(stat => (\n <Bar\n key={stat.dataKey}\n dataKey={stat.enabled ? stat.dataKey : 'hidden'}\n name={stat.name}\n fill={stat.color}\n />\n ))}\n <CartesianGrid stroke=\"#ccc\" />\n <XAxis\n dataKey=\"date\"\n tickFormatter={(tick: string) => new Date(tick).toDateString()}\n axisLine={{ stroke: isDark ? 'white' : 'black' }}\n tickLine={{ stroke: isDark ? 'white' : 'black' }}\n tick={{ fill: isDark ? 'white' : 'black' }}\n />\n <YAxis\n allowDecimals={false}\n axisLine={{ stroke: isDark ? 'white' : 'black' }}\n tickLine={{ stroke: isDark ? 'white' : 'black' }}\n tick={{ fill: isDark ? 'white' : 'black' }}\n />\n <Legend\n verticalAlign=\"top\"\n height={36}\n wrapperStyle={{ cursor: 'pointer' }}\n formatter={data => {\n return isDisabled(data) ? `[ ] ${data}` : `[x] ${data}`;\n }}\n onClick={data => {\n if (data.value) {\n toggleStat(data.value as string);\n }\n }}\n />\n </BarChart>\n </ResponsiveContainer>\n );\n};\n\nconst StatsLineChart = (props: { data: GlobalStat[] | UserStat[] }) => {\n const { styles, isDark, stats, toggleStat, isDisabled } = useChartState(\n props.data,\n );\n return (\n <ResponsiveContainer height={400} width=\"100%\">\n <LineChart data={props.data} width={900} height={300}>\n <Tooltip\n labelClassName={styles.tooltipLabel}\n wrapperClassName={styles.tooltipWrapper}\n cursor={{ fill: isDark ? '#4f4f4f' : '#f5f5f5' }}\n />\n {stats.map(stat => (\n <Line\n key={stat.dataKey}\n dataKey={stat.enabled ? stat.dataKey : 'hidden'}\n name={stat.name}\n stroke={stat.color}\n />\n ))}\n <CartesianGrid stroke=\"#ccc\" />\n <XAxis\n dataKey=\"date\"\n tickFormatter={(tick: string) => new Date(tick).toDateString()}\n axisLine={{ stroke: isDark ? 'white' : 'black' }}\n tickLine={{ stroke: isDark ? 'white' : 'black' }}\n tick={{ fill: isDark ? 'white' : 'black' }}\n />\n <YAxis\n allowDecimals={false}\n axisLine={{ stroke: isDark ? 'white' : 'black' }}\n tickLine={{ stroke: isDark ? 'white' : 'black' }}\n tick={{ fill: isDark ? 'white' : 'black' }}\n />\n <Legend\n verticalAlign=\"top\"\n height={36}\n wrapperStyle={{ cursor: 'pointer' }}\n formatter={data => {\n return isDisabled(data) ? `[ ] ${data}` : `[x] ${data}`;\n }}\n onClick={data => {\n if (data.value) {\n toggleStat(data.value as string);\n }\n }}\n />\n </LineChart>\n </ResponsiveContainer>\n );\n};\n\nexport const StatsChart = (props: { data: GlobalStat[] | UserStat[] }) => {\n const { t } = useTranslation();\n const [chart, setChart] = React.useState<'line' | 'bar'>('line');\n\n if (props.data.length === 0) {\n return <Typography variant=\"subtitle1\">{t('stats.noStats')}</Typography>;\n }\n const data = props.data.reverse().map(d => ({ ...d, hidden: 0 }));\n\n return (\n <>\n {chart === 'line' ? (\n <StatsLineChart data={data} />\n ) : (\n <StatsBarChart data={data} />\n )}\n <ButtonGroup aria-label=\"Chart type\" style={{ float: 'right' }}>\n <IconButton\n aria-label=\"Line chart\"\n onClick={() => {\n setChart('line');\n }}\n >\n <ShowChartIcon />\n </IconButton>\n <IconButton\n aria-label=\"Bar chart\"\n onClick={() => {\n setChart('bar');\n }}\n >\n <BarChartIcon />\n </IconButton>\n </ButtonGroup>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;AA8BA,MAAM,SAAY,GAAA,UAAA;AAAA,EAAW,CAAC,UAC5B,YAAa,CAAA;AAAA,IACX,YAAc,EAAA;AAAA,MACZ,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,OAAA;AAAA,KAC5B;AAAA,IACA,cAAgB,EAAA;AAAA,MACd,eAAiB,EAAA,CAAA,EAAG,KAAM,CAAA,OAAA,CAAQ,WAAW,OAAO,CAAA,WAAA,CAAA;AAAA,MACpD,MAAQ,EAAA,iBAAA;AAAA,KACV;AAAA,IACA,KAAO,EAAA;AAAA,MACL,KAAO,EAAA,CAAA,EAAG,KAAM,CAAA,OAAA,CAAQ,KAAK,OAAO,CAAA,WAAA,CAAA;AAAA,KACtC;AAAA,GACD,CAAA;AACH,CAAA,CAAA;AAEA,MAAM,YAAA,GAAe,CAAC,IAAmC,KAAA;AACvD,EAAA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AAM,IAAO,GAAA,KAAA,CAAM,IAAK,CAAA,OAAA,EAAU,CAAA,GAAA,CAAI,CAAM,CAAA,MAAA,EAAE,GAAG,CAAA,EAAG,MAAQ,EAAA,CAAA,EAAI,CAAA,CAAA,CAAA;AAEhE,EAAA,iEAEK,KAAU,KAAA,MAAA,uCACR,cAAe,EAAA,EAAA,IAAA,EAAY,oBAE3B,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA,EAAc,MAAY,CAE7B,kBAAA,KAAA,CAAA,aAAA,CAAC,eAAY,YAAW,EAAA,YAAA,EAAa,OAAO,EAAE,KAAA,EAAO,SACnD,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,YAAW,EAAA,YAAA;AAAA,MACX,SAAS,MAAM;AACb,QAAA,QAAA,CAAS,MAAM,CAAA,CAAA;AAAA,OACjB;AAAA,KAAA;AAAA,wCAEC,aAAc,EAAA,IAAA,CAAA;AAAA,GAEjB,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,YAAW,EAAA,WAAA;AAAA,MACX,SAAS,MAAM;AACb,QAAA,QAAA,CAAS,KAAK,CAAA,CAAA;AAAA,OAChB;AAAA,KAAA;AAAA,wCAEC,YAAa,EAAA,IAAA,CAAA;AAAA,GAElB,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -14,6 +14,7 @@ import '@drodil/backstage-plugin-qeta-react';
|
|
|
14
14
|
import 'react-relative-time';
|
|
15
15
|
import 'lodash';
|
|
16
16
|
import '@backstage/catalog-model';
|
|
17
|
+
import '../QuestionPage/VoteButtons.esm.js';
|
|
17
18
|
import { AnswersContainer } from '../AnswersContainer/AnswersContainer.esm.js';
|
|
18
19
|
import { UserStatsContent } from './UserStatsContent.esm.js';
|
|
19
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserPage.esm.js","sources":["../../../src/components/UserPage/UserPage.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { ContentHeader } from '@backstage/core-components';\nimport { useParams, useSearchParams } from 'react-router-dom';\nimport { QuestionsContainer } from '../QuestionsContainer';\nimport { AskQuestionButton } from '../Buttons/AskQuestionButton';\nimport { Box, Tab } from '@material-ui/core';\nimport { useEntityPresentation } from '@backstage/plugin-catalog-react';\nimport { TabContext, TabList, TabPanel } from '@material-ui/lab';\nimport { AnswersContainer } from '../AnswersContainer';\nimport { useTranslation } from '../../utils/hooks';\nimport { UserStatsContent } from './UserStatsContent';\n\nexport const UserPage = () => {\n const identity = useParams()['*'] ?? 'unknown';\n const presentation = useEntityPresentation(identity);\n const [tab, setTab] = useState('statistics');\n const { t } = useTranslation();\n const [_searchParams, setSearchParams] = useSearchParams();\n\n const handleChange = (_event: React.ChangeEvent<{}>, newValue: string) => {\n setSearchParams({});\n setTab(newValue);\n };\n return (\n <>\n <ContentHeader title={`${presentation.primaryTitle}`}>\n <AskQuestionButton />\n </ContentHeader>\n <TabContext value={tab}>\n <Box sx={{ borderBottom: 1, borderColor: 'divider' }}>\n <TabList\n onChange={handleChange}\n aria-label={t('userPage.profileTab')}\n >\n <Tab label={t('userPage.statistics')} value=\"statistics\" />\n <Tab label={t('userPage.questions')} value=\"questions\" />\n <Tab label={t('userPage.answers')} value=\"answers\" />\n </TabList>\n </Box>\n <TabPanel value=\"statistics\">\n <UserStatsContent userRef={identity ?? ''} />\n </TabPanel>\n <TabPanel value=\"questions\">\n <QuestionsContainer\n author={identity ?? ''}\n showNoQuestionsBtn={false}\n />\n </TabPanel>\n <TabPanel value=\"answers\">\n <AnswersContainer\n author={identity ?? ''}\n title={t('userPage.answers')}\n />\n </TabPanel>\n </TabContext>\n </>\n );\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UserPage.esm.js","sources":["../../../src/components/UserPage/UserPage.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { ContentHeader } from '@backstage/core-components';\nimport { useParams, useSearchParams } from 'react-router-dom';\nimport { QuestionsContainer } from '../QuestionsContainer';\nimport { AskQuestionButton } from '../Buttons/AskQuestionButton';\nimport { Box, Tab } from '@material-ui/core';\nimport { useEntityPresentation } from '@backstage/plugin-catalog-react';\nimport { TabContext, TabList, TabPanel } from '@material-ui/lab';\nimport { AnswersContainer } from '../AnswersContainer';\nimport { useTranslation } from '../../utils/hooks';\nimport { UserStatsContent } from './UserStatsContent';\n\nexport const UserPage = () => {\n const identity = useParams()['*'] ?? 'unknown';\n const presentation = useEntityPresentation(identity);\n const [tab, setTab] = useState('statistics');\n const { t } = useTranslation();\n const [_searchParams, setSearchParams] = useSearchParams();\n\n const handleChange = (_event: React.ChangeEvent<{}>, newValue: string) => {\n setSearchParams({});\n setTab(newValue);\n };\n return (\n <>\n <ContentHeader title={`${presentation.primaryTitle}`}>\n <AskQuestionButton />\n </ContentHeader>\n <TabContext value={tab}>\n <Box sx={{ borderBottom: 1, borderColor: 'divider' }}>\n <TabList\n onChange={handleChange}\n aria-label={t('userPage.profileTab')}\n >\n <Tab label={t('userPage.statistics')} value=\"statistics\" />\n <Tab label={t('userPage.questions')} value=\"questions\" />\n <Tab label={t('userPage.answers')} value=\"answers\" />\n </TabList>\n </Box>\n <TabPanel value=\"statistics\">\n <UserStatsContent userRef={identity ?? ''} />\n </TabPanel>\n <TabPanel value=\"questions\">\n <QuestionsContainer\n author={identity ?? ''}\n showNoQuestionsBtn={false}\n />\n </TabPanel>\n <TabPanel value=\"answers\">\n <AnswersContainer\n author={identity ?? ''}\n title={t('userPage.answers')}\n />\n </TabPanel>\n </TabContext>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAYO,MAAM,WAAW,MAAM;AAC5B,EAAA,MAAM,QAAW,GAAA,SAAA,EAAY,CAAA,GAAG,CAAK,IAAA,SAAA,CAAA;AACrC,EAAM,MAAA,YAAA,GAAe,sBAAsB,QAAQ,CAAA,CAAA;AACnD,EAAA,MAAM,CAAC,GAAA,EAAK,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AAA,EAAA,KAAA,EAAM,gCACb,KAAA,CAAA,aAAA,CAAA,gBAAA,EAAA,EAAiB,OAAS,EAAA,QAAA,IAAY,IAAI,CAC7C,CAAA,kBACC,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,OAAM,WACd,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,kBAAA;AAAA,IAAA;AAAA,MACC,QAAQ,QAAY,IAAA,EAAA;AAAA,MACpB,kBAAoB,EAAA,KAAA;AAAA,KAAA;AAAA,GAExB,CAAA,kBACC,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,OAAM,SACd,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,gBAAA;AAAA,IAAA;AAAA,MACC,QAAQ,QAAY,IAAA,EAAA;AAAA,MACpB,KAAA,EAAO,EAAE,kBAAkB,CAAA;AAAA,KAAA;AAAA,GAE/B,CACF,CACF,CAAA,CAAA;AAEJ;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -330,7 +330,7 @@ declare const qetaTranslationRef: _backstage_core_plugin_api_alpha.TranslationRe
|
|
|
330
330
|
readonly "homePage.title": "Home";
|
|
331
331
|
readonly "impactCard.title": "Your impact";
|
|
332
332
|
readonly "impactCard.views": "views";
|
|
333
|
-
readonly "impactCard.contributions": "Your contributions
|
|
333
|
+
readonly "impactCard.contributions": "Your contributions helped {{lastWeek}} people this week";
|
|
334
334
|
readonly "rightMenu.followedEntities": "Followed entities";
|
|
335
335
|
readonly "rightMenu.followedTags": "Followed tags";
|
|
336
336
|
readonly "highlights.loadError": "Failed to load questions";
|
package/dist/translation.esm.js
CHANGED
|
@@ -128,7 +128,7 @@ const qetaTranslationRef = createTranslationRef({
|
|
|
128
128
|
impactCard: {
|
|
129
129
|
title: "Your impact",
|
|
130
130
|
views: "views",
|
|
131
|
-
contributions: "Your contributions
|
|
131
|
+
contributions: "Your contributions helped {{lastWeek}} people this week"
|
|
132
132
|
},
|
|
133
133
|
rightMenu: {
|
|
134
134
|
followedEntities: "Followed entities",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation.esm.js","sources":["../src/translation.ts"],"sourcesContent":["import {\n createTranslationRef,\n createTranslationResource,\n} from '@backstage/core-plugin-api/alpha';\n\n/** @alpha */\nexport const qetaTranslationRef = createTranslationRef({\n id: 'qeta',\n messages: {\n pluginName: 'Q&A',\n answerList: {\n errorLoading: 'Could not load answers',\n noAnswers: 'No answers',\n limitSelect: 'Answers per page',\n },\n common: {\n score: '{{score}} score',\n anonymousAuthor: 'Anonymous',\n answers_zero: 'No answers',\n answers_one: '{{count}} answer',\n answers_other: '{{count}} answers',\n views_zero: 'Viewed {{count}} times',\n views_one: 'Viewed {{count}} time',\n views_other: 'Viewed {{count}} times',\n viewsShort_zero: '0 views',\n viewsShort_one: '{{count}} view',\n viewsShort_other: '{{count}} views',\n questions_zero: 'No questions',\n questions_one: '{{count}} question',\n questions_other: '{{count}} questions',\n },\n answer: {\n questionTitle: 'Q: {{question}}',\n answeredTime: 'answered',\n },\n answerContainer: {\n title: {\n answersBy: 'Answers by',\n answersAbout: 'Answers about',\n answersTagged: `Answers tagged with {{tags}}`,\n },\n search: {\n label: 'Search for answers',\n placeholder: 'Search...',\n },\n },\n anonymousCheckbox: {\n tooltip:\n \"By enabling this, other users won't be able to see you as an author\",\n answerAnonymously: 'Answer anonymously',\n askAnonymously: 'Ask anonymously',\n },\n askForm: {\n errorPosting: 'Could not post question',\n titleInput: {\n label: 'Title',\n helperText:\n 'Write good title for your question that people can understand',\n },\n contentInput: {\n placeholder: 'Your question',\n },\n submit: {\n existingQuestion: 'Save',\n newQuestion: 'Post',\n },\n },\n answerForm: {\n errorPosting: 'Could not post answer',\n contentInput: {\n placeholder: 'Your answer',\n },\n submit: {\n existingAnswer: 'Save',\n newAnswer: 'Post',\n },\n },\n entitiesInput: {\n label: 'Entities',\n placeholder: 'Type or select entities',\n helperText: 'Add up to {{max}} entities this question relates to',\n },\n tagsInput: {\n label: 'Tags',\n placeholder: 'Type or select tags',\n helperText: 'Add up to {{max}} tags to categorize your question',\n },\n askPage: {\n title: {\n existingQuestion: 'Edit question',\n entityQuestion: 'Ask a question about {{entity}}',\n newQuestion: 'Ask a question',\n },\n },\n askQuestionButton: {\n title: 'Ask a question',\n },\n backToQuestionsButton: {\n title: 'Back',\n },\n commentList: {\n deleteLink: 'delete',\n },\n commentSection: {\n input: {\n placeholder: 'Your comment',\n },\n addComment: 'Add comment',\n post: 'Post',\n },\n deleteModal: {\n title: {\n question: 'Are you sure you want to delete this question?',\n answer: 'Are you sure you want to delete this answer?',\n },\n errorDeleting: 'Failed to delete',\n deleteButton: 'Delete',\n cancelButton: 'Cancel',\n },\n favoritePage: {\n title: 'Your favorite questions',\n },\n leftMenu: {\n home: 'Home',\n questions: 'Questions',\n profile: 'Profile',\n tags: 'Tags',\n favoriteQuestions: 'Favorites',\n statistics: 'Statistics',\n },\n homePage: {\n title: 'Home',\n },\n impactCard: {\n title: 'Your impact',\n views: 'views',\n contributions: 'Your contributions have made a difference',\n },\n rightMenu: {\n followedEntities: 'Followed entities',\n followedTags: 'Followed tags',\n },\n highlights: {\n loadError: 'Failed to load questions',\n own: {\n title: 'Your latest questions',\n noQuestionsLabel: 'No questions',\n },\n hot: {\n title: 'Hot questions',\n noQuestionsLabel: 'No questions',\n },\n unanswered: {\n title: 'Unanswered questions',\n noQuestionsLabel: 'No unanswered questions',\n },\n incorrect: {\n title: 'Questions without correct answer',\n noQuestionsLabel: 'No questions without correct answers',\n },\n },\n questionsPage: {\n title: 'All questions',\n },\n userLink: {\n anonymous: 'Anonymous',\n },\n questionPage: {\n errorLoading: 'Could not load question',\n editButton: 'Edit',\n sortAnswers: {\n label: 'Sort answers',\n default: 'Default',\n createdDesc: 'Created (desc)',\n createdAsc: 'Created (asc)',\n scoreDesc: 'Score (desc)',\n scoreAsc: 'Score (asc)',\n commentsDesc: 'Comments (desc)',\n commentsAsc: 'Comments (asc)',\n authorDesc: 'Author (desc)',\n authorAsc: 'Author (asc)',\n updatedDesc: 'Updated (desc)',\n updatedAsc: 'Updated (asc)',\n },\n },\n authorBox: {\n askedAtTime: 'asked',\n postedAtTime: 'Posted',\n updatedAtTime: 'Updated',\n updatedBy: 'by',\n },\n favorite: {\n remove: 'Remove this question from favorites',\n add: 'Mark this question as favorite',\n },\n link: {\n question: 'Copy link to this question to clipboard',\n answer: 'Copy link to this answer to clipboard',\n aria: 'Copy link to clipboard',\n },\n voteButtons: {\n answer: {\n markCorrect: 'Mark this answer correct',\n markIncorrect: 'Mark this answer incorrect',\n marked: 'This answer has been marked as correct',\n good: 'This answer is good',\n bad: 'This answer is not good',\n own: 'You cannot vote your own answer',\n },\n question: {\n good: 'This question is good',\n bad: 'This question is not good',\n own: 'You cannot vote your own question',\n },\n },\n datePicker: {\n from: 'From date',\n to: 'To date',\n invalidRange:\n \"Date range invalid, 'To date' should be greater than 'From date'\",\n range: {\n label: 'Date range',\n default: 'Select',\n last7days: 'Last 7 days',\n last30days: 'Last 30 days',\n custom: 'Custom',\n },\n },\n filterPanel: {\n filterButton: 'Filter',\n noAnswers: {\n label: 'No answers',\n },\n noCorrectAnswers: {\n label: 'No correct answers',\n },\n noVotes: {\n label: 'No votes',\n },\n orderBy: {\n label: 'Order by',\n created: 'Created',\n views: 'Views',\n score: 'Score',\n answers: 'Answers',\n updated: 'Updated',\n },\n order: {\n label: 'Order',\n asc: 'Ascending',\n desc: 'Descending',\n },\n filters: {\n label: 'Filters',\n entity: {\n label: 'Entity',\n placeholder: 'Type or select entity',\n },\n tag: {\n label: 'Tag',\n placeholder: 'Type or select tag',\n },\n },\n },\n questionList: {\n errorLoading: 'Could not load questions',\n questionsPerPage: 'Questions per page',\n },\n questionsContainer: {\n title: {\n questionsBy: 'Questions by',\n questionsAbout: 'Questions about',\n questionsTagged: `Questions tagged with {{tags}}`,\n favorite: 'Your favorite questions',\n },\n search: {\n label: 'Search for questions',\n placeholder: 'Search...',\n },\n noQuestions: 'No questions found',\n askOneButton: 'Go ahead and ask one!',\n },\n questionsTable: {\n errorLoading: 'Could not load questions',\n latest: 'Latest',\n mostViewed: 'Most viewed',\n favorites: 'Favorites',\n cells: {\n title: 'Title',\n author: 'Author',\n asked: 'Asked',\n updated: 'Last updated',\n },\n },\n statistics: {\n errorLoading: 'Could not load statistics',\n notAvailable: 'Statistics are unavailable',\n ranking: 'Ranking Q&A 🏆',\n mostQuestions: {\n title: 'Most questions',\n description: 'People who have posted most questions',\n },\n mostAnswers: {\n title: 'Most answers',\n description: 'People who have posted most answers',\n },\n topVotedQuestions: {\n title: 'Top voted questions',\n description: 'People who have the highest rated questions',\n },\n topVotedAnswers: {\n title: 'Top voted answers',\n description: 'People who have the highest rated answers',\n },\n topVotedCorrectAnswers: {\n title: 'Top voted correct answers',\n description: 'People who have the highest rated correct answers',\n },\n },\n tagPage: {\n errorLoading: 'Could not load tags',\n taggedWithTitle: 'Questions tagged with {{tag}}',\n defaultTitle: 'Tags',\n search: {\n label: 'Search tag',\n placeholder: 'Search...',\n },\n tags_zero: 'No tags',\n tags_one: 'Showing {{count}} tag',\n tags_other: 'Showing {{count}} tags',\n },\n userPage: {\n profileTab: 'Profile',\n statistics: 'Statistics',\n questions: 'Questions',\n answers: 'Answers',\n },\n stats: {\n noStats: 'No statistics available. Check back later!',\n questions: 'Questions',\n answers: 'Answers',\n comments: 'Comments',\n votes: 'Votes',\n views: 'Views',\n },\n tagButton: {\n follow: 'Follow',\n unfollow: 'Unfollow',\n tooltip:\n 'By following a tag, you will get notified when ever a new question with that tag is posted',\n },\n entityButton: {\n follow: 'Follow',\n unfollow: 'Unfollow',\n tooltip:\n 'By following an entity, you will get notified when ever a new question for that entity is posted',\n },\n },\n});\n\nexport const qetaTranslations = createTranslationResource({\n ref: qetaTranslationRef,\n translations: {\n fi: () => import('./locale/fi'),\n },\n});\n"],"names":[],"mappings":";;AAMO,MAAM,qBAAqB,oBAAqB,CAAA;AAAA,EACrD,EAAI,EAAA,MAAA;AAAA,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|
+
{"version":3,"file":"translation.esm.js","sources":["../src/translation.ts"],"sourcesContent":["import {\n createTranslationRef,\n createTranslationResource,\n} from '@backstage/core-plugin-api/alpha';\n\n/** @alpha */\nexport const qetaTranslationRef = createTranslationRef({\n id: 'qeta',\n messages: {\n pluginName: 'Q&A',\n answerList: {\n errorLoading: 'Could not load answers',\n noAnswers: 'No answers',\n limitSelect: 'Answers per page',\n },\n common: {\n score: '{{score}} score',\n anonymousAuthor: 'Anonymous',\n answers_zero: 'No answers',\n answers_one: '{{count}} answer',\n answers_other: '{{count}} answers',\n views_zero: 'Viewed {{count}} times',\n views_one: 'Viewed {{count}} time',\n views_other: 'Viewed {{count}} times',\n viewsShort_zero: '0 views',\n viewsShort_one: '{{count}} view',\n viewsShort_other: '{{count}} views',\n questions_zero: 'No questions',\n questions_one: '{{count}} question',\n questions_other: '{{count}} questions',\n },\n answer: {\n questionTitle: 'Q: {{question}}',\n answeredTime: 'answered',\n },\n answerContainer: {\n title: {\n answersBy: 'Answers by',\n answersAbout: 'Answers about',\n answersTagged: `Answers tagged with {{tags}}`,\n },\n search: {\n label: 'Search for answers',\n placeholder: 'Search...',\n },\n },\n anonymousCheckbox: {\n tooltip:\n \"By enabling this, other users won't be able to see you as an author\",\n answerAnonymously: 'Answer anonymously',\n askAnonymously: 'Ask anonymously',\n },\n askForm: {\n errorPosting: 'Could not post question',\n titleInput: {\n label: 'Title',\n helperText:\n 'Write good title for your question that people can understand',\n },\n contentInput: {\n placeholder: 'Your question',\n },\n submit: {\n existingQuestion: 'Save',\n newQuestion: 'Post',\n },\n },\n answerForm: {\n errorPosting: 'Could not post answer',\n contentInput: {\n placeholder: 'Your answer',\n },\n submit: {\n existingAnswer: 'Save',\n newAnswer: 'Post',\n },\n },\n entitiesInput: {\n label: 'Entities',\n placeholder: 'Type or select entities',\n helperText: 'Add up to {{max}} entities this question relates to',\n },\n tagsInput: {\n label: 'Tags',\n placeholder: 'Type or select tags',\n helperText: 'Add up to {{max}} tags to categorize your question',\n },\n askPage: {\n title: {\n existingQuestion: 'Edit question',\n entityQuestion: 'Ask a question about {{entity}}',\n newQuestion: 'Ask a question',\n },\n },\n askQuestionButton: {\n title: 'Ask a question',\n },\n backToQuestionsButton: {\n title: 'Back',\n },\n commentList: {\n deleteLink: 'delete',\n },\n commentSection: {\n input: {\n placeholder: 'Your comment',\n },\n addComment: 'Add comment',\n post: 'Post',\n },\n deleteModal: {\n title: {\n question: 'Are you sure you want to delete this question?',\n answer: 'Are you sure you want to delete this answer?',\n },\n errorDeleting: 'Failed to delete',\n deleteButton: 'Delete',\n cancelButton: 'Cancel',\n },\n favoritePage: {\n title: 'Your favorite questions',\n },\n leftMenu: {\n home: 'Home',\n questions: 'Questions',\n profile: 'Profile',\n tags: 'Tags',\n favoriteQuestions: 'Favorites',\n statistics: 'Statistics',\n },\n homePage: {\n title: 'Home',\n },\n impactCard: {\n title: 'Your impact',\n views: 'views',\n contributions: 'Your contributions helped {{lastWeek}} people this week',\n },\n rightMenu: {\n followedEntities: 'Followed entities',\n followedTags: 'Followed tags',\n },\n highlights: {\n loadError: 'Failed to load questions',\n own: {\n title: 'Your latest questions',\n noQuestionsLabel: 'No questions',\n },\n hot: {\n title: 'Hot questions',\n noQuestionsLabel: 'No questions',\n },\n unanswered: {\n title: 'Unanswered questions',\n noQuestionsLabel: 'No unanswered questions',\n },\n incorrect: {\n title: 'Questions without correct answer',\n noQuestionsLabel: 'No questions without correct answers',\n },\n },\n questionsPage: {\n title: 'All questions',\n },\n userLink: {\n anonymous: 'Anonymous',\n },\n questionPage: {\n errorLoading: 'Could not load question',\n editButton: 'Edit',\n sortAnswers: {\n label: 'Sort answers',\n default: 'Default',\n createdDesc: 'Created (desc)',\n createdAsc: 'Created (asc)',\n scoreDesc: 'Score (desc)',\n scoreAsc: 'Score (asc)',\n commentsDesc: 'Comments (desc)',\n commentsAsc: 'Comments (asc)',\n authorDesc: 'Author (desc)',\n authorAsc: 'Author (asc)',\n updatedDesc: 'Updated (desc)',\n updatedAsc: 'Updated (asc)',\n },\n },\n authorBox: {\n askedAtTime: 'asked',\n postedAtTime: 'Posted',\n updatedAtTime: 'Updated',\n updatedBy: 'by',\n },\n favorite: {\n remove: 'Remove this question from favorites',\n add: 'Mark this question as favorite',\n },\n link: {\n question: 'Copy link to this question to clipboard',\n answer: 'Copy link to this answer to clipboard',\n aria: 'Copy link to clipboard',\n },\n voteButtons: {\n answer: {\n markCorrect: 'Mark this answer correct',\n markIncorrect: 'Mark this answer incorrect',\n marked: 'This answer has been marked as correct',\n good: 'This answer is good',\n bad: 'This answer is not good',\n own: 'You cannot vote your own answer',\n },\n question: {\n good: 'This question is good',\n bad: 'This question is not good',\n own: 'You cannot vote your own question',\n },\n },\n datePicker: {\n from: 'From date',\n to: 'To date',\n invalidRange:\n \"Date range invalid, 'To date' should be greater than 'From date'\",\n range: {\n label: 'Date range',\n default: 'Select',\n last7days: 'Last 7 days',\n last30days: 'Last 30 days',\n custom: 'Custom',\n },\n },\n filterPanel: {\n filterButton: 'Filter',\n noAnswers: {\n label: 'No answers',\n },\n noCorrectAnswers: {\n label: 'No correct answers',\n },\n noVotes: {\n label: 'No votes',\n },\n orderBy: {\n label: 'Order by',\n created: 'Created',\n views: 'Views',\n score: 'Score',\n answers: 'Answers',\n updated: 'Updated',\n },\n order: {\n label: 'Order',\n asc: 'Ascending',\n desc: 'Descending',\n },\n filters: {\n label: 'Filters',\n entity: {\n label: 'Entity',\n placeholder: 'Type or select entity',\n },\n tag: {\n label: 'Tag',\n placeholder: 'Type or select tag',\n },\n },\n },\n questionList: {\n errorLoading: 'Could not load questions',\n questionsPerPage: 'Questions per page',\n },\n questionsContainer: {\n title: {\n questionsBy: 'Questions by',\n questionsAbout: 'Questions about',\n questionsTagged: `Questions tagged with {{tags}}`,\n favorite: 'Your favorite questions',\n },\n search: {\n label: 'Search for questions',\n placeholder: 'Search...',\n },\n noQuestions: 'No questions found',\n askOneButton: 'Go ahead and ask one!',\n },\n questionsTable: {\n errorLoading: 'Could not load questions',\n latest: 'Latest',\n mostViewed: 'Most viewed',\n favorites: 'Favorites',\n cells: {\n title: 'Title',\n author: 'Author',\n asked: 'Asked',\n updated: 'Last updated',\n },\n },\n statistics: {\n errorLoading: 'Could not load statistics',\n notAvailable: 'Statistics are unavailable',\n ranking: 'Ranking Q&A 🏆',\n mostQuestions: {\n title: 'Most questions',\n description: 'People who have posted most questions',\n },\n mostAnswers: {\n title: 'Most answers',\n description: 'People who have posted most answers',\n },\n topVotedQuestions: {\n title: 'Top voted questions',\n description: 'People who have the highest rated questions',\n },\n topVotedAnswers: {\n title: 'Top voted answers',\n description: 'People who have the highest rated answers',\n },\n topVotedCorrectAnswers: {\n title: 'Top voted correct answers',\n description: 'People who have the highest rated correct answers',\n },\n },\n tagPage: {\n errorLoading: 'Could not load tags',\n taggedWithTitle: 'Questions tagged with {{tag}}',\n defaultTitle: 'Tags',\n search: {\n label: 'Search tag',\n placeholder: 'Search...',\n },\n tags_zero: 'No tags',\n tags_one: 'Showing {{count}} tag',\n tags_other: 'Showing {{count}} tags',\n },\n userPage: {\n profileTab: 'Profile',\n statistics: 'Statistics',\n questions: 'Questions',\n answers: 'Answers',\n },\n stats: {\n noStats: 'No statistics available. Check back later!',\n questions: 'Questions',\n answers: 'Answers',\n comments: 'Comments',\n votes: 'Votes',\n views: 'Views',\n },\n tagButton: {\n follow: 'Follow',\n unfollow: 'Unfollow',\n tooltip:\n 'By following a tag, you will get notified when ever a new question with that tag is posted',\n },\n entityButton: {\n follow: 'Follow',\n unfollow: 'Unfollow',\n tooltip:\n 'By following an entity, you will get notified when ever a new question for that entity is posted',\n },\n },\n});\n\nexport const qetaTranslations = createTranslationResource({\n ref: qetaTranslationRef,\n translations: {\n fi: () => import('./locale/fi'),\n },\n});\n"],"names":[],"mappings":";;AAMO,MAAM,qBAAqB,oBAAqB,CAAA;AAAA,EACrD,EAAI,EAAA,MAAA;AAAA,EACJ,QAAU,EAAA;AAAA,IACR,UAAY,EAAA,KAAA;AAAA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
|
|
8
8
|
"backstage.io"
|
|
9
9
|
],
|
|
10
|
-
"version": "2.
|
|
10
|
+
"version": "2.15.0",
|
|
11
11
|
"main": "dist/index.esm.js",
|
|
12
12
|
"types": "dist/index.d.ts",
|
|
13
13
|
"prepublishOnly": "yarn tsc && yarn build",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"@backstage/plugin-home-react": "^0.1.18",
|
|
58
58
|
"@backstage/plugin-permission-react": "^0.4.27",
|
|
59
59
|
"@backstage/plugin-signals-react": "^0.0.6",
|
|
60
|
-
"@drodil/backstage-plugin-qeta-common": "^2.
|
|
61
|
-
"@drodil/backstage-plugin-qeta-react": "^2.
|
|
60
|
+
"@drodil/backstage-plugin-qeta-common": "^2.15.0",
|
|
61
|
+
"@drodil/backstage-plugin-qeta-react": "^2.15.0",
|
|
62
62
|
"@material-ui/core": "^4.12.2",
|
|
63
63
|
"@material-ui/icons": "^4.11.3",
|
|
64
64
|
"@material-ui/lab": "4.0.0-alpha.61",
|