@capillarytech/creatives-library 7.12.76 → 7.12.77

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.76",
4
+ "version": "7.12.77",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -7,7 +7,8 @@ import { parse } from 'node-html-parser';
7
7
  const CDN_BASE_URL = `https://storage.crm.n.content-cdn.io`;
8
8
  const CDN_TRANSFORMATION_URL_SUFFIX = `/cdn-cgi/image/`;
9
9
  const QUALITY = 75;
10
- const regex = /https:\/\/.*intouch_creative_assets.*(?:jpg|png|jpeg|gif)$/;
10
+ // const regex = /https:\/\/.*intouch_creative_assets.*(?:jpg|png|jpeg|gif)$/;
11
+ const regex = /https:\/\/.*intouch_creative_assets.*$/;
11
12
  const INTOUCH_CREATIVE_ASSETS = 'intouch_creative_assets';
12
13
 
13
14
  /**
@@ -34,6 +34,7 @@ import * as templateActionsConfig from '../../Templates/actions';
34
34
  import withCreatives from '../../../hoc/withCreatives';
35
35
  import { gtmPush } from '../../../utils/gtmTrackers';
36
36
  import { LINE } from '../../CreativesContainer/constants';
37
+ import { getCdnUrl } from '../../../utils/cdnTransformation';
37
38
 
38
39
  const { stopTimer } = GA.timeTracker;
39
40
 
@@ -401,7 +402,7 @@ export const LineContainer = ({
401
402
  messageData.previewImageUrl = previewImageUrl;
402
403
  }
403
404
  if (originalContentUrl) {
404
- messageData.originalContentUrl = originalContentUrl;
405
+ messageData.originalContentUrl = getCdnUrl({url: originalContentUrl});
405
406
  }
406
407
  if (selectedSticker) {
407
408
  messageData.stickerUrl = selectedSticker.stickerUrl;
@@ -410,7 +411,7 @@ export const LineContainer = ({
410
411
  messageData.stickerId = `${selectedSticker.stickerId}`;
411
412
  }
412
413
  if (baseUrl) {
413
- messageData.baseUrl = baseUrl;
414
+ messageData.baseUrl = getCdnUrl({url: baseUrl});
414
415
  messageData.altText = altText;
415
416
  }
416
417
  if (baseSize) {
@@ -426,7 +427,7 @@ export const LineContainer = ({
426
427
  type: 'bubble',
427
428
  hero: {
428
429
  type: 'image',
429
- url: item.imageUrl,
430
+ url: getCdnUrl({url: item.imageUrl}),
430
431
  size: 'full',
431
432
  aspectRatio: item.aspectRatio,
432
433
  aspectMode: 'cover',
@@ -473,7 +474,7 @@ export const LineContainer = ({
473
474
  height: videoHeight,
474
475
  width: videoWidth,
475
476
  },
476
- originalContentUrl: videoSrc,
477
+ originalContentUrl: getCdnUrl({url: videoSrc, transformationEnabled: false, reduceQuality: false}),
477
478
  previewImageUrl,
478
479
  };
479
480
  if (actionLabel) {