@coveo/quantic 3.37.3 → 3.37.4

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.
@@ -93,12 +93,21 @@ export default class QuanticResultHighlightedTextField extends LightningElement
93
93
  this.field
94
94
  );
95
95
  /** @type {HighlightKeyword[]} */
96
- const highlights = this.headless.ResultTemplatesHelpers.getResultProperty(
97
- this.result,
98
- `${this.field}Highlights`
99
- );
96
+ const proxiedHighlights =
97
+ this.headless.ResultTemplatesHelpers.getResultProperty(
98
+ this.result,
99
+ `${this.field}Highlights`
100
+ );
100
101
 
101
- if (highlights && this.headless?.HighlightUtils?.highlightString) {
102
+ if (proxiedHighlights && this.headless?.HighlightUtils?.highlightString) {
103
+ // Shallow-copy each highlight keyword into a plain object to avoid the Salesforce Locker Service proxy handling.
104
+ // Without this, every .offset / .length access inside highlightString triggers the proxy which is expensive at scale.
105
+ const highlights = Array.isArray(proxiedHighlights)
106
+ ? proxiedHighlights.map((h) => ({
107
+ offset: h.offset,
108
+ length: h.length,
109
+ }))
110
+ : proxiedHighlights;
102
111
  const openingDelimiter = '<b class="highlighted-field__highlight">';
103
112
  const closingDelimiter = '</b>';
104
113
  const highlightedValue = this.headless.HighlightUtils.highlightString({
@@ -74,4 +74,4 @@ fast-json-patch/module/duplex.mjs:
74
74
  *)
75
75
  */if(__exports!=exports)module.exports=exports;return module.exports});
76
76
 
77
- window.coveoQuanticVersion = '3.37.3';
77
+ window.coveoQuanticVersion = '3.37.4';
@@ -78,4 +78,4 @@ fast-json-patch/module/duplex.mjs:
78
78
  *)
79
79
  */if(__exports!=exports)module.exports=exports;return module.exports});
80
80
 
81
- window.coveoQuanticVersion = '3.37.3';
81
+ window.coveoQuanticVersion = '3.37.4';
@@ -75,4 +75,4 @@ fast-json-patch/module/duplex.mjs:
75
75
  *)
76
76
  */if(__exports!=exports)module.exports=exports;return module.exports});
77
77
 
78
- window.coveoQuanticVersion = '3.37.3';
78
+ window.coveoQuanticVersion = '3.37.4';
@@ -71,4 +71,4 @@ fast-json-patch/module/duplex.mjs:
71
71
  *)
72
72
  */if(__exports!=exports)module.exports=exports;return module.exports});
73
73
 
74
- window.coveoQuanticVersion = '3.37.3';
74
+ window.coveoQuanticVersion = '3.37.4';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coveo/quantic",
3
- "version": "3.37.3",
3
+ "version": "3.37.4",
4
4
  "description": "A Salesforce Lightning Web Component (LWC) library for building modern UIs interfacing with the Coveo platform",
5
5
  "author": "coveo.com",
6
6
  "homepage": "https://coveo.com",