@salesforcedevs/dx-components 1.25.7-canary.0 → 1.27.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/LICENSE +12 -0
- package/package.json +4 -4
- package/src/modules/dx/footer/footer.css +159 -0
- package/src/modules/dx/footer/footer.html +99 -1
- package/src/modules/dx/footer/footer.ts +60 -5
- package/src/modules/dx/footer/links.ts +228 -0
- package/src/modules/dx/searchResults/searchResults.ts +0 -1
- package/src/modules/dx/footerMfe/footerMfe.html +0 -3
- package/src/modules/dx/footerMfe/footerMfe.ts +0 -24
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dx-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.27.2",
|
|
4
4
|
"description": "DX Lightning web components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"@types/uuid": "8.3.4",
|
|
42
42
|
"@types/vimeo__player": "2.18.3",
|
|
43
43
|
"eventsourcemock": "2.0.0",
|
|
44
|
-
"luxon": "3.4.4"
|
|
45
|
-
"msw": "^2.12.4"
|
|
44
|
+
"luxon": "3.4.4"
|
|
46
45
|
},
|
|
47
46
|
"volta": {
|
|
48
47
|
"node": "20.19.0",
|
|
49
48
|
"yarn": "1.22.19"
|
|
50
|
-
}
|
|
49
|
+
},
|
|
50
|
+
"gitHead": "4b8dda74b7cfa376e2c79b502c63209918778c8a"
|
|
51
51
|
}
|
|
@@ -48,6 +48,11 @@ footer.signup-variant-no-signup {
|
|
|
48
48
|
color: var(--dx-footer-themed-header-color);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
.term-icon {
|
|
52
|
+
width: 35px;
|
|
53
|
+
margin: 0 var(--dx-g-spacing-xs);
|
|
54
|
+
}
|
|
55
|
+
|
|
51
56
|
/* TOP */
|
|
52
57
|
|
|
53
58
|
.content-container_top {
|
|
@@ -155,6 +160,127 @@ footer.signup-variant-no-signup {
|
|
|
155
160
|
background-size: 101%;
|
|
156
161
|
}
|
|
157
162
|
|
|
163
|
+
/* MIDDLE */
|
|
164
|
+
|
|
165
|
+
.content-container_middle {
|
|
166
|
+
display: grid;
|
|
167
|
+
grid-gap: var(--dx-g-spacing-xl);
|
|
168
|
+
grid-template:
|
|
169
|
+
"logo general" auto
|
|
170
|
+
"socials general" max-content
|
|
171
|
+
"locales general" max-content / auto max-content;
|
|
172
|
+
background: var(--dx-footer-themed-background-color);
|
|
173
|
+
padding-top: var(--dx-g-spacing-4xl);
|
|
174
|
+
padding-bottom: var(--dx-g-spacing-3xl);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.logo {
|
|
178
|
+
grid-area: logo;
|
|
179
|
+
width: max-content;
|
|
180
|
+
height: var(--dx-g-spacing-4xl);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.logo > img {
|
|
184
|
+
height: 100%;
|
|
185
|
+
user-select: none;
|
|
186
|
+
-webkit-user-drag: none;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.general {
|
|
190
|
+
grid-area: general;
|
|
191
|
+
display: grid;
|
|
192
|
+
grid-template-columns: repeat(3, max-content);
|
|
193
|
+
grid-gap: var(--dx-g-spacing-4xl);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.locales {
|
|
197
|
+
grid-area: locales;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.socials {
|
|
201
|
+
grid-area: socials;
|
|
202
|
+
display: grid;
|
|
203
|
+
grid-template-columns: repeat(3, max-content);
|
|
204
|
+
grid-auto-rows: min-content;
|
|
205
|
+
grid-gap: var(--dx-g-spacing-sm);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.socials > a {
|
|
209
|
+
border-radius: 50%;
|
|
210
|
+
height: var(--dx-g-spacing-xl);
|
|
211
|
+
width: var(--dx-g-spacing-xl);
|
|
212
|
+
flex-shrink: 0;
|
|
213
|
+
display: flex;
|
|
214
|
+
justify-content: center;
|
|
215
|
+
align-items: center;
|
|
216
|
+
color: var(--dx-g-cloud-blue-vibrant-95);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.terms a {
|
|
220
|
+
color: var(--dx-g-blue-vibrant-70);
|
|
221
|
+
text-decoration: underline;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.terms > span,
|
|
225
|
+
.terms_links > a {
|
|
226
|
+
margin: var(--dx-g-spacing-sm) 0;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.terms > span > a {
|
|
230
|
+
display: inline;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.terms a:hover {
|
|
234
|
+
color: var(--dx-g-blue-vibrant-80);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.socials > a:hover {
|
|
238
|
+
background: var(--dx-g-blue-vibrant-80);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.socials > a > svg {
|
|
242
|
+
fill: var(--dx-footer-themed-svg-icon-color);
|
|
243
|
+
height: 100%;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/* BOTTOM */
|
|
247
|
+
.content-container_bottom {
|
|
248
|
+
display: flex;
|
|
249
|
+
background: var(--dx-footer-themed-terms-and-conditions-background-color);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.content-container_bottom a {
|
|
253
|
+
text-decoration: underline;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.terms {
|
|
257
|
+
width: 100%;
|
|
258
|
+
display: flex;
|
|
259
|
+
justify-content: center;
|
|
260
|
+
flex-wrap: wrap;
|
|
261
|
+
font-family: var(--dx-g-font-sans);
|
|
262
|
+
font-size: var(--dx-g-text-xs);
|
|
263
|
+
margin: var(--dx-g-spacing-md) 0;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.terms > span {
|
|
267
|
+
padding-right: var(--dx-g-spacing-lg);
|
|
268
|
+
color: white;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.terms > span > img {
|
|
272
|
+
margin-right: var(--dx-g-spacing-xs);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.terms_links {
|
|
276
|
+
display: flex;
|
|
277
|
+
flex-wrap: wrap;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.terms_links > *:not(:last-child) {
|
|
281
|
+
margin-right: var(--dx-g-spacing-lg);
|
|
282
|
+
}
|
|
283
|
+
|
|
158
284
|
@media screen and (min-width: 1400px) {
|
|
159
285
|
.content-container_top_large:not(.content-container_top_large_no_signup) {
|
|
160
286
|
/* takes into account the background assets' h:w ratio */
|
|
@@ -206,6 +332,30 @@ footer.signup-variant-no-signup {
|
|
|
206
332
|
width: 320px;
|
|
207
333
|
}
|
|
208
334
|
|
|
335
|
+
/* MIDDLE */
|
|
336
|
+
.content-container_middle {
|
|
337
|
+
grid-gap: var(--dx-g-spacing-lg);
|
|
338
|
+
padding-top: var(--dx-g-spacing-2xl);
|
|
339
|
+
padding-bottom: var(--dx-g-spacing-2xl);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.logo {
|
|
343
|
+
height: var(--dx-g-spacing-2xl);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.socials > a {
|
|
347
|
+
height: var(--dx-g-spacing-lg);
|
|
348
|
+
width: var(--dx-g-spacing-lg);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.socials > a > dx-icon {
|
|
352
|
+
--dx-c-icon-size: var(--dx-g-icon-size-xs);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.socials > a.github > dx-icon {
|
|
356
|
+
--dx-c-icon-size: var(--dx-g-spacing-lg);
|
|
357
|
+
}
|
|
358
|
+
|
|
209
359
|
.general {
|
|
210
360
|
grid-gap: var(--dx-g-spacing-xl);
|
|
211
361
|
}
|
|
@@ -266,6 +416,11 @@ footer.signup-variant-no-signup {
|
|
|
266
416
|
.subscription p {
|
|
267
417
|
width: 100%;
|
|
268
418
|
}
|
|
419
|
+
|
|
420
|
+
/* MIDDLE */
|
|
421
|
+
.content-container_middle {
|
|
422
|
+
display: none;
|
|
423
|
+
}
|
|
269
424
|
}
|
|
270
425
|
|
|
271
426
|
/* MOBILE - SMALL */
|
|
@@ -274,4 +429,8 @@ footer.signup-variant-no-signup {
|
|
|
274
429
|
.subscription dx-input {
|
|
275
430
|
width: 100%;
|
|
276
431
|
}
|
|
432
|
+
|
|
433
|
+
.term-icon {
|
|
434
|
+
margin-left: 0;
|
|
435
|
+
}
|
|
277
436
|
}
|
|
@@ -42,6 +42,104 @@
|
|
|
42
42
|
onslotchange={onSlotChange}
|
|
43
43
|
></slot>
|
|
44
44
|
</div>
|
|
45
|
-
<
|
|
45
|
+
<div
|
|
46
|
+
if:true={showContainerMiddle}
|
|
47
|
+
class="content-container content-container_middle"
|
|
48
|
+
>
|
|
49
|
+
<a class="logo" href="/">
|
|
50
|
+
<img
|
|
51
|
+
src="https://a.sfdcstatic.com/developer-website/prod/images/salesforce-logo-corporate.svg"
|
|
52
|
+
alt="Salesforce logo"
|
|
53
|
+
/>
|
|
54
|
+
</a>
|
|
55
|
+
<div class="socials">
|
|
56
|
+
<template for:each={socialLinks} for:item="link">
|
|
57
|
+
<a
|
|
58
|
+
aria-label={link.label}
|
|
59
|
+
href={link.href}
|
|
60
|
+
key={link.iconSymbol}
|
|
61
|
+
class={link.iconSymbol}
|
|
62
|
+
target="_blank"
|
|
63
|
+
rel="noopener"
|
|
64
|
+
>
|
|
65
|
+
<svg
|
|
66
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
67
|
+
part="svg"
|
|
68
|
+
aria-hidden="true"
|
|
69
|
+
>
|
|
70
|
+
<use xlink:href={link.iconURL}></use>
|
|
71
|
+
</svg>
|
|
72
|
+
</a>
|
|
73
|
+
</template>
|
|
74
|
+
</div>
|
|
75
|
+
<dx-dropdown
|
|
76
|
+
if:true={hasLocales}
|
|
77
|
+
class="locales"
|
|
78
|
+
options={locales}
|
|
79
|
+
value={locale}
|
|
80
|
+
onchange={onLocaleChange}
|
|
81
|
+
small
|
|
82
|
+
>
|
|
83
|
+
<dx-button
|
|
84
|
+
class="locales-selector"
|
|
85
|
+
icon-symbol="chevrondown"
|
|
86
|
+
aria-label="Select Locale"
|
|
87
|
+
>
|
|
88
|
+
{localeLabel}
|
|
89
|
+
</dx-button>
|
|
90
|
+
</dx-dropdown>
|
|
91
|
+
<div class="general">
|
|
92
|
+
<template for:each={generalLinks} for:item="item">
|
|
93
|
+
<div class="footer-group" key={item.id}>
|
|
94
|
+
<h2 class="subheading">{item.label}</h2>
|
|
95
|
+
<template for:each={item.options} for:item="option">
|
|
96
|
+
<dx-footer-option
|
|
97
|
+
key={option.id}
|
|
98
|
+
general-label={item.label}
|
|
99
|
+
label={option.label}
|
|
100
|
+
href={option.link.href}
|
|
101
|
+
target={option.link.target}
|
|
102
|
+
></dx-footer-option>
|
|
103
|
+
</template>
|
|
104
|
+
</div>
|
|
105
|
+
</template>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
<div class="content-container content-container_bottom">
|
|
109
|
+
<div class="terms">
|
|
110
|
+
<span>
|
|
111
|
+
© Copyright {currentYear} Salesforce, Inc.
|
|
112
|
+
<a href={intellectualHref}>All rights reserved.</a>
|
|
113
|
+
Various trademarks held by their respective
|
|
114
|
+
owners. Salesforce, Inc. Salesforce Tower, 415 Mission
|
|
115
|
+
Street, 3rd Floor, San Francisco, CA 94105, United States
|
|
116
|
+
</span>
|
|
117
|
+
<div class="terms_links">
|
|
118
|
+
<template for:each={termsLinks} for:item="term">
|
|
119
|
+
<template if:true={term.onclick}>
|
|
120
|
+
<a
|
|
121
|
+
href={term.href}
|
|
122
|
+
key={term.label}
|
|
123
|
+
rel={term.rel}
|
|
124
|
+
onclick={term.onclick}
|
|
125
|
+
>
|
|
126
|
+
{term.label}
|
|
127
|
+
</a>
|
|
128
|
+
</template>
|
|
129
|
+
<template if:false={term.onclick}>
|
|
130
|
+
<a href={term.href} key={term.label} rel={term.rel}>
|
|
131
|
+
<img
|
|
132
|
+
if:true={term.img}
|
|
133
|
+
class="term-icon"
|
|
134
|
+
src={term.img}
|
|
135
|
+
alt="Footer Term Icon"
|
|
136
|
+
/>
|
|
137
|
+
{term.label}
|
|
138
|
+
</a>
|
|
139
|
+
</template>
|
|
140
|
+
</template>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
46
144
|
</footer>
|
|
47
145
|
</template>
|
|
@@ -1,14 +1,48 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
2
|
import cx from "classnames";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
FooterVariant,
|
|
5
|
+
LightningSlotElement,
|
|
6
|
+
OptionWithLink
|
|
7
|
+
} from "typings/custom";
|
|
8
|
+
import { toJson } from "dxUtils/normalizers";
|
|
9
|
+
import {
|
|
10
|
+
defaultGeneralLinks,
|
|
11
|
+
termsLinks,
|
|
12
|
+
socialLinks,
|
|
13
|
+
intellectualHref
|
|
14
|
+
} from "./links";
|
|
4
15
|
import { track } from "dxUtils/analytics";
|
|
5
16
|
import { isSlotEmpty } from "dxUtils/slot";
|
|
6
17
|
|
|
7
18
|
export default class Footer extends LightningElement {
|
|
19
|
+
@api locale: string | null = null;
|
|
20
|
+
@api
|
|
21
|
+
get locales() {
|
|
22
|
+
return this._locales;
|
|
23
|
+
}
|
|
24
|
+
set locales(value: OptionWithLink[] | string | null) {
|
|
25
|
+
this._locales = toJson(value);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@api
|
|
29
|
+
get generalLinks() {
|
|
30
|
+
return this._generalLinks;
|
|
31
|
+
}
|
|
32
|
+
set generalLinks(value) {
|
|
33
|
+
if (value) {
|
|
34
|
+
this._generalLinks = toJson(value);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
private _generalLinks = defaultGeneralLinks;
|
|
39
|
+
private _locales: OptionWithLink[] | null = null;
|
|
8
40
|
private _variant: FooterVariant = "small-signup";
|
|
41
|
+
private intellectualHref = intellectualHref;
|
|
9
42
|
private isSlotEmpty = true;
|
|
10
|
-
private
|
|
11
|
-
|
|
43
|
+
private socialLinks = socialLinks;
|
|
44
|
+
private termsLinks = termsLinks;
|
|
45
|
+
private signupUrl = "https://www.salesforce.com/form/other/role-based-newsletter/?Developer=true";
|
|
12
46
|
|
|
13
47
|
@api
|
|
14
48
|
set variant(value: FooterVariant) {
|
|
@@ -24,8 +58,8 @@ export default class Footer extends LightningElement {
|
|
|
24
58
|
return this._variant;
|
|
25
59
|
}
|
|
26
60
|
|
|
27
|
-
get
|
|
28
|
-
return this.variant
|
|
61
|
+
get showContainerMiddle() {
|
|
62
|
+
return this.variant !== "terms-only";
|
|
29
63
|
}
|
|
30
64
|
|
|
31
65
|
get showLargeSignup() {
|
|
@@ -40,6 +74,21 @@ export default class Footer extends LightningElement {
|
|
|
40
74
|
return this.variant === "large-no-signup";
|
|
41
75
|
}
|
|
42
76
|
|
|
77
|
+
get hasLocales() {
|
|
78
|
+
return this.locale && this.locales;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
get localeLabel(): string | null {
|
|
82
|
+
let label = null;
|
|
83
|
+
if (this.locale && this.locales) {
|
|
84
|
+
const locale = (this.locales as OptionWithLink[]).find(
|
|
85
|
+
(l) => l.id === this.locale
|
|
86
|
+
);
|
|
87
|
+
label = locale ? locale.label : null;
|
|
88
|
+
}
|
|
89
|
+
return label;
|
|
90
|
+
}
|
|
91
|
+
|
|
43
92
|
get currentYear(): number {
|
|
44
93
|
const date = new Date();
|
|
45
94
|
return date.getFullYear();
|
|
@@ -64,6 +113,12 @@ export default class Footer extends LightningElement {
|
|
|
64
113
|
);
|
|
65
114
|
}
|
|
66
115
|
|
|
116
|
+
private onLocaleChange(e: CustomEvent) {
|
|
117
|
+
this.dispatchEvent(
|
|
118
|
+
new CustomEvent("localechange", { detail: e.detail })
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
67
122
|
private onSlotChange(e: LightningSlotElement): void {
|
|
68
123
|
this.isSlotEmpty = isSlotEmpty(e);
|
|
69
124
|
}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { OptionWithRequiredNested } from "typings/custom";
|
|
2
|
+
|
|
3
|
+
export const generalLinksRaw: OptionWithRequiredNested[] = [
|
|
4
|
+
{
|
|
5
|
+
id: "Developer Centers",
|
|
6
|
+
label: "Developer Centers",
|
|
7
|
+
options: [
|
|
8
|
+
{
|
|
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: "/developer-centers/commerce-cloud" },
|
|
25
|
+
label: "Commerce Cloud",
|
|
26
|
+
id: "Commerce Cloud"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
link: { href: "https://www.lightningdesignsystem.com/" },
|
|
30
|
+
label: "Lightning Design System",
|
|
31
|
+
id: "Lightning Design System"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
link: {
|
|
35
|
+
href: "/developer-centers/einstein-1-studio"
|
|
36
|
+
},
|
|
37
|
+
label: "Einstein",
|
|
38
|
+
id: "Einstein"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
link: { href: "https://salesforce.quip.com/dev" },
|
|
42
|
+
label: "Quip",
|
|
43
|
+
id: "Quip"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: "Popular Resources",
|
|
49
|
+
label: "Popular Resources",
|
|
50
|
+
options: [
|
|
51
|
+
{
|
|
52
|
+
link: { href: "/docs" },
|
|
53
|
+
label: "Documentation",
|
|
54
|
+
id: "Documentation"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
link: { href: "/docs/component-library" },
|
|
58
|
+
label: "Component Library",
|
|
59
|
+
id: "Component Library"
|
|
60
|
+
},
|
|
61
|
+
{ link: { href: "/docs/apis" }, label: "APIs", id: "APIs" },
|
|
62
|
+
{
|
|
63
|
+
link: { href: "https://trailhead.salesforce.com/" },
|
|
64
|
+
label: "Trailhead",
|
|
65
|
+
id: "Trailhead"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
link: { href: "/sample-apps" },
|
|
69
|
+
label: "Sample Apps",
|
|
70
|
+
id: "Sample Apps"
|
|
71
|
+
},
|
|
72
|
+
{ link: { href: "/podcast" }, label: "Podcasts", id: "Podcasts" },
|
|
73
|
+
{
|
|
74
|
+
link: { href: "https://appexchange.salesforce.com/" },
|
|
75
|
+
label: "AppExchange",
|
|
76
|
+
id: "AppExchange"
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
label: "Community",
|
|
82
|
+
id: "Community",
|
|
83
|
+
options: [
|
|
84
|
+
{
|
|
85
|
+
link: {
|
|
86
|
+
href: "https://trailhead.salesforce.com/trailblazer-community/feed"
|
|
87
|
+
},
|
|
88
|
+
label: "Trailblazer Community",
|
|
89
|
+
id: "Trailblazer Community"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
link: { href: "/events" },
|
|
93
|
+
label: "Events and Calendar",
|
|
94
|
+
id: "Events and Calendar"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
link: {
|
|
98
|
+
href: "https://www.salesforce.com/partners/become-a-partner/"
|
|
99
|
+
},
|
|
100
|
+
label: "Partner Community",
|
|
101
|
+
id: "Partner Community"
|
|
102
|
+
},
|
|
103
|
+
{ link: { href: "/blogs" }, label: "Blog", id: "Blog" },
|
|
104
|
+
{
|
|
105
|
+
link: { href: "https://admin.salesforce.com/" },
|
|
106
|
+
label: "Salesforce Admins",
|
|
107
|
+
id: "Salesforce Admins"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
link: { href: "https://architect.salesforce.com/" },
|
|
111
|
+
label: "Salesforce Architects",
|
|
112
|
+
id: "Salesforce Architects"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
];
|
|
117
|
+
|
|
118
|
+
export const defaultGeneralLinks = generalLinksRaw.map((section) => ({
|
|
119
|
+
...section,
|
|
120
|
+
options: section.options.map((option) => {
|
|
121
|
+
if (!option.link) {
|
|
122
|
+
return option;
|
|
123
|
+
}
|
|
124
|
+
const external = option.link.href.startsWith("http");
|
|
125
|
+
return {
|
|
126
|
+
...option,
|
|
127
|
+
link: {
|
|
128
|
+
...option.link,
|
|
129
|
+
target: external ? "_blank" : null
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
})
|
|
133
|
+
}));
|
|
134
|
+
|
|
135
|
+
export const privacyHref = "https://www.salesforce.com/company/privacy/";
|
|
136
|
+
|
|
137
|
+
export const intellectualHref =
|
|
138
|
+
"https://www.salesforce.com/company/legal/intellectual/";
|
|
139
|
+
|
|
140
|
+
const openOneTrustInfoDisplay = () => {
|
|
141
|
+
if (
|
|
142
|
+
(window as any).OneTrust &&
|
|
143
|
+
(window as any).OneTrust.ToggleInfoDisplay
|
|
144
|
+
) {
|
|
145
|
+
(window as any).OneTrust.ToggleInfoDisplay();
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export const termsLinks = [
|
|
150
|
+
{ href: privacyHref, label: "Privacy Information" },
|
|
151
|
+
{
|
|
152
|
+
href: "https://www.salesforce.com/company/legal/program-agreement/",
|
|
153
|
+
label: "Terms of Service"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
href: "https://www.salesforce.com/company/legal/",
|
|
157
|
+
label: "Legal"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
href: "https://www.salesforce.com/company/privacy/full_privacy/#nav_info",
|
|
161
|
+
label: "Use of Cookies"
|
|
162
|
+
},
|
|
163
|
+
{ href: "https://trust.salesforce.com/en/", label: "Trust" },
|
|
164
|
+
{
|
|
165
|
+
href: "#",
|
|
166
|
+
rel: "nofollow",
|
|
167
|
+
label: "Cookie Preferences",
|
|
168
|
+
onclick: openOneTrustInfoDisplay
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
href: "https://www.salesforce.com/form/other/privacy-request/",
|
|
172
|
+
label: "Your Privacy Choices",
|
|
173
|
+
img: "https://a.sfdcstatic.com/developer-website/prod/images/privacyoptions.svg"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
href: "https://www.salesforce.com/company/disclosure/",
|
|
177
|
+
label: "Responsible Disclosure"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
href: "https://www.salesforce.com/company/contact-us/?d=cta-glob-footer-11",
|
|
181
|
+
label: "Contact"
|
|
182
|
+
}
|
|
183
|
+
];
|
|
184
|
+
|
|
185
|
+
export const socialLinks = [
|
|
186
|
+
{
|
|
187
|
+
href: "https://developer.salesforce.com/blogs/feed",
|
|
188
|
+
iconSymbol: "rss",
|
|
189
|
+
iconURL: "/assets/icons/brand-sprite/svg/symbols.svg#themed-rss",
|
|
190
|
+
iconSprite: "general",
|
|
191
|
+
label: "RSS"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
href: "https://www.instagram.com/salesforcedevs",
|
|
195
|
+
iconSymbol: "instagram",
|
|
196
|
+
iconURL: "/assets/icons/brand-sprite/svg/symbols.svg#themed-instagram",
|
|
197
|
+
iconSprite: "brand",
|
|
198
|
+
label: "Instagram"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
href: "https://github.com/trailheadapps",
|
|
202
|
+
iconSymbol: "github",
|
|
203
|
+
iconURL: "/assets/icons/brand-sprite/svg/symbols.svg#themed-github",
|
|
204
|
+
iconSprite: "brand",
|
|
205
|
+
label: "Github"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
href: "https://twitter.com/salesforcedevs",
|
|
209
|
+
iconSymbol: "twitter-x",
|
|
210
|
+
iconURL: "/assets/icons/brand-sprite/svg/symbols.svg#twitter-x",
|
|
211
|
+
iconSprite: "brand",
|
|
212
|
+
label: "Twitter"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
href: "https://www.linkedin.com/showcase/salesforce-developers",
|
|
216
|
+
iconSymbol: "linked-in",
|
|
217
|
+
iconURL: "/assets/icons/brand-sprite/svg/symbols.svg#themed-linked-in",
|
|
218
|
+
iconSprite: "brand",
|
|
219
|
+
label: "LinkedIn"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
href: "https://www.youtube.com/user/DeveloperForce",
|
|
223
|
+
iconSymbol: "youtube",
|
|
224
|
+
iconURL: "/assets/icons/brand-sprite/svg/symbols.svg#themed-youtube",
|
|
225
|
+
iconSprite: "brand",
|
|
226
|
+
label: "Youtube"
|
|
227
|
+
}
|
|
228
|
+
];
|
|
@@ -306,7 +306,6 @@ export default class SearchResults extends LightningElement {
|
|
|
306
306
|
return cv.state === "selected";
|
|
307
307
|
});
|
|
308
308
|
});
|
|
309
|
-
|
|
310
309
|
// Note that this logic means that if someone clicks a search result before
|
|
311
310
|
// onetrust has loaded, and thus navigates away from the page, we will lose the tracking
|
|
312
311
|
if (document.readyState === "complete") {
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { LightningElement, api } from "lwc";
|
|
2
|
-
|
|
3
|
-
export default class FooterMfe extends LightningElement {
|
|
4
|
-
@api legalOnly = false;
|
|
5
|
-
private footerElement: HTMLElement | null = null;
|
|
6
|
-
|
|
7
|
-
renderedCallback() {
|
|
8
|
-
// Since the footer is a third-party component, we need to create it dynamically (LWC won't recognize it as a valid component).
|
|
9
|
-
if (this.footerElement) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
this.footerElement = document.createElement("hgf-footer");
|
|
13
|
-
this.footerElement.setAttribute("origin", window.location.origin); // will call the route handler for `/c360/experience/v1/navigation`
|
|
14
|
-
this.footerElement.setAttribute("hide-language-selector", "true");
|
|
15
|
-
this.footerElement.setAttribute(
|
|
16
|
-
"home-href",
|
|
17
|
-
`/${window.location.host}`
|
|
18
|
-
); // 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 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
|
|
19
|
-
if (this.legalOnly) {
|
|
20
|
-
this.footerElement.setAttribute("legal-only", "true");
|
|
21
|
-
}
|
|
22
|
-
this.template.querySelector("div")!.appendChild(this.footerElement);
|
|
23
|
-
}
|
|
24
|
-
}
|