@salesforcedevs/dx-components 1.3.92-alpha-006-localstorage → 1.3.92-alpha-007-localstorage

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.3.92-alpha-006-localstorage",
3
+ "version": "1.3.92-alpha-007-localstorage",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -88,7 +88,7 @@ export default class SidebarSearch extends LightningElement {
88
88
  private _coveoAdvancedQueryConfig!: { [key: string]: any };
89
89
  private dropdownRequestedOpen: boolean = false;
90
90
  private recentSearches: Option[] = [];
91
- private unsubscribeFromResultList: Unsubscribe = () => { };
91
+ private unsubscribeFromResultList: Unsubscribe = () => {};
92
92
  private resultList: ResultList | null = null;
93
93
  private resultsPerPage: ResultsPerPage | null = null;
94
94
  private preloadedState?: SearchAppState;
@@ -247,7 +247,9 @@ export default class SidebarSearch extends LightningElement {
247
247
  };
248
248
 
249
249
  private syncAnalytics = () => {
250
- const storedResult = window.localStorage.getItem(RESULT_CLICK_LOCAL_STORAGE_KEY);
250
+ const storedResult = window.localStorage.getItem(
251
+ RESULT_CLICK_LOCAL_STORAGE_KEY
252
+ );
251
253
  if (storedResult) {
252
254
  const interactiveResult = buildInteractiveResult(this.engine!, {
253
255
  options: { result: JSON.parse(storedResult) }
@@ -256,7 +258,7 @@ export default class SidebarSearch extends LightningElement {
256
258
  interactiveResult.select();
257
259
  window.localStorage.removeItem(RESULT_CLICK_LOCAL_STORAGE_KEY);
258
260
  }
259
- }
261
+ };
260
262
 
261
263
  private onResultListChange = () => {
262
264
  if (!this.resultList) {
@@ -365,7 +367,10 @@ export default class SidebarSearch extends LightningElement {
365
367
  href,
366
368
  selected: isSelected,
367
369
  select: () =>
368
- window.localStorage.setItem(RESULT_CLICK_LOCAL_STORAGE_KEY, JSON.stringify(result)),
370
+ window.localStorage.setItem(
371
+ RESULT_CLICK_LOCAL_STORAGE_KEY,
372
+ JSON.stringify(result)
373
+ )
369
374
  };
370
375
  };
371
376
 
@@ -406,10 +411,10 @@ export default class SidebarSearch extends LightningElement {
406
411
  }
407
412
 
408
413
  private updateRecentSearches = () =>
409
- (this.recentSearches = UserRecentSearches.get().map((item: string) => ({
410
- id: item,
411
- label: item
412
- })));
414
+ (this.recentSearches = UserRecentSearches.get().map((item: string) => ({
415
+ id: item,
416
+ label: item
417
+ })));
413
418
 
414
419
  private dispatchSidebarSearchChange(searchTerm: string | undefined): void {
415
420
  this.dispatchEvent(
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <a class={className} onclick={onClick}>
2
+ <a class={className} href={href} onclick={onClick}>
3
3
  <span class="title search-text">
4
4
  <template for:each={titleChunks} for:item="chunk">
5
5
  <span class={chunk.class} key={chunk.id}>{chunk.value}</span>