@capillarytech/creatives-library 2.0.93 → 2.0.94
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 +1 -1
- package/assets/android-message-gui-2.svg +0 -55
- package/components/CallTaskPreview/_callTaskPreview.scss +0 -17
- package/components/CallTaskPreview/images/Footer.png +0 -0
- package/components/CallTaskPreview/images/Header.png +0 -0
- package/components/CallTaskPreview/index.js +0 -37
- package/components/CallTaskPreview/messages.js +0 -13
- package/components/CallTaskPreview/tests/index.test.js +0 -15
- package/components/CmsTemplatesComponent/index.js +0 -33
- package/components/CmsTemplatesComponent/messages.js +0 -17
- package/components/CmsTemplatesComponent/tests/index.test.js +0 -10
- package/components/EmailMobilePreview/index.js +0 -129
- package/components/EmailMobilePreview/index.scss +0 -55
- package/components/EmailPreviewV2/_emailPreviewV2.scss +0 -69
- package/components/EmailPreviewV2/index.js +0 -132
- package/components/EmailPreviewV2/messages.js +0 -41
- package/components/EmailPreviewV2/tests/index.test.js +0 -10
- package/components/MobilePushPreviewV2/index.js +0 -120
- package/components/MobilePushPreviewV2/messages.js +0 -13
- package/components/MobilePushPreviewV2/tests/index.test.js +0 -10
- package/components/NewCallTask/_newCallTask.scss +0 -9
- package/components/NewCallTask/index.js +0 -152
- package/components/NewCallTask/messages.js +0 -29
- package/components/NewCallTask/tests/index.test.js +0 -10
- package/components/SmsPreviewV2/_smsPreviewV2.scss +0 -353
- package/components/SmsPreviewV2/index.js +0 -69
- package/components/SmsPreviewV2/messages.js +0 -13
- package/components/SmsPreviewV2/tests/index.test.js +0 -10
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* SmsPreviewV2
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import React from 'react';
|
|
8
|
-
// import styled from 'styled-components';
|
|
9
|
-
|
|
10
|
-
import { FormattedMessage } from 'react-intl';
|
|
11
|
-
import messages from './messages';
|
|
12
|
-
import {CapColumn, CapRow, CapHeading} from '@capillarytech/cap-ui-library';
|
|
13
|
-
import androidPhoneImage from '../../assets/android-message-gui-2.svg';
|
|
14
|
-
|
|
15
|
-
class SmsPreviewV2 extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
16
|
-
render() {
|
|
17
|
-
let content = [this.props.content];
|
|
18
|
-
const channel = this.props.channel;
|
|
19
|
-
let smsDetails = {};
|
|
20
|
-
if (this.props.content && this.props.charCounterEnabled) {
|
|
21
|
-
smsDetails = updateCharCount(this.props.content, this.props.unicodeEnabled);
|
|
22
|
-
content = [];
|
|
23
|
-
for (let i = 0, limit = 0; i < smsDetails.parts; i += 1, limit += smsDetails.chars_sms) {
|
|
24
|
-
content.push(smsDetails.char_list.slice(limit, smsDetails.chars_sms * (i + 1)));
|
|
25
|
-
}
|
|
26
|
-
if (document.getElementById("msg_count") && this.props.showCount) {
|
|
27
|
-
document.getElementById("msg_count").val = smsDetails.parts;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
const type = this.props.location && this.props.location.query.type ? this.props.location.query.type : '';
|
|
31
|
-
return (
|
|
32
|
-
<CapRow>
|
|
33
|
-
{this.props.showCount && <CapColumn span={16}>
|
|
34
|
-
{channel && channel.toLowerCase() === 'sms' && <CapHeading type="h3">
|
|
35
|
-
<FormattedMessage {...messages.charactersTotal} values={{smsCount: smsDetails.parts, charCount: smsDetails.chars_used}}/>
|
|
36
|
-
{smsDetails.unicode &&
|
|
37
|
-
<FormattedMessage {...messages.smsFormatType}/>
|
|
38
|
-
}
|
|
39
|
-
</CapHeading>}
|
|
40
|
-
</CapColumn>}
|
|
41
|
-
<CapColumn span={this.props.showCount ? 8 : 24}>
|
|
42
|
-
<div className={`preview-container ${type === 'embedded' ? 'embedded-preview' : ''}`}>
|
|
43
|
-
{ channel && channel.toLowerCase() === 'sms' &&
|
|
44
|
-
<div className="shell align-center" id="sms-preview">
|
|
45
|
-
<img className="preview-image sms" src={smsBody} alt="Preview is being generated"/>
|
|
46
|
-
<div className="msgContainer sms">
|
|
47
|
-
<img className="sms-icon" src={smsIcon} alt="Sms icon" />
|
|
48
|
-
<div className={"message-pop sms"}>
|
|
49
|
-
{content && content.length && content.map((msg, index) =>
|
|
50
|
-
<CapColumn key={`"message-pop-content-${index}`} className="message-pop-item align-left" style={{ background: '#3F51B5', color: '#ffffff'}}>
|
|
51
|
-
{msg}
|
|
52
|
-
</CapColumn>)
|
|
53
|
-
}
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
}
|
|
58
|
-
</div>
|
|
59
|
-
</CapColumn>
|
|
60
|
-
</CapRow>
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
SmsPreviewV2.propTypes = {
|
|
66
|
-
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export default SmsPreviewV2;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* SmsPreviewV2 Messages
|
|
3
|
-
*
|
|
4
|
-
* This contains all the text for the SmsPreviewV2 component.
|
|
5
|
-
*/
|
|
6
|
-
import { defineMessages } from 'react-intl';
|
|
7
|
-
|
|
8
|
-
export default defineMessages({
|
|
9
|
-
header: {
|
|
10
|
-
id: 'app.components.SmsPreviewV2.header',
|
|
11
|
-
defaultMessage: 'This is the SmsPreviewV2 component !',
|
|
12
|
-
},
|
|
13
|
-
});
|