@salesforcedevs/dx-components 1.3.251-alpha.1 → 1.3.251-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 +1 -1
- package/src/modules/dx/cardContent/cardContent.css +0 -31
- package/src/modules/dx/cardContent/cardContent.html +0 -19
- package/src/modules/dx/cardContent/cardContent.ts +0 -5
- package/src/modules/dx/cardVideoPreview/cardVideoPreview.html +1 -6
- package/src/modules/dx/cardVideoPreview/cardVideoPreview.ts +0 -6
- package/src/modules/dx/embeddedVideo/embeddedVideo.css +33 -0
- package/src/modules/dx/embeddedVideo/embeddedVideo.html +49 -0
- package/src/modules/dx/embeddedVideo/embeddedVideo.ts +36 -0
package/package.json
CHANGED
|
@@ -29,37 +29,6 @@
|
|
|
29
29
|
margin-bottom: 0 !important;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
dx-hr {
|
|
33
|
-
--dx-c-hr-padding-horizontal: 0;
|
|
34
|
-
--dx-c-hr-color: var(--dx-g-gray-80);
|
|
35
|
-
--dx-c-stroke-width: 1px;
|
|
36
|
-
|
|
37
|
-
margin-top: -20px;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.profile-container {
|
|
41
|
-
display: flex;
|
|
42
|
-
align-items: center;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.profile-image {
|
|
46
|
-
height: 48px;
|
|
47
|
-
width: 48px;
|
|
48
|
-
border-radius: 48px;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.profile-text-container {
|
|
52
|
-
margin-left: 10px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.profile-text-container p {
|
|
56
|
-
color: var(--dx-g-blue-vibrant-20);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
dx-icon-badge {
|
|
60
|
-
margin-left: auto;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
32
|
/* mobile responsiveness */
|
|
64
33
|
|
|
65
34
|
@media screen and (max-width: 768px) {
|
|
@@ -63,24 +63,5 @@
|
|
|
63
63
|
></slot>
|
|
64
64
|
</span>
|
|
65
65
|
</div>
|
|
66
|
-
<dx-hr lwc:if={hasSocial} spacing="smd"></dx-hr>
|
|
67
|
-
<div class="profile-container" lwc:if={hasSocial}>
|
|
68
|
-
<img
|
|
69
|
-
class="profile-image"
|
|
70
|
-
src={socialProfileImgSrc}
|
|
71
|
-
alt="user profile picture"
|
|
72
|
-
/>
|
|
73
|
-
<div class="profile-text-container">
|
|
74
|
-
<p class="dx-text-display-8">{socialName}</p>
|
|
75
|
-
<p class="dx-text-body-3">{socialJobTitle}</p>
|
|
76
|
-
</div>
|
|
77
|
-
<dx-icon-badge
|
|
78
|
-
symbol={socialPlatform}
|
|
79
|
-
sprite="brand"
|
|
80
|
-
background-color="blue-vibrant-20"
|
|
81
|
-
icon-size="medium"
|
|
82
|
-
background-size="medium"
|
|
83
|
-
></dx-icon-badge>
|
|
84
|
-
</div>
|
|
85
66
|
</div>
|
|
86
67
|
</template>
|
|
@@ -20,11 +20,6 @@ export default class CardContent extends LightningElement {
|
|
|
20
20
|
@api title!: string;
|
|
21
21
|
@api hrefClick: any = null;
|
|
22
22
|
@api contentType: string | null = null;
|
|
23
|
-
@api hasSocial?: boolean = false;
|
|
24
|
-
@api socialName?: string;
|
|
25
|
-
@api socialJobTitle?: string;
|
|
26
|
-
@api socialProfileImgSrc?: string;
|
|
27
|
-
@api socialPlatform?: string;
|
|
28
23
|
@api
|
|
29
24
|
get authors() {
|
|
30
25
|
if (this._authors && this._authors.length) {
|
|
@@ -8,15 +8,10 @@
|
|
|
8
8
|
layout={layout}
|
|
9
9
|
target={target}
|
|
10
10
|
title={title}
|
|
11
|
-
has-social={hasSocial}
|
|
12
|
-
social-name={socialName}
|
|
13
|
-
social-job-title={socialJobTitle}
|
|
14
|
-
social-platform={socialPlatform}
|
|
15
|
-
social-profile-img-src={socialProfileImgSrc}
|
|
16
11
|
>
|
|
17
12
|
<dx-icon-badge
|
|
18
13
|
class="dx-play-button"
|
|
19
|
-
symbol=
|
|
14
|
+
symbol="play"
|
|
20
15
|
background-color="white"
|
|
21
16
|
slot="image-badge"
|
|
22
17
|
></dx-icon-badge>
|
|
@@ -10,10 +10,4 @@ export default class CardVideoPreview extends LightningElement {
|
|
|
10
10
|
@api target?: string | null = null;
|
|
11
11
|
@api layout: "vertical" | "horizontal" = "vertical";
|
|
12
12
|
@api title!: string;
|
|
13
|
-
@api hasSocial?: boolean = false;
|
|
14
|
-
@api socialName?: string;
|
|
15
|
-
@api socialJobTitle?: string;
|
|
16
|
-
@api socialPlatform?: string;
|
|
17
|
-
@api socialProfileImgSrc?: string;
|
|
18
|
-
@api overlayIcon? = "play";
|
|
19
13
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@import "dxHelpers/text";
|
|
2
|
+
@import "dxHelpers/reset";
|
|
3
|
+
|
|
4
|
+
iframe {
|
|
5
|
+
border-radius: 16px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
h2 {
|
|
9
|
+
margin-top: var(--dx-g-spacing-md);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.profile-image {
|
|
13
|
+
height: 48px;
|
|
14
|
+
width: 48px;
|
|
15
|
+
border-radius: 48px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.profile-container {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.profile-text {
|
|
24
|
+
margin-left: 10px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.profile-text p {
|
|
28
|
+
color: var(--dx-g-blue-vibrant-20);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
dx-icon-badge {
|
|
32
|
+
margin-left: auto;
|
|
33
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="container">
|
|
3
|
+
<template lwc:if={isTwitter}>
|
|
4
|
+
<iframe
|
|
5
|
+
scrolling="no"
|
|
6
|
+
frameborder="0"
|
|
7
|
+
allowfullscreen="true"
|
|
8
|
+
title="X Post"
|
|
9
|
+
src={twitterSrc}
|
|
10
|
+
height="215"
|
|
11
|
+
width="382"
|
|
12
|
+
></iframe>
|
|
13
|
+
</template>
|
|
14
|
+
<template lwc:if={isLinkedin}>
|
|
15
|
+
<iframe
|
|
16
|
+
scrolling="no"
|
|
17
|
+
src={linkedinSrc}
|
|
18
|
+
height="215"
|
|
19
|
+
width="382"
|
|
20
|
+
frameborder="0"
|
|
21
|
+
allowfullscreen=""
|
|
22
|
+
title="Embedded post"
|
|
23
|
+
></iframe>
|
|
24
|
+
</template>
|
|
25
|
+
<h2 class="dx-text-display-6">{title}</h2>
|
|
26
|
+
<p class="dx-text-body-2">{body}</p>
|
|
27
|
+
<div lwc:if={hasSocial}>
|
|
28
|
+
<dx-hr no-padding="true" spacing="smd"></dx-hr>
|
|
29
|
+
<div class="profile-container">
|
|
30
|
+
<img
|
|
31
|
+
class="profile-image"
|
|
32
|
+
src={socialProfileImgSrc}
|
|
33
|
+
alt={socialProfileImgAlt}
|
|
34
|
+
/>
|
|
35
|
+
<div class="profile-text">
|
|
36
|
+
<p class="dx-text-display-8">{socialName}</p>
|
|
37
|
+
<p class="dx-text-body-3">{socialJobTitle}</p>
|
|
38
|
+
</div>
|
|
39
|
+
<dx-icon-badge
|
|
40
|
+
symbol={socialPlatform}
|
|
41
|
+
sprite="brand"
|
|
42
|
+
background-color="blue-vibrant-20"
|
|
43
|
+
icon-size="medium"
|
|
44
|
+
background-size="medium"
|
|
45
|
+
></dx-icon-badge>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { LightningElement, api } from "lwc";
|
|
2
|
+
|
|
3
|
+
export default class EmbeddedVideo extends LightningElement {
|
|
4
|
+
@api type: "twitter" | "linkedin" = "twitter";
|
|
5
|
+
@api videoId!: string;
|
|
6
|
+
@api compact = false;
|
|
7
|
+
|
|
8
|
+
@api title = "";
|
|
9
|
+
@api body = "";
|
|
10
|
+
|
|
11
|
+
@api hasSocial? = false;
|
|
12
|
+
@api socialPlatform?: string;
|
|
13
|
+
@api socialName?: string;
|
|
14
|
+
@api socialJobTitle?: string;
|
|
15
|
+
@api socialProfileImgSrc?: string;
|
|
16
|
+
|
|
17
|
+
get isTwitter() {
|
|
18
|
+
return this.type === "twitter";
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
get twitterSrc() {
|
|
22
|
+
return `https://platform.twitter.com/embed/Tweet.html?dnt=false&features=eyJ0ZndfdGltZWxpbmVfbGlzdCI6eyJidWNrZXQiOltdLCJ2ZXJzaW9uIjpudWxsfSwidGZ3X2ZvbGxvd2VyX2NvdW50X3N1bnNldCI6eyJidWNrZXQiOnRydWUsInZlcnNpb24iOm51bGx9LCJ0ZndfdHdlZXRfZWRpdF9iYWNrZW5kIjp7ImJ1Y2tldCI6Im9uIiwidmVyc2lvbiI6bnVsbH0sInRmd19yZWZzcmNfc2Vzc2lvbiI6eyJidWNrZXQiOiJvbiIsInZlcnNpb24iOm51bGx9LCJ0ZndfZm9zbnJfc29mdF9pbnRlcnZlbnRpb25zX2VuYWJsZWQiOnsiYnVja2V0Ijoib24iLCJ2ZXJzaW9uIjpudWxsfSwidGZ3X21peGVkX21lZGlhXzE1ODk3Ijp7ImJ1Y2tldCI6InRyZWF0bWVudCIsInZlcnNpb24iOm51bGx9LCJ0ZndfZXhwZXJpbWVudHNfY29va2llX2V4cGlyYXRpb24iOnsiYnVja2V0IjoxMjA5NjAwLCJ2ZXJzaW9uIjpudWxsfSwidGZ3X3Nob3dfYmlyZHdhdGNoX3Bpdm90c19lbmFibGVkIjp7ImJ1Y2tldCI6Im9uIiwidmVyc2lvbiI6bnVsbH0sInRmd19kdXBsaWNhdGVfc2NyaWJlc190b19zZXR0aW5ncyI6eyJidWNrZXQiOiJvbiIsInZlcnNpb24iOm51bGx9LCJ0ZndfdXNlX3Byb2ZpbGVfaW1hZ2Vfc2hhcGVfZW5hYmxlZCI6eyJidWNrZXQiOiJvbiIsInZlcnNpb24iOm51bGx9LCJ0ZndfdmlkZW9faGxzX2R5bmFtaWNfbWFuaWZlc3RzXzE1MDgyIjp7ImJ1Y2tldCI6InRydWVfYml0cmF0ZSIsInZlcnNpb24iOm51bGx9LCJ0ZndfbGVnYWN5X3RpbWVsaW5lX3N1bnNldCI6eyJidWNrZXQiOnRydWUsInZlcnNpb24iOm51bGx9LCJ0ZndfdHdlZXRfZWRpdF9mcm9udGVuZCI6eyJidWNrZXQiOiJvbiIsInZlcnNpb24iOm51bGx9fQ%3D%3D&frame=false&hideCard=false&hideThread=false&id=${this.videoId}&lang=en&maxWidth=318px&origin=https%3A%2F%2Fpublish.twitter.com%2F%23&sessionId=89704af49f57022abd058f0b4cff7b8ed0d9e820&theme=light&widgetsVersion=2615f7e52b7e0%3A1702314776716&width=318px`;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
get isLinkedin() {
|
|
26
|
+
return this.type === "linkedin";
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
get linkedinSrc() {
|
|
30
|
+
return `https://www.linkedin.com/embed/feed/update/urn:li:ugcPost:${this.videoId}?compact=1`;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
get socialProfileImgAlt() {
|
|
34
|
+
return `headshot of ${this.socialName}`;
|
|
35
|
+
}
|
|
36
|
+
}
|