@capillarytech/creatives-library 7.14.26 → 7.14.27
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/assets/videoPlay.svg +3 -2
- package/package.json +1 -1
- package/v2Components/TemplatePreview/_templatePreview.scss +4 -0
- package/v2Components/TemplatePreview/index.js +14 -10
- package/v2Components/TemplatePreview/messages.js +4 -0
- package/v2Containers/Templates/index.js +2 -2
- package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +0 -9
package/assets/videoPlay.svg
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<
|
|
1
|
+
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<circle cx="20" cy="20" r="18" fill="white"/>
|
|
3
|
+
<path d="M20 3.63647C10.9673 3.63647 3.63635 10.9674 3.63635 20.0001C3.63635 29.0328 10.9673 36.3637 20 36.3637C29.0327 36.3637 36.3636 29.0328 36.3636 20.0001C36.3636 10.9674 29.0327 3.63647 20 3.63647ZM15.9091 24.3692V15.631C15.9091 14.3383 17.3491 13.5528 18.4291 14.2565L25.22 18.6256C26.2182 19.2637 26.2182 20.7365 25.22 21.3747L18.4291 25.7437C17.3491 26.4474 15.9091 25.6619 15.9091 24.3692Z" fill="#091E42"/>
|
|
3
4
|
</svg>
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@ import React from 'react';
|
|
|
10
10
|
import _ from 'lodash';
|
|
11
11
|
import { injectIntl, FormattedMessage, intlShape } from 'react-intl';
|
|
12
12
|
// import styled from 'styled-components';
|
|
13
|
-
import { CapColumn, CapRow, CapHeading, CapIcon, CapButton, CapImage, CapLabel, CapDivider } from '@capillarytech/cap-ui-library';
|
|
13
|
+
import { CapColumn, CapRow, CapHeading, CapIcon, CapButton, CapImage, CapLabel, CapDivider, CapTooltip } from '@capillarytech/cap-ui-library';
|
|
14
14
|
import './_templatePreview.scss';
|
|
15
15
|
import {updateCharCount} from '../../utils/smsCharCountV2';
|
|
16
16
|
import messages from './messages';
|
|
@@ -742,16 +742,20 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
742
742
|
/>
|
|
743
743
|
)}
|
|
744
744
|
{content?.whatsappVideoPreviewImg && (
|
|
745
|
-
<
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
745
|
+
<CapTooltip
|
|
746
|
+
title={formatMessage(messages.videoPreviewTooltip)}
|
|
747
|
+
>
|
|
748
|
+
<div className="video-preview">
|
|
749
|
+
<CapImage
|
|
750
|
+
src={content.whatsappVideoPreviewImg}
|
|
751
|
+
className="whatsapp-image"
|
|
752
|
+
alt={formatMessage(messages.previewGenerated)}
|
|
753
|
+
/>
|
|
754
|
+
<div className="icon-position">
|
|
755
|
+
<CapImage className="video-icon" src={videoPlay} />
|
|
756
|
+
</div>
|
|
753
757
|
</div>
|
|
754
|
-
</
|
|
758
|
+
</CapTooltip>
|
|
755
759
|
)}
|
|
756
760
|
{content?.docPreview && (
|
|
757
761
|
<div className="whatsapp-image">
|
|
@@ -78,4 +78,8 @@ export default defineMessages({
|
|
|
78
78
|
id: 'creatives.componentsV2.TemplatePreview.showDetails',
|
|
79
79
|
defaultMessage: 'Show details',
|
|
80
80
|
},
|
|
81
|
+
videoPreviewTooltip: {
|
|
82
|
+
id: 'creatives.componentsV2.TemplatePreview.videoPreviewTooltip',
|
|
83
|
+
defaultMessage: "This is just for preview purposes, video cannot be played here",
|
|
84
|
+
},
|
|
81
85
|
});
|
|
@@ -1090,10 +1090,10 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
1090
1090
|
</div>
|
|
1091
1091
|
</div>
|
|
1092
1092
|
)}
|
|
1093
|
-
<div className="whatsapp-doc">{docPreview}</div>
|
|
1093
|
+
{docPreview && <div className="whatsapp-doc">{docPreview}</div>}
|
|
1094
1094
|
<span
|
|
1095
1095
|
className={`${
|
|
1096
|
-
whatsappImageSrc
|
|
1096
|
+
(whatsappImageSrc || whatsappVideoPreviewImg || docPreview)
|
|
1097
1097
|
? 'whatsapp-message-with-image'
|
|
1098
1098
|
: 'whatsapp-message-without-image'
|
|
1099
1099
|
}`}
|
|
@@ -787,9 +787,6 @@ exports[`Test Templates container Test max templates exceeded 1`] = `
|
|
|
787
787
|
src="https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/c9edc114-923b-4ac7-82d0-d6682213.jpg"
|
|
788
788
|
/>
|
|
789
789
|
|
|
790
|
-
<div
|
|
791
|
-
className="whatsapp-doc"
|
|
792
|
-
/>
|
|
793
790
|
<span
|
|
794
791
|
className="whatsapp-message-with-image"
|
|
795
792
|
>
|
|
@@ -1225,9 +1222,6 @@ exports[`Test Templates container Test max templates not exceeded 1`] = `
|
|
|
1225
1222
|
src="https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/c9edc114-923b-4ac7-82d0-d6682213.jpg"
|
|
1226
1223
|
/>
|
|
1227
1224
|
|
|
1228
|
-
<div
|
|
1229
|
-
className="whatsapp-doc"
|
|
1230
|
-
/>
|
|
1231
1225
|
<span
|
|
1232
1226
|
className="whatsapp-message-with-image"
|
|
1233
1227
|
>
|
|
@@ -1663,9 +1657,6 @@ exports[`Test Templates container Test max templates warning 1`] = `
|
|
|
1663
1657
|
src="https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/c9edc114-923b-4ac7-82d0-d6682213.jpg"
|
|
1664
1658
|
/>
|
|
1665
1659
|
|
|
1666
|
-
<div
|
|
1667
|
-
className="whatsapp-doc"
|
|
1668
|
-
/>
|
|
1669
1660
|
<span
|
|
1670
1661
|
className="whatsapp-message-with-image"
|
|
1671
1662
|
>
|