@salesforcedevs/dw-components 1.3.261-alpha.0 → 1.3.261-alpha.1

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/lwc.config.json CHANGED
@@ -6,6 +6,7 @@
6
6
  "expose": [
7
7
  "dw/blogsGrid",
8
8
  "dw/videoGrid",
9
+ "dw/youtubeVideoGrid",
9
10
  "dw/browseTrials",
10
11
  "dw/cardBlogPostProvider",
11
12
  "dw/cardPodcastEpisodeProvider",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dw-components",
3
- "version": "1.3.261-alpha.0",
3
+ "version": "1.3.261-alpha.1",
4
4
  "description": "Lightning web components for https://developer.salesforce.com",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -14,7 +14,9 @@
14
14
  "lodash.clonedeep": "^4.5.0",
15
15
  "lodash.orderby": "^4.6.0",
16
16
  "lodash.uniqby": "^4.7.0",
17
- "query-string": "^7.1.3"
17
+ "query-string": "^7.1.3",
18
+ "@types/youtube-player": "^5.5.11",
19
+ "youtube-player": "^5.6.0"
18
20
  },
19
21
  "devDependencies": {
20
22
  "@types/classnames": "^2.2.10",
@@ -1,13 +1,6 @@
1
1
  @import "dxHelpers/reset";
2
2
  @import "dxHelpers/text";
3
3
 
4
- .container {
5
- display: grid;
6
- grid-template-columns: 382px;
7
- gap: 27px;
8
- justify-content: center;
9
- }
10
-
11
4
  h3 {
12
5
  margin: var(--dx-g-spacing-md) 0;
13
6
  }
@@ -19,15 +12,3 @@ p {
19
12
  .video-container iframe {
20
13
  border-radius: 16px;
21
14
  }
22
-
23
- @media (min-width: 790px) {
24
- .container {
25
- grid-template-columns: repeat(2, 382px);
26
- }
27
- }
28
-
29
- @media (min-width: 1200px) {
30
- .container {
31
- grid-template-columns: repeat(3, 382px);
32
- }
33
- }
@@ -1,12 +1,12 @@
1
1
  <template>
2
- <div class="container">
2
+ <dx-grid columns="dynamic">
3
3
  <template for:each={videosData} for:item="videoData">
4
4
  <div class="video-container" key={videoData.id}>
5
5
  <iframe
6
6
  id={videoData.id}
7
7
  src={videoData.src}
8
- width="382"
9
- height="215"
8
+ width={width}
9
+ height={height}
10
10
  title={videoData.iframeTitle}
11
11
  allowfullscreen
12
12
  ></iframe>
@@ -20,5 +20,5 @@
20
20
  ></dx-formatted-date-time>
21
21
  </div>
22
22
  </template>
23
- </div>
23
+ </dx-grid>
24
24
  </template>
@@ -3,6 +3,9 @@ import YoutubePlayer from "youtube-player";
3
3
  import { VideoData } from "./types";
4
4
 
5
5
  export default class YoutubeVideoGrid extends LightningElement {
6
+ @api width = 382;
7
+ @api height = 215;
8
+
6
9
  @api
7
10
  get videosData(): Array<VideoData> {
8
11
  return this._videosData;
@@ -22,7 +25,7 @@ export default class YoutubeVideoGrid extends LightningElement {
22
25
  }
23
26
 
24
27
  private _videosData: Array<VideoData> = [];
25
- private players: any;
28
+ private players: any = [];
26
29
 
27
30
  private pauseAllExceptCurrent(id: any) {
28
31
  this.players.forEach((player: any) => {