@drodil/backstage-plugin-qeta 3.59.10 → 4.0.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/README.md +6 -11
- package/config.schema.json +58 -0
- package/dist/components/ArticlePage/ArticlePage.esm.js +61 -15
- package/dist/components/ArticlePage/ArticlePage.esm.js.map +1 -1
- package/dist/components/ArticlesPage/ArticlesPage.esm.js +9 -22
- package/dist/components/ArticlesPage/ArticlesPage.esm.js.map +1 -1
- package/dist/components/AskPage/AskPage.esm.js +10 -7
- package/dist/components/AskPage/AskPage.esm.js.map +1 -1
- package/dist/components/CollectionCreatePage/CollectionCreatePage.esm.js +8 -5
- package/dist/components/CollectionCreatePage/CollectionCreatePage.esm.js.map +1 -1
- package/dist/components/CollectionPage/CollectionPage.esm.js +47 -87
- package/dist/components/CollectionPage/CollectionPage.esm.js.map +1 -1
- package/dist/components/CollectionsPage/CollectionsPage.esm.js +8 -5
- package/dist/components/CollectionsPage/CollectionsPage.esm.js.map +1 -1
- package/dist/components/ContentHealthCard/ContentHealthCard.esm.js +61 -89
- package/dist/components/ContentHealthCard/ContentHealthCard.esm.js.map +1 -1
- package/dist/components/ContentHealthCard/ContentHealthCard.module.css.esm.js +8 -0
- package/dist/components/ContentHealthCard/ContentHealthCard.module.css.esm.js.map +1 -0
- package/dist/components/ContentHealthCard/ReviewList.esm.js +27 -60
- package/dist/components/ContentHealthCard/ReviewList.esm.js.map +1 -1
- package/dist/components/ContentHealthCard/ReviewList.module.css.esm.js +8 -0
- package/dist/components/ContentHealthCard/ReviewList.module.css.esm.js.map +1 -0
- package/dist/components/CreateLinkPage/CreateLinkPage.esm.js +9 -6
- package/dist/components/CreateLinkPage/CreateLinkPage.esm.js.map +1 -1
- package/dist/components/EntityPage/EntityPage.esm.js +48 -58
- package/dist/components/EntityPage/EntityPage.esm.js.map +1 -1
- package/dist/components/EntityPostsContent/EntityPostsContent.esm.js +2 -3
- package/dist/components/EntityPostsContent/EntityPostsContent.esm.js.map +1 -1
- package/dist/components/FavoritePage/FavoritePage.esm.js +3 -14
- package/dist/components/FavoritePage/FavoritePage.esm.js.map +1 -1
- package/dist/components/HomePage/HomePage.esm.js +17 -60
- package/dist/components/HomePage/HomePage.esm.js.map +1 -1
- package/dist/components/HomePage/HomePage.module.css.esm.js +8 -0
- package/dist/components/HomePage/HomePage.module.css.esm.js.map +1 -0
- package/dist/components/LinkPage/LinkPage.esm.js +60 -61
- package/dist/components/LinkPage/LinkPage.esm.js.map +1 -1
- package/dist/components/LinksPage/LinksPage.esm.js +9 -16
- package/dist/components/LinksPage/LinksPage.esm.js.map +1 -1
- package/dist/components/ModeratorPage/ModeratorPage.esm.js +19 -29
- package/dist/components/ModeratorPage/ModeratorPage.esm.js.map +1 -1
- package/dist/components/ModeratorPage/ModeratorPage.module.css.esm.js +8 -0
- package/dist/components/ModeratorPage/ModeratorPage.module.css.esm.js.map +1 -0
- package/dist/components/QetaPage/QetaPage.esm.js +187 -239
- package/dist/components/QetaPage/QetaPage.esm.js.map +1 -1
- package/dist/components/QetaPage/QetaPage.module.css.esm.js +8 -0
- package/dist/components/QetaPage/QetaPage.module.css.esm.js.map +1 -0
- package/dist/components/QetaSearchResultListItem/QetaSearchResultListItem.esm.js +67 -78
- package/dist/components/QetaSearchResultListItem/QetaSearchResultListItem.esm.js.map +1 -1
- package/dist/components/QetaSearchResultListItem/QetaSearchResultListItem.module.css.esm.js +8 -0
- package/dist/components/QetaSearchResultListItem/QetaSearchResultListItem.module.css.esm.js.map +1 -0
- package/dist/components/QuestionPage/QuestionPage.esm.js +122 -97
- package/dist/components/QuestionPage/QuestionPage.esm.js.map +1 -1
- package/dist/components/QuestionsPage/QuestionsPage.esm.js +8 -5
- package/dist/components/QuestionsPage/QuestionsPage.esm.js.map +1 -1
- package/dist/components/ReviewPage/ReviewPage.esm.js +53 -18
- package/dist/components/ReviewPage/ReviewPage.esm.js.map +1 -1
- package/dist/components/RightContent/ArticlesRightContent.esm.js +2 -2
- package/dist/components/RightContent/ArticlesRightContent.esm.js.map +1 -1
- package/dist/components/RightContent/DefaultRightContent.esm.js +2 -2
- package/dist/components/RightContent/DefaultRightContent.esm.js.map +1 -1
- package/dist/components/RightContent/EntityRightContent.esm.js +2 -2
- package/dist/components/RightContent/EntityRightContent.esm.js.map +1 -1
- package/dist/components/RightContent/LinkedPosts.esm.js +5 -19
- package/dist/components/RightContent/LinkedPosts.esm.js.map +1 -1
- package/dist/components/RightContent/LinkedPosts.module.css.esm.js +8 -0
- package/dist/components/RightContent/LinkedPosts.module.css.esm.js.map +1 -0
- package/dist/components/RightContent/LinksRightContent.esm.js +2 -2
- package/dist/components/RightContent/LinksRightContent.esm.js.map +1 -1
- package/dist/components/RightContent/PostRightContent.esm.js +4 -4
- package/dist/components/RightContent/PostRightContent.esm.js.map +1 -1
- package/dist/components/RightContent/QuestionsRightContent.esm.js +2 -2
- package/dist/components/RightContent/QuestionsRightContent.esm.js.map +1 -1
- package/dist/components/RightContent/RightContent.esm.js +46 -61
- package/dist/components/RightContent/RightContent.esm.js.map +1 -1
- package/dist/components/RightContent/RightContent.module.css.esm.js +8 -0
- package/dist/components/RightContent/RightContent.module.css.esm.js.map +1 -0
- package/dist/components/RightContent/SimilarQuestions.esm.js +3 -16
- package/dist/components/RightContent/SimilarQuestions.esm.js.map +1 -1
- package/dist/components/RightContent/SimilarQuestions.module.css.esm.js +8 -0
- package/dist/components/RightContent/SimilarQuestions.module.css.esm.js.map +1 -0
- package/dist/components/RightContent/TagRightContent.esm.js +2 -2
- package/dist/components/RightContent/TagRightContent.esm.js.map +1 -1
- package/dist/components/SettingsPage/SettingsPage.esm.js +198 -200
- package/dist/components/SettingsPage/SettingsPage.esm.js.map +1 -1
- package/dist/components/SettingsPage/SettingsPage.module.css.esm.js +8 -0
- package/dist/components/SettingsPage/SettingsPage.module.css.esm.js.map +1 -0
- package/dist/components/Statistics/GlobalStatsContent.esm.js +5 -5
- package/dist/components/Statistics/GlobalStatsContent.esm.js.map +1 -1
- package/dist/components/Statistics/StatisticsPage.esm.js +21 -20
- package/dist/components/Statistics/StatisticsPage.esm.js.map +1 -1
- package/dist/components/Statistics/StatisticsPage.module.css.esm.js +8 -0
- package/dist/components/Statistics/StatisticsPage.module.css.esm.js.map +1 -0
- package/dist/components/TagPage/TagPage.esm.js +58 -87
- package/dist/components/TagPage/TagPage.esm.js.map +1 -1
- package/dist/components/TechDocsAskQuestionAddon/TechDocsAskQuestionAddon.esm.js +23 -32
- package/dist/components/TechDocsAskQuestionAddon/TechDocsAskQuestionAddon.esm.js.map +1 -1
- package/dist/components/TechDocsAskQuestionAddon/TechDocsAskQuestionAddon.module.css.esm.js +8 -0
- package/dist/components/TechDocsAskQuestionAddon/TechDocsAskQuestionAddon.module.css.esm.js.map +1 -0
- package/dist/components/UserPage/UserPage.esm.js +158 -234
- package/dist/components/UserPage/UserPage.esm.js.map +1 -1
- package/dist/components/UserPage/UserPage.module.css.esm.js +8 -0
- package/dist/components/UserPage/UserPage.module.css.esm.js.map +1 -0
- package/dist/components/UserPage/UserStatsContent.esm.js +5 -5
- package/dist/components/UserPage/UserStatsContent.esm.js.map +1 -1
- package/dist/components/UsersPage/UsersPage.esm.js +3 -9
- package/dist/components/UsersPage/UsersPage.esm.js.map +1 -1
- package/dist/components/WritePage/WritePage.esm.js +9 -6
- package/dist/components/WritePage/WritePage.esm.js.map +1 -1
- package/dist/index.d.ts +283 -77
- package/dist/index.esm.js +262 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js +29 -0
- package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js.map +1 -0
- package/dist/{package.json.esm.js → plugins/qeta/package.json.esm.js} +8 -13
- package/dist/{package.json.esm.js.map → plugins/qeta/package.json.esm.js.map} +1 -1
- package/package.json +9 -18
- package/dist/alpha.d.ts +0 -255
- package/dist/alpha.esm.js +0 -238
- package/dist/alpha.esm.js.map +0 -1
- package/dist/components/EntityCards/EntityPostsContainerCard.esm.js +0 -13
- package/dist/components/EntityCards/EntityPostsContainerCard.esm.js.map +0 -1
- package/dist/components/EntityCards/EntityPostsGridCard.esm.js +0 -20
- package/dist/components/EntityCards/EntityPostsGridCard.esm.js.map +0 -1
- package/dist/components/ReviewPage/index.esm.js +0 -6
- package/dist/components/ReviewPage/index.esm.js.map +0 -1
- package/dist/plugin.esm.js +0 -84
- package/dist/plugin.esm.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { qetaTranslationRef, PostHighlightList, FollowedTagsList, FollowedUsersList, FollowedEntitiesList, FollowedCollectionsList } from '@drodil/backstage-plugin-qeta-react';
|
|
3
|
-
import
|
|
3
|
+
import { RiFireLine } from '@remixicon/react';
|
|
4
4
|
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
5
5
|
|
|
6
6
|
const DefaultRightContent = () => {
|
|
@@ -12,7 +12,7 @@ const DefaultRightContent = () => {
|
|
|
12
12
|
type: "hot",
|
|
13
13
|
title: t("highlights.hotQuestions.title"),
|
|
14
14
|
noQuestionsLabel: t("highlights.hotQuestions.noQuestionsLabel"),
|
|
15
|
-
icon: /* @__PURE__ */ jsx(
|
|
15
|
+
icon: /* @__PURE__ */ jsx(RiFireLine, { size: 16 }),
|
|
16
16
|
postType: "question"
|
|
17
17
|
}
|
|
18
18
|
),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultRightContent.esm.js","sources":["../../../src/components/RightContent/DefaultRightContent.tsx"],"sourcesContent":["import {\n FollowedCollectionsList,\n FollowedEntitiesList,\n FollowedTagsList,\n FollowedUsersList,\n PostHighlightList,\n qetaTranslationRef,\n} from '@drodil/backstage-plugin-qeta-react';\nimport
|
|
1
|
+
{"version":3,"file":"DefaultRightContent.esm.js","sources":["../../../src/components/RightContent/DefaultRightContent.tsx"],"sourcesContent":["import {\n FollowedCollectionsList,\n FollowedEntitiesList,\n FollowedTagsList,\n FollowedUsersList,\n PostHighlightList,\n qetaTranslationRef,\n} from '@drodil/backstage-plugin-qeta-react';\nimport { RiFireLine } from '@remixicon/react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\nexport const DefaultRightContent = () => {\n const { t } = useTranslationRef(qetaTranslationRef);\n return (\n <>\n <PostHighlightList\n type=\"hot\"\n title={t('highlights.hotQuestions.title')}\n noQuestionsLabel={t('highlights.hotQuestions.noQuestionsLabel')}\n icon={<RiFireLine size={16} />}\n postType=\"question\"\n />\n <FollowedTagsList />\n <FollowedUsersList />\n <FollowedEntitiesList />\n <FollowedCollectionsList />\n </>\n );\n};\n"],"names":[],"mappings":";;;;;AAWO,MAAM,sBAAsB,MAAM;AACvC,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,kBAAkB,CAAA;AAClD,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,iBAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAK,KAAA;AAAA,QACL,KAAA,EAAO,EAAE,+BAA+B,CAAA;AAAA,QACxC,gBAAA,EAAkB,EAAE,0CAA0C,CAAA;AAAA,QAC9D,IAAA,kBAAM,GAAA,CAAC,UAAA,EAAA,EAAW,IAAA,EAAM,EAAA,EAAI,CAAA;AAAA,QAC5B,QAAA,EAAS;AAAA;AAAA,KACX;AAAA,wBACC,gBAAA,EAAA,EAAiB,CAAA;AAAA,wBACjB,iBAAA,EAAA,EAAkB,CAAA;AAAA,wBAClB,oBAAA,EAAA,EAAqB,CAAA;AAAA,wBACrB,uBAAA,EAAA,EAAwB;AAAA,GAAA,EAC3B,CAAA;AAEJ;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { qetaTranslationRef, FollowedEntitiesList, PostHighlightList } from '@drodil/backstage-plugin-qeta-react';
|
|
3
3
|
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
4
|
-
import
|
|
4
|
+
import { RiFireLine } from '@remixicon/react';
|
|
5
5
|
|
|
6
6
|
const EntityRightContent = (props) => {
|
|
7
7
|
const { t } = useTranslationRef(qetaTranslationRef);
|
|
@@ -15,7 +15,7 @@ const EntityRightContent = (props) => {
|
|
|
15
15
|
type: "hot",
|
|
16
16
|
title: t("highlights.hotQuestions.title"),
|
|
17
17
|
noQuestionsLabel: t("highlights.hotQuestions.noQuestionsLabel"),
|
|
18
|
-
icon: /* @__PURE__ */ jsx(
|
|
18
|
+
icon: /* @__PURE__ */ jsx(RiFireLine, { size: 16 }),
|
|
19
19
|
options: { entities },
|
|
20
20
|
postType: "question"
|
|
21
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityRightContent.esm.js","sources":["../../../src/components/RightContent/EntityRightContent.tsx"],"sourcesContent":["import {\n FollowedEntitiesList,\n PostHighlightList,\n qetaTranslationRef,\n} from '@drodil/backstage-plugin-qeta-react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport
|
|
1
|
+
{"version":3,"file":"EntityRightContent.esm.js","sources":["../../../src/components/RightContent/EntityRightContent.tsx"],"sourcesContent":["import {\n FollowedEntitiesList,\n PostHighlightList,\n qetaTranslationRef,\n} from '@drodil/backstage-plugin-qeta-react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { RiFireLine } from '@remixicon/react';\n\nexport const EntityRightContent = (props: { entityRef?: string }) => {\n const { t } = useTranslationRef(qetaTranslationRef);\n const { entityRef } = props;\n const entities = entityRef ? [entityRef] : undefined;\n\n return (\n <>\n <FollowedEntitiesList />\n <PostHighlightList\n type=\"hot\"\n title={t('highlights.hotQuestions.title')}\n noQuestionsLabel={t('highlights.hotQuestions.noQuestionsLabel')}\n icon={<RiFireLine size={16} />}\n options={{ entities: entities }}\n postType=\"question\"\n />\n <PostHighlightList\n type=\"unanswered\"\n title={t('highlights.unanswered.title')}\n noQuestionsLabel={t('highlights.unanswered.noQuestionsLabel')}\n options={{ entities: entities }}\n postType=\"question\"\n />\n <PostHighlightList\n type=\"incorrect\"\n title={t('highlights.incorrect.title')}\n noQuestionsLabel={t('highlights.incorrect.noQuestionsLabel')}\n options={{ entities: entities }}\n postType=\"question\"\n />\n </>\n );\n};\n"],"names":[],"mappings":";;;;;AAQO,MAAM,kBAAA,GAAqB,CAAC,KAAA,KAAkC;AACnE,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,kBAAkB,CAAA;AAClD,EAAA,MAAM,EAAE,WAAU,GAAI,KAAA;AACtB,EAAA,MAAM,QAAA,GAAW,SAAA,GAAY,CAAC,SAAS,CAAA,GAAI,MAAA;AAE3C,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,oBAAA,EAAA,EAAqB,CAAA;AAAA,oBACtB,GAAA;AAAA,MAAC,iBAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAK,KAAA;AAAA,QACL,KAAA,EAAO,EAAE,+BAA+B,CAAA;AAAA,QACxC,gBAAA,EAAkB,EAAE,0CAA0C,CAAA;AAAA,QAC9D,IAAA,kBAAM,GAAA,CAAC,UAAA,EAAA,EAAW,IAAA,EAAM,EAAA,EAAI,CAAA;AAAA,QAC5B,OAAA,EAAS,EAAE,QAAA,EAAmB;AAAA,QAC9B,QAAA,EAAS;AAAA;AAAA,KACX;AAAA,oBACA,GAAA;AAAA,MAAC,iBAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAK,YAAA;AAAA,QACL,KAAA,EAAO,EAAE,6BAA6B,CAAA;AAAA,QACtC,gBAAA,EAAkB,EAAE,wCAAwC,CAAA;AAAA,QAC5D,OAAA,EAAS,EAAE,QAAA,EAAmB;AAAA,QAC9B,QAAA,EAAS;AAAA;AAAA,KACX;AAAA,oBACA,GAAA;AAAA,MAAC,iBAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAK,WAAA;AAAA,QACL,KAAA,EAAO,EAAE,4BAA4B,CAAA;AAAA,QACrC,gBAAA,EAAkB,EAAE,uCAAuC,CAAA;AAAA,QAC3D,OAAA,EAAS,EAAE,QAAA,EAAmB;AAAA,QAC9B,QAAA,EAAS;AAAA;AAAA;AACX,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1,25 +1,11 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { qetaTranslationRef, useQetaApi, PostHighlightListContent } from '@drodil/backstage-plugin-qeta-react';
|
|
3
3
|
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
4
|
+
import { RiLinksLine } from '@remixicon/react';
|
|
5
|
+
import styles from './LinkedPosts.module.css.esm.js';
|
|
6
6
|
|
|
7
|
-
const useStyles = makeStyles((theme) => ({
|
|
8
|
-
container: {
|
|
9
|
-
borderLeft: `3px solid ${theme.palette.info.main}`,
|
|
10
|
-
backgroundColor: theme.palette.type === "dark" ? "rgba(33, 150, 243, 0.08)" : "rgba(33, 150, 243, 0.05)",
|
|
11
|
-
borderRadius: theme.shape.borderRadius,
|
|
12
|
-
padding: `${theme.spacing(1)}px 2px ${theme.spacing(1)}px`,
|
|
13
|
-
marginBottom: theme.spacing(2)
|
|
14
|
-
},
|
|
15
|
-
title: {
|
|
16
|
-
color: theme.palette.info.main,
|
|
17
|
-
fontWeight: 600
|
|
18
|
-
}
|
|
19
|
-
}));
|
|
20
7
|
const LinkedPosts = (props) => {
|
|
21
8
|
const { postId } = props;
|
|
22
|
-
const classes = useStyles();
|
|
23
9
|
const { t } = useTranslationRef(qetaTranslationRef);
|
|
24
10
|
const {
|
|
25
11
|
value: posts,
|
|
@@ -35,9 +21,9 @@ const LinkedPosts = (props) => {
|
|
|
35
21
|
title: t("rightMenu.linkedPosts"),
|
|
36
22
|
posts,
|
|
37
23
|
loading,
|
|
38
|
-
containerClassName:
|
|
39
|
-
titleClassName:
|
|
40
|
-
icon: /* @__PURE__ */ jsx(
|
|
24
|
+
containerClassName: styles.container,
|
|
25
|
+
titleClassName: styles.title,
|
|
26
|
+
icon: /* @__PURE__ */ jsx(RiLinksLine, { size: 16 })
|
|
41
27
|
}
|
|
42
28
|
);
|
|
43
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkedPosts.esm.js","sources":["../../../src/components/RightContent/LinkedPosts.tsx"],"sourcesContent":["import {\n PostHighlightListContent,\n qetaTranslationRef,\n useQetaApi,\n} from '@drodil/backstage-plugin-qeta-react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport {
|
|
1
|
+
{"version":3,"file":"LinkedPosts.esm.js","sources":["../../../src/components/RightContent/LinkedPosts.tsx"],"sourcesContent":["import {\n PostHighlightListContent,\n qetaTranslationRef,\n useQetaApi,\n} from '@drodil/backstage-plugin-qeta-react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { RiLinksLine } from '@remixicon/react';\nimport styles from './LinkedPosts.module.css';\n\nexport const LinkedPosts = (props: { postId: number }) => {\n const { postId } = props;\n const { t } = useTranslationRef(qetaTranslationRef);\n\n const {\n value: posts,\n loading,\n error,\n } = useQetaApi(api => api.getLinkedPosts(postId), [postId]);\n\n if (error || !posts || posts.length === 0) {\n return null;\n }\n\n return (\n <PostHighlightListContent\n title={t('rightMenu.linkedPosts')}\n posts={posts}\n loading={loading}\n containerClassName={styles.container}\n titleClassName={styles.title}\n icon={<RiLinksLine size={16} />}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;AASO,MAAM,WAAA,GAAc,CAAC,KAAA,KAA8B;AACxD,EAAA,MAAM,EAAE,QAAO,GAAI,KAAA;AACnB,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,kBAAkB,CAAA;AAElD,EAAA,MAAM;AAAA,IACJ,KAAA,EAAO,KAAA;AAAA,IACP,OAAA;AAAA,IACA;AAAA,GACF,GAAI,WAAW,CAAA,GAAA,KAAO,GAAA,CAAI,eAAe,MAAM,CAAA,EAAG,CAAC,MAAM,CAAC,CAAA;AAE1D,EAAA,IAAI,KAAA,IAAS,CAAC,KAAA,IAAS,KAAA,CAAM,WAAW,CAAA,EAAG;AACzC,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,wBAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,EAAE,uBAAuB,CAAA;AAAA,MAChC,KAAA;AAAA,MACA,OAAA;AAAA,MACA,oBAAoB,MAAA,CAAO,SAAA;AAAA,MAC3B,gBAAgB,MAAA,CAAO,KAAA;AAAA,MACvB,IAAA,kBAAM,GAAA,CAAC,WAAA,EAAA,EAAY,IAAA,EAAM,EAAA,EAAI;AAAA;AAAA,GAC/B;AAEJ;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = "@layer components {\n .LinkedPosts_container__8db33bbdbf {\n border-left: 3px solid var(--bui-border-info);\n background-color: var(--bui-bg-info);\n border-radius: var(--bui-radius-2);\n padding: var(--bui-space-2) 2px var(--bui-space-2);\n margin-bottom: var(--bui-space-4);\n }\n\n .LinkedPosts_title__8db33bbdbf {\n color: var(--bui-fg-info);\n font-weight: 600;\n }\n}\n";
|
|
4
|
+
var styles = {"container":"LinkedPosts_container__8db33bbdbf","title":"LinkedPosts_title__8db33bbdbf"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { styles as default };
|
|
8
|
+
//# sourceMappingURL=LinkedPosts.module.css.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkedPosts.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { qetaTranslationRef, PostHighlightList, FollowedTagsList, FollowedEntitiesList } from '@drodil/backstage-plugin-qeta-react';
|
|
3
3
|
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
4
|
-
import
|
|
4
|
+
import { RiFireLine } from '@remixicon/react';
|
|
5
5
|
|
|
6
6
|
const LinksRightContent = (props) => {
|
|
7
7
|
const { t } = useTranslationRef(qetaTranslationRef);
|
|
@@ -14,7 +14,7 @@ const LinksRightContent = (props) => {
|
|
|
14
14
|
type: "hot",
|
|
15
15
|
title: t("highlights.hotLinks.title"),
|
|
16
16
|
noQuestionsLabel: t("highlights.hotLinks.noLinksLabel"),
|
|
17
|
-
icon: /* @__PURE__ */ jsx(
|
|
17
|
+
icon: /* @__PURE__ */ jsx(RiFireLine, { size: 16 }),
|
|
18
18
|
postType: "link",
|
|
19
19
|
options: {
|
|
20
20
|
tags,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinksRightContent.esm.js","sources":["../../../src/components/RightContent/LinksRightContent.tsx"],"sourcesContent":["import {\n FollowedEntitiesList,\n FollowedTagsList,\n PostHighlightList,\n qetaTranslationRef,\n} from '@drodil/backstage-plugin-qeta-react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport
|
|
1
|
+
{"version":3,"file":"LinksRightContent.esm.js","sources":["../../../src/components/RightContent/LinksRightContent.tsx"],"sourcesContent":["import {\n FollowedEntitiesList,\n FollowedTagsList,\n PostHighlightList,\n qetaTranslationRef,\n} from '@drodil/backstage-plugin-qeta-react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { RiFireLine } from '@remixicon/react';\n\nexport const LinksRightContent = (props: {\n tags?: string[];\n entityRef?: string;\n}) => {\n const { t } = useTranslationRef(qetaTranslationRef);\n const { tags, entityRef } = props;\n const entities = entityRef ? [entityRef] : undefined;\n\n return (\n <>\n <PostHighlightList\n type=\"hot\"\n title={t('highlights.hotLinks.title')}\n noQuestionsLabel={t('highlights.hotLinks.noLinksLabel')}\n icon={<RiFireLine size={16} />}\n postType=\"link\"\n options={{\n tags: tags,\n entities: entities,\n }}\n />\n <FollowedTagsList />\n <FollowedEntitiesList />\n </>\n );\n};\n"],"names":[],"mappings":";;;;;AASO,MAAM,iBAAA,GAAoB,CAAC,KAAA,KAG5B;AACJ,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,kBAAkB,CAAA;AAClD,EAAA,MAAM,EAAE,IAAA,EAAM,SAAA,EAAU,GAAI,KAAA;AAC5B,EAAA,MAAM,QAAA,GAAW,SAAA,GAAY,CAAC,SAAS,CAAA,GAAI,MAAA;AAE3C,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,iBAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAK,KAAA;AAAA,QACL,KAAA,EAAO,EAAE,2BAA2B,CAAA;AAAA,QACpC,gBAAA,EAAkB,EAAE,kCAAkC,CAAA;AAAA,QACtD,IAAA,kBAAM,GAAA,CAAC,UAAA,EAAA,EAAW,IAAA,EAAM,EAAA,EAAI,CAAA;AAAA,QAC5B,QAAA,EAAS,MAAA;AAAA,QACT,OAAA,EAAS;AAAA,UACP,IAAA;AAAA,UACA;AAAA;AACF;AAAA,KACF;AAAA,wBACC,gBAAA,EAAA,EAAiB,CAAA;AAAA,wBACjB,oBAAA,EAAA,EAAqB;AAAA,GAAA,EACxB,CAAA;AAEJ;;;;"}
|
|
@@ -4,8 +4,8 @@ import { qetaTranslationRef, useQetaApi, PostHighlightList, FollowedTagsList, Fo
|
|
|
4
4
|
import { DefaultRightContent } from './DefaultRightContent.esm.js';
|
|
5
5
|
import { ContentHealthCard } from '../ContentHealthCard/ContentHealthCard.esm.js';
|
|
6
6
|
import { SimilarPosts } from './SimilarPosts.esm.js';
|
|
7
|
-
import { Box } from '@
|
|
8
|
-
import
|
|
7
|
+
import { Box } from '@backstage/ui';
|
|
8
|
+
import { RiFireLine } from '@remixicon/react';
|
|
9
9
|
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
10
10
|
import { LinkedPosts } from './LinkedPosts.esm.js';
|
|
11
11
|
|
|
@@ -27,7 +27,7 @@ const PostRightContent = (props) => {
|
|
|
27
27
|
}
|
|
28
28
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
29
29
|
post && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
30
|
-
/* @__PURE__ */ jsx(Box, { mb:
|
|
30
|
+
/* @__PURE__ */ jsx(Box, { mb: "4", children: /* @__PURE__ */ jsx(ContentHealthCard, { post }) }),
|
|
31
31
|
/* @__PURE__ */ jsx(LinkedPosts, { postId: post.id }),
|
|
32
32
|
/* @__PURE__ */ jsx(SimilarPosts, { post }),
|
|
33
33
|
/* @__PURE__ */ jsx(
|
|
@@ -36,7 +36,7 @@ const PostRightContent = (props) => {
|
|
|
36
36
|
type: "hot",
|
|
37
37
|
title,
|
|
38
38
|
noQuestionsLabel: t("highlights.hotQuestions.noQuestionsLabel"),
|
|
39
|
-
icon: /* @__PURE__ */ jsx(
|
|
39
|
+
icon: /* @__PURE__ */ jsx(RiFireLine, { size: 16 }),
|
|
40
40
|
postType: post.type,
|
|
41
41
|
options: {
|
|
42
42
|
tags: post.tags,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostRightContent.esm.js","sources":["../../../src/components/RightContent/PostRightContent.tsx"],"sourcesContent":["import { useParams } from 'react-router-dom';\nimport {\n FollowedCollectionsList,\n FollowedEntitiesList,\n FollowedTagsList,\n FollowedUsersList,\n PostHighlightList,\n qetaTranslationRef,\n useQetaApi,\n} from '@drodil/backstage-plugin-qeta-react';\nimport { DefaultRightContent } from './DefaultRightContent';\nimport { ContentHealthCard } from '../ContentHealthCard';\nimport { SimilarPosts } from './SimilarPosts';\nimport { Box } from '@
|
|
1
|
+
{"version":3,"file":"PostRightContent.esm.js","sources":["../../../src/components/RightContent/PostRightContent.tsx"],"sourcesContent":["import { useParams } from 'react-router-dom';\nimport {\n FollowedCollectionsList,\n FollowedEntitiesList,\n FollowedTagsList,\n FollowedUsersList,\n PostHighlightList,\n qetaTranslationRef,\n useQetaApi,\n} from '@drodil/backstage-plugin-qeta-react';\nimport { DefaultRightContent } from './DefaultRightContent';\nimport { ContentHealthCard } from '../ContentHealthCard';\nimport { SimilarPosts } from './SimilarPosts';\nimport { Box } from '@backstage/ui';\nimport { RiFireLine } from '@remixicon/react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\nimport { LinkedPosts } from './LinkedPosts';\n\nexport const PostRightContent = (props?: { id?: string }) => {\n const { id: paramId } = useParams();\n const id = props?.id || paramId;\n const { t } = useTranslationRef(qetaTranslationRef);\n\n const { value: post } = useQetaApi(\n api => api.getPost(id, { anonymous: true }),\n [id],\n );\n\n let title: string;\n\n if (post?.type === 'article') {\n title = t('highlights.hotArticles.title');\n } else if (post?.type === 'link') {\n title = t('highlights.hotLinks.title');\n } else {\n title = t('highlights.hotQuestions.title');\n }\n\n return (\n <>\n {post && (\n <>\n <Box mb=\"4\">\n <ContentHealthCard post={post} />\n </Box>\n <LinkedPosts postId={post.id} />\n <SimilarPosts post={post} />\n <PostHighlightList\n type=\"hot\"\n title={title}\n noQuestionsLabel={t('highlights.hotQuestions.noQuestionsLabel')}\n icon={<RiFireLine size={16} />}\n postType={post.type}\n options={{\n tags: post.tags,\n entities: post.entities,\n }}\n />\n <FollowedTagsList />\n <FollowedUsersList />\n <FollowedEntitiesList />\n <FollowedCollectionsList />\n </>\n )}\n {!post && <DefaultRightContent />}\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAmBO,MAAM,gBAAA,GAAmB,CAAC,KAAA,KAA4B;AAC3D,EAAA,MAAM,EAAE,EAAA,EAAI,OAAA,EAAQ,GAAI,SAAA,EAAU;AAClC,EAAA,MAA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AU,IAAA,CAAK,IAAA;AAAA,UACf,OAAA,EAAS;AAAA,YACP,MAAM,IAAA,CAAK,IAAA;AAAA,YACX,UAAU,IAAA,CAAK;AAAA;AACjB;AAAA,OACF;AAAA,0BACC,gBAAA,EAAA,EAAiB,CAAA;AAAA,0BACjB,iBAAA,EAAA,EAAkB,CAAA;AAAA,0BAClB,oBAAA,EAAA,EAAqB,CAAA;AAAA,0BACrB,uBAAA,EAAA,EAAwB;AAAA,KAAA,EAC3B,CAAA;AAAA,IAED,CAAC,IAAA,oBAAQ,GAAA,CAAC,mBAAA,EAAA,EAAoB;AAAA,GAAA,EACjC,CAAA;AAEJ;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { qetaTranslationRef, PostHighlightList, FollowedTagsList, FollowedEntitiesList } from '@drodil/backstage-plugin-qeta-react';
|
|
3
3
|
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
4
|
-
import
|
|
4
|
+
import { RiFireLine } from '@remixicon/react';
|
|
5
5
|
|
|
6
6
|
const QuestionsRightContent = (props) => {
|
|
7
7
|
const { t } = useTranslationRef(qetaTranslationRef);
|
|
@@ -14,7 +14,7 @@ const QuestionsRightContent = (props) => {
|
|
|
14
14
|
type: "hot",
|
|
15
15
|
title: t("highlights.hotQuestions.title"),
|
|
16
16
|
noQuestionsLabel: t("highlights.hotQuestions.noQuestionsLabel"),
|
|
17
|
-
icon: /* @__PURE__ */ jsx(
|
|
17
|
+
icon: /* @__PURE__ */ jsx(RiFireLine, { size: 16 }),
|
|
18
18
|
options: {
|
|
19
19
|
tags,
|
|
20
20
|
entities
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuestionsRightContent.esm.js","sources":["../../../src/components/RightContent/QuestionsRightContent.tsx"],"sourcesContent":["import {\n FollowedEntitiesList,\n FollowedTagsList,\n PostHighlightList,\n qetaTranslationRef,\n} from '@drodil/backstage-plugin-qeta-react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport
|
|
1
|
+
{"version":3,"file":"QuestionsRightContent.esm.js","sources":["../../../src/components/RightContent/QuestionsRightContent.tsx"],"sourcesContent":["import {\n FollowedEntitiesList,\n FollowedTagsList,\n PostHighlightList,\n qetaTranslationRef,\n} from '@drodil/backstage-plugin-qeta-react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { RiFireLine } from '@remixicon/react';\n\nexport const QuestionsRightContent = (props: {\n tags?: string[];\n entityRef?: string;\n}) => {\n const { t } = useTranslationRef(qetaTranslationRef);\n const { tags, entityRef } = props;\n const entities = entityRef ? [entityRef] : undefined;\n\n return (\n <>\n <PostHighlightList\n type=\"hot\"\n title={t('highlights.hotQuestions.title')}\n noQuestionsLabel={t('highlights.hotQuestions.noQuestionsLabel')}\n icon={<RiFireLine size={16} />}\n options={{\n tags: tags,\n entities: entities,\n }}\n postType=\"question\"\n />\n <PostHighlightList\n type=\"unanswered\"\n title={t('highlights.unanswered.title')}\n noQuestionsLabel={t('highlights.unanswered.noQuestionsLabel')}\n options={{\n tags: tags,\n entities: entities,\n }}\n postType=\"question\"\n />\n <PostHighlightList\n type=\"incorrect\"\n title={t('highlights.incorrect.title')}\n noQuestionsLabel={t('highlights.incorrect.noQuestionsLabel')}\n options={{\n tags: tags,\n entities: entities,\n }}\n postType=\"question\"\n />\n <FollowedTagsList />\n <FollowedEntitiesList />\n </>\n );\n};\n"],"names":[],"mappings":";;;;;AASO,MAAM,qBAAA,GAAwB,CAAC,KAAA,KAGhC;AACJ,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,kBAAkB,CAAA;AAClD,EAAA,MAAM,EAAE,IAAA,EAAM,SAAA,EAAU,GAAI,KAAA;AAC5B,EAAA,MAAM,QAAA,GAAW,SAAA,GAAY,CAAC,SAAS,CAAA,GAAI,MAAA;AAE3C,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,iBAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAK,KAAA;AAAA,QACL,KAAA,EAAO,EAAE,+BAA+B,CAAA;AAAA,QACxC,gBAAA,EAAkB,EAAE,0CAA0C,CAAA;AAAA,QAC9D,IAAA,kBAAM,GAAA,CAAC,UAAA,EAAA,EAAW,IAAA,EAAM,EAAA,EAAI,CAAA;AAAA,QAC5B,OAAA,EAAS;AAAA,UACP,IAAA;AAAA,UACA;AAAA,SACF;AAAA,QACA,QAAA,EAAS;AAAA;AAAA,KACX;AAAA,oBACA,GAAA;AAAA,MAAC,iBAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAK,YAAA;AAAA,QACL,KAAA,EAAO,EAAE,6BAA6B,CAAA;AAAA,QACtC,gBAAA,EAAkB,EAAE,wCAAwC,CAAA;AAAA,QAC5D,OAAA,EAAS;AAAA,UACP,IAAA;AAAA,UACA;AAAA,SACF;AAAA,QACA,QAAA,EAAS;AAAA;AAAA,KACX;AAAA,oBACA,GAAA;AAAA,MAAC,iBAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAK,WAAA;AAAA,QACL,KAAA,EAAO,EAAE,4BAA4B,CAAA;AAAA,QACrC,gBAAA,EAAkB,EAAE,uCAAuC,CAAA;AAAA,QAC3D,OAAA,EAAS;AAAA,UACP,IAAA;AAAA,UACA;AAAA,SACF;AAAA,QACA,QAAA,EAAS;AAAA;AAAA,KACX;AAAA,wBACC,gBAAA,EAAA,EAAiB,CAAA;AAAA,wBACjB,oBAAA,EAAA,EAAqB;AAAA,GAAA,EACxB,CAAA;AAEJ;;;;"}
|
|
@@ -2,8 +2,8 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { useState, useEffect } from 'react';
|
|
3
3
|
import { useRouteRef } from '@backstage/core-plugin-api';
|
|
4
4
|
import { AskRightContent } from './AskRightContent.esm.js';
|
|
5
|
-
import { qetaTranslationRef, questionsRouteRef, articlesRouteRef, usersRouteRef, tagsRouteRef, linksRouteRef, collectionsRouteRef, entitiesRouteRef, favoriteQuestionsRouteRef, qetaRouteRef, askRouteRef, editQuestionRouteRef, userRouteRef, tagRouteRef, entityRouteRef, questionRouteRef, articleRouteRef, linkRouteRef } from '@drodil/backstage-plugin-qeta-react';
|
|
6
|
-
import { Box,
|
|
5
|
+
import { useQetaConfig, qetaTranslationRef, questionsRouteRef, articlesRouteRef, usersRouteRef, tagsRouteRef, linksRouteRef, collectionsRouteRef, entitiesRouteRef, favoriteQuestionsRouteRef, qetaRouteRef, askRouteRef, editQuestionRouteRef, userRouteRef, tagRouteRef, entityRouteRef, questionRouteRef, articleRouteRef, linkRouteRef } from '@drodil/backstage-plugin-qeta-react';
|
|
6
|
+
import { useBreakpoint, Box, Flex, TooltipTrigger, ButtonIcon, Tooltip } from '@backstage/ui';
|
|
7
7
|
import { useLocation, useSearchParams, matchPath } from 'react-router-dom';
|
|
8
8
|
import { filterTags } from '@drodil/backstage-plugin-qeta-common';
|
|
9
9
|
import { HomeRightContent } from './HomeRightContent.esm.js';
|
|
@@ -17,37 +17,17 @@ import { TagsRightContent } from './TagsRightContent.esm.js';
|
|
|
17
17
|
import { EntitiesRightContent } from './EntitiesRightContent.esm.js';
|
|
18
18
|
import { EntityRightContent } from './EntityRightContent.esm.js';
|
|
19
19
|
import { CollectionsRightContent } from './CollectionsRightContent.esm.js';
|
|
20
|
-
import
|
|
21
|
-
import ChevronLeftIcon from '@material-ui/icons/ChevronLeft';
|
|
20
|
+
import { RiMenuUnfoldLine, RiMenuFoldLine } from '@remixicon/react';
|
|
22
21
|
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
23
22
|
import { DefaultRightContent } from './DefaultRightContent.esm.js';
|
|
24
23
|
import { PostRightContent } from './PostRightContent.esm.js';
|
|
24
|
+
import styles from './RightContent.module.css.esm.js';
|
|
25
25
|
|
|
26
|
-
const useStyles = makeStyles((theme) => ({
|
|
27
|
-
container: {
|
|
28
|
-
width: (props) => props.compact ? "72px" : "245px",
|
|
29
|
-
padding: (props) => props.compact ? theme.spacing(1) : theme.spacing(0, 0, 0, 1),
|
|
30
|
-
transition: "width 0.2s ease-in-out",
|
|
31
|
-
display: "flex",
|
|
32
|
-
flexDirection: "column",
|
|
33
|
-
overflowX: "hidden",
|
|
34
|
-
[theme.breakpoints.down("md")]: {
|
|
35
|
-
width: "100%"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
toggleButton: {
|
|
39
|
-
marginBottom: theme.spacing(1),
|
|
40
|
-
marginRight: theme.spacing(1.5)
|
|
41
|
-
},
|
|
42
|
-
content: {
|
|
43
|
-
display: (props) => props.compact ? "none" : "block",
|
|
44
|
-
opacity: (props) => props.compact ? 0 : 1,
|
|
45
|
-
transition: "opacity 0.2s ease-in-out"
|
|
46
|
-
}
|
|
47
|
-
}));
|
|
48
26
|
const RightContent = (props) => {
|
|
49
27
|
const { compact = false, onToggle } = props;
|
|
50
|
-
const
|
|
28
|
+
const { disabled } = useQetaConfig();
|
|
29
|
+
const { down } = useBreakpoint();
|
|
30
|
+
const isSmall = down("md");
|
|
51
31
|
const location = useLocation();
|
|
52
32
|
const [searchParams] = useSearchParams();
|
|
53
33
|
const { t } = useTranslationRef(qetaTranslationRef);
|
|
@@ -175,60 +155,65 @@ const RightContent = (props) => {
|
|
|
175
155
|
} else if (isPostPage) {
|
|
176
156
|
const id = questionMatch?.params.id || articleMatch?.params.id || linkMatch?.params.id;
|
|
177
157
|
content = /* @__PURE__ */ jsx(PostRightContent, { id });
|
|
178
|
-
} else if (isQuestions) {
|
|
158
|
+
} else if (isQuestions && !disabled.questions) {
|
|
179
159
|
content = /* @__PURE__ */ jsx(QuestionsRightContent, { tags, entityRef });
|
|
180
|
-
} else if (isArticles) {
|
|
160
|
+
} else if (isArticles && !disabled.articles) {
|
|
181
161
|
content = /* @__PURE__ */ jsx(ArticlesRightContent, { tags, entityRef });
|
|
182
|
-
} else if (isLinks) {
|
|
162
|
+
} else if (isLinks && !disabled.links) {
|
|
183
163
|
content = /* @__PURE__ */ jsx(LinksRightContent, { tags, entityRef });
|
|
184
164
|
} else if (isFavorite) {
|
|
185
165
|
content = /* @__PURE__ */ jsx(FavoriteRightContent, {});
|
|
186
166
|
} else if (isUsers) {
|
|
187
167
|
content = /* @__PURE__ */ jsx(UsersRightContent, {});
|
|
188
|
-
} else if (tagMatch) {
|
|
168
|
+
} else if (tagMatch && !disabled.tags) {
|
|
189
169
|
content = /* @__PURE__ */ jsx(TagRightContent, { tags });
|
|
190
170
|
} else if (userMatch && userRef) {
|
|
191
171
|
content = null;
|
|
192
|
-
} else if (isTags) {
|
|
172
|
+
} else if (isTags && !disabled.tags) {
|
|
193
173
|
content = /* @__PURE__ */ jsx(TagsRightContent, {});
|
|
194
|
-
} else if (isEntities) {
|
|
174
|
+
} else if (isEntities && !disabled.entities) {
|
|
195
175
|
content = /* @__PURE__ */ jsx(EntitiesRightContent, {});
|
|
196
|
-
} else if (entityMatch && entityRef) {
|
|
176
|
+
} else if (entityMatch && entityRef && !disabled.entities) {
|
|
197
177
|
content = /* @__PURE__ */ jsx(EntityRightContent, { entityRef });
|
|
198
|
-
} else if (isCollections) {
|
|
178
|
+
} else if (isCollections && !disabled.collections) {
|
|
199
179
|
content = /* @__PURE__ */ jsx(CollectionsRightContent, {});
|
|
200
180
|
}
|
|
201
181
|
if (!content) {
|
|
202
182
|
content = /* @__PURE__ */ jsx(DefaultRightContent, {});
|
|
203
183
|
}
|
|
204
|
-
return /* @__PURE__ */ jsxs(
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
184
|
+
return /* @__PURE__ */ jsxs(
|
|
185
|
+
Box,
|
|
186
|
+
{
|
|
187
|
+
className: [
|
|
188
|
+
styles.container,
|
|
189
|
+
compact ? styles.compact : "",
|
|
190
|
+
isSmall ? styles.full : ""
|
|
191
|
+
].filter(Boolean).join(" "),
|
|
192
|
+
children: [
|
|
193
|
+
/* @__PURE__ */ jsx(
|
|
194
|
+
Box,
|
|
214
195
|
{
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
children: /* @__PURE__ */ jsx(
|
|
218
|
-
IconButton,
|
|
219
|
-
{
|
|
220
|
-
onClick: onToggle,
|
|
221
|
-
size: "small",
|
|
222
|
-
className: compact ? "" : classes.toggleButton,
|
|
223
|
-
style: { marginTop: 8 },
|
|
224
|
-
children: compact ? /* @__PURE__ */ jsx(ChevronLeftIcon, {}) : /* @__PURE__ */ jsx(MenuOpenIcon, { style: { transform: "scaleX(-1)" } })
|
|
225
|
-
}
|
|
226
|
-
)
|
|
196
|
+
className: `${styles.content} ${compact ? styles.contentHidden : ""}`,
|
|
197
|
+
children: content
|
|
227
198
|
}
|
|
228
|
-
)
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
199
|
+
),
|
|
200
|
+
/* @__PURE__ */ jsx(Flex, { justify: compact ? "center" : "end", style: { marginTop: "auto" }, children: /* @__PURE__ */ jsxs(TooltipTrigger, { children: [
|
|
201
|
+
/* @__PURE__ */ jsx(
|
|
202
|
+
ButtonIcon,
|
|
203
|
+
{
|
|
204
|
+
"aria-label": compact ? t("rightMenu.expand") : t("rightMenu.collapse"),
|
|
205
|
+
size: "small",
|
|
206
|
+
variant: "tertiary",
|
|
207
|
+
className: compact ? "" : styles.toggleButton,
|
|
208
|
+
onPress: onToggle,
|
|
209
|
+
icon: compact ? /* @__PURE__ */ jsx(RiMenuUnfoldLine, { size: 16 }) : /* @__PURE__ */ jsx(RiMenuFoldLine, { size: 16 })
|
|
210
|
+
}
|
|
211
|
+
),
|
|
212
|
+
/* @__PURE__ */ jsx(Tooltip, { placement: "left", children: compact ? t("rightMenu.expand") : t("rightMenu.collapse") })
|
|
213
|
+
] }) })
|
|
214
|
+
]
|
|
215
|
+
}
|
|
216
|
+
);
|
|
232
217
|
};
|
|
233
218
|
|
|
234
219
|
export { RightContent };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RightContent.esm.js","sources":["../../../src/components/RightContent/RightContent.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport { useRouteRef } from '@backstage/core-plugin-api';\nimport { AskRightContent } from './AskRightContent';\nimport {\n articleRouteRef,\n articlesRouteRef,\n askRouteRef,\n collectionsRouteRef,\n editQuestionRouteRef,\n entitiesRouteRef,\n entityRouteRef,\n favoriteQuestionsRouteRef,\n linkRouteRef,\n linksRouteRef,\n qetaRouteRef,\n qetaTranslationRef,\n questionRouteRef,\n questionsRouteRef,\n tagRouteRef,\n tagsRouteRef,\n userRouteRef,\n usersRouteRef,\n} from '@drodil/backstage-plugin-qeta-react';\nimport { Box, IconButton, makeStyles, Tooltip } from '@material-ui/core';\nimport { matchPath, useLocation, useSearchParams } from 'react-router-dom';\nimport { filterTags } from '@drodil/backstage-plugin-qeta-common';\nimport { HomeRightContent } from './HomeRightContent';\nimport { QuestionsRightContent } from './QuestionsRightContent';\nimport { ArticlesRightContent } from './ArticlesRightContent';\nimport { LinksRightContent } from './LinksRightContent';\nimport { FavoriteRightContent } from './FavoriteRightContent';\nimport { UsersRightContent } from './UsersRightContent';\nimport { TagRightContent } from './TagRightContent';\nimport { TagsRightContent } from './TagsRightContent';\nimport { EntitiesRightContent } from './EntitiesRightContent';\nimport { EntityRightContent } from './EntityRightContent';\nimport { CollectionsRightContent } from './CollectionsRightContent';\nimport MenuOpenIcon from '@material-ui/icons/MenuOpen';\nimport ChevronLeftIcon from '@material-ui/icons/ChevronLeft';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { DefaultRightContent } from './DefaultRightContent';\nimport { PostRightContent } from './PostRightContent';\n\nconst useStyles = makeStyles(theme => ({\n container: {\n width: (props: { compact: boolean }) => (props.compact ? '72px' : '245px'),\n padding: (props: { compact: boolean }) =>\n props.compact ? theme.spacing(1) : theme.spacing(0, 0, 0, 1),\n transition: 'width 0.2s ease-in-out',\n display: 'flex',\n flexDirection: 'column',\n overflowX: 'hidden',\n [theme.breakpoints.down('md')]: {\n width: '100%',\n },\n },\n toggleButton: {\n marginBottom: theme.spacing(1),\n marginRight: theme.spacing(1.5),\n },\n content: {\n display: (props: { compact: boolean }) =>\n props.compact ? 'none' : 'block',\n opacity: (props: { compact: boolean }) => (props.compact ? 0 : 1),\n transition: 'opacity 0.2s ease-in-out',\n },\n}));\n\nexport const RightContent = (props: {\n compact?: boolean;\n onToggle?: () => void;\n}) => {\n const { compact = false, onToggle } = props;\n const classes = useStyles({ compact });\n const location = useLocation();\n const [searchParams] = useSearchParams();\n const { t } = useTranslationRef(qetaTranslationRef);\n\n // Route Refs\n const questionsPath = useRouteRef(questionsRouteRef);\n const articlesPath = useRouteRef(articlesRouteRef);\n const usersPath = useRouteRef(usersRouteRef);\n const tagsPath = useRouteRef(tagsRouteRef);\n const linksPath = useRouteRef(linksRouteRef);\n const collectionsPath = useRouteRef(collectionsRouteRef);\n const entitiesPath = useRouteRef(entitiesRouteRef);\n const favoritePath = useRouteRef(favoriteQuestionsRouteRef);\n const homePath = useRouteRef(qetaRouteRef);\n // qetaRouteRef gives the base path of the plugin, e.g. /qeta\n const rootPath = homePath();\n\n // Matchers\n const isQuestions = !!matchPath(\n { path: questionsPath(), end: true },\n location.pathname,\n );\n const isAsk = !!(\n matchPath(\n { path: `${rootPath}${askRouteRef.path}`, end: true },\n location.pathname,\n ) ||\n matchPath(\n { path: `${rootPath}${editQuestionRouteRef.path}`, end: true },\n location.pathname,\n )\n );\n\n const isArticles = !!matchPath(\n { path: articlesPath(), end: true },\n location.pathname,\n );\n const isUsers = !!matchPath(\n { path: usersPath(), end: true },\n location.pathname,\n );\n const userMatch = matchPath(\n { path: `${rootPath}${userRouteRef.path}` },\n location.pathname,\n );\n const isTags = !!matchPath(\n { path: tagsPath(), end: true },\n location.pathname,\n );\n const tagMatch = matchPath(\n { path: `${rootPath}${tagRouteRef.path}` },\n location.pathname,\n );\n const isCollections = !!matchPath(\n { path: collectionsPath(), end: true },\n location.pathname,\n );\n const isEntities = !!matchPath(\n { path: entitiesPath(), end: true },\n location.pathname,\n );\n const entityMatch = matchPath(\n { path: `${rootPath}${entityRouteRef.path}` },\n location.pathname,\n );\n const isLinks = !!matchPath(\n { path: linksPath(), end: true },\n location.pathname,\n );\n const isFavorite = !!matchPath(\n { path: favoritePath(), end: true },\n location.pathname,\n );\n const questionMatch = matchPath(\n { path: `${rootPath}${questionRouteRef.path}` },\n location.pathname,\n );\n const articleMatch = matchPath(\n { path: `${rootPath}${articleRouteRef.path}` },\n location.pathname,\n );\n const linkMatch = matchPath(\n { path: `${rootPath}${linkRouteRef.path}` },\n location.pathname,\n );\n const isPostPage = !!(questionMatch || articleMatch || linkMatch);\n const isHome = !!(\n matchPath({ path: homePath(), end: true }, location.pathname) ||\n location.pathname === homePath()\n );\n\n const [entityRef, setEntityRef] = useState<string | undefined>(undefined);\n const [tags, setTags] = useState<string[] | undefined>(undefined);\n const [userRef, setUserRef] = useState<string | undefined>(undefined);\n\n const tagParam = tagMatch?.params.tag;\n const userParam = userMatch?.params['*'];\n const entityParam = entityMatch?.params.entityRef;\n\n const entitySearchParam = searchParams.get('entity') ?? undefined;\n const tagsSearchParam = searchParams.get('tags');\n\n useEffect(() => {\n if (isQuestions || isArticles || isLinks) {\n setEntityRef(entitySearchParam);\n setTags(filterTags(tagsSearchParam));\n setUserRef(undefined);\n } else if (tagParam) {\n setTags([tagParam]);\n setEntityRef(undefined);\n setUserRef(undefined);\n } else if (userParam) {\n setUserRef(userParam);\n setTags(undefined);\n setEntityRef(undefined);\n } else if (entityParam) {\n setEntityRef(entityParam);\n setTags(undefined);\n setUserRef(undefined);\n } else {\n setTags(undefined);\n setEntityRef(undefined);\n setUserRef(undefined);\n }\n }, [\n entitySearchParam,\n tagsSearchParam,\n isQuestions,\n isArticles,\n isLinks,\n tagParam,\n userParam,\n entityParam,\n location.pathname,\n ]);\n\n let content = null;\n\n if (isHome) {\n content = <HomeRightContent />;\n } else if (isAsk) {\n content = <AskRightContent />;\n } else if (isPostPage) {\n const id =\n questionMatch?.params.id ||\n articleMatch?.params.id ||\n linkMatch?.params.id;\n content = <PostRightContent id={id} />;\n } else if (isQuestions) {\n content = <QuestionsRightContent tags={tags} entityRef={entityRef} />;\n } else if (isArticles) {\n content = <ArticlesRightContent tags={tags} entityRef={entityRef} />;\n } else if (isLinks) {\n content = <LinksRightContent tags={tags} entityRef={entityRef} />;\n } else if (isFavorite) {\n content = <FavoriteRightContent />;\n } else if (isUsers) {\n content = <UsersRightContent />;\n } else if (tagMatch) {\n content = <TagRightContent tags={tags} />;\n } else if (userMatch && userRef) {\n content = null;\n } else if (isTags) {\n content = <TagsRightContent />;\n } else if (isEntities) {\n content = <EntitiesRightContent />;\n } else if (entityMatch && entityRef) {\n content = <EntityRightContent entityRef={entityRef} />;\n } else if (isCollections) {\n content = <CollectionsRightContent />;\n }\n\n if (!content) {\n content = <DefaultRightContent />;\n }\n\n return (\n <Box className={classes.container}>\n <Box className={classes.content}>{content}</Box>\n <Box\n display=\"flex\"\n justifyContent={compact ? 'center' : 'flex-end'}\n style={{ marginTop: 'auto' }}\n >\n <Tooltip\n title={compact ? t('rightMenu.expand') : t('rightMenu.collapse')}\n placement=\"left\"\n >\n <IconButton\n onClick={onToggle}\n size=\"small\"\n className={compact ? '' : classes.toggleButton}\n style={{ marginTop: 8 }}\n >\n {compact ? (\n <ChevronLeftIcon />\n ) : (\n <MenuOpenIcon style={{ transform: 'scaleX(-1)' }} />\n )}\n </IconButton>\n </Tooltip>\n </Box>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAM,SAAA,GAAY,WAAW,CAAA,KAAA,MAAU;AAAA,EACrC,SAAA,EAAW;AAAA,IACT,KAAA,EAAO,CAAC,KAAA,KAAiC,KAAA,CAAM,UAAU,MAAA,GAAS,OAAA;AAAA,IAClE,OAAA,EAAS,CAAC,K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import { useEffect, useState } from 'react';\nimport { useRouteRef } from '@backstage/core-plugin-api';\nimport { AskRightContent } from './AskRightContent';\nimport {\n articleRouteRef,\n articlesRouteRef,\n askRouteRef,\n collectionsRouteRef,\n editQuestionRouteRef,\n entitiesRouteRef,\n entityRouteRef,\n favoriteQuestionsRouteRef,\n linkRouteRef,\n linksRouteRef,\n qetaRouteRef,\n qetaTranslationRef,\n questionRouteRef,\n questionsRouteRef,\n tagRouteRef,\n tagsRouteRef,\n userRouteRef,\n useQetaConfig,\n usersRouteRef,\n} from '@drodil/backstage-plugin-qeta-react';\nimport {\n Box,\n ButtonIcon,\n Flex,\n Tooltip,\n TooltipTrigger,\n useBreakpoint,\n} from '@backstage/ui';\nimport { matchPath, useLocation, useSearchParams } from 'react-router-dom';\nimport { filterTags } from '@drodil/backstage-plugin-qeta-common';\nimport { HomeRightContent } from './HomeRightContent';\nimport { QuestionsRightContent } from './QuestionsRightContent';\nimport { ArticlesRightContent } from './ArticlesRightContent';\nimport { LinksRightContent } from './LinksRightContent';\nimport { FavoriteRightContent } from './FavoriteRightContent';\nimport { UsersRightContent } from './UsersRightContent';\nimport { TagRightContent } from './TagRightContent';\nimport { TagsRightContent } from './TagsRightContent';\nimport { EntitiesRightContent } from './EntitiesRightContent';\nimport { EntityRightContent } from './EntityRightContent';\nimport { CollectionsRightContent } from './CollectionsRightContent';\nimport { RiMenuFoldLine, RiMenuUnfoldLine } from '@remixicon/react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { DefaultRightContent } from './DefaultRightContent';\nimport { PostRightContent } from './PostRightContent';\nimport styles from './RightContent.module.css';\n\nexport const RightContent = (props: {\n compact?: boolean;\n onToggle?: () => void;\n}) => {\n const { compact = false, onToggle } = props;\n const { disabled } = useQetaConfig();\n const { down } = useBreakpoint();\n const isSmall = down('md');\n const location = useLocation();\n const [searchParams] = useSearchParams();\n const { t } = useTranslationRef(qetaTranslationRef);\n\n // Route Refs\n const questionsPath = useRouteRef(questionsRouteRef);\n const articlesPath = useRouteRef(articlesRouteRef);\n const usersPath = useRouteRef(usersRouteRef);\n const tagsPath = useRouteRef(tagsRouteRef);\n const linksPath = useRouteRef(linksRouteRef);\n const collectionsPath = useRouteRef(collectionsRouteRef);\n const entitiesPath = useRouteRef(entitiesRouteRef);\n const favoritePath = useRouteRef(favoriteQuestionsRouteRef);\n const homePath = useRouteRef(qetaRouteRef);\n // qetaRouteRef gives the base path of the plugin, e.g. /qeta\n const rootPath = homePath();\n\n // Matchers\n const isQuestions = !!matchPath(\n { path: questionsPath(), end: true },\n location.pathname,\n );\n const isAsk = !!(\n matchPath(\n { path: `${rootPath}${askRouteRef.path}`, end: true },\n location.pathname,\n ) ||\n matchPath(\n { path: `${rootPath}${editQuestionRouteRef.path}`, end: true },\n location.pathname,\n )\n );\n\n const isArticles = !!matchPath(\n { path: articlesPath(), end: true },\n location.pathname,\n );\n const isUsers = !!matchPath(\n { path: usersPath(), end: true },\n location.pathname,\n );\n const userMatch = matchPath(\n { path: `${rootPath}${userRouteRef.path}` },\n location.pathname,\n );\n const isTags = !!matchPath(\n { path: tagsPath(), end: true },\n location.pathname,\n );\n const tagMatch = matchPath(\n { path: `${rootPath}${tagRouteRef.path}` },\n location.pathname,\n );\n const isCollections = !!matchPath(\n { path: collectionsPath(), end: true },\n location.pathname,\n );\n const isEntities = !!matchPath(\n { path: entitiesPath(), end: true },\n location.pathname,\n );\n const entityMatch = matchPath(\n { path: `${rootPath}${entityRouteRef.path}` },\n location.pathname,\n );\n const isLinks = !!matchPath(\n { path: linksPath(), end: true },\n location.pathname,\n );\n const isFavorite = !!matchPath(\n { path: favoritePath(), end: true },\n location.pathname,\n );\n const questionMatch = matchPath(\n { path: `${rootPath}${questionRouteRef.path}` },\n location.pathname,\n );\n const articleMatch = matchPath(\n { path: `${rootPath}${articleRouteRef.path}` },\n location.pathname,\n );\n const linkMatch = matchPath(\n { path: `${rootPath}${linkRouteRef.path}` },\n location.pathname,\n );\n const isPostPage = !!(questionMatch || articleMatch || linkMatch);\n const isHome = !!(\n matchPath({ path: homePath(), end: true }, location.pathname) ||\n location.pathname === homePath()\n );\n\n const [entityRef, setEntityRef] = useState<string | undefined>(undefined);\n const [tags, setTags] = useState<string[] | undefined>(undefined);\n const [userRef, setUserRef] = useState<string | undefined>(undefined);\n\n const tagParam = tagMatch?.params.tag;\n const userParam = userMatch?.params['*'];\n const entityParam = entityMatch?.params.entityRef;\n\n const entitySearchParam = searchParams.get('entity') ?? undefined;\n const tagsSearchParam = searchParams.get('tags');\n\n useEffect(() => {\n if (isQuestions || isArticles || isLinks) {\n setEntityRef(entitySearchParam);\n setTags(filterTags(tagsSearchParam));\n setUserRef(undefined);\n } else if (tagParam) {\n setTags([tagParam]);\n setEntityRef(undefined);\n setUserRef(undefined);\n } else if (userParam) {\n setUserRef(userParam);\n setTags(undefined);\n setEntityRef(undefined);\n } else if (entityParam) {\n setEntityRef(entityParam);\n setTags(undefined);\n setUserRef(undefined);\n } else {\n setTags(undefined);\n setEntityRef(undefined);\n setUserRef(undefined);\n }\n }, [\n entitySearchParam,\n tagsSearchParam,\n isQuestions,\n isArticles,\n isLinks,\n tagParam,\n userParam,\n entityParam,\n location.pathname,\n ]);\n\n let content = null;\n\n if (isHome) {\n content = <HomeRightContent />;\n } else if (isAsk) {\n content = <AskRightContent />;\n } else if (isPostPage) {\n const id =\n questionMatch?.params.id ||\n articleMatch?.params.id ||\n linkMatch?.params.id;\n content = <PostRightContent id={id} />;\n } else if (isQuestions && !disabled.questions) {\n content = <QuestionsRightContent tags={tags} entityRef={entityRef} />;\n } else if (isArticles && !disabled.articles) {\n content = <ArticlesRightContent tags={tags} entityRef={entityRef} />;\n } else if (isLinks && !disabled.links) {\n content = <LinksRightContent tags={tags} entityRef={entityRef} />;\n } else if (isFavorite) {\n content = <FavoriteRightContent />;\n } else if (isUsers) {\n content = <UsersRightContent />;\n } else if (tagMatch && !disabled.tags) {\n content = <TagRightContent tags={tags} />;\n } else if (userMatch && userRef) {\n content = null;\n } else if (isTags && !disabled.tags) {\n content = <TagsRightContent />;\n } else if (isEntities && !disabled.entities) {\n content = <EntitiesRightContent />;\n } else if (entityMatch && entityRef && !disabled.entities) {\n content = <EntityRightContent entityRef={entityRef} />;\n } else if (isCollections && !disabled.collections) {\n content = <CollectionsRightContent />;\n }\n\n if (!content) {\n content = <DefaultRightContent />;\n }\n\n return (\n <Box\n className={[\n styles.container,\n compact ? styles.compact : '',\n isSmall ? styles.full : '',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n <Box\n className={`${styles.content} ${compact ? styles.contentHidden : ''}`}\n >\n {content}\n </Box>\n <Flex justify={compact ? 'center' : 'end'} style={{ marginTop: 'auto' }}>\n <TooltipTrigger>\n <ButtonIcon\n aria-label={\n compact ? t('rightMenu.expand') : t('rightMenu.collapse')\n }\n size=\"small\"\n variant=\"tertiary\"\n className={compact ? '' : styles.toggleButton}\n onPress={onToggle}\n icon={\n compact ? (\n <RiMenuUnfoldLine size={16} />\n ) : (\n <RiMenuFoldLine size={16} />\n )\n }\n />\n <Tooltip placement=\"left\">\n {compact ? t('rightMenu.expand') : t('rightMenu.collapse')}\n </Tooltip>\n </TooltipTrigger>\n </Flex>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAmDO,MAAM,YAAA,GAAe,CAAC,KAAA,KAGvB;AACJ,EAAA,MAAM,EAAE,OAAA,GAAU,KAAA,EAAO,QAAA,EAAS,GAAI,KAAA;AACtC,EAAA,MAAM,EAAE,QAAA,EAAS,GAAI,aAAA,EAAc;AACnC,EAAA,MAAM,EAAE,IAAA,EAAK,GAAI,aAAA,EAAc;AAC/B,EAAA,MAAM,OAAA,GAAU,KAAK,IAAI,CAAA;AACzB,EAAA,MAAM,WAAW,WAAA,EAAY;AAC7B,EAAA,MAAM,CAAC,YAAY,CAAA,GAAI,eAAA,EAAgB;AACvC,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,kBAAkB,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AA,EACC,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,cACE,OAAA,GAAU,CAAA,CAAE,kBAAkB,CAAA,GAAI,EAAE,oBAAoB,CAAA;AAAA,cAE1D,IAAA,EAAK,OAAA;AAAA,cACL,OAAA,EAAQ,UAAA;AAAA,cACR,SAAA,EAAW,OAAA,GAAU,EAAA,GAAK,MAAA,CAAO,YAAA;AAAA,cACjC,OAAA,EAAS,QAAA;AAAA,cACT,IAAA,EACE,OAAA,mBACE,GAAA,CAAC,gBAAA,EAAA,EAAiB,IAAA,EAAM,IAAI,CAAA,mBAE5B,GAAA,CAAC,cAAA,EAAA,EAAe,IAAA,EAAM,EAAA,EAAI;AAAA;AAAA,WAGhC;AAAA,0BACA,GAAA,CAAC,OAAA,EAAA,EAAQ,SAAA,EAAU,MAAA,EAChB,QAAA,EAAA,OAAA,GAAU,EAAE,kBAAkB,CAAA,GAAI,CAAA,CAAE,oBAAoB,CAAA,EAC3D;AAAA,SAAA,EACF,CAAA,EACF;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = "@layer components {\n .RightContent_container__da4bfc1863 {\n width: 245px;\n padding: 0 0 0 var(--bui-space-2);\n transition: width 0.2s ease-in-out;\n display: flex;\n flex-direction: column;\n overflow-x: hidden;\n }\n\n .RightContent_compact__da4bfc1863 {\n width: 72px;\n padding: var(--bui-space-2);\n }\n\n .RightContent_full__da4bfc1863 {\n width: 100%;\n }\n\n .RightContent_toggleButton__da4bfc1863 {\n margin-bottom: var(--bui-space-2);\n margin-right: var(--bui-space-3);\n }\n\n .RightContent_content__da4bfc1863 {\n transition: opacity 0.2s ease-in-out;\n }\n\n .RightContent_contentHidden__da4bfc1863 {\n display: none;\n opacity: 0;\n }\n}\n";
|
|
4
|
+
var styles = {"container":"RightContent_container__da4bfc1863","compact":"RightContent_compact__da4bfc1863","full":"RightContent_full__da4bfc1863","toggleButton":"RightContent_toggleButton__da4bfc1863","content":"RightContent_content__da4bfc1863","contentHidden":"RightContent_contentHidden__da4bfc1863"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { styles as default };
|
|
8
|
+
//# sourceMappingURL=RightContent.module.css.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RightContent.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -2,22 +2,9 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { useQetaContext, qetaTranslationRef, useQetaApi, PostHighlightListContent } from '@drodil/backstage-plugin-qeta-react';
|
|
3
3
|
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
4
4
|
import { useState, useEffect } from 'react';
|
|
5
|
-
import
|
|
5
|
+
import styles from './SimilarQuestions.module.css.esm.js';
|
|
6
6
|
|
|
7
|
-
const useStyles = makeStyles((theme) => ({
|
|
8
|
-
similarQuestionsContainer: {
|
|
9
|
-
borderLeft: `3px solid ${theme.palette.warning.main}`,
|
|
10
|
-
backgroundColor: theme.palette.type === "dark" ? "rgba(255, 167, 38, 0.08)" : "rgba(255, 167, 38, 0.05)",
|
|
11
|
-
borderRadius: theme.shape.borderRadius,
|
|
12
|
-
padding: `${theme.spacing(1)}px 2px ${theme.spacing(1)}px`
|
|
13
|
-
},
|
|
14
|
-
similarQuestionsTitle: {
|
|
15
|
-
color: theme.palette.warning.main,
|
|
16
|
-
fontWeight: 600
|
|
17
|
-
}
|
|
18
|
-
}));
|
|
19
7
|
const SimilarQuestions = () => {
|
|
20
|
-
const classes = useStyles();
|
|
21
8
|
const { draftQuestion } = useQetaContext();
|
|
22
9
|
const { t } = useTranslationRef(qetaTranslationRef);
|
|
23
10
|
const [debouncedDraftQuestion, setDebouncedDraftQuestion] = useState(draftQuestion);
|
|
@@ -64,8 +51,8 @@ const SimilarQuestions = () => {
|
|
|
64
51
|
posts: displayQuestions,
|
|
65
52
|
loading,
|
|
66
53
|
disableLoading: true,
|
|
67
|
-
containerClassName:
|
|
68
|
-
titleClassName:
|
|
54
|
+
containerClassName: styles.similarQuestionsContainer,
|
|
55
|
+
titleClassName: styles.similarQuestionsTitle
|
|
69
56
|
}
|
|
70
57
|
);
|
|
71
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimilarQuestions.esm.js","sources":["../../../src/components/RightContent/SimilarQuestions.tsx"],"sourcesContent":["import {\n PostHighlightListContent,\n qetaTranslationRef,\n useQetaApi,\n useQetaContext,\n} from '@drodil/backstage-plugin-qeta-react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { Post } from '@drodil/backstage-plugin-qeta-common';\nimport { useState, useEffect } from 'react';\nimport
|
|
1
|
+
{"version":3,"file":"SimilarQuestions.esm.js","sources":["../../../src/components/RightContent/SimilarQuestions.tsx"],"sourcesContent":["import {\n PostHighlightListContent,\n qetaTranslationRef,\n useQetaApi,\n useQetaContext,\n} from '@drodil/backstage-plugin-qeta-react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { Post } from '@drodil/backstage-plugin-qeta-common';\nimport { useState, useEffect } from 'react';\nimport styles from './SimilarQuestions.module.css';\n\nexport const SimilarQuestions = () => {\n const { draftQuestion } = useQetaContext();\n const { t } = useTranslationRef(qetaTranslationRef);\n const [debouncedDraftQuestion, setDebouncedDraftQuestion] =\n useState(draftQuestion);\n\n useEffect(() => {\n const handler = setTimeout(() => {\n setDebouncedDraftQuestion(draftQuestion);\n }, 500);\n\n return () => {\n clearTimeout(handler);\n };\n }, [draftQuestion]);\n\n const { value: questions, loading } = useQetaApi(\n api => {\n if (\n !debouncedDraftQuestion ||\n debouncedDraftQuestion.title.length === 0\n ) {\n return Promise.resolve({ posts: [], total: 0 });\n }\n return api.suggest({\n title: debouncedDraftQuestion.title,\n content: debouncedDraftQuestion.content,\n tags: debouncedDraftQuestion.tags,\n entities: debouncedDraftQuestion.entities,\n });\n },\n [debouncedDraftQuestion],\n );\n\n const [displayQuestions, setDisplayQuestions] = useState<Post[]>([]);\n\n useEffect(() => {\n if (questions) {\n setDisplayQuestions(questions.posts);\n }\n }, [questions]);\n\n useEffect(() => {\n if (\n (!draftQuestion || draftQuestion.title.length === 0) &&\n displayQuestions.length > 0\n ) {\n setDisplayQuestions([]);\n }\n }, [draftQuestion, displayQuestions]);\n\n if (displayQuestions.length === 0) {\n return null;\n }\n\n return (\n <PostHighlightListContent\n title={t('rightMenu.similarQuestions')}\n posts={displayQuestions}\n loading={loading}\n disableLoading\n containerClassName={styles.similarQuestionsContainer}\n titleClassName={styles.similarQuestionsTitle}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;AAWO,MAAM,mBAAmB,MAAM;AACpC,EAAA,MAAM,EAAE,aAAA,EAAc,GAAI,cAAA,EAAe;AACzC,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,kBAAkB,CAAA;AAClD,EAAA,MAAM,CAAC,sBAAA,EAAwB,yBAAyB,CAAA,GACtD,SAAS,aAAa,CAAA;AAExB,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,OAAA,GAAU,WAAW,MAAM;AAC/B,MAAA,yBAAA,CAA0B,aAAa,CAAA;AAAA,IACzC,GAAG,GAAG,CAAA;AAEN,IAAA,OAAO,MAAM;AACX,MAAA,YAAA,CAAa,OAAO,CAAA;AAAA,IACtB,CAAA;AAAA,EACF,CAAA,EAAG,CAAC,aAAa,CAAC,CAAA;AAElB,EAAA,MAAM,EAAE,KAAA,EAAO,SAAA,EAAW,OAAA,EAAQ,GAAI,UAAA;AAAA,IACpC,CAAA,GAAA,KAAO;AACL,MAAA,IACE,CAAC,sBAAA,IACD,sBAAA,CAAuB,KAAA,CAAM,WAAW,CAAA,EACxC;AACA,QAAA,OAAO,O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@
|
|
|
1
|
+
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = "@layer components {\n .SimilarQuestions_similarQuestionsContainer__2e0b487bfe {\n border-left: 3px solid var(--bui-border-warning);\n background-color: var(--bui-bg-warning);\n border-radius: var(--bui-radius-2);\n padding: var(--bui-space-2) 2px var(--bui-space-2);\n }\n\n .SimilarQuestions_similarQuestionsTitle__2e0b487bfe {\n color: var(--bui-fg-warning);\n font-weight: 600;\n }\n}\n";
|
|
4
|
+
var styles = {"similarQuestionsContainer":"SimilarQuestions_similarQuestionsContainer__2e0b487bfe","similarQuestionsTitle":"SimilarQuestions_similarQuestionsTitle__2e0b487bfe"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { styles as default };
|
|
8
|
+
//# sourceMappingURL=SimilarQuestions.module.css.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SimilarQuestions.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { qetaTranslationRef, FollowedTagsList, PostHighlightList, PostHighlightListContainer } from '@drodil/backstage-plugin-qeta-react';
|
|
3
3
|
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
4
|
-
import
|
|
4
|
+
import { RiFireLine } from '@remixicon/react';
|
|
5
5
|
|
|
6
6
|
const TagRightContent = (props) => {
|
|
7
7
|
const { t } = useTranslationRef(qetaTranslationRef);
|
|
@@ -15,7 +15,7 @@ const TagRightContent = (props) => {
|
|
|
15
15
|
type: "hot",
|
|
16
16
|
title: t("highlights.hotQuestions.title"),
|
|
17
17
|
noQuestionsLabel: t("highlights.hotQuestions.noQuestionsLabel"),
|
|
18
|
-
icon: /* @__PURE__ */ jsx(
|
|
18
|
+
icon: /* @__PURE__ */ jsx(RiFireLine, { size: 16 }),
|
|
19
19
|
options: { tags },
|
|
20
20
|
postType: "question"
|
|
21
21
|
}
|