@rh-support/utils 2.1.27 → 2.1.30

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.
@@ -4,7 +4,7 @@ export function getRecommendationTitle(doc) {
4
4
  return !isEmpty(doc.publishedTitle) ? doc.publishedTitle : doc.allTitle;
5
5
  }
6
6
  export function getRecommendationAbstract(doc) {
7
- return !isEmpty(doc.publishedAbstract) ? doc.publishedAbstract : doc.abstract;
7
+ return !isEmpty(doc.snippet) ? doc.snippet : !isEmpty(doc.publishedAbstract) ? doc.publishedAbstract : doc.abstract;
8
8
  }
9
9
  export function computeRecommendationTitle(doc) {
10
10
  const title = getRecommendationTitle(doc);
@@ -18,7 +18,7 @@ export const computeRecommendationAbstract = (doc, truncateLen = 128) => {
18
18
  export function replaceHighlightingData(docs, highlighting) {
19
19
  return docs.map((doc) => {
20
20
  // highlight id is either uri or view_uri
21
- // when we are uploading a file before adding "Problem description" no highlighting doc is present hence passing an empty object
21
+ // when we are uploading a file before adding "Problem statement" no highlighting doc is present hence passing an empty object
22
22
  const highlightObj = highlighting
23
23
  ? highlighting[doc.resource_uri] || highlighting[doc.uri] || highlighting[doc.view_uri] || {}
24
24
  : {};
@@ -2,10 +2,10 @@ import cloneDeep from 'lodash/cloneDeep';
2
2
  export const documentKindToInclude = 'documentKind:("Solution" OR "Article" OR "Errata" OR "Vulnerability" OR "Cve" OR "LabInfo")';
3
3
  export const issuesDefaultParamsObj = {
4
4
  q: '*:*',
5
- fq: [documentKindToInclude, '-internalTags:helper_solution'],
5
+ fq: [documentKindToInclude, '-internalTags:helper_solution', 'snippet:*'],
6
6
  start: 0,
7
7
  rows: 10,
8
- fl: 'id, allTitle, publishedTitle, view_uri, resource_uri, uri, issue, lastModifiedDate, kcsState, kcsRateUp, kcsRateDown, documentKind, publishedAbstract, abstract, authorSSOName, tag',
8
+ fl: 'id, allTitle, publishedTitle, view_uri, resource_uri, uri, issue, lastModifiedDate, kcsState, kcsRateUp, kcsRateDown, documentKind, publishedAbstract, abstract, authorSSOName, tag, snippet',
9
9
  seQueryFields: false,
10
10
  hl: true,
11
11
  'hl.fl': 'abstract, publishedAbstract, issue',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/utils",
3
- "version": "2.1.27",
3
+ "version": "2.1.30",
4
4
  "description": "> TODO: description",
5
5
  "author": "Vikas Rathee <vrathee@redhat.com>",
6
6
  "license": "ISC",
@@ -41,7 +41,7 @@
41
41
  "prepublishOnly": "npm run build"
42
42
  },
43
43
  "peerDependencies": {
44
- "@cee-eng/hydrajs": "4.17.7",
44
+ "@cee-eng/hydrajs": "4.17.14",
45
45
  "@cee-eng/ui-toolkit": "1.1.8",
46
46
  "dompurify": "^2.2.6",
47
47
  "i18next": "^22.5.1",
@@ -55,7 +55,7 @@
55
55
  "solr-query-builder": "1.0.1"
56
56
  },
57
57
  "dependencies": {
58
- "@cee-eng/hydrajs": "4.17.7",
58
+ "@cee-eng/hydrajs": "4.17.14",
59
59
  "@cee-eng/ui-toolkit": "1.1.8",
60
60
  "@rh-support/types": "2.0.3",
61
61
  "dompurify": "^2.2.6",
@@ -93,5 +93,5 @@
93
93
  "defaults and supports es6-module",
94
94
  "maintained node versions"
95
95
  ],
96
- "gitHead": "9428a86e921565225fd6ab7ee4ad358e29de43b3"
96
+ "gitHead": "ef79afd4e7cc3dff0935e0913dfe9b38a20b0f17"
97
97
  }