@salesforcedevs/dw-components 1.2.5-canary.0 → 1.2.5-canary.1

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.2.5-canary.0",
3
+ "version": "1.2.5-canary.1",
4
4
  "description": "Lightning web components for https://developer.salesforce.com",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -1,5 +1,6 @@
1
1
  import { LightningElement } from "lwc";
2
2
  import { track } from "dxUtils/analytics";
3
+ import type TbidAvatarButton from "dx/tbidAvatarButton";
3
4
 
4
5
  const DSC_BASE_URL = process.env.BASE_URL || "https://developer.salesforce.com";
5
6
 
@@ -45,14 +46,14 @@ export default class AvatarButton extends LightningElement {
45
46
  private isLoggedIn = false;
46
47
  private userInfo: UserInfo = {};
47
48
 
48
- private handleComponentLogoutClick = () => {
49
+ private handleComponentLogoutClick = (event: Event) => {
49
50
  this.trackLogoutClick();
50
- this.dispatchComponentLogout();
51
+ (this.template.querySelector('dx-tbid-avatar-button') as unknown as TbidAvatarButton).logout(event);
51
52
  };
52
53
 
53
- private handleComponentLoginClick = () => {
54
+ private handleComponentLoginClick = (event: Event) => {
54
55
  this.trackLoginClick();
55
- this.dispatchComponentLogin();
56
+ (this.template.querySelector('dx-tbid-avatar-button') as unknown as TbidAvatarButton).login(event);
56
57
  };
57
58
 
58
59
  private handleTbidLoginSuccess = (event: CustomEvent) => {
@@ -90,18 +91,6 @@ export default class AvatarButton extends LightningElement {
90
91
  }
91
92
  };
92
93
 
93
- private dispatchComponentLogin = () => {
94
- this.dispatchEvent(new CustomEvent('avatarbuttonloginclick', {
95
- bubbles: true,
96
- }));
97
- };
98
-
99
- private dispatchComponentLogout = () => {
100
- this.dispatchEvent(new CustomEvent('avatarbuttonlogoutclick', {
101
- bubbles: true,
102
- }));
103
- };
104
-
105
94
  private trackLoginClick = () => {
106
95
  track(document, "custEv_userLogin", {
107
96
  clickText: "Trailblazer.me",