@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.
@@ -1,3 +1,4 @@
1
- <svg width="34" height="34" viewBox="0 0 34 34" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M17.0026 0.333496C7.8026 0.333496 0.335938 7.80016 0.335938 17.0002C0.335938 26.2002 7.8026 33.6668 17.0026 33.6668C26.2026 33.6668 33.6693 26.2002 33.6693 17.0002C33.6693 7.80016 26.2026 0.333496 17.0026 0.333496ZM12.8359 21.4502V12.5502C12.8359 11.2335 14.3026 10.4335 15.4026 11.1502L22.3193 15.6002C23.3359 16.2502 23.3359 17.7502 22.3193 18.4002L15.4026 22.8502C14.3026 23.5668 12.8359 22.7668 12.8359 21.4502Z" fill="#091E42"/>
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "7.14.26",
4
+ "version": "7.14.27",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -291,6 +291,7 @@
291
291
  margin-bottom: 4px;
292
292
  .pdf-img-box {
293
293
  width: 153px;
294
+ height: 60px;
294
295
  img {
295
296
  width: 100%;
296
297
  }
@@ -476,4 +477,7 @@
476
477
  position: absolute;
477
478
  right: -17px;
478
479
  bottom: -17px;
480
+ }
481
+ .whatsapp-doc {
482
+
479
483
  }
@@ -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
- <div className="video-preview">
746
- <CapImage
747
- src={content.whatsappVideoPreviewImg}
748
- className="whatsapp-image"
749
- alt={formatMessage(messages.previewGenerated)}
750
- />
751
- <div className="icon-position">
752
- <CapImage className="video-icon" src={videoPlay} />
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
- </div>
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
  >