@capillarytech/creatives-library 2.0.82 → 2.0.83
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/components/CapTagList/index.js +24 -21
- package/components/CardGrid/index.js +10 -16
- package/components/Ckeditor/index.js +1 -2
- package/components/CustomPopOver/index.js +1 -1
- package/components/EmailPreview/index.js +2 -3
- package/components/FormBuilder/_formBuilder.scss +15 -8
- package/components/FormBuilder/index.js +194 -260
- package/components/Header/index.js +1 -4
- package/components/PreviewSideBar/_previewsidebar.scss +1 -1
- package/components/PreviewSideBar/index.js +5 -3
- package/components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +3 -2
- package/components/TemplatePreview/_templatePreview.scss +1 -1
- package/components/TemplatePreview/index.js +47 -47
- package/components/TemplatePreview/messages.js +1 -9
- package/containers/Assets/Gallery/index.js +1 -1
- package/containers/Email/index.js +1 -1
- package/containers/Login/components/LoginForm/index.js +1 -1
- package/containers/Templates/index.js +1 -1
- package/containers/WeChat/RichmediaTemplates/Create/index.js +1 -1
- package/package.json +2 -1
- package/v2Components/BreadCrumbs/index.js +65 -0
- package/v2Components/BreadCrumbs/messages.js +13 -0
- package/v2Components/BreadCrumbs/tests/index.test.js +10 -0
- package/v2Components/CallTaskPreview/_callTaskPreview.scss +17 -0
- package/v2Components/CallTaskPreview/images/Footer.png +0 -0
- package/v2Components/CallTaskPreview/images/Header.png +0 -0
- package/v2Components/CallTaskPreview/index.js +37 -0
- package/v2Components/CallTaskPreview/messages.js +13 -0
- package/v2Components/CallTaskPreview/tests/index.test.js +15 -0
- package/v2Components/CapTagList/index.js +232 -0
- package/v2Components/CapTagList/messages.js +25 -0
- package/v2Components/CapTagList/tests/index.test.js +10 -0
- package/v2Components/Card/_customCard.scss +27 -0
- package/v2Components/Card/index.js +78 -0
- package/{containers/WeChat → v2Components/Card}/tests/index.test.js +2 -2
- package/v2Components/CardGrid/index.js +77 -0
- package/v2Components/CardGrid/tests/index.test.js +10 -0
- package/v2Components/Ckeditor/index.js +234 -0
- package/v2Components/Ckeditor/messages.js +13 -0
- package/v2Components/Ckeditor/tests/index.test.js +10 -0
- package/v2Components/CmsTemplatesComponent/index.js +33 -0
- package/v2Components/CmsTemplatesComponent/messages.js +17 -0
- package/v2Components/CmsTemplatesComponent/tests/index.test.js +10 -0
- package/v2Components/Component/index.js +29 -0
- package/v2Components/Component/tests/index.test.js +10 -0
- package/v2Components/CustomPopOver/index.js +82 -0
- package/v2Components/CustomPopOver/messages.js +13 -0
- package/v2Components/CustomPopOver/tests/index.test.js +10 -0
- package/v2Components/DateFilter/index.js +349 -0
- package/v2Components/DateFilter/messages.js +17 -0
- package/v2Components/DateFilter/tests/index.test.js +15 -0
- package/v2Components/DateRange/index.js +113 -0
- package/v2Components/DateRange/messages.js +13 -0
- package/v2Components/DateRange/tests/index.test.js +10 -0
- package/v2Components/Edmeditor/index.js +65 -0
- package/v2Components/Edmeditor/messages.js +13 -0
- package/v2Components/Edmeditor/tests/index.test.js +10 -0
- package/v2Components/EmailMobilePreview/index.js +129 -0
- package/v2Components/EmailMobilePreview/index.scss +55 -0
- package/v2Components/EmailPreview/_emailPreview.scss +119 -0
- package/v2Components/EmailPreview/index.js +106 -0
- package/v2Components/EmailPreview/messages.js +17 -0
- package/v2Components/EmailPreview/tests/index.test.js +10 -0
- package/v2Components/EmailPreviewV2/_emailPreviewV2.scss +69 -0
- package/v2Components/EmailPreviewV2/index.js +132 -0
- package/v2Components/EmailPreviewV2/messages.js +41 -0
- package/v2Components/EmailPreviewV2/tests/index.test.js +10 -0
- package/v2Components/Footer/index.js +27 -0
- package/v2Components/Footer/messages.js +13 -0
- package/v2Components/Footer/tests/index.test.js +10 -0
- package/v2Components/FormBuilder/_formBuilder.scss +78 -0
- package/v2Components/FormBuilder/index.js +3309 -0
- package/v2Components/FormBuilder/messages.js +13 -0
- package/v2Components/FormBuilder/tests/index.test.js +10 -0
- package/v2Components/Header/index.js +46 -0
- package/v2Components/Header/messages.js +25 -0
- package/v2Components/Header/tests/index.test.js +10 -0
- package/v2Components/ImagePreview/_imagePreview.scss +63 -0
- package/v2Components/ImagePreview/index.js +52 -0
- package/v2Components/ImagePreview/messages.js +13 -0
- package/v2Components/ImagePreview/tests/index.test.js +10 -0
- package/v2Components/MobilePushPreviewV2/index.js +120 -0
- package/v2Components/MobilePushPreviewV2/messages.js +13 -0
- package/v2Components/MobilePushPreviewV2/tests/index.test.js +10 -0
- package/v2Components/NewCallTask/_newCallTask.scss +9 -0
- package/v2Components/NewCallTask/index.js +152 -0
- package/v2Components/NewCallTask/messages.js +29 -0
- package/v2Components/NewCallTask/tests/index.test.js +10 -0
- package/v2Components/PageHeader/_pageHeader.scss +22 -0
- package/v2Components/PageHeader/index.js +37 -0
- package/v2Components/PageHeader/messages.js +13 -0
- package/v2Components/PageHeader/tests/index.test.js +10 -0
- package/v2Components/Pagination/_pagination.scss +5 -0
- package/v2Components/Pagination/index.js +49 -0
- package/v2Components/Pagination/tests/index.test.js +10 -0
- package/v2Components/PreviewSideBar/_previewsidebar.scss +28 -0
- package/v2Components/PreviewSideBar/index.js +150 -0
- package/v2Components/PreviewSideBar/messages.js +33 -0
- package/v2Components/PreviewSideBar/tests/index.test.js +10 -0
- package/v2Components/Sidebar/_sidebar.scss +115 -0
- package/v2Components/Sidebar/index.js +208 -0
- package/v2Components/Sidebar/messages.js +21 -0
- package/v2Components/Sidebar/tests/index.test.js +10 -0
- package/v2Components/SlideBox/_slideBox.scss +63 -0
- package/v2Components/SlideBox/index.js +48 -0
- package/v2Components/SlideBox/tests/index.test.js +103 -0
- package/v2Components/SmsEditor/index.js +55 -0
- package/v2Components/SmsEditor/tests/index.test.js +10 -0
- package/v2Components/SmsTest/index.js +115 -0
- package/v2Components/SmsTest/messages.js +13 -0
- package/v2Components/SmsTest/tests/index.test.js +10 -0
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/_wechatRichmediaTemplatePrev.scss +42 -0
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +139 -0
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +21 -0
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/tests/index.test.js +10 -0
- package/v2Components/TemplatePreview/_templatePreview.scss +352 -0
- package/v2Components/TemplatePreview/assets/images/WECHAT_5x.png +0 -0
- package/v2Components/TemplatePreview/assets/images/androidPushMessage.svg +45 -0
- package/v2Components/TemplatePreview/assets/images/iPhonePushMessage.svg +135 -0
- package/v2Components/TemplatePreview/assets/images/mobile.svg +24 -0
- package/v2Components/TemplatePreview/assets/images/sms-body.png +0 -0
- package/v2Components/TemplatePreview/assets/images/sms-icon.png +0 -0
- package/v2Components/TemplatePreview/assets/images/sms_mobile.png +0 -0
- package/v2Components/TemplatePreview/assets/images/user-icon.svg +19 -0
- package/v2Components/TemplatePreview/assets/images/wechat-mobile.svg +78 -0
- package/v2Components/TemplatePreview/index.js +175 -0
- package/v2Components/TemplatePreview/messages.js +37 -0
- package/v2Components/TemplatePreview/tests/index.test.js +10 -0
- package/v2Components/Toastr/index.js +60 -0
- package/v2Components/Toastr/messages.js +13 -0
- package/v2Components/Toastr/tests/index.test.js +10 -0
- package/v2Components/ToastrMessage/index.js +110 -0
- package/v2Components/ToastrMessage/messages.js +13 -0
- package/v2Components/ToastrMessage/tests/index.test.js +10 -0
- package/v2Components/TopBar/_topbar.scss +46 -0
- package/v2Components/TopBar/assets/images/capillary_logo.png +0 -0
- package/v2Components/TopBar/index.js +113 -0
- package/v2Components/TopBar/messages.js +29 -0
- package/v2Components/TopBar/tests/index.test.js +10 -0
- package/v2Containers/Assets/Gallery/index.js +1 -1
- package/v2Containers/CallTask/index.js +1 -1
- package/v2Containers/Cap/index.js +2 -2
- package/v2Containers/CreativesContainer/SlideBoxContent.js +3 -3
- package/v2Containers/CreativesContainer/index.js +1 -0
- package/v2Containers/Dashboard/index.js +2 -2
- package/v2Containers/Ebill/index.js +2 -2
- package/v2Containers/Email/index.js +4 -4
- package/v2Containers/EmailWrapper/index.js +1 -1
- package/v2Containers/Line/Create/index.js +1 -1
- package/v2Containers/Line/Edit/index.js +1 -1
- package/v2Containers/Login/index.js +1 -1
- package/v2Containers/MobilePush/Create/index.js +1 -1
- package/v2Containers/MobilePush/Edit/index.js +1 -1
- package/v2Containers/Sms/Create/index.js +1 -1
- package/v2Containers/Sms/Edit/index.js +1 -1
- package/v2Containers/TagList/index.js +1 -1
- package/v2Containers/Templates/index.js +4 -4
- package/v2Containers/TestPage/index.js +1 -1
- package/v2Containers/WeChat/MapTemplates/index.js +3 -3
- package/v2Containers/WeChat/RichmediaTemplates/Create/index.js +3 -3
- package/containers/WeChat/_wechat.scss +0 -8
- package/containers/WeChat/actions.js +0 -46
- package/containers/WeChat/constants.js +0 -28
- package/containers/WeChat/index.js +0 -1617
- package/containers/WeChat/messages.js +0 -73
- package/containers/WeChat/reducer.js +0 -74
- package/containers/WeChat/sagas.js +0 -86
- package/containers/WeChat/selectors.js +0 -25
- package/containers/WeChat/tests/actions.test.js +0 -18
- package/containers/WeChat/tests/reducer.test.js +0 -9
- package/containers/WeChat/tests/sagas.test.js +0 -15
- package/containers/WeChat/tests/selectors.test.js +0 -10
|
@@ -7,13 +7,10 @@
|
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
|
|
9
9
|
import React from 'react';
|
|
10
|
-
// import styled from 'styled-components';
|
|
11
10
|
import { FormattedMessage } from 'react-intl';
|
|
12
|
-
|
|
13
|
-
import { CapRow, CapColumn, CapInput, CapButton } from '@capillarytech/cap-ui-library';
|
|
11
|
+
import { CapRow, CapColumn, CapInput, CapButton } from '@capillarytech/cap-react-ui-library';
|
|
14
12
|
import messages from './messages';
|
|
15
13
|
|
|
16
|
-
|
|
17
14
|
function Header(props) {
|
|
18
15
|
return (
|
|
19
16
|
<div>
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
|
|
9
9
|
import React from 'react';
|
|
10
|
-
import
|
|
10
|
+
import moment from "moment";
|
|
11
|
+
import { CapButton } from '@capillarytech/cap-react-ui-library';
|
|
11
12
|
// import styled from 'styled-components';
|
|
12
13
|
|
|
13
14
|
import { FormattedMessage } from 'react-intl';
|
|
@@ -48,6 +49,7 @@ class PreviewSideBar extends React.Component { // eslint-disable-line react/pref
|
|
|
48
49
|
}
|
|
49
50
|
render() {
|
|
50
51
|
console.log('preview sidebar', this.props);
|
|
52
|
+
// const modeTypeLine = this.props.templateData.modeType; // expected: (text or image)
|
|
51
53
|
let content = '';
|
|
52
54
|
if (this.props.channel.toLowerCase() === 'wechat') {
|
|
53
55
|
console.log('Template Infog ', this.props.templateData);
|
|
@@ -106,7 +108,6 @@ class PreviewSideBar extends React.Component { // eslint-disable-line react/pref
|
|
|
106
108
|
device={this.state.device === "android" ? "android" : "iphone"}
|
|
107
109
|
channel={this.props.channel}
|
|
108
110
|
content={content || ''}
|
|
109
|
-
templateData={this.props.templateData}
|
|
110
111
|
>
|
|
111
112
|
</TemplatePreview>
|
|
112
113
|
:
|
|
@@ -116,10 +117,11 @@ class PreviewSideBar extends React.Component { // eslint-disable-line react/pref
|
|
|
116
117
|
location={this.props.location}
|
|
117
118
|
charCounterEnabled={this.props.channel.toLowerCase() === 'sms'}
|
|
118
119
|
unicodeEnabled={this.props.channel.toLowerCase() === 'sms'}
|
|
119
|
-
templateData={this.props.templateData}
|
|
120
120
|
>
|
|
121
121
|
</TemplatePreview>
|
|
122
122
|
}
|
|
123
|
+
<p className="preview-info"><FormattedMessage {...messages.lastModified} />: {moment(this.props.templateData).format('MM-DD-YYYY')}</p>
|
|
124
|
+
<p style={{marginBottom: '8px'}} className="preview-info"><FormattedMessage {...messages.uploadedBy} /> : {this.props.templateData.updatedByName}</p>
|
|
123
125
|
<hr className="seperator-line" />
|
|
124
126
|
<div className="preview-action-container" style={{margin: '16px'}}>
|
|
125
127
|
{this.props.channel.toLowerCase() === 'sms' && !this.props.embedded && <CapButton onClick={() => this.goToDuplicate()}className="preview-buttons" style={{marginRight: '8px'}} type="secondary"><FormattedMessage {...messages.duplicate} /></CapButton>}
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import React from 'react';
|
|
8
7
|
import PropTypes from 'prop-types';
|
|
9
|
-
|
|
8
|
+
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { CapRow, CapColumn, CapButton } from '@capillarytech/cap-react-ui-library/';
|
|
10
11
|
import { FormattedMessage } from 'react-intl';
|
|
11
12
|
import _ from 'lodash';
|
|
12
13
|
import SlideBox from '../../SlideBox';
|
|
@@ -8,9 +8,9 @@ import PropTypes from 'prop-types';
|
|
|
8
8
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import _ from 'lodash';
|
|
11
|
-
import { injectIntl,
|
|
11
|
+
import { injectIntl, intlShape} from 'react-intl';
|
|
12
12
|
// import styled from 'styled-components';
|
|
13
|
-
import {CapColumn
|
|
13
|
+
import {CapColumn} from '@capillarytech/cap-react-ui-library';
|
|
14
14
|
import './_templatePreview.scss';
|
|
15
15
|
import {updateCharCount} from '../../utils/smsCharCountV2';
|
|
16
16
|
import messages from './messages';
|
|
@@ -22,6 +22,7 @@ const iPhonePushMessagePhone = require('./assets/images/iPhonePushMessage.svg');
|
|
|
22
22
|
|
|
23
23
|
class TemplatePreview extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
24
24
|
render() {
|
|
25
|
+
console.log('preview props', this.props);
|
|
25
26
|
let content = channel && channel.toLowerCase() === 'sms' ? [this.props.content] : this.props.content;
|
|
26
27
|
const channel = this.props.channel;
|
|
27
28
|
let smsDetails = {};
|
|
@@ -32,7 +33,7 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
|
|
|
32
33
|
for (let i = 0, limit = 0; i < smsDetails.parts; i += 1, limit += smsDetails.chars_sms) {
|
|
33
34
|
content.push(smsDetails.char_list.slice(limit, smsDetails.chars_sms * (i + 1)));
|
|
34
35
|
}
|
|
35
|
-
if (document.getElementById("msg_count")
|
|
36
|
+
if (document.getElementById("msg_count")) {
|
|
36
37
|
document.getElementById("msg_count").val = smsDetails.parts;
|
|
37
38
|
}
|
|
38
39
|
//smsText = this.props.intl.formatMessage(messages.previewGenerationMessage);
|
|
@@ -43,7 +44,7 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
|
|
|
43
44
|
if (channel.toLowerCase() === "mobilepush") {
|
|
44
45
|
iosActions = _.map(content.actions, (action) => {
|
|
45
46
|
if (action.label) {
|
|
46
|
-
return (<div className="actions"
|
|
47
|
+
return (<div className="actions">
|
|
47
48
|
<span className="action">{action.label.toUpperCase()}</span>
|
|
48
49
|
</div>);
|
|
49
50
|
}
|
|
@@ -51,46 +52,36 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
|
|
|
51
52
|
});
|
|
52
53
|
}
|
|
53
54
|
return (
|
|
54
|
-
<
|
|
55
|
-
{
|
|
56
|
-
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
{ channel && channel.toLowerCase() === 'sms' &&
|
|
66
|
-
<div className="shell align-center" id="sms-preview">
|
|
67
|
-
<img className="preview-image sms" src={smsBody} alt="Preview is being generated"/>
|
|
68
|
-
<div className="msgContainer sms">
|
|
69
|
-
<img className="sms-icon" src={smsIcon} alt="Sms icon" />
|
|
70
|
-
<div className={"message-pop sms"}>
|
|
71
|
-
{content && content.length && content.map((msg, index) =>
|
|
72
|
-
<CapColumn key={`"message-pop-content-${index}`} className="message-pop-item align-left" style={{ background: '#3F51B5', color: '#ffffff'}}>
|
|
73
|
-
{msg}
|
|
74
|
-
</CapColumn>)
|
|
55
|
+
<div className={`preview-container ${type === 'embedded' ? 'embedded-preview' : ''}`}>
|
|
56
|
+
{ channel && channel.toLowerCase() === 'sms' &&
|
|
57
|
+
<div className="shell align-center" id="sms-preview">
|
|
58
|
+
<img className="preview-image sms" src={smsBody} alt="Preview is being generated"/>
|
|
59
|
+
<div className="msgContainer sms">
|
|
60
|
+
<img className="sms-icon" src={smsIcon} alt="Sms icon" />
|
|
61
|
+
<div className={"message-pop sms"}>
|
|
62
|
+
{content && content.length && content.map((msg) =>
|
|
63
|
+
<CapColumn className="message-pop-item align-left" style={{ background: '#3F51B5', color: '#ffffff'}}>
|
|
64
|
+
{msg}
|
|
65
|
+
</CapColumn>)
|
|
75
66
|
}
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
67
|
</div>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
}
|
|
71
|
+
{channel && channel.toLowerCase() === 'wechat' ?
|
|
72
|
+
( <div className="shell align-center" id="sms-preview">
|
|
73
|
+
<img className="preview-image" src={channel.toLowerCase() === 'wechat' ? wechatBody : smsBody} alt="Preview is being generated"/>
|
|
74
|
+
<div className="msgContainer">
|
|
75
|
+
{this.props.channel.toLowerCase() === 'wechat' ? <div className="sms-icon" style={{ width: '25px', height: '25px', background: '#2E89DF' }}></div> : <img className="sms-icon" src={smsIcon} alt="Sms icon" />}
|
|
76
|
+
<div className="message-pop align-left" style={{ background: `${this.props.channel.toLowerCase() === 'wechat' ? '#ffffff' : '#3F51B5'}`, color: `${this.props.channel.toLowerCase() === 'wechat' ? '#333333' : '#ffffff'}`}}>{content}
|
|
87
77
|
</div>
|
|
88
78
|
</div>
|
|
79
|
+
</div>
|
|
89
80
|
) : ''
|
|
90
81
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
82
|
+
{ channel && (channel.toLowerCase() === 'mobilepush') &&
|
|
83
|
+
(<div className="shell align-center" id="mobilepush-preview">
|
|
84
|
+
<img className="preview-image" src={this.props.device === "android" ? androidPushMessagePhone : iPhonePushMessagePhone} alt="Preview is being generated"/>
|
|
94
85
|
{(!!content.header || !!content.bodyText || !!content.bodyImage) &&
|
|
95
86
|
<div className={`${this.props.device}-push-message-Container`}>
|
|
96
87
|
{this.props.device === "android" ?
|
|
@@ -110,7 +101,7 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
|
|
|
110
101
|
{content.actions.filter((action) => action.label).length &&
|
|
111
102
|
<div className="actions">
|
|
112
103
|
{_.map(content.actions, (action) => !!action.label &&
|
|
113
|
-
<span className="action"
|
|
104
|
+
<span className="action">{action.label && action.label.toUpperCase()}</span>)}
|
|
114
105
|
</div>
|
|
115
106
|
}
|
|
116
107
|
</div>
|
|
@@ -133,10 +124,10 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
|
|
|
133
124
|
}
|
|
134
125
|
</div>
|
|
135
126
|
}
|
|
136
|
-
|
|
127
|
+
</div>
|
|
137
128
|
)
|
|
138
129
|
}
|
|
139
|
-
|
|
130
|
+
{
|
|
140
131
|
channel && channel.toLowerCase() === 'line' ? (
|
|
141
132
|
<div className="shell align-center" id="sms-preview">
|
|
142
133
|
<img className="preview-image" src={wechatBody} alt="Preview is being generated"/>
|
|
@@ -151,11 +142,20 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
|
|
|
151
142
|
</div>
|
|
152
143
|
) : ''
|
|
153
144
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
145
|
+
{
|
|
146
|
+
this.props.charCounterEnabled && !_.isEmpty(smsDetails) ?
|
|
147
|
+
<div>
|
|
148
|
+
<p className="preview-info">
|
|
149
|
+
{smsDetails.unicode &&
|
|
150
|
+
<div style={{fontSize: '16px'}}>{`${this.props.intl.formatMessage(messages.smsFormatType)}`}</div>
|
|
151
|
+
}
|
|
152
|
+
<div style={{marginTop: '8px', fontSize: '16px'}} >{`${this.props.intl.formatMessage(messages.sms)}: ${smsDetails.parts}`}</div>
|
|
153
|
+
<div style={{fontSize: '16px'}}>{`${this.props.intl.formatMessage(messages.charactersPerSms)}: ${smsDetails.chars_used}`}</div>
|
|
154
|
+
</p>
|
|
155
|
+
</div>
|
|
156
|
+
: ''
|
|
157
|
+
}
|
|
158
|
+
</div>
|
|
159
159
|
);
|
|
160
160
|
}
|
|
161
161
|
}
|
|
@@ -167,9 +167,9 @@ TemplatePreview.propTypes = {
|
|
|
167
167
|
channel: PropTypes.string,
|
|
168
168
|
charCounterEnabled: PropTypes.bool,
|
|
169
169
|
location: PropTypes.object,
|
|
170
|
+
intl: intlShape.isRequired,
|
|
170
171
|
device: PropTypes.string,
|
|
171
172
|
unicodeEnabled: PropTypes.bool,
|
|
172
|
-
showCount: PropTypes.bool,
|
|
173
173
|
};
|
|
174
174
|
|
|
175
175
|
export default (injectIntl(TemplatePreview));
|
|
@@ -20,18 +20,10 @@ export default defineMessages({
|
|
|
20
20
|
},
|
|
21
21
|
charactersTotal: {
|
|
22
22
|
id: 'app.components.TemplatePreview.charactersTotal',
|
|
23
|
-
defaultMessage: "
|
|
23
|
+
defaultMessage: "SMS Char total",
|
|
24
24
|
},
|
|
25
25
|
smsFormatType: {
|
|
26
26
|
id: 'app.components.TemplatePreview.smsFormatType',
|
|
27
27
|
defaultMessage: 'Message has unicode characters',
|
|
28
28
|
},
|
|
29
|
-
lastModified: {
|
|
30
|
-
id: 'app.components.PreviewSideBar.lastModified',
|
|
31
|
-
defaultMessage: 'Last Modified On',
|
|
32
|
-
},
|
|
33
|
-
uploadedBy: {
|
|
34
|
-
id: 'app.components.PreviewSideBar.uploadedBy',
|
|
35
|
-
defaultMessage: 'Last Modified By',
|
|
36
|
-
},
|
|
37
29
|
});
|
|
@@ -14,7 +14,7 @@ import { FormattedMessage, injectIntl, intlShape } from 'react-intl';
|
|
|
14
14
|
import { createStructuredSelector } from 'reselect';
|
|
15
15
|
import moment from "moment";
|
|
16
16
|
import _ from "lodash";
|
|
17
|
-
import { CapInput, CapButton } from '@capillarytech/cap-ui-library';
|
|
17
|
+
import { CapInput, CapButton } from '@capillarytech/cap-react-ui-library';
|
|
18
18
|
import { Spin, Popover, Select } from 'antd';
|
|
19
19
|
import makeSelectGallery from './selectors';
|
|
20
20
|
import messages from './messages';
|
|
@@ -12,7 +12,7 @@ import { bindActionCreators } from 'redux';
|
|
|
12
12
|
import Helmet from 'react-helmet';
|
|
13
13
|
import { Row, Col, Spin, Breadcrumb, Popover, Modal, Select } from 'antd';
|
|
14
14
|
import { injectIntl, intlShape, FormattedMessage } from 'react-intl';
|
|
15
|
-
import { CapButton, CapInput } from '@capillarytech/cap-ui-library';
|
|
15
|
+
import { CapButton, CapInput } from '@capillarytech/cap-react-ui-library';
|
|
16
16
|
import { createStructuredSelector } from 'reselect';
|
|
17
17
|
import _ from 'lodash';
|
|
18
18
|
import moment from "moment";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Form, Icon } from 'antd';
|
|
4
|
-
import { CapInput, CapButton } from '@capillarytech/cap-ui-library';
|
|
4
|
+
import { CapInput, CapButton } from '@capillarytech/cap-react-ui-library';
|
|
5
5
|
const FormItem = Form.Item;
|
|
6
6
|
|
|
7
7
|
class NormalLoginForm extends React.Component {
|
|
@@ -15,7 +15,7 @@ import moment from "moment";
|
|
|
15
15
|
import _ from 'lodash';
|
|
16
16
|
import { bindActionCreators } from 'redux';
|
|
17
17
|
import { Row, Select, Spin, Dropdown, Col, Breadcrumb, Menu, Modal} from 'antd';
|
|
18
|
-
import { CapInput, CapButton, CapPopover, CapSelect } from '@capillarytech/cap-ui-library/';
|
|
18
|
+
import { CapInput, CapButton, CapPopover, CapSelect } from '@capillarytech/cap-react-ui-library/';
|
|
19
19
|
import { makeSelectTemplates, makeSelectTemplatesResponse } from './selectors';
|
|
20
20
|
import { makeSelectCreate as makeSelectCreateSms} from '../Sms/Create/selectors';
|
|
21
21
|
import { makeSelectCreate as makeSelectCreateMobilePush } from '../MobilePush/Create/selectors';
|
|
@@ -14,7 +14,7 @@ import { createStructuredSelector } from 'reselect';
|
|
|
14
14
|
import { injectIntl, intlShape, FormattedMessage } from 'react-intl';
|
|
15
15
|
import _ from 'lodash';
|
|
16
16
|
import { Menu, Dropdown } from 'antd';
|
|
17
|
-
import { CapRow, CapColumn, CapButton, CapCard, CapSpinner } from '@capillarytech/cap-ui-library';
|
|
17
|
+
import { CapRow, CapColumn, CapButton, CapCard, CapSpinner } from '@capillarytech/cap-react-ui-library';
|
|
18
18
|
import makeSelectCreate, {makeSelectTemplates, getAssetDetails, getContentAssetDetails} from './selectors';
|
|
19
19
|
import * as actions from './actions';
|
|
20
20
|
import richmediaschema from './richmediaschema';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capillarytech/creatives-library",
|
|
3
3
|
"author": "meharaj",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.83",
|
|
5
5
|
"description": "Capillary creatives ui",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"module": "./index.es.js",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "LicenseRef-LICENSE",
|
|
14
14
|
"dependencies": {
|
|
15
|
+
"@capillarytech/cap-react-ui-library": "^1.11.14",
|
|
15
16
|
"@capillarytech/cap-ui-library": "^1.0.144",
|
|
16
17
|
"antd": "3.19.6",
|
|
17
18
|
"axios": "^0.16.2",
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
// import styled from 'styled-components';
|
|
4
|
+
import { Link } from 'react-router';
|
|
5
|
+
import _ from 'lodash';
|
|
6
|
+
|
|
7
|
+
class BreadCrumbs extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
8
|
+
constructor(props) {
|
|
9
|
+
super(props);
|
|
10
|
+
this.prepareBreadcrumbElement = this.prepareBreadcrumbElement.bind(this);
|
|
11
|
+
this.disabledBreadcrumb = this.disabledBreadcrumb.bind(this);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
disabledBreadcrumb(e, location) {
|
|
15
|
+
if (location.disabled) {
|
|
16
|
+
e.preventDefault();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
prepareBreadcrumbElement() {
|
|
21
|
+
const breadcrumbs = [];
|
|
22
|
+
_.forEach(this.props.locations, (location) => {
|
|
23
|
+
const titleText = (typeof location.text === 'string') ? location.text : location.text.props.defaultMessage;
|
|
24
|
+
const element = (
|
|
25
|
+
<Link
|
|
26
|
+
to={location.url}
|
|
27
|
+
key={titleText}
|
|
28
|
+
title={titleText}
|
|
29
|
+
onClick={(e) => this.disabledBreadcrumb(e, location)}
|
|
30
|
+
>
|
|
31
|
+
<span
|
|
32
|
+
className={location.disabled ? 'disabled-breadcrumb' : 'active-breadcrumb'}
|
|
33
|
+
disabled={location.disabled}
|
|
34
|
+
> {location.text}
|
|
35
|
+
</span>
|
|
36
|
+
</Link>
|
|
37
|
+
);
|
|
38
|
+
if (breadcrumbs.length !== 0) {
|
|
39
|
+
breadcrumbs.push(
|
|
40
|
+
<span
|
|
41
|
+
key={`${titleText}separator`}
|
|
42
|
+
> {this.props.separator ? this.props.separator : ' / '}
|
|
43
|
+
</span>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
breadcrumbs.push(element);
|
|
47
|
+
});
|
|
48
|
+
return breadcrumbs;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
render() {
|
|
52
|
+
return (
|
|
53
|
+
<div className="breadcrumbs-wrapper">
|
|
54
|
+
{this.prepareBreadcrumbElement()}
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
BreadCrumbs.propTypes = {
|
|
61
|
+
locations: PropTypes.array.isRequired,
|
|
62
|
+
separator: PropTypes.string,
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export default BreadCrumbs;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* BreadCrumbs Messages
|
|
3
|
+
*
|
|
4
|
+
* This contains all the text for the BreadCrumbs component.
|
|
5
|
+
*/
|
|
6
|
+
import { defineMessages } from 'react-intl';
|
|
7
|
+
|
|
8
|
+
export default defineMessages({
|
|
9
|
+
header: {
|
|
10
|
+
id: 'app.components.BreadCrumbs.header',
|
|
11
|
+
defaultMessage: 'This is the BreadCrumbs component !',
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// import React from 'react';
|
|
2
|
+
// import { shallow } from 'enzyme';
|
|
3
|
+
|
|
4
|
+
// import BreadCrumbs from '../index';
|
|
5
|
+
|
|
6
|
+
// describe('<BreadCrumbs />', () => {
|
|
7
|
+
// it('Expect to have unit tests specified', () => {
|
|
8
|
+
// expect(true).toEqual(false);
|
|
9
|
+
// });
|
|
10
|
+
// });
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.call-task-preview {
|
|
2
|
+
.call-task-subject-container {
|
|
3
|
+
padding: 8px;
|
|
4
|
+
background: #444;
|
|
5
|
+
color: white;
|
|
6
|
+
font-size: 12px;
|
|
7
|
+
font-weight: 500;
|
|
8
|
+
}
|
|
9
|
+
.call-task-message-container {
|
|
10
|
+
overflow-y: auto;
|
|
11
|
+
height: 150px;
|
|
12
|
+
width: 100%;
|
|
13
|
+
font-size: 12px;
|
|
14
|
+
background: #eee;
|
|
15
|
+
padding: 8px;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* CallTaskPreview
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import HeaderPng from './images/Header.png';
|
|
10
|
+
import FooterPng from './images/Footer.png';
|
|
11
|
+
|
|
12
|
+
import './_callTaskPreview.scss';
|
|
13
|
+
|
|
14
|
+
class CallTaskPreview extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
15
|
+
render() {
|
|
16
|
+
const { subject, messageBody } = this.props;
|
|
17
|
+
return (
|
|
18
|
+
<div className="call-task-preview">
|
|
19
|
+
<img style={{ width: '100%' }} src={HeaderPng} alt="header" />
|
|
20
|
+
<div className="call-task-subject-container">
|
|
21
|
+
{subject}
|
|
22
|
+
</div>
|
|
23
|
+
<div className="call-task-message-container">
|
|
24
|
+
{messageBody}
|
|
25
|
+
</div>
|
|
26
|
+
<img style={{ width: '100%' }} src={FooterPng} alt="footer" />
|
|
27
|
+
</div>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
CallTaskPreview.propTypes = {
|
|
33
|
+
subject: PropTypes.string,
|
|
34
|
+
messageBody: PropTypes.string,
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export default CallTaskPreview;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* CallTaskPreview Messages
|
|
3
|
+
*
|
|
4
|
+
* This contains all the text for the CallTaskPreview component.
|
|
5
|
+
*/
|
|
6
|
+
import { defineMessages } from 'react-intl';
|
|
7
|
+
|
|
8
|
+
export default defineMessages({
|
|
9
|
+
header: {
|
|
10
|
+
id: 'app.components.CallTaskPreview.header',
|
|
11
|
+
defaultMessage: 'This is the CallTaskPreview component !',
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { shallow } from "enzyme";
|
|
3
|
+
import CallTaskPreview from "../index";
|
|
4
|
+
|
|
5
|
+
describe("<CallTaskPreview />", () => {
|
|
6
|
+
it("Test if Call task component renders", () => {
|
|
7
|
+
const component = shallow(
|
|
8
|
+
<CallTaskPreview
|
|
9
|
+
subject="this is test"
|
|
10
|
+
body="this is test message body"
|
|
11
|
+
/>
|
|
12
|
+
);
|
|
13
|
+
expect(component).toMatchSnapshot();
|
|
14
|
+
});
|
|
15
|
+
});
|