@salesforcedevs/dw-components 1.3.71 → 1.3.72-canary.2

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.72-canary.2",
4
4
  "description": "Lightning web components for https://developer.salesforce.com",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -23,6 +23,5 @@
23
23
  "@types/lodash.uniqby": "^4.7.7",
24
24
  "@types/setimmediate": "^1.0.2",
25
25
  "setimmediate": "^1.0.5"
26
- },
27
- "gitHead": "2189b873b414cccf79905cf0b1401db76abbd9d0"
26
+ }
28
27
  }
@@ -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
  });
package/LICENSE DELETED
@@ -1,12 +0,0 @@
1
- Copyright (c) 2020, Salesforce.com, Inc.
2
- All rights reserved.
3
-
4
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5
-
6
- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
-
8
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9
-
10
- * Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11
-
12
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.