@drodil/backstage-plugin-qeta-react 3.4.0 → 3.5.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/AIAnswerCard/AIAnswerCard.esm.js +64 -0
- package/dist/components/AIAnswerCard/AIAnswerCard.esm.js.map +1 -0
- package/dist/components/Buttons/VoteButtons.esm.js +1 -1
- package/dist/components/Buttons/VoteButtons.esm.js.map +1 -1
- package/dist/components/CollectionsGrid/CollectionsGrid.esm.js +4 -0
- package/dist/components/CollectionsGrid/CollectionsGrid.esm.js.map +1 -1
- package/dist/components/CollectionsGrid/NoCollectionsCard.esm.js +25 -0
- package/dist/components/CollectionsGrid/NoCollectionsCard.esm.js.map +1 -0
- package/dist/components/EntitiesGrid/EntitiesGrid.esm.js +4 -0
- package/dist/components/EntitiesGrid/EntitiesGrid.esm.js.map +1 -1
- package/dist/components/EntitiesGrid/NoEntitiesCard.esm.js +25 -0
- package/dist/components/EntitiesGrid/NoEntitiesCard.esm.js.map +1 -0
- package/dist/components/HomePageCards/PostsCard.esm.js +0 -1
- package/dist/components/HomePageCards/PostsCard.esm.js.map +1 -1
- package/dist/components/PostForm/PostForm.esm.js +2 -1
- package/dist/components/PostForm/PostForm.esm.js.map +1 -1
- package/dist/components/PostsContainer/PostsContainer.esm.js +4 -7
- package/dist/components/PostsContainer/PostsContainer.esm.js.map +1 -1
- package/dist/components/PostsGrid/PostsGrid.esm.js +6 -9
- package/dist/components/PostsGrid/PostsGrid.esm.js.map +1 -1
- package/dist/components/TagsGrid/NoTagsCard.esm.js +25 -0
- package/dist/components/TagsGrid/NoTagsCard.esm.js.map +1 -0
- package/dist/components/TagsGrid/TagsGrid.esm.js +4 -0
- package/dist/components/TagsGrid/TagsGrid.esm.js.map +1 -1
- package/dist/components/UsersGrid/NoUsersCard.esm.js +25 -0
- package/dist/components/UsersGrid/NoUsersCard.esm.js.map +1 -0
- package/dist/components/UsersGrid/UsersGrid.esm.js +4 -0
- package/dist/components/UsersGrid/UsersGrid.esm.js.map +1 -1
- package/dist/hooks/useAI.esm.js +52 -0
- package/dist/hooks/useAI.esm.js.map +1 -0
- package/dist/hooks/useVoting.esm.js +30 -0
- package/dist/hooks/useVoting.esm.js.map +1 -1
- package/dist/index.d.ts +39 -13
- package/dist/index.esm.js +2 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/translation.esm.js +3 -6
- package/dist/translation.esm.js.map +1 -1
- package/package.json +3 -2
- package/dist/components/Buttons/BackToArticlesButton.esm.js +0 -44
- package/dist/components/Buttons/BackToArticlesButton.esm.js.map +0 -1
- package/dist/components/Buttons/BackToCollectionsButton.esm.js +0 -29
- package/dist/components/Buttons/BackToCollectionsButton.esm.js.map +0 -1
- package/dist/components/Buttons/BackToQuestionsButton.esm.js +0 -44
- package/dist/components/Buttons/BackToQuestionsButton.esm.js.map +0 -1
|
@@ -9,6 +9,7 @@ import 'react-use/lib/useAsync';
|
|
|
9
9
|
import { QetaPagination } from '../QetaPagination/QetaPagination.esm.js';
|
|
10
10
|
import useDebounce from 'react-use/lib/useDebounce';
|
|
11
11
|
import { TagsGridContent } from './TagsGridContent.esm.js';
|
|
12
|
+
import { NoTagsCard } from './NoTagsCard.esm.js';
|
|
12
13
|
|
|
13
14
|
const TagsGrid = () => {
|
|
14
15
|
const [page, setPage] = React.useState(1);
|
|
@@ -55,6 +56,9 @@ const TagsGrid = () => {
|
|
|
55
56
|
const onTagEdit = () => {
|
|
56
57
|
retry();
|
|
57
58
|
};
|
|
59
|
+
if (!response?.tags || response.tags.length === 0) {
|
|
60
|
+
return /* @__PURE__ */ React.createElement(NoTagsCard, null);
|
|
61
|
+
}
|
|
58
62
|
return /* @__PURE__ */ React.createElement(Grid, { container: true, className: "qetaTagsContainer" }, /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(
|
|
59
63
|
TextField,
|
|
60
64
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagsGrid.esm.js","sources":["../../../src/components/TagsGrid/TagsGrid.tsx"],"sourcesContent":["import { Grid, IconButton, TextField } from '@material-ui/core';\nimport React, { useEffect } from 'react';\nimport { useQetaApi, useTranslation } from '../../hooks';\nimport { QetaPagination } from '../QetaPagination/QetaPagination';\nimport useDebounce from 'react-use/lib/useDebounce';\nimport { TagsGridContent } from './TagsGridContent';\n\ntype TagFilters = {\n order: 'asc' | 'desc';\n orderBy: 'tag' | 'followersCount' | 'postsCount';\n searchQuery: string;\n};\n\nexport const TagsGrid = () => {\n const [page, setPage] = React.useState(1);\n const [pageCount, setPageCount] = React.useState(1);\n const [tagsPerPage, setTagsPerPage] = React.useState(25);\n const [searchQuery, setSearchQuery] = React.useState('');\n const { t } = useTranslation();\n const [filters, setFilters] = React.useState<TagFilters>({\n order: 'desc',\n orderBy: 'tag',\n searchQuery: '',\n });\n\n const onSearchQueryChange = (val: string) => {\n setPage(1);\n setSearchQuery(val);\n };\n\n const {\n value: response,\n loading,\n error,\n retry,\n } = useQetaApi(\n api =>\n api.getTags({\n limit: tagsPerPage,\n offset: (page - 1) * tagsPerPage,\n ...filters,\n }),\n [page, tagsPerPage, filters],\n );\n\n useDebounce(\n () => {\n if (filters.searchQuery !== searchQuery) {\n setFilters({ ...filters, searchQuery: searchQuery });\n }\n },\n 400,\n [searchQuery],\n );\n\n useEffect(() => {\n if (response) {\n setPageCount(Math.ceil(response.total / tagsPerPage));\n }\n }, [response, tagsPerPage]);\n\n const onTagEdit = () => {\n retry();\n };\n\n return (\n <Grid container className=\"qetaTagsContainer\">\n <Grid item xs={12}>\n <TextField\n id=\"search-bar\"\n className=\"text qetaTagsContainerSearchInput\"\n onChange={(\n event: React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>,\n ) => onSearchQueryChange(event.target.value)}\n value={searchQuery}\n label={t('tagPage.search.label')}\n variant=\"outlined\"\n placeholder={t('tagPage.search.placeholder')}\n size=\"small\"\n />\n <IconButton type=\"submit\" aria-label=\"search\" />\n </Grid>\n\n <TagsGridContent\n response={response}\n onTagEdit={onTagEdit}\n loading={loading}\n error={error}\n />\n <QetaPagination\n pageSize={tagsPerPage}\n handlePageChange={(_e, p) => setPage(p)}\n handlePageSizeChange={e => setTagsPerPage(Number(e.target.value))}\n page={page}\n pageCount={pageCount}\n />\n </Grid>\n );\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TagsGrid.esm.js","sources":["../../../src/components/TagsGrid/TagsGrid.tsx"],"sourcesContent":["import { Grid, IconButton, TextField } from '@material-ui/core';\nimport React, { useEffect } from 'react';\nimport { useQetaApi, useTranslation } from '../../hooks';\nimport { QetaPagination } from '../QetaPagination/QetaPagination';\nimport useDebounce from 'react-use/lib/useDebounce';\nimport { TagsGridContent } from './TagsGridContent';\nimport { NoTagsCard } from './NoTagsCard';\n\ntype TagFilters = {\n order: 'asc' | 'desc';\n orderBy: 'tag' | 'followersCount' | 'postsCount';\n searchQuery: string;\n};\n\nexport const TagsGrid = () => {\n const [page, setPage] = React.useState(1);\n const [pageCount, setPageCount] = React.useState(1);\n const [tagsPerPage, setTagsPerPage] = React.useState(25);\n const [searchQuery, setSearchQuery] = React.useState('');\n const { t } = useTranslation();\n const [filters, setFilters] = React.useState<TagFilters>({\n order: 'desc',\n orderBy: 'tag',\n searchQuery: '',\n });\n\n const onSearchQueryChange = (val: string) => {\n setPage(1);\n setSearchQuery(val);\n };\n\n const {\n value: response,\n loading,\n error,\n retry,\n } = useQetaApi(\n api =>\n api.getTags({\n limit: tagsPerPage,\n offset: (page - 1) * tagsPerPage,\n ...filters,\n }),\n [page, tagsPerPage, filters],\n );\n\n useDebounce(\n () => {\n if (filters.searchQuery !== searchQuery) {\n setFilters({ ...filters, searchQuery: searchQuery });\n }\n },\n 400,\n [searchQuery],\n );\n\n useEffect(() => {\n if (response) {\n setPageCount(Math.ceil(response.total / tagsPerPage));\n }\n }, [response, tagsPerPage]);\n\n const onTagEdit = () => {\n retry();\n };\n\n if (!response?.tags || response.tags.length === 0) {\n return <NoTagsCard />;\n }\n\n return (\n <Grid container className=\"qetaTagsContainer\">\n <Grid item xs={12}>\n <TextField\n id=\"search-bar\"\n className=\"text qetaTagsContainerSearchInput\"\n onChange={(\n event: React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>,\n ) => onSearchQueryChange(event.target.value)}\n value={searchQuery}\n label={t('tagPage.search.label')}\n variant=\"outlined\"\n placeholder={t('tagPage.search.placeholder')}\n size=\"small\"\n />\n <IconButton type=\"submit\" aria-label=\"search\" />\n </Grid>\n\n <TagsGridContent\n response={response}\n onTagEdit={onTagEdit}\n loading={loading}\n error={error}\n />\n <QetaPagination\n pageSize={tagsPerPage}\n handlePageChange={(_e, p) => setPage(p)}\n handlePageSizeChange={e => setTagsPerPage(Number(e.target.value))}\n page={page}\n pageCount={pageCount}\n />\n </Grid>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAcO,MAAM,WAAW,MAAM;AAC5B,EAAA,MAAM,CAAC,IAAM,EAAA,OAAO,CAAI,GAAA,KAAA,CAAM,SAAS,CAAC,CAAA,CAAA;AACxC,EAAA,MAAM,CAAC,SAAW,EAAA,YAAY,CAAI,GAAA,KAAA,CAAM,SAAS,CAAC,CAAA,CAAA;AAClD,EAAA,MAAM,CAAC,WAAa,EAAA,cAAc,CAAI,GAAA,KAAA,CAAM,SAAS,EAAE,CAAA,CAAA;AACvD,EAAA,MAAM,CAAC,WAAa,EAAA,cAAc,CAAI,GAAA,KAAA,CAAM,SAAS,EAAE,CAAA,CAAA;AACvD,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA,CAAA;AAC7B,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,MAAM,QAAqB,CAAA;AAAA,IACvD,KAAO,EAAA,MAAA;AAAA,IACP,OAAS,EAAA,KAAA;AAAA,IACT,WAAa,EAAA,EAAA;AAAA,GACd,CAAA,CAAA;AAED,EAAM,MAAA,mBAAA,GAAs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
3
|
+
import '@backstage/core-plugin-api';
|
|
4
|
+
import '../../api.esm.js';
|
|
5
|
+
import 'react-use';
|
|
6
|
+
import { useTranslation } from '../../hooks/useTranslation.esm.js';
|
|
7
|
+
import '../../hooks/useStyles.esm.js';
|
|
8
|
+
import 'react-use/lib/useAsync';
|
|
9
|
+
|
|
10
|
+
const NoUsersCard = () => {
|
|
11
|
+
const { t } = useTranslation();
|
|
12
|
+
return /* @__PURE__ */ React.createElement(Card, { style: { marginTop: "2rem" } }, /* @__PURE__ */ React.createElement(CardContent, null, /* @__PURE__ */ React.createElement(
|
|
13
|
+
Grid,
|
|
14
|
+
{
|
|
15
|
+
container: true,
|
|
16
|
+
justifyContent: "center",
|
|
17
|
+
alignItems: "center",
|
|
18
|
+
direction: "column"
|
|
19
|
+
},
|
|
20
|
+
/* @__PURE__ */ React.createElement(Grid, { item: true }, /* @__PURE__ */ React.createElement(Typography, { variant: "h6" }, t(`usersPage.users`, { count: 0 })))
|
|
21
|
+
)));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { NoUsersCard };
|
|
25
|
+
//# sourceMappingURL=NoUsersCard.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NoUsersCard.esm.js","sources":["../../../src/components/UsersGrid/NoUsersCard.tsx"],"sourcesContent":["import { Card, CardContent, Grid, Typography } from '@material-ui/core';\nimport React from 'react';\nimport { useTranslation } from '../../hooks';\n\nexport const NoUsersCard = () => {\n const { t } = useTranslation();\n\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\">\n {t(`usersPage.users`, { count: 0 })}\n </Typography>\n </Grid>\n </Grid>\n </CardContent>\n </Card>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAIO,MAAM,cAAc,MAAM;AAC/B,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA,CAAA;AAE7B,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,KAAO,EAAA,EAAE,WAAW,MAAO,EAAA,EAAA,sCAC9B,WACC,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,SAAS,EAAA,IAAA;AAAA,MACT,cAAe,EAAA,QAAA;AAAA,MACf,UAAW,EAAA,QAAA;AAAA,MACX,SAAU,EAAA,QAAA;AAAA,KAAA;AAAA,oBAET,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,IAAI,EAAA,IAAA,EAAA,sCACP,UAAW,EAAA,EAAA,OAAA,EAAQ,IACjB,EAAA,EAAA,CAAA,CAAE,mBAAmB,EAAE,KAAA,EAAO,CAAE,EAAC,CACpC,CACF,CAAA;AAAA,GAEJ,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -9,6 +9,7 @@ import 'react-use/lib/useAsync';
|
|
|
9
9
|
import { QetaPagination } from '../QetaPagination/QetaPagination.esm.js';
|
|
10
10
|
import { UsersGridContent } from './UsersGridContent.esm.js';
|
|
11
11
|
import useDebounce from 'react-use/lib/useDebounce';
|
|
12
|
+
import { NoUsersCard } from './NoUsersCard.esm.js';
|
|
12
13
|
|
|
13
14
|
const UsersGrid = () => {
|
|
14
15
|
const [page, setPage] = React.useState(1);
|
|
@@ -46,6 +47,9 @@ const UsersGrid = () => {
|
|
|
46
47
|
setPageCount(Math.ceil(response.total / entitiesPerPage));
|
|
47
48
|
}
|
|
48
49
|
}, [response, entitiesPerPage]);
|
|
50
|
+
if (!response?.users || response.users.length === 0) {
|
|
51
|
+
return /* @__PURE__ */ React.createElement(NoUsersCard, null);
|
|
52
|
+
}
|
|
49
53
|
return /* @__PURE__ */ React.createElement(Grid, { container: true, className: "qetaUsersContainer" }, /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(
|
|
50
54
|
TextField,
|
|
51
55
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UsersGrid.esm.js","sources":["../../../src/components/UsersGrid/UsersGrid.tsx"],"sourcesContent":["import { Grid, IconButton, TextField } from '@material-ui/core';\nimport React, { useEffect } from 'react';\nimport { useQetaApi, useTranslation } from '../../hooks';\nimport { QetaPagination } from '../QetaPagination/QetaPagination';\nimport { UsersGridContent } from './UsersGridContent';\nimport useDebounce from 'react-use/lib/useDebounce';\n\ntype EntityFilters = {\n order: 'asc' | 'desc';\n orderBy?: 'userRef';\n searchQuery: string;\n};\n\nexport const UsersGrid = () => {\n const [page, setPage] = React.useState(1);\n const [pageCount, setPageCount] = React.useState(1);\n const [entitiesPerPage, setEntitiesPerPage] = React.useState(25);\n const [searchQuery, setSearchQuery] = React.useState('');\n const [filters, setFilters] = React.useState<EntityFilters>({\n order: 'desc',\n searchQuery: '',\n });\n const { t } = useTranslation();\n\n const {\n value: response,\n loading,\n error,\n } = useQetaApi(\n api =>\n api.getUsers({\n limit: entitiesPerPage,\n offset: (page - 1) * entitiesPerPage,\n ...filters,\n }),\n [entitiesPerPage, page, filters],\n );\n\n useDebounce(\n () => {\n if (filters.searchQuery !== searchQuery) {\n setFilters({ ...filters, searchQuery: searchQuery });\n }\n },\n 400,\n [searchQuery],\n );\n\n useEffect(() => {\n if (response) {\n setPageCount(Math.ceil(response.total / entitiesPerPage));\n }\n }, [response, entitiesPerPage]);\n\n return (\n <Grid container className=\"qetaUsersContainer\">\n <Grid item xs={12}>\n <TextField\n id=\"search-bar\"\n className=\"text qetaUsersContainerSearchInput\"\n onChange={(\n event: React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>,\n ) => setSearchQuery(event.target.value)}\n label={t('usersPage.search.label')}\n variant=\"outlined\"\n placeholder={t('usersPage.search.placeholder')}\n size=\"small\"\n />\n <IconButton type=\"submit\" aria-label=\"search\" />\n </Grid>\n <UsersGridContent response={response} loading={loading} error={error} />\n <QetaPagination\n pageSize={entitiesPerPage}\n handlePageChange={(_e, p) => setPage(p)}\n handlePageSizeChange={e => setEntitiesPerPage(Number(e.target.value))}\n page={page}\n pageCount={pageCount}\n />\n </Grid>\n );\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UsersGrid.esm.js","sources":["../../../src/components/UsersGrid/UsersGrid.tsx"],"sourcesContent":["import { Grid, IconButton, TextField } from '@material-ui/core';\nimport React, { useEffect } from 'react';\nimport { useQetaApi, useTranslation } from '../../hooks';\nimport { QetaPagination } from '../QetaPagination/QetaPagination';\nimport { UsersGridContent } from './UsersGridContent';\nimport useDebounce from 'react-use/lib/useDebounce';\nimport { NoUsersCard } from './NoUsersCard';\n\ntype EntityFilters = {\n order: 'asc' | 'desc';\n orderBy?: 'userRef';\n searchQuery: string;\n};\n\nexport const UsersGrid = () => {\n const [page, setPage] = React.useState(1);\n const [pageCount, setPageCount] = React.useState(1);\n const [entitiesPerPage, setEntitiesPerPage] = React.useState(25);\n const [searchQuery, setSearchQuery] = React.useState('');\n const [filters, setFilters] = React.useState<EntityFilters>({\n order: 'desc',\n searchQuery: '',\n });\n const { t } = useTranslation();\n\n const {\n value: response,\n loading,\n error,\n } = useQetaApi(\n api =>\n api.getUsers({\n limit: entitiesPerPage,\n offset: (page - 1) * entitiesPerPage,\n ...filters,\n }),\n [entitiesPerPage, page, filters],\n );\n\n useDebounce(\n () => {\n if (filters.searchQuery !== searchQuery) {\n setFilters({ ...filters, searchQuery: searchQuery });\n }\n },\n 400,\n [searchQuery],\n );\n\n useEffect(() => {\n if (response) {\n setPageCount(Math.ceil(response.total / entitiesPerPage));\n }\n }, [response, entitiesPerPage]);\n\n if (!response?.users || response.users.length === 0) {\n return <NoUsersCard />;\n }\n\n return (\n <Grid container className=\"qetaUsersContainer\">\n <Grid item xs={12}>\n <TextField\n id=\"search-bar\"\n className=\"text qetaUsersContainerSearchInput\"\n onChange={(\n event: React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>,\n ) => setSearchQuery(event.target.value)}\n label={t('usersPage.search.label')}\n variant=\"outlined\"\n placeholder={t('usersPage.search.placeholder')}\n size=\"small\"\n />\n <IconButton type=\"submit\" aria-label=\"search\" />\n </Grid>\n <UsersGridContent response={response} loading={loading} error={error} />\n <QetaPagination\n pageSize={entitiesPerPage}\n handlePageChange={(_e, p) => setPage(p)}\n handlePageSizeChange={e => setEntitiesPerPage(Number(e.target.value))}\n page={page}\n pageCount={pageCount}\n />\n </Grid>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAcO,MAAM,YAAY,MAAM;AAC7B,EAAA,MAAM,CAAC,IAAM,EAAA,OAAO,CAAI,GAAA,KAAA,CAAM,SAAS,CAAC,CAAA,CAAA;AACxC,EAAA,MAAM,CAAC,SAAW,EAAA,YAAY,CAAI,GAAA,KAAA,CAAM,SAAS,CAAC,CAAA,CAAA;AAClD,EAAA,MAAM,CAAC,eAAiB,EAAA,kBAAkB,CAAI,GAAA,KAAA,CAAM,SAAS,EAAE,CAAA,CAAA;AAC/D,EAAA,MAAM,CAAC,WAAa,EAAA,cAAc,CAAI,GAAA,KAAA,CAAM,SAAS,EAAE,CAAA,CAAA;AACvD,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,MAAM,QAAwB,CAAA;AAAA,IAC1D,KAAO,EAAA,MAAA;AAAA,IACP,WAAa,EAAA,EAAA;AAAA,GACd,CAAA,CAAA;AACD,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA,CAAA;AAE7B,EAAM,MAAA;AAAA,IACJ,KAAO,EAAA,QAAA;AAAA,IACP,OAAA;AAAA,IACA,KAAA;AAAA,GACE,GAAA,UAAA;AAAA,IACF,CAAA,GAAA,KACE,IAAI,QAAS,CAAA;AAAA,MACX,KAAO,EAAA,eAAA;AAAA,MACP,MAAA,EAAA,CAAS,OAAO,CAAK,IAAA,eAAA;AAAA,MACrB,GAAG,OAAA;AAAA,KACJ,CAAA;AAAA,IACH,CAAC,eAAiB,EAAA,IA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AEP,kBAAA,KAAA,CAAA,aAAA,CAAC,UAAW,EAAA,EAAA,IAAA,EAAK,UAAS,YAAW,EAAA,QAAA,EAAS,CAChD,CAAA,kBACC,KAAA,CAAA,aAAA,CAAA,gBAAA,EAAA,EAAiB,QAAoB,EAAA,OAAA,EAAkB,OAAc,CACtE,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,cAAA;AAAA,IAAA;AAAA,MACC,QAAU,EAAA,eAAA;AAAA,MACV,gBAAkB,EAAA,CAAC,EAAI,EAAA,CAAA,KAAM,QAAQ,CAAC,CAAA;AAAA,MACtC,sBAAsB,CAAK,CAAA,KAAA,kBAAA,CAAmB,OAAO,CAAE,CAAA,MAAA,CAAO,KAAK,CAAC,CAAA;AAAA,MACpE,IAAA;AAAA,MACA,SAAA;AAAA,KAAA;AAAA,GAEJ,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { useApi } from '@backstage/core-plugin-api';
|
|
2
|
+
import { qetaApiRef } from '../api.esm.js';
|
|
3
|
+
import React, { useEffect, useCallback } from 'react';
|
|
4
|
+
|
|
5
|
+
let aiEnabled = void 0;
|
|
6
|
+
let aiForQuestionEnabled = void 0;
|
|
7
|
+
let aiForDraftEnabled = void 0;
|
|
8
|
+
const useAI = () => {
|
|
9
|
+
const qetaApi = useApi(qetaApiRef);
|
|
10
|
+
const [isAIEnabled, setIsAIEnabled] = React.useState(
|
|
11
|
+
aiEnabled
|
|
12
|
+
);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
if (aiEnabled !== void 0) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
qetaApi.isAIEnabled().then((resp) => {
|
|
18
|
+
setIsAIEnabled(resp);
|
|
19
|
+
aiEnabled = resp;
|
|
20
|
+
});
|
|
21
|
+
}, [qetaApi]);
|
|
22
|
+
const answerExistingQuestion = useCallback(
|
|
23
|
+
async (questionId) => {
|
|
24
|
+
if (aiForQuestionEnabled === false) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
const ret = await qetaApi.getAIAnswerForQuestion(questionId);
|
|
28
|
+
if (ret === null) {
|
|
29
|
+
aiForQuestionEnabled = false;
|
|
30
|
+
}
|
|
31
|
+
return ret;
|
|
32
|
+
},
|
|
33
|
+
[qetaApi]
|
|
34
|
+
);
|
|
35
|
+
const answerDraftQuestion = useCallback(
|
|
36
|
+
async (draft) => {
|
|
37
|
+
if (aiForDraftEnabled === false) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
const ret = await qetaApi.getAIAnswerForDraft(draft.title, draft.content);
|
|
41
|
+
if (ret === null) {
|
|
42
|
+
aiForDraftEnabled = false;
|
|
43
|
+
}
|
|
44
|
+
return ret;
|
|
45
|
+
},
|
|
46
|
+
[qetaApi]
|
|
47
|
+
);
|
|
48
|
+
return { isAIEnabled, answerExistingQuestion, answerDraftQuestion };
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export { useAI };
|
|
52
|
+
//# sourceMappingURL=useAI.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAI.esm.js","sources":["../../src/hooks/useAI.ts"],"sourcesContent":["import { useApi } from '@backstage/core-plugin-api';\nimport { qetaApiRef } from '../api';\nimport React, { useCallback, useEffect } from 'react';\n\nlet aiEnabled: boolean | undefined = undefined;\nlet aiForQuestionEnabled: boolean | undefined = undefined;\nlet aiForDraftEnabled: boolean | undefined = undefined;\n\nexport const useAI = () => {\n const qetaApi = useApi(qetaApiRef);\n const [isAIEnabled, setIsAIEnabled] = React.useState<boolean | undefined>(\n aiEnabled,\n );\n\n useEffect(() => {\n if (aiEnabled !== undefined) {\n return;\n }\n qetaApi.isAIEnabled().then(resp => {\n setIsAIEnabled(resp);\n aiEnabled = resp;\n });\n }, [qetaApi]);\n\n const answerExistingQuestion = useCallback(\n async (questionId: number) => {\n if (aiForQuestionEnabled === false) {\n return null;\n }\n const ret = await qetaApi.getAIAnswerForQuestion(questionId);\n if (ret === null) {\n aiForQuestionEnabled = false;\n }\n return ret;\n },\n [qetaApi],\n );\n\n const answerDraftQuestion = useCallback(\n async (draft: { title: string; content: string }) => {\n if (aiForDraftEnabled === false) {\n return null;\n }\n const ret = await qetaApi.getAIAnswerForDraft(draft.title, draft.content);\n if (ret === null) {\n aiForDraftEnabled = false;\n }\n return ret;\n },\n [qetaApi],\n );\n\n return { isAIEnabled, answerExistingQuestion, answerDraftQuestion };\n};\n"],"names":[],"mappings":";;;;AAIA,IAAI,SAAiC,GAAA,KAAA,CAAA,CAAA;AACrC,IAAI,oBAA4C,GAAA,KAAA,CAAA,CAAA;AAChD,IAAI,iBAAyC,GAAA,KAAA,CAAA,CAAA;AAEtC,MAAM,QAAQ,MAAM;AACzB,EAAM,MAAA,OAAA,GAAU,OAAO,UAAU,CAAA,CAAA;AACjC,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAI,KAAM,CAAA,QAAA;AAAA,IAC1C,SAAA;AAAA,GACF,CAAA;AAEA,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,cAAc,KAAW,CAAA,EAAA;AAC3B,MAAA,OAAA;AAAA,KACF;AACA,IAAQ,OAAA,CAAA,WAAA,EAAc,CAAA,IAAA,CAAK,CAAQ,IAAA,KAAA;AACjC,MAAA,cAAA,CAAe,IAAI,CAAA,CAAA;AACnB,MAAY,SAAA,GAAA,IAAA,CAAA;AAAA,KACb,CAAA,CAAA;AAAA,GACH,EAAG,CAAC,OAAO,CAAC,CAAA,CAAA;AAEZ,EAAA,MAAM,sBAAyB,GAAA,WAAA;AAAA,IAC7B,OAAO,UAAuB,KAAA;AAC5B,MAAA,IAAI,yBAAyB,KAAO,EAAA;AAClC,QAAO,OAAA,IAAA,CAAA;AAAA,OACT;AACA,MAAA,MAAM,GAAM,GAAA,MAAM,OAAQ,CAAA,sBAAA,CAAuB,UAAU,CAAA,CAAA;AAC3D,MAAA,IAAI,QAAQ,IAAM,EAAA;AAChB,QAAuB,oBAAA,GAAA,KAAA,CAAA;AAAA,OACzB;AACA,MAAO,OAAA,GAAA,CAAA;AAAA,KACT;AAAA,IACA,CAAC,OAAO,CAAA;AAAA,GACV,CAAA;AAEA,EAAA,MAAM,mBAAsB,GAAA,WAAA;AAAA,IAC1B,OAAO,KAA8C,KAAA;AACnD,MAAA,IAAI,sBAAsB,KAAO,EAAA;AAC/B,QAAO,OAAA,IAAA,CAAA;AAAA,OACT;AACA,MAAA,MAAM,MAAM,MAAM,OAAA,CAAQ,oBAAoB,KAAM,CAAA,KAAA,EAAO,MAAM,OAAO,CAAA,CAAA;AACxE,MAAA,IAAI,QAAQ,IAAM,EAAA;AAChB,QAAoB,iBAAA,GAAA,KAAA,CAAA;AAAA,OACtB;AACA,MAAO,OAAA,GAAA,CAAA;AAAA,KACT;AAAA,IACA,CAAC,OAAO,CAAA;AAAA,GACV,CAAA;AAEA,EAAO,OAAA,EAAE,WAAa,EAAA,sBAAA,EAAwB,mBAAoB,EAAA,CAAA;AACpE;;;;"}
|
|
@@ -32,14 +32,36 @@ function useVoting(resp) {
|
|
|
32
32
|
setScore(lastSignal.score);
|
|
33
33
|
}
|
|
34
34
|
}, [lastSignal]);
|
|
35
|
+
const deletePostVote = (id) => {
|
|
36
|
+
qetaApi.deletePostVote(id).then((response) => {
|
|
37
|
+
setOwnVote(0);
|
|
38
|
+
analytics.captureEvent("vote", "question", { value: 0 });
|
|
39
|
+
setEntity(response);
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
const deleteAnswerVote = (postId, id) => {
|
|
43
|
+
qetaApi.deleteAnswerVote(postId, id).then((response) => {
|
|
44
|
+
setOwnVote(0);
|
|
45
|
+
analytics.captureEvent("vote", "answer", { value: 0 });
|
|
46
|
+
setEntity(response);
|
|
47
|
+
});
|
|
48
|
+
};
|
|
35
49
|
const voteUp = () => {
|
|
36
50
|
if (isQuestion) {
|
|
51
|
+
if (ownVote > 0) {
|
|
52
|
+
deletePostVote(entity.id);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
37
55
|
qetaApi.votePostUp(entity.id).then((response) => {
|
|
38
56
|
setOwnVote(1);
|
|
39
57
|
analytics.captureEvent("vote", "question", { value: 1 });
|
|
40
58
|
setEntity(response);
|
|
41
59
|
});
|
|
42
60
|
} else if ("postId" in entity) {
|
|
61
|
+
if (ownVote > 0) {
|
|
62
|
+
deleteAnswerVote(entity.postId, entity.id);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
43
65
|
qetaApi.voteAnswerUp(entity.postId, entity.id).then((response) => {
|
|
44
66
|
setOwnVote(1);
|
|
45
67
|
analytics.captureEvent("vote", "answer", { value: 1 });
|
|
@@ -49,12 +71,20 @@ function useVoting(resp) {
|
|
|
49
71
|
};
|
|
50
72
|
const voteDown = () => {
|
|
51
73
|
if (isQuestion) {
|
|
74
|
+
if (ownVote < 0) {
|
|
75
|
+
deletePostVote(entity.id);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
52
78
|
qetaApi.votePostDown(entity.id).then((response) => {
|
|
53
79
|
setOwnVote(-1);
|
|
54
80
|
analytics.captureEvent("vote", "question", { value: -1 });
|
|
55
81
|
setEntity(response);
|
|
56
82
|
});
|
|
57
83
|
} else if ("postId" in entity) {
|
|
84
|
+
if (ownVote < 0) {
|
|
85
|
+
deleteAnswerVote(entity.postId, entity.id);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
58
88
|
qetaApi.voteAnswerDown(entity.postId, entity.id).then((response) => {
|
|
59
89
|
setOwnVote(-1);
|
|
60
90
|
analytics.captureEvent("vote", "answer", { value: -1 });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVoting.esm.js","sources":["../../src/hooks/useVoting.ts"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { useAnalytics, useApi } from '@backstage/core-plugin-api';\nimport { qetaApiRef } from '../api';\nimport { useTranslation } from './useTranslation';\nimport { useSignal } from '@backstage/plugin-signals-react';\nimport {\n AnswerResponse,\n PostResponse,\n QetaSignal,\n} from '@drodil/backstage-plugin-qeta-common';\n\nexport function useVoting(resp: PostResponse | AnswerResponse) {\n const [entity, setEntity] = React.useState<PostResponse | AnswerResponse>(\n resp,\n );\n const [ownVote, setOwnVote] = React.useState(entity.ownVote ?? 0);\n const [correctAnswer, setCorrectAnswer] = useState(\n 'postId' in entity ? entity.correct : false,\n );\n const [score, setScore] = useState(entity.score);\n const analytics = useAnalytics();\n const qetaApi = useApi(qetaApiRef);\n const { t } = useTranslation();\n\n const isQuestion = 'title' in entity;\n const own = entity.own ?? false;\n\n const { lastSignal } = useSignal<QetaSignal>(\n isQuestion ? `qeta:question_${entity.id}` : `qeta:answer_${entity.id}`,\n );\n\n useEffect(() => {\n if (entity) {\n setScore(entity.score);\n }\n }, [entity]);\n\n useEffect(() => {\n if (\n lastSignal?.type === 'post_stats' ||\n lastSignal?.type === 'answer_stats'\n ) {\n setCorrectAnswer(lastSignal.correctAnswer);\n setScore(lastSignal.score);\n }\n }, [lastSignal]);\n\n const voteUp = () => {\n if (isQuestion) {\n qetaApi.votePostUp(entity.id).then(response => {\n setOwnVote(1);\n analytics.captureEvent('vote', 'question', { value: 1 });\n setEntity(response);\n });\n } else if ('postId' in entity) {\n qetaApi.voteAnswerUp(entity.postId, entity.id).then(response => {\n setOwnVote(1);\n analytics.captureEvent('vote', 'answer', { value: 1 });\n setEntity(response);\n });\n }\n };\n\n const voteDown = () => {\n if (isQuestion) {\n qetaApi.votePostDown(entity.id).then(response => {\n setOwnVote(-1);\n analytics.captureEvent('vote', 'question', { value: -1 });\n setEntity(response);\n });\n } else if ('postId' in entity) {\n qetaApi.voteAnswerDown(entity.postId, entity.id).then(response => {\n setOwnVote(-1);\n analytics.captureEvent('vote', 'answer', { value: -1 });\n setEntity(response);\n });\n }\n };\n\n let correctTooltip: string = correctAnswer\n ? t('voteButtons.answer.markIncorrect')\n : t('voteButtons.answer.markCorrect');\n if (!entity?.own) {\n correctTooltip = correctAnswer ? t('voteButtons.answer.marked') : '';\n }\n\n let voteUpTooltip: string = isQuestion\n ? t('voteButtons.question.good')\n : t('voteButtons.answer.good');\n if (own) {\n voteUpTooltip = isQuestion\n ? t('voteButtons.question.own')\n : t('voteButtons.answer.own');\n }\n\n let voteDownTooltip: string = isQuestion\n ? t('voteButtons.question.bad')\n : t('voteButtons.answer.bad');\n if (own) {\n voteDownTooltip = voteUpTooltip;\n }\n\n const toggleCorrectAnswer = () => {\n if (!('postId' in entity)) {\n return;\n }\n if (correctAnswer) {\n qetaApi.markAnswerIncorrect(entity.postId, entity.id).then(response => {\n if (response) {\n setCorrectAnswer(false);\n }\n });\n } else {\n qetaApi.markAnswerCorrect(entity.postId, entity.id).then(response => {\n if (response) {\n setCorrectAnswer(true);\n }\n });\n }\n };\n\n return {\n entity,\n ownVote,\n correctAnswer,\n score,\n voteUp,\n voteDown,\n toggleCorrectAnswer,\n voteUpTooltip,\n voteDownTooltip,\n correctTooltip,\n };\n}\n"],"names":[],"mappings":";;;;;;AAWO,SAAS,UAAU,IAAqC,EAAA;AAC7D,EAAA,MAAM,CAAC,MAAA,EAAQ,SAAS,CAAA,GAAI,KAAM,CAAA,QAAA;AAAA,IAChC,IAAA;AAAA,GACF,CAAA;AACA,EAAM,MAAA,CAAC,SAAS,UAAU,CAAA,GAAI,MAAM,QAAS,CAAA,MAAA,CAAO,WAAW,CAAC,CAAA,CAAA;AAChE,EAAM,MAAA,CAAC,aAAe,EAAA,gBAAgB,CAAI,GAAA,QAAA;AAAA,IACxC,QAAA,IAAY,MAAS,GAAA,MAAA,CAAO,OAAU,GAAA,KAAA;AAAA,GACxC,CAAA;AACA,EAAA,MAAM,CAAC,KAAO,EAAA,QAAQ,CAAI,GAAA,QAAA,CAAS,OAAO,KAAK,CAAA,CAAA;AAC/C,EAAA,MAAM,YAAY,YAAa,EAAA,CAAA;AAC/B,EAAM,MAAA,OAAA,GAAU,OAAO,UAAU,CAAA,CAAA;AACjC,EAAM,MAAA,EAAE,CAAE,EA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;;;;"}
|
|
1
|
+
{"version":3,"file":"useVoting.esm.js","sources":["../../src/hooks/useVoting.ts"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { useAnalytics, useApi } from '@backstage/core-plugin-api';\nimport { qetaApiRef } from '../api';\nimport { useTranslation } from './useTranslation';\nimport { useSignal } from '@backstage/plugin-signals-react';\nimport {\n AnswerResponse,\n PostResponse,\n QetaSignal,\n} from '@drodil/backstage-plugin-qeta-common';\n\nexport function useVoting(resp: PostResponse | AnswerResponse) {\n const [entity, setEntity] = React.useState<PostResponse | AnswerResponse>(\n resp,\n );\n const [ownVote, setOwnVote] = React.useState(entity.ownVote ?? 0);\n const [correctAnswer, setCorrectAnswer] = useState(\n 'postId' in entity ? entity.correct : false,\n );\n const [score, setScore] = useState(entity.score);\n const analytics = useAnalytics();\n const qetaApi = useApi(qetaApiRef);\n const { t } = useTranslation();\n\n const isQuestion = 'title' in entity;\n const own = entity.own ?? false;\n\n const { lastSignal } = useSignal<QetaSignal>(\n isQuestion ? `qeta:question_${entity.id}` : `qeta:answer_${entity.id}`,\n );\n\n useEffect(() => {\n if (entity) {\n setScore(entity.score);\n }\n }, [entity]);\n\n useEffect(() => {\n if (\n lastSignal?.type === 'post_stats' ||\n lastSignal?.type === 'answer_stats'\n ) {\n setCorrectAnswer(lastSignal.correctAnswer);\n setScore(lastSignal.score);\n }\n }, [lastSignal]);\n\n const deletePostVote = (id: number) => {\n qetaApi.deletePostVote(id).then(response => {\n setOwnVote(0);\n analytics.captureEvent('vote', 'question', { value: 0 });\n setEntity(response);\n });\n };\n\n const deleteAnswerVote = (postId: number, id: number) => {\n qetaApi.deleteAnswerVote(postId, id).then(response => {\n setOwnVote(0);\n analytics.captureEvent('vote', 'answer', { value: 0 });\n setEntity(response);\n });\n };\n\n const voteUp = () => {\n if (isQuestion) {\n if (ownVote > 0) {\n deletePostVote(entity.id);\n return;\n }\n qetaApi.votePostUp(entity.id).then(response => {\n setOwnVote(1);\n analytics.captureEvent('vote', 'question', { value: 1 });\n setEntity(response);\n });\n } else if ('postId' in entity) {\n if (ownVote > 0) {\n deleteAnswerVote(entity.postId, entity.id);\n return;\n }\n qetaApi.voteAnswerUp(entity.postId, entity.id).then(response => {\n setOwnVote(1);\n analytics.captureEvent('vote', 'answer', { value: 1 });\n setEntity(response);\n });\n }\n };\n\n const voteDown = () => {\n if (isQuestion) {\n if (ownVote < 0) {\n deletePostVote(entity.id);\n return;\n }\n qetaApi.votePostDown(entity.id).then(response => {\n setOwnVote(-1);\n analytics.captureEvent('vote', 'question', { value: -1 });\n setEntity(response);\n });\n } else if ('postId' in entity) {\n if (ownVote < 0) {\n deleteAnswerVote(entity.postId, entity.id);\n return;\n }\n qetaApi.voteAnswerDown(entity.postId, entity.id).then(response => {\n setOwnVote(-1);\n analytics.captureEvent('vote', 'answer', { value: -1 });\n setEntity(response);\n });\n }\n };\n\n let correctTooltip: string = correctAnswer\n ? t('voteButtons.answer.markIncorrect')\n : t('voteButtons.answer.markCorrect');\n if (!entity?.own) {\n correctTooltip = correctAnswer ? t('voteButtons.answer.marked') : '';\n }\n\n let voteUpTooltip: string = isQuestion\n ? t('voteButtons.question.good')\n : t('voteButtons.answer.good');\n if (own) {\n voteUpTooltip = isQuestion\n ? t('voteButtons.question.own')\n : t('voteButtons.answer.own');\n }\n\n let voteDownTooltip: string = isQuestion\n ? t('voteButtons.question.bad')\n : t('voteButtons.answer.bad');\n if (own) {\n voteDownTooltip = voteUpTooltip;\n }\n\n const toggleCorrectAnswer = () => {\n if (!('postId' in entity)) {\n return;\n }\n if (correctAnswer) {\n qetaApi.markAnswerIncorrect(entity.postId, entity.id).then(response => {\n if (response) {\n setCorrectAnswer(false);\n }\n });\n } else {\n qetaApi.markAnswerCorrect(entity.postId, entity.id).then(response => {\n if (response) {\n setCorrectAnswer(true);\n }\n });\n }\n };\n\n return {\n entity,\n ownVote,\n correctAnswer,\n score,\n voteUp,\n voteDown,\n toggleCorrectAnswer,\n voteUpTooltip,\n voteDownTooltip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,oBAAoB,MAAO,CAAA,MAAA,EAAQ,OAAO,EAAE,CAAA,CAAE,KAAK,CAAY,QAAA,KAAA;AACrE,QAAA,IAAI,QAAU,EAAA;AACZ,UAAA,gBAAA,CAAiB,KAAK,CAAA,CAAA;AAAA,SACxB;AAAA,OACD,CAAA,CAAA;AAAA,KACI,MAAA;AACL,MAAA,OAAA,CAAQ,kBAAkB,MAAO,CAAA,MAAA,EAAQ,OAAO,EAAE,CAAA,CAAE,KAAK,CAAY,QAAA,KAAA;AACnE,QAAA,IAAI,QAAU,EAAA;AACZ,UAAA,gBAAA,CAAiB,IAAI,CAAA,CAAA;AAAA,SACvB;AAAA,OACD,CAAA,CAAA;AAAA,KACH;AAAA,GACF,CAAA;AAEA,EAAO,OAAA;AAAA,IACL,MAAA;AAAA,IACA,OAAA;AAAA,IACA,aAAA;AAAA,IACA,KAAA;AAAA,IACA,MAAA;AAAA,IACA,QAAA;AAAA,IACA,mBAAA;AAAA,IACA,aAAA;AAAA,IACA,eAAA;AAAA,IACA,cAAA;AAAA,GACF,CAAA;AACF;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
2
2
|
import { IdentityApi } from '@backstage/core-plugin-api';
|
|
3
|
+
import * as _drodil_backstage_plugin_qeta_common from '@drodil/backstage-plugin-qeta-common';
|
|
3
4
|
import { QetaApi, PostType, PostResponse, Template, PostsResponse, AnswersResponse, AnswerResponse, Collection, PostsQuery, CollectionResponse, Post, Answer, Comment, Stat, StatisticsResponse, UserStat, GlobalStat, TemplatesResponse } from '@drodil/backstage-plugin-qeta-common';
|
|
4
5
|
import React from 'react';
|
|
6
|
+
import { Entity } from '@backstage/catalog-model';
|
|
5
7
|
import { LinkProps } from '@backstage/core-components';
|
|
6
8
|
import { SvgIconProps } from '@material-ui/core';
|
|
7
9
|
import * as _backstage_core_plugin_api_alpha from '@backstage/core-plugin-api/alpha';
|
|
@@ -35,6 +37,19 @@ declare const moderatorRouteRef: _backstage_core_plugin_api.SubRouteRef<undefine
|
|
|
35
37
|
|
|
36
38
|
declare const qetaApiRef: _backstage_core_plugin_api.ApiRef<QetaApi>;
|
|
37
39
|
|
|
40
|
+
interface TagAndEntitiesFormValues {
|
|
41
|
+
tags?: string[];
|
|
42
|
+
entities?: Entity[];
|
|
43
|
+
}
|
|
44
|
+
interface QuestionFormValues extends TagAndEntitiesFormValues {
|
|
45
|
+
title: string;
|
|
46
|
+
content: string;
|
|
47
|
+
anonymous?: boolean;
|
|
48
|
+
type: PostType;
|
|
49
|
+
images: number[];
|
|
50
|
+
headerImage?: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
38
53
|
type PostFormProps = {
|
|
39
54
|
type: PostType;
|
|
40
55
|
id?: string;
|
|
@@ -43,6 +58,7 @@ type PostFormProps = {
|
|
|
43
58
|
onPost?: (question: PostResponse) => void;
|
|
44
59
|
entityPage?: boolean;
|
|
45
60
|
template?: Template | null;
|
|
61
|
+
onFormChange?: (data: QuestionFormValues) => void;
|
|
46
62
|
};
|
|
47
63
|
declare const PostForm: (props: PostFormProps) => React.JSX.Element;
|
|
48
64
|
|
|
@@ -146,14 +162,6 @@ declare const AskQuestionButton: (props: {
|
|
|
146
162
|
entityPage?: boolean;
|
|
147
163
|
}) => React.JSX.Element;
|
|
148
164
|
|
|
149
|
-
declare const BackToQuestionsButton: (props: {
|
|
150
|
-
entityPage?: boolean;
|
|
151
|
-
}) => React.JSX.Element;
|
|
152
|
-
|
|
153
|
-
declare const BackToArticlesButton: (props: {
|
|
154
|
-
entityPage?: boolean;
|
|
155
|
-
}) => React.JSX.Element;
|
|
156
|
-
|
|
157
165
|
declare const EntityFollowButton: (props: {
|
|
158
166
|
entityRef: string;
|
|
159
167
|
}) => React.JSX.Element | null;
|
|
@@ -174,8 +182,6 @@ declare const AddToCollectionButton: (props: {
|
|
|
174
182
|
post: PostResponse;
|
|
175
183
|
}) => React.JSX.Element | null;
|
|
176
184
|
|
|
177
|
-
declare const BackToCollectionsButton: () => React.JSX.Element;
|
|
178
|
-
|
|
179
185
|
declare const UserFollowButton: (props: {
|
|
180
186
|
userRef: string;
|
|
181
187
|
}) => React.JSX.Element | null;
|
|
@@ -324,6 +330,17 @@ declare const SelectTemplateList: (props: {
|
|
|
324
330
|
onTemplateSelect: (template: Template | null) => void;
|
|
325
331
|
}) => React.JSX.Element | null;
|
|
326
332
|
|
|
333
|
+
type QetaAIAnswerCardClassKey = 'card';
|
|
334
|
+
type AIAnswerCardProps = {
|
|
335
|
+
question?: Post;
|
|
336
|
+
draft?: {
|
|
337
|
+
title: string;
|
|
338
|
+
content: string;
|
|
339
|
+
};
|
|
340
|
+
debounceMs?: number;
|
|
341
|
+
};
|
|
342
|
+
declare const AIAnswerCard: (props: AIAnswerCardProps) => React.JSX.Element | null;
|
|
343
|
+
|
|
327
344
|
declare function useQetaApi<T>(f: (api: QetaApi) => Promise<T>, deps?: any[]): {
|
|
328
345
|
retry: () => void;
|
|
329
346
|
loading: boolean;
|
|
@@ -456,8 +473,6 @@ declare const useTranslation: () => {
|
|
|
456
473
|
readonly "addToCollectionButton.close": "Close";
|
|
457
474
|
readonly "writeArticleButton.title": "Write an article";
|
|
458
475
|
readonly "createCollectionButton.title": "Create collection";
|
|
459
|
-
readonly "backToQuestionsButton.title": "Back";
|
|
460
|
-
readonly "backToCollectionsButton.title": "Back";
|
|
461
476
|
readonly "commentList.deleteLink": "delete";
|
|
462
477
|
readonly "commentSection.input.placeholder": "Your comment";
|
|
463
478
|
readonly "commentSection.post": "Post";
|
|
@@ -626,6 +641,7 @@ declare const useTranslation: () => {
|
|
|
626
641
|
readonly "entitiesPage.entities_zero": "No entities";
|
|
627
642
|
readonly "entitiesPage.entities_one": "Showing {{count}} entity";
|
|
628
643
|
readonly "entitiesPage.entities_other": "Showing {{count}} entities";
|
|
644
|
+
readonly "aiAnswerCard.title": "Answer from AI";
|
|
629
645
|
readonly "usersPage.title": "Users";
|
|
630
646
|
readonly "usersPage.search.label": "Search user";
|
|
631
647
|
readonly "usersPage.search.placeholder": "Search...";
|
|
@@ -698,6 +714,15 @@ declare const useIsModerator: () => {
|
|
|
698
714
|
isModerator: boolean;
|
|
699
715
|
};
|
|
700
716
|
|
|
717
|
+
declare const useAI: () => {
|
|
718
|
+
isAIEnabled: boolean | undefined;
|
|
719
|
+
answerExistingQuestion: (questionId: number) => Promise<_drodil_backstage_plugin_qeta_common.AIResponse | null>;
|
|
720
|
+
answerDraftQuestion: (draft: {
|
|
721
|
+
title: string;
|
|
722
|
+
content: string;
|
|
723
|
+
}) => Promise<_drodil_backstage_plugin_qeta_common.AIResponse | null>;
|
|
724
|
+
};
|
|
725
|
+
|
|
701
726
|
type QetaVoteButtonsClassKey = 'qetaCorrectAnswerSelected' | 'qetaCorrectAnswer' | 'voteButtonContainer';
|
|
702
727
|
|
|
703
728
|
type QetaArticleButtonsClassKey = 'container' | 'scoreText';
|
|
@@ -718,9 +743,10 @@ type QetaComponentsNameToClassKey = {
|
|
|
718
743
|
QetaMarkdownEditor: QetaMarkdownEditorClassKey;
|
|
719
744
|
QetaAuthorBox: QetaAuthorBoxClassKey;
|
|
720
745
|
QetaForm: QetaFormClassKey;
|
|
746
|
+
QetaAIAnswerCard: QetaAIAnswerCardClassKey;
|
|
721
747
|
};
|
|
722
748
|
type QetaOverrides = Overrides & {
|
|
723
749
|
[Name in keyof QetaComponentsNameToClassKey]?: Partial<StyleRules<QetaComponentsNameToClassKey[Name]>>;
|
|
724
750
|
};
|
|
725
751
|
|
|
726
|
-
export { AddToCollectionButton, AnswerCard, AnswerForm, AnswerList, AnswerListItem, AnswersContainer, ArticleContent, AskQuestionButton, AuthorLink,
|
|
752
|
+
export { AIAnswerCard, AddToCollectionButton, AnswerCard, AnswerForm, AnswerList, AnswerListItem, AnswersContainer, ArticleContent, AskQuestionButton, AuthorLink, CollectionCard, CollectionFollowButton, CollectionForm, CollectionsGrid, CreateCollectionButton, DeleteModal, EntitiesGrid, EntityFollowButton, FilterPanel, FollowedCollectionsList, FollowedEntitiesList, FollowedTagsList, ImpactCard, LeftMenu, LeftMenuButton, MarkdownRenderer, PostForm, PostHighlightList, PostList, PostListItem, PostsCard, PostsContainer, PostsGrid, type QetaLeftMenuClassKey, type QetaOverrides, QuestionCard, QuestionsTable, RelativeTimeWithTooltip, SelectTemplateList, StatsChart, SummaryStatsGrid, TagFollowButton, TagsGrid, TemplateList, TopRankingUsers, TrophyIcon, UpdatedByLink, UserFollowButton, UserLink, UsersGrid, WriteArticleButton, articleRouteRef, articlesRouteRef, askRouteRef, collectionCreateRouteRef, collectionEditRouteRef, collectionRouteRef, collectionsRouteRef, editArticleRouteRef, editQuestionRouteRef, entitiesRouteRef, entityRouteRef, favoriteQuestionsRouteRef, moderatorRouteRef, qetaApiRef, qetaRouteRef, questionRouteRef, questionsRouteRef, statisticsRouteRef, tagRouteRef, tagsRouteRef, useAI, useCollectionsFollow, useEntityFollow, useIdentityApi, useIsModerator, useQetaApi, useStyles, useTagsFollow, useTranslation, useUserFollow, userRouteRef, usersRouteRef, writeRouteRef };
|
package/dist/index.esm.js
CHANGED
|
@@ -9,14 +9,11 @@ export { AnswerList } from './components/AnswersContainer/AnswerList.esm.js';
|
|
|
9
9
|
export { AnswersContainer } from './components/AnswersContainer/AnswersContainer.esm.js';
|
|
10
10
|
export { AnswerListItem } from './components/AnswersContainer/AnswerListItem.esm.js';
|
|
11
11
|
export { AskQuestionButton } from './components/Buttons/AskQuestionButton.esm.js';
|
|
12
|
-
export { BackToQuestionsButton } from './components/Buttons/BackToQuestionsButton.esm.js';
|
|
13
|
-
export { BackToArticlesButton } from './components/Buttons/BackToArticlesButton.esm.js';
|
|
14
12
|
export { EntityFollowButton } from './components/Buttons/EntityFollowButton.esm.js';
|
|
15
13
|
export { TagFollowButton } from './components/Buttons/TagFollowButton.esm.js';
|
|
16
14
|
export { WriteArticleButton } from './components/Buttons/WriteArticleButton.esm.js';
|
|
17
15
|
export { CreateCollectionButton } from './components/Buttons/CreateCollectionButton.esm.js';
|
|
18
16
|
export { AddToCollectionButton } from './components/Buttons/AddToCollectionButton.esm.js';
|
|
19
|
-
export { BackToCollectionsButton } from './components/Buttons/BackToCollectionsButton.esm.js';
|
|
20
17
|
export { UserFollowButton } from './components/Buttons/UserFollowButton.esm.js';
|
|
21
18
|
export { CollectionFollowButton } from './components/Buttons/CollectionFollowButton.esm.js';
|
|
22
19
|
export { PostHighlightList } from './components/PostHighlightList/PostHighlightList.esm.js';
|
|
@@ -49,6 +46,7 @@ export { LeftMenu } from './components/LeftMenu/LeftMenu.esm.js';
|
|
|
49
46
|
export { LeftMenuButton } from './components/LeftMenu/LeftMenuButton.esm.js';
|
|
50
47
|
export { TemplateList } from './components/TemplateList/TemplateList.esm.js';
|
|
51
48
|
export { SelectTemplateList } from './components/SelectTemplateList/SelectTemplateList.esm.js';
|
|
49
|
+
export { AIAnswerCard } from './components/AIAnswerCard/AIAnswerCard.esm.js';
|
|
52
50
|
export { useQetaApi } from './hooks/useQetaApi.esm.js';
|
|
53
51
|
export { useTagsFollow } from './hooks/useTagsFollow.esm.js';
|
|
54
52
|
export { useTranslation } from './hooks/useTranslation.esm.js';
|
|
@@ -58,4 +56,5 @@ export { useStyles } from './hooks/useStyles.esm.js';
|
|
|
58
56
|
export { useIdentityApi } from './hooks/useIdentityApi.esm.js';
|
|
59
57
|
export { useCollectionsFollow } from './hooks/useCollectionsFollow.esm.js';
|
|
60
58
|
export { useIsModerator } from './hooks/useIsModerator.esm.js';
|
|
59
|
+
export { useAI } from './hooks/useAI.esm.js';
|
|
61
60
|
//# 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/translation.esm.js
CHANGED
|
@@ -147,12 +147,6 @@ const qetaTranslationRef = createTranslationRef({
|
|
|
147
147
|
createCollectionButton: {
|
|
148
148
|
title: "Create collection"
|
|
149
149
|
},
|
|
150
|
-
backToQuestionsButton: {
|
|
151
|
-
title: "Back"
|
|
152
|
-
},
|
|
153
|
-
backToCollectionsButton: {
|
|
154
|
-
title: "Back"
|
|
155
|
-
},
|
|
156
150
|
commentList: {
|
|
157
151
|
deleteLink: "delete"
|
|
158
152
|
},
|
|
@@ -475,6 +469,9 @@ const qetaTranslationRef = createTranslationRef({
|
|
|
475
469
|
entities_one: "Showing {{count}} entity",
|
|
476
470
|
entities_other: "Showing {{count}} entities"
|
|
477
471
|
},
|
|
472
|
+
aiAnswerCard: {
|
|
473
|
+
title: "Answer from AI"
|
|
474
|
+
},
|
|
478
475
|
usersPage: {
|
|
479
476
|
title: "Users",
|
|
480
477
|
errorLoading: "Could not load users",
|
|
@@ -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 post: 'post',\n question: 'question',\n article: 'article',\n score: '{{score}} score',\n comments: 'Comments',\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 votes_zero: '0 votes',\n votes_one: '{{count}} vote',\n votes_other: '{{count}} votes',\n posts_zero: 'No {{itemType}}s',\n posts_one: '{{count}} {{itemType}}',\n posts_other: '{{count}} {{itemType}}s',\n collections_zero: 'No collections',\n collections_one: '{{count}} collection',\n collections_other: '{{count}} collections',\n followers_zero: 'No followers',\n followers_one: '{{count}} follower',\n followers_other: '{{count}} followers',\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 postAnonymously: 'Post anonymously',\n },\n fileInput: {\n label: 'Header image',\n helperText: 'URL of the header image to be used',\n uploadHeaderImage: 'Upload image',\n preview: 'Preview image',\n },\n collectionForm: {\n errorPosting: 'Could not create collection',\n titleInput: {\n label: 'Title',\n helperText: 'Name of the colleciton',\n },\n descriptionInput: {\n placeholder: 'Collection description, what does it contain?',\n },\n submit: {\n existingCollection: 'Save',\n newCollection: 'Create',\n },\n },\n postForm: {\n errorPosting: 'Could not post {{type}}',\n uploadHeaderImage: 'Upload header image',\n titleInput: {\n label: 'Title',\n helperText:\n 'Write good title for your {{type}} that people can understand',\n },\n contentInput: {\n placeholder: 'Your {{type}}',\n },\n submit: {\n existingPost: 'Save',\n newPost: '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 writePage: {\n title: {\n existingArticle: 'Edit article',\n entityArticle: 'Write an article about {{entity}}',\n newArticle: 'New article',\n },\n },\n collectionCreatePage: {\n title: {\n existingCollection: 'Edit collection',\n newCollection: 'New collection',\n },\n },\n askQuestionButton: {\n title: 'Ask a question',\n },\n addToCollectionButton: {\n title: 'Collections',\n manage: 'Add or remove this post from collections',\n close: 'Close',\n },\n writeArticleButton: {\n title: 'Write an article',\n },\n createCollectionButton: {\n title: 'Create collection',\n },\n backToQuestionsButton: {\n title: 'Back',\n },\n backToCollectionsButton: {\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 editTagModal: {\n title: 'Edit tag {{tag}}',\n description: 'Tag description',\n errorPosting: 'Failed to edit',\n saveButton: 'Save',\n cancelButton: 'Cancel',\n },\n deleteModal: {\n title: {\n question: 'Are you sure you want to delete this post?',\n answer: 'Are you sure you want to delete this answer?',\n collection: 'Are you sure you want to delete this collection?',\n },\n errorDeleting: 'Failed to delete',\n deleteButton: 'Delete',\n cancelButton: 'Cancel',\n },\n favoritePage: {\n title: 'Favorited posts',\n },\n leftMenu: {\n home: 'Home',\n questions: 'Questions',\n articles: 'Articles',\n profile: 'Profile',\n tags: 'Tags',\n entities: 'Entities',\n favoriteQuestions: 'Favorites',\n statistics: 'Statistics',\n collections: 'Collections',\n content: 'Content',\n community: 'Community',\n users: 'Users',\n manage: 'Manage',\n moderate: 'Moderate',\n },\n moderatorPage: {\n title: 'Moderate',\n tools: 'Tools',\n templates: 'Templates',\n templatesInfo:\n 'Templates can be used to prefill question content for the user',\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 followedCollections: 'Followed collections',\n },\n highlights: {\n loadError: 'Failed to load questions',\n own: {\n title: 'Your latest questions',\n noQuestionsLabel: 'No questions',\n },\n hotQuestions: {\n title: 'Hot questions',\n noQuestionsLabel: 'No questions',\n },\n hotArticles: {\n title: 'Hot articles',\n noArticlesLabel: 'No articles',\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 articlesPage: {\n title: 'All articles',\n },\n userLink: {\n anonymous: 'Anonymous',\n },\n articlePage: {\n errorLoading: 'Could not load article',\n editButton: 'Edit this article',\n deleteButton: 'Delete this article',\n },\n templateList: {\n errorLoading: 'Could not load templates',\n editButton: 'Edit',\n deleteButton: 'Delete',\n createButton: 'Create',\n errorPosting: 'Could not post template',\n noTemplates: 'No templates',\n noTemplatesDescription: 'Create a new template to get started',\n titleInput: {\n label: 'Title',\n helperText: 'Name of the template',\n },\n descriptionInput: {\n label: 'Description',\n helperText: 'Template description, what is it used for?',\n },\n questionTitleInput: {\n label: 'Default question title',\n helperText:\n 'Question title to be used when creating a question with this template',\n },\n questionContentInput: {\n placeholder:\n 'Question content to be used when creating a question with this template',\n },\n submit: {\n existingTemplate: 'Save',\n newTemplate: 'Create',\n },\n },\n templateSelectList: {\n selectButton: 'Choose',\n title: 'Create a question from template',\n genericQuestion: 'Generic question',\n genericQuestionDescription: 'Create a generic question',\n },\n pagination: {\n defaultTooltip: 'Number of items',\n },\n collectionsPage: {\n title: 'Collections',\n search: {\n label: 'Search for collection',\n placeholder: 'Search...',\n },\n },\n collectionPage: {\n description: 'Description',\n info: 'You can add questions and articles to the collection from question and article pages',\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 postedAtTime: 'Posted',\n updatedAtTime: 'Updated',\n updatedBy: 'by',\n },\n favorite: {\n remove: 'Remove this post from favorites',\n add: 'Mark this post as favorite',\n },\n link: {\n post: 'Copy link to this post 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 post is good',\n bad: 'This post is not good',\n own: 'You cannot vote your own post',\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 postsList: {\n errorLoading: 'Could not load {{itemType}}s',\n postsPerPage: '{{itemType}}s per page',\n },\n postsContainer: {\n title: {\n by: `{{itemType}}s by`,\n about: '{{itemType}}s about',\n tagged: `{{itemType}} tagged with {{tags}}`,\n favorite: 'Your favorite {{itemType}}s',\n },\n search: {\n label: 'Search for {{itemType}}',\n placeholder: 'Search...',\n },\n noItems: 'No {{itemType}}s',\n createButton: 'Go ahead and create 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 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 entitiesPage: {\n errorLoading: 'Could not load entities',\n defaultTitle: 'Entities',\n search: {\n label: 'Search entity',\n placeholder: 'Search...',\n },\n entities_zero: 'No entities',\n entities_one: 'Showing {{count}} entity',\n entities_other: 'Showing {{count}} entities',\n },\n usersPage: {\n title: 'Users',\n errorLoading: 'Could not load users',\n defaultTitle: 'users',\n search: {\n label: 'Search user',\n placeholder: 'Search...',\n },\n users_zero: 'No users',\n users_one: 'Showing {{count}} users',\n users_other: 'Showing {{count}} users',\n },\n userPage: {\n profileTab: 'Profile',\n statistics: 'Statistics',\n questions: 'Questions',\n answers: 'Answers',\n collections: 'Collections',\n articles: 'Articles',\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 articles: 'Articles',\n followers: 'Followers',\n users: 'Users',\n tags: 'Tags',\n },\n collectionButton: {\n follow: 'Follow',\n unfollow: 'Unfollow',\n tooltip:\n 'By following a collection, you will get notified when ever a new post is added to the collection',\n },\n tagButton: {\n follow: 'Follow',\n unfollow: 'Unfollow',\n edit: 'Edit',\n tooltip:\n 'By following a tag, you will get notified when ever a new post 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 post for that entity is posted',\n },\n userButton: {\n follow: 'Follow',\n unfollow: 'Unfollow',\n tooltip:\n 'By following a user, you will get notified when ever a new post by that user is posted',\n },\n },\n});\n\nexport const qetaTranslations = createTranslationResource({\n ref: qetaTranslationRef,\n translations: {},\n});\n"],"names":[],"mappings":";;AAMO,MAAM,qBAAqB,oBAAqB,CAAA;AAAA,EACrD,EAAI,EAAA,MAAA;AAAA,EACJ,QAAU,EAAA;AAAA,IACR,UAAY,EAAA,KAAA;AAAA,IACZ,UAAY,EAAA;AAAA,MACV,YAAc,EAAA,wBAAA;AAAA,MACd,SAAW,EAAA,YAAA;AAAA,MACX,WAAa,EAAA,kBAAA;AAAA,KACf;AAAA,IACA,MAAQ,EAAA;AAAA,MACN,IAAM,EAAA,MAAA;AAAA,MACN,QAAU,EAAA,UAAA;AAAA,MACV,OAAS,EAAA,SAAA;AAAA,MACT,KAAO,EAAA,iBAAA;AAAA,MACP,QAAU,EAAA,UAAA;AAAA,MACV,eAAiB,EAAA,WAAA;AAAA,MACjB,YAAc,EAAA,YAAA;AAAA,MACd,WAAa,EAAA,kBAAA;AAAA,MACb,aAAe,EAAA,mBAAA;AAAA,MACf,UAAY,EAAA,wBAAA;AAAA,MACZ,SAAW,EAAA,uBAAA;AAAA,MACX,WAAa,EAAA,wBAAA;AAAA,MACb,eAAiB,EAAA,SAAA;AAAA,MACjB,cAAgB,EAAA,gBAAA;AAAA,MAChB,gBAAkB,EAAA,iBAAA;AAAA,MACl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AAAA,MACV,OACE,EAAA,wFAAA;AAAA,KACJ;AAAA,GACF;AACF,CAAC,EAAA;AAE+B,yBAA0B,CAAA;AAAA,EACxD,GAAK,EAAA,kBAAA;AAAA,EACL,cAAc,EAAC;AACjB,CAAC;;;;"}
|
|
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 post: 'post',\n question: 'question',\n article: 'article',\n score: '{{score}} score',\n comments: 'Comments',\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 votes_zero: '0 votes',\n votes_one: '{{count}} vote',\n votes_other: '{{count}} votes',\n posts_zero: 'No {{itemType}}s',\n posts_one: '{{count}} {{itemType}}',\n posts_other: '{{count}} {{itemType}}s',\n collections_zero: 'No collections',\n collections_one: '{{count}} collection',\n collections_other: '{{count}} collections',\n followers_zero: 'No followers',\n followers_one: '{{count}} follower',\n followers_other: '{{count}} followers',\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 postAnonymously: 'Post anonymously',\n },\n fileInput: {\n label: 'Header image',\n helperText: 'URL of the header image to be used',\n uploadHeaderImage: 'Upload image',\n preview: 'Preview image',\n },\n collectionForm: {\n errorPosting: 'Could not create collection',\n titleInput: {\n label: 'Title',\n helperText: 'Name of the colleciton',\n },\n descriptionInput: {\n placeholder: 'Collection description, what does it contain?',\n },\n submit: {\n existingCollection: 'Save',\n newCollection: 'Create',\n },\n },\n postForm: {\n errorPosting: 'Could not post {{type}}',\n uploadHeaderImage: 'Upload header image',\n titleInput: {\n label: 'Title',\n helperText:\n 'Write good title for your {{type}} that people can understand',\n },\n contentInput: {\n placeholder: 'Your {{type}}',\n },\n submit: {\n existingPost: 'Save',\n newPost: '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 writePage: {\n title: {\n existingArticle: 'Edit article',\n entityArticle: 'Write an article about {{entity}}',\n newArticle: 'New article',\n },\n },\n collectionCreatePage: {\n title: {\n existingCollection: 'Edit collection',\n newCollection: 'New collection',\n },\n },\n askQuestionButton: {\n title: 'Ask a question',\n },\n addToCollectionButton: {\n title: 'Collections',\n manage: 'Add or remove this post from collections',\n close: 'Close',\n },\n writeArticleButton: {\n title: 'Write an article',\n },\n createCollectionButton: {\n title: 'Create collection',\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 editTagModal: {\n title: 'Edit tag {{tag}}',\n description: 'Tag description',\n errorPosting: 'Failed to edit',\n saveButton: 'Save',\n cancelButton: 'Cancel',\n },\n deleteModal: {\n title: {\n question: 'Are you sure you want to delete this post?',\n answer: 'Are you sure you want to delete this answer?',\n collection: 'Are you sure you want to delete this collection?',\n },\n errorDeleting: 'Failed to delete',\n deleteButton: 'Delete',\n cancelButton: 'Cancel',\n },\n favoritePage: {\n title: 'Favorited posts',\n },\n leftMenu: {\n home: 'Home',\n questions: 'Questions',\n articles: 'Articles',\n profile: 'Profile',\n tags: 'Tags',\n entities: 'Entities',\n favoriteQuestions: 'Favorites',\n statistics: 'Statistics',\n collections: 'Collections',\n content: 'Content',\n community: 'Community',\n users: 'Users',\n manage: 'Manage',\n moderate: 'Moderate',\n },\n moderatorPage: {\n title: 'Moderate',\n tools: 'Tools',\n templates: 'Templates',\n templatesInfo:\n 'Templates can be used to prefill question content for the user',\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 followedCollections: 'Followed collections',\n },\n highlights: {\n loadError: 'Failed to load questions',\n own: {\n title: 'Your latest questions',\n noQuestionsLabel: 'No questions',\n },\n hotQuestions: {\n title: 'Hot questions',\n noQuestionsLabel: 'No questions',\n },\n hotArticles: {\n title: 'Hot articles',\n noArticlesLabel: 'No articles',\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 articlesPage: {\n title: 'All articles',\n },\n userLink: {\n anonymous: 'Anonymous',\n },\n articlePage: {\n errorLoading: 'Could not load article',\n editButton: 'Edit this article',\n deleteButton: 'Delete this article',\n },\n templateList: {\n errorLoading: 'Could not load templates',\n editButton: 'Edit',\n deleteButton: 'Delete',\n createButton: 'Create',\n errorPosting: 'Could not post template',\n noTemplates: 'No templates',\n noTemplatesDescription: 'Create a new template to get started',\n titleInput: {\n label: 'Title',\n helperText: 'Name of the template',\n },\n descriptionInput: {\n label: 'Description',\n helperText: 'Template description, what is it used for?',\n },\n questionTitleInput: {\n label: 'Default question title',\n helperText:\n 'Question title to be used when creating a question with this template',\n },\n questionContentInput: {\n placeholder:\n 'Question content to be used when creating a question with this template',\n },\n submit: {\n existingTemplate: 'Save',\n newTemplate: 'Create',\n },\n },\n templateSelectList: {\n selectButton: 'Choose',\n title: 'Create a question from template',\n genericQuestion: 'Generic question',\n genericQuestionDescription: 'Create a generic question',\n },\n pagination: {\n defaultTooltip: 'Number of items',\n },\n collectionsPage: {\n title: 'Collections',\n search: {\n label: 'Search for collection',\n placeholder: 'Search...',\n },\n },\n collectionPage: {\n description: 'Description',\n info: 'You can add questions and articles to the collection from question and article pages',\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 postedAtTime: 'Posted',\n updatedAtTime: 'Updated',\n updatedBy: 'by',\n },\n favorite: {\n remove: 'Remove this post from favorites',\n add: 'Mark this post as favorite',\n },\n link: {\n post: 'Copy link to this post 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 post is good',\n bad: 'This post is not good',\n own: 'You cannot vote your own post',\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 postsList: {\n errorLoading: 'Could not load {{itemType}}s',\n postsPerPage: '{{itemType}}s per page',\n },\n postsContainer: {\n title: {\n by: `{{itemType}}s by`,\n about: '{{itemType}}s about',\n tagged: `{{itemType}} tagged with {{tags}}`,\n favorite: 'Your favorite {{itemType}}s',\n },\n search: {\n label: 'Search for {{itemType}}',\n placeholder: 'Search...',\n },\n noItems: 'No {{itemType}}s',\n createButton: 'Go ahead and create 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 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 entitiesPage: {\n errorLoading: 'Could not load entities',\n defaultTitle: 'Entities',\n search: {\n label: 'Search entity',\n placeholder: 'Search...',\n },\n entities_zero: 'No entities',\n entities_one: 'Showing {{count}} entity',\n entities_other: 'Showing {{count}} entities',\n },\n aiAnswerCard: {\n title: 'Answer from AI',\n },\n usersPage: {\n title: 'Users',\n errorLoading: 'Could not load users',\n defaultTitle: 'users',\n search: {\n label: 'Search user',\n placeholder: 'Search...',\n },\n users_zero: 'No users',\n users_one: 'Showing {{count}} users',\n users_other: 'Showing {{count}} users',\n },\n userPage: {\n profileTab: 'Profile',\n statistics: 'Statistics',\n questions: 'Questions',\n answers: 'Answers',\n collections: 'Collections',\n articles: 'Articles',\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 articles: 'Articles',\n followers: 'Followers',\n users: 'Users',\n tags: 'Tags',\n },\n collectionButton: {\n follow: 'Follow',\n unfollow: 'Unfollow',\n tooltip:\n 'By following a collection, you will get notified when ever a new post is added to the collection',\n },\n tagButton: {\n follow: 'Follow',\n unfollow: 'Unfollow',\n edit: 'Edit',\n tooltip:\n 'By following a tag, you will get notified when ever a new post 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 post for that entity is posted',\n },\n userButton: {\n follow: 'Follow',\n unfollow: 'Unfollow',\n tooltip:\n 'By following a user, you will get notified when ever a new post by that user is posted',\n },\n },\n});\n\nexport const qetaTranslations = createTranslationResource({\n ref: qetaTranslationRef,\n translations: {},\n});\n"],"names":[],"mappings":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