@capillarytech/creatives-library 7.12.74 → 7.12.76

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "7.12.74",
4
+ "version": "7.12.76",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -31,6 +31,7 @@ import { GA } from '@capillarytech/cap-ui-utils';
31
31
  import { CREATE, TRACK_CREATE_MPUSH } from '../../App/constants';
32
32
  import { MOBILE_PUSH } from '../../CreativesContainer/constants';
33
33
  import { getContent } from '../commonMethods';
34
+ import { getCdnUrl } from '../../../utils/cdnTransformation'
34
35
 
35
36
  const PrefixWrapper = styled.div`
36
37
  margin-right: 16px;
@@ -464,7 +465,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
464
465
  const secondaryCta2 = !!android['cta-deeplink-secondary-cta-1-select'] || !!android['secondary-cta-1-label'];
465
466
  const imageLink = android.image;
466
467
  if (imageLink) {
467
- obj.versions.base.ANDROID.expandableDetails.image = imageLink;
468
+ obj.versions.base.ANDROID.expandableDetails.image = getCdnUrl({url: imageLink});
468
469
  obj.versions.base.ANDROID.expandableDetails.style = "BIG_PICTURE";
469
470
  }
470
471
  if (secondaryCta1 || secondaryCta2 ) {
@@ -538,7 +539,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
538
539
  const imageLinkIos = ios.image;
539
540
  const secondaryCtaIos = !!ios['cta-deeplink-secondary-cta-1-select'] || !!ios['secondary-cta-1-label'];
540
541
  if (imageLinkIos) {
541
- obj.versions.base.IOS.expandableDetails.image = imageLinkIos;
542
+ obj.versions.base.IOS.expandableDetails.image = getCdnUrl({url: imageLinkIos});
542
543
  obj.versions.base.IOS.expandableDetails.style = "BIG_PICTURE";
543
544
  }
544
545
  if (secondaryCtaIos) {
@@ -33,6 +33,7 @@ import {getPrimaryCtaFields, getSecondaryCtaFields, getLinkTypeFields, getConten
33
33
  import { GA } from '@capillarytech/cap-ui-utils';
34
34
  import { EDIT, TRACK_EDIT_MPUSH } from '../../App/constants';
35
35
  import { MOBILE_PUSH } from '../../CreativesContainer/constants';
36
+ import { getCdnUrl } from '../../../utils/cdnTransformation';
36
37
 
37
38
  const PrefixWrapper = styled.div`
38
39
  margin-right: 16px;
@@ -421,7 +422,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
421
422
  }
422
423
  const imageLink = android.image;
423
424
  if (imageLink) {
424
- obj.versions.base.ANDROID.expandableDetails.image = imageLink;
425
+ obj.versions.base.ANDROID.expandableDetails.image = getCdnUrl({url: imageLink});
425
426
  obj.versions.base.ANDROID.expandableDetails.style = "BIG_PICTURE";
426
427
  }
427
428
  if (obj.versions.base.ANDROID && obj.versions.base.ANDROID.cta) {
@@ -492,7 +493,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
492
493
  }
493
494
  const imageLinkIos = ios.image;
494
495
  if (imageLinkIos) {
495
- obj.versions.base.IOS.expandableDetails.image = imageLinkIos;
496
+ obj.versions.base.IOS.expandableDetails.image = getCdnUrl({url: imageLinkIos});
496
497
  obj.versions.base.IOS.expandableDetails.style = "BIG_PICTURE";
497
498
  }
498
499
  if (obj.versions.base.IOS && obj.versions.base.IOS.cta) {
@@ -74,6 +74,8 @@ import {
74
74
  PHONE_NUMBER,
75
75
  WEBSITE,
76
76
  } from '../../v2Components/CapWhatsappCTA/constants';
77
+ import { getCdnUrl } from '../../utils/cdnTransformation';
78
+
77
79
  let varMap = {};
78
80
  let editContent = {};
79
81
  let tagValidationResponse = {};
@@ -855,7 +857,7 @@ export const Whatsapp = (props) => {
855
857
  }),
856
858
  mediaType: templateMediaType,
857
859
  ...(isMediaTypeImage && {
858
- imageUrl: whatsappImageSrc,
860
+ imageUrl: getCdnUrl({url: whatsappImageSrc}),
859
861
  karixFileHandle,
860
862
  }),
861
863
  varMapped: !isFullMode ? varMap : {},