@capillarytech/creatives-library 3.0.34 → 3.0.35
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,6 @@ 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';
|
|
13
12
|
import {CapColumn} from '@capillarytech/cap-react-ui-library';
|
|
14
13
|
import './_templatePreview.scss';
|
|
15
14
|
import {updateCharCount} from '../../utils/smsCharCountV2';
|
|
@@ -51,8 +50,6 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
|
|
|
51
50
|
return undefined;
|
|
52
51
|
});
|
|
53
52
|
}
|
|
54
|
-
const BoldText = styled.span`
|
|
55
|
-
font-weight: 800;`;
|
|
56
53
|
return (
|
|
57
54
|
<div className={`preview-container ${type === 'embedded' ? 'embedded-preview' : ''}`}>
|
|
58
55
|
{ channel && channel.toLowerCase() === 'sms' &&
|
|
@@ -152,10 +149,9 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
|
|
|
152
149
|
{smsDetails.unicode &&
|
|
153
150
|
<div style={{fontSize: '16px'}}>{`${this.props.intl.formatMessage(messages.smsFormatType)}`}</div>
|
|
154
151
|
}
|
|
155
|
-
<div style={{marginTop: '8px', fontSize: '16px'}} >{`${this.props.intl.formatMessage(messages.sms)}
|
|
156
|
-
<div style={{fontSize: '16px'}}>{`${this.props.intl.formatMessage(messages.charactersPerSms)}: ${smsDetails.chars_used}`}</div>
|
|
152
|
+
<div style={{marginTop: '8px', fontSize: '16px'}} >{`${smsDetails.parts} ${this.props.intl.formatMessage(messages.sms)} (${smsDetails.chars_used} ${this.props.intl.formatMessage(messages.characters)})`}</div>
|
|
157
153
|
{smsDetails.optoutUrlPresent && <div style={{fontWeight: '100', fontSize: '12px'}}>
|
|
158
|
-
{`${this.props.intl.formatMessage(messages.
|
|
154
|
+
{`${this.props.intl.formatMessage(messages.includesOptoutTag)} (${smsDetails.optouturlLength} ${this.props.intl.formatMessage(messages.characters)})`}
|
|
159
155
|
</div>}
|
|
160
156
|
</p>
|
|
161
157
|
</div>
|
|
@@ -14,9 +14,9 @@ export default defineMessages({
|
|
|
14
14
|
id: 'creatives.components.TemplatePreview.sms',
|
|
15
15
|
defaultMessage: "SMS",
|
|
16
16
|
},
|
|
17
|
-
|
|
18
|
-
id: 'creatives.components.TemplatePreview.
|
|
19
|
-
defaultMessage: "
|
|
17
|
+
characters: {
|
|
18
|
+
id: 'creatives.components.TemplatePreview.characters',
|
|
19
|
+
defaultMessage: "characters",
|
|
20
20
|
},
|
|
21
21
|
charactersTotal: {
|
|
22
22
|
id: 'creatives.components.TemplatePreview.charactersTotal',
|
|
@@ -26,17 +26,9 @@ export default defineMessages({
|
|
|
26
26
|
id: 'creatives.components.TemplatePreview.smsFormatType',
|
|
27
27
|
defaultMessage: 'Message has unicode characters',
|
|
28
28
|
},
|
|
29
|
-
|
|
30
|
-
id: 'app.components.TemplatePreview.
|
|
31
|
-
defaultMessage: 'Includes',
|
|
32
|
-
},
|
|
33
|
-
optout: {
|
|
34
|
-
id: 'app.components.TemplatePreview.optout',
|
|
35
|
-
defaultMessage: 'Optout',
|
|
36
|
-
},
|
|
37
|
-
tag: {
|
|
38
|
-
id: 'app.components.TemplatePreview.tag',
|
|
39
|
-
defaultMessage: 'tag',
|
|
29
|
+
includesOptoutTag: {
|
|
30
|
+
id: 'app.components.TemplatePreview.includesOptoutTag',
|
|
31
|
+
defaultMessage: 'Includes Optout tag',
|
|
40
32
|
},
|
|
41
33
|
previewGenerated: {
|
|
42
34
|
id: 'creatives.components.TemplatePreview.previewGenerated',
|
package/package.json
CHANGED
|
@@ -81,7 +81,7 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
|
|
|
81
81
|
</div>
|
|
82
82
|
</div>
|
|
83
83
|
{!this.props.showCount && <div>
|
|
84
|
-
<CapColumn className="character-count-col" span={
|
|
84
|
+
<CapColumn className="character-count-col" span={22}>
|
|
85
85
|
{channel && channel.toLowerCase() === 'sms' && <CapHeading type="h3">
|
|
86
86
|
<FormattedMessage {...messages.charactersTotal} values={{smsCount: smsDetails.parts, charCount: smsDetails.chars_used}}/>
|
|
87
87
|
{smsDetails.unicode &&
|
|
@@ -274,4 +274,8 @@ export default defineMessages({
|
|
|
274
274
|
id: 'creatives.containersV2.Email.goBackTemporaryChangesLost',
|
|
275
275
|
defaultMessage: "Do you really want to go back? All your temporary changes will be lost!",
|
|
276
276
|
},
|
|
277
|
+
"alertMessage": {
|
|
278
|
+
id: 'creatives.containersV2.Email.alertMessage',
|
|
279
|
+
defaultMessage: 'Alert',
|
|
280
|
+
},
|
|
277
281
|
});
|