@salesforcedevs/dw-components 1.3.45-alpha.0 → 1.3.47
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 +3 -2
- package/src/modules/dw/blogsGrid/blogsGrid.html +1 -2
- package/src/modules/dw/browseTrials/browseTrials.html +1 -5
- package/src/modules/dw/browseTrials/browseTrials.ts +0 -10
- package/src/modules/dw/cardBlogPostProvider/cardBlogPostProvider.html +1 -2
- package/src/modules/dw/contentArchive/contentArchive.html +3 -4
- package/src/modules/dw/contentArchive/utils.ts +8 -9
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/dw-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.47",
|
|
4
4
|
"description": "Lightning web components for https://developer.salesforce.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -23,5 +23,6 @@
|
|
|
23
23
|
"@types/lodash.uniqby": "^4.7.7",
|
|
24
24
|
"@types/setimmediate": "^1.0.2",
|
|
25
25
|
"setimmediate": "^1.0.5"
|
|
26
|
-
}
|
|
26
|
+
},
|
|
27
|
+
"gitHead": "37ecd8ca7dc38636ff3ec336077512ab52065c8d"
|
|
27
28
|
}
|
|
@@ -44,8 +44,7 @@
|
|
|
44
44
|
<dx-grid columns={columns}>
|
|
45
45
|
<template for:each={postList} for:item="post">
|
|
46
46
|
<dx-card-blog-post
|
|
47
|
-
|
|
48
|
-
author-label={post.authorName}
|
|
47
|
+
authors={post.authors}
|
|
49
48
|
body={post.body}
|
|
50
49
|
datetime={post.datetime}
|
|
51
50
|
href={post.href}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="panel-list-container">
|
|
3
3
|
<h2 class="title">{title}</h2>
|
|
4
|
-
<dx-tab-panel-list
|
|
5
|
-
tabs={tabLabels}
|
|
6
|
-
onchange={handleTabChange}
|
|
7
|
-
initial-index={storedTabIndex}
|
|
8
|
-
>
|
|
4
|
+
<dx-tab-panel-list tabs={tabLabels} onchange={handleTabChange}>
|
|
9
5
|
<template for:each={trials} for:item="trial">
|
|
10
6
|
<dx-tab-panel key={trial.label}>
|
|
11
7
|
<div
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { LightningElement, api, track } from "lwc";
|
|
2
2
|
import { toJson } from "dxUtils/normalizers";
|
|
3
3
|
|
|
4
|
-
const LOCAL_STORAGE_KEY = "storedTabIndex";
|
|
5
|
-
|
|
6
4
|
export default class BrowseTrials extends LightningElement {
|
|
7
5
|
@api title = "Browse Trials";
|
|
8
6
|
|
|
@@ -53,7 +51,6 @@ export default class BrowseTrials extends LightningElement {
|
|
|
53
51
|
private _filteredCategories!: Array<any>;
|
|
54
52
|
|
|
55
53
|
private activeTabIndex = 0;
|
|
56
|
-
private storedTabIndex;
|
|
57
54
|
private buttonLabels!: string[][];
|
|
58
55
|
private _filteredTitles!: string[][];
|
|
59
56
|
private tabLabels!: Array<{ label: string }>;
|
|
@@ -66,15 +63,8 @@ export default class BrowseTrials extends LightningElement {
|
|
|
66
63
|
}
|
|
67
64
|
];
|
|
68
65
|
|
|
69
|
-
connectedCallback() {
|
|
70
|
-
this.storedTabIndex = window.localStorage.getItem(LOCAL_STORAGE_KEY);
|
|
71
|
-
window.localStorage.removeItem(LOCAL_STORAGE_KEY);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
66
|
handleTabChange(e: CustomEvent) {
|
|
75
67
|
this.activeTabIndex = e.detail;
|
|
76
|
-
window.localStorage.setItem(LOCAL_STORAGE_KEY, e.detail);
|
|
77
|
-
console.log("handleTabChange", e.detail);
|
|
78
68
|
}
|
|
79
69
|
|
|
80
70
|
filterCategories() {
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
<template for:each={posts} for:item="post">
|
|
3
3
|
<dx-card-blog-post
|
|
4
4
|
label="BLOG POST"
|
|
5
|
-
author-img-src={post.authorImgSrc}
|
|
6
|
-
author-label={post.authorName}
|
|
7
5
|
body={post.body}
|
|
8
6
|
datetime={post.datetime}
|
|
9
7
|
href={post.href}
|
|
@@ -11,6 +9,7 @@
|
|
|
11
9
|
img-src={post.imgSrc}
|
|
12
10
|
key={post.id}
|
|
13
11
|
title={post.title}
|
|
12
|
+
authors={post.authors}
|
|
14
13
|
></dx-card-blog-post>
|
|
15
14
|
<dx-hr spacing="2xs" class="mobile-divider_posts" key={post.id}></dx-hr>
|
|
16
15
|
</template>
|
|
@@ -288,7 +288,7 @@
|
|
|
288
288
|
</template>
|
|
289
289
|
<template for:each={posts} for:item="post">
|
|
290
290
|
<template if:false={isMinimalCard}>
|
|
291
|
-
<template if:true={post.
|
|
291
|
+
<template if:true={post.authors}>
|
|
292
292
|
<dx-card-expanded
|
|
293
293
|
key={post.id}
|
|
294
294
|
title={post.title}
|
|
@@ -296,13 +296,12 @@
|
|
|
296
296
|
href={post.href}
|
|
297
297
|
date={post.date}
|
|
298
298
|
body={post.excerpt}
|
|
299
|
-
|
|
300
|
-
author-label={post.author.name}
|
|
299
|
+
authors={post.authors}
|
|
301
300
|
topics={post.topics}
|
|
302
301
|
length={post.duration}
|
|
303
302
|
></dx-card-expanded>
|
|
304
303
|
</template>
|
|
305
|
-
<template if:false={post.
|
|
304
|
+
<template if:false={post.authors}>
|
|
306
305
|
<dx-card-expanded
|
|
307
306
|
key={post.id}
|
|
308
307
|
title={post.title}
|
|
@@ -65,14 +65,12 @@ function normalizePosts(posts: Array<ArchivePost>, contentType: string) {
|
|
|
65
65
|
...(contentType === "expanded" && {
|
|
66
66
|
excerpt: post.excerpt,
|
|
67
67
|
duration: getAudioDuration(post.podcast_audio.duration),
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
)
|
|
75
|
-
})
|
|
68
|
+
authors: post.authors,
|
|
69
|
+
...(post._embedded && {
|
|
70
|
+
topics: post._embedded["wp:term"][0].map(
|
|
71
|
+
(term: any) => term.name
|
|
72
|
+
)
|
|
73
|
+
})
|
|
76
74
|
})
|
|
77
75
|
}));
|
|
78
76
|
}
|
|
@@ -114,7 +112,8 @@ export async function getArchivePosts({
|
|
|
114
112
|
"date",
|
|
115
113
|
"sitename",
|
|
116
114
|
"link",
|
|
117
|
-
"podcast_audio"
|
|
115
|
+
"podcast_audio",
|
|
116
|
+
"authors"
|
|
118
117
|
];
|
|
119
118
|
const EXPANDED_FIELDS = [
|
|
120
119
|
"excerpt",
|