@backstage-community/plugin-entity-feedback 0.2.18 → 0.2.19
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/CHANGELOG.md +8 -0
- package/dist/api/EntityFeedbackApi.esm.js +8 -0
- package/dist/api/EntityFeedbackApi.esm.js.map +1 -0
- package/dist/api/EntityFeedbackClient.esm.js +109 -0
- package/dist/api/EntityFeedbackClient.esm.js.map +1 -0
- package/dist/{esm/FeedbackRatingsTable-O2SrWgAE.esm.js → components/FeedbackRatingsTable/FeedbackRatingsTable.esm.js} +3 -3
- package/dist/components/FeedbackRatingsTable/FeedbackRatingsTable.esm.js.map +1 -0
- package/dist/{esm/FeedbackResponseDialog-FxuGsr7u.esm.js → components/FeedbackResponseDialog/FeedbackResponseDialog.esm.js} +3 -3
- package/dist/components/FeedbackResponseDialog/FeedbackResponseDialog.esm.js.map +1 -0
- package/dist/components/FeedbackResponseDialog/index.esm.js +2 -0
- package/dist/components/FeedbackResponseDialog/index.esm.js.map +1 -0
- package/dist/{esm/index-xB2VxWp7.esm.js → components/FeedbackResponseTable/FeedbackResponseTable.esm.js} +2 -3
- package/dist/components/FeedbackResponseTable/FeedbackResponseTable.esm.js.map +1 -0
- package/dist/components/FeedbackResponseTable/index.esm.js +2 -0
- package/dist/components/FeedbackResponseTable/index.esm.js.map +1 -0
- package/dist/{esm/LikeDislikeButtons-D7M8hiAk.esm.js → components/LikeDislikeButtons/LikeDislikeButtons.esm.js} +4 -4
- package/dist/components/LikeDislikeButtons/LikeDislikeButtons.esm.js.map +1 -0
- package/dist/components/LikeDislikeButtons/index.esm.js +2 -0
- package/dist/components/LikeDislikeButtons/index.esm.js.map +1 -0
- package/dist/components/LikeDislikeRatingsTable/LikeDislikeRatingsTable.esm.js +21 -0
- package/dist/components/LikeDislikeRatingsTable/LikeDislikeRatingsTable.esm.js.map +1 -0
- package/dist/components/LikeDislikeRatingsTable/index.esm.js +2 -0
- package/dist/components/LikeDislikeRatingsTable/index.esm.js.map +1 -0
- package/dist/{esm/StarredRatingButtons-7kGQPIqk.esm.js → components/StarredRatingButtons/StarredRatingButtons.esm.js} +4 -4
- package/dist/components/StarredRatingButtons/StarredRatingButtons.esm.js.map +1 -0
- package/dist/components/StarredRatingButtons/index.esm.js +2 -0
- package/dist/components/StarredRatingButtons/index.esm.js.map +1 -0
- package/dist/components/StarredRatingsTable/StarredRatingsTable.esm.js +19 -0
- package/dist/components/StarredRatingsTable/StarredRatingsTable.esm.js.map +1 -0
- package/dist/components/StarredRatingsTable/index.esm.js +2 -0
- package/dist/components/StarredRatingsTable/index.esm.js.map +1 -0
- package/dist/index.esm.js +3 -256
- package/dist/index.esm.js.map +1 -1
- package/dist/plugin.esm.js +146 -0
- package/dist/plugin.esm.js.map +1 -0
- package/dist/routes.esm.js +8 -0
- package/dist/routes.esm.js.map +1 -0
- package/package.json +7 -7
- package/dist/esm/FeedbackRatingsTable-O2SrWgAE.esm.js.map +0 -1
- package/dist/esm/FeedbackResponseDialog-FxuGsr7u.esm.js.map +0 -1
- package/dist/esm/LikeDislikeButtons-D7M8hiAk.esm.js.map +0 -1
- package/dist/esm/StarredRatingButtons-7kGQPIqk.esm.js.map +0 -1
- package/dist/esm/index-6WuZOQ2W.esm.js +0 -51
- package/dist/esm/index-6WuZOQ2W.esm.js.map +0 -1
- package/dist/esm/index-BNjpfNYP.esm.js +0 -30
- package/dist/esm/index-BNjpfNYP.esm.js.map +0 -1
- package/dist/esm/index-CV29yHQA.esm.js +0 -33
- package/dist/esm/index-CV29yHQA.esm.js.map +0 -1
- package/dist/esm/index-DKWcikxI.esm.js +0 -25
- package/dist/esm/index-DKWcikxI.esm.js.map +0 -1
- package/dist/esm/index-iIL-rmvF.esm.js +0 -46
- package/dist/esm/index-iIL-rmvF.esm.js.map +0 -1
- package/dist/esm/index-xB2VxWp7.esm.js.map +0 -1
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { F as FeedbackRatingsTable } from './FeedbackRatingsTable-O2SrWgAE.esm.js';
|
|
3
|
-
import { F as FeedbackRatings } from './LikeDislikeButtons-D7M8hiAk.esm.js';
|
|
4
|
-
import '@backstage/catalog-model';
|
|
5
|
-
import '@backstage/core-components';
|
|
6
|
-
import '@backstage/core-plugin-api';
|
|
7
|
-
import '@backstage/plugin-catalog-react';
|
|
8
|
-
import 'react-use/esm/useAsync';
|
|
9
|
-
import '@backstage/errors';
|
|
10
|
-
import '../index.esm.js';
|
|
11
|
-
import '@material-ui/core/IconButton';
|
|
12
|
-
import '@material-ui/core/Tooltip';
|
|
13
|
-
import '@material-ui/icons/ThumbDown';
|
|
14
|
-
import '@material-ui/icons/ThumbUp';
|
|
15
|
-
import '@material-ui/icons/ThumbDownOutlined';
|
|
16
|
-
import '@material-ui/icons/ThumbUpOutlined';
|
|
17
|
-
import 'react-use/esm/useAsyncFn';
|
|
18
|
-
import './FeedbackResponseDialog-FxuGsr7u.esm.js';
|
|
19
|
-
import '@material-ui/core/Button';
|
|
20
|
-
import '@material-ui/core/Checkbox';
|
|
21
|
-
import '@material-ui/core/Dialog';
|
|
22
|
-
import '@material-ui/core/DialogActions';
|
|
23
|
-
import '@material-ui/core/DialogContent';
|
|
24
|
-
import '@material-ui/core/DialogTitle';
|
|
25
|
-
import '@material-ui/core/FormControl';
|
|
26
|
-
import '@material-ui/core/FormControlLabel';
|
|
27
|
-
import '@material-ui/core/FormGroup';
|
|
28
|
-
import '@material-ui/core/FormLabel';
|
|
29
|
-
import '@material-ui/core/Grid';
|
|
30
|
-
import '@material-ui/core/Switch';
|
|
31
|
-
import '@material-ui/core/TextField';
|
|
32
|
-
import '@material-ui/core/Typography';
|
|
33
|
-
import '@material-ui/core/styles';
|
|
34
|
-
|
|
35
|
-
const LikeDislikeRatingsTable = (props) => {
|
|
36
|
-
const { allEntities, ownerRef, title } = props;
|
|
37
|
-
return /* @__PURE__ */ React.createElement(
|
|
38
|
-
FeedbackRatingsTable,
|
|
39
|
-
{
|
|
40
|
-
allEntities,
|
|
41
|
-
ownerRef,
|
|
42
|
-
ratingValues: Object.values(FeedbackRatings).filter(
|
|
43
|
-
(r) => r !== FeedbackRatings.neutral
|
|
44
|
-
),
|
|
45
|
-
title
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export { LikeDislikeRatingsTable };
|
|
51
|
-
//# sourceMappingURL=index-6WuZOQ2W.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-6WuZOQ2W.esm.js","sources":["../../src/components/LikeDislikeRatingsTable/LikeDislikeRatingsTable.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\n\nimport { FeedbackRatingsTable } from '../FeedbackRatingsTable';\nimport { FeedbackRatings } from '../LikeDislikeButtons';\n\n/**\n * @public\n */\nexport interface LikeDislikeRatingsTableProps {\n allEntities?: boolean;\n ownerRef?: string;\n title?: string;\n}\n\nexport const LikeDislikeRatingsTable = (\n props: LikeDislikeRatingsTableProps,\n) => {\n const { allEntities, ownerRef, title } = props;\n\n return (\n <FeedbackRatingsTable\n allEntities={allEntities}\n ownerRef={ownerRef}\n ratingValues={Object.values(FeedbackRatings).filter(\n r => r !== FeedbackRatings.neutral,\n )}\n title={title}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8Ba,MAAA,uBAAA,GAA0B,CACrC,KACG,KAAA;AACH,EAAA,MAAM,EAAE,WAAA,EAAa,QAAU,EAAA,KAAA,EAAU,GAAA,KAAA,CAAA;AAEzC,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACC,WAAA;AAAA,MACA,QAAA;AAAA,MACA,YAAc,EAAA,MAAA,CAAO,MAAO,CAAA,eAAe,CAAE,CAAA,MAAA;AAAA,QAC3C,CAAA,CAAA,KAAK,MAAM,eAAgB,CAAA,OAAA;AAAA,OAC7B;AAAA,MACA,KAAA;AAAA,KAAA;AAAA,GACF,CAAA;AAEJ;;;;"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export { F as FeedbackRatings, S as StarredRatingButtons } from './StarredRatingButtons-7kGQPIqk.esm.js';
|
|
2
|
-
import '@backstage/catalog-model';
|
|
3
|
-
import '@backstage/core-components';
|
|
4
|
-
import '@backstage/core-plugin-api';
|
|
5
|
-
import '@backstage/plugin-catalog-react';
|
|
6
|
-
import '@material-ui/core/IconButton';
|
|
7
|
-
import '@material-ui/icons/StarOutline';
|
|
8
|
-
import '@material-ui/icons/Star';
|
|
9
|
-
import 'react';
|
|
10
|
-
import 'react-use/esm/useAsync';
|
|
11
|
-
import 'react-use/esm/useAsyncFn';
|
|
12
|
-
import '@backstage/errors';
|
|
13
|
-
import '../index.esm.js';
|
|
14
|
-
import './FeedbackResponseDialog-FxuGsr7u.esm.js';
|
|
15
|
-
import '@material-ui/core/Button';
|
|
16
|
-
import '@material-ui/core/Checkbox';
|
|
17
|
-
import '@material-ui/core/Dialog';
|
|
18
|
-
import '@material-ui/core/DialogActions';
|
|
19
|
-
import '@material-ui/core/DialogContent';
|
|
20
|
-
import '@material-ui/core/DialogTitle';
|
|
21
|
-
import '@material-ui/core/FormControl';
|
|
22
|
-
import '@material-ui/core/FormControlLabel';
|
|
23
|
-
import '@material-ui/core/FormGroup';
|
|
24
|
-
import '@material-ui/core/FormLabel';
|
|
25
|
-
import '@material-ui/core/Grid';
|
|
26
|
-
import '@material-ui/core/Switch';
|
|
27
|
-
import '@material-ui/core/TextField';
|
|
28
|
-
import '@material-ui/core/Typography';
|
|
29
|
-
import '@material-ui/core/styles';
|
|
30
|
-
//# sourceMappingURL=index-BNjpfNYP.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-BNjpfNYP.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export { F as FeedbackRatings, L as LikeDislikeButtons } from './LikeDislikeButtons-D7M8hiAk.esm.js';
|
|
2
|
-
import '@backstage/catalog-model';
|
|
3
|
-
import '@backstage/core-components';
|
|
4
|
-
import '@backstage/core-plugin-api';
|
|
5
|
-
import '@backstage/plugin-catalog-react';
|
|
6
|
-
import '@material-ui/core/IconButton';
|
|
7
|
-
import '@material-ui/core/Tooltip';
|
|
8
|
-
import '@material-ui/icons/ThumbDown';
|
|
9
|
-
import '@material-ui/icons/ThumbUp';
|
|
10
|
-
import '@material-ui/icons/ThumbDownOutlined';
|
|
11
|
-
import '@material-ui/icons/ThumbUpOutlined';
|
|
12
|
-
import 'react';
|
|
13
|
-
import 'react-use/esm/useAsync';
|
|
14
|
-
import 'react-use/esm/useAsyncFn';
|
|
15
|
-
import '@backstage/errors';
|
|
16
|
-
import '../index.esm.js';
|
|
17
|
-
import './FeedbackResponseDialog-FxuGsr7u.esm.js';
|
|
18
|
-
import '@material-ui/core/Button';
|
|
19
|
-
import '@material-ui/core/Checkbox';
|
|
20
|
-
import '@material-ui/core/Dialog';
|
|
21
|
-
import '@material-ui/core/DialogActions';
|
|
22
|
-
import '@material-ui/core/DialogContent';
|
|
23
|
-
import '@material-ui/core/DialogTitle';
|
|
24
|
-
import '@material-ui/core/FormControl';
|
|
25
|
-
import '@material-ui/core/FormControlLabel';
|
|
26
|
-
import '@material-ui/core/FormGroup';
|
|
27
|
-
import '@material-ui/core/FormLabel';
|
|
28
|
-
import '@material-ui/core/Grid';
|
|
29
|
-
import '@material-ui/core/Switch';
|
|
30
|
-
import '@material-ui/core/TextField';
|
|
31
|
-
import '@material-ui/core/Typography';
|
|
32
|
-
import '@material-ui/core/styles';
|
|
33
|
-
//# sourceMappingURL=index-CV29yHQA.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-CV29yHQA.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export { F as FeedbackResponseDialog } from './FeedbackResponseDialog-FxuGsr7u.esm.js';
|
|
2
|
-
import '@backstage/catalog-model';
|
|
3
|
-
import '@backstage/core-components';
|
|
4
|
-
import '@backstage/core-plugin-api';
|
|
5
|
-
import '@material-ui/core/Button';
|
|
6
|
-
import '@material-ui/core/Checkbox';
|
|
7
|
-
import '@material-ui/core/Dialog';
|
|
8
|
-
import '@material-ui/core/DialogActions';
|
|
9
|
-
import '@material-ui/core/DialogContent';
|
|
10
|
-
import '@material-ui/core/DialogTitle';
|
|
11
|
-
import '@material-ui/core/FormControl';
|
|
12
|
-
import '@material-ui/core/FormControlLabel';
|
|
13
|
-
import '@material-ui/core/FormGroup';
|
|
14
|
-
import '@material-ui/core/FormLabel';
|
|
15
|
-
import '@material-ui/core/Grid';
|
|
16
|
-
import '@material-ui/core/Switch';
|
|
17
|
-
import '@material-ui/core/TextField';
|
|
18
|
-
import '@material-ui/core/Typography';
|
|
19
|
-
import '@material-ui/core/styles';
|
|
20
|
-
import 'react';
|
|
21
|
-
import 'react-use/esm/useAsyncFn';
|
|
22
|
-
import '@backstage/errors';
|
|
23
|
-
import '../index.esm.js';
|
|
24
|
-
import '@backstage/plugin-catalog-react';
|
|
25
|
-
//# sourceMappingURL=index-DKWcikxI.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-DKWcikxI.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { F as FeedbackRatingsTable } from './FeedbackRatingsTable-O2SrWgAE.esm.js';
|
|
3
|
-
import { F as FeedbackRatings } from './StarredRatingButtons-7kGQPIqk.esm.js';
|
|
4
|
-
import '@backstage/catalog-model';
|
|
5
|
-
import '@backstage/core-components';
|
|
6
|
-
import '@backstage/core-plugin-api';
|
|
7
|
-
import '@backstage/plugin-catalog-react';
|
|
8
|
-
import 'react-use/esm/useAsync';
|
|
9
|
-
import '@backstage/errors';
|
|
10
|
-
import '../index.esm.js';
|
|
11
|
-
import '@material-ui/core/IconButton';
|
|
12
|
-
import '@material-ui/icons/StarOutline';
|
|
13
|
-
import '@material-ui/icons/Star';
|
|
14
|
-
import 'react-use/esm/useAsyncFn';
|
|
15
|
-
import './FeedbackResponseDialog-FxuGsr7u.esm.js';
|
|
16
|
-
import '@material-ui/core/Button';
|
|
17
|
-
import '@material-ui/core/Checkbox';
|
|
18
|
-
import '@material-ui/core/Dialog';
|
|
19
|
-
import '@material-ui/core/DialogActions';
|
|
20
|
-
import '@material-ui/core/DialogContent';
|
|
21
|
-
import '@material-ui/core/DialogTitle';
|
|
22
|
-
import '@material-ui/core/FormControl';
|
|
23
|
-
import '@material-ui/core/FormControlLabel';
|
|
24
|
-
import '@material-ui/core/FormGroup';
|
|
25
|
-
import '@material-ui/core/FormLabel';
|
|
26
|
-
import '@material-ui/core/Grid';
|
|
27
|
-
import '@material-ui/core/Switch';
|
|
28
|
-
import '@material-ui/core/TextField';
|
|
29
|
-
import '@material-ui/core/Typography';
|
|
30
|
-
import '@material-ui/core/styles';
|
|
31
|
-
|
|
32
|
-
const StarredRatingsTable = (props) => {
|
|
33
|
-
const { allEntities, ownerRef, title } = props;
|
|
34
|
-
return /* @__PURE__ */ React.createElement(
|
|
35
|
-
FeedbackRatingsTable,
|
|
36
|
-
{
|
|
37
|
-
allEntities,
|
|
38
|
-
ownerRef,
|
|
39
|
-
ratingValues: Object.values(FeedbackRatings).filter((o) => typeof o === "number").map((r) => r.toString()),
|
|
40
|
-
title
|
|
41
|
-
}
|
|
42
|
-
);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export { StarredRatingsTable };
|
|
46
|
-
//# sourceMappingURL=index-iIL-rmvF.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-iIL-rmvF.esm.js","sources":["../../src/components/StarredRatingsTable/StarredRatingsTable.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\n\nimport { FeedbackRatingsTable } from '../FeedbackRatingsTable';\nimport { FeedbackRatings } from '../StarredRatingButtons';\n\n/**\n * @public\n */\nexport interface StarredRatingsTableProps {\n allEntities?: boolean;\n ownerRef?: string;\n title?: string;\n}\n\nexport const StarredRatingsTable = (props: StarredRatingsTableProps) => {\n const { allEntities, ownerRef, title } = props;\n\n return (\n <FeedbackRatingsTable\n allEntities={allEntities}\n ownerRef={ownerRef}\n ratingValues={Object.values(FeedbackRatings)\n .filter(o => typeof o === 'number')\n .map(r => r.toString())}\n title={title}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8Ba,MAAA,mBAAA,GAAsB,CAAC,KAAoC,KAAA;AACtE,EAAA,MAAM,EAAE,WAAA,EAAa,QAAU,EAAA,KAAA,EAAU,GAAA,KAAA,CAAA;AAEzC,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACC,WAAA;AAAA,MACA,QAAA;AAAA,MACA,YAAc,EAAA,MAAA,CAAO,MAAO,CAAA,eAAe,EACxC,MAAO,CAAA,CAAA,CAAA,KAAK,OAAO,CAAA,KAAM,QAAQ,CACjC,CAAA,GAAA,CAAI,CAAK,CAAA,KAAA,CAAA,CAAE,UAAU,CAAA;AAAA,MACxB,KAAA;AAAA,KAAA;AAAA,GACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-xB2VxWp7.esm.js","sources":["../../src/components/FeedbackResponseTable/FeedbackResponseTable.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ErrorPanel, Table } from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { EntityRefLink } from '@backstage/plugin-catalog-react';\nimport { FeedbackResponse } from '@backstage-community/plugin-entity-feedback-common';\nimport Chip from '@material-ui/core/Chip';\nimport { makeStyles } from '@material-ui/core/styles';\nimport CheckIcon from '@material-ui/icons/Check';\nimport React from 'react';\nimport useAsync from 'react-use/esm/useAsync';\n\nimport { entityFeedbackApiRef } from '../../api';\n\ntype ResponseRow = Omit<FeedbackResponse, 'entityRef'>;\n\nconst useStyles = makeStyles(theme => ({\n consentCheck: {\n color: theme.palette.status.ok,\n },\n}));\n\n/**\n * @public\n */\nexport interface FeedbackResponseTableProps {\n entityRef: string;\n title?: string;\n}\n\nexport const FeedbackResponseTable = (props: FeedbackResponseTableProps) => {\n const { entityRef, title = 'Entity Responses' } = props;\n const classes = useStyles();\n const feedbackApi = useApi(entityFeedbackApiRef);\n\n const {\n error,\n loading,\n value: responses,\n } = useAsync(async () => {\n if (!entityRef) {\n return [];\n }\n\n return feedbackApi.getResponses(entityRef);\n }, [entityRef, feedbackApi]);\n\n const columns = [\n {\n title: 'User',\n field: 'userRef',\n width: '15%',\n render: (response: ResponseRow) => (\n <EntityRefLink entityRef={response.userRef} defaultKind=\"user\" />\n ),\n },\n {\n title: 'OK to contact?',\n field: 'consent',\n width: '10%',\n render: (response: ResponseRow) =>\n response.consent ? <CheckIcon className={classes.consentCheck} /> : '',\n },\n {\n title: 'Responses',\n field: 'response',\n width: '35%',\n render: (response: ResponseRow) => (\n <>\n {(response.response || '')\n .split(',')\n .map(v => v.trim()) // removes whitespace\n .filter(Boolean) // removes accidental empty entries\n .map(res => (\n <Chip key={res} size=\"small\" label={res} />\n ))}\n </>\n ),\n },\n { title: 'Comments', field: 'comments', width: '40%' },\n ];\n\n if (error) {\n return (\n <ErrorPanel\n defaultExpanded\n title=\"Failed to load feedback responses\"\n error={error}\n />\n );\n }\n\n return (\n <Table<ResponseRow>\n columns={columns}\n data={(responses ?? []) as ResponseRow[]}\n isLoading={loading}\n options={{\n emptyRowsWhenPaging: false,\n loadingType: 'linear',\n pageSize: 20,\n pageSizeOptions: [20, 50, 100],\n paging: true,\n showEmptyDataSourceMessage: !loading,\n }}\n title={title}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AA8BA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,YAAc,EAAA;AAAA,IACZ,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,MAAO,CAAA,EAAA;AAAA,GAC9B;AACF,CAAE,CAAA,CAAA,CAAA;AAUW,MAAA,qBAAA,GAAwB,CAAC,KAAsC,KAAA;AAC1E,EAAA,MAAM,EAAE,SAAA,EAAW,KAAQ,GAAA,kBAAA,EAAuB,GAAA,KAAA,CAAA;AAClD,EAAA,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