@salesforcedevs/dx-components 0.10.1-alpha.44 → 0.10.1-alpha.48

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": "0.10.1-alpha.44",
3
+ "version": "0.10.1-alpha.48",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -1,6 +1,6 @@
1
1
  import cx from "classnames";
2
- import { track } from "dx/instrumentation";
3
- import { LightningElement, api } from "lwc";
2
+ import { track as trackAnalytics } from "dx/instrumentation";
3
+ import { LightningElement, api, track } from "lwc";
4
4
  import { Result } from "@coveo/headless";
5
5
  import { TreeNode, SidebarGtmAction } from "typings/custom";
6
6
  import { getSidebarSearchParams } from "utils/coveo";
@@ -47,6 +47,8 @@ export default class Sidebar extends LightningElement {
47
47
  private expanded: boolean = true;
48
48
  private _toggleHovered: boolean = false;
49
49
  private _value?: string = undefined;
50
+
51
+ @track
50
52
  private _trees!: Array<TreeNode>;
51
53
 
52
54
  private mobile: boolean = true;
@@ -134,7 +136,7 @@ export default class Sidebar extends LightningElement {
134
136
  const sideNavAction: SidebarGtmAction = this.expanded
135
137
  ? "expand"
136
138
  : "collapse";
137
- track(event.currentTarget!, "custEv_leftNavLinkClick", {
139
+ trackAnalytics(event.currentTarget!, "custEv_leftNavLinkClick", {
138
140
  sideNavAction,
139
141
  clickText: TOGGLE_BUTTON_LABEL
140
142
  });
@@ -229,7 +229,7 @@ export default class SidebarSearch extends LightningElement {
229
229
  if (this.value) {
230
230
  queryParams.set("q", this.value);
231
231
  }
232
- window.history.replaceState({}, "", `?${queryParams.toString()}`);
232
+ window.history.pushState({}, "", `?${queryParams.toString()}`);
233
233
  }
234
234
 
235
235
  private submitSearch = debounce(() => {