@salesforcedevs/dx-components 1.30.5 → 1.30.6

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.30.5",
3
+ "version": "1.30.6",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -43,6 +43,5 @@
43
43
  "eventsourcemock": "2.0.0",
44
44
  "luxon": "3.4.4",
45
45
  "msw": "^2.12.4"
46
- },
47
- "gitHead": "6d460367150b62b690d135f6b634adb7cb2b4479"
46
+ }
48
47
  }
@@ -150,7 +150,8 @@ function augmentWithNonMFEFooterFunctionality(FooterClass: typeof Footer) {
150
150
 
151
151
  private buildFooterConfigLookupTables(config: any[]) {
152
152
  config.forEach((item: any) => {
153
- this.configItemTitleToItemLookup.set(item.title, item);
153
+ // attr_title is preferable to title because it is not language-specific
154
+ this.configItemTitleToItemLookup.set(item.attr_title || item.title, item);
154
155
  if (item.menu_item_parent) {
155
156
  const parentId = parseInt(item.menu_item_parent, 10);
156
157
  const children =
@@ -189,10 +190,11 @@ function augmentWithNonMFEFooterFunctionality(FooterClass: typeof Footer) {
189
190
 
190
191
  this.socialLinks =
191
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
192
194
  const iconSymbol =
193
- child.title === "LinkedIn"
195
+ childTitle === "LinkedIn"
194
196
  ? "linked-in"
195
- : child.title.toLowerCase();
197
+ : childTitle.toLocaleLowerCase();
196
198
  const iconUrlHash =
197
199
  iconSymbol === "twitter"
198
200
  ? "#twitter-x"
@@ -291,10 +293,11 @@ function augmentWithNonMFEFooterFunctionality(FooterClass: typeof Footer) {
291
293
  rel: item.rel
292
294
  };
293
295
 
294
- if (item.title === "Cookie Preferences") {
296
+ const itemTitle: string = item.attr_title || item.title || ""; // attr_title is preferable to title because it is not language-specific
297
+ if (itemTitle === "Cookie Preferences") {
295
298
  link.href = "#";
296
299
  link.onclick = this.handleCookiePreferencesClick;
297
- } else if (item.title === "Your Privacy Choices") {
300
+ } else if (itemTitle === "Your Privacy Choices") {
298
301
  link.img = "https://developer.salesforce.com/ns-assets/privacyoptions.svg";
299
302
  }
300
303
 
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.