@salesforcedevs/dw-components 1.3.304 → 1.3.311-alpha.0
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/blogsGrid/blogsGrid.html +1 -1
- package/src/modules/dw/browseTrials/browseTrials.html +4 -4
- package/src/modules/dw/browseTrials/browseTrials.ts +1 -1
- package/src/modules/dw/cardBlogPostProvider/cardBlogPostProvider.html +1 -1
- package/src/modules/dw/cardPodcastEpisodeProvider/cardPodcastEpisodeProvider.html +1 -1
- package/src/modules/dw/codeSamplesGrid/codeSamplesGrid.html +4 -4
- package/src/modules/dw/contentArchive/contentArchive.html +15 -15
- package/src/modules/dw/contentArchive/utils.ts +12 -1
- package/src/modules/dw/docsGrid/docsGrid.html +2 -2
- package/src/modules/dw/eventsList/eventsList.html +5 -5
- package/src/modules/dw/j2sCardSequence/j2sCardSequence.ts +4 -0
- package/src/modules/dw/languageSelector/languageSelector.ts +1 -12
- package/src/modules/dw/podcastsGrid/podcastsGrid.html +1 -1
- package/src/modules/dw/podcastsPromo/podcastsPromo.html +1 -1
- package/src/modules/dw/videoGrid/videoGrid.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.3.
|
|
3
|
+
"version": "1.3.311-alpha.0",
|
|
4
4
|
"description": "Lightning web components for https://developer.salesforce.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -25,6 +25,5 @@
|
|
|
25
25
|
"@types/lodash.uniqby": "^4.7.7",
|
|
26
26
|
"@types/setimmediate": "^1.0.2",
|
|
27
27
|
"setimmediate": "^1.0.5"
|
|
28
|
-
}
|
|
29
|
-
"gitHead": "00f26c1df5e3db652f423fdf880224e65ca6a4f6"
|
|
28
|
+
}
|
|
30
29
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<dx-section
|
|
2
|
+
<dx-section header={header}>
|
|
3
3
|
<dx-tab-panel-list
|
|
4
4
|
tabs={tabLabels}
|
|
5
5
|
onchange={handleTabChange}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
</div>
|
|
27
27
|
<template for:each={filteredCategories} for:item="category">
|
|
28
28
|
<dx-section
|
|
29
|
-
|
|
29
|
+
header={category.title}
|
|
30
30
|
subtitle={category.subtitle}
|
|
31
31
|
heading-level="4"
|
|
32
32
|
subtitle-level="2"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
href={card.href}
|
|
51
51
|
label={card.label}
|
|
52
52
|
terms={card.terms}
|
|
53
|
-
|
|
53
|
+
header={card.title}
|
|
54
54
|
button-one-cta={card.buttonOneCta}
|
|
55
55
|
button-one-href={card.buttonOneHref}
|
|
56
56
|
button-one-icon={card.buttonOneIcon}
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
href={card.href}
|
|
70
70
|
label={card.label}
|
|
71
71
|
terms={card.terms}
|
|
72
|
-
|
|
72
|
+
header={card.title}
|
|
73
73
|
button-one-cta={card.buttonOneCta}
|
|
74
74
|
button-one-href={card.buttonOneHref}
|
|
75
75
|
button-one-icon={card.buttonOneIcon}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<dx-section>
|
|
3
3
|
<dx-feature
|
|
4
|
-
|
|
4
|
+
header={featuredCodeSample.title}
|
|
5
5
|
button-href={featuredCodeSample.href}
|
|
6
6
|
button-label="Explore on GitHub"
|
|
7
7
|
image-src={featuredCodeSample.imgSrc}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</dx-feature>
|
|
15
15
|
</dx-section>
|
|
16
16
|
|
|
17
|
-
<dx-section
|
|
17
|
+
<dx-section header="Browse Demos">
|
|
18
18
|
<div class="docs-action-bar">
|
|
19
19
|
<div class="records-container">
|
|
20
20
|
<span if:true={endingRecord}>
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
key={item.id}
|
|
98
98
|
body={item.body}
|
|
99
99
|
label={item.type}
|
|
100
|
-
|
|
100
|
+
header={item.title}
|
|
101
101
|
href={item.href}
|
|
102
102
|
>
|
|
103
103
|
<div class="badge-link-container">
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
</div>
|
|
133
133
|
<dx-empty-state
|
|
134
134
|
variant="alt"
|
|
135
|
-
|
|
135
|
+
header="Beep boop. That did not compute."
|
|
136
136
|
subtitle={emptyStateSubtitle}
|
|
137
137
|
body={emptyStateBody}
|
|
138
138
|
suggestions={emptyStateSuggestions}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<dx-featured-content-header
|
|
3
3
|
class="documentation_header"
|
|
4
|
-
|
|
4
|
+
header="Content Archive"
|
|
5
5
|
body="Learn more about the topics that interest you most by exploring the full collection of Salesforce Developers blog and podcast content."
|
|
6
6
|
dark="true"
|
|
7
7
|
no-swoop={isMobile}
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
</div>
|
|
28
28
|
<dx-filter-menu
|
|
29
29
|
name="content-type"
|
|
30
|
-
|
|
30
|
+
header={contentTypeTitle}
|
|
31
31
|
options={contentTypeList}
|
|
32
32
|
onchange={handleUpdateSiteFilter}
|
|
33
33
|
></dx-filter-menu>
|
|
34
34
|
<dx-filter-menu
|
|
35
35
|
name="dates"
|
|
36
|
-
|
|
36
|
+
header={dateTitle}
|
|
37
37
|
options={dateList}
|
|
38
38
|
variant="nested"
|
|
39
39
|
filters-dates-loading={filtersDatesLoading}
|
|
@@ -42,20 +42,20 @@
|
|
|
42
42
|
<template if:false={hideBlogFilters}>
|
|
43
43
|
<dx-filter-menu
|
|
44
44
|
name="authors"
|
|
45
|
-
|
|
45
|
+
header={authorTitle}
|
|
46
46
|
options={authorList}
|
|
47
47
|
onchange={handleFiltersEvent}
|
|
48
48
|
></dx-filter-menu>
|
|
49
49
|
</template>
|
|
50
50
|
<dx-filter-menu
|
|
51
51
|
name="categories"
|
|
52
|
-
|
|
52
|
+
header={categoryTitle}
|
|
53
53
|
options={categoryList}
|
|
54
54
|
onchange={handleFiltersEvent}
|
|
55
55
|
></dx-filter-menu>
|
|
56
56
|
<dx-filter-menu
|
|
57
57
|
name="language"
|
|
58
|
-
|
|
58
|
+
header={languageTitle}
|
|
59
59
|
options={languagesList}
|
|
60
60
|
onchange={handleFiltersEvent}
|
|
61
61
|
></dx-filter-menu>
|
|
@@ -81,13 +81,13 @@
|
|
|
81
81
|
</div>
|
|
82
82
|
<dx-filter-menu
|
|
83
83
|
name="contentType"
|
|
84
|
-
|
|
84
|
+
header={contentTypeTitle}
|
|
85
85
|
options={contentTypeList}
|
|
86
86
|
onchange={handleUpdateSiteFilter}
|
|
87
87
|
></dx-filter-menu>
|
|
88
88
|
<dx-filter-menu
|
|
89
89
|
name="dates"
|
|
90
|
-
|
|
90
|
+
header={dateTitle}
|
|
91
91
|
options={dateList}
|
|
92
92
|
filters-dates-loading={filtersDatesLoading}
|
|
93
93
|
variant="nested"
|
|
@@ -96,20 +96,20 @@
|
|
|
96
96
|
<template if:false={hideBlogFilters}>
|
|
97
97
|
<dx-filter-menu
|
|
98
98
|
name="authors"
|
|
99
|
-
|
|
99
|
+
header={authorTitle}
|
|
100
100
|
options={authorList}
|
|
101
101
|
onchange={handleFiltersEvent}
|
|
102
102
|
></dx-filter-menu>
|
|
103
103
|
</template>
|
|
104
104
|
<dx-filter-menu
|
|
105
105
|
name="categories"
|
|
106
|
-
|
|
106
|
+
header={categoryTitle}
|
|
107
107
|
options={categoryList}
|
|
108
108
|
onchange={handleFiltersEvent}
|
|
109
109
|
></dx-filter-menu>
|
|
110
110
|
<dx-filter-menu
|
|
111
111
|
name="language"
|
|
112
|
-
|
|
112
|
+
header={languageTitle}
|
|
113
113
|
options={languagesList}
|
|
114
114
|
onchange={handleFiltersEvent}
|
|
115
115
|
></dx-filter-menu>
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
<dx-card-minimal
|
|
313
313
|
key={post.id}
|
|
314
314
|
content-type={post.contentType}
|
|
315
|
-
|
|
315
|
+
header={post.title}
|
|
316
316
|
href={post.href}
|
|
317
317
|
></dx-card-minimal>
|
|
318
318
|
</template>
|
|
@@ -324,7 +324,7 @@
|
|
|
324
324
|
<template if:true={post.authors}>
|
|
325
325
|
<dx-card-expanded
|
|
326
326
|
key={post.id}
|
|
327
|
-
|
|
327
|
+
header={post.title}
|
|
328
328
|
content-type={post.contentType}
|
|
329
329
|
href={post.href}
|
|
330
330
|
date={post.date}
|
|
@@ -337,7 +337,7 @@
|
|
|
337
337
|
<template if:false={post.authors}>
|
|
338
338
|
<dx-card-expanded
|
|
339
339
|
key={post.id}
|
|
340
|
-
|
|
340
|
+
header={post.title}
|
|
341
341
|
content-type={post.contentType}
|
|
342
342
|
href={post.href}
|
|
343
343
|
date={post.date}
|
|
@@ -363,7 +363,7 @@
|
|
|
363
363
|
<template if:true={isEmptyState}>
|
|
364
364
|
<dx-empty-state
|
|
365
365
|
variant="alt"
|
|
366
|
-
|
|
366
|
+
header="Beep boop. That did not compute."
|
|
367
367
|
subtitle={emptyStateSubtitle}
|
|
368
368
|
body={emptyStateBody}
|
|
369
369
|
suggestions={emptyStateSuggestions}
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
FilterMenuItem
|
|
7
7
|
} from "./contentArchive.types";
|
|
8
8
|
import altData from "./altData.js";
|
|
9
|
-
import { normalizePostLink } from "../languageSelector/languageSelector";
|
|
10
9
|
|
|
11
10
|
let postsController: AbortController | null = null;
|
|
12
11
|
let filtersController: AbortController | null = null;
|
|
@@ -16,6 +15,18 @@ const ARCHIVE_CONTENT_URL = `${ARCHIVE_BASE_URL}/latest-post-per-site`;
|
|
|
16
15
|
const ARCHIVE_FILTER_LIST_URL = `${ARCHIVE_BASE_URL}/archives-filters?order=DESC`;
|
|
17
16
|
export const PER_PAGE_COUNT = 10;
|
|
18
17
|
|
|
18
|
+
export const normalizePostLink = (post: {
|
|
19
|
+
acf: { language: string };
|
|
20
|
+
link: string;
|
|
21
|
+
}) => {
|
|
22
|
+
switch (post.acf.language) {
|
|
23
|
+
case "japanese":
|
|
24
|
+
return post.link.replace("/blogs/", "/jpblogs/");
|
|
25
|
+
default:
|
|
26
|
+
return post.link;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
19
30
|
async function postsFetchHandler(url: string) {
|
|
20
31
|
if (postsController) {
|
|
21
32
|
postsController.abort();
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
for:item="item"
|
|
46
46
|
for:index="i"
|
|
47
47
|
key={item.id}
|
|
48
|
-
|
|
48
|
+
header={item.title}
|
|
49
49
|
body={item.description}
|
|
50
50
|
href={item.guidesHref}
|
|
51
51
|
class="docs-card"
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
</div>
|
|
85
85
|
<dx-empty-state
|
|
86
86
|
variant="alt"
|
|
87
|
-
|
|
87
|
+
header="Beep boop. That did not compute."
|
|
88
88
|
subtitle={emptyStateSubtitle}
|
|
89
89
|
body={emptyStateBody}
|
|
90
90
|
suggestions={emptyStateSuggestions}
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
</dx-section>
|
|
50
50
|
<dx-section
|
|
51
51
|
class="events-list upcoming-events"
|
|
52
|
-
|
|
52
|
+
header="Upcoming Events"
|
|
53
53
|
if:true={upcomingEvents.length}
|
|
54
54
|
>
|
|
55
55
|
<dx-card-event
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
for:item="item"
|
|
58
58
|
key={item.id}
|
|
59
59
|
href={item.urlStub}
|
|
60
|
-
|
|
60
|
+
header={item.name}
|
|
61
61
|
end-datetime={item.endDate}
|
|
62
62
|
start-datetime={item.startDate}
|
|
63
63
|
short-description={item.shortDescription}
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
|
|
72
72
|
<dx-section
|
|
73
73
|
class="events-list past-events"
|
|
74
|
-
|
|
74
|
+
header="Past Events"
|
|
75
75
|
if:true={pastEvents.length}
|
|
76
76
|
>
|
|
77
77
|
<dx-card-event
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
for:item="item"
|
|
80
80
|
key={item.id}
|
|
81
81
|
href={item.urlStub}
|
|
82
|
-
|
|
82
|
+
header={item.name}
|
|
83
83
|
end-datetime={item.endDate}
|
|
84
84
|
start-datetime={item.startDate}
|
|
85
85
|
short-description={item.shortDescription}
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
</dx-section>
|
|
91
91
|
<div class="events-empty" if:true={showEmptyState}>
|
|
92
92
|
<dx-empty-state
|
|
93
|
-
|
|
93
|
+
header="Beep boop. That did not compute."
|
|
94
94
|
subtitle={emptyStateSubtitle}
|
|
95
95
|
></dx-empty-state>
|
|
96
96
|
</div>
|
|
@@ -430,6 +430,10 @@ export default class J2sCardSequence extends LightningElement {
|
|
|
430
430
|
const res = await fetch(`${this.tbidApiBaseUrl}/userinfo`);
|
|
431
431
|
if (res.ok) {
|
|
432
432
|
const userInfo = await res.json();
|
|
433
|
+
if (userInfo.dsc_auth_error) {
|
|
434
|
+
// API breaks HTTP semantics to avoid logging 4xx errors (due to Lighthouse score)
|
|
435
|
+
throw new Error("Unauthorized");
|
|
436
|
+
}
|
|
433
437
|
const emailOverride = await this.getDrmEmailOverride(
|
|
434
438
|
userInfo?.user_id
|
|
435
439
|
);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { track as trackClick } from "dxUtils/analytics";
|
|
2
2
|
import { api, LightningElement, track } from "lwc";
|
|
3
3
|
import { SelectOption } from "typings/custom";
|
|
4
|
+
import { normalizePostLink } from "../contentArchive/utils";
|
|
4
5
|
|
|
5
6
|
const ANALYTICS_INFO = {
|
|
6
7
|
element_title: "Select Language",
|
|
@@ -12,18 +13,6 @@ const language_local_names_map: any = {
|
|
|
12
13
|
english: "English"
|
|
13
14
|
};
|
|
14
15
|
|
|
15
|
-
export const normalizePostLink = (post: {
|
|
16
|
-
acf: { language: string };
|
|
17
|
-
link: string;
|
|
18
|
-
}) => {
|
|
19
|
-
switch (post.acf.language) {
|
|
20
|
-
case "japanese":
|
|
21
|
-
return post.link.replace("/blogs/", "/jpblogs/");
|
|
22
|
-
default:
|
|
23
|
-
return post.link;
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
|
|
27
16
|
export default class LanguageSelector extends LightningElement {
|
|
28
17
|
@track languages = [] as SelectOption[];
|
|
29
18
|
selectedLanguage?: string;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
key={cardData.id}
|
|
7
7
|
type="twitter"
|
|
8
8
|
video-id={cardData.videoId}
|
|
9
|
-
|
|
9
|
+
header={cardData.title}
|
|
10
10
|
body={cardData.body}
|
|
11
11
|
has-social={cardData.hasSocial}
|
|
12
12
|
social-name={cardData.socialName}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
key={cardData.id}
|
|
21
21
|
type="linkedin"
|
|
22
22
|
video-id={cardData.videoId}
|
|
23
|
-
|
|
23
|
+
header={cardData.title}
|
|
24
24
|
body={cardData.body}
|
|
25
25
|
has-social={cardData.hasSocial}
|
|
26
26
|
social-name={cardData.socialName}
|
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.
|