@capillarytech/creatives-library 6.14.0 → 6.14.1
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/FormBuilder/index.js +6 -2
- package/config/app.js +2 -0
- package/containers/Ebill/index.js +3 -0
- package/containers/Email/index.js +16 -8
- package/containers/Sms/Create/index.js +2 -1
- package/index.js +7 -0
- package/package.json +1 -1
- package/reducers.js +2 -1
- package/services/api.js +9 -3
- package/translations/en.json +50 -107
- package/translations/zh.json +50 -107
- package/utils/common.js +118 -0
- package/v2Components/FormBuilder/index.js +2 -10
- package/v2Containers/App/constants.js +1 -1
- package/v2Containers/CreativesContainer/SlideBoxContent.js +23 -3
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +2 -0
- package/v2Containers/CreativesContainer/constants.js +2 -0
- package/v2Containers/CreativesContainer/index.js +10 -1
- package/v2Containers/Email/actions.js +2 -1
- package/v2Containers/Email/index.js +45 -29
- package/v2Containers/Email/sagas.js +2 -2
- package/v2Containers/EmailWrapper/index.js +2 -0
- package/v2Containers/FTP/_FTP.scss +92 -0
- package/v2Containers/FTP/actions.js +7 -0
- package/v2Containers/FTP/constants.js +3 -0
- package/v2Containers/FTP/index.js +517 -0
- package/v2Containers/FTP/messages.js +60 -0
- package/v2Containers/FTP/reducer.js +32 -0
- package/v2Containers/FTP/sagas.js +26 -0
- package/v2Containers/FTP/selectors.js +20 -0
- package/v2Containers/TemplatesV2/index.js +18 -6
- package/v2Containers/TemplatesV2/messages.js +4 -0
|
@@ -23,6 +23,7 @@ import Templates from '../Templates';
|
|
|
23
23
|
import CallTask from '../CallTask';
|
|
24
24
|
import Facebook from '../Facebook';
|
|
25
25
|
import Line from '../Line/Container';
|
|
26
|
+
import FTP from '../FTP';
|
|
26
27
|
import Gallery from '../Assets/Gallery';
|
|
27
28
|
import withStyles from '../../hoc/withStyles';
|
|
28
29
|
import styles, { CapTabStyle } from './TemplatesV2.style';
|
|
@@ -52,6 +53,7 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
52
53
|
//'wechat': {content: this.getTemplatesComponent('wechat'), tab: 'Wechat', key: 'wechat'},
|
|
53
54
|
mPush: {content: <></>, tab: intl.formatMessage(messages.pushNotification), key: 'mobilepush'},
|
|
54
55
|
line: {content: <></>, tab: intl.formatMessage(messages.line), key: 'line'},
|
|
56
|
+
|
|
55
57
|
};
|
|
56
58
|
let filteredPanes = Object.keys(defaultPanes)
|
|
57
59
|
.filter((key) => !channelsToHide.includes(key)).reduce((obj = [], key) => {
|
|
@@ -68,6 +70,10 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
68
70
|
if (!channelsToHide.includes('facebook')) {
|
|
69
71
|
filteredPanes.push({content: <div></div>, tab: intl.formatMessage(messages.facebook), key: 'facebook'});
|
|
70
72
|
}
|
|
73
|
+
if (!channelsToHide.includes('FTP')) {
|
|
74
|
+
filteredPanes.push({content: <></>, tab: intl.formatMessage(messages.FTP), key: 'ftp'});
|
|
75
|
+
defaultChannel = 'FTP';
|
|
76
|
+
}
|
|
71
77
|
}
|
|
72
78
|
|
|
73
79
|
filteredPanes = filteredPanes.map( (pane) => {
|
|
@@ -152,14 +158,16 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
152
158
|
);
|
|
153
159
|
}
|
|
154
160
|
|
|
155
|
-
getLineComponent = () =>
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
isCreateFlow
|
|
161
|
+
getLineComponent = () => (
|
|
162
|
+
<Line
|
|
163
|
+
{...this.props}
|
|
164
|
+
isCreateFlow
|
|
160
165
|
/>
|
|
161
166
|
)
|
|
162
|
-
|
|
167
|
+
|
|
168
|
+
getFTPComponent = () => (
|
|
169
|
+
<FTP mode={this.props.FTPMode} {...this.props} />
|
|
170
|
+
);
|
|
163
171
|
|
|
164
172
|
getTemplatesComponent(channel) {
|
|
165
173
|
// const templates = this.props.Templates[`${channel}Templates`];
|
|
@@ -169,6 +177,9 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
169
177
|
if (channel === 'line') {
|
|
170
178
|
return this.getLineComponent();
|
|
171
179
|
}
|
|
180
|
+
if (channel === 'ftp') {
|
|
181
|
+
return this.getFTPComponent();
|
|
182
|
+
}
|
|
172
183
|
}
|
|
173
184
|
const location = {pathname: `/${channel}`, search: '', query};
|
|
174
185
|
switch (channel) {
|
|
@@ -267,6 +278,7 @@ TemplatesV2.propTypes = {
|
|
|
267
278
|
messageDetails: PropTypes.object,
|
|
268
279
|
cap: PropTypes.object,
|
|
269
280
|
authData: PropTypes.object,
|
|
281
|
+
FTPMode: PropTypes.string,
|
|
270
282
|
};
|
|
271
283
|
|
|
272
284
|
TemplatesV2.defaultProps = {
|
|
@@ -34,6 +34,10 @@ export default defineMessages({
|
|
|
34
34
|
id: 'creatives.containersV2.TemplatesV2.email',
|
|
35
35
|
defaultMessage: 'Email',
|
|
36
36
|
},
|
|
37
|
+
FTP: {
|
|
38
|
+
id: 'creatives.containersV2.TemplatesV2.FTP',
|
|
39
|
+
defaultMessage: 'FTP',
|
|
40
|
+
},
|
|
37
41
|
pushNotification: {
|
|
38
42
|
id: 'creatives.containersV2.TemplatesV2.pushNotification',
|
|
39
43
|
defaultMessage: 'Push notification',
|