@drodil/backstage-plugin-qeta 3.52.2 → 3.52.4

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.
@@ -1,21 +1,17 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
- import { qetaTranslationRef, ContentHeader, AskQuestionButton, WriteArticleButton, CreateLinkButton, CollectionsGrid } from '@drodil/backstage-plugin-qeta-react';
2
+ import { qetaTranslationRef, ContentHeader, CreateCollectionButton, CollectionsGrid } from '@drodil/backstage-plugin-qeta-react';
3
3
  import PlaylistPlayOutlined from '@material-ui/icons/PlaylistPlayOutlined';
4
4
  import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
5
5
 
6
6
  const CollectionsPage = () => {
7
7
  const { t } = useTranslationRef(qetaTranslationRef);
8
8
  return /* @__PURE__ */ jsxs(Fragment, { children: [
9
- /* @__PURE__ */ jsxs(
9
+ /* @__PURE__ */ jsx(
10
10
  ContentHeader,
11
11
  {
12
12
  title: t("collectionsPage.title"),
13
13
  titleIcon: /* @__PURE__ */ jsx(PlaylistPlayOutlined, { fontSize: "large" }),
14
- children: [
15
- /* @__PURE__ */ jsx(AskQuestionButton, {}),
16
- /* @__PURE__ */ jsx(WriteArticleButton, {}),
17
- /* @__PURE__ */ jsx(CreateLinkButton, {})
18
- ]
14
+ children: /* @__PURE__ */ jsx(CreateCollectionButton, {})
19
15
  }
20
16
  ),
21
17
  /* @__PURE__ */ jsx(CollectionsGrid, {})
@@ -1 +1 @@
1
- {"version":3,"file":"CollectionsPage.esm.js","sources":["../../../src/components/CollectionsPage/CollectionsPage.tsx"],"sourcesContent":["import {\n AskQuestionButton,\n ContentHeader,\n CreateLinkButton,\n CollectionsGrid,\n qetaTranslationRef,\n WriteArticleButton,\n} from '@drodil/backstage-plugin-qeta-react';\nimport PlaylistPlayOutlined from '@material-ui/icons/PlaylistPlayOutlined';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\nexport const CollectionsPage = () => {\n const { t } = useTranslationRef(qetaTranslationRef);\n\n return (\n <>\n <ContentHeader\n title={t('collectionsPage.title')}\n titleIcon={<PlaylistPlayOutlined fontSize=\"large\" />}\n >\n <AskQuestionButton />\n <WriteArticleButton />\n <CreateLinkButton />\n </ContentHeader>\n <CollectionsGrid />\n </>\n );\n};\n"],"names":[],"mappings":";;;;;AAWO,MAAM,kBAAkB,MAAM;AACnC,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,kBAAkB,CAAA;AAElD,EAAA,uBAEI,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAA,IAAA;AAAA,MAAC,aAAA;AAAA,MAAA;AAAA,QACC,KAAA,EAAO,EAAE,uBAAuB,CAAA;AAAA,QAChC,SAAW,kBAAA,GAAA,CAAC,oBAAqB,EAAA,EAAA,QAAA,EAAS,OAAQ,EAAA,CAAA;AAAA,QAElD,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,iBAAkB,EAAA,EAAA,CAAA;AAAA,8BAClB,kBAAmB,EAAA,EAAA,CAAA;AAAA,8BACnB,gBAAiB,EAAA,EAAA;AAAA;AAAA;AAAA,KACpB;AAAA,wBACC,eAAgB,EAAA,EAAA;AAAA,GACnB,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"CollectionsPage.esm.js","sources":["../../../src/components/CollectionsPage/CollectionsPage.tsx"],"sourcesContent":["import {\n CollectionsGrid,\n ContentHeader,\n CreateCollectionButton,\n qetaTranslationRef,\n} from '@drodil/backstage-plugin-qeta-react';\nimport PlaylistPlayOutlined from '@material-ui/icons/PlaylistPlayOutlined';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\nexport const CollectionsPage = () => {\n const { t } = useTranslationRef(qetaTranslationRef);\n\n return (\n <>\n <ContentHeader\n title={t('collectionsPage.title')}\n titleIcon={<PlaylistPlayOutlined fontSize=\"large\" />}\n >\n <CreateCollectionButton />\n </ContentHeader>\n <CollectionsGrid />\n </>\n );\n};\n"],"names":[],"mappings":";;;;;AASO,MAAM,kBAAkB,MAAM;AACnC,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,kBAAkB,CAAA;AAElD,EAAA,uBAEI,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,aAAA;AAAA,MAAA;AAAA,QACC,KAAA,EAAO,EAAE,uBAAuB,CAAA;AAAA,QAChC,SAAW,kBAAA,GAAA,CAAC,oBAAqB,EAAA,EAAA,QAAA,EAAS,OAAQ,EAAA,CAAA;AAAA,QAElD,8BAAC,sBAAuB,EAAA,EAAA;AAAA;AAAA,KAC1B;AAAA,wBACC,eAAgB,EAAA,EAAA;AAAA,GACnB,EAAA,CAAA;AAEJ;;;;"}
@@ -12,7 +12,10 @@ const PostRightContent = (props) => {
12
12
  const { id: paramId } = useParams();
13
13
  const id = props?.id || paramId;
14
14
  const { t } = useTranslationRef(qetaTranslationRef);
15
- const { value: post } = useQetaApi((api) => api.getPost(id), [id]);
15
+ const { value: post } = useQetaApi(
16
+ (api) => api.getPost(id, { anonymous: true }),
17
+ [id]
18
+ );
16
19
  let title;
17
20
  if (post?.type === "article") {
18
21
  title = t("highlights.hotArticles.title");
@@ -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 useQetaApi,\n} from '@drodil/backstage-plugin-qeta-react';\nimport { DefaultRightContent } from './DefaultRightContent';\nimport { ContentHealthCard } from '../ContentHealthCard';\nimport { SimilarPosts } from './SimilarPosts';\nimport { Box } from '@material-ui/core';\nimport Whatshot from '@material-ui/icons/Whatshot';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { qetaTranslationRef } from '@drodil/backstage-plugin-qeta-react';\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(api => api.getPost(id), [id]);\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={2}>\n <ContentHealthCard post={post} />\n </Box>\n <SimilarPosts post={post} />\n <PostHighlightList\n type=\"hot\"\n title={title}\n noQuestionsLabel={t('highlights.hotQuestions.noQuestionsLabel')}\n icon={<Whatshot fontSize=\"small\" />}\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":";;;;;;;;;;AAiBa,MAAA,gBAAA,GAAmB,CAAC,KAA4B,KAAA;AAC3D,EAAA,MAAM,EAAE,EAAA,EAAI,OAAQ,EAAA,GAAI,SAAU,EAAA;AAClC,EAAM,MAAA,EAAA,GAAK,OAAO,EAAM,IAAA,OAAA;AACxB,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,kBAAkB,CAAA;AAElD,EAAA,MAAM,EAAE,KAAA,EAAO,IAAK,EAAA,GAAI,UAAW,CAAA,CAAA,GAAA,KAAO,GAAI,CAAA,OAAA,CAAQ,EAAE,CAAA,EAAG,CAAC,EAAE,CAAC,CAAA;AAE/D,EAAI,IAAA,KAAA;AAEJ,EAAI,IAAA,IAAA,EAAM,SAAS,SAAW,EAAA;AAC5B,IAAA,KAAA,GAAQ,EAAE,8BAA8B,CAAA;AAAA,GAC1C,MAAA,IAAW,IAAM,EAAA,IAAA,KAAS,MAAQ,EAAA;AAChC,IAAA,KAAA,GAAQ,EAAE,2BAA2B,CAAA;AAAA,GAChC,MAAA;AACL,IAAA,KAAA,GAAQ,EAAE,+BAA+B,CAAA;AAAA;AAG3C,EAAA,uBAEK,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,IAAA,IAAA,oBAEG,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,OAAI,EAAI,EAAA,CAAA,EACP,QAAC,kBAAA,GAAA,CAAA,iBAAA,EAAA,EAAkB,MAAY,CACjC,EAAA,CAAA;AAAA,sBACA,GAAA,CAAC,gBAAa,IAAY,EAAA,CAAA;AAAA,sBAC1B,GAAA;AAAA,QAAC,iBAAA;AAAA,QAAA;AAAA,UACC,IAAK,EAAA,KAAA;AAAA,UACL,KAAA;AAAA,UACA,gBAAA,EAAkB,EAAE,0CAA0C,CAAA;AAAA,UAC9D,IAAM,kBAAA,GAAA,CAAC,QAAS,EAAA,EAAA,QAAA,EAAS,OAAQ,EAAA,CAAA;AAAA,UACjC,UAAU,IAAK,CAAA,IAAA;AAAA,UACf,OAAS,EAAA;AAAA,YACP,MAAM,IAAK,CAAA,IAAA;AAAA,YACX,UAAU,IAAK,CAAA;AAAA;AACjB;AAAA,OACF;AAAA,0BACC,gBAAiB,EAAA,EAAA,CAAA;AAAA,0BACjB,iBAAkB,EAAA,EAAA,CAAA;AAAA,0BAClB,oBAAqB,EAAA,EAAA,CAAA;AAAA,0BACrB,uBAAwB,EAAA,EAAA;AAAA,KAC3B,EAAA,CAAA;AAAA,IAED,CAAC,IAAQ,oBAAA,GAAA,CAAC,mBAAoB,EAAA,EAAA;AAAA,GACjC,EAAA,CAAA;AAEJ;;;;"}
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 '@material-ui/core';\nimport Whatshot from '@material-ui/icons/Whatshot';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\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={2}>\n <ContentHealthCard post={post} />\n </Box>\n <SimilarPosts post={post} />\n <PostHighlightList\n type=\"hot\"\n title={title}\n noQuestionsLabel={t('highlights.hotQuestions.noQuestionsLabel')}\n icon={<Whatshot fontSize=\"small\" />}\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":";;;;;;;;;;AAiBa,MAAA,gBAAA,GAAmB,CAAC,KAA4B,KAAA;AAC3D,EAAA,MAAM,EAAE,EAAA,EAAI,OAAQ,EAAA,GAAI,SAAU,EAAA;AAClC,EAAM,MAAA,EAAA,GAAK,OAAO,EAAM,IAAA,OAAA;AACxB,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,kBAAkB,CAAA;AAElD,EAAM,MAAA,EAAE,KAAO,EAAA,IAAA,EAAS,GAAA,UAAA;AAAA,IACtB,SAAO,GAAI,CAAA,OAAA,CAAQ,IAA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,CAAC,IAAQ,oBAAA,GAAA,CAAC,mBAAoB,EAAA,EAAA;AAAA,GACjC,EAAA,CAAA;AAEJ;;;;"}
@@ -6,7 +6,7 @@ var keywords = [
6
6
  "frontend",
7
7
  "backstage.io"
8
8
  ];
9
- var version = "3.52.2";
9
+ var version = "3.52.4";
10
10
  var main = "src/index.ts";
11
11
  var types = "src/index.ts";
12
12
  var prepublishOnly = "yarn tsc && yarn build";
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "frontend",
8
8
  "backstage.io"
9
9
  ],
10
- "version": "3.52.2",
10
+ "version": "3.52.4",
11
11
  "main": "./dist/index.esm.js",
12
12
  "types": "./dist/index.d.ts",
13
13
  "prepublishOnly": "yarn tsc && yarn build",
@@ -85,8 +85,8 @@
85
85
  "@backstage/plugin-search-react": "^1.10.1",
86
86
  "@backstage/plugin-signals-react": "^0.0.18",
87
87
  "@backstage/plugin-techdocs-react": "^1.3.6",
88
- "@drodil/backstage-plugin-qeta-common": "^3.52.2",
89
- "@drodil/backstage-plugin-qeta-react": "^3.52.2",
88
+ "@drodil/backstage-plugin-qeta-common": "^3.52.4",
89
+ "@drodil/backstage-plugin-qeta-react": "^3.52.4",
90
90
  "@material-ui/core": "^4.12.2",
91
91
  "@material-ui/icons": "^4.11.3",
92
92
  "@material-ui/lab": "4.0.0-alpha.61",