@capillarytech/creatives-library 3.1.2 → 3.1.4
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/BreadCrumbs/messages.js +1 -1
- package/components/CapTagList/index.js +3 -3
- package/components/CapTagList/messages.js +16 -4
- package/components/Ckeditor/messages.js +1 -1
- package/components/CustomPopOver/index.js +3 -4
- package/components/CustomPopOver/messages.js +5 -1
- package/components/DateFilter/index.js +12 -12
- package/components/DateFilter/messages.js +40 -0
- package/components/DateRange/index.js +5 -4
- package/components/DateRange/messages.js +13 -1
- package/components/Edmeditor/messages.js +1 -1
- package/components/EmailPreview/index.js +4 -4
- package/components/EmailPreview/messages.js +18 -2
- package/components/Footer/messages.js +1 -1
- package/components/FormBuilder/index.js +15 -19
- package/components/FormBuilder/messages.js +33 -1
- package/components/Header/messages.js +4 -4
- package/components/ImagePreview/index.js +1 -1
- package/components/ImagePreview/messages.js +5 -1
- package/components/PageHeader/messages.js +1 -1
- package/components/PreviewSideBar/index.js +2 -2
- package/components/PreviewSideBar/messages.js +14 -6
- package/components/Sidebar/messages.js +3 -3
- package/components/SmsTest/index.js +6 -4
- package/components/SmsTest/messages.js +9 -1
- package/components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +3 -3
- package/components/TemplatePreview/index.js +7 -7
- package/components/TemplatePreview/messages.js +17 -5
- package/components/Toastr/messages.js +1 -1
- package/components/ToastrMessage/index.js +4 -1
- package/components/ToastrMessage/messages.js +5 -1
- package/components/TopBar/messages.js +1 -1
- package/containers/Assets/Gallery/messages.js +20 -20
- package/containers/Cap/index.js +5 -5
- package/containers/Cap/messages.js +75 -0
- package/containers/Dashboard/index.js +2 -2
- package/containers/Dashboard/messages.js +1 -1
- package/containers/Ebill/index.js +1 -1
- package/containers/Ebill/messages.js +20 -16
- package/containers/Email/index.js +24 -24
- package/containers/Email/messages.js +107 -59
- package/containers/Line/Create/index.js +7 -7
- package/containers/Line/Create/messages.js +58 -42
- package/containers/Line/Edit/index.js +14 -14
- package/containers/Line/Edit/messages.js +58 -38
- package/containers/Login/components/LoginForm/index.js +10 -7
- package/containers/Login/components/LoginForm/messages.js +15 -3
- package/containers/Login/index.js +1 -1
- package/containers/Login/messages.js +7 -3
- package/containers/MobilePush/Create/index.js +45 -45
- package/containers/MobilePush/Create/messages.js +111 -75
- package/containers/MobilePush/Edit/index.js +45 -45
- package/containers/MobilePush/Edit/messages.js +100 -83
- package/containers/NotFoundPage/messages.js +1 -1
- package/containers/Sms/Create/index.js +5 -5
- package/containers/Sms/Create/messages.js +43 -19
- package/containers/Sms/Edit/index.js +4 -4
- package/containers/Sms/Edit/messages.js +36 -20
- package/containers/TagList/messages.js +1 -1
- package/containers/Templates/index.js +20 -19
- package/containers/Templates/messages.js +136 -64
- package/containers/TestPage/messages.js +1 -1
- package/containers/Testv2/index.js +2 -2
- package/containers/Testv2/messages.js +9 -1
- package/containers/WeChat/MapTemplates/index.js +10 -10
- package/containers/WeChat/MapTemplates/messages.js +49 -17
- package/containers/WeChat/RichmediaTemplates/Create/messages.js +33 -33
- package/containers/WeChat/RichmediaTemplates/Edit/messages.js +1 -1
- package/containers/WeChat/RichmediaTemplates/View/index.js +2 -2
- package/containers/WeChat/RichmediaTemplates/View/messages.js +9 -1
- package/package.json +1 -1
- package/services/api.js +10 -2
- package/translations/en.json +973 -360
- package/translations/zh.json +994 -381
- package/v2Components/BreadCrumbs/messages.js +1 -1
- package/v2Components/CallTaskPreview/messages.js +1 -1
- package/v2Components/CapTagList/index.js +6 -5
- package/v2Components/CapTagList/messages.js +24 -4
- package/v2Components/Ckeditor/messages.js +1 -1
- package/v2Components/CmsTemplatesComponent/messages.js +2 -2
- package/v2Components/CustomPopOver/index.js +4 -2
- package/v2Components/CustomPopOver/messages.js +5 -1
- package/v2Components/Edmeditor/messages.js +1 -1
- package/v2Components/EmailPreview/index.js +2 -2
- package/v2Components/EmailPreview/messages.js +11 -3
- package/v2Components/EmailPreviewV2/index.js +1 -1
- package/v2Components/EmailPreviewV2/messages.js +13 -9
- package/v2Components/Footer/messages.js +1 -1
- package/v2Components/FormBuilder/index.js +11 -10
- package/v2Components/FormBuilder/messages.js +13 -13
- package/v2Components/Header/messages.js +4 -4
- package/v2Components/ImagePreview/index.js +3 -2
- package/v2Components/ImagePreview/messages.js +5 -1
- package/v2Components/MobilePushPreviewV2/index.js +2 -5
- package/v2Components/MobilePushPreviewV2/messages.js +9 -1
- package/v2Components/NavigationBar/messages.js +1 -1
- package/v2Components/NewCallTask/messages.js +5 -5
- package/v2Components/PreviewSideBar/messages.js +6 -6
- package/v2Components/SmsTest/index.js +6 -4
- package/v2Components/SmsTest/messages.js +9 -1
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +3 -3
- package/v2Components/TemplatePreview/index.js +8 -7
- package/v2Components/TemplatePreview/messages.js +19 -7
- package/v2Components/Toastr/messages.js +1 -1
- package/v2Components/ToastrMessage/index.js +3 -2
- package/v2Components/ToastrMessage/messages.js +5 -1
- package/v2Components/TopBar/messages.js +7 -7
- package/v2Containers/Assets/Gallery/messages.js +24 -24
- package/v2Containers/CallTask/messages.js +6 -6
- package/v2Containers/Cap/index.js +5 -4
- package/v2Containers/Cap/messages.js +16 -16
- package/v2Containers/Cap/messsages.js +19 -15
- package/v2Containers/ChannelTemplates/messages.js +1 -1
- package/v2Containers/CreativesContainer/SlideBoxContent.js +1 -1
- package/v2Containers/CreativesContainer/index.js +65 -46
- package/v2Containers/CreativesContainer/messages.js +5 -5
- package/v2Containers/Dashboard/index.js +2 -1
- package/v2Containers/Dashboard/messages.js +1 -1
- package/v2Containers/Ebill/index.js +1 -1
- package/v2Containers/Ebill/messages.js +20 -16
- package/v2Containers/Email/index.js +20 -20
- package/v2Containers/Email/messages.js +97 -61
- package/v2Containers/EmailWrapper/index.js +1 -1
- package/v2Containers/EmailWrapper/messages.js +12 -12
- package/v2Containers/Line/Create/index.js +3 -3
- package/v2Containers/Line/Create/messages.js +53 -41
- package/v2Containers/Line/Edit/index.js +10 -10
- package/v2Containers/Line/Edit/messages.js +55 -39
- package/v2Containers/Login/components/LoginForm/index.js +9 -6
- package/v2Containers/Login/components/LoginForm/messages.js +15 -3
- package/v2Containers/Login/index.js +1 -1
- package/v2Containers/Login/messages.js +7 -3
- package/v2Containers/MobilePush/Create/index.js +33 -33
- package/v2Containers/MobilePush/Create/messages.js +109 -81
- package/v2Containers/MobilePush/Edit/index.js +22 -22
- package/v2Containers/MobilePush/Edit/messages.js +95 -79
- package/v2Containers/MobilepushWrapper/messages.js +5 -5
- package/v2Containers/NotFoundPage/messages.js +1 -1
- package/v2Containers/Sms/Create/index.js +5 -5
- package/v2Containers/Sms/Create/messages.js +41 -21
- package/v2Containers/Sms/Edit/index.js +5 -5
- package/v2Containers/Sms/Edit/messages.js +36 -20
- package/v2Containers/TagList/messages.js +1 -1
- package/v2Containers/Templates/index.js +9 -1
- package/v2Containers/Templates/messages.js +1 -1
- package/v2Containers/TemplatesV2/messages.js +11 -11
- package/v2Containers/TestPage/messages.js +1 -1
- package/v2Containers/Testv2/index.js +2 -2
- package/v2Containers/Testv2/messages.js +9 -1
- package/v2Containers/WeChat/MapTemplates/index.js +2 -2
- package/v2Containers/WeChat/MapTemplates/messages.js +25 -25
- package/v2Containers/WeChat/RichmediaTemplates/Create/index.js +4 -14
- package/v2Containers/WeChat/RichmediaTemplates/Create/messages.js +46 -46
- package/v2Containers/WeChat/RichmediaTemplates/Edit/index.js +1 -11
- package/v2Containers/WeChat/RichmediaTemplates/Edit/messages.js +1 -1
- package/v2Containers/WeChat/RichmediaTemplates/View/messages.js +9 -1
|
@@ -165,15 +165,15 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
165
165
|
const options = [
|
|
166
166
|
{
|
|
167
167
|
value: "All",
|
|
168
|
-
label:
|
|
168
|
+
label: this.props.intl.formatMessage(messages.all),
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
171
|
value: "Outbound",
|
|
172
|
-
label:
|
|
172
|
+
label: this.props.intl.formatMessage(messages.outbound),
|
|
173
173
|
},
|
|
174
174
|
{
|
|
175
175
|
value: "Loyalty",
|
|
176
|
-
label:
|
|
176
|
+
label: this.props.intl.formatMessage(messages.loyalty),
|
|
177
177
|
},
|
|
178
178
|
];
|
|
179
179
|
return (
|
|
@@ -7,19 +7,31 @@ import { defineMessages } from 'react-intl';
|
|
|
7
7
|
|
|
8
8
|
export default defineMessages({
|
|
9
9
|
"Ok": {
|
|
10
|
-
id: '
|
|
10
|
+
id: 'creatives.components.CapTagList.Ok',
|
|
11
11
|
defaultMessage: 'Ok',
|
|
12
12
|
},
|
|
13
13
|
"numberOfDaysBeforeExpiry": {
|
|
14
|
-
id: '
|
|
14
|
+
id: 'creatives.components.CapTagList.numberOfDaysBeforeExpiry',
|
|
15
15
|
defaultMessage: 'Number of days before expiry',
|
|
16
16
|
},
|
|
17
17
|
"Cancel": {
|
|
18
|
-
id: '
|
|
18
|
+
id: 'creatives.components.CapTagList.Cancel',
|
|
19
19
|
defaultMessage: 'Cancel',
|
|
20
20
|
},
|
|
21
21
|
"Dynamic Days before Expiry": {
|
|
22
|
-
id: '
|
|
22
|
+
id: 'creatives.components.CapTagList.dynamic_days_before_expiry',
|
|
23
23
|
defaultMessage: 'Dynamic days before expiry',
|
|
24
24
|
},
|
|
25
|
+
"all": {
|
|
26
|
+
id: 'creatives.components.CapTagList.all',
|
|
27
|
+
defaultMessage: 'All',
|
|
28
|
+
},
|
|
29
|
+
"outbound": {
|
|
30
|
+
id: 'creatives.components.CapTagList.outbound',
|
|
31
|
+
defaultMessage: 'Outbound',
|
|
32
|
+
},
|
|
33
|
+
"loyalty": {
|
|
34
|
+
id: 'creatives.components.CapTagList.loyalty',
|
|
35
|
+
defaultMessage: 'Loyalty',
|
|
36
|
+
},
|
|
25
37
|
});
|
|
@@ -7,11 +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 {CapPopover} from '@capillarytech/cap-react-ui-library';
|
|
12
|
-
// import { FormattedMessage } from 'react-intl';
|
|
13
|
-
// import messages from './messages';
|
|
14
11
|
import _ from "lodash";
|
|
12
|
+
import { FormattedMessage } from 'react-intl';
|
|
13
|
+
import messages from './messages';
|
|
15
14
|
|
|
16
15
|
class CustomPopOver extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
17
16
|
componentWillMount() {
|
|
@@ -51,7 +50,7 @@ class CustomPopOver extends React.Component { // eslint-disable-line react/prefe
|
|
|
51
50
|
this.renderPopoverContent()
|
|
52
51
|
}
|
|
53
52
|
>
|
|
54
|
-
<p style={{fontFamily: "open-sans", fontWeight: '600', display: `${this.props.popOverList.length === this.props.excludeList.length ? 'none' : ''}`}}
|
|
53
|
+
<p style={{fontFamily: "open-sans", fontWeight: '600', display: `${this.props.popOverList.length === this.props.excludeList.length ? 'none' : ''}`}}><FormattedMessage {...messages.languages} /></p>
|
|
55
54
|
</CapPopover>
|
|
56
55
|
</div>
|
|
57
56
|
);
|
|
@@ -7,7 +7,11 @@ import { defineMessages } from 'react-intl';
|
|
|
7
7
|
|
|
8
8
|
export default defineMessages({
|
|
9
9
|
header: {
|
|
10
|
-
id: '
|
|
10
|
+
id: 'creatives.components.CustomPopOver.header',
|
|
11
11
|
defaultMessage: 'This is the CustomPopOver component !',
|
|
12
12
|
},
|
|
13
|
+
languages: {
|
|
14
|
+
id: 'creatives.components.CustomPopOver.languages',
|
|
15
|
+
defaultMessage: '+ Languages',
|
|
16
|
+
},
|
|
13
17
|
});
|
|
@@ -235,10 +235,10 @@ class DateFilter extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
235
235
|
<Grid.Row className={this.state.openCustomDatePicker ? 'hide' : ''}>
|
|
236
236
|
<Grid.Column width={16}>
|
|
237
237
|
<Button.Group fluid className="btn-group till-date">
|
|
238
|
-
<Button className={dateType === 'week' ? 'active' : ''} onClick={() => this.handleDateTypeClick('week')}
|
|
239
|
-
<Button className={dateType === 'month' ? 'active' : ''} onClick={() => this.handleDateTypeClick('month')}
|
|
240
|
-
<Button className={dateType === 'year' ? 'active' : ''} onClick={() => this.handleDateTypeClick('year')}
|
|
241
|
-
<Button className={dateType === 'custom' ? 'active' : ''} onClick={() => this.handleDateTypeClick('custom')}
|
|
238
|
+
<Button className={dateType === 'week' ? 'active' : ''} onClick={() => this.handleDateTypeClick('week')}><FormattedMessage {...messages.wtd} /></Button>
|
|
239
|
+
<Button className={dateType === 'month' ? 'active' : ''} onClick={() => this.handleDateTypeClick('month')}><FormattedMessage {...messages.mtd} /></Button>
|
|
240
|
+
<Button className={dateType === 'year' ? 'active' : ''} onClick={() => this.handleDateTypeClick('year')}><FormattedMessage {...messages.ytd} /></Button>
|
|
241
|
+
<Button className={dateType === 'custom' ? 'active' : ''} onClick={() => this.handleDateTypeClick('custom')}><FormattedMessage {...messages.custom} /></Button>
|
|
242
242
|
</Button.Group>
|
|
243
243
|
</Grid.Column>
|
|
244
244
|
<Grid.Column width={16} className="selectedDateText">
|
|
@@ -256,11 +256,11 @@ class DateFilter extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
256
256
|
<Grid.Column width={16}>
|
|
257
257
|
<Button.Group fluid className="btn-group till-date">
|
|
258
258
|
{dateType !== 'week' ? '' :
|
|
259
|
-
<Button className={this.state.compareDateRange.dateType !== 'week' ? '' : 'active'} onClick={() => this.handleCompareDateChange('week')}
|
|
259
|
+
<Button className={this.state.compareDateRange.dateType !== 'week' ? '' : 'active'} onClick={() => this.handleCompareDateChange('week')}><FormattedMessage {...messages.previousWeek} /></Button> }
|
|
260
260
|
{dateType !== 'month' ? '' :
|
|
261
|
-
<Button className={this.state.compareDateRange.dateType !== 'month' ? '' : 'active'} onClick={() => this.handleCompareDateChange('month')}
|
|
262
|
-
<Button className={this.state.compareDateRange.dateType === 'year' ? 'active' : ''} onClick={() => this.handleCompareDateChange('year')}
|
|
263
|
-
<Button className={this.state.compareDateRange.dateType === 'custom' ? 'active' : ''} onClick={() => this.handleCompareDateChange('custom')}
|
|
261
|
+
<Button className={this.state.compareDateRange.dateType !== 'month' ? '' : 'active'} onClick={() => this.handleCompareDateChange('month')}><FormattedMessage {...messages.previousMonth} /></Button>}
|
|
262
|
+
<Button className={this.state.compareDateRange.dateType === 'year' ? 'active' : ''} onClick={() => this.handleCompareDateChange('year')}><FormattedMessage {...messages.previousYear} /></Button>
|
|
263
|
+
<Button className={this.state.compareDateRange.dateType === 'custom' ? 'active' : ''} onClick={() => this.handleCompareDateChange('custom')}><FormattedMessage {...messages.custom} /></Button>
|
|
264
264
|
</Button.Group>
|
|
265
265
|
</Grid.Column>
|
|
266
266
|
<Grid.Column width={16} className="selectedDateText">
|
|
@@ -272,8 +272,8 @@ class DateFilter extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
272
272
|
}
|
|
273
273
|
<Grid.Row className={this.state.openCustomDatePicker ? 'hide' : ''}>
|
|
274
274
|
<Grid.Column width={16}>
|
|
275
|
-
<Button primary onClick={this.handleApply}
|
|
276
|
-
<Button basic onClick={this.handleCancel}
|
|
275
|
+
<Button primary onClick={this.handleApply}><FormattedMessage {...messages.apply} /></Button>
|
|
276
|
+
<Button basic onClick={this.handleCancel}><FormattedMessage {...messages.cancel} /></Button>
|
|
277
277
|
</Grid.Column>
|
|
278
278
|
</Grid.Row>
|
|
279
279
|
|
|
@@ -281,7 +281,7 @@ class DateFilter extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
281
281
|
<Grid.Row className={!this.state.openCustomDatePicker ? 'hide' : ''}>
|
|
282
282
|
<Grid.Column className="selectDateRangeTitle" width={16}>
|
|
283
283
|
<a href="" className="backButton" onClick={this.handleCustomDatePickerCancel}><i className="material-icons">keyboard_backspace</i></a>
|
|
284
|
-
<span className="dateRangeTitle"
|
|
284
|
+
<span className="dateRangeTitle"><FormattedMessage {...messages.selectDateRange} /></span>
|
|
285
285
|
</Grid.Column>
|
|
286
286
|
<Grid.Column width={16} className="dateRangeWrapper">
|
|
287
287
|
<DateRange prevSelectedDate={this.state.selectedDateRange} handleDatePickerApply={this.handleDatePickerApply} handleDatePickerCancel={this.handleCustomDatePickerCancel} />
|
|
@@ -296,7 +296,7 @@ class DateFilter extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
296
296
|
<Grid.Row className={!this.state.openCustomDatePicker ? 'hide' : ''}>
|
|
297
297
|
<Grid.Column width={16}>
|
|
298
298
|
<a href="" className="backButton" onClick={this.handleCustomDatePickerCancel}><i className="material-icons">keyboard_backspace</i></a>
|
|
299
|
-
<span className="dateRangeTitle"
|
|
299
|
+
<span className="dateRangeTitle"><FormattedMessage {...messages.selectDateRange} /></span>
|
|
300
300
|
</Grid.Column>
|
|
301
301
|
<Grid.Column width={16}>
|
|
302
302
|
{this.printSelectedDate(this.state.selectedDateRange.startDate, this.state.selectedDateRange.endDate, this.state.selectedDateRange.dateType)} vs
|
|
@@ -14,4 +14,44 @@ export default defineMessages({
|
|
|
14
14
|
id: 'reon.components.DateFilter.editText',
|
|
15
15
|
defaultMessage: 'Edit',
|
|
16
16
|
},
|
|
17
|
+
wtd: {
|
|
18
|
+
id: 'reon.components.DateFilter.wtd',
|
|
19
|
+
defaultMessage: 'WTD',
|
|
20
|
+
},
|
|
21
|
+
mtd: {
|
|
22
|
+
id: 'reon.components.DateFilter.mtd',
|
|
23
|
+
defaultMessage: 'MTD',
|
|
24
|
+
},
|
|
25
|
+
ytd: {
|
|
26
|
+
id: 'reon.components.DateFilter.ytd',
|
|
27
|
+
defaultMessage: 'YTD',
|
|
28
|
+
},
|
|
29
|
+
custom: {
|
|
30
|
+
id: 'reon.components.DateFilter.custom',
|
|
31
|
+
defaultMessage: 'Custom',
|
|
32
|
+
},
|
|
33
|
+
previousWeek: {
|
|
34
|
+
id: 'reon.components.DateFilter.previousWeek',
|
|
35
|
+
defaultMessage: 'Previous Week',
|
|
36
|
+
},
|
|
37
|
+
previousMonth: {
|
|
38
|
+
id: 'reon.components.DateFilter.previousMonth',
|
|
39
|
+
defaultMessage: 'Previous Month',
|
|
40
|
+
},
|
|
41
|
+
previousYear: {
|
|
42
|
+
id: 'reon.components.DateFilter.previousYear',
|
|
43
|
+
defaultMessage: 'Previous Year',
|
|
44
|
+
},
|
|
45
|
+
selectDateRange: {
|
|
46
|
+
id: 'reon.components.DateFilter.selectDateRange',
|
|
47
|
+
defaultMessage: 'Select Date Range',
|
|
48
|
+
},
|
|
49
|
+
apply: {
|
|
50
|
+
id: 'reon.components.DateFilter.apply',
|
|
51
|
+
defaultMessage: 'Apply',
|
|
52
|
+
},
|
|
53
|
+
cancel: {
|
|
54
|
+
id: 'reon.components.DateFilter.cancel',
|
|
55
|
+
defaultMessage: 'Cancel',
|
|
56
|
+
},
|
|
17
57
|
});
|
|
@@ -16,6 +16,7 @@ import DatePicker from 'react-datepicker';
|
|
|
16
16
|
import 'react-datepicker/dist/react-datepicker.css';
|
|
17
17
|
|
|
18
18
|
import moment from 'moment';
|
|
19
|
+
import messages from './messages';
|
|
19
20
|
|
|
20
21
|
class DateRange extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
21
22
|
constructor(props) {
|
|
@@ -55,14 +56,14 @@ class DateRange extends React.Component { // eslint-disable-line react/prefer-st
|
|
|
55
56
|
<Grid className="dateRangeWrapper" columns={2}>
|
|
56
57
|
<Grid.Row className="selectedDateTitleWrapper">
|
|
57
58
|
<Grid.Column style={{ paddingLeft: 0, paddingBottom: `${8}px` }}>
|
|
58
|
-
<span className="selectedDateTitle"
|
|
59
|
+
<span className="selectedDateTitle"><FormattedMessage {...messages.from} /></span>
|
|
59
60
|
<input className="selectedDateRange" type="text" readOnly defaultValue={moment(startDate).format('MM/DD/YYYY').toString()} />
|
|
60
|
-
<i className="calenderIcon material-icons"
|
|
61
|
+
<i className="calenderIcon material-icons"><FormattedMessage {...messages.today} /></i>
|
|
61
62
|
</Grid.Column>
|
|
62
63
|
<Grid.Column style={{ paddingLeft: 0 }}>
|
|
63
|
-
<span className="selectedDateTitle"
|
|
64
|
+
<span className="selectedDateTitle"><FormattedMessage {...messages.to} /></span>
|
|
64
65
|
<input className="selectedDateRange" readOnly type="text" defaultValue={moment(endDate).format('MM/DD/YYYY').toString()} />
|
|
65
|
-
<i className="calenderIcon material-icons"
|
|
66
|
+
<i className="calenderIcon material-icons"><FormattedMessage {...messages.today} /></i>
|
|
66
67
|
</Grid.Column>
|
|
67
68
|
</Grid.Row>
|
|
68
69
|
<Grid.Row style={{ paddingTop: 0, paddingBottom: `${2}px` }}>
|
|
@@ -7,7 +7,19 @@ import { defineMessages } from 'react-intl';
|
|
|
7
7
|
|
|
8
8
|
export default defineMessages({
|
|
9
9
|
header: {
|
|
10
|
-
id: '
|
|
10
|
+
id: 'creatives.components.DateRange.header',
|
|
11
11
|
defaultMessage: 'This is the DateRange component !',
|
|
12
12
|
},
|
|
13
|
+
today: {
|
|
14
|
+
id: 'creatives.components.DateRange.today',
|
|
15
|
+
defaultMessage: 'Today',
|
|
16
|
+
},
|
|
17
|
+
from: {
|
|
18
|
+
id: 'creatives.components.DateRange.from',
|
|
19
|
+
defaultMessage: 'From',
|
|
20
|
+
},
|
|
21
|
+
to: {
|
|
22
|
+
id: 'creatives.components.DateRange.to',
|
|
23
|
+
defaultMessage: 'To',
|
|
24
|
+
},
|
|
13
25
|
});
|
|
@@ -57,9 +57,9 @@ class EmailPreview extends React.Component { // eslint-disable-line react/prefer
|
|
|
57
57
|
<div id="emailPreivew-content">
|
|
58
58
|
{/* {this.props.content} */}
|
|
59
59
|
<div className="device-wrapper">
|
|
60
|
-
<div onClick={() => this.props.changePreviewDevice("desktop")} className={(this.props.device.toLowerCase() === "desktop") ? "device-name active" : "device-name"}
|
|
61
|
-
<div onClick={() => this.props.changePreviewDevice("tablet")} className={(this.props.device.toLowerCase() === "tablet") ? "device-name active" : "device-name"}
|
|
62
|
-
<div onClick={() => this.props.changePreviewDevice("mobile")} className={(this.props.device.toLowerCase() === "mobile") ? "device-name active" : "device-name"}
|
|
60
|
+
<div onClick={() => this.props.changePreviewDevice("desktop")} className={(this.props.device.toLowerCase() === "desktop") ? "device-name active" : "device-name"}><FormattedMessage {...messages.desktop} /></div>
|
|
61
|
+
<div onClick={() => this.props.changePreviewDevice("tablet")} className={(this.props.device.toLowerCase() === "tablet") ? "device-name active" : "device-name"}><FormattedMessage {...messages.tablet} /></div>
|
|
62
|
+
<div onClick={() => this.props.changePreviewDevice("mobile")} className={(this.props.device.toLowerCase() === "mobile") ? "device-name active" : "device-name"}><FormattedMessage {...messages.mobile} /></div>
|
|
63
63
|
</div>
|
|
64
64
|
<div className="email-preview-container">
|
|
65
65
|
<div className={this.props.device === 'desktop' ? '' : "shell align-center"}>
|
|
@@ -69,7 +69,7 @@ class EmailPreview extends React.Component { // eslint-disable-line react/prefer
|
|
|
69
69
|
<img src={mobileBody} alt="capillary" width="85%" /> : ''}
|
|
70
70
|
<div className={messageContainerName}>
|
|
71
71
|
<iframe srcDoc={copyContent} {...deviceAspectRatio[this.props.device]} >
|
|
72
|
-
<p
|
|
72
|
+
<p><FormattedMessage {...messages.browserNotSupportIframe} /></p>
|
|
73
73
|
</iframe>
|
|
74
74
|
</div>
|
|
75
75
|
</div>
|
|
@@ -7,11 +7,27 @@ import { defineMessages } from 'react-intl';
|
|
|
7
7
|
|
|
8
8
|
export default defineMessages({
|
|
9
9
|
lastModified: {
|
|
10
|
-
id: '
|
|
10
|
+
id: 'creatives.components.EmailPreview.lastModified',
|
|
11
11
|
defaultMessage: 'Last modified on',
|
|
12
12
|
},
|
|
13
13
|
uploadedBy: {
|
|
14
|
-
id: '
|
|
14
|
+
id: 'creatives.components.EmailPreview.uploadedBy',
|
|
15
15
|
defaultMessage: 'Last modified by',
|
|
16
16
|
},
|
|
17
|
+
desktop: {
|
|
18
|
+
id: 'creatives.components.EmailPreview.desktop',
|
|
19
|
+
defaultMessage: 'Desktop',
|
|
20
|
+
},
|
|
21
|
+
tablet: {
|
|
22
|
+
id: 'creatives.components.EmailPreview.tablet',
|
|
23
|
+
defaultMessage: 'Tablet',
|
|
24
|
+
},
|
|
25
|
+
mobile: {
|
|
26
|
+
id: 'creatives.components.EmailPreview.mobile',
|
|
27
|
+
defaultMessage: 'Mobile',
|
|
28
|
+
},
|
|
29
|
+
browserNotSupportIframe: {
|
|
30
|
+
id: 'creatives.components.EmailPreview.browserNotSupportIframe',
|
|
31
|
+
defaultMessage: 'Your browser does not support iframes.',
|
|
32
|
+
},
|
|
17
33
|
});
|
|
@@ -10,6 +10,7 @@ import PropTypes from 'prop-types';
|
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { Label } from 'semantic-ui-react';
|
|
12
12
|
import _ from 'lodash';
|
|
13
|
+
import { injectIntl, intlShape, FormattedMessage } from 'react-intl';
|
|
13
14
|
import { Tabs, Row, Col, Table, Modal, notification} from 'antd';
|
|
14
15
|
import { CapButton, CapInput, CapPopover, CapTextArea, CapCheckbox, CapRadio, CapRadioGroup, CapSelect, CapTable, CapColumn} from '@capillarytech/cap-react-ui-library';
|
|
15
16
|
import TemplatePreview from '../../components/TemplatePreview';
|
|
@@ -23,6 +24,7 @@ import EDMEditor from "../../components/Edmeditor";
|
|
|
23
24
|
import CustomPopOver from '../../components/CustomPopOver';
|
|
24
25
|
import './_formBuilder.scss';
|
|
25
26
|
import {updateCharCount, checkUnicode} from "../../utils/smsCharCountV2";
|
|
27
|
+
import messages from './messages';
|
|
26
28
|
const TabPane = Tabs.TabPane;
|
|
27
29
|
const {Column} = Table;
|
|
28
30
|
// import styled from 'styled-components';
|
|
@@ -261,9 +263,9 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
261
263
|
onOk={this.handleOk}
|
|
262
264
|
onCancel={this.handleCancel}
|
|
263
265
|
footer={[
|
|
264
|
-
<CapButton key="back" onClick={this.handleCancel}
|
|
266
|
+
<CapButton key="back" onClick={this.handleCancel}><FormattedMessage {...messages.cancel} /></CapButton>,
|
|
265
267
|
<CapButton key="submit" type="primary" id={this.state.modal.id} onClick={this.handleOk}>
|
|
266
|
-
|
|
268
|
+
<FormattedMessage {...messages.yes} />
|
|
267
269
|
</CapButton>,
|
|
268
270
|
]}
|
|
269
271
|
>
|
|
@@ -276,7 +278,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
276
278
|
onOk={this.handleOk}
|
|
277
279
|
onCancel={this.handleCancel}
|
|
278
280
|
footer={[
|
|
279
|
-
<CapButton key="back" onClick={this.handleCancel}
|
|
281
|
+
<CapButton key="back" onClick={this.handleCancel}><FormattedMessage {...messages.ok} /></CapButton>,
|
|
280
282
|
]}
|
|
281
283
|
>
|
|
282
284
|
{this.state.modal.body}
|
|
@@ -838,13 +840,13 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
838
840
|
isValid = false;
|
|
839
841
|
if (showMessages && !isNaN(index)) {
|
|
840
842
|
if (tagValidationResponse.missingTags.length > 0 || tagValidationResponse.unsupportedTags.length > 0) {
|
|
841
|
-
errorString +=
|
|
843
|
+
errorString += `${this.props.intl.formatMessage(messages.contentNotValidLanguage)} ${currentLang}\n`;
|
|
842
844
|
}
|
|
843
845
|
if (tagValidationResponse.missingTags.length > 0) {
|
|
844
|
-
errorString +=
|
|
846
|
+
errorString += `${this.props.intl.formatMessage(messages.missingTags)} ${tagValidationResponse.missingTags.toString()}\n`;
|
|
845
847
|
}
|
|
846
848
|
if (tagValidationResponse.unsupportedTags.length > 0) {
|
|
847
|
-
errorString +=
|
|
849
|
+
errorString += `${this.props.intl.formatMessage(messages.unsupportedTags)} ${tagValidationResponse.unsupportedTags.toString()}\n`;
|
|
848
850
|
}
|
|
849
851
|
}
|
|
850
852
|
}
|
|
@@ -1582,9 +1584,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
1582
1584
|
}
|
|
1583
1585
|
|
|
1584
1586
|
deleteLanguage = () => {
|
|
1585
|
-
if (this.state.formData[`${this.state.currentTab - 1}`].activeTab
|
|
1586
|
-
|
|
1587
|
-
} else {
|
|
1587
|
+
if (this.state.formData[`${this.state.currentTab - 1}`].activeTab !== this.props.baseLanguage) {
|
|
1588
1588
|
const formData = _.cloneDeep(this.state.formData);
|
|
1589
1589
|
const currentTab = `${this.state.currentTab - 1}`;
|
|
1590
1590
|
const currentLang = formData[`${this.state.currentTab - 1}`].activeTab;
|
|
@@ -2037,8 +2037,8 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
2037
2037
|
img.src = _URL.createObjectURL(file);
|
|
2038
2038
|
img.onload = () => {
|
|
2039
2039
|
const fileParams = {
|
|
2040
|
-
width:
|
|
2041
|
-
height:
|
|
2040
|
+
width: img.width,
|
|
2041
|
+
height: img.height,
|
|
2042
2042
|
error: file.size / (1e+6) > 5,
|
|
2043
2043
|
};
|
|
2044
2044
|
this.callChildEvent({file, type: 'image', fileParams}, val, val.submitAction);
|
|
@@ -2084,7 +2084,6 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
2084
2084
|
if (this.props.schema.channel.toLowerCase() === 'email') {
|
|
2085
2085
|
//
|
|
2086
2086
|
const imgSrc = template && template.versions && template.versions.base ? template.versions.base.preview_http_url : '';
|
|
2087
|
-
const ifPreviewGenerated = template && template.versions && template.versions.base ? template.versions.base.isPreviewGenerated : 0;
|
|
2088
2087
|
const content = <img src={imgSrc || ''} alt="" />;
|
|
2089
2088
|
|
|
2090
2089
|
temp.content = (
|
|
@@ -2482,10 +2481,6 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
2482
2481
|
const type = val.type;
|
|
2483
2482
|
const styling = val.styling;
|
|
2484
2483
|
const isVersionEnable = (this.state.usingTabContainer && !val.standalone);
|
|
2485
|
-
if (val.id.match(/edmeditor/g)) {
|
|
2486
|
-
|
|
2487
|
-
}
|
|
2488
|
-
|
|
2489
2484
|
|
|
2490
2485
|
if (!this.props.isNewVersionFlow && !val.standalone && !val.onlyDisplay && isVersionEnable && !this.state.formData[`${this.state.currentTab - 1}`]) {
|
|
2491
2486
|
return true;
|
|
@@ -3181,12 +3176,12 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
3181
3176
|
this.props.schema ? this.renderForm() : ''
|
|
3182
3177
|
}
|
|
3183
3178
|
<SlideBox
|
|
3184
|
-
header={(<h3>
|
|
3179
|
+
header={(<h3>{this.props.intl.formatMessage(messages.layoutSelection)}</h3>)}
|
|
3185
3180
|
width={60}
|
|
3186
3181
|
content={cmsTemplateSelectionContent}
|
|
3187
3182
|
show={this.props.showEdmEmailTemplates}
|
|
3188
3183
|
handleClose={this.props.toggleEdmEmailTemplateSelection}
|
|
3189
|
-
loadingText={
|
|
3184
|
+
loadingText={this.props.intl.formatMessage(messages.loadingEDMTemplates)}
|
|
3190
3185
|
isLoading={this.props.getCmsTemplatesInProgress}
|
|
3191
3186
|
/>
|
|
3192
3187
|
</Row>
|
|
@@ -3237,6 +3232,7 @@ FormBuilder.propTypes = {
|
|
|
3237
3232
|
// saveForm: PropTypes.bool,
|
|
3238
3233
|
stopValidation: PropTypes.func,
|
|
3239
3234
|
handleDelete: PropTypes.func,
|
|
3235
|
+
intl: intlShape.isRequired,
|
|
3240
3236
|
};
|
|
3241
3237
|
|
|
3242
|
-
export default FormBuilder;
|
|
3238
|
+
export default injectIntl(FormBuilder);
|
|
@@ -7,7 +7,39 @@ import { defineMessages } from 'react-intl';
|
|
|
7
7
|
|
|
8
8
|
export default defineMessages({
|
|
9
9
|
header: {
|
|
10
|
-
id: '
|
|
10
|
+
id: 'creatives.components.FormBuilder.header',
|
|
11
11
|
defaultMessage: 'This is the FormBuilder component !',
|
|
12
12
|
},
|
|
13
|
+
contentNotValidLanguage: {
|
|
14
|
+
id: 'creatives.components.FormBuilder.contentNotValidLanguage',
|
|
15
|
+
defaultMessage: 'Content is not valid for language:',
|
|
16
|
+
},
|
|
17
|
+
missingTags: {
|
|
18
|
+
id: 'creatives.components.FormBuilder.missingTags',
|
|
19
|
+
defaultMessage: 'Missing tags are:',
|
|
20
|
+
},
|
|
21
|
+
unsupportedTags: {
|
|
22
|
+
id: 'creatives.components.FormBuilder.unsupportedTags',
|
|
23
|
+
defaultMessage: 'Unsupported tags are:',
|
|
24
|
+
},
|
|
25
|
+
layoutSelection: {
|
|
26
|
+
id: 'creatives.components.FormBuilder.layoutSelection',
|
|
27
|
+
defaultMessage: 'Layout Selection',
|
|
28
|
+
},
|
|
29
|
+
loadingEDMTemplates: {
|
|
30
|
+
id: 'creatives.components.FormBuilder.loadingEDMTemplates',
|
|
31
|
+
defaultMessage: 'Loading EDM Templates',
|
|
32
|
+
},
|
|
33
|
+
cancel: {
|
|
34
|
+
id: 'creatives.components.FormBuilder.cancel',
|
|
35
|
+
defaultMessage: 'Cancel',
|
|
36
|
+
},
|
|
37
|
+
yes: {
|
|
38
|
+
id: 'creatives.components.FormBuilder.yes',
|
|
39
|
+
defaultMessage: 'Yes',
|
|
40
|
+
},
|
|
41
|
+
ok: {
|
|
42
|
+
id: 'creatives.components.FormBuilder.ok',
|
|
43
|
+
defaultMessage: 'Ok',
|
|
44
|
+
},
|
|
13
45
|
});
|
|
@@ -7,19 +7,19 @@ import { defineMessages } from 'react-intl';
|
|
|
7
7
|
|
|
8
8
|
export default defineMessages({
|
|
9
9
|
header: {
|
|
10
|
-
id: '
|
|
10
|
+
id: 'creatives.components.Header.header',
|
|
11
11
|
defaultMessage: 'This is the Header component !',
|
|
12
12
|
},
|
|
13
13
|
preview: {
|
|
14
|
-
id: '
|
|
14
|
+
id: 'creatives.components.Header.preview',
|
|
15
15
|
defaultMessage: 'Preview',
|
|
16
16
|
},
|
|
17
17
|
cancel: {
|
|
18
|
-
id: '
|
|
18
|
+
id: 'creatives.components.Header.cancel',
|
|
19
19
|
defaultMessage: 'Cancel',
|
|
20
20
|
},
|
|
21
21
|
save: {
|
|
22
|
-
id: '
|
|
22
|
+
id: 'creatives.components.Header.save',
|
|
23
23
|
defaultMessage: 'Save',
|
|
24
24
|
},
|
|
25
25
|
});
|
|
@@ -22,7 +22,7 @@ class ImagePreview extends React.Component { // eslint-disable-line react/prefer
|
|
|
22
22
|
{this.props.header}
|
|
23
23
|
</div>
|
|
24
24
|
<div id="box-actions" style={{ float: 'right' }} onClick={this.props.handleClose}>
|
|
25
|
-
<i className="material-icons close-image-preview">close</i>
|
|
25
|
+
<i className="material-icons close-image-preview">{this.props.intl.formatMessage(messages.close)}</i>
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
28
|
|
|
@@ -7,7 +7,11 @@ import { defineMessages } from 'react-intl';
|
|
|
7
7
|
|
|
8
8
|
export default defineMessages({
|
|
9
9
|
loadingImage: {
|
|
10
|
-
id: '
|
|
10
|
+
id: 'creatives.components.ImagePreview.loadingImage',
|
|
11
11
|
defaultMessage: 'Loading images !!!!',
|
|
12
12
|
},
|
|
13
|
+
close: {
|
|
14
|
+
id: 'creatives.components.ImagePreview.close',
|
|
15
|
+
defaultMessage: 'close',
|
|
16
|
+
},
|
|
13
17
|
});
|
|
@@ -99,8 +99,8 @@ class PreviewSideBar extends React.Component { // eslint-disable-line react/pref
|
|
|
99
99
|
<div className="devices">
|
|
100
100
|
{!_.isEmpty(this.props.templateData) && this.props.templateData.versions.base.ANDROID && this.props.templateData.versions.base.IOS &&
|
|
101
101
|
<ButtonGroup onClick={this.changeDevice}>
|
|
102
|
-
<CapButton type={this.state.device === "android" ? "primary" : "secondary"} value={"android"}
|
|
103
|
-
<CapButton type={this.state.device === "iphone" ? "primary" : "secondary"} value={"iphone"}
|
|
102
|
+
<CapButton type={this.state.device === "android" ? "primary" : "secondary"} value={"android"}><FormattedMessage {...messages.android} /></CapButton>
|
|
103
|
+
<CapButton type={this.state.device === "iphone" ? "primary" : "secondary"} value={"iphone"}><FormattedMessage {...messages.ios} /></CapButton>
|
|
104
104
|
</ButtonGroup>}
|
|
105
105
|
</div>
|
|
106
106
|
{this.props.channel.toLowerCase() === "mobilepush" ?
|
|
@@ -7,27 +7,35 @@ import { defineMessages } from 'react-intl';
|
|
|
7
7
|
|
|
8
8
|
export default defineMessages({
|
|
9
9
|
header: {
|
|
10
|
-
id: '
|
|
10
|
+
id: 'creatives.components.PreviewSideBar.header',
|
|
11
11
|
defaultMessage: 'This is the PreviewSideBar component !',
|
|
12
12
|
},
|
|
13
13
|
lastModified: {
|
|
14
|
-
id: '
|
|
14
|
+
id: 'creatives.components.PreviewSideBar.lastModified',
|
|
15
15
|
defaultMessage: 'Last modified on',
|
|
16
16
|
},
|
|
17
17
|
uploadedBy: {
|
|
18
|
-
id: '
|
|
18
|
+
id: 'creatives.components.PreviewSideBar.uploadedBy',
|
|
19
19
|
defaultMessage: 'Last modified by',
|
|
20
20
|
},
|
|
21
21
|
edit: {
|
|
22
|
-
id: '
|
|
22
|
+
id: 'creatives.components.PreviewSideBar.edit',
|
|
23
23
|
defaultMessage: 'Edit',
|
|
24
24
|
},
|
|
25
25
|
select: {
|
|
26
|
-
id: '
|
|
26
|
+
id: 'creatives.components.PreviewSideBar.select',
|
|
27
27
|
defaultMessage: 'Select',
|
|
28
28
|
},
|
|
29
29
|
duplicate: {
|
|
30
|
-
id: '
|
|
30
|
+
id: 'creatives.components.PreviewSideBar.duplicate',
|
|
31
31
|
defaultMessage: 'Duplicate',
|
|
32
32
|
},
|
|
33
|
+
android: {
|
|
34
|
+
id: 'creatives.components.PreviewSideBar.android',
|
|
35
|
+
defaultMessage: 'Android',
|
|
36
|
+
},
|
|
37
|
+
ios: {
|
|
38
|
+
id: 'creatives.components.PreviewSideBar.ios',
|
|
39
|
+
defaultMessage: 'IOS',
|
|
40
|
+
},
|
|
33
41
|
});
|
|
@@ -7,15 +7,15 @@ import { defineMessages } from 'react-intl';
|
|
|
7
7
|
|
|
8
8
|
export default defineMessages({
|
|
9
9
|
inputPlaceholder: {
|
|
10
|
-
id: '
|
|
10
|
+
id: 'creatives.components.Sidebar.input.placeholder',
|
|
11
11
|
defaultMessage: 'Search...',
|
|
12
12
|
},
|
|
13
13
|
menuTitle: {
|
|
14
|
-
id: '
|
|
14
|
+
id: 'creatives.components.Sidebar.menuTitle',
|
|
15
15
|
defaultMessage: 'Menu',
|
|
16
16
|
},
|
|
17
17
|
creatives: {
|
|
18
|
-
id: '
|
|
18
|
+
id: 'creatives.components.Sidebar.creatives',
|
|
19
19
|
defaultMessage: 'Creatives',
|
|
20
20
|
},
|
|
21
21
|
});
|