@capillarytech/creatives-library 3.0.33 → 3.0.34

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.
@@ -9,7 +9,7 @@ import PropTypes from 'prop-types';
9
9
  import React from 'react';
10
10
  import _ from 'lodash';
11
11
  import { injectIntl, intlShape} from 'react-intl';
12
- // import styled from 'styled-components';
12
+ import styled from 'styled-components';
13
13
  import {CapColumn} from '@capillarytech/cap-react-ui-library';
14
14
  import './_templatePreview.scss';
15
15
  import {updateCharCount} from '../../utils/smsCharCountV2';
@@ -51,6 +51,8 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
51
51
  return undefined;
52
52
  });
53
53
  }
54
+ const BoldText = styled.span`
55
+ font-weight: 800;`;
54
56
  return (
55
57
  <div className={`preview-container ${type === 'embedded' ? 'embedded-preview' : ''}`}>
56
58
  { channel && channel.toLowerCase() === 'sms' &&
@@ -152,10 +154,8 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
152
154
  }
153
155
  <div style={{marginTop: '8px', fontSize: '16px'}} >{`${this.props.intl.formatMessage(messages.sms)}: ${smsDetails.parts}`}</div>
154
156
  <div style={{fontSize: '16px'}}>{`${this.props.intl.formatMessage(messages.charactersPerSms)}: ${smsDetails.chars_used}`}</div>
155
- { smsDetails.optoutUrlPresent && <div>
156
- <span style={{fontWeight: '100', fontSize: '12px'}}>{this.props.intl.formatMessage(messages.includes)}</span>
157
- <span style={{fontSize: '12px'}}>{this.props.intl.formatMessage(messages.optout)}</span>
158
- <span style={{fontWeight: '100', fontSize: '12px'}}>{this.props.intl.formatMessage(messages.tag)}</span>: {smsDetails.optouturlLength}
157
+ {smsDetails.optoutUrlPresent && <div style={{fontWeight: '100', fontSize: '12px'}}>
158
+ {`${this.props.intl.formatMessage(messages.includes)} `}<BoldText>{`${this.props.intl.formatMessage(messages.optout)} `}</BoldText>{this.props.intl.formatMessage(messages.tag)}: {smsDetails.optouturlLength}
159
159
  </div>}
160
160
  </p>
161
161
  </div>
@@ -28,15 +28,15 @@ export default defineMessages({
28
28
  },
29
29
  includes: {
30
30
  id: 'app.components.TemplatePreview.includes',
31
- defaultMessage: 'Includes ',
31
+ defaultMessage: 'Includes',
32
32
  },
33
33
  optout: {
34
34
  id: 'app.components.TemplatePreview.optout',
35
- defaultMessage: 'Optout ',
35
+ defaultMessage: 'Optout',
36
36
  },
37
37
  tag: {
38
38
  id: 'app.components.TemplatePreview.tag',
39
- defaultMessage: 'tag ',
39
+ defaultMessage: 'tag',
40
40
  },
41
41
  previewGenerated: {
42
42
  id: 'creatives.components.TemplatePreview.previewGenerated',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "3.0.33",
4
+ "version": "3.0.34",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -62,7 +62,6 @@ export function updateCharCount(content, isUnicodeEnabled) {
62
62
  showOptoutCount = false;
63
63
  responseState = "FAIL";
64
64
  optoutUrl = undefined;
65
- console.log('get optouturl error: ', err);
66
65
  });
67
66
  }
68
67
  const optoutTag = /{{optout}}/g;
@@ -147,11 +146,6 @@ export function updateCharCount(content, isUnicodeEnabled) {
147
146
  }
148
147
 
149
148
  chars_used = showOptoutCount ? (chars_used - (optoutTagLength * noOfOptout)) : chars_used;
150
- console.log('Type:', (coding == '7bit' ? '7bit' : 'Unicode'));
151
- console.log('Parts:', parts);
152
- console.log('SMS Chars:', chars_sms);
153
- console.log('SMS Char total:', chars_used);
154
- console.log('SMS optouturl: ', optoutUrl);
155
149
  return {
156
150
  unicode: (coding === '7bit' ? false : true),
157
151
  parts,