@drodil/backstage-plugin-qeta 2.8.1 → 2.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Buttons/TagFollowButton.esm.js +3 -1
- package/dist/components/Buttons/TagFollowButton.esm.js.map +1 -1
- package/dist/components/CommentSection/CommentSection.esm.js +59 -49
- package/dist/components/CommentSection/CommentSection.esm.js.map +1 -1
- package/dist/components/HomePage/FollowedTagsList.esm.js +1 -1
- package/dist/components/HomePage/FollowedTagsList.esm.js.map +1 -1
- package/dist/components/QuestionPage/QuestionCard.esm.js +2 -2
- package/dist/components/QuestionPage/QuestionCard.esm.js.map +1 -1
- package/dist/index.d.ts +8 -8
- package/package.json +19 -19
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useTranslation, useTagsFollow } from '../../utils/hooks.esm.js';
|
|
2
|
+
import { useStyles, useTranslation, useTagsFollow } from '../../utils/hooks.esm.js';
|
|
3
3
|
import { Tooltip, Button } from '@material-ui/core';
|
|
4
4
|
|
|
5
5
|
const TagFollowButton = (props) => {
|
|
6
6
|
const { tag } = props;
|
|
7
|
+
const styles = useStyles();
|
|
7
8
|
const { t } = useTranslation();
|
|
8
9
|
const tags = useTagsFollow();
|
|
9
10
|
return /* @__PURE__ */ React.createElement(Tooltip, { title: t("tagButton.tooltip") }, /* @__PURE__ */ React.createElement(
|
|
10
11
|
Button,
|
|
11
12
|
{
|
|
13
|
+
className: `${styles.marginRight} qetaFollowTagBtn`,
|
|
12
14
|
color: tags.isFollowingTag(tag) ? "secondary" : "primary",
|
|
13
15
|
onClick: () => {
|
|
14
16
|
if (tags.isFollowingTag(tag)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagFollowButton.esm.js","sources":["../../../src/components/Buttons/TagFollowButton.tsx"],"sourcesContent":["import React from 'react';\nimport { useTagsFollow, useTranslation } from '../../utils/hooks';\nimport { Button, Tooltip } from '@material-ui/core';\n\nexport const TagFollowButton = (props: { tag: string }) => {\n const { tag } = props;\n const { t } = useTranslation();\n const tags = useTagsFollow();\n return (\n <Tooltip title={t('tagButton.tooltip')}>\n <Button\n color={tags.isFollowingTag(tag) ? 'secondary' : 'primary'}\n onClick={() => {\n if (tags.isFollowingTag(tag)) {\n tags.unfollowTag(tag);\n } else {\n tags.followTag(tag);\n }\n }}\n >\n {tags.isFollowingTag(tag)\n ? t('tagButton.unfollow')\n : t('tagButton.follow')}\n </Button>\n </Tooltip>\n );\n};\n"],"names":[],"mappings":";;;;AAIa,MAAA,eAAA,GAAkB,CAAC,KAA2B,KAAA;AACzD,EAAM,MAAA,EAAE,KAAQ,GAAA,KAAA,CAAA;AAChB,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA,CAAA;AAC7B,EAAA,MAAM,OAAO,aAAc,EAAA,CAAA;AAC3B,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EAAQ,KAAO,EAAA,CAAA,CAAE,mBAAmB,CACnC,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA,IAAA,CAAK,cAAe,CAAA,GAAG,IAAI,WAAc,GAAA,SAAA;AAAA,MAChD,SAAS,MAAM;AACb,QAAI,IAAA,IAAA,CAAK,cAAe,CAAA,GAAG,CAAG,EAAA;AAC5B,UAAA,IAAA,CAAK,YAAY,GAAG,CAAA,CAAA;AAAA,SACf,MAAA;AACL,UAAA,IAAA,CAAK,UAAU,GAAG,CAAA,CAAA;AAAA,SACpB;AAAA,OACF;AAAA,KAAA;AAAA,IAEC,IAAA,CAAK,eAAe,GAAG,CAAA,GACpB,EAAE,oBAAoB,CAAA,GACtB,EAAE,kBAAkB,CAAA;AAAA,GAE5B,CAAA,CAAA;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"TagFollowButton.esm.js","sources":["../../../src/components/Buttons/TagFollowButton.tsx"],"sourcesContent":["import React from 'react';\nimport { useStyles, useTagsFollow, useTranslation } from '../../utils/hooks';\nimport { Button, Tooltip } from '@material-ui/core';\n\nexport const TagFollowButton = (props: { tag: string }) => {\n const { tag } = props;\n const styles = useStyles();\n const { t } = useTranslation();\n const tags = useTagsFollow();\n return (\n <Tooltip title={t('tagButton.tooltip')}>\n <Button\n className={`${styles.marginRight} qetaFollowTagBtn`}\n color={tags.isFollowingTag(tag) ? 'secondary' : 'primary'}\n onClick={() => {\n if (tags.isFollowingTag(tag)) {\n tags.unfollowTag(tag);\n } else {\n tags.followTag(tag);\n }\n }}\n >\n {tags.isFollowingTag(tag)\n ? t('tagButton.unfollow')\n : t('tagButton.follow')}\n </Button>\n </Tooltip>\n );\n};\n"],"names":[],"mappings":";;;;AAIa,MAAA,eAAA,GAAkB,CAAC,KAA2B,KAAA;AACzD,EAAM,MAAA,EAAE,KAAQ,GAAA,KAAA,CAAA;AAChB,EAAA,MAAM,SAAS,SAAU,EAAA,CAAA;AACzB,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA,CAAA;AAC7B,EAAA,MAAM,OAAO,aAAc,EAAA,CAAA;AAC3B,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EAAQ,KAAO,EAAA,CAAA,CAAE,mBAAmB,CACnC,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,CAAG,EAAA,MAAA,CAAO,WAAW,CAAA,iBAAA,CAAA;AAAA,MAChC,KAAO,EAAA,IAAA,CAAK,cAAe,CAAA,GAAG,IAAI,WAAc,GAAA,SAAA;AAAA,MAChD,SAAS,MAAM;AACb,QAAI,IAAA,IAAA,CAAK,cAAe,CAAA,GAAG,CAAG,EAAA;AAC5B,UAAA,IAAA,CAAK,YAAY,GAAG,CAAA,CAAA;AAAA,SACf,MAAA;AACL,UAAA,IAAA,CAAK,UAAU,GAAG,CAAA,CAAA;AAAA,SACpB;AAAA,OACF;AAAA,KAAA;AAAA,IAEC,IAAA,CAAK,eAAe,GAAG,CAAA,GACpB,EAAE,oBAAoB,CAAA,GACtB,EAAE,kBAAkB,CAAA;AAAA,GAE5B,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { Box, Grid, TextField, Button } from '@material-ui/core';
|
|
3
3
|
import { Link } from '@backstage/core-components';
|
|
4
|
+
import { qetaCreateCommentPermission } from '@drodil/backstage-plugin-qeta-common';
|
|
4
5
|
import { useForm, Controller } from 'react-hook-form';
|
|
5
6
|
import { useAnalytics, useApi } from '@backstage/core-plugin-api';
|
|
6
7
|
import { CommentList } from './CommentList.esm.js';
|
|
7
8
|
import { qetaApiRef } from '../../api/QetaClient.esm.js';
|
|
8
9
|
import { useTranslation } from '../../utils/hooks.esm.js';
|
|
9
10
|
import { confirmNavigationIfEdited } from '../../utils/utils.esm.js';
|
|
11
|
+
import { RequirePermission } from '@backstage/plugin-permission-react';
|
|
10
12
|
|
|
11
13
|
const CommentSection = (props) => {
|
|
12
14
|
const { answer, question, onCommentPost, onCommentDelete } = props;
|
|
@@ -54,61 +56,69 @@ const CommentSection = (props) => {
|
|
|
54
56
|
answer,
|
|
55
57
|
onCommentDelete
|
|
56
58
|
}
|
|
57
|
-
),
|
|
58
|
-
|
|
59
|
+
), /* @__PURE__ */ React.createElement(
|
|
60
|
+
RequirePermission,
|
|
59
61
|
{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
className: "qetaAddCommentBtn",
|
|
63
|
-
onClick: () => setFormVisible(true)
|
|
62
|
+
permission: qetaCreateCommentPermission,
|
|
63
|
+
errorPage: /* @__PURE__ */ React.createElement(React.Fragment, null)
|
|
64
64
|
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
!formVisible && /* @__PURE__ */ React.createElement(
|
|
66
|
+
Link,
|
|
67
|
+
{
|
|
68
|
+
underline: "none",
|
|
69
|
+
to: "#",
|
|
70
|
+
className: "qetaAddCommentBtn",
|
|
71
|
+
onClick: () => setFormVisible(true)
|
|
72
72
|
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
t("commentSection.addComment")
|
|
74
|
+
),
|
|
75
|
+
formVisible && /* @__PURE__ */ React.createElement(
|
|
76
|
+
"form",
|
|
77
77
|
{
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
required: true
|
|
78
|
+
onSubmit: handleSubmit(postComment),
|
|
79
|
+
onChange: () => {
|
|
80
|
+
setEdited(true);
|
|
82
81
|
},
|
|
83
|
-
|
|
84
|
-
TextField,
|
|
85
|
-
{
|
|
86
|
-
id: "comment",
|
|
87
|
-
multiline: true,
|
|
88
|
-
minRows: 2,
|
|
89
|
-
fullWidth: true,
|
|
90
|
-
className: "qetaCommentInput",
|
|
91
|
-
value,
|
|
92
|
-
placeholder: t("commentSection.input.placeholder"),
|
|
93
|
-
onChange,
|
|
94
|
-
variant: "outlined",
|
|
95
|
-
error: "content" in errors
|
|
96
|
-
}
|
|
97
|
-
),
|
|
98
|
-
name: "content"
|
|
99
|
-
}
|
|
100
|
-
)), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 1 }, /* @__PURE__ */ React.createElement(
|
|
101
|
-
Button,
|
|
102
|
-
{
|
|
103
|
-
variant: "contained",
|
|
104
|
-
size: "small",
|
|
105
|
-
className: "qetaCommentBtn",
|
|
106
|
-
type: "submit",
|
|
107
|
-
color: "primary",
|
|
108
|
-
disabled: posting
|
|
82
|
+
className: "qetaCommentForm"
|
|
109
83
|
},
|
|
110
|
-
|
|
111
|
-
|
|
84
|
+
/* @__PURE__ */ React.createElement(Grid, { container: true }, /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 11 }, /* @__PURE__ */ React.createElement(
|
|
85
|
+
Controller,
|
|
86
|
+
{
|
|
87
|
+
control,
|
|
88
|
+
defaultValue: "",
|
|
89
|
+
rules: {
|
|
90
|
+
required: true
|
|
91
|
+
},
|
|
92
|
+
render: ({ field: { onChange, value } }) => /* @__PURE__ */ React.createElement(
|
|
93
|
+
TextField,
|
|
94
|
+
{
|
|
95
|
+
id: "comment",
|
|
96
|
+
multiline: true,
|
|
97
|
+
minRows: 2,
|
|
98
|
+
fullWidth: true,
|
|
99
|
+
className: "qetaCommentInput",
|
|
100
|
+
value,
|
|
101
|
+
placeholder: t("commentSection.input.placeholder"),
|
|
102
|
+
onChange,
|
|
103
|
+
variant: "outlined",
|
|
104
|
+
error: "content" in errors
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
name: "content"
|
|
108
|
+
}
|
|
109
|
+
)), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 1 }, /* @__PURE__ */ React.createElement(
|
|
110
|
+
Button,
|
|
111
|
+
{
|
|
112
|
+
variant: "contained",
|
|
113
|
+
size: "small",
|
|
114
|
+
className: "qetaCommentBtn",
|
|
115
|
+
type: "submit",
|
|
116
|
+
color: "primary",
|
|
117
|
+
disabled: posting
|
|
118
|
+
},
|
|
119
|
+
t("commentSection.post")
|
|
120
|
+
)))
|
|
121
|
+
)
|
|
112
122
|
));
|
|
113
123
|
};
|
|
114
124
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommentSection.esm.js","sources":["../../../src/components/CommentSection/CommentSection.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { Box, Button, Grid, TextField } from '@material-ui/core';\nimport { Link } from '@backstage/core-components';\nimport {\n AnswerResponse,\n QuestionResponse,\n} from '@drodil/backstage-plugin-qeta-common';\nimport { Controller, useForm } from 'react-hook-form';\nimport { useAnalytics, useApi } from '@backstage/core-plugin-api';\nimport { CommentList } from './CommentList';\nimport { qetaApiRef } from '../../api';\nimport { useTranslation } from '../../utils/hooks';\nimport { confirmNavigationIfEdited } from '../../utils/utils';\n\nexport const CommentSection = (props: {\n onCommentPost: (question: QuestionResponse, answer?: AnswerResponse) => void;\n onCommentDelete: (\n question: QuestionResponse,\n answer?: AnswerResponse,\n ) => void;\n question: QuestionResponse;\n answer?: AnswerResponse;\n}) => {\n const { answer, question, onCommentPost, onCommentDelete } = props;\n const analytics = useAnalytics();\n const qetaApi = useApi(qetaApiRef);\n const [posting, setPosting] = React.useState(false);\n const [formVisible, setFormVisible] = useState(false);\n const [edited, setEdited] = React.useState(false);\n const { t } = useTranslation();\n const {\n handleSubmit,\n control,\n formState: { errors },\n reset,\n } = useForm<{ content: string }>({});\n\n const postComment = (data: { content: string }) => {\n setPosting(true);\n if (answer) {\n qetaApi.commentAnswer(question.id, answer.id, data.content).then(a => {\n setFormVisible(false);\n analytics.captureEvent('comment', 'answer');\n reset();\n setPosting(false);\n setEdited(false);\n onCommentPost(question, a);\n });\n return;\n }\n\n qetaApi.commentQuestion(question.id, data.content).then(q => {\n setFormVisible(false);\n analytics.captureEvent('comment', 'question');\n reset();\n setPosting(false);\n setEdited(false);\n onCommentPost(q);\n });\n };\n\n useEffect(() => {\n return confirmNavigationIfEdited(edited);\n }, [edited]);\n\n return (\n <Box marginLeft={9} className=\"qetaCommentSection\">\n <CommentList\n question={question}\n answer={answer}\n onCommentDelete={onCommentDelete}\n />\n {!formVisible && (\n
|
|
1
|
+
{"version":3,"file":"CommentSection.esm.js","sources":["../../../src/components/CommentSection/CommentSection.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { Box, Button, Grid, TextField } from '@material-ui/core';\nimport { Link } from '@backstage/core-components';\nimport {\n AnswerResponse,\n qetaCreateCommentPermission,\n QuestionResponse,\n} from '@drodil/backstage-plugin-qeta-common';\nimport { Controller, useForm } from 'react-hook-form';\nimport { useAnalytics, useApi } from '@backstage/core-plugin-api';\nimport { CommentList } from './CommentList';\nimport { qetaApiRef } from '../../api';\nimport { useTranslation } from '../../utils/hooks';\nimport { confirmNavigationIfEdited } from '../../utils/utils';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\n\nexport const CommentSection = (props: {\n onCommentPost: (question: QuestionResponse, answer?: AnswerResponse) => void;\n onCommentDelete: (\n question: QuestionResponse,\n answer?: AnswerResponse,\n ) => void;\n question: QuestionResponse;\n answer?: AnswerResponse;\n}) => {\n const { answer, question, onCommentPost, onCommentDelete } = props;\n const analytics = useAnalytics();\n const qetaApi = useApi(qetaApiRef);\n const [posting, setPosting] = React.useState(false);\n const [formVisible, setFormVisible] = useState(false);\n const [edited, setEdited] = React.useState(false);\n const { t } = useTranslation();\n const {\n handleSubmit,\n control,\n formState: { errors },\n reset,\n } = useForm<{ content: string }>({});\n\n const postComment = (data: { content: string }) => {\n setPosting(true);\n if (answer) {\n qetaApi.commentAnswer(question.id, answer.id, data.content).then(a => {\n setFormVisible(false);\n analytics.captureEvent('comment', 'answer');\n reset();\n setPosting(false);\n setEdited(false);\n onCommentPost(question, a);\n });\n return;\n }\n\n qetaApi.commentQuestion(question.id, data.content).then(q => {\n setFormVisible(false);\n analytics.captureEvent('comment', 'question');\n reset();\n setPosting(false);\n setEdited(false);\n onCommentPost(q);\n });\n };\n\n useEffect(() => {\n return confirmNavigationIfEdited(edited);\n }, [edited]);\n\n return (\n <Box marginLeft={9} className=\"qetaCommentSection\">\n <CommentList\n question={question}\n answer={answer}\n onCommentDelete={onCommentDelete}\n />\n <RequirePermission\n permission={qetaCreateCommentPermission}\n errorPage={<></>}\n >\n {!formVisible && (\n <Link\n underline=\"none\"\n to=\"#\"\n className=\"qetaAddCommentBtn\"\n onClick={() => setFormVisible(true)}\n >\n {t('commentSection.addComment')}\n </Link>\n )}\n {formVisible && (\n <form\n onSubmit={handleSubmit(postComment)}\n onChange={() => {\n setEdited(true);\n }}\n className=\"qetaCommentForm\"\n >\n <Grid container>\n <Grid item xs={11}>\n <Controller\n control={control}\n defaultValue=\"\"\n rules={{\n required: true,\n }}\n render={({ field: { onChange, value } }) => (\n <TextField\n id=\"comment\"\n multiline\n minRows={2}\n fullWidth\n className=\"qetaCommentInput\"\n value={value}\n placeholder={t('commentSection.input.placeholder')}\n onChange={onChange}\n variant=\"outlined\"\n error={'content' in errors}\n />\n )}\n name=\"content\"\n />\n </Grid>\n <Grid item xs={1}>\n <Button\n variant=\"contained\"\n size=\"small\"\n className=\"qetaCommentBtn\"\n type=\"submit\"\n color=\"primary\"\n disabled={posting}\n >\n {t('commentSection.post')}\n </Button>\n </Grid>\n </Grid>\n </form>\n )}\n </RequirePermission>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAgBa,MAAA,cAAA,GAAiB,CAAC,KAQzB,KAAA;AACJ,EAAA,MAAM,EAAE,MAAA,EAAQ,QAAU,EAAA,aAAA,EAAe,iBAAoB,GAAA,KAAA,CAAA;AAC7D,EAAA,MAAM,YAAY,YAAa,EAAA,CAAA;AAC/B,EAAM,MAAA,OAAA,GAAU,OAAO,UAAU,CAAA,CAAA;AACjC,EAAA,MAAM,CAAC,OAAS,EAAA,UAAU,CAAI,GAAA,KAAA,CAAM,SAAS,KAAK,CAAA,CAAA;AAClD,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAI,SAAS,KAAK,CAAA,CAAA;AACpD,EAAA,MAAM,CAAC,MAAQ,EAAA,SAAS,CAAI,GAAA,KAAA,CAAM,SAAS,KAAK,CAAA,CAAA;AAChD,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA,CAAA;AAC7B,EAAM,MAAA;AAAA,IACJ,YAAA;AAAA,IACA,OAAA;AAAA,IACA,SAAA,EAAW,EAAE,MAAO,EAAA;AAAA,IACpB,KAAA;AAAA,GACF,GAAI,OAA6B,CAAA,EAAE,CAAA,CAAA;AAEnC,EAAM,MAAA,WAAA,GAAc,CAAC,IAA8B,KAAA;AACjD,IAAA,UAAA,CAAW,IAAI,CAAA,CAAA;AACf,IAAA,IAAI,MAAQ,EAAA;AACV,MAAQ,OAAA,CAAA,aAAA,CAA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A;AAAA,cACA,WAAA,EAAa,EAAE,kCAAkC,CAAA;AAAA,cACjD,QAAA;AAAA,cACA,OAAQ,EAAA,UAAA;AAAA,cACR,OAAO,SAAa,IAAA,MAAA;AAAA,aAAA;AAAA,WACtB;AAAA,UAEF,IAAK,EAAA,SAAA;AAAA,SAAA;AAAA,OAET,CACA,kBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,IAAI,EAAA,IAAA,EAAC,IAAI,CACb,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACC,OAAQ,EAAA,WAAA;AAAA,UACR,IAAK,EAAA,OAAA;AAAA,UACL,SAAU,EAAA,gBAAA;AAAA,UACV,IAAK,EAAA,QAAA;AAAA,UACL,KAAM,EAAA,SAAA;AAAA,UACN,QAAU,EAAA,OAAA;AAAA,SAAA;AAAA,QAET,EAAE,qBAAqB,CAAA;AAAA,OAE5B,CACF,CAAA;AAAA,KACF;AAAA,GAGN,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -36,7 +36,7 @@ const FollowedTagsList = () => {
|
|
|
36
36
|
)
|
|
37
37
|
},
|
|
38
38
|
/* @__PURE__ */ React.createElement(Divider, null),
|
|
39
|
-
/* @__PURE__ */ React.createElement(ListItem,
|
|
39
|
+
/* @__PURE__ */ React.createElement(ListItem, { style: { display: "block" } }, tags.tags.map((tag) => /* @__PURE__ */ React.createElement(
|
|
40
40
|
Chip,
|
|
41
41
|
{
|
|
42
42
|
key: tag,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowedTagsList.esm.js","sources":["../../../src/components/HomePage/FollowedTagsList.tsx"],"sourcesContent":["import {\n Box,\n Chip,\n Divider,\n List,\n ListItem,\n ListSubheader,\n} from '@material-ui/core';\nimport React from 'react';\nimport { useStyles, useTagsFollow, useTranslation } from '../../utils/hooks';\nimport { useRouteRef } from '@backstage/core-plugin-api';\nimport { tagRouteRef } from '@drodil/backstage-plugin-qeta-react';\n\nexport const FollowedTagsList = () => {\n const classes = useStyles();\n const tags = useTagsFollow();\n const tagRoute = useRouteRef(tagRouteRef);\n const { t } = useTranslation();\n\n if (tags.tags.length === 0) {\n return null;\n }\n\n return (\n <Box\n className={`qetaQuestionHighlightList ${classes.questionHighlightListContainer}`}\n display={{ md: 'none', lg: 'block' }}\n >\n <List\n component=\"nav\"\n aria-labelledby=\"nested-list-subheader\"\n className={`qetaQuestionHighlightListList ${classes.questionHighlightList}`}\n subheader={\n <ListSubheader\n disableSticky\n component=\"div\"\n id=\"nested-list-subheader\"\n color=\"primary\"\n >\n {t('homePage.followedTags')}\n </ListSubheader>\n }\n >\n <Divider />\n <ListItem>\n {tags.tags.map(tag => (\n <Chip\n key={tag}\n label={tag}\n size=\"small\"\n className=\"qetaTagChip\"\n component=\"a\"\n href={tagRoute({ tag: tag })}\n clickable\n />\n ))}\n </ListItem>\n </List>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;AAaO,MAAM,mBAAmB,MAAM;AACpC,EAAA,MAAM,UAAU,SAAU,EAAA,CAAA;AAC1B,EAAA,MAAM,OAAO,aAAc,EAAA,CAAA;AAC3B,EAAM,MAAA,QAAA,GAAW,YAAY,WAAW,CAAA,CAAA;AACxC,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA,CAAA;AAE7B,EAAI,IAAA,IAAA,CAAK,IAAK,CAAA,MAAA,KAAW,CAAG,EAAA;AAC1B,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AAEA,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,CAA6B,0BAAA,EAAA,OAAA,CAAQ,8BAA8B,CAAA,CAAA;AAAA,MAC9E,OAAS,EAAA,EAAE,EAAI,EAAA,MAAA,EAAQ,IAAI,OAAQ,EAAA;AAAA,KAAA;AAAA,oBAEnC,KAAA,CAAA,aAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,SAAU,EAAA,KAAA;AAAA,QACV,iBAAgB,EAAA,uBAAA;AAAA,QAChB,SAAA,EAAW,CAAiC,8BAAA,EAAA,OAAA,CAAQ,qBAAqB,CAAA,CAAA;AAAA,QACzE,SACE,kBAAA,KAAA,CAAA,aAAA;AAAA,UAAC,aAAA;AAAA,UAAA;AAAA,YACC,aAAa,EAAA,IAAA;AAAA,YACb,SAAU,EAAA,KAAA;AAAA,YACV,EAAG,EAAA,uBAAA;AAAA,YACH,KAAM,EAAA,SAAA;AAAA,WAAA;AAAA,UAEL,EAAE,uBAAuB,CAAA;AAAA,SAC5B;AAAA,OAAA;AAAA,0CAGD,OAAQ,EAAA,IAAA,CAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"FollowedTagsList.esm.js","sources":["../../../src/components/HomePage/FollowedTagsList.tsx"],"sourcesContent":["import {\n Box,\n Chip,\n Divider,\n List,\n ListItem,\n ListSubheader,\n} from '@material-ui/core';\nimport React from 'react';\nimport { useStyles, useTagsFollow, useTranslation } from '../../utils/hooks';\nimport { useRouteRef } from '@backstage/core-plugin-api';\nimport { tagRouteRef } from '@drodil/backstage-plugin-qeta-react';\n\nexport const FollowedTagsList = () => {\n const classes = useStyles();\n const tags = useTagsFollow();\n const tagRoute = useRouteRef(tagRouteRef);\n const { t } = useTranslation();\n\n if (tags.tags.length === 0) {\n return null;\n }\n\n return (\n <Box\n className={`qetaQuestionHighlightList ${classes.questionHighlightListContainer}`}\n display={{ md: 'none', lg: 'block' }}\n >\n <List\n component=\"nav\"\n aria-labelledby=\"nested-list-subheader\"\n className={`qetaQuestionHighlightListList ${classes.questionHighlightList}`}\n subheader={\n <ListSubheader\n disableSticky\n component=\"div\"\n id=\"nested-list-subheader\"\n color=\"primary\"\n >\n {t('homePage.followedTags')}\n </ListSubheader>\n }\n >\n <Divider />\n <ListItem style={{ display: 'block' }}>\n {tags.tags.map(tag => (\n <Chip\n key={tag}\n label={tag}\n size=\"small\"\n className=\"qetaTagChip\"\n component=\"a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,OAAA,EAAS,SACzB,EAAA,EAAA,IAAA,CAAK,IAAK,CAAA,GAAA,CAAI,CACb,GAAA,qBAAA,KAAA,CAAA,aAAA;AAAA,QAAC,IAAA;AAAA,QAAA;AAAA,UACC,GAAK,EAAA,GAAA;AAAA,UACL,KAAO,EAAA,GAAA;AAAA,UACP,IAAK,EAAA,OAAA;AAAA,UACL,SAAU,EAAA,aAAA;AAAA,UACV,SAAU,EAAA,GAAA;AAAA,UACV,IAAM,EAAA,QAAA,CAAS,EAAE,GAAA,EAAU,CAAA;AAAA,UAC3B,SAAS,EAAA,IAAA;AAAA,SAAA;AAAA,OAEZ,CACH,CAAA;AAAA,KACF;AAAA,GACF,CAAA;AAEJ;;;;"}
|
|
@@ -59,7 +59,7 @@ const QuestionCard = (props) => {
|
|
|
59
59
|
justifyContent: "space-around",
|
|
60
60
|
className: styles.questionCardMetadata
|
|
61
61
|
},
|
|
62
|
-
/* @__PURE__ */ React.createElement(Grid, { item: true, xs: 9, style: { alignSelf: "flex-end" } }, /* @__PURE__ */ React.createElement(TagsAndEntities, { question: questionEntity }), (question.
|
|
62
|
+
/* @__PURE__ */ React.createElement(Grid, { item: true, xs: 9, style: { alignSelf: "flex-end" } }, /* @__PURE__ */ React.createElement(TagsAndEntities, { question: questionEntity }), (question.canEdit || question.canDelete) && /* @__PURE__ */ React.createElement(Box, { className: styles.questionCardActions }, question.canDelete && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
63
63
|
Button,
|
|
64
64
|
{
|
|
65
65
|
variant: "outlined",
|
|
@@ -77,7 +77,7 @@ const QuestionCard = (props) => {
|
|
|
77
77
|
onClose: handleDeleteModalClose,
|
|
78
78
|
entity: questionEntity
|
|
79
79
|
}
|
|
80
|
-
)),
|
|
80
|
+
)), question.canEdit && /* @__PURE__ */ React.createElement(
|
|
81
81
|
Button,
|
|
82
82
|
{
|
|
83
83
|
variant: "outlined",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuestionCard.esm.js","sources":["../../../src/components/QuestionPage/QuestionCard.tsx"],"sourcesContent":["import {\n AnswerResponse,\n QuestionResponse,\n} from '@drodil/backstage-plugin-qeta-common';\nimport {\n Box,\n Button,\n Card,\n CardContent,\n Grid,\n Typography,\n} from '@material-ui/core';\nimport { MarkdownContent } from '@backstage/core-components';\nimport React, { useEffect } from 'react';\nimport { VoteButtons } from './VoteButtons';\nimport { useStyles, useTranslation } from '../../utils/hooks';\nimport { DeleteModal } from '../DeleteModal/DeleteModal';\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport EditIcon from '@material-ui/icons/Edit';\nimport { FavoriteButton } from './FavoriteButton';\nimport { AuthorBox } from './AuthorBox';\nimport { TagsAndEntities } from './TagsAndEntities';\nimport { CommentSection } from '../CommentSection/CommentSection';\nimport { useRouteRef } from '@backstage/core-plugin-api';\nimport { editQuestionRouteRef } from '@drodil/backstage-plugin-qeta-react';\nimport { LinkButton } from './LinkButton';\n\nexport const QuestionCard = (props: { question: QuestionResponse }) => {\n const { question } = props;\n const styles = useStyles();\n const editQuestionRoute = useRouteRef(editQuestionRouteRef);\n const [deleteModalOpen, setDeleteModalOpen] = React.useState(false);\n const [questionEntity, setQuestionEntity] = React.useState(question);\n const handleDeleteModalOpen = () => setDeleteModalOpen(true);\n const handleDeleteModalClose = () => setDeleteModalOpen(false);\n const { t } = useTranslation();\n const onCommentAction = (q: QuestionResponse, _?: AnswerResponse) => {\n setQuestionEntity(q);\n };\n\n const highlightedAnswer = window.location.hash.slice(1) ?? undefined;\n useEffect(() => {\n if (highlightedAnswer) {\n try {\n const element = document.querySelector(`#${highlightedAnswer}`);\n if (element) {\n element.scrollIntoView();\n }\n } catch (e) {\n // NOOP\n }\n }\n }, [highlightedAnswer]);\n\n return (\n <>\n <Card\n variant=\"outlined\"\n className={`qetaQuestionCard ${styles.questionCard}`}\n >\n <CardContent>\n <div className={styles.questionCardVote}>\n <VoteButtons entity={questionEntity} />\n <FavoriteButton entity={questionEntity} />\n <LinkButton entity={questionEntity} />\n </div>\n <div className={styles.questionCardContent}>\n <Typography variant=\"body1\" gutterBottom>\n <MarkdownContent\n content={questionEntity.content}\n dialect=\"gfm\"\n className={styles.markdownContent}\n />\n </Typography>\n <Grid\n container\n item\n justifyContent=\"space-around\"\n className={styles.questionCardMetadata}\n >\n <Grid item xs={9} style={{ alignSelf: 'flex-end' }}>\n <TagsAndEntities question={questionEntity} />\n {(question.
|
|
1
|
+
{"version":3,"file":"QuestionCard.esm.js","sources":["../../../src/components/QuestionPage/QuestionCard.tsx"],"sourcesContent":["import {\n AnswerResponse,\n QuestionResponse,\n} from '@drodil/backstage-plugin-qeta-common';\nimport {\n Box,\n Button,\n Card,\n CardContent,\n Grid,\n Typography,\n} from '@material-ui/core';\nimport { MarkdownContent } from '@backstage/core-components';\nimport React, { useEffect } from 'react';\nimport { VoteButtons } from './VoteButtons';\nimport { useStyles, useTranslation } from '../../utils/hooks';\nimport { DeleteModal } from '../DeleteModal/DeleteModal';\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport EditIcon from '@material-ui/icons/Edit';\nimport { FavoriteButton } from './FavoriteButton';\nimport { AuthorBox } from './AuthorBox';\nimport { TagsAndEntities } from './TagsAndEntities';\nimport { CommentSection } from '../CommentSection/CommentSection';\nimport { useRouteRef } from '@backstage/core-plugin-api';\nimport { editQuestionRouteRef } from '@drodil/backstage-plugin-qeta-react';\nimport { LinkButton } from './LinkButton';\n\nexport const QuestionCard = (props: { question: QuestionResponse }) => {\n const { question } = props;\n const styles = useStyles();\n const editQuestionRoute = useRouteRef(editQuestionRouteRef);\n const [deleteModalOpen, setDeleteModalOpen] = React.useState(false);\n const [questionEntity, setQuestionEntity] = React.useState(question);\n const handleDeleteModalOpen = () => setDeleteModalOpen(true);\n const handleDeleteModalClose = () => setDeleteModalOpen(false);\n const { t } = useTranslation();\n const onCommentAction = (q: QuestionResponse, _?: AnswerResponse) => {\n setQuestionEntity(q);\n };\n\n const highlightedAnswer = window.location.hash.slice(1) ?? undefined;\n useEffect(() => {\n if (highlightedAnswer) {\n try {\n const element = document.querySelector(`#${highlightedAnswer}`);\n if (element) {\n element.scrollIntoView();\n }\n } catch (e) {\n // NOOP\n }\n }\n }, [highlightedAnswer]);\n\n return (\n <>\n <Card\n variant=\"outlined\"\n className={`qetaQuestionCard ${styles.questionCard}`}\n >\n <CardContent>\n <div className={styles.questionCardVote}>\n <VoteButtons entity={questionEntity} />\n <FavoriteButton entity={questionEntity} />\n <LinkButton entity={questionEntity} />\n </div>\n <div className={styles.questionCardContent}>\n <Typography variant=\"body1\" gutterBottom>\n <MarkdownContent\n content={questionEntity.content}\n dialect=\"gfm\"\n className={styles.markdownContent}\n />\n </Typography>\n <Grid\n container\n item\n justifyContent=\"space-around\"\n className={styles.questionCardMetadata}\n >\n <Grid item xs={9} style={{ alignSelf: 'flex-end' }}>\n <TagsAndEntities question={questionEntity} />\n {(question.canEdit || question.canDelete) && (\n <Box className={styles.questionCardActions}>\n {question.canDelete && (\n <>\n <Button\n variant=\"outlined\"\n size=\"small\"\n color=\"secondary\"\n onClick={handleDeleteModalOpen}\n className={`${styles.marginRight} qetaQuestionCardDeleteBtn`}\n startIcon={<DeleteIcon />}\n >\n {t('deleteModal.deleteButton')}\n </Button>\n <DeleteModal\n open={deleteModalOpen}\n onClose={handleDeleteModalClose}\n entity={questionEntity}\n />\n </>\n )}\n {question.canEdit && (\n <Button\n variant=\"outlined\"\n size=\"small\"\n startIcon={<EditIcon />}\n href={editQuestionRoute({\n id: question.id.toString(10),\n })}\n className=\"qetaQuestionCardEditBtn\"\n >\n {t('questionPage.editButton')}\n </Button>\n )}\n </Box>\n )}\n </Grid>\n <Grid item xs={3} className={styles.noPadding}>\n <AuthorBox entity={questionEntity} />\n </Grid>\n </Grid>\n </div>\n </CardContent>\n </Card>\n <CommentSection\n question={questionEntity}\n onCommentDelete={onCommentAction}\n onCommentPost={onCommentAction}\n />\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;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AA,SAAA;AAAA,QAET,EAAE,yBAAyB,CAAA;AAAA,OAGlC,CAEJ,CAAA;AAAA,sBACC,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,IAAI,EAAA,IAAA,EAAC,EAAI,EAAA,CAAA,EAAG,SAAW,EAAA,MAAA,CAAO,SAClC,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,SAAU,EAAA,EAAA,MAAA,EAAQ,gBAAgB,CACrC,CAAA;AAAA,KAEJ,CACF,CAAA;AAAA,GAEF,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,cAAA;AAAA,IAAA;AAAA,MACC,QAAU,EAAA,cAAA;AAAA,MACV,eAAiB,EAAA,eAAA;AAAA,MACjB,aAAe,EAAA,eAAA;AAAA,KAAA;AAAA,GAEnB,CAAA,CAAA;AAEJ;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -230,6 +230,8 @@ declare class QetaClient implements QetaApi {
|
|
|
230
230
|
|
|
231
231
|
/** @alpha */
|
|
232
232
|
declare const qetaTranslationRef: _backstage_core_plugin_api_alpha.TranslationRef<"qeta", {
|
|
233
|
+
readonly "answer.questionTitle": "Q: {{question}}";
|
|
234
|
+
readonly "answer.answeredTime": "answered";
|
|
233
235
|
readonly "favorite.remove": "Remove this question from favorites";
|
|
234
236
|
readonly "favorite.add": "Mark this question as favorite";
|
|
235
237
|
readonly "statistics.errorLoading": "Could not load statistics";
|
|
@@ -245,8 +247,8 @@ declare const qetaTranslationRef: _backstage_core_plugin_api_alpha.TranslationRe
|
|
|
245
247
|
readonly "statistics.topVotedAnswers.description": "People who have the highest rated answers";
|
|
246
248
|
readonly "statistics.topVotedCorrectAnswers.title": "Top voted correct answers";
|
|
247
249
|
readonly "statistics.topVotedCorrectAnswers.description": "People who have the highest rated correct answers";
|
|
248
|
-
readonly "link.answer": "Copy link to this answer to clipboard";
|
|
249
250
|
readonly "link.question": "Copy link to this question to clipboard";
|
|
251
|
+
readonly "link.answer": "Copy link to this answer to clipboard";
|
|
250
252
|
readonly "link.aria": "Copy link to clipboard";
|
|
251
253
|
readonly pluginName: "Q&A";
|
|
252
254
|
readonly "answerList.errorLoading": "Could not load answers";
|
|
@@ -266,8 +268,6 @@ declare const qetaTranslationRef: _backstage_core_plugin_api_alpha.TranslationRe
|
|
|
266
268
|
readonly "common.questions_zero": "No questions";
|
|
267
269
|
readonly "common.questions_one": "{{count}} question";
|
|
268
270
|
readonly "common.questions_other": "{{count}} questions";
|
|
269
|
-
readonly "answer.questionTitle": "Q: {{question}}";
|
|
270
|
-
readonly "answer.answeredTime": "answered";
|
|
271
271
|
readonly "answerContainer.title.answersBy": "Answers by";
|
|
272
272
|
readonly "answerContainer.title.answersAbout": "Answers about";
|
|
273
273
|
readonly "answerContainer.title.answersTagged": "Answers tagged with {{tags}}";
|
|
@@ -301,16 +301,16 @@ declare const qetaTranslationRef: _backstage_core_plugin_api_alpha.TranslationRe
|
|
|
301
301
|
readonly "commentSection.input.placeholder": "Your comment";
|
|
302
302
|
readonly "commentSection.addComment": "Add comment";
|
|
303
303
|
readonly "commentSection.post": "Post";
|
|
304
|
-
readonly "deleteModal.title.answer": "Are you sure you want to delete this answer?";
|
|
305
304
|
readonly "deleteModal.title.question": "Are you sure you want to delete this question?";
|
|
305
|
+
readonly "deleteModal.title.answer": "Are you sure you want to delete this answer?";
|
|
306
306
|
readonly "deleteModal.errorDeleting": "Failed to delete";
|
|
307
307
|
readonly "deleteModal.deleteButton": "Delete";
|
|
308
308
|
readonly "deleteModal.cancelButton": "Cancel";
|
|
309
309
|
readonly "favoritePage.title": "Your favorite questions";
|
|
310
310
|
readonly "homePage.title": "All questions";
|
|
311
311
|
readonly "homePage.followedTags": "Followed tags";
|
|
312
|
-
readonly "homePage.moreMenu.statistics": "Statistics";
|
|
313
312
|
readonly "homePage.moreMenu.tags": "Tags";
|
|
313
|
+
readonly "homePage.moreMenu.statistics": "Statistics";
|
|
314
314
|
readonly "homePage.moreMenu.title": "More";
|
|
315
315
|
readonly "homePage.moreMenu.profile": "Profile";
|
|
316
316
|
readonly "homePage.moreMenu.favoriteQuestions": "Favorite questions";
|
|
@@ -340,15 +340,15 @@ declare const qetaTranslationRef: _backstage_core_plugin_api_alpha.TranslationRe
|
|
|
340
340
|
readonly "authorBox.postedAtTime": "Posted";
|
|
341
341
|
readonly "authorBox.updatedAtTime": "Updated";
|
|
342
342
|
readonly "authorBox.updatedBy": "by";
|
|
343
|
+
readonly "voteButtons.question.good": "This question is good";
|
|
344
|
+
readonly "voteButtons.question.bad": "This question is not good";
|
|
345
|
+
readonly "voteButtons.question.own": "You cannot vote your own question";
|
|
343
346
|
readonly "voteButtons.answer.markCorrect": "Mark this answer correct";
|
|
344
347
|
readonly "voteButtons.answer.markIncorrect": "Mark this answer incorrect";
|
|
345
348
|
readonly "voteButtons.answer.marked": "This answer has been marked as correct";
|
|
346
349
|
readonly "voteButtons.answer.good": "This answer is good";
|
|
347
350
|
readonly "voteButtons.answer.bad": "This answer is not good";
|
|
348
351
|
readonly "voteButtons.answer.own": "You cannot vote your own answer";
|
|
349
|
-
readonly "voteButtons.question.good": "This question is good";
|
|
350
|
-
readonly "voteButtons.question.bad": "This question is not good";
|
|
351
|
-
readonly "voteButtons.question.own": "You cannot vote your own question";
|
|
352
352
|
readonly "datePicker.from": "From date";
|
|
353
353
|
readonly "datePicker.to": "To date";
|
|
354
354
|
readonly "datePicker.invalidRange": "Date range invalid, 'To date' should be greater than 'From date'";
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"frontend",
|
|
8
8
|
"backstage.io"
|
|
9
9
|
],
|
|
10
|
-
"version": "2.
|
|
10
|
+
"version": "2.9.1",
|
|
11
11
|
"main": "dist/index.esm.js",
|
|
12
12
|
"types": "dist/index.d.ts",
|
|
13
13
|
"prepublishOnly": "yarn tsc && yarn build",
|
|
@@ -47,24 +47,24 @@
|
|
|
47
47
|
"tsc": "tsc"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@backstage/catalog-client": "^1.
|
|
51
|
-
"@backstage/catalog-model": "^1.
|
|
50
|
+
"@backstage/catalog-client": "^1.7.0",
|
|
51
|
+
"@backstage/catalog-model": "^1.7.0",
|
|
52
52
|
"@backstage/config": "^1.2.0",
|
|
53
|
-
"@backstage/core-components": "^0.
|
|
54
|
-
"@backstage/core-plugin-api": "^1.9.
|
|
53
|
+
"@backstage/core-components": "^0.15.0",
|
|
54
|
+
"@backstage/core-plugin-api": "^1.9.4",
|
|
55
55
|
"@backstage/errors": "^1.2.4",
|
|
56
|
-
"@backstage/plugin-catalog-react": "^1.
|
|
57
|
-
"@backstage/plugin-home-react": "^0.1.
|
|
58
|
-
"@backstage/plugin-permission-react": "^0.4.
|
|
59
|
-
"@backstage/plugin-signals-react": "^0.0.
|
|
60
|
-
"@drodil/backstage-plugin-qeta-common": "^2.
|
|
61
|
-
"@drodil/backstage-plugin-qeta-react": "^2.
|
|
56
|
+
"@backstage/plugin-catalog-react": "^1.13.0",
|
|
57
|
+
"@backstage/plugin-home-react": "^0.1.17",
|
|
58
|
+
"@backstage/plugin-permission-react": "^0.4.26",
|
|
59
|
+
"@backstage/plugin-signals-react": "^0.0.5",
|
|
60
|
+
"@drodil/backstage-plugin-qeta-common": "^2.9.1",
|
|
61
|
+
"@drodil/backstage-plugin-qeta-react": "^2.9.1",
|
|
62
62
|
"@material-ui/core": "^4.12.2",
|
|
63
63
|
"@material-ui/icons": "^4.11.3",
|
|
64
64
|
"@material-ui/lab": "4.0.0-alpha.61",
|
|
65
65
|
"ajv": "^8.12.0",
|
|
66
66
|
"dataloader": "^2.2.2",
|
|
67
|
-
"dompurify": "^3.
|
|
67
|
+
"dompurify": "^3.1.3",
|
|
68
68
|
"file-type": "16.5.4",
|
|
69
69
|
"lodash": "^4.17.21",
|
|
70
70
|
"react-hook-form": "^7.46.2",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"react-use": "^17.4.0"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@backstage/catalog-client": "^1.
|
|
76
|
+
"@backstage/catalog-client": "^1.7.0",
|
|
77
77
|
"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
78
78
|
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
79
79
|
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
@@ -82,12 +82,12 @@
|
|
|
82
82
|
"react-markdown": "8.0.7"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
|
-
"@backstage/cli": "^0.27.
|
|
86
|
-
"@backstage/dev-utils": "^1.0
|
|
87
|
-
"@backstage/plugin-catalog": "^1.
|
|
88
|
-
"@backstage/plugin-home": "^0.7.
|
|
89
|
-
"@backstage/plugin-notifications": "^0.3.
|
|
90
|
-
"@backstage/plugin-signals": "^0.0.
|
|
85
|
+
"@backstage/cli": "^0.27.1",
|
|
86
|
+
"@backstage/dev-utils": "^1.1.0",
|
|
87
|
+
"@backstage/plugin-catalog": "^1.23.0",
|
|
88
|
+
"@backstage/plugin-home": "^0.7.10",
|
|
89
|
+
"@backstage/plugin-notifications": "^0.3.1",
|
|
90
|
+
"@backstage/plugin-signals": "^0.0.10",
|
|
91
91
|
"@testing-library/jest-dom": "^6.1.3",
|
|
92
92
|
"@types/dompurify": "^3.0.0",
|
|
93
93
|
"@types/lodash": "^4.14.199",
|