@salesforcedevs/dx-components 1.40.6 → 1.40.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dx-components",
3
- "version": "1.40.6",
3
+ "version": "1.40.7",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -44,5 +44,5 @@
44
44
  "luxon": "3.4.4",
45
45
  "msw": "^2.12.4"
46
46
  },
47
- "gitHead": "4fd9e541d6670ba80769d42f64e0bf70e342a743"
47
+ "gitHead": "1df35017c1cc93551081329c96a37f42ed0780af"
48
48
  }
@@ -106,7 +106,7 @@
106
106
  {result.contentTypeLabel}
107
107
  </span>
108
108
  </div>
109
- <a href={result.url} class="dx-result-title">
109
+ <a href={result.href} class="dx-result-title">
110
110
  {result.title}
111
111
  </a>
112
112
  <p if:true={result.hasDate} class="dx-result-date">
@@ -8,6 +8,7 @@ import {
8
8
  decodeHtmlEntities,
9
9
  highlightedSnippetHtml,
10
10
  isSortOption,
11
+ resultHref,
11
12
  SORT_OPTIONS,
12
13
  type SearchResult,
13
14
  type SortOption
@@ -30,6 +31,8 @@ const SORT_LABELS: Record<SortOption, string> = {
30
31
  interface DisplayResult {
31
32
  key: string;
32
33
  url: string;
34
+ // Matched-section link; falls back to the page url.
35
+ href: string;
33
36
  title: string;
34
37
  description: string | null;
35
38
  hasDescription: boolean;
@@ -167,6 +170,7 @@ export default class SearchHybrid extends LightningElement {
167
170
  return {
168
171
  key: `${r.url}-${i}`,
169
172
  url: r.url,
173
+ href: resultHref(r),
170
174
  title: decodeHtmlEntities(r.title),
171
175
  description,
172
176
  hasDescription: description !== null,