@salesforcedevs/dw-components 1.3.71 → 1.3.73

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/dw-components",
3
- "version": "1.3.71",
3
+ "version": "1.3.73",
4
4
  "description": "Lightning web components for https://developer.salesforce.com",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -24,5 +24,5 @@
24
24
  "@types/setimmediate": "^1.0.2",
25
25
  "setimmediate": "^1.0.5"
26
26
  },
27
- "gitHead": "2189b873b414cccf79905cf0b1401db76abbd9d0"
27
+ "gitHead": "5aa812c3b3e4991f9d9da7eb2a901d1cc44c15bd"
28
28
  }
@@ -1,4 +1,4 @@
1
- import { LightningElement } from "lwc";
1
+ import { api, LightningElement } from "lwc";
2
2
  import { track } from "dxUtils/analytics";
3
3
  import TbidAvatarButton from "dx/tbidAvatarButton";
4
4
 
@@ -28,13 +28,17 @@ const trackableUserInfo = new Set([
28
28
  // which this component uses.
29
29
  export default class TbidLoginMenu extends LightningElement {
30
30
  // URLs:
31
- private tbidBaseUrl = process.env.TBID_BASE_URL || "";
32
- private tbidApiBaseUrl = `${
33
- process.env.TBID_API_BASE_URL || "https://developer.salesforce.com"
34
- }/tbid`;
35
- private settingsUrl = `${this.tbidBaseUrl}/settings`;
36
- private profileUrl = `${this.tbidBaseUrl}/id`;
37
- private logoutUrl = `${this.tbidApiBaseUrl}/logout`;
31
+ @api tbidApiBaseUrl = "https://developer.salesforce.com/tbid";
32
+ @api tbidBaseUrl = "https://trailblazer.me";
33
+ private get settingsUrl() {
34
+ return `${this.tbidBaseUrl}/settings`;
35
+ }
36
+ private get profileUrl() {
37
+ return `${this.tbidBaseUrl}/id`;
38
+ }
39
+ private get logoutUrl() {
40
+ return `${this.tbidApiBaseUrl}/logout`;
41
+ }
38
42
  private get loginUrl() {
39
43
  return `${this.tbidApiBaseUrl}/dologin?startURL=${encodeURIComponent(
40
44
  window.location.href
@@ -46,16 +50,20 @@ export default class TbidLoginMenu extends LightningElement {
46
50
 
47
51
  private handleComponentLogoutClick = (event: Event) => {
48
52
  this.trackLogoutClick(event.currentTarget as HTMLAnchorElement);
49
- ((this.template.querySelector(
50
- "dx-tbid-avatar-button"
51
- ) as unknown) as TbidAvatarButton).logout(event);
53
+ (
54
+ this.template.querySelector(
55
+ "dx-tbid-avatar-button"
56
+ ) as unknown as TbidAvatarButton
57
+ ).logout(event);
52
58
  };
53
59
 
54
60
  private handleComponentLoginClick = (event: Event) => {
55
61
  this.trackLoginMenuClick(event);
56
- ((this.template.querySelector(
57
- "dx-tbid-avatar-button"
58
- ) as unknown) as TbidAvatarButton).login(event);
62
+ (
63
+ this.template.querySelector(
64
+ "dx-tbid-avatar-button"
65
+ ) as unknown as TbidAvatarButton
66
+ ).login(event);
59
67
  };
60
68
 
61
69
  private handleTbidLoginSuccess = (event: CustomEvent) => {
@@ -108,9 +116,9 @@ export default class TbidLoginMenu extends LightningElement {
108
116
  eventName: string
109
117
  ) => {
110
118
  track(target || document, eventName, {
111
- click_text: target.textContent?.trim() || "",
112
- click_url: target.href || "",
113
- element_title: target.textContent?.trim() || "",
119
+ click_text: target?.textContent?.trim() || "",
120
+ click_url: target?.href || "",
121
+ element_title: target?.textContent?.trim() || "",
114
122
  element_type: "link",
115
123
  content_category: "tbid"
116
124
  });