@salesforcedevs/dw-components 1.20.13 → 1.20.16-ssg-alpha1
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 +2 -3
- package/src/modules/dw/contentArchive/contentArchive.css +1 -1
- package/src/modules/dw/contentArchive/contentArchive.html +2 -2
- package/src/modules/dw/docsGrid/docsGrid.ts +41 -0
- package/src/modules/dw/eventsList/eventsList.css +4 -4
- package/src/modules/dw/podcastSubscription/podcastSubscription.css +2 -2
- package/src/modules/dw/podcastSubscription/podcastSubscription.ts +3 -3
- package/src/modules/dw/podcastsPromo/podcastsPromo.html +1 -1
- package/src/modules/dw/tbidLoginMenu/tbidLoginMenu.html +2 -2
- package/LICENSE +0 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dw-components",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.16-ssg-alpha1",
|
|
4
4
|
"description": "Lightning web components for https://developer.salesforce.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -29,6 +29,5 @@
|
|
|
29
29
|
"volta": {
|
|
30
30
|
"node": "20.19.0",
|
|
31
31
|
"yarn": "1.22.19"
|
|
32
|
-
}
|
|
33
|
-
"gitHead": "533981cf67f89f660ad584fa977baf14825f51a6"
|
|
32
|
+
}
|
|
34
33
|
}
|
|
@@ -101,7 +101,7 @@ button:active {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
.empty-state-container {
|
|
104
|
-
background-image: url("https://a.sfdcstatic.com/developer-website/images/no-results-combined.svg");
|
|
104
|
+
background-image: url("https://a.sfdcstatic.com/developer-website/prod/images/no-results-combined.svg");
|
|
105
105
|
background-repeat: no-repeat;
|
|
106
106
|
background-position: center;
|
|
107
107
|
background-size: contain;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<dx-modal-drawer open={modalOpen} onclickclose={toggleModal}>
|
|
12
12
|
<img
|
|
13
13
|
if:true={filtersLoading}
|
|
14
|
-
src="https://a.sfdcstatic.com/developer-website/images/sidebar-loading.svg"
|
|
14
|
+
src="https://a.sfdcstatic.com/developer-website/prod/images/sidebar-loading.svg"
|
|
15
15
|
alt="loading"
|
|
16
16
|
class="modal-loading"
|
|
17
17
|
/>
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
<template if:false={isMobile}>
|
|
67
67
|
<img
|
|
68
68
|
if:true={filtersLoading}
|
|
69
|
-
src="https://a.sfdcstatic.com/developer-website/images/sidebar-loading.svg"
|
|
69
|
+
src="https://a.sfdcstatic.com/developer-website/prod/images/sidebar-loading.svg"
|
|
70
70
|
alt="loading"
|
|
71
71
|
/>
|
|
72
72
|
<template if:false={filtersLoading}>
|
|
@@ -57,10 +57,16 @@ export default class DocsGrid extends LightningElement {
|
|
|
57
57
|
private _couchDbDocTileExclusions?: Set<any>;
|
|
58
58
|
private _allLanguages: Array<Language> = [];
|
|
59
59
|
private filteredItemsSelected: boolean = false;
|
|
60
|
+
private _isFetchingOtherDocs: boolean = false;
|
|
60
61
|
|
|
61
62
|
connectedCallback(): void {
|
|
62
63
|
this.retrieveDscApis(true);
|
|
63
64
|
|
|
65
|
+
// If SSG_ENABLED is true and otherDocs wasn't passed, fetch from /sitemetadata
|
|
66
|
+
if (!this._otherDocs || this._otherDocs.length === 0) {
|
|
67
|
+
this.fetchOtherDocsFromSitemetadata();
|
|
68
|
+
}
|
|
69
|
+
|
|
64
70
|
this.matchDesktop = window.matchMedia("(min-width: 1024px)");
|
|
65
71
|
this.matchDesktop.addEventListener("change", this.handleDesktopView);
|
|
66
72
|
|
|
@@ -122,6 +128,15 @@ export default class DocsGrid extends LightningElement {
|
|
|
122
128
|
}
|
|
123
129
|
|
|
124
130
|
set otherDocs(value: any) {
|
|
131
|
+
// When SSG_ENABLED is true otherDocs is set to empty and need to fetch data
|
|
132
|
+
if (value?.length === 0 && !this._isFetchingOtherDocs) {
|
|
133
|
+
this.fetchOtherDocsFromSitemetadata();
|
|
134
|
+
} else {
|
|
135
|
+
this.processOtherDocs(value);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
private processOtherDocs(value: any): void {
|
|
125
140
|
const allDocs = toJson(value);
|
|
126
141
|
this._otherDocs = [];
|
|
127
142
|
|
|
@@ -142,6 +157,32 @@ export default class DocsGrid extends LightningElement {
|
|
|
142
157
|
}
|
|
143
158
|
}
|
|
144
159
|
|
|
160
|
+
async fetchOtherDocsFromSitemetadata(): Promise<void> {
|
|
161
|
+
if (this._isFetchingOtherDocs) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
this._isFetchingOtherDocs = true;
|
|
166
|
+
try {
|
|
167
|
+
const response = await fetch("/sitemetadata");
|
|
168
|
+
|
|
169
|
+
if (response.ok) {
|
|
170
|
+
const data = await response.json();
|
|
171
|
+
this.processOtherDocs(data);
|
|
172
|
+
} else {
|
|
173
|
+
console.error(
|
|
174
|
+
`Failed to fetch sitemetadata: ${response.status}`
|
|
175
|
+
);
|
|
176
|
+
this._otherDocs = [];
|
|
177
|
+
}
|
|
178
|
+
} catch (error) {
|
|
179
|
+
console.error("Error fetching sitemetadata:", error);
|
|
180
|
+
this._otherDocs = [];
|
|
181
|
+
} finally {
|
|
182
|
+
this._isFetchingOtherDocs = false;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
145
186
|
@api
|
|
146
187
|
get couchDbDocTileExclusions() {
|
|
147
188
|
return this._couchDbDocTileExclusions || new Set<any>();
|
|
@@ -23,7 +23,7 @@ dx-section.events-action-bar::part(container) {
|
|
|
23
23
|
|
|
24
24
|
dx-section.upcoming-events::part(container)::before {
|
|
25
25
|
content: "";
|
|
26
|
-
background-image: url("https://a.sfdcstatic.com/developer-website/images/events-cloud1.svg");
|
|
26
|
+
background-image: url("https://a.sfdcstatic.com/developer-website/prod/images/events-cloud1.svg");
|
|
27
27
|
width: 146px;
|
|
28
28
|
height: 106px;
|
|
29
29
|
position: absolute;
|
|
@@ -34,7 +34,7 @@ dx-section.upcoming-events::part(container)::before {
|
|
|
34
34
|
|
|
35
35
|
dx-section.upcoming-events::part(container)::after {
|
|
36
36
|
content: "";
|
|
37
|
-
background-image: url("https://a.sfdcstatic.com/developer-website/images/events-cloud2.svg");
|
|
37
|
+
background-image: url("https://a.sfdcstatic.com/developer-website/prod/images/events-cloud2.svg");
|
|
38
38
|
width: 152px;
|
|
39
39
|
height: 111px;
|
|
40
40
|
position: absolute;
|
|
@@ -45,7 +45,7 @@ dx-section.upcoming-events::part(container)::after {
|
|
|
45
45
|
|
|
46
46
|
dx-section.past-events::part(container)::before {
|
|
47
47
|
content: "";
|
|
48
|
-
background-image: url("https://a.sfdcstatic.com/developer-website/images/events-gradient-elipse.svg");
|
|
48
|
+
background-image: url("https://a.sfdcstatic.com/developer-website/prod/images/events-gradient-elipse.svg");
|
|
49
49
|
width: 2991px;
|
|
50
50
|
height: 839px;
|
|
51
51
|
position: absolute;
|
|
@@ -56,7 +56,7 @@ dx-section.past-events::part(container)::before {
|
|
|
56
56
|
|
|
57
57
|
dx-section:not(:nth-child(2)).past-events::part(container)::after {
|
|
58
58
|
content: "";
|
|
59
|
-
background-image: url("https://a.sfdcstatic.com/developer-website/images/events-cloud3.svg");
|
|
59
|
+
background-image: url("https://a.sfdcstatic.com/developer-website/prod/images/events-cloud3.svg");
|
|
60
60
|
width: 655px;
|
|
61
61
|
height: 270px;
|
|
62
62
|
position: absolute;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
@media screen and (max-width: 768px) {
|
|
15
15
|
.container {
|
|
16
|
-
background-image: url("https://a.sfdcstatic.com/developer-website/images/podcast-subscription-clouds-small.svg");
|
|
16
|
+
background-image: url("https://a.sfdcstatic.com/developer-website/prod/images/podcast-subscription-clouds-small.svg");
|
|
17
17
|
background-size: auto 200px;
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
|
|
48
48
|
@media screen and (min-width: 768px) {
|
|
49
49
|
.container {
|
|
50
|
-
background-image: url("https://a.sfdcstatic.com/developer-website/images/podcast-subscription-clouds.svg");
|
|
50
|
+
background-image: url("https://a.sfdcstatic.com/developer-website/prod/images/podcast-subscription-clouds.svg");
|
|
51
51
|
min-height: 230px;
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -5,15 +5,15 @@ export default class PodcastSubscription extends LightningElement {
|
|
|
5
5
|
{
|
|
6
6
|
href: "https://podcasts.apple.com/us/podcast/salesforce-developer-podcast/id1482325260",
|
|
7
7
|
imgAlt: "Listen on Apple Podcasts",
|
|
8
|
-
imgSrc: "https://a.sfdcstatic.com/developer-website/images/podcasts-subscription-apple.svg"
|
|
8
|
+
imgSrc: "https://a.sfdcstatic.com/developer-website/prod/images/podcasts-subscription-apple.svg"
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
href: "https://www.google.com/podcasts?feed=aHR0cHM6Ly9zYWxlc2ZvcmNlZGV2cG9kY2FzdC5saWJzeW4uY29tL3Jzcw%3D%3D",
|
|
12
12
|
imgAlt: "Listen on Google Podcasts",
|
|
13
|
-
imgSrc: "https://a.sfdcstatic.com/developer-website/images/podcasts-subscription-google.svg"
|
|
13
|
+
imgSrc: "https://a.sfdcstatic.com/developer-website/prod/images/podcasts-subscription-google.svg"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
|
-
imgSrc: "https://a.sfdcstatic.com/developer-website/images/podcasts-subscription-spotify.svg",
|
|
16
|
+
imgSrc: "https://a.sfdcstatic.com/developer-website/prod/images/podcasts-subscription-spotify.svg",
|
|
17
17
|
imgAlt: "Listen on Spotify",
|
|
18
18
|
href: "https://open.spotify.com/show/75y378cB3FM6RQ8MGUDJ5M"
|
|
19
19
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<div class="info-container">
|
|
15
15
|
<a href="/podcast" class="info-link">
|
|
16
16
|
<img
|
|
17
|
-
src="https://a.sfdcstatic.com/developer-website/images/podcast-bear-background.png"
|
|
17
|
+
src="https://a.sfdcstatic.com/developer-website/prod/images/podcast-bear-background.png"
|
|
18
18
|
loading="lazy"
|
|
19
19
|
alt="Developer Podcast"
|
|
20
20
|
style="width: 100%"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<div if:true={isLoggedIn}>
|
|
11
11
|
<div class="login-container logged-in">
|
|
12
12
|
<img
|
|
13
|
-
src="https://a.sfdcstatic.com/developer-website/images/login-widget-bg.png"
|
|
13
|
+
src="https://a.sfdcstatic.com/developer-website/prod/images/login-widget-bg.png"
|
|
14
14
|
class="header-img"
|
|
15
15
|
alt="Light blue background image showing line-drawn hills and trees"
|
|
16
16
|
/>
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
</span>
|
|
115
115
|
<img
|
|
116
116
|
class="login-link-img"
|
|
117
|
-
src="https://a.sfdcstatic.com/developer-website/images/salesforce-cloud.svg"
|
|
117
|
+
src="https://a.sfdcstatic.com/developer-website/prod/images/salesforce-cloud.svg"
|
|
118
118
|
alt="Salesforce logo"
|
|
119
119
|
/>
|
|
120
120
|
<dx-icon
|
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.
|