@salesforcedevs/dx-components 0.56.1 → 0.56.2-example

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 (135) hide show
  1. package/lwc.config.json +18 -3
  2. package/package.json +18 -6
  3. package/src/assets/icons/salesforcebrand-sprite/svg/symbols.svg +492 -111
  4. package/src/assets/svg/big-moon.svg +1 -0
  5. package/src/assets/svg/blue-circle.svg +3 -0
  6. package/src/assets/svg/login-widget-bg.png +0 -0
  7. package/src/assets/svg/subscribe-background-left.svg +14 -0
  8. package/src/assets/svg/subscribe-background-right.svg +11 -0
  9. package/src/assets/svg/trial-left.svg +6 -0
  10. package/src/assets/svg/trial-right.svg +26 -0
  11. package/src/modules/dx/banner/banner (1).ts +12 -0
  12. package/src/modules/dx/banner/banner.ts +3 -5
  13. package/src/modules/dx/button/button.css +10 -9
  14. package/src/modules/dx/buttonToggle/buttonToggle.css +50 -0
  15. package/src/modules/dx/buttonToggle/buttonToggle.html +17 -0
  16. package/src/modules/dx/buttonToggle/buttonToggle.ts +75 -0
  17. package/src/modules/dx/cardCallout/cardCallout.ts +8 -4
  18. package/src/modules/dx/cardContent/cardContent.html +4 -1
  19. package/src/modules/dx/cardDocs/cardDocs.html +4 -1
  20. package/src/modules/dx/cardEvent/cardEvent.html +1 -2
  21. package/src/modules/dx/cardEvent/cardEvent.ts +1 -1
  22. package/src/modules/dx/cardExpanded/cardExpanded.html +1 -6
  23. package/src/modules/dx/cardExpanded/cardExpanded.ts +2 -2
  24. package/src/modules/dx/cardMinimal/cardMinimal.html +1 -6
  25. package/src/modules/dx/cardTrial/cardTrial.css +63 -4
  26. package/src/modules/dx/cardTrial/cardTrial.html +96 -12
  27. package/src/modules/dx/cardTrial/cardTrial.ts +70 -2
  28. package/src/modules/dx/cardTrialExpanded/cardTrialExpanded.css +149 -0
  29. package/src/modules/dx/cardTrialExpanded/cardTrialExpanded.html +85 -0
  30. package/src/modules/dx/cardTrialExpanded/cardTrialExpanded.ts +67 -0
  31. package/src/modules/dx/checkbox/checkbox.css +4 -0
  32. package/src/modules/dx/codeBlock/codeBlock.ts +5 -1
  33. package/src/modules/dx/dropdown/dropdown.html +5 -1
  34. package/src/modules/dx/dropdown/dropdown.ts +13 -3
  35. package/src/modules/dx/dropdownOption/dropdownOption.css +119 -1
  36. package/src/modules/dx/dropdownOption/dropdownOption.html +4 -0
  37. package/src/modules/dx/dropdownOption/dropdownOption.ts +20 -7
  38. package/src/modules/dx/feature/feature.ts +3 -3
  39. package/src/modules/dx/featuredContentHeader/featuredContentHeader.css +84 -18
  40. package/src/modules/dx/featuredContentHeader/featuredContentHeader.html +109 -99
  41. package/src/modules/dx/featuredContentHeader/featuredContentHeader.ts +27 -7
  42. package/src/modules/dx/featuresList/featuresList.css +1 -1
  43. package/src/modules/dx/filterMenu/filterMenu.css +26 -8
  44. package/src/modules/dx/filterMenu/filterMenu.html +24 -8
  45. package/src/modules/dx/filterMenu/filterMenu.ts +1 -0
  46. package/src/modules/dx/footer/footer.css +1 -1
  47. package/src/modules/dx/footer/footer.html +25 -20
  48. package/src/modules/dx/footer/footer.ts +19 -15
  49. package/src/modules/dx/footer/links.ts +115 -39
  50. package/src/modules/dx/formattedDateTime/formattedDateTime.ts +8 -3
  51. package/src/modules/dx/header/header.html +10 -3
  52. package/src/modules/dx/header/header.ts +4 -0
  53. package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.css +1 -0
  54. package/src/modules/dx/headerSearch/headerSearch.html +0 -1
  55. package/src/modules/dx/hr/hr.css +2 -4
  56. package/src/modules/dx/iconBadge/iconBadge.css +12 -0
  57. package/src/modules/dx/iconBadge/iconBadge.html +2 -7
  58. package/src/modules/dx/iconBadge/iconBadge.ts +15 -5
  59. package/src/modules/dx/imageAndLabel/imageAndLabel.css +0 -1
  60. package/src/modules/dx/input/input.css +17 -1
  61. package/src/modules/dx/input/input.html +5 -1
  62. package/src/modules/dx/input/input.ts +8 -0
  63. package/src/modules/dx/interactiveImage/interactiveImage.css +59 -0
  64. package/src/modules/dx/interactiveImage/interactiveImage.html +32 -0
  65. package/src/modules/dx/interactiveImage/interactiveImage.ts +71 -0
  66. package/src/modules/dx/logo/logo.css +0 -1
  67. package/src/modules/dx/logo/logo.ts +1 -1
  68. package/src/modules/dx/metadataBadge/metadataBadge.css +41 -0
  69. package/src/modules/dx/metadataBadge/metadataBadge.html +5 -0
  70. package/src/modules/dx/metadataBadge/metadataBadge.ts +24 -0
  71. package/src/modules/dx/modal/modal.css +40 -0
  72. package/src/modules/dx/modal/modal.html +10 -0
  73. package/src/modules/dx/modal/modal.ts +50 -0
  74. package/src/modules/dx/modalDrawer/modalDrawer.html +2 -2
  75. package/src/modules/dx/modalDrawer/modalDrawer.ts +7 -1
  76. package/src/modules/dx/pagination/pagination.css +1 -2
  77. package/src/modules/dx/popover/popover.css +28 -3
  78. package/src/modules/dx/popover/popover.html +1 -0
  79. package/src/modules/dx/popover/popover.ts +83 -44
  80. package/src/modules/dx/searchResults/coveo.css +18989 -0
  81. package/src/modules/dx/searchResults/searchResults.css +387 -0
  82. package/src/modules/dx/searchResults/searchResults.html +104 -0
  83. package/src/modules/dx/searchResults/searchResults.ts +187 -0
  84. package/src/modules/dx/section/section.css +10 -1
  85. package/src/modules/dx/section/section.ts +1 -1
  86. package/src/modules/dx/select/select.css +7 -3
  87. package/src/modules/dx/sidebar/sidebar.css +1 -145
  88. package/src/modules/dx/sidebar/sidebar.ts +2 -0
  89. package/src/modules/dx/sidebarOld/sidebarOld.css +1 -145
  90. package/src/modules/dx/sidebarOld/sidebarOld.ts +2 -0
  91. package/src/modules/dx/sidebarSearch/sidebarSearch.ts +23 -3
  92. package/src/modules/dx/sidebarSearchResult/sidebarSearchResult.css +1 -1
  93. package/src/modules/dx/tab/tab.css +0 -4
  94. package/src/modules/dx/tabPanel/tabPanel.css +20 -0
  95. package/src/modules/dx/tabPanel/tabPanel.html +13 -0
  96. package/src/modules/dx/tabPanel/tabPanel.ts +27 -0
  97. package/src/modules/dx/tabPanelItem/tabPanelItem.css +39 -0
  98. package/src/modules/dx/tabPanelItem/tabPanelItem.html +15 -0
  99. package/src/modules/dx/tabPanelItem/tabPanelItem.ts +39 -0
  100. package/src/modules/dx/tabPanelList/tabPanelList.css +35 -0
  101. package/src/modules/dx/tabPanelList/tabPanelList.html +47 -0
  102. package/src/modules/dx/tabPanelList/tabPanelList.ts +164 -0
  103. package/src/modules/dx/tabPanelList/uniqueId.ts +6 -0
  104. package/src/modules/dx/tbidAvatarButton/tbidAvatarButton.css +33 -0
  105. package/src/modules/dx/tbidAvatarButton/tbidAvatarButton.html +53 -0
  106. package/src/modules/dx/tbidAvatarButton/tbidAvatarButton.ts +440 -0
  107. package/src/modules/dx/toc/toc.css +1 -0
  108. package/src/modules/dx/toc/toc.ts +13 -0
  109. package/src/modules/dx/treeItem/treeItem.html +2 -0
  110. package/src/modules/dx/treeItem/treeItem.ts +8 -6
  111. package/src/modules/dx/treeTile/treeTile.css +18 -18
  112. package/src/modules/dx/treeTile/treeTile.html +5 -4
  113. package/src/modules/dx/treeTile/treeTile.ts +17 -3
  114. package/src/modules/dx/typeBadge/typeBadge.css +15 -56
  115. package/src/modules/dx/typeBadge/typeBadge.html +6 -0
  116. package/src/modules/dx/typeBadge/typeBadge.ts +149 -46
  117. package/src/modules/dxBaseElements/archiveCard/archiveCard.ts +2 -6
  118. package/src/modules/dxBaseElements/headerBase/headerBase.ts +11 -1
  119. package/src/modules/dxConstants/brands/brands.ts +14 -0
  120. package/src/modules/dxConstants/colors/colors.ts +14 -0
  121. package/src/modules/dxConstants/contentTypes/contentTypes.ts +10 -0
  122. package/src/modules/dxHelpers/card/card.css +1 -1
  123. package/src/modules/dxHelpers/commonHeader/commonHeader.css +4 -3
  124. package/src/modules/dxHelpers/commonSidebar/commonSidebar.css +145 -0
  125. package/src/modules/dxHelpers/{sidebar/sidebar.css → commonTreeItem/commonTreeItem.css} +0 -0
  126. package/src/modules/dxUtils/async/async.ts +45 -0
  127. package/src/modules/dxUtils/constants/constants.ts +0 -13
  128. package/src/modules/dxUtils/css/css.ts +10 -0
  129. package/src/modules/dxUtils/lwc/lwc.ts +9 -0
  130. package/src/modules/dxUtils/prismjs/prismjs.ts +347 -9
  131. package/src/modules/dxUtils/queryCoordinator/queryCoordinator.ts +37 -11
  132. package/LICENSE +0 -12
  133. package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.css +0 -12
  134. package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.html +0 -11
  135. package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.ts +0 -18
@@ -17,8 +17,17 @@ 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?: "trees" | "codey" | "blog" | "moon" | null = null;
20
+ @api backgroundImg?: string;
21
+ @api backgroundImgId?:
22
+ | "trees"
23
+ | "codey"
24
+ | "blog"
25
+ | "moon"
26
+ | "trial"
27
+ | "big-moon"
28
+ | null = null;
21
29
  @api noSwoop: boolean = false;
30
+ @api icon: string = "";
22
31
 
23
32
  private _authors?: Array<ImageAndLabel>;
24
33
  private isSlotEmpty: boolean = true;
@@ -50,7 +59,14 @@ export default class FeaturedContentHeader extends LightningElement {
50
59
  this.dark && "variant_dark",
51
60
  this.isLinkHovered && "link-hovered",
52
61
  !this.isSlotEmpty && "has-slotted",
53
- 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});`
54
70
  );
55
71
  }
56
72
 
@@ -63,13 +79,17 @@ export default class FeaturedContentHeader extends LightningElement {
63
79
  }
64
80
 
65
81
  private get hasBackgroundImage() {
66
- return this.backgroundImg !== null;
82
+ return this.backgroundImgId !== null;
83
+ }
84
+
85
+ private get hasIcon(): boolean {
86
+ return this.icon !== "" && this.backgroundImgId === "big-moon";
67
87
  }
68
88
 
69
89
  private get backgroundImageClass() {
70
90
  return cx(
71
91
  "bg-image-container",
72
- this.backgroundImg && `bg-${this.backgroundImg}`
92
+ this.backgroundImgId && `bg-${this.backgroundImgId}`
73
93
  );
74
94
  }
75
95
 
@@ -88,13 +108,13 @@ export default class FeaturedContentHeader extends LightningElement {
88
108
  renderedCallback(): void {
89
109
  // Setting the svgs with innerHTML prevents their IDs from being rewritten
90
110
  // which is necessary to preserve the svg masking and other effects
91
- if (this.backgroundImg && svgs[this.backgroundImg]) {
111
+ if (this.backgroundImgId && svgs[this.backgroundImgId]) {
92
112
  const bgSvg = this.template.querySelector(".bg-image-container");
93
113
  if (bgSvg) {
94
114
  // eslint-disable-next-line @lwc/lwc/no-inner-html
95
115
  bgSvg.innerHTML = `
96
- ${svgs[this.backgroundImg].desktop}
97
- ${svgs[this.backgroundImg].mobile}
116
+ ${svgs[this.backgroundImgId].desktop}
117
+ ${svgs[this.backgroundImgId].mobile}
98
118
  `;
99
119
  }
100
120
  }
@@ -20,5 +20,5 @@
20
20
  .icon {
21
21
  color: #3ba755;
22
22
  padding-right: var(--dx-g-spacing-md);
23
- padding-top: var(--dx-g-spacing-2xs);
23
+ padding-top: var(--dx-g-spacing-sm);
24
24
  }
@@ -39,6 +39,7 @@
39
39
 
40
40
  .title-group {
41
41
  display: flex;
42
+ justify-content: space-between;
42
43
  }
43
44
 
44
45
  .title-group-main {
@@ -59,7 +60,8 @@
59
60
  height: 100%;
60
61
  overflow-y: auto;
61
62
  margin-top: 12px;
62
- padding: 0 var(--horizontal-padding);
63
+ padding: 0 9px 0 var(--horizontal-padding);
64
+ scrollbar-gutter: stable;
63
65
  }
64
66
 
65
67
  dx-checkbox:not(:first-of-type) {
@@ -83,13 +85,9 @@ label {
83
85
  margin-top: 5px;
84
86
  }
85
87
 
86
- svg {
87
- background: transparent;
88
- stroke: var(--dx-g-blue-vibrant-50);
89
- }
90
-
91
88
  svg,
92
89
  .filter-menu-title {
90
+ background: transparent;
93
91
  cursor: pointer;
94
92
  -webkit-user-select: none; /* Safari 3.1+ */
95
93
  -moz-user-select: none; /* Firefox 2+ */
@@ -97,8 +95,12 @@ svg,
97
95
  user-select: none;
98
96
  }
99
97
 
100
- .year-svg {
101
- right: 50px;
98
+ .header-caret {
99
+ stroke: var(--dx-g-blue-vibrant-50);
100
+ }
101
+
102
+ .year-caret {
103
+ stroke: var(--dx-g-gray-50);
102
104
  }
103
105
 
104
106
  .checkbox-month,
@@ -118,3 +120,19 @@ svg,
118
120
  font-size: 14px;
119
121
  font-family: var(--dx-g-font-sans);
120
122
  }
123
+
124
+ @keyframes loading-dots {
125
+ 50% {
126
+ content: "(..\00a0)";
127
+ }
128
+
129
+ 100% {
130
+ content: "(...)";
131
+ }
132
+ }
133
+
134
+ .filters-dates-loading::after {
135
+ animation: loading-dots 1s linear infinite;
136
+ display: inline-block;
137
+ content: "(.\00a0\00a0)";
138
+ }
@@ -4,14 +4,14 @@
4
4
  <p class="filter-menu-title">{title}</p>
5
5
  <svg
6
6
  xmlns="http://www.w3.org/2000/svg"
7
- width="24"
8
- height="24"
7
+ width="28"
8
+ height="28"
9
9
  viewBox="0 0 24 24"
10
10
  fill="none"
11
11
  stroke-width="2"
12
12
  stroke-linecap="round"
13
13
  stroke-linejoin="round"
14
- class="feather feather-chevron-down"
14
+ class="feather feather-chevron-down header-caret"
15
15
  >
16
16
  <polyline points="6 9 12 15 18 9"></polyline>
17
17
  </svg>
@@ -43,8 +43,14 @@
43
43
  value={option}
44
44
  onchange={onChange}
45
45
  >
46
- {option.name}
47
- ({option.totalNumberOfPosts})
46
+ {option.name}&nbsp;
47
+ <span
48
+ if:true={filtersDatesLoading}
49
+ class="filters-dates-loading"
50
+ ></span>
51
+ <span if:false={filtersDatesLoading}>
52
+ ({option.totalNumberOfPosts})
53
+ </span>
48
54
  </dx-checkbox-native>
49
55
  <span onclick={dropdownToggle}>
50
56
  <svg
@@ -58,7 +64,7 @@
58
64
  stroke-linejoin="round"
59
65
  class="
60
66
  feather feather-chevron-down
61
- year-svg
67
+ year-caret
62
68
  "
63
69
  >
64
70
  <polyline
@@ -79,8 +85,18 @@
79
85
  value={month}
80
86
  onchange={onChange}
81
87
  >
82
- {month.id}
83
- ({month.numberOfPosts})
88
+ {month.id}&nbsp;
89
+ <span
90
+ if:true={filtersDatesLoading}
91
+ class="
92
+ filters-dates-loading
93
+ "
94
+ ></span>
95
+ <span
96
+ if:false={filtersDatesLoading}
97
+ >
98
+ ({month.numberOfPosts})
99
+ </span>
84
100
  </dx-checkbox-native>
85
101
  </li>
86
102
  </template>
@@ -10,6 +10,7 @@ export default class FilterMenu extends LightningElement {
10
10
  @api name: string = "";
11
11
  @api title: string = "Filter Menu";
12
12
  @api variant: string = "base";
13
+ @api filtersDatesLoading?: boolean;
13
14
 
14
15
  @api
15
16
  get options(): Option[] {
@@ -273,7 +273,7 @@ footer.signup-variant-no-signup {
273
273
  @media screen and (min-width: 1400px) {
274
274
  .content-container_top_large {
275
275
  /* takes into account the background assets' h:w ratio */
276
- height: 32vw;
276
+ height: 38vw;
277
277
  }
278
278
  }
279
279
 
@@ -30,10 +30,8 @@
30
30
  developer updates.
31
31
  </h2>
32
32
  <p class="dx-text-body-3">
33
- Yes, I would like to receive Salesforce Developers' updates
34
- as well as marketing communications regarding Salesforce
35
- products, services, and events. I can unsubscribe at any
36
- time.
33
+ Click "Subscribe" below to be directed to the Salesforce
34
+ developer communication sign up page.
37
35
  </p>
38
36
  <p class="dx-text-body-3">
39
37
  Salesforce values your privacy. To learn more, visit
@@ -103,17 +101,17 @@
103
101
  </dx-button>
104
102
  </dx-dropdown>
105
103
  <div class="general">
106
- <template for:each={generalLinks} for:item="general">
107
- <div class="footer-group" key={general.label}>
108
- <h2 class="subheading">{general.label}</h2>
109
- <template for:each={general.options} for:item="option">
104
+ <template for:each={generalLinks} for:item="item">
105
+ <div class="footer-group" key={item.id}>
106
+ <h2 class="subheading">{item.label}</h2>
107
+ <template for:each={item.options} for:item="option">
110
108
  <dx-footer-option
111
- key={option.label}
112
- general-label={general.label}
109
+ key={option.id}
110
+ general-label={item.label}
113
111
  label={option.label}
114
- href={option.href}
112
+ href={option.link.href}
115
113
  icon-symbol={option.iconSymbol}
116
- target={option.target}
114
+ target={option.link.target}
117
115
  ></dx-footer-option>
118
116
  </template>
119
117
  </div>
@@ -129,15 +127,22 @@
129
127
  </span>
130
128
  <div class="terms_links">
131
129
  <template for:each={termsLinks} for:item="term">
132
- <a href={term.href} key={term.label}>{term.label}</a>
130
+ <template if:true={term.onclick}>
131
+ <a
132
+ href={term.href}
133
+ key={term.label}
134
+ rel={term.rel}
135
+ onclick={term.onclick}
136
+ >
137
+ {term.label}
138
+ </a>
139
+ </template>
140
+ <template if:false={term.onclick}>
141
+ <a href={term.href} key={term.label} rel={term.rel}>
142
+ {term.label}
143
+ </a>
144
+ </template>
133
145
  </template>
134
- <a
135
- href="#"
136
- rel="nofollow"
137
- onclick={openOneTrustInfoDisplay}
138
- >
139
- Cookie Preferences
140
- </a>
141
146
  </div>
142
147
  </div>
143
148
  </div>
@@ -3,7 +3,7 @@ import cx from "classnames";
3
3
  import { FooterVariant, OptionWithLink } from "typings/custom";
4
4
  import { toJson } from "dxUtils/normalizers";
5
5
  import {
6
- generalLinks,
6
+ defaultGeneralLinks,
7
7
  termsLinks,
8
8
  socialLinks,
9
9
  privacyHref,
@@ -31,16 +31,26 @@ export default class Footer extends LightningElement {
31
31
  this._locales = toJson(value);
32
32
  }
33
33
 
34
+ @api
35
+ get generalLinks() {
36
+ return this._generalLinks;
37
+ }
38
+ set generalLinks(value) {
39
+ if (value) {
40
+ this._generalLinks = toJson(value);
41
+ }
42
+ }
43
+
44
+ private _generalLinks = defaultGeneralLinks;
34
45
  private _locales?: OptionWithLink[] | null = null;
35
- private termsLinks = termsLinks;
36
- private generalLinks = generalLinks;
37
- private socialLinks = socialLinks;
38
- private privacyHref = privacyHref;
39
- private intellectualHref = intellectualHref;
40
- private inputSubmitLabel = "Subscribe";
41
- private inputPlaceholder = "Email";
42
- private inputAriaLabel = "Email sign up for developer updates newsletter";
43
46
  private _variant: FooterVariant = "small-signup";
47
+ private inputAriaLabel = "Email sign up for developer updates newsletter";
48
+ private inputPlaceholder = "Email";
49
+ private inputSubmitLabel = "Subscribe";
50
+ private intellectualHref = intellectualHref;
51
+ private privacyHref = privacyHref;
52
+ private socialLinks = socialLinks;
53
+ private termsLinks = termsLinks;
44
54
 
45
55
  @api
46
56
  set variant(value: FooterVariant) {
@@ -108,12 +118,6 @@ export default class Footer extends LightningElement {
108
118
  );
109
119
  }
110
120
 
111
- private openOneTrustInfoDisplay = () => {
112
- if (window.OneTrust && window.OneTrust.ToggleInfoDisplay) {
113
- window.OneTrust.ToggleInfoDisplay();
114
- }
115
- };
116
-
117
121
  private isFooterVariant(value: string): value is FooterVariant {
118
122
  return [
119
123
  "no-signup",
@@ -1,83 +1,137 @@
1
- export const generalLinksRaw = [
1
+ import { OptionWithRequiredNested } from "typings/custom";
2
+
3
+ export const generalLinksRaw: OptionWithRequiredNested[] = [
2
4
  {
5
+ id: "Developer Centers",
3
6
  label: "Developer Centers",
4
7
  options: [
5
- { href: "https://devcenter.heroku.com/", label: "Heroku" },
6
- { href: "https://developer.mulesoft.com/", label: "MuleSoft" },
7
- { href: "https://www.tableau.com/developer", label: "Tableau" },
8
8
  {
9
- href: "https://developer.commercecloud.com/s/",
10
- label: "Commerce Cloud"
9
+ link: { href: "https://devcenter.heroku.com/" },
10
+ label: "Heroku",
11
+ id: "Heroku"
12
+ },
13
+ {
14
+ link: { href: "https://developer.mulesoft.com/" },
15
+ label: "MuleSoft",
16
+ id: "MuleSoft"
17
+ },
18
+ {
19
+ link: { href: "https://www.tableau.com/developer" },
20
+ label: "Tableau",
21
+ id: "Tableau"
22
+ },
23
+ {
24
+ link: { href: "https://developer.commercecloud.com/s/" },
25
+ label: "Commerce Cloud",
26
+ id: "Commerce Cloud"
11
27
  },
12
28
  {
13
- href: "https://www.lightningdesignsystem.com/",
14
- label: "Lightning Design System"
29
+ link: { href: "https://www.lightningdesignsystem.com/" },
30
+ label: "Lightning Design System",
31
+ id: "Lightning Design System"
15
32
  },
16
33
  {
17
- href: "https://metamind.readme.io/",
18
- label: "Einstein"
34
+ link: { href: "https://metamind.readme.io/" },
35
+ label: "Einstein",
36
+ id: "Einstein"
19
37
  },
20
- { href: "https://salesforce.quip.com/dev", label: "Quip" }
38
+ {
39
+ link: { href: "https://salesforce.quip.com/dev" },
40
+ label: "Quip",
41
+ id: "Quip"
42
+ }
21
43
  ]
22
44
  },
23
45
  {
46
+ id: "Popular Resources",
24
47
  label: "Popular Resources",
25
48
  options: [
26
- { href: "/docs", label: "Documentation" },
27
49
  {
28
- href: "/docs/component-library",
29
- label: "Component Library"
50
+ link: { href: "/docs" },
51
+ label: "Documentation",
52
+ id: "Documentation"
53
+ },
54
+ {
55
+ link: { href: "/docs/component-library" },
56
+ label: "Component Library",
57
+ id: "Component Library"
58
+ },
59
+ { link: { href: "/docs/apis" }, label: "APIs", id: "APIs" },
60
+ {
61
+ link: { href: "https://trailhead.salesforce.com/" },
62
+ label: "Trailhead",
63
+ id: "Trailhead"
30
64
  },
31
- { href: "/docs/apis", label: "APIs" },
32
- { href: "https://trailhead.salesforce.com/", label: "Trailhead" },
33
65
  {
34
- href: "/code-samples-and-sdks",
35
- label: "Code Samples and SDKs"
66
+ link: { href: "/code-samples-and-sdks" },
67
+ label: "Code Samples and SDKs",
68
+ id: "Code Samples and SDKs"
36
69
  },
37
- { href: "/podcast", label: "Podcasts" },
70
+ { link: { href: "/podcast" }, label: "Podcasts", id: "Podcasts" },
38
71
  {
39
- href: "https://appexchange.salesforce.com/",
40
- label: "AppExchange"
72
+ link: { href: "https://appexchange.salesforce.com/" },
73
+ label: "AppExchange",
74
+ id: "AppExchange"
41
75
  }
42
76
  ]
43
77
  },
44
78
  {
45
79
  label: "Community",
80
+ id: "Community",
46
81
  options: [
47
82
  {
48
- href: "https://trailhead.salesforce.com/trailblazer-community/feed",
49
- label: "Trailblazer Community"
83
+ link: {
84
+ href: "https://trailhead.salesforce.com/trailblazer-community/feed"
85
+ },
86
+ label: "Trailblazer Community",
87
+ id: "Trailblazer Community"
50
88
  },
51
89
  {
52
- href: "/forums#!/feedtype=RECENT&criteria=ALLQUESTIONS&",
53
- label: "Forums"
90
+ link: {
91
+ href: "/forums#!/feedtype=RECENT&criteria=ALLQUESTIONS&"
92
+ },
93
+ label: "Forums",
94
+ id: "Forums"
54
95
  },
55
- { href: "/events", label: "Events and Calendar" },
56
96
  {
57
- href: "https://go.appexchange.com/partnerprogram",
58
- label: "Partner Community"
97
+ link: { href: "/events" },
98
+ label: "Events and Calendar",
99
+ id: "Events and Calendar"
59
100
  },
60
- { href: "/blogs", label: "Blog" },
61
101
  {
62
- href: "https://admin.salesforce.com/",
63
- label: "Salesforce Admins"
102
+ link: { href: "https://go.appexchange.com/partnerprogram" },
103
+ label: "Partner Community",
104
+ id: "Partner Community"
64
105
  },
106
+ { link: { href: "/blogs" }, label: "Blog", id: "Blog" },
65
107
  {
66
- href: "https://architect.salesforce.com/",
67
- label: "Salesforce Architects"
108
+ link: { href: "https://admin.salesforce.com/" },
109
+ label: "Salesforce Admins",
110
+ id: "Salesforce Admins"
111
+ },
112
+ {
113
+ link: { href: "https://architect.salesforce.com/" },
114
+ label: "Salesforce Architects",
115
+ id: "Salesforce Architects"
68
116
  }
69
117
  ]
70
118
  }
71
119
  ];
72
120
 
73
- export const generalLinks = generalLinksRaw.map((section) => ({
121
+ export const defaultGeneralLinks = generalLinksRaw.map((section) => ({
74
122
  ...section,
75
123
  options: section.options.map((option) => {
76
- const external = option.href.startsWith("http");
124
+ if (!option.link) {
125
+ return option;
126
+ }
127
+ const external = option.link.href.startsWith("http");
77
128
  return {
78
129
  ...option,
79
- iconSymbol: external ? "new_window" : null,
80
- target: external ? "_blank" : null
130
+ link: {
131
+ ...option.link,
132
+ iconSymbol: external ? "new_window" : null,
133
+ target: external ? "_blank" : null
134
+ }
81
135
  };
82
136
  })
83
137
  }));
@@ -87,17 +141,33 @@ export const privacyHref = "https://www.salesforce.com/company/privacy/";
87
141
  export const intellectualHref =
88
142
  "https://www.salesforce.com/company/legal/intellectual/";
89
143
 
144
+ const openOneTrustInfoDisplay = () => {
145
+ if (window.OneTrust && window.OneTrust.ToggleInfoDisplay) {
146
+ window.OneTrust.ToggleInfoDisplay();
147
+ }
148
+ };
149
+
90
150
  export const termsLinks = [
91
151
  { href: privacyHref, label: "Privacy Statement" },
92
152
  {
93
- href: "https://trailblazer.me/resource/documents/documents/pdf/TermsOfUse_en_US.pdf",
153
+ href: "https://www.salesforce.com/company/program-agreement/",
94
154
  label: "Terms of Use"
95
155
  },
156
+ {
157
+ href: "https://www.salesforce.com/company/legal/",
158
+ label: "Legal"
159
+ },
96
160
  {
97
161
  href: "https://www.salesforce.com/company/privacy/full_privacy/#nav_info",
98
162
  label: "Use of Cookies"
99
163
  },
100
- { href: "https://trust.salesforce.com/en/", label: "Trust" }
164
+ { href: "https://trust.salesforce.com/en/", label: "Trust" },
165
+ {
166
+ href: "#",
167
+ rel: "nofollow",
168
+ label: "Cookie Preferences",
169
+ onclick: openOneTrustInfoDisplay
170
+ }
101
171
  ];
102
172
 
103
173
  export const socialLinks = [
@@ -136,5 +206,11 @@ export const socialLinks = [
136
206
  iconSymbol: "rss",
137
207
  iconSprite: "general",
138
208
  label: "RSS"
209
+ },
210
+ {
211
+ href: "https://www.instagram.com/salesforcedevs",
212
+ iconSymbol: "instagram",
213
+ iconSprite: "brand",
214
+ label: "Instagram"
139
215
  }
140
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,
@@ -72,6 +78,5 @@ export default class FormattedDateTime extends LightningElement {
72
78
  second: this.second,
73
79
  timeZoneName: this.timeZoneName || undefined
74
80
  };
75
- return options;
76
81
  }
77
82
  }
@@ -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">
@@ -19,14 +19,21 @@
19
19
  onstatechange={handleStateChange}
20
20
  ></dx-header-search>
21
21
  </div>
22
+ <div
23
+ if:true={showTbidLogin}
24
+ class="header-tbid-login"
25
+ onclick={closeMobileNavMenu}
26
+ >
27
+ <dw-tbid-login-menu></dw-tbid-login-menu>
28
+ </div>
22
29
  <div if:true={showSignup} class="header-login-signup">
23
30
  <dx-button
24
- aria-label="Sign Up For Salesforce Developer Edition"
31
+ aria-label="Browse Trials"
25
32
  size="small"
26
33
  href={signupLink}
27
34
  onclick={handleSignUpClick}
28
35
  >
29
- Sign Up
36
+ Browse Trials
30
37
  </dx-button>
31
38
  </div>
32
39
  </div>
@@ -1,6 +1,10 @@
1
1
  import { HeaderBase } from "dxBaseElements/headerBase";
2
2
 
3
3
  export default class Header extends HeaderBase {
4
+ private get showTbidLogin(): boolean {
5
+ return this.showSignup;
6
+ }
7
+
4
8
  private get showSignup(): boolean {
5
9
  return this.signupLink
6
10
  ? (this.mobile && !this.isSearchOpen) || !this.mobile
@@ -41,6 +41,7 @@
41
41
 
42
42
  .nav-menu.state-closed {
43
43
  opacity: 0;
44
+ visibility: hidden;
44
45
  transform: translateY(-16px);
45
46
  pointer-events: none;
46
47
  }