@salesforcedevs/dw-components 1.3.235-alpha.1 → 1.3.235-alpha.2

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.235-alpha.1",
3
+ "version": "1.3.235-alpha.2",
4
4
  "description": "Lightning web components for https://developer.salesforce.com",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -1,14 +1,12 @@
1
1
  export type VideoCardsData = {
2
- key: number;
3
- body: string;
4
- href: string;
5
- imgAlt: string;
6
- imgSrc: string;
7
2
  title: string;
8
- target: string;
3
+ body: string;
9
4
  hasSocial: boolean;
10
5
  socialName: string;
11
6
  socialJobTitle: string;
12
7
  socialPlatform: "linkedin-in" | "twitter";
13
8
  socialProfileImgSrc: "string";
9
+ isLinkedin: boolean | undefined;
10
+ isTwitter: boolean | undefined;
11
+ videoId: string;
14
12
  };
@@ -1,5 +1,24 @@
1
+ .container {
2
+ display: grid;
3
+ grid-template-columns: 382px;
4
+ gap: 27px;
5
+ justify-content: center;
6
+ }
7
+
1
8
  .pagination-container {
2
9
  display: flex;
3
10
  justify-content: center;
4
11
  margin-top: 36px;
5
12
  }
13
+
14
+ @media (min-width: 790px) {
15
+ .container {
16
+ grid-template-columns: repeat(2, 382px);
17
+ }
18
+ }
19
+
20
+ @media (min-width: 1200px) {
21
+ .container {
22
+ grid-template-columns: repeat(3, 382px);
23
+ }
24
+ }
@@ -1,23 +1,36 @@
1
1
  <template>
2
- <dx-grid columns="dynamic">
2
+ <div class="container">
3
3
  <template for:each={currentPageData} for:item="cardData">
4
- <dx-card-video-preview
5
- key={cardData.id}
6
- body={cardData.body}
7
- href={cardData.href}
8
- img-alt={cardData.imgAlt}
9
- img-src={cardData.imgSrc}
10
- title={cardData.title}
11
- target={cardData.target}
12
- has-social={cardData.hasSocial}
13
- social-name={cardData.socialName}
14
- social-job-title={cardData.socialJobTitle}
15
- social-platform={cardData.socialPlatform}
16
- social-profile-img-src={cardData.socialProfileImgSrc}
17
- overlay-icon="new_window"
18
- ></dx-card-video-preview>
4
+ <template lwc:if={cardData.isTwitter}>
5
+ <dx-embedded-video
6
+ key={cardData.id}
7
+ type="twitter"
8
+ video-id={cardData.videoId}
9
+ title={cardData.title}
10
+ body={cardData.body}
11
+ has-social={cardData.hasSocial}
12
+ social-platform={cardData.socialPlatform}
13
+ social-name={cardData.socialName}
14
+ social-job-title={cardData.socialJobTitle}
15
+ social-profile-img-src={cardData.socialProfileImgSrc}
16
+ ></dx-embedded-video>
17
+ </template>
18
+ <template lwc:elseif={cardData.isLinkedin}>
19
+ <dx-embedded-video
20
+ key={cardData.id}
21
+ type="linkedin"
22
+ video-id={cardData.videoId}
23
+ title={cardData.title}
24
+ body={cardData.body}
25
+ has-social={cardData.hasSocial}
26
+ social-platform={cardData.socialPlatform}
27
+ social-name={cardData.socialName}
28
+ social-job-title={cardData.socialJobTitle}
29
+ social-profile-img-src={cardData.socialProfileImgSrc}
30
+ ></dx-embedded-video>
31
+ </template>
19
32
  </template>
20
- </dx-grid>
33
+ </div>
21
34
  <div class="pagination-container">
22
35
  <dx-pagination
23
36
  current-page={page}