@salesforcedevs/dw-components 1.3.360 → 1.3.362

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dw-components",
3
- "version": "1.3.360",
3
+ "version": "1.3.362",
4
4
  "description": "Lightning web components for https://developer.salesforce.com",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -26,5 +26,5 @@
26
26
  "@types/setimmediate": "1.0.4",
27
27
  "setimmediate": "1.0.5"
28
28
  },
29
- "gitHead": "359059437a3b75dc1f4fde44b77101b7e0497e47"
29
+ "gitHead": "b467b87ab7cf96d27e036a784d7d8fd4b7e423fe"
30
30
  }
@@ -12,3 +12,7 @@ p {
12
12
  .video-container iframe {
13
13
  border-radius: 16px;
14
14
  }
15
+
16
+ dx-card-video-preview {
17
+ width: 382px;
18
+ }
@@ -1,24 +1,35 @@
1
1
  <template>
2
2
  <dx-grid columns="dynamic">
3
3
  <template for:each={videosData} for:item="videoData">
4
- <div class="video-container" key={videoData.id}>
5
- <iframe
6
- id={videoData.id}
7
- src={videoData.src}
8
- width={width}
9
- height={height}
10
- title={videoData.iframeTitle}
11
- allowfullscreen
12
- ></iframe>
13
- <h3 lwc:if={videoData.title} class="dx-text-display-6">
14
- {videoData.title}
15
- </h3>
16
- <p lwc:if={videoData.body}>{videoData.body}</p>
17
- <dx-formatted-date-time
18
- lwc:if={videoData.date}
19
- value={videoData.date}
20
- ></dx-formatted-date-time>
21
- </div>
4
+ <template if:false={videoData.thumbnail}>
5
+ <div class="video-container" key={videoData.id}>
6
+ <iframe
7
+ id={videoData.id}
8
+ src={videoData.src}
9
+ width={width}
10
+ height={height}
11
+ title={videoData.iframeTitle}
12
+ allowfullscreen
13
+ ></iframe>
14
+ <h3 lwc:if={videoData.title} class="dx-text-display-6">
15
+ {videoData.title}
16
+ </h3>
17
+ <p lwc:if={videoData.body}>{videoData.body}</p>
18
+ <dx-formatted-date-time
19
+ lwc:if={videoData.date}
20
+ value={videoData.date}
21
+ ></dx-formatted-date-time>
22
+ </div>
23
+ </template>
24
+ <template if:true={videoData.thumbnail}>
25
+ <dx-card-video-preview
26
+ key={videoData.id}
27
+ href={videoData.src}
28
+ header={videoData.title}
29
+ img-src={videoData.thumbnail}
30
+ target={videoData.src}
31
+ ></dx-card-video-preview>
32
+ </template>
22
33
  </template>
23
34
  </dx-grid>
24
35
  </template>
@@ -6,7 +6,7 @@ const PLAYING = 1;
6
6
 
7
7
  export default class YoutubeVideoGrid extends LightningElement {
8
8
  @api width = 382;
9
- @api height = 215;
9
+ @api height = 193;
10
10
 
11
11
  @api
12
12
  get videosData(): Array<VideoData> {