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

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/LICENSE ADDED
@@ -0,0 +1,12 @@
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.
package/lwc.config.json CHANGED
@@ -4,7 +4,6 @@
4
4
  { "npm": "@salesforcedevs/dx-components" }
5
5
  ],
6
6
  "expose": [
7
- "dw/avatarButton",
8
7
  "dw/blogsGrid",
9
8
  "dw/cardBlogPostProvider",
10
9
  "dw/cardPodcastEpisodeProvider",
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.14",
4
4
  "description": "Lightning web components for https://developer.salesforce.com",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -21,5 +21,6 @@
21
21
  "@types/lodash.clonedeep": "^4.5.7",
22
22
  "@types/lodash.orderby": "^4.6.7",
23
23
  "@types/lodash.uniqby": "^4.7.7"
24
- }
24
+ },
25
+ "gitHead": "1a4776017fd922a02ccb0f7bda28af97ebec720f"
25
26
  }
@@ -121,6 +121,7 @@ button:active {
121
121
  }
122
122
 
123
123
  .filter-title {
124
+ color: var(--dx-g-text-heading-color);
124
125
  font-family: var(--dx-g-font-display);
125
126
  font-size: var(--dx-g-text-lg);
126
127
  }
@@ -225,7 +225,12 @@ export default class DeSignupForm extends LightningElement {
225
225
  const formData: SignupForm = {
226
226
  user: userData as UserData,
227
227
  eula: this.showLegalCheckbox ? checkboxes.values.eula : ACCEPTED,
228
- default_driver: DEFAULT_DRIVER
228
+ default_driver: DEFAULT_DRIVER,
229
+ InfoEmail__c: this.showLegalCheckbox
230
+ ? checkboxes.values.eula === ACCEPTED
231
+ ? "True"
232
+ : "False"
233
+ : "True"
229
234
  };
230
235
 
231
236
  return formData;
@@ -20,6 +20,7 @@ export type SignupForm = {
20
20
  user: UserData;
21
21
  eula: string;
22
22
  default_driver: string;
23
+ InfoEmail__c: "True" | "False";
23
24
  };
24
25
 
25
26
  type OrgStatus = "New" | "In Progress" | "Error";
@@ -49,30 +49,87 @@ export default {
49
49
  {
50
50
  id: "1",
51
51
  type: "Mobility Packages Checksum",
52
- version: "234_all",
52
+ version: "all",
53
53
  description: "RCG Mobility Packages SHA256 Checksums",
54
54
  link: "/mobility_packages_checksum.sha256"
55
55
  },
56
56
  {
57
57
  id: "2",
58
58
  type: "Modeler Installer",
59
- version: "234.00010.0.0",
60
- description: "Initial RCG Mobility Modeler Installer v234 release",
61
- link: "/Modeler/modeler-build-000010-2021-09-29T15-34/CGCloudModelerSetup.v234.10.0.zip"
59
+ version: "238.00003.0.0",
60
+ description: "RCG Mobility Modeler Installer v238 release",
61
+ link: "/Modeler/238/modeler-build-000003-2022-05-12T07-10/CGCloudModelerSetup.v238.3.0.zip"
62
62
  },
63
63
  {
64
64
  id: "3",
65
65
  type: "Modeler Update Package",
66
- version: "234.00010.0.0",
67
- description: "Initial RCG Mobility Modeler MUP v234 release",
68
- link: "/Modeler/modeler-build-000010-2021-09-29T15-34/MUP.v234.10.0.zip"
66
+ version: "238.00003.0.0",
67
+ description: "RCG Mobility Modeler MUP v238 release",
68
+ link: "/Modeler/238/modeler-build-000003-2022-05-12T07-10/MUP.v238.3.0.zip"
69
69
  },
70
70
  {
71
71
  id: "4",
72
72
  type: "Framework Update Package",
73
- version: "234.0003.00",
73
+ version: "238.0002.00",
74
+ description: "RCG Mobility Modeler FUP v238 release",
75
+ link: "/FUP/FUP-238.0002.00/FUP.238.0002.00.zip"
76
+ },
77
+ {
78
+ id: "5",
79
+ type: "Modeler Content Package",
80
+ version: "238.0003.00",
81
+ description: "RCG Modeler Content Package v238 release",
82
+ link: "/MCP/MCP-238.0003.00/MCP.238.0003.00.pack.zip"
83
+ },
84
+ {
85
+ id: "6",
86
+ type: "Modeler Installer",
87
+ version: "236.00019.0.0",
88
+ description: "RCG Mobility Modeler Installer v236 release",
89
+ link: "/Modeler/236/modeler-build-000019-2022-06-01T10-47/CGCloudModelerSetup.v236.19.0.zip"
90
+ },
91
+ {
92
+ id: "7",
93
+ type: "Modeler Update Package",
94
+ version: "236.00019.0.0",
95
+ description: "RCG Mobility Modeler MUP v236 release",
96
+ link: "/Modeler/236/modeler-build-000019-2022-06-01T10-47/MUP.v236.19.0.zip"
97
+ },
98
+ {
99
+ id: "8",
100
+ type: "Framework Update Package",
101
+ version: "236.0003.01",
102
+ description: "RCG Mobility Modeler FUP v236 release",
103
+ link: "/FUP/FUP-236.0003.01/FUP.236.0003.01.zip"
104
+ },
105
+ {
106
+ id: "9",
107
+ type: "Modeler Content Package",
108
+ version: "236.0005.00",
109
+ description:
110
+ "RCG Modeler Content Package v236 release. Note: MCP for 234 will be found in static resource of the 234 managed package",
111
+ link: "/MCP/MCP-236.0005.00/MCP.236.0005.00.pack.zip"
112
+ },
113
+ {
114
+ id: "10",
115
+ type: "Modeler Installer",
116
+ version: "234.00013.0.0",
117
+ description: "Initial RCG Mobility Modeler Installer v234 release",
118
+ link: "/Modeler/modeler-build-000013-2021-10-27T06-20/CGCloudModelerSetup.v234.13.0.zip"
119
+ },
120
+ {
121
+ id: "11",
122
+ type: "Modeler Update Package",
123
+ version: "234.00013.0.0",
124
+ description: "Initial RCG Mobility Modeler MUP v234 release",
125
+ link: "/Modeler/modeler-build-000013-2021-10-27T06-20/MUP.v234.13.0.zip"
126
+ },
127
+ {
128
+ id: "12",
129
+ type: "Framework Update Package",
130
+ version: "234.0004.00",
74
131
  description: "Initial RCG Mobility Modeler FUP v234 release",
75
- link: "/FUP/FUP-234.0003.00/FUP.234.0003.00.zip"
132
+ link: "/FUP/FUP-234.0004.00/FUP.234.0004.00.zip"
76
133
  }
77
134
  ]
78
135
  };
@@ -1,119 +0,0 @@
1
- :host {
2
- --dx-c-button-custom-color: var(--dx-g-blue-vibrant-50);
3
- --dx-c-button-custom-background: transparent;
4
- --dx-c-button-custom-border: 1px solid transparent;
5
- --dx-c-button-custom-color-hover: var(--dx-g-blue-vibrant-50);
6
- --dx-c-button-custom-background-hover: var(--dx-g-cloud-blue-vibrant-90);
7
- --dx-c-button-custom-border-hover: var(--dx-g-cloud-blue-vibrant-90);
8
- --dx-c-slot-empty-width: max-content;
9
- }
10
-
11
- .avatar {
12
- border-radius: 100%;
13
- border: 2px solid #0d9dda;
14
- }
15
-
16
- .avatar.avatar-medium {
17
- margin-bottom: 14px;
18
- width: var(--dx-g-spacing-2xl);
19
- }
20
-
21
- .login-container {
22
- padding: 16px;
23
- }
24
-
25
- .login-container.logged-in {
26
- padding-top: 68px;
27
- }
28
-
29
- .header-img {
30
- left: 0;
31
- position: absolute;
32
- top: 0;
33
- width: 100%;
34
- z-index: -1;
35
- }
36
-
37
- .heading {
38
- color: var(--dx-g-blue-vibrant-20);
39
- display: block;
40
- font-family: var(--dx-g-font-display);
41
- font-size: var(--dx-g-text-lg);
42
- line-height: 28px;
43
- }
44
-
45
- .sub-heading {
46
- color: var(--dx-g-blue-vibrant-20);
47
- display: block;
48
- font-family: var(--dx-g-font-sans);
49
- font-size: 12px;
50
- line-height: 18px;
51
- padding: 8px 0;
52
- }
53
-
54
- ul {
55
- list-style: none;
56
- margin: 0;
57
- padding: 0;
58
- }
59
-
60
- .login-list-item {
61
- padding-bottom: 10px;
62
- }
63
-
64
- .login-section ~ .login-section {
65
- border-top: 1px solid var(--dx-g-gray-90);
66
- margin-top: 12px;
67
- }
68
-
69
- .login-section-title {
70
- color: var(--dx-g-gray-30);
71
- display: inline-block;
72
- font-family: var(--dx-g-font-sans);
73
- font-size: 14px;
74
- line-height: 20px;
75
- padding: 20px 0 12px;
76
- }
77
-
78
- .login-link {
79
- color: var(--dx-g-blue-vibrant-20);
80
- display: block;
81
- }
82
-
83
- .login-link-label {
84
- display: inline-block;
85
- font-family: var(--dx-g-font-display);
86
- font-size: 16px;
87
- line-height: 24px;
88
- }
89
-
90
- .login-link-img {
91
- display: inline-block;
92
- height: 16px;
93
- margin-left: 6px;
94
- vertical-align: middle;
95
- }
96
-
97
- .login-link-icon {
98
- display: inline-block;
99
- margin-left: 6px;
100
- vertical-align: baseline;
101
- }
102
-
103
- .login-link-blurb {
104
- font-family: var(--dx-g-font-sans);
105
- font-size: 14px;
106
- line-height: 20px;
107
- padding-top: 4px;
108
- }
109
-
110
- .heading-links {
111
- color: var(--dx-g-gray-90);
112
- font-family: var(--dx-g-font-sans);
113
- font-size: 14px;
114
- line-height: 20px;
115
- }
116
-
117
- a.inline-link {
118
- color: var(--dx-g-blue-vibrant-50);
119
- }
@@ -1,150 +0,0 @@
1
- <template>
2
- <dx-tbid-avatar-button
3
- tbid-base-url={tbidBaseUrl}
4
- tbid-api-base-url={tbidApiBaseUrl}
5
- ontbiduserinfo={handleTbidUserInfo}
6
- ontbidloginsuccess={handleTbidLoginSuccess}
7
- ontbidlogoutsuccess={handleTbidLogoutSuccess}
8
- >
9
- <div slot="popover-content">
10
- <div if:true={isLoggedIn}>
11
- <div class="login-container logged-in">
12
- <img
13
- src="/assets/svg/login-widget-bg.png"
14
- class="header-img"
15
- />
16
- <img
17
- src={userInfo.avatarImgSrc}
18
- class="avatar avatar-medium"
19
- />
20
- <span class="heading">{userInfo.fullName}</span>
21
- <span class="sub-heading">{userInfo.username}</span>
22
- <div class="heading-links">
23
- <a
24
- href="#"
25
- onclick={handleComponentLogoutClick}
26
- class="inline-link"
27
- >
28
- Logout
29
- </a>
30
- </div>
31
- <div class="login-section">
32
- <span class="login-section-title">Trailblazer.me</span>
33
- <ul>
34
- <li class="login-list-item">
35
- <a href={settingsUrl} class="login-link" target="_blank" onclick={trackLoggedInMenuClick}>
36
- <span class="login-link-label">
37
- Settings
38
- </span>
39
- <dx-icon
40
- class="login-link-icon"
41
- symbol="new_window"
42
- size="xsmall"
43
- ></dx-icon>
44
- </a>
45
- </li>
46
- <li class="login-list-item">
47
- <a href={profileUrl} class="login-link" target="_blank" onclick={trackLoggedInMenuClick}>
48
- <span class="login-link-label">
49
- Profile
50
- </span>
51
- <dx-icon
52
- class="login-link-icon"
53
- symbol="new_window"
54
- size="xsmall"
55
- ></dx-icon>
56
- </a>
57
- </li>
58
- <li class="login-list-item">
59
- <a href="https://trailhead.salesforce.com/trailblazer-community/groups/0F93A000000DJbJSAW" class="login-link" target="_blank" onclick={trackLoggedInMenuClick}>
60
- <span class="login-link-label">
61
- Developer Community
62
- </span>
63
- <dx-icon
64
- class="login-link-icon"
65
- symbol="new_window"
66
- size="xsmall"
67
- ></dx-icon>
68
- </a>
69
- <div class="login-link-blurb">
70
- Collaborate, network, build connections
71
- and learn Salesforce development.
72
- </div>
73
- </li>
74
- </ul>
75
- </div>
76
- </div>
77
- </div>
78
- <div if:false={isLoggedIn}>
79
- <div class="login-container">
80
- <span class="heading">Login</span>
81
- <div class="login-section">
82
- <span class="login-section-title">Products</span>
83
- <ul>
84
- <li class="login-list-item">
85
- <a href="https://www.salesforce.com" class="login-link" target="_blank" onclick={trackLoginMenuClick}>
86
- <span class="login-link-label">
87
- Salesforce
88
- </span>
89
- <img
90
- class="login-link-img"
91
- src="/assets/svg/salesforce-cloud.svg"
92
- alt="Salesforce logo"
93
- />
94
- <dx-icon
95
- class="login-link-icon"
96
- symbol="new_window"
97
- size="xsmall"
98
- ></dx-icon>
99
- </a>
100
- </li>
101
- <li class="login-list-item">
102
- <a href={marketingCloudUrl} class="login-link" target="_blank" onclick={trackLoginMenuClick}>
103
- <span class="login-link-label">
104
- Marketing Cloud
105
- </span>
106
- <dx-icon
107
- class="login-link-icon"
108
- symbol="new_window"
109
- size="xsmall"
110
- ></dx-icon>
111
- </a>
112
- </li>
113
- </ul>
114
- </div>
115
- <div class="login-section">
116
- <span class="login-section-title">
117
- Salesforce Developers
118
- </span>
119
- <ul>
120
- <li class="login-list-item">
121
- <a href={loginUrl} class="login-link" onclick={handleComponentLoginClick}>
122
- <span class="login-link-label">
123
- Trailblazer.me
124
- </span>
125
- </a>
126
- <div class="login-link-blurb">
127
- Login into access a rich community of
128
- Salesforce Developers, get ideas, and find
129
- solutions.
130
- </div>
131
- </li>
132
- <li class="login-list-item">
133
- <a href="https://developer.salesforce.com/forums" class="login-link" target="_blank" onclick={trackLoginMenuClick}>
134
- <span class="login-link-label">
135
- Developer Forums
136
- </span>
137
- <dx-icon
138
- class="login-link-icon"
139
- symbol="new_window"
140
- size="xsmall"
141
- ></dx-icon>
142
- </a>
143
- </li>
144
- </ul>
145
- </div>
146
- </div>
147
- </div>
148
- </div>
149
- </dx-tbid-avatar-button>
150
- </template>
@@ -1,159 +0,0 @@
1
- import { LightningElement } from "lwc";
2
- import { track } from "dxUtils/analytics";
3
-
4
- const DSC_BASE_URL = process.env.BASE_URL || "https://developer.salesforce.com";
5
-
6
- interface UserInfo {
7
- avatarImgSrc?: string;
8
- company?: string;
9
- firstName?: string;
10
- id?: string;
11
- lastName?: string;
12
- orgId?: string;
13
- relationship?: string;
14
- role?: string;
15
- username?: string;
16
- fullName?: string;
17
- }
18
-
19
- const trackableUserInfo = new Set([
20
- "company",
21
- "id",
22
- "orgId",
23
- "relationship",
24
- "role"
25
- ]);
26
-
27
- export default class AvatarButton extends LightningElement {
28
- // URLs:
29
- // TODO: change these urls when the environment is correct
30
- private tbidBaseUrl = "https://dev1-trailblazer-identity.cs192.force.com";
31
- private tbidApiBaseUrl =
32
- "https://development.developer.salesforce.com/tbid";
33
- private settingsUrl = `${this.tbidBaseUrl}/settings`;
34
- private profileUrl = `${this.tbidBaseUrl}/id`;
35
- private logoutUrl = `${this.tbidApiBaseUrl}/logout`;
36
- private get marketingCloudUrl() {
37
- return `${DSC_BASE_URL}/developer-centers/marketing-cloud`;
38
- }
39
- private get loginUrl() {
40
- return `${this.tbidApiBaseUrl}/dologin?startURL=${encodeURIComponent(
41
- window.location.href
42
- )}`;
43
- }
44
-
45
- private isLoggedIn = false;
46
- private userInfo: UserInfo = {};
47
-
48
- private handleComponentLogoutClick = () => {
49
- this.trackLogoutClick();
50
- this.dispatchComponentLogout();
51
- };
52
-
53
- private handleComponentLoginClick = () => {
54
- this.trackLoginClick();
55
- this.dispatchComponentLogin();
56
- };
57
-
58
- private handleTbidLoginSuccess = (event: CustomEvent) => {
59
- event.stopPropagation();
60
- this.isLoggedIn = true;
61
-
62
- // Special tracking for this event only
63
- track(document, "custEv_userLogin", {
64
- authenticationMethod: "tbid",
65
- id: {
66
- tb: Object.entries(this.userInfo)
67
- .filter(([key]) => trackableUserInfo.has(key))
68
- .reduce(
69
- (infoToTrack, [key, value]) => ({
70
- ...infoToTrack,
71
- [key]: value
72
- }),
73
- {} as Record<string, string>
74
- )
75
- }
76
- });
77
- };
78
-
79
- private handleTbidLogoutSuccess = (event: CustomEvent) => {
80
- event.stopPropagation();
81
- this.isLoggedIn = false;
82
- this.userInfo = {};
83
- };
84
-
85
- private handleTbidUserInfo = (event: CustomEvent) => {
86
- event.stopPropagation();
87
- const { detail } = event;
88
- if (detail && detail.userInfo) {
89
- this.userInfo = detail.userInfo;
90
- }
91
- };
92
-
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
- private trackLoginClick = () => {
106
- track(document, "custEv_userLogin", {
107
- clickText: "Trailblazer.me",
108
- clickUrl: this.loginUrl,
109
- itemTitle: "TBID Login Link",
110
- elementType: "link"
111
- });
112
- };
113
-
114
- private trackLogoutClick = () => {
115
- track(document, "custEv_userLogout", {
116
- clickText: "Logout",
117
- clickUrl: this.logoutUrl,
118
- itemTitle: "TBID Logout Link",
119
- elementType: "link"
120
- });
121
- };
122
-
123
- // Shared utility for tracking link clicks.
124
- private trackMenuClick = (
125
- target: HTMLAnchorElement | null,
126
- eventName: string,
127
- navItemPrefix: string
128
- ) => {
129
- const trackingPayload: any = {
130
- nav_level: "utility",
131
- nav_type: "global",
132
- elementType: "link"
133
- };
134
-
135
- if (target) {
136
- trackingPayload.clickText = target.textContent?.trim() || "";
137
- trackingPayload.clickUrl = target.href;
138
- const [
139
- firstWord,
140
- ...remainingText
141
- ] = trackingPayload.clickText.split(" ");
142
- trackingPayload.nav_item = `${navItemPrefix}${firstWord.toLowerCase()}${remainingText.join()}`;
143
- }
144
-
145
- track(target || document, eventName, trackingPayload);
146
- };
147
-
148
- // Track link clicks on the "logged out" version of the dropdown.
149
- private trackLoginMenuClick = (event: Event) => {
150
- const target = event.currentTarget as HTMLAnchorElement | null;
151
- this.trackMenuClick(target, "custEv_userLogin", "login:salesforce:");
152
- };
153
-
154
- // Track link clicks on the "logged in" version of the dropdown.
155
- private trackLoggedInMenuClick = (event: Event) => {
156
- const target = event.currentTarget as HTMLAnchorElement | null;
157
- this.trackMenuClick(target, "custEv_loginMenuClick", "login:tbid:");
158
- };
159
- }