@rh-support/troubleshoot 2.0.7 → 2.0.8
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/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +36 -38
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +1 -2
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +3 -4
- package/lib/esm/scss/_main.scss +2 -41
- package/package.json +2 -2
- package/lib/esm/components/CaseEditView/CaseSolutions/HandpickedItem.d.ts +0 -12
- package/lib/esm/components/CaseEditView/CaseSolutions/HandpickedItem.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/HandpickedItem.js +0 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseSolutions.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutions.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAsD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseSolutions.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutions.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAsD,MAAM,OAAO,CAAC;AA+D3E,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAUD,eAAO,MAAM,aAAa,+EAoYxB,CAAC"}
|
|
@@ -34,7 +34,6 @@ import { useCaseUpdateErrorMessage } from '../../../hooks/useCaseUpdateErrorMess
|
|
|
34
34
|
import { updateCaseDetails } from '../../../reducers/CaseReducer';
|
|
35
35
|
import { fetchRecommendations } from '../../../reducers/RecommendationsReducer';
|
|
36
36
|
import { CaseSolutionsItem } from './CaseSolutionsItem';
|
|
37
|
-
import { HandpickedItem } from './HandpickedItem';
|
|
38
37
|
// some of the pinned and hadpicked titles are set to 'Red Hat Knowledge Base'
|
|
39
38
|
// this workaround is added till backend fix
|
|
40
39
|
const titleFix = (recommendations, allDocs) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -95,8 +94,7 @@ export const CaseSolutions = forwardRef((props, ref) => {
|
|
|
95
94
|
const recommendationsDispatch = useRecommendationDispatchContext();
|
|
96
95
|
const { caseNumber, isSecureSupportAccount } = props;
|
|
97
96
|
const [isPinLoading, setIsPinLoading] = useState({});
|
|
98
|
-
const [
|
|
99
|
-
const [pinnedOpen, setPinnedOpen] = useState(false);
|
|
97
|
+
const [expanded, setExpanded] = useState('sol-handpicked');
|
|
100
98
|
const [recommendations, setRecommendations] = useState([]);
|
|
101
99
|
const [topRecommendations, setTopRecommendations] = useState([]);
|
|
102
100
|
const ability = useContext(AbilityContext);
|
|
@@ -207,49 +205,49 @@ export const CaseSolutions = forwardRef((props, ref) => {
|
|
|
207
205
|
}
|
|
208
206
|
}, [allDocs, isFetchingCaseDetails, isLoadingRecommendations, recomendationsObj]);
|
|
209
207
|
const renderTopRecommendations = (recommendation, index, type) => (React.createElement(React.Fragment, null,
|
|
210
|
-
canPinUnpin && (React.createElement(CaseSolutionsItem, { showPin: true, type: type, pinTitle: recommendation.isPinned ?
|
|
211
|
-
canLinkUnlink && (React.createElement(CaseSolutionsItem, { showLink: true, type: type, pinTitle: recommendation.isLinked ?
|
|
208
|
+
canPinUnpin && (React.createElement(CaseSolutionsItem, { showPin: true, type: type, pinTitle: recommendation.isPinned ? 'Unpin' : 'Pin', isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, recommendation.isPinned, undefined) })),
|
|
209
|
+
canLinkUnlink && (React.createElement(CaseSolutionsItem, { showLink: true, type: type, pinTitle: recommendation.isLinked ? 'Unlink' : 'Link', isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, undefined, recommendation.isLinked) }))));
|
|
212
210
|
// customer logged in: we show pins and perform pin/unpin
|
|
213
|
-
const renderPinsByCustomer = (recommendation, index, type) => (React.createElement(CaseSolutionsItem, { showPin: true,
|
|
211
|
+
const renderPinsByCustomer = (recommendation, index, type) => (React.createElement(CaseSolutionsItem, { showPin: true, type: type, pinTitle: recommendation.isPinned ? 'Unpin' : 'Pin', isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, recommendation.isPinned, undefined) }));
|
|
214
212
|
// customer logged in: we show links but perform pin/unpin
|
|
215
|
-
const renderHandpickedCustomerView = (recommendation, index, type) => (React.createElement(
|
|
213
|
+
const renderHandpickedCustomerView = (recommendation, index, type) => (React.createElement(CaseSolutionsItem, { showPin: true, type: type, pinTitle: recommendation.isPinnedAndLinked ? 'Unpin' : 'Pin', isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, recommendation.isPinned, undefined) }));
|
|
216
214
|
// redhatter logged in: we show pins but perform link/unlink
|
|
217
|
-
const renderPinnedByCustomerRedhatterView = (recommendation, index, type) => (React.createElement(CaseSolutionsItem, { showLink: true, type: type, pinTitle: recommendation.isPinnedAndLinked ?
|
|
215
|
+
const renderPinnedByCustomerRedhatterView = (recommendation, index, type) => (React.createElement(CaseSolutionsItem, { showLink: true, type: type, pinTitle: recommendation.isPinnedAndLinked ? 'Unpin' : 'Pin', isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, undefined, recommendation.isLinked) }));
|
|
218
216
|
// redhatter logged in: we show links and perform link/unlink
|
|
219
|
-
const renderHandPickedByRedHatter = (recommendation, index, type) => (React.createElement(
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
217
|
+
const renderHandPickedByRedHatter = (recommendation, index, type) => (React.createElement(CaseSolutionsItem, { showLink: true, type: type, pinTitle: recommendation.isLinked ? 'Unlink' : 'Link', isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, undefined, recommendation.isLinked) }));
|
|
218
|
+
const setExpandedSection = (id) => {
|
|
219
|
+
expanded === id ? setExpanded('') : setExpanded(id);
|
|
220
|
+
};
|
|
223
221
|
return (React.createElement(React.Fragment, null,
|
|
224
|
-
React.createElement(Accordion, { isBordered: true, asDefinitionList: false, className: "card card-white case-details-aside-solutions" },
|
|
225
|
-
React.createElement(AccordionItem, null,
|
|
226
|
-
React.createElement(AccordionToggle, { id: "sol-handpicked", isExpanded: handPickedOpen, onClick: () => setHandPickedOpen((pre) => !pre) },
|
|
227
|
-
React.createElement("span", null, canLinkUnlink ? React.createElement(Trans, null, "Handpicked by you") : React.createElement(Trans, null, "Handpicked for this case")),
|
|
228
|
-
React.createElement("span", { className: "badge-item pf-u-font-size-sm pf-u-mx-sm" }, linkedRecommendations.length)),
|
|
229
|
-
React.createElement(AccordionContent, { isHidden: !handPickedOpen }, !hasLink ? (React.createElement(Trans, null, "If a Red Hat engineer finds an article or solution that can help with your case, they'll pin it here.")) : (React.createElement(PaginatedList, { id: "case-details-handpicked-recommendations", listItems: linkedRecommendations.map((rec, index) => canLinkUnlink
|
|
230
|
-
? renderHandPickedByRedHatter(rec, index, 'handpicked-recommendations')
|
|
231
|
-
: renderHandpickedCustomerView(rec, index, 'handpicked-recommendations')), perPage: 5, className: "list-icons list-icons-flush", isFetching: !!isLoadingRecommendations, perPageOptions: [
|
|
232
|
-
{ title: '5', value: 5 },
|
|
233
|
-
{ title: '10', value: 10 },
|
|
234
|
-
] })))),
|
|
235
|
-
React.createElement(AccordionItem, null,
|
|
236
|
-
React.createElement(AccordionToggle, { id: "sol-pinned", isExpanded: pinnedOpen, onClick: () => setPinnedOpen((pre) => !pre) },
|
|
237
|
-
React.createElement("span", null, canLinkUnlink ? (React.createElement(Trans, null, "Pinned by customer")) : (React.createElement(Trans, null, "My pinned recommendations"))),
|
|
238
|
-
React.createElement("span", { className: "badge-item pf-u-font-size-sm pf-u-mx-sm" }, pinnedRecommendations.length)),
|
|
239
|
-
React.createElement(AccordionContent, { isHidden: !pinnedOpen }, !hasPin ? (React.createElement(Trans, null, "When you save a recommended article or solution, you'll see it here. Saved items display only in this case and are not saved for later.")) : (React.createElement(PaginatedList, { id: "case-details-pinned-recommendations", listItems: pinnedRecommendations.map((rec, index) => canLinkUnlink
|
|
240
|
-
? renderPinnedByCustomerRedhatterView(rec, index, 'pinned-recommendations')
|
|
241
|
-
: renderPinsByCustomer(rec, index, 'pinned-recommendations')), perPage: 5, className: "list-icons list-icons-flush", isFetching: !!isLoadingRecommendations, perPageOptions: [
|
|
242
|
-
{ title: '5', value: 5 },
|
|
243
|
-
{ title: '10', value: 10 },
|
|
244
|
-
] }))))),
|
|
245
222
|
topRecommendations.length > 0 && (React.createElement("div", { className: "card card-white card-support recommendations", ref: ref },
|
|
246
223
|
React.createElement("h3", { className: "card-heading" },
|
|
247
|
-
React.createElement(Trans, null, "
|
|
224
|
+
React.createElement(Trans, null, "Top recommendations")),
|
|
248
225
|
React.createElement("div", { className: "card-body" },
|
|
249
|
-
React.createElement(PaginatedList, { id: "case-details-top-recommendations", className: "list-icons list-icons-flush", listItems: topRecommendations
|
|
250
|
-
.filter((r) => !pinnedRecommendations.some((pr) => pr.resourceId === r.resourceId))
|
|
251
|
-
.map((rec, index) => renderTopRecommendations(rec, index, 'top-recommendations')), perPage: 5, isFetching: !!isLoadingRecommendations, perPageOptions: [
|
|
226
|
+
React.createElement(PaginatedList, { id: "case-details-top-recommendations", className: "list-icons list-icons-flush", listItems: topRecommendations.map((rec, index) => renderTopRecommendations(rec, index, 'top-recommendations')), perPage: 5, isFetching: !!isLoadingRecommendations, perPageOptions: [
|
|
252
227
|
{ title: '5', value: 5 },
|
|
253
228
|
{ title: '10', value: 10 },
|
|
254
|
-
] }))))
|
|
229
|
+
] })))),
|
|
230
|
+
(hasPin || hasLink) && (React.createElement(Accordion, { asDefinitionList: false, className: "card card-white case-details-aside-solutions" },
|
|
231
|
+
hasLink && (React.createElement(AccordionItem, null,
|
|
232
|
+
React.createElement(AccordionToggle, { id: "sol-handpicked", isExpanded: expanded === 'sol-handpicked', onClick: () => setExpandedSection('sol-handpicked') }, canLinkUnlink ? React.createElement(Trans, null, "Handpicked by you") : React.createElement(Trans, null, "Handpicked for you")),
|
|
233
|
+
React.createElement(AccordionContent, { isHidden: expanded !== 'sol-handpicked' },
|
|
234
|
+
React.createElement(PaginatedList, { id: "case-details-handpicked-recommendations", listItems: recommendations
|
|
235
|
+
.filter((r) => r.isLinked)
|
|
236
|
+
.map((rec, index) => canLinkUnlink
|
|
237
|
+
? renderHandPickedByRedHatter(rec, index, 'handpicked-recommendations')
|
|
238
|
+
: renderHandpickedCustomerView(rec, index, 'handpicked-recommendations')), perPage: 5, className: "list-icons list-icons-flush", isFetching: !!isLoadingRecommendations, perPageOptions: [
|
|
239
|
+
{ title: '5', value: 5 },
|
|
240
|
+
{ title: '10', value: 10 },
|
|
241
|
+
] })))),
|
|
242
|
+
hasPin && (React.createElement(AccordionItem, null,
|
|
243
|
+
React.createElement(AccordionToggle, { id: "sol-pinned", isExpanded: expanded === 'sol-pinned', onClick: () => setExpandedSection('sol-pinned') }, canLinkUnlink ? React.createElement(Trans, null, "Pinned by customer") : React.createElement(Trans, null, "Your pins")),
|
|
244
|
+
React.createElement(AccordionContent, { isHidden: expanded !== 'sol-pinned' },
|
|
245
|
+
React.createElement(PaginatedList, { id: "case-details-pinned-recommendations", listItems: recommendations
|
|
246
|
+
.filter((r) => r.isPinned)
|
|
247
|
+
.map((rec, index) => canLinkUnlink
|
|
248
|
+
? renderPinnedByCustomerRedhatterView(rec, index, 'pinned-recommendations')
|
|
249
|
+
: renderPinsByCustomer(rec, index, 'pinned-recommendations')), perPage: 5, className: "list-icons list-icons-flush", isFetching: !!isLoadingRecommendations, perPageOptions: [
|
|
250
|
+
{ title: '5', value: 5 },
|
|
251
|
+
{ title: '10', value: 10 },
|
|
252
|
+
] }))))))));
|
|
255
253
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ICaseResourceLink } from '@cee-eng/hydrajs/@types/api/public/case';
|
|
2
2
|
interface IProps {
|
|
3
3
|
showPin?: boolean;
|
|
4
|
-
isPinned?: boolean;
|
|
5
4
|
showLink?: boolean;
|
|
6
5
|
pinTitle: string;
|
|
7
6
|
index: number;
|
|
@@ -10,7 +9,7 @@ interface IProps {
|
|
|
10
9
|
onPinClicked: () => void;
|
|
11
10
|
type: string;
|
|
12
11
|
}
|
|
13
|
-
|
|
12
|
+
interface ICaseDetailAsideRecommendation extends Partial<ICaseResourceLink> {
|
|
14
13
|
isPinned?: boolean;
|
|
15
14
|
isLinked?: boolean;
|
|
16
15
|
solutionAbstract?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseSolutionsItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutionsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseSolutionsItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutionsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAQ5E,UAAU,MAAM;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,8BAA8B,CAAC;IAC/C,YAAY,EAAE,GAAG,CAAC;IAClB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,8BAA+B,SAAQ,OAAO,CAAC,iBAAiB,CAAC;IACvE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,eAwC9C"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Button } from '@patternfly/react-core';
|
|
2
2
|
import LinkIcon from '@patternfly/react-icons/dist/js/icons/link-icon';
|
|
3
|
-
import
|
|
4
|
-
import StarIcon from '@patternfly/react-icons/dist/js/icons/star-icon';
|
|
3
|
+
import ThumbTackIcon from '@patternfly/react-icons/dist/js/icons/thumb-tack-icon';
|
|
5
4
|
import { LoadingIndicator } from '@rh-support/components';
|
|
6
5
|
import { cleanupMarkDown, decodeMarkTag, truncate } from '@rh-support/utils';
|
|
7
6
|
import React from 'react';
|
|
@@ -9,11 +8,11 @@ export function CaseSolutionsItem(props) {
|
|
|
9
8
|
const maxTitleLength = 150;
|
|
10
9
|
const maxAbstractLength = 150;
|
|
11
10
|
const isLoading = !!props.isPinLoading[props.recommendation.resourceId];
|
|
12
|
-
return (React.createElement(
|
|
11
|
+
return (React.createElement(React.Fragment, null,
|
|
13
12
|
React.createElement("div", { className: "recommendation-header" },
|
|
14
13
|
React.createElement(Button, { title: props.pinTitle, onClick: props.onPinClicked, "data-tracking-id": `case-resource-${props.pinTitle}`, variant: "plain", className: "list-icon" },
|
|
15
14
|
isLoading && React.createElement(LoadingIndicator, { show: isLoading, size: "xs" }),
|
|
16
|
-
!isLoading && props.showPin &&
|
|
15
|
+
!isLoading && props.showPin && React.createElement(ThumbTackIcon, { className: "pinned-resource" }),
|
|
17
16
|
!isLoading && props.showLink && React.createElement(LinkIcon, null)),
|
|
18
17
|
React.createElement("a", { href: props.recommendation.resourceViewURI, "data-tracking-id": `case-resource-${props.type}-link-${props.index}`, target: "_blank", rel: "noopener noreferrer", dangerouslySetInnerHTML: {
|
|
19
18
|
__html: truncate(decodeMarkTag(props.recommendation.title || ''), maxTitleLength),
|
package/lib/esm/scss/_main.scss
CHANGED
|
@@ -824,40 +824,6 @@ div.support-grid-case-details.support-case {
|
|
|
824
824
|
border-bottom-color: #c9190b !important;
|
|
825
825
|
}
|
|
826
826
|
|
|
827
|
-
.case-type-section {
|
|
828
|
-
.case-type-category {
|
|
829
|
-
height: 75px;
|
|
830
|
-
padding: 0.5rem 1rem;
|
|
831
|
-
border: 1px solid #d9d9d9;
|
|
832
|
-
font-weight: 600;
|
|
833
|
-
line-height: 1.6;
|
|
834
|
-
background-color: var(--pf-global--palette--black-150);
|
|
835
|
-
color: var(--pf-global--primary-color--100);
|
|
836
|
-
word-break: break-word;
|
|
837
|
-
&.selected-case-type {
|
|
838
|
-
border-color: var(--pf-global--primary-color--100);
|
|
839
|
-
background-color: #e6e6e6;
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
&:hover,
|
|
843
|
-
&:focus {
|
|
844
|
-
border-color: var(--pf-global--primary-color--100);
|
|
845
|
-
background-color: #e6e6e6;
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
&:active {
|
|
849
|
-
border-color: var(--pf-global--primary-color--100);
|
|
850
|
-
}
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
.badge-item {
|
|
855
|
-
background-color: var(--pf-global--BackgroundColor--200);
|
|
856
|
-
padding: 0 8px 0 8px;
|
|
857
|
-
border-radius: 10px;
|
|
858
|
-
color: black;
|
|
859
|
-
}
|
|
860
|
-
|
|
861
827
|
.top-products p {
|
|
862
828
|
margin-bottom: 2rem;
|
|
863
829
|
font-size: 14px;
|
|
@@ -903,20 +869,15 @@ mark {
|
|
|
903
869
|
}
|
|
904
870
|
|
|
905
871
|
// pinning feature - can't be overly specific here
|
|
906
|
-
#case-details-handpicked-recommendations li {
|
|
907
|
-
padding: 0;
|
|
908
|
-
}
|
|
909
872
|
.recommendation-header {
|
|
910
873
|
font-size: 15px;
|
|
911
874
|
|
|
912
|
-
|
|
913
|
-
color: var(--pf-global--primary-color--100);
|
|
914
|
-
}
|
|
915
|
-
|
|
875
|
+
button:hover[title='Pin'],
|
|
916
876
|
button:hover[title='Link'] {
|
|
917
877
|
color: #6ca100;
|
|
918
878
|
}
|
|
919
879
|
|
|
880
|
+
button[title='Unpin'],
|
|
920
881
|
button[title='Unlink'] {
|
|
921
882
|
color: #6ca100;
|
|
922
883
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -134,5 +134,5 @@
|
|
|
134
134
|
"not ie <= 11",
|
|
135
135
|
"not op_mini all"
|
|
136
136
|
],
|
|
137
|
-
"gitHead": "
|
|
137
|
+
"gitHead": "184ccbf01006c0dc3732d8b8ad44656f4b5cad22"
|
|
138
138
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ICaseDetailAsideRecommendation } from './CaseSolutionsItem';
|
|
2
|
-
interface IProps {
|
|
3
|
-
pinTitle: string;
|
|
4
|
-
index: number;
|
|
5
|
-
recommendation: ICaseDetailAsideRecommendation;
|
|
6
|
-
isPinLoading: any;
|
|
7
|
-
onPinClicked: () => void;
|
|
8
|
-
type: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function HandpickedItem(props: IProps): JSX.Element;
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=HandpickedItem.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HandpickedItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/HandpickedItem.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AAErE,UAAU,MAAM;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,8BAA8B,CAAC;IAC/C,YAAY,EAAE,GAAG,CAAC;IAClB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,eA4B3C"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { cleanupMarkDown, decodeMarkTag, truncate } from '@rh-support/utils';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export function HandpickedItem(props) {
|
|
4
|
-
const maxAbstractLength = 150;
|
|
5
|
-
const maxTitleLength = 150;
|
|
6
|
-
return (React.createElement("div", { className: "pf-u-mx-sm" },
|
|
7
|
-
React.createElement("div", { className: "recommendation-header" },
|
|
8
|
-
React.createElement("a", { href: props.recommendation.resourceViewURI, "data-tracking-id": `case-resource-${props.type}-link-${props.index}`, target: "_blank", rel: "noopener noreferrer", dangerouslySetInnerHTML: {
|
|
9
|
-
__html: truncate(decodeMarkTag(props.recommendation.title || ''), maxTitleLength),
|
|
10
|
-
} })),
|
|
11
|
-
React.createElement("div", { className: "result-body", dangerouslySetInnerHTML: {
|
|
12
|
-
__html: truncate(cleanupMarkDown(decodeMarkTag(props.recommendation.solutionAbstract || '')), maxAbstractLength),
|
|
13
|
-
} })));
|
|
14
|
-
}
|