@salesforcedevs/dx-components 1.3.53-alpha → 1.3.56-alpha.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.
Files changed (27) hide show
  1. package/package.json +5 -3
  2. package/src/assets/icons/salesforcebrand-sprite/svg/symbols.svg +7 -0
  3. package/src/modules/dx/banner/banner.ts +1 -1
  4. package/src/modules/dx/featuredContentHeader/featuredContentHeader.css +18 -10
  5. package/src/modules/dx/featuredContentHeader/featuredContentHeader.html +109 -107
  6. package/src/modules/dx/featuredContentHeader/featuredContentHeader.ts +16 -8
  7. package/src/modules/dx/footer/links.ts +6 -0
  8. package/src/modules/dx/formattedDateTime/formattedDateTime.ts +10 -4
  9. package/src/modules/dx/header/header.html +2 -2
  10. package/src/modules/dx/header/header.ts +4 -0
  11. package/src/modules/dx/headerSearch/headerSearch.html +0 -2
  12. package/src/modules/dx/headerSearch/headerSearch.ts +0 -1
  13. package/src/modules/dx/hr/hr.css +0 -1
  14. package/src/modules/dx/input/input.ts +0 -2
  15. package/src/modules/dx/searchResults/searchResults.css +2 -2
  16. package/src/modules/dx/sidebar/sidebar.ts +2 -0
  17. package/src/modules/dx/sidebarOld/sidebarOld.ts +2 -0
  18. package/src/modules/dx/sidebarSearch/sidebarSearch.html +0 -1
  19. package/src/modules/dx/sidebarSearch/sidebarSearch.ts +0 -1
  20. package/src/modules/dx/tbidAvatarButton/tbidAvatarButton.css +2 -2
  21. package/src/modules/dx/tbidAvatarButton/tbidAvatarButton.ts +3 -2
  22. package/src/modules/dx/toc/toc.ts +13 -0
  23. package/src/modules/dx/treeItem/treeItem.html +1 -0
  24. package/src/modules/dx/treeItem/treeItem.ts +8 -6
  25. package/src/modules/dx/typeBadge/typeBadge.ts +2 -2
  26. package/src/modules/dxBaseElements/headerBase/headerBase.ts +12 -2
  27. package/src/modules/dxHelpers/table/table.css +0 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dx-components",
3
- "version": "1.3.53-alpha",
3
+ "version": "1.3.56-alpha.1",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@coveo/headless": "^1.32.0",
14
- "@floating-ui/dom": "^0.5.3",
14
+ "@floating-ui/dom": "^1.0.4",
15
15
  "@sfdocs-internal/wires": "^0.6.3",
16
16
  "@vimeo/player": "^2.16.4",
17
17
  "classnames": "^2.2.6",
@@ -32,8 +32,10 @@
32
32
  "@types/lodash.defaults": "^4.2.7",
33
33
  "@types/lodash.get": "^4.4.6",
34
34
  "@types/lodash.kebabcase": "^4.1.7",
35
+ "@types/luxon": "^3.1.0",
35
36
  "@types/uuid": "^8.3.4",
36
37
  "@types/vimeo__player": "^2.16.2",
37
- "eventsourcemock": "^2.0.0"
38
+ "eventsourcemock": "^2.0.0",
39
+ "luxon": "^3.1.0"
38
40
  }
39
41
  }
@@ -1,5 +1,12 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <symbol id="crm-analytics" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
4
+ <path class="acls-1" d="M56 53h-4V9c0-1.1-.9-2-2-2H38c-1.1 0-2 .9-2 2v13H26c-1.1 0-2 .9-2 2v13H14c-1.1 0-2 .9-2 2v14H8c-1.1 0-2 .9-2 2s.9 2 2 2h48c1.1 0 2-.9 2-2s-.9-2-2-2z" fill="#032d60"/>
5
+ <path class="acls-1" fill="#032d60" d="M16 41h8v12h-8zM28 39V26h8v27h-8V39zM40 24V11h8v42h-8V24z"/>
6
+ <path class="acls-3" fill="#0d9dda" d="M16 41h8v12h-8z"/>
7
+ <path class="acls-2" fill="#fff" d="M36 26h-8v27h8V26z"/>
8
+ <path class="acls-3" fill="#0d9dda" d="M48 11h-8v42h8V11z"/>
9
+ </symbol>
3
10
  <symbol id="net-zero" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
4
11
  <path class="acls-1"
5
12
  d="M44.61 39H51a2 2 0 0 0 1.71-3l-19-31a2 2 0 0 0-3.42 0l-19 31A2 2 0 0 0 13 39h6.39L11.3 51.94a2 2 0 0 0-.05 2A2 2 0 0 0 13 55h17v3a2 2 0 0 0 4 0v-3h17a2 2 0 0 0 1.75-1 2 2 0 0 0 0-2zM34 51V37a2 2 0 0 0-4 0v14H16.61l8.09-12.94a2 2 0 0 0 .05-2A2 2 0 0 0 23 35h-6.43L32 9.83 47.43 35H41a2 2 0 0 0-1.75 1 2 2 0 0 0 0 2l8.14 13z"
@@ -3,7 +3,7 @@ import { setContainerInnerHtml } from "dxUtils/lwc";
3
3
 
4
4
  export default class Banner extends LightningElement {
5
5
  @api bannerMarkup =
6
- 'Thank you for visiting the Salesforce Developers website! <span><a href="https://forms.gle/oWYTbH9RvGyt9uxx7" target="blank">We value your feedback</a></span>';
6
+ '<span><a href="https://forms.gle/TdSyKFPHXoBx7seM9" target="blank">Share your feedback</a>about our new site.</span>';
7
7
 
8
8
  renderedCallback() {
9
9
  const container = this.template.querySelector(".info-container");
@@ -36,26 +36,34 @@
36
36
  --swoop-height: var(--dx-c-featured-content-header-swoop-height);
37
37
  --swoop-inset: calc(2.5 * var(--vertical-padding));
38
38
  --swoop-z-index: 11;
39
+ --label-color: var(--dx-g-indigo-vibrant-40);
39
40
 
40
41
  position: relative;
41
- padding: var(--dx-c-featured-content-header-padding-vertical)
42
- var(--dx-c-featured-content-header-padding-horizontal);
43
42
  background: var(
44
43
  --dx-c-featured-content-header-background-color,
45
44
  var(--dx-g-indigo-vibrant-90)
46
45
  );
47
46
  }
48
47
 
48
+ .container-layout {
49
+ padding: var(--dx-c-featured-content-header-padding-vertical)
50
+ var(--dx-c-featured-content-header-padding-horizontal);
51
+ background-image: var(--background-image);
52
+ background-repeat: no-repeat;
53
+ background-position: top right;
54
+ background-size: contain;
55
+ }
56
+
49
57
  /* LAYOUTS */
50
58
 
51
- .img-placement_inline {
59
+ .img-placement_inline .container-layout {
52
60
  display: grid;
53
61
  grid-template-areas: "label label" "main image";
54
62
  grid-template-columns: 50% auto;
55
63
  grid-gap: 0 80px;
56
64
  }
57
65
 
58
- .img-placement_below {
66
+ .img-placement_below .container-layout {
59
67
  --swoop-inset: calc(80px + 38vw);
60
68
 
61
69
  margin-bottom: calc(var(--dx-c-bottom-image-height) / 2);
@@ -278,6 +286,7 @@
278
286
  left: unset;
279
287
  width: 126px;
280
288
  height: 126px;
289
+ z-index: 1;
281
290
  }
282
291
 
283
292
  @media screen and (max-width: 1230px) {
@@ -356,7 +365,7 @@ a.image-container > img {
356
365
 
357
366
  .label {
358
367
  grid-area: label;
359
- color: var(--dx-g-indigo-vibrant-40);
368
+ color: var(--dx-c-featured-content-label-color, var(--label-color));
360
369
  padding-bottom: var(--dx-g-spacing-lg);
361
370
  }
362
371
 
@@ -380,7 +389,10 @@ dx-image-and-label {
380
389
  }
381
390
 
382
391
  /* DARK VARIANT */
392
+
383
393
  .variant_dark {
394
+ --label-color: rgb(190, 199, 246);
395
+
384
396
  background: var(
385
397
  --dx-c-featured-content-header-background-color,
386
398
  linear-gradient(-180deg, rgb(40, 23, 153) 0%, rgb(46, 43, 182) 100%)
@@ -391,10 +403,6 @@ dx-image-and-label {
391
403
  --dx-c-image-and-label-text-color: white;
392
404
  }
393
405
 
394
- .variant_dark .label {
395
- color: rgb(190, 199, 246);
396
- }
397
-
398
406
  .variant_dark .title,
399
407
  .variant_dark .body {
400
408
  color: white;
@@ -457,7 +465,7 @@ dx-image-and-label {
457
465
  --swoop-inset: 64px;
458
466
  }
459
467
 
460
- .img-placement_inline {
468
+ .img-placement_inline .container-layout {
461
469
  display: grid;
462
470
  grid-template-areas: "label" "image" "main";
463
471
  grid-template-columns: 100%;
@@ -1,117 +1,119 @@
1
1
  <template>
2
- <div class={classname} part="container">
3
- <template if:true={labelAsPrimaryHeading}>
4
- <h1 if:true={label} class="label dx-text-heading-4">{label}</h1>
5
- </template>
6
- <template if:false={labelAsPrimaryHeading}>
7
- <p if:true={label} class="label dx-text-heading-4">{label}</p>
8
- </template>
9
- <div class="featured-content-main-content">
10
- <template if:false={labelAsPrimaryHeading}>
11
- <h1 class="title dx-text-heading-2">
12
- <a
13
- class="title-link"
14
- if:true={href}
15
- href={href}
16
- target={target}
17
- onmouseenter={setLinkHovered}
18
- onmouseleave={setLinkInactive}
19
- >
20
- {title}
21
- </a>
22
- <template if:false={href}>{title}</template>
23
- </h1>
24
- </template>
2
+ <div class={classname} part="container" style={style}>
3
+ <div class="container-layout">
25
4
  <template if:true={labelAsPrimaryHeading}>
26
- <h2 class="title dx-text-heading-2">
27
- <a
28
- class="title-link"
29
- if:true={href}
30
- href={href}
31
- target={target}
32
- onmouseenter={setLinkHovered}
33
- onmouseleave={setLinkInactive}
34
- >
35
- {title}
36
- </a>
37
- <template if:false={href}>{title}</template>
38
- </h2>
5
+ <h1 if:true={label} class="label dx-text-heading-4">{label}</h1>
39
6
  </template>
40
- <div class="authors" if:true={authors}>
41
- <template for:each={authors} for:item="author">
42
- <dx-image-and-label
43
- key={author.key}
44
- img-src={author.imgSrc}
45
- img-size={author.imgSize}
46
- label={author.name}
47
- href={author.href}
48
- ></dx-image-and-label>
7
+ <template if:false={labelAsPrimaryHeading}>
8
+ <p if:true={label} class="label dx-text-heading-4">{label}</p>
9
+ </template>
10
+ <div class="featured-content-main-content">
11
+ <template if:false={labelAsPrimaryHeading}>
12
+ <h1 class="title dx-text-heading-2">
13
+ <a
14
+ class="title-link"
15
+ if:true={href}
16
+ href={href}
17
+ target={target}
18
+ onmouseenter={setLinkHovered}
19
+ onmouseleave={setLinkInactive}
20
+ >
21
+ {title}
22
+ </a>
23
+ <template if:false={href}>{title}</template>
24
+ </h1>
25
+ </template>
26
+ <template if:true={labelAsPrimaryHeading}>
27
+ <h2 class="title dx-text-heading-2">
28
+ <a
29
+ class="title-link"
30
+ if:true={href}
31
+ href={href}
32
+ target={target}
33
+ onmouseenter={setLinkHovered}
34
+ onmouseleave={setLinkInactive}
35
+ >
36
+ {title}
37
+ </a>
38
+ <template if:false={href}>{title}</template>
39
+ </h2>
49
40
  </template>
41
+ <div class="authors" if:true={authors}>
42
+ <template for:each={authors} for:item="author">
43
+ <dx-image-and-label
44
+ key={author.key}
45
+ img-src={author.imgSrc}
46
+ img-size={author.imgSize}
47
+ label={author.name}
48
+ href={author.href}
49
+ ></dx-image-and-label>
50
+ </template>
51
+ </div>
52
+ <span class="body dx-text-body-1">{body}</span>
53
+ <div class="slot-container">
54
+ <slot onslotchange={onSlotChange}></slot>
55
+ </div>
56
+ <div
57
+ class={backgroundImageClass}
58
+ if:true={hasBackgroundImage}
59
+ lwc:dom="manual"
60
+ ></div>
50
61
  </div>
51
- <span class="body dx-text-body-1">{body}</span>
52
- <div class="slot-container">
53
- <slot onslotchange={onSlotChange}></slot>
62
+ <div if:true={hasPlainImage} class="image-container">
63
+ <img src={imgSrc} alt={imgAlt} />
54
64
  </div>
55
- <div
56
- class={backgroundImageClass}
57
- if:true={hasBackgroundImage}
58
- lwc:dom="manual"
59
- ></div>
60
- </div>
61
- <div if:true={hasPlainImage} class="image-container">
62
- <img src={imgSrc} alt={imgAlt} />
63
- </div>
64
- <a
65
- if:true={hasLinkedImage}
66
- href={href}
67
- target={target}
68
- class="image-container"
69
- onmouseenter={setLinkHovered}
70
- onmouseleave={setLinkInactive}
71
- >
72
- <img src={imgSrc} alt={imgAlt} />
73
- </a>
74
- <template if:false={noSwoop}>
75
- <svg
76
- class="swoop-silhouette"
77
- width="1920px"
78
- height="331px"
79
- viewBox="0 0 1920 331"
80
- version="1.1"
81
- xmlns="http://www.w3.org/2000/svg"
82
- preserveAspectRatio="none"
65
+ <a
66
+ if:true={hasLinkedImage}
67
+ href={href}
68
+ target={target}
69
+ class="image-container"
70
+ onmouseenter={setLinkHovered}
71
+ onmouseleave={setLinkInactive}
83
72
  >
84
- <defs>
85
- <path
86
- d="M1920,330 L76.7313881,330.008182 C51.2800917,330.255837 25.7029624,330.372286 0,330.357528 L0,330 L76.7313881,330.008182 C789.975765,323.067922 1404.39864,213.086385 1920,0.0635708029 L1920,0.0635708029 L1920,330 Z"
87
- id="path-1"
88
- ></path>
89
- </defs>
90
- <g
91
- id="Documentation-landing-page"
92
- stroke="none"
93
- stroke-width="1"
94
- fill="none"
95
- fill-rule="evenodd"
73
+ <img src={imgSrc} alt={imgAlt} />
74
+ </a>
75
+ <template if:false={noSwoop}>
76
+ <svg
77
+ class="swoop-silhouette"
78
+ width="1920px"
79
+ height="331px"
80
+ viewBox="0 0 1920 331"
81
+ version="1.1"
82
+ xmlns="http://www.w3.org/2000/svg"
83
+ preserveAspectRatio="none"
96
84
  >
97
- <mask id="mask-2" fill="white">
98
- <use xlink:href="#path-1"></use>
99
- </mask>
100
- <use
101
- id="Combined-Shape"
102
- fill="#FFFFFF"
103
- xlink:href="#path-1"
104
- ></use>
105
- </g>
106
- </svg>
107
- </template>
108
- </div>
109
- <div class="blue-circle" if:true={hasIcon}>
110
- <dx-icon
111
- class="icon"
112
- size="2xlarge"
113
- symbol={icon}
114
- sprite="salesforcebrand"
115
- ></dx-icon>
85
+ <defs>
86
+ <path
87
+ d="M1920,330 L76.7313881,330.008182 C51.2800917,330.255837 25.7029624,330.372286 0,330.357528 L0,330 L76.7313881,330.008182 C789.975765,323.067922 1404.39864,213.086385 1920,0.0635708029 L1920,0.0635708029 L1920,330 Z"
88
+ id="path-1"
89
+ ></path>
90
+ </defs>
91
+ <g
92
+ id="Documentation-landing-page"
93
+ stroke="none"
94
+ stroke-width="1"
95
+ fill="none"
96
+ fill-rule="evenodd"
97
+ >
98
+ <mask id="mask-2" fill="white">
99
+ <use xlink:href="#path-1"></use>
100
+ </mask>
101
+ <use
102
+ id="Combined-Shape"
103
+ fill="#FFFFFF"
104
+ xlink:href="#path-1"
105
+ ></use>
106
+ </g>
107
+ </svg>
108
+ </template>
109
+ </div>
110
+ <div class="blue-circle" if:true={hasIcon}>
111
+ <dx-icon
112
+ class="icon"
113
+ size="2xlarge"
114
+ symbol={icon}
115
+ sprite="salesforcebrand"
116
+ ></dx-icon>
117
+ </div>
116
118
  </div>
117
119
  </template>
@@ -17,7 +17,8 @@ export default class FeaturedContentHeader extends LightningElement {
17
17
  @api href?: string;
18
18
  @api target?: string | null = null;
19
19
  @api title!: string;
20
- @api backgroundImg?:
20
+ @api backgroundImg?: string;
21
+ @api backgroundImgId?:
21
22
  | "trees"
22
23
  | "codey"
23
24
  | "blog"
@@ -58,7 +59,14 @@ export default class FeaturedContentHeader extends LightningElement {
58
59
  this.dark && "variant_dark",
59
60
  this.isLinkHovered && "link-hovered",
60
61
  !this.isSlotEmpty && "has-slotted",
61
- this.backgroundImg && `custom-bg-${this.backgroundImg}`
62
+ this.backgroundImgId && `custom-bg-${this.backgroundImgId}`
63
+ );
64
+ }
65
+
66
+ private get style() {
67
+ return cx(
68
+ this.backgroundImg &&
69
+ `--background-image: url(${this.backgroundImg});`
62
70
  );
63
71
  }
64
72
 
@@ -71,17 +79,17 @@ export default class FeaturedContentHeader extends LightningElement {
71
79
  }
72
80
 
73
81
  private get hasBackgroundImage() {
74
- return this.backgroundImg !== null;
82
+ return this.backgroundImgId !== null;
75
83
  }
76
84
 
77
85
  private get hasIcon(): boolean {
78
- return this.icon !== "" && this.backgroundImg === "big-moon";
86
+ return this.icon !== "" && this.backgroundImgId === "big-moon";
79
87
  }
80
88
 
81
89
  private get backgroundImageClass() {
82
90
  return cx(
83
91
  "bg-image-container",
84
- this.backgroundImg && `bg-${this.backgroundImg}`
92
+ this.backgroundImgId && `bg-${this.backgroundImgId}`
85
93
  );
86
94
  }
87
95
 
@@ -100,13 +108,13 @@ export default class FeaturedContentHeader extends LightningElement {
100
108
  renderedCallback(): void {
101
109
  // Setting the svgs with innerHTML prevents their IDs from being rewritten
102
110
  // which is necessary to preserve the svg masking and other effects
103
- if (this.backgroundImg && svgs[this.backgroundImg]) {
111
+ if (this.backgroundImgId && svgs[this.backgroundImgId]) {
104
112
  const bgSvg = this.template.querySelector(".bg-image-container");
105
113
  if (bgSvg) {
106
114
  // eslint-disable-next-line @lwc/lwc/no-inner-html
107
115
  bgSvg.innerHTML = `
108
- ${svgs[this.backgroundImg].desktop}
109
- ${svgs[this.backgroundImg].mobile}
116
+ ${svgs[this.backgroundImgId].desktop}
117
+ ${svgs[this.backgroundImgId].mobile}
110
118
  `;
111
119
  }
112
120
  }
@@ -206,5 +206,11 @@ export const socialLinks = [
206
206
  iconSymbol: "rss",
207
207
  iconSprite: "general",
208
208
  label: "RSS"
209
+ },
210
+ {
211
+ href: "https://www.instagram.com/salesforcedevs",
212
+ iconSymbol: "instagram",
213
+ iconSprite: "brand",
214
+ label: "Instagram"
209
215
  }
210
216
  ];
@@ -11,6 +11,8 @@ import {
11
11
  formattedDateYear
12
12
  } from "typings/custom";
13
13
 
14
+ import { DateTime } from "luxon";
15
+
14
16
  export default class FormattedDateTime extends LightningElement {
15
17
  @api weekday: formattedDateWeekday;
16
18
  @api year: formattedDateYear;
@@ -27,7 +29,11 @@ export default class FormattedDateTime extends LightningElement {
27
29
  return;
28
30
  }
29
31
 
30
- this._unformattedDate = new Date(value);
32
+ this._unformattedDate = DateTime.fromISO(value)
33
+ .plus({
34
+ hour: 1
35
+ })
36
+ .toJSDate();
31
37
 
32
38
  if (this._unformattedDate.toString() === "Invalid Date") {
33
39
  // this is a fix for Safari since it doesn't support date strings with 'yyyy/mm/dd' patterns
@@ -62,7 +68,7 @@ export default class FormattedDateTime extends LightningElement {
62
68
  }
63
69
 
64
70
  getOptions() {
65
- const options = {
71
+ return {
66
72
  weekday: this.weekday || undefined,
67
73
  year: this.year || undefined,
68
74
  month: this.month || undefined,
@@ -70,8 +76,8 @@ export default class FormattedDateTime extends LightningElement {
70
76
  hour: this.hour || undefined,
71
77
  minute: this.minute || undefined,
72
78
  second: this.second,
73
- timeZoneName: this.timeZoneName || undefined
79
+ timeZoneName: this.timeZoneName || undefined,
80
+ timeZone: "America/Los_Angeles"
74
81
  };
75
- return options;
76
82
  }
77
83
  }
@@ -3,7 +3,7 @@
3
3
  <header class={className}>
4
4
  <dx-skip-nav-link></dx-skip-nav-link>
5
5
  <dx-banner
6
- if:true={bannerMarkup}
6
+ if:true={showBanner}
7
7
  banner-markup={bannerMarkup}
8
8
  ></dx-banner>
9
9
  <div class="header_l1">
@@ -39,7 +39,7 @@
39
39
  </div>
40
40
  <div class="header_l2">
41
41
  <div class="header_l2_group header_l2_group-title">
42
- <a href="/" class="home-link">
42
+ <a href="/" class="home-link" if:true={isValidSubtitle}>
43
43
  <dx-icon
44
44
  class="brand-icon"
45
45
  if:true={isValidBrand}
@@ -14,4 +14,8 @@ export default class Header extends HeaderBase {
14
14
  protected mobileBreakpoint(): string {
15
15
  return "768px";
16
16
  }
17
+
18
+ get isValidSubtitle() {
19
+ return this.isValidBrand || this.subtitle;
20
+ }
17
21
  }
@@ -20,7 +20,6 @@
20
20
  onclear={onInputEscape}
21
21
  onsubmit={onInputSubmit}
22
22
  onfocus={openDropdown}
23
- onblur={onDropdownRequestClose}
24
23
  placeholder="Search"
25
24
  size="override"
26
25
  type="search"
@@ -52,7 +51,6 @@
52
51
  onclear={onInputEscape}
53
52
  onsubmit={onInputSubmit}
54
53
  onfocus={openDropdown}
55
- onblur={onDropdownRequestClose}
56
54
  placeholder="Search"
57
55
  shortcut-key="k"
58
56
  size="small"
@@ -69,7 +69,6 @@ export default class HeaderSearch extends LightningElement {
69
69
  switch (e.detail as PopoverRequestCloseType) {
70
70
  case "interact-outside":
71
71
  case "keypress-escape":
72
- case "input-blur":
73
72
  this.closeDropdown();
74
73
  break;
75
74
  default:
@@ -49,7 +49,6 @@ dx-button::before {
49
49
  content: "";
50
50
  border-bottom: 2px solid var(--dx-g-gray-95);
51
51
  flex: 1 1;
52
- transform: translateY(-2px); /* offset for display font ghost padding */
53
52
  margin: auto;
54
53
  margin-right: var(--dx-g-spacing-md);
55
54
  }
@@ -186,8 +186,6 @@ export default class Input extends LightningElement {
186
186
  if (this.validityOnBlur) {
187
187
  this.reportValidity();
188
188
  }
189
-
190
- this.dispatchEvent(new CustomEvent("blur", { detail: "input-blur" }));
191
189
  }
192
190
 
193
191
  onInputChange(e: InputEvent) {
@@ -197,8 +197,8 @@ li.coveo-dynamic-facet-breadcrumb-value-list-item {
197
197
 
198
198
  .CoveoSort.coveo-selected,
199
199
  .CoveoSort.coveo-selected:hover {
200
- color: var(--dx-g-blue-vibrant-50);
201
- border-bottom-color: var(--dx-g-blue-vibrant-50);
200
+ color: var(--dx-g-blue-vibrant-40);
201
+ border-bottom-color: var(--dx-g-blue-vibrant-40);
202
202
  }
203
203
 
204
204
  .CoveoBreadcrumb {
@@ -169,6 +169,8 @@ export default class Sidebar extends SidebarBase {
169
169
 
170
170
  private onSelect(event: CustomEvent) {
171
171
  this._value = event.detail.name;
172
+
173
+ this.dispatchEvent(new CustomEvent("sidebarclick"));
172
174
  }
173
175
 
174
176
  private onToggleClick(event: Event) {
@@ -95,6 +95,8 @@ export default class Sidebar extends SidebarBase {
95
95
 
96
96
  private onSelect(event: CustomEvent) {
97
97
  this._value = event.detail.name;
98
+
99
+ this.dispatchEvent(new CustomEvent("sidebarclick"));
98
100
  }
99
101
 
100
102
  private onToggleClick(event: Event) {
@@ -18,7 +18,6 @@
18
18
  value={value}
19
19
  onchange={onInputChange}
20
20
  onfocus={onInputFocus}
21
- onblur={onDropdownRequestClose}
22
21
  onclear={onInputClear}
23
22
  shortcut-key="j"
24
23
  clearable
@@ -422,7 +422,6 @@ export default class SidebarSearch extends LightningElement {
422
422
  switch (e.detail as PopoverRequestCloseType) {
423
423
  case "interact-outside":
424
424
  case "keypress-escape":
425
- case "input-blur":
426
425
  this.dropdownRequestedOpen = false;
427
426
  break;
428
427
  default:
@@ -1,10 +1,10 @@
1
1
  @import "dxHelpers/reset";
2
2
 
3
3
  :host {
4
- --dx-c-button-custom-color: var(--dx-g-blue-vibrant-50);
4
+ --dx-c-button-custom-color: var(--dx-g-blue-vibrant-40);
5
5
  --dx-c-button-custom-background: transparent;
6
6
  --dx-c-button-custom-border: 1px solid transparent;
7
- --dx-c-button-custom-color-hover: var(--dx-g-blue-vibrant-50);
7
+ --dx-c-button-custom-color-hover: var(--dx-g-blue-vibrant-40);
8
8
  --dx-c-button-custom-background-hover: var(--dx-g-cloud-blue-vibrant-90);
9
9
  --dx-c-button-custom-border-hover: var(--dx-g-cloud-blue-vibrant-90);
10
10
  --dx-c-slot-empty-width: max-content;
@@ -49,7 +49,7 @@ export default class TbidAvatarButton extends LightningElement {
49
49
  @api tbidApiBaseUrl = "";
50
50
 
51
51
  @api login = (event: Event) => this.handleComponentLogin(event);
52
- @api logout = () => this.handleComponentLogout();
52
+ @api logout = (event: Event) => this.handleComponentLogout(event);
53
53
 
54
54
  private userInfo: UserInfo = {};
55
55
  private isLoading = false;
@@ -242,7 +242,8 @@ export default class TbidAvatarButton extends LightningElement {
242
242
  private handleSsoLogout = this.handleLogout.bind(this, true);
243
243
 
244
244
  // This handles logout from _within_ this component ("Logout" click), rather than from SSO via the SFIDWidget.
245
- private handleComponentLogout = () => {
245
+ private handleComponentLogout = (event: Event) => {
246
+ event?.preventDefault();
246
247
  this.handleLogout(false);
247
248
  };
248
249
 
@@ -2,6 +2,7 @@ import { LightningElement, api, track } from "lwc";
2
2
  import cx from "classnames";
3
3
  import { ContentElement } from "typings/custom";
4
4
  import { toJson } from "dxUtils/normalizers";
5
+ import { track as sendGtm } from "dxUtils/analytics";
5
6
 
6
7
  export default class Toc extends LightningElement {
7
8
  @api title!: string;
@@ -65,10 +66,22 @@ export default class Toc extends LightningElement {
65
66
  private onClick(e: Event) {
66
67
  const target = e.currentTarget as HTMLElement;
67
68
  const id = target.getAttribute("contentid");
69
+ const text = target.getAttribute("data-text");
70
+ const href = target.getAttribute("href");
71
+
68
72
  this.dispatchEvent(
69
73
  new CustomEvent("selectedcontent", { detail: { name: id } })
70
74
  );
75
+
71
76
  this._value = id!;
77
+
78
+ sendGtm(e.currentTarget!, "custEv_tableOfContentsClick", {
79
+ clickText: text,
80
+ clickUrl: href,
81
+ elementType: "link",
82
+ locationOnPage: "table of contents",
83
+ itemTitle: this.title
84
+ });
72
85
  }
73
86
 
74
87
  private toggleShowContent() {
@@ -24,6 +24,7 @@
24
24
  key={child.key}
25
25
  tree-node={child}
26
26
  selected-key={selectedKey}
27
+ parent-name={treeNode.label}
27
28
  ></dx-tree-item>
28
29
  </template>
29
30
  </template>
@@ -1,7 +1,6 @@
1
1
  import { LightningElement, api } from "lwc";
2
2
  import { InternalTreeNode } from "typings/custom";
3
3
  import { track } from "dxUtils/analytics";
4
- import { SidebarGtmAction } from "typings/custom";
5
4
  import { isInViewport } from "dxUtils/browser";
6
5
 
7
6
  const DEFAULT_TARGET = "_self";
@@ -9,6 +8,7 @@ const DEFAULT_TARGET = "_self";
9
8
  export default class TreeItem extends LightningElement {
10
9
  @api selectedKey?: string;
11
10
  @api isRoot: boolean = false;
11
+ @api parentName?: string = "";
12
12
 
13
13
  @api
14
14
  public get treeNode() {
@@ -94,7 +94,7 @@ export default class TreeItem extends LightningElement {
94
94
  private onIconClick(event: CustomEvent): void {
95
95
  const isSelectAction = false;
96
96
  this.doExpand(isSelectAction);
97
- this.sendGtm(event, this.isExpanded ? "expand" : "collapse");
97
+ this.sendGtm(event);
98
98
  }
99
99
 
100
100
  private onLinkClick(event: Event): void {
@@ -107,7 +107,7 @@ export default class TreeItem extends LightningElement {
107
107
  this.doExpand(isSelectAction);
108
108
  }
109
109
 
110
- this.sendGtm(event, "click");
110
+ this.sendGtm(event);
111
111
  this.fireEvent("tileselected", { name: this._treeNode.name });
112
112
  }
113
113
 
@@ -137,10 +137,12 @@ export default class TreeItem extends LightningElement {
137
137
  this.isExpanded = value;
138
138
  }
139
139
 
140
- private sendGtm(event: Event, sideNavAction: SidebarGtmAction) {
141
- track(event.currentTarget!, "custEv_leftNavLinkClick", {
140
+ private sendGtm(event: Event) {
141
+ track(event.currentTarget!, "custEv_leftNavClick", {
142
+ navType: "left nav bar",
142
143
  clickText: this._treeNode.label,
143
- sideNavAction
144
+ clickUrl: this.href,
145
+ navItem: this.parentName
144
146
  });
145
147
  }
146
148
  }
@@ -149,8 +149,8 @@ export default class TypeBadge extends LightningElement {
149
149
  private get style(): string {
150
150
  if (this.dark) {
151
151
  return buildStyleColorVariables({
152
- background: `--dx-g-${this.variantColorScope}-${this.variant}-color`,
153
- color: `--dx-g-brand-default-color-background`
152
+ background: "--dx-g-purple-vibrant-40",
153
+ color: "--dx-g-brand-default-color-background"
154
154
  });
155
155
  }
156
156
  if (this.variantColorScope) {
@@ -1,7 +1,7 @@
1
1
  import { LightningElement, api } from "lwc";
2
2
  import cx from "classnames";
3
3
  import { Brand, OptionWithLink, OptionWithNested } from "typings/custom";
4
- import { toJson } from "dxUtils/normalizers";
4
+ import { toJson, normalizeBoolean } from "dxUtils/normalizers";
5
5
  import { track } from "dxUtils/analytics";
6
6
 
7
7
  const VALID_BRANDS = [
@@ -42,7 +42,7 @@ export abstract class HeaderBase extends LightningElement {
42
42
  @api title: string = "Salesforce";
43
43
  @api version?: string | null = null;
44
44
  @api bannerMarkup =
45
- 'Thank you for visiting the Salesforce Developers website! <span><a href="https://forms.gle/oWYTbH9RvGyt9uxx7" target="blank">We value your feedback</a></span>';
45
+ '<span><a href="https://forms.gle/oWYTbH9RvGyt9uxx7" target="blank">Share your feedback</a>about our new site.</span>';
46
46
 
47
47
  @api
48
48
  get navItems() {
@@ -61,6 +61,15 @@ export abstract class HeaderBase extends LightningElement {
61
61
  this._versions = toJson(value);
62
62
  }
63
63
 
64
+ @api
65
+ get showBanner() {
66
+ return this._showBanner && this.bannerMarkup;
67
+ }
68
+
69
+ set showBanner(value) {
70
+ this._showBanner = normalizeBoolean(value);
71
+ }
72
+
64
73
  private _navItems!: OptionWithNested[];
65
74
  private _versions!: OptionWithLink[];
66
75
  private matchMedia!: MediaQueryList;
@@ -69,6 +78,7 @@ export abstract class HeaderBase extends LightningElement {
69
78
  private showMobileNavMenu: boolean = false;
70
79
  private showNavScrollShadow: boolean = false;
71
80
  protected isSearchOpen: boolean = false;
81
+ private _showBanner?: boolean = false;
72
82
 
73
83
  get url() {
74
84
  return this.href ? new URL(this.href!) : window.location;
@@ -96,11 +96,6 @@ td :is(.li, p, .p, dd) {
96
96
  font-size: var(--table-cell-text-base);
97
97
  }
98
98
 
99
- td :is(ul) {
100
- font-size: var(--table-cell-text-base) !important;
101
- margin-left: 0 !important;
102
- }
103
-
104
99
  td doc-content-callout :is(.li, p, .p, dd) {
105
100
  /* Override/reset for callouts -- see https://gus.lightning.force.com/lightning/r/ADM_Work__c/a07EE0000081MGTYA2/view */
106
101
  font-size: var(--dx-g-text-base);