@salesforcedevs/dx-components 1.31.1 → 1.31.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/dx-components",
3
- "version": "1.31.1",
3
+ "version": "1.31.2",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -44,5 +44,5 @@
44
44
  "luxon": "3.4.4",
45
45
  "msw": "^2.12.4"
46
46
  },
47
- "gitHead": "73c9a14554feb2263c9f17bd69eb22a89b4ff683"
47
+ "gitHead": "c9d5f51d2ff55d5879b966fdfe4d2c6b49870f67"
48
48
  }
@@ -8,7 +8,7 @@ class Footer extends LightningElement {
8
8
  private _variant: FooterVariant = "small-signup";
9
9
  private isSlotEmpty = true;
10
10
  private signupUrl =
11
- "https://www.salesforce.com/form/other/role-based-newsletter/?Developer=true";
11
+ "https://www.salesforce.com/company/newsletter-subscribe/?topics=Developer";
12
12
 
13
13
  @api
14
14
  mfeHomeHref: string = `/${window.location.host}`; // ugly hack: ideally this wouldn't be necessary, but the only way to remove the "See all ways to contact us" link from the footer MFE is to set this to a non-empty value other than "us"; and given the way that the footer works, the non-empty value needs to be something that can be appended to `/` and work correctly
@@ -151,7 +151,10 @@ function augmentWithNonMFEFooterFunctionality(FooterClass: typeof Footer) {
151
151
  private buildFooterConfigLookupTables(config: any[]) {
152
152
  config.forEach((item: any) => {
153
153
  // attr_title is preferable to title because it is not language-specific
154
- this.configItemTitleToItemLookup.set(item.attr_title || item.title, item);
154
+ this.configItemTitleToItemLookup.set(
155
+ item.attr_title || item.title,
156
+ item
157
+ );
155
158
  if (item.menu_item_parent) {
156
159
  const parentId = parseInt(item.menu_item_parent, 10);
157
160
  const children =
@@ -188,26 +191,26 @@ function augmentWithNonMFEFooterFunctionality(FooterClass: typeof Footer) {
188
191
  return;
189
192
  }
190
193
 
191
- this.socialLinks =
192
- socialLinksItems.map((child: any) => {
193
- const childTitle: string = child.attr_title || child.title || ""; // attr_title is preferable to title because it is not language-specific
194
- const iconSymbol =
195
- childTitle === "LinkedIn"
196
- ? "linked-in"
197
- : childTitle.toLocaleLowerCase();
198
- const iconUrlHash =
199
- iconSymbol === "twitter"
200
- ? "#twitter-x"
201
- : `#themed-${iconSymbol}`;
202
-
203
- return {
204
- href: child.url,
205
- iconSprite: "brand",
206
- iconURL: `${baseSocialIconUrl}${iconUrlHash}`,
207
- label: child.title,
208
- iconSymbol
209
- };
210
- });
194
+ this.socialLinks = socialLinksItems.map((child: any) => {
195
+ const childTitle: string =
196
+ child.attr_title || child.title || ""; // attr_title is preferable to title because it is not language-specific
197
+ const iconSymbol =
198
+ childTitle === "LinkedIn"
199
+ ? "linked-in"
200
+ : childTitle.toLocaleLowerCase();
201
+ const iconUrlHash =
202
+ iconSymbol === "twitter"
203
+ ? "#twitter-x"
204
+ : `#themed-${iconSymbol}`;
205
+
206
+ return {
207
+ href: child.url,
208
+ iconSprite: "brand",
209
+ iconURL: `${baseSocialIconUrl}${iconUrlHash}`,
210
+ label: child.title,
211
+ iconSymbol
212
+ };
213
+ });
211
214
  }
212
215
 
213
216
  private setGeneralLinks() {
@@ -234,10 +237,14 @@ function augmentWithNonMFEFooterFunctionality(FooterClass: typeof Footer) {
234
237
 
235
238
  const generalLinks: any[] = [];
236
239
  generalLinksHeadingsItems.forEach((item: any) => {
237
- const childrenItems = this.configItemParentToChildrenLookup.get(item.ID);
240
+ const childrenItems = this.configItemParentToChildrenLookup.get(
241
+ item.ID
242
+ );
238
243
 
239
244
  if (!childrenItems) {
240
- console.error(`General links children items not found for item with title "${item.title}"`);
245
+ console.error(
246
+ `General links children items not found for item with title "${item.title}"`
247
+ );
241
248
  return;
242
249
  }
243
250
 
@@ -260,16 +267,24 @@ function augmentWithNonMFEFooterFunctionality(FooterClass: typeof Footer) {
260
267
  }
261
268
 
262
269
  private setLegalFooter() {
263
- const copyrightNoticeItem = this.configItemTitleToItemLookup.get("All rights reserved");
270
+ const copyrightNoticeItem = this.configItemTitleToItemLookup.get(
271
+ "All rights reserved"
272
+ );
264
273
 
265
274
  if (!copyrightNoticeItem) {
266
- console.error("All rights reserved item not found in footer config");
275
+ console.error(
276
+ "All rights reserved item not found in footer config"
277
+ );
267
278
  return;
268
279
  }
269
280
 
270
281
  const { url, description } = copyrightNoticeItem;
271
- const copyrightNoticeInnerHtml = description.replace("{{All rights reserved}}", `<a href="${url}">All rights reserved</a>`);
272
- const copyrightNoticeEl = this.template.querySelector(".copyright-notice")!;
282
+ const copyrightNoticeInnerHtml = description.replace(
283
+ "{{All rights reserved}}",
284
+ `<a href="${url}">All rights reserved</a>`
285
+ );
286
+ const copyrightNoticeEl =
287
+ this.template.querySelector(".copyright-notice")!;
273
288
  copyrightNoticeEl.innerHTML = copyrightNoticeInnerHtml;
274
289
  const copyrightLink = copyrightNoticeEl.querySelector("a");
275
290
  if (copyrightLink) {
@@ -278,10 +293,14 @@ function augmentWithNonMFEFooterFunctionality(FooterClass: typeof Footer) {
278
293
  );
279
294
  }
280
295
 
281
- const legalLinksItems = this.configItemParentToChildrenLookup.get(copyrightNoticeItem.ID);
296
+ const legalLinksItems = this.configItemParentToChildrenLookup.get(
297
+ copyrightNoticeItem.ID
298
+ );
282
299
 
283
300
  if (!legalLinksItems) {
284
- console.error("Legal links children items not found in footer config");
301
+ console.error(
302
+ "Legal links children items not found in footer config"
303
+ );
285
304
  return;
286
305
  }
287
306
 
@@ -298,7 +317,8 @@ function augmentWithNonMFEFooterFunctionality(FooterClass: typeof Footer) {
298
317
  link.href = "#";
299
318
  link.onclick = this.handleCookiePreferencesClick;
300
319
  } else if (itemTitle === "Your Privacy Choices") {
301
- link.img = "https://developer.salesforce.com/ns-assets/privacyoptions.svg";
320
+ link.img =
321
+ "https://developer.salesforce.com/ns-assets/privacyoptions.svg";
302
322
  }
303
323
 
304
324
  return link;
@@ -306,7 +326,10 @@ function augmentWithNonMFEFooterFunctionality(FooterClass: typeof Footer) {
306
326
  }
307
327
 
308
328
  private openOneTrustInfoDisplay() {
309
- if ((window as any).OneTrust && (window as any).OneTrust.ToggleInfoDisplay) {
329
+ if (
330
+ (window as any).OneTrust &&
331
+ (window as any).OneTrust.ToggleInfoDisplay
332
+ ) {
310
333
  (window as any).OneTrust.ToggleInfoDisplay();
311
334
  }
312
335
  }