@capillarytech/creatives-library 6.14.1 → 6.15.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/app.js +5 -2
- package/config/app.js +0 -2
- package/index.js +0 -7
- package/package.json +1 -1
- package/reducers.js +1 -2
- package/services/api.js +0 -7
- package/utils/common.js +0 -118
- package/utils/ignoredErrorMessages.js +4 -0
- package/v2Components/FormBuilder/index.js +4 -2
- package/v2Containers/App/constants.js +1 -1
- package/v2Containers/CreativesContainer/SlideBoxContent.js +1 -17
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +0 -2
- package/v2Containers/CreativesContainer/constants.js +0 -2
- package/v2Containers/CreativesContainer/index.js +0 -8
- package/v2Containers/Line/Create/_lineCreate.scss +64 -0
- package/v2Containers/Line/Create/actions.js +94 -0
- package/v2Containers/Line/Create/constants.js +43 -0
- package/v2Containers/Line/Create/index.js +1112 -0
- package/v2Containers/Line/Create/initialSchema.js +378 -0
- package/v2Containers/Line/Create/messages.js +229 -0
- package/v2Containers/Line/Create/reducer.js +99 -0
- package/v2Containers/Line/Create/sagas.js +113 -0
- package/v2Containers/Line/Create/selectors.js +30 -0
- package/v2Containers/Line/CreateWrapper/constants.js +2 -0
- package/v2Containers/Line/CreateWrapper/index.js +117 -0
- package/v2Containers/Line/CreateWrapper/messages.js +55 -0
- package/v2Containers/Line/Edit/_lineEdit.scss +23 -0
- package/v2Containers/Line/Edit/actions.js +79 -0
- package/v2Containers/Line/Edit/constants.js +27 -0
- package/v2Containers/Line/Edit/index.js +1051 -0
- package/v2Containers/Line/Edit/messages.js +173 -0
- package/v2Containers/Line/Edit/reducer.js +83 -0
- package/v2Containers/Line/Edit/sagas.js +81 -0
- package/v2Containers/Line/Edit/selectors.js +29 -0
- package/v2Containers/Line/Edit/tests/actions.test.js +18 -0
- package/v2Containers/Line/Edit/tests/index.test.js +10 -0
- package/v2Containers/Line/Edit/tests/reducer.test.js +9 -0
- package/v2Containers/Line/Edit/tests/sagas.test.js +15 -0
- package/v2Containers/Line/Edit/tests/selectors.test.js +10 -0
- package/v2Containers/TemplatesV2/index.js +0 -13
- package/v2Containers/TemplatesV2/messages.js +0 -4
- package/v2Containers/WeChat/MapTemplates/index.js +1 -1
- package/v2Containers/FTP/_FTP.scss +0 -92
- package/v2Containers/FTP/actions.js +0 -7
- package/v2Containers/FTP/constants.js +0 -3
- package/v2Containers/FTP/index.js +0 -517
- package/v2Containers/FTP/messages.js +0 -60
- package/v2Containers/FTP/reducer.js +0 -32
- package/v2Containers/FTP/sagas.js +0 -26
- package/v2Containers/FTP/selectors.js +0 -20
package/app.js
CHANGED
|
@@ -25,6 +25,7 @@ import initialState from './initialState';
|
|
|
25
25
|
import './styles/vendor/semantic/dist/semantic.min.css';
|
|
26
26
|
import './styles/main.scss';
|
|
27
27
|
import pathConfig from './config/path';
|
|
28
|
+
import ignoredErrorMessages from './utils/ignoredErrorMessages';
|
|
28
29
|
// addLocaleData([...en, ...es, ...fr, ...it, ...zh]);
|
|
29
30
|
|
|
30
31
|
const browserHistory = useRouterHistory(createHistory)({
|
|
@@ -38,10 +39,12 @@ const history = syncHistoryWithStore(browserHistory, store, {
|
|
|
38
39
|
});
|
|
39
40
|
|
|
40
41
|
const bugSnagErrorCallback = (event) => {
|
|
41
|
-
const { app: { releaseStage } = {} } = event || {};
|
|
42
|
+
const { app: { releaseStage } = {}, error } = event || {};
|
|
43
|
+
const errorMessage = error && error.message;
|
|
42
44
|
if (
|
|
43
45
|
(releaseStage || '').includes('nightly') ||
|
|
44
|
-
process.env.NODE_ENV !== 'production'
|
|
46
|
+
process.env.NODE_ENV !== 'production' ||
|
|
47
|
+
ignoredErrorMessages.include[errorMessage]
|
|
45
48
|
) {
|
|
46
49
|
return false;
|
|
47
50
|
}
|
package/config/app.js
CHANGED
|
@@ -11,7 +11,6 @@ const config = {
|
|
|
11
11
|
dashboard_url: '/sms',
|
|
12
12
|
dashboard_url_v2: '/v2',
|
|
13
13
|
subscription_api_endpoint: '/arya/api/v1/org-settings/subscription',
|
|
14
|
-
exports_api_endpoint: '/arya/api/v1/export/data',
|
|
15
14
|
accountConfig: (strs, accountId) => `${window.location.origin}/org/config/AccountAdd?q=a&channelId=2&accountId=${accountId}&edit=1`,
|
|
16
15
|
},
|
|
17
16
|
development: {
|
|
@@ -20,7 +19,6 @@ const config = {
|
|
|
20
19
|
auth_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/auth',
|
|
21
20
|
arya_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1',
|
|
22
21
|
subscription_api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/org-settings/subscription',
|
|
23
|
-
exports_api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/export/data',
|
|
24
22
|
login_url: '/auth/login',
|
|
25
23
|
dashboard_url: '/sms',
|
|
26
24
|
dashboard_url_v2: '/v2',
|
package/index.js
CHANGED
|
@@ -56,10 +56,6 @@ import MobilepushCreate from './v2Containers/MobilePush/Create';
|
|
|
56
56
|
import mobilepushCreateReducer from './v2Containers/MobilePush/Create/reducer';
|
|
57
57
|
import mobilepushCreateSaga from './v2Containers/MobilePush/Create/sagas';
|
|
58
58
|
|
|
59
|
-
import FTP from './v2Containers/FTP';
|
|
60
|
-
import FTPReducer from './v2Containers/FTP/reducer';
|
|
61
|
-
import FTPSagas from './v2Containers/FTP/sagas';
|
|
62
|
-
|
|
63
59
|
import MobilepushEdit from './v2Containers/MobilePush/Edit';
|
|
64
60
|
import mobilepushEditReducer from './v2Containers/MobilePush/Edit/reducer';
|
|
65
61
|
import mobilepushEditSaga from './v2Containers/MobilePush/Edit/sagas';
|
|
@@ -97,7 +93,6 @@ const LineCreateContainer = {LineCreate, lineCreateReducer, lineCreateSaga};
|
|
|
97
93
|
const TemplatesV2Container = {TemplatesV2, templateReducer, templateSaga};
|
|
98
94
|
const FacebookContainer = {Facebook, facebookReducer, facebookSaga};
|
|
99
95
|
const GalleryContainer = {Gallery, galleryReducer, gallerySagas};
|
|
100
|
-
const FTPContainer = {FTP, FTPReducer, FTPSagas};
|
|
101
96
|
|
|
102
97
|
export {default as TagList} from './v2Containers/TagList/index';
|
|
103
98
|
export {default as TagListSaga} from './v2Containers/TagList/sagas';
|
|
@@ -109,7 +104,6 @@ export {default as CallTaskPreview} from './v2Components/CallTaskPreview';
|
|
|
109
104
|
export {default as EmailMobilePreview} from './v2Components/EmailMobilePreview';
|
|
110
105
|
export {default as MobilePushPreview} from './v2Components/MobilePushPreviewV2';
|
|
111
106
|
export {default as WechatRichmediaTemplatePreview} from './v2Components/TemplatePreview/WechatRichmediaTemplatePreview';
|
|
112
|
-
export {default as FTP} from './v2Containers/FTP';
|
|
113
107
|
|
|
114
108
|
CreativesContainer.CreativesContainerReducer = CreativesContainerReducer;
|
|
115
109
|
|
|
@@ -137,5 +131,4 @@ export { CapContainer,
|
|
|
137
131
|
updateCharCount,
|
|
138
132
|
FacebookContainer,
|
|
139
133
|
GalleryContainer,
|
|
140
|
-
FTPContainer,
|
|
141
134
|
};
|
package/package.json
CHANGED
package/reducers.js
CHANGED
|
@@ -17,7 +17,7 @@ import templateReducer from 'containers/Templates/reducer';
|
|
|
17
17
|
import tagsReducer from 'containers/TagList/reducer';
|
|
18
18
|
import emailReducer from 'containers/Email/reducer';
|
|
19
19
|
import ebillReducer from 'containers/Ebill/reducer';
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
/*
|
|
22
22
|
* routeReducer
|
|
23
23
|
*
|
|
@@ -62,7 +62,6 @@ export default function createReducer(asyncReducers) {
|
|
|
62
62
|
email: emailReducer,
|
|
63
63
|
ebill: ebillReducer,
|
|
64
64
|
beeEditor: beeEditorReducer,
|
|
65
|
-
FTP: ftpReducer,
|
|
66
65
|
...asyncReducers,
|
|
67
66
|
});
|
|
68
67
|
}
|
package/services/api.js
CHANGED
|
@@ -9,7 +9,6 @@ import getSchema from './getSchema';
|
|
|
9
9
|
import * as API from '../utils/ApiCaller';
|
|
10
10
|
import { GA } from '@capillarytech/cap-ui-utils';
|
|
11
11
|
let API_ENDPOINT = config.development.api_endpoint;
|
|
12
|
-
let EXPORT_API_ENDPOINT = config.development.exports_api_endpoint;
|
|
13
12
|
let CAMPAIGNS_API_ENDPOINT = config.development.campaigns_api_endpoint;
|
|
14
13
|
let API_AUTH_ENDPOINT = config.development.auth_endpoint;
|
|
15
14
|
let ARYA_ENDPOINT = config.development.arya_endpoint;
|
|
@@ -214,12 +213,6 @@ export const duplicateTemplate = ({id, channel}) => {
|
|
|
214
213
|
return request(url, getAPICallObject('GET'));
|
|
215
214
|
};
|
|
216
215
|
|
|
217
|
-
export const getFTPServers = () => {
|
|
218
|
-
console.log('in api.js getFTPServers');
|
|
219
|
-
const url = `${EXPORT_API_ENDPOINT}/ftplist`;
|
|
220
|
-
return request(url, getAPICallObject('GET'));
|
|
221
|
-
};
|
|
222
|
-
|
|
223
216
|
export const editWeChatTemplate = ({template}) => {
|
|
224
217
|
console.log('in api.js', template);
|
|
225
218
|
const url = `${API_ENDPOINT}/templates/WECHAT`;
|
package/utils/common.js
CHANGED
|
@@ -37,121 +37,3 @@ export const hasStore2DoorFeature = Auth.hasFeatureAccess.bind(
|
|
|
37
37
|
null,
|
|
38
38
|
STORE2DOOR_PLUS_ENABLED,
|
|
39
39
|
);
|
|
40
|
-
|
|
41
|
-
export function getTreeStructuredTags(tagsList, userLocale = 'en') {
|
|
42
|
-
console.log('populating tags', (tagsList || []).length);
|
|
43
|
-
const mainTags = {};
|
|
44
|
-
|
|
45
|
-
//Form tags object with tag headers
|
|
46
|
-
_.forEach(tagsList, (temp) => {
|
|
47
|
-
const tag = temp.definition;
|
|
48
|
-
if (!tag['tag-header']) {
|
|
49
|
-
mainTags[tag.value] = {
|
|
50
|
-
name: tag.label[userLocale] ? tag.label[userLocale] : tag.label.en,
|
|
51
|
-
value: tag.value,
|
|
52
|
-
};
|
|
53
|
-
} else if (tag['tag-header'] && mainTags[tag.value]) {
|
|
54
|
-
mainTags[tag.value].subtags = _.concat(mainTags[tag.value].subtags, tag.subtags);
|
|
55
|
-
} else if (!mainTags[tag.value]) {
|
|
56
|
-
// console.log('Inside ', tag.label);
|
|
57
|
-
mainTags[tag.value] = {
|
|
58
|
-
'tag-header': true,
|
|
59
|
-
"name": tag.label[userLocale] ? tag.label[userLocale] : tag.label.en,
|
|
60
|
-
"subtags": tag.subtags,
|
|
61
|
-
"value": tag.value,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
const mainTagsCloned = _.cloneDeep(mainTags);
|
|
67
|
-
//Insert subtags in tag headers and reomve them from top level
|
|
68
|
-
const result = {};
|
|
69
|
-
_.forEach(mainTagsCloned, (tag, key) => {
|
|
70
|
-
if (tag['tag-header']) {
|
|
71
|
-
const tagWithChildren = populateTagForChildren(tag, mainTagsCloned, key);
|
|
72
|
-
tagWithChildren.resolved = true;
|
|
73
|
-
result[key] = tagWithChildren;
|
|
74
|
-
} else {
|
|
75
|
-
result[key] = tag;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
//Delete extra tag headers
|
|
80
|
-
_.forEach(result, (tag) => {
|
|
81
|
-
if (tag['tag-header']) {
|
|
82
|
-
_.forEach(tag.subtags, (subtag, key) => {
|
|
83
|
-
if (result[key]) {
|
|
84
|
-
result[key].deleted = true;
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
//Actually delete them
|
|
90
|
-
_.forEach(result, (tag, key) => {
|
|
91
|
-
if (tag.deleted) {
|
|
92
|
-
delete result[key];
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
return getTreeStructureData(result);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function populateTagForChildren(targetTag, tagsObject, tagValue) {
|
|
99
|
-
const tag = targetTag;
|
|
100
|
-
if (tag && tag['tag-header'] && !tag.resolved) {
|
|
101
|
-
const tempSubTags = {};
|
|
102
|
-
_.forEach(tag.subtags, (subtag) => {
|
|
103
|
-
if (tagsObject[subtag]) {
|
|
104
|
-
const children = populateTagForChildren(tagsObject[subtag], tagsObject, subtag);
|
|
105
|
-
children.resolved = true;
|
|
106
|
-
tempSubTags[subtag] = children;
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
tag.subtags = tempSubTags;
|
|
110
|
-
return tag;
|
|
111
|
-
}
|
|
112
|
-
return tagsObject[tagValue];
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function getTreeStructureData(data) {
|
|
116
|
-
const result = [];
|
|
117
|
-
_.forOwn(data, (mainTag) => {
|
|
118
|
-
const { name, value, subtags = [] } = mainTag;
|
|
119
|
-
if (!mainTag['tag-header']) {
|
|
120
|
-
result.push({
|
|
121
|
-
title: name,
|
|
122
|
-
value: `{{${value}}}`,
|
|
123
|
-
});
|
|
124
|
-
} else {
|
|
125
|
-
const obj = {
|
|
126
|
-
title: name,
|
|
127
|
-
value: `{{${value}}}`,
|
|
128
|
-
selectable: false,
|
|
129
|
-
};
|
|
130
|
-
obj.children = getSubTags(subtags);
|
|
131
|
-
result.push(obj);
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
return result;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
function getSubTags(subtagsParam) {
|
|
138
|
-
const result = [];
|
|
139
|
-
_.forOwn(subtagsParam, (subTag) => {
|
|
140
|
-
const { name, value, subtags = [] } = subTag;
|
|
141
|
-
if (_.isEmpty(subtags)) {
|
|
142
|
-
result.push({
|
|
143
|
-
title: name,
|
|
144
|
-
value: `{{${value}}}`,
|
|
145
|
-
});
|
|
146
|
-
} else {
|
|
147
|
-
const obj = {
|
|
148
|
-
title: name,
|
|
149
|
-
value: `{{${value}}}`,
|
|
150
|
-
selectable: false,
|
|
151
|
-
};
|
|
152
|
-
obj.children = getSubTags(subtags);
|
|
153
|
-
result.push(obj);
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
return result;
|
|
157
|
-
}
|
|
@@ -2362,7 +2362,9 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
2362
2362
|
this.renderTextAreaContent(styling, columns, val, isVersionEnable, rows, cols, val.offset);
|
|
2363
2363
|
break;
|
|
2364
2364
|
case "contentPreview":
|
|
2365
|
-
|
|
2365
|
+
const { formData , currentTab } = this.state || {};
|
|
2366
|
+
const tab = formData && formData[currentTab - 1];
|
|
2367
|
+
content = isVersionEnable ? tab && tab['sms-editor'] : formData && formData['sms-editor'];
|
|
2366
2368
|
charList = updateCharCount(content).char_list;
|
|
2367
2369
|
columns.push(<CapColumn id={val.id} className={"preview-chars"} span={val.width}>
|
|
2368
2370
|
{charList.map((char) => char)}
|
|
@@ -3198,7 +3200,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
3198
3200
|
}
|
|
3199
3201
|
}
|
|
3200
3202
|
const { currentTab, formData } = this.state;
|
|
3201
|
-
const supportedLanguages = (formData[currentTab - 1] || {}).selectedLanguages;
|
|
3203
|
+
const supportedLanguages = (formData[currentTab - 1] || {}).selectedLanguages || {};
|
|
3202
3204
|
const currentLang = supportedLanguages[langTab - 1];
|
|
3203
3205
|
|
|
3204
3206
|
let beeJson = '',
|
|
@@ -18,7 +18,6 @@ import CallTask from '../CallTask';
|
|
|
18
18
|
import MobliPushEdit from '../MobilePush/Edit';
|
|
19
19
|
import * as constants from './constants';
|
|
20
20
|
import LineContainer from '../Line/Container';
|
|
21
|
-
import FTP from '../FTP';
|
|
22
21
|
const CreativesWrapper = styled.div`
|
|
23
22
|
.ant-popover,
|
|
24
23
|
.ant-notification,
|
|
@@ -118,7 +117,6 @@ function SlideBoxContent(props) {
|
|
|
118
117
|
selectedAccount,
|
|
119
118
|
onShowTemplates,
|
|
120
119
|
handleClose,
|
|
121
|
-
onFTPSubmit,
|
|
122
120
|
} = props;
|
|
123
121
|
const type = (messageDetails.type || '').toLowerCase(); // type is context in get tags values : outbound | dvs | referral | loyalty | coupons
|
|
124
122
|
const query = { type: !isFullMode && 'embedded', module: isFullMode ? 'default' : 'library', isEditFromCampaigns: (templateData || {}).isEditFromCampaigns};
|
|
@@ -149,7 +147,6 @@ function SlideBoxContent(props) {
|
|
|
149
147
|
let isEditCallTask = false;
|
|
150
148
|
let isEditMPush = false;
|
|
151
149
|
let isEditFacebook = false;
|
|
152
|
-
let isEditFTP = false;
|
|
153
150
|
const isEmailCreate = slidBoxContent === 'createTemplate' && channel === constants.EMAIL;
|
|
154
151
|
if (templateData && channel) {
|
|
155
152
|
channel = templateData.type;// for edit mode with template data
|
|
@@ -162,7 +159,6 @@ function SlideBoxContent(props) {
|
|
|
162
159
|
isPreview = slidBoxContent === 'preview' && (channel === constants.SMS || channel === constants.LINE);
|
|
163
160
|
isEmailPreview = slidBoxContent === 'preview' && channel === constants.EMAIL;
|
|
164
161
|
isMpushPreview = slidBoxContent === 'preview' && channel === constants.MOBILE_PUSH;
|
|
165
|
-
isEditFTP = slidBoxContent === 'editTemplate' && [constants.NO_COMMUNICATION, constants.FTP].includes(channel);
|
|
166
162
|
}
|
|
167
163
|
|
|
168
164
|
const getChannelPreviewContent = (templateDataObject) => {
|
|
@@ -231,6 +227,7 @@ function SlideBoxContent(props) {
|
|
|
231
227
|
return get(templateDataObject, `versions.base.content`);
|
|
232
228
|
}
|
|
233
229
|
};
|
|
230
|
+
|
|
234
231
|
return (
|
|
235
232
|
<CreativesWrapper>
|
|
236
233
|
{!isFullMode && slidBoxContent === 'templates' && (
|
|
@@ -253,10 +250,6 @@ function SlideBoxContent(props) {
|
|
|
253
250
|
onCreateComplete={onCreateComplete}
|
|
254
251
|
getFormSubscriptionData={getFormData}
|
|
255
252
|
handleClose={handleClose}
|
|
256
|
-
onFTPSubmit={onFTPSubmit}
|
|
257
|
-
slidBoxContent={slidBoxContent}
|
|
258
|
-
FTPMode="create"
|
|
259
|
-
selectedOfferDetails={selectedOfferDetails}
|
|
260
253
|
/>
|
|
261
254
|
)}
|
|
262
255
|
{isPreview && (
|
|
@@ -323,14 +316,6 @@ function SlideBoxContent(props) {
|
|
|
323
316
|
onTestContentClicked={onTestContentClicked}
|
|
324
317
|
/>
|
|
325
318
|
)}
|
|
326
|
-
{isEditFTP && (
|
|
327
|
-
<FTP
|
|
328
|
-
mode="edit"
|
|
329
|
-
onFTPSubmit={onFTPSubmit}
|
|
330
|
-
messageDetails={messageDetails}
|
|
331
|
-
selectedOfferDetails={selectedOfferDetails}
|
|
332
|
-
/>
|
|
333
|
-
)}
|
|
334
319
|
{
|
|
335
320
|
isEditCallTask &&
|
|
336
321
|
<CallTask
|
|
@@ -558,6 +543,5 @@ SlideBoxContent.propTypes = {
|
|
|
558
543
|
onCreateComplete: PropTypes.func,
|
|
559
544
|
saveMessage: PropTypes.func,
|
|
560
545
|
selectedAccount: PropTypes.object,
|
|
561
|
-
onFTPSubmit: PropTypes.func,
|
|
562
546
|
};
|
|
563
547
|
export default SlideBoxContent;
|
|
@@ -13,7 +13,5 @@ export const CALL_TASK = "CALL_TASK";
|
|
|
13
13
|
export const MOBILE_PUSH = "MOBILEPUSH";
|
|
14
14
|
export const WECHAT = "WECHAT";
|
|
15
15
|
export const FACEBOOK = "FACEBOOK";
|
|
16
|
-
export const FTP = "FTP";
|
|
17
|
-
export const NO_COMMUNICATION = "NO_COMMUNICATION";
|
|
18
16
|
export const SHOW_CONTANER_LOADER = "app/CreativesContainer/SHOW_CONTANER_LOADER";
|
|
19
17
|
export const HIDE_CONTAINER_LOADER = "app/CreativesContainer/HIDE_CONTAINER_LOADER";
|
|
@@ -143,13 +143,6 @@ class Creatives extends React.Component {
|
|
|
143
143
|
const {channel} = templateData;
|
|
144
144
|
let creativesTemplateData = {type: channel };
|
|
145
145
|
switch (channel) {
|
|
146
|
-
case constants.NO_COMMUNICATION: {
|
|
147
|
-
creativesTemplateData = {
|
|
148
|
-
type: channel,
|
|
149
|
-
...templateData,
|
|
150
|
-
};
|
|
151
|
-
break;
|
|
152
|
-
}
|
|
153
146
|
case constants.SMS: {
|
|
154
147
|
const formData = {
|
|
155
148
|
"sms-editor": templateData.messageBody,
|
|
@@ -613,7 +606,6 @@ class Creatives extends React.Component {
|
|
|
613
606
|
selectedAccount={this.props.selectedAccount}
|
|
614
607
|
onShowTemplates={this.onShowTemplates}
|
|
615
608
|
handleClose={this.handleCloseSlideBox}
|
|
616
|
-
onFTPSubmit={getCreativesData}
|
|
617
609
|
editor={editor}
|
|
618
610
|
/>
|
|
619
611
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
@import '~@capillarytech/cap-ui-library/styles/_variables.scss';
|
|
2
|
+
|
|
3
|
+
.line-row{
|
|
4
|
+
margin-bottom: 16px;
|
|
5
|
+
}
|
|
6
|
+
.slidebox-content-container {
|
|
7
|
+
overflow-x: hidden;
|
|
8
|
+
}
|
|
9
|
+
.line-image {
|
|
10
|
+
position: relative;
|
|
11
|
+
}
|
|
12
|
+
.image-container {
|
|
13
|
+
display: flex;
|
|
14
|
+
& > div {
|
|
15
|
+
min-width: 516px;
|
|
16
|
+
}
|
|
17
|
+
border-radius: 5px;
|
|
18
|
+
.image-placeholder{
|
|
19
|
+
line-height: 150px;
|
|
20
|
+
}
|
|
21
|
+
img {
|
|
22
|
+
object-fit: cover;
|
|
23
|
+
max-width: 100%;
|
|
24
|
+
max-height: 100%;
|
|
25
|
+
height: auto !important;
|
|
26
|
+
width: auto !important;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.pagination-container.gallery-upload {
|
|
31
|
+
height: calc(100vh - 60px);
|
|
32
|
+
|
|
33
|
+
.cap-custom-card-list-col {
|
|
34
|
+
max-width: 156px;
|
|
35
|
+
max-height: 156px;
|
|
36
|
+
display: inline-block;
|
|
37
|
+
margin-left: $CAP_SPACE_04;
|
|
38
|
+
margin-right: $CAP_SPACE_04;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.ant-card-body {
|
|
42
|
+
padding-top: 0;
|
|
43
|
+
|
|
44
|
+
.ant-card-meta-description img {
|
|
45
|
+
height: 80px;
|
|
46
|
+
width: auto;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.gallery-image {
|
|
52
|
+
height: 156px;
|
|
53
|
+
width: 156px;
|
|
54
|
+
border-radius: 4px;
|
|
55
|
+
margin: 3px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.sms-text {
|
|
59
|
+
img {
|
|
60
|
+
display: block;
|
|
61
|
+
max-width: 100%;
|
|
62
|
+
object-fit: cover;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Create actions
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as types from './constants';
|
|
8
|
+
|
|
9
|
+
export function createTemplate(template, callback) {
|
|
10
|
+
console.log('action trigereed createtemplate');
|
|
11
|
+
return {
|
|
12
|
+
type: types.CREATE_TEMPLATE_REQUEST,
|
|
13
|
+
template,
|
|
14
|
+
callback,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function clearCreateResponse() {
|
|
19
|
+
console.log('clearCreateResponse');
|
|
20
|
+
return {
|
|
21
|
+
type: types.CLEAR_CREATE_RESPONSE_REQUEST,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function defaultAction() {
|
|
26
|
+
return {
|
|
27
|
+
type: types.DEFAULT_ACTION,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function uploadAsset(file, assetType, fileParams) {
|
|
32
|
+
return {
|
|
33
|
+
type: types.UPLOAD_ASSET_REQUEST,
|
|
34
|
+
file,
|
|
35
|
+
assetType,
|
|
36
|
+
fileParams,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function clearAsset() {
|
|
41
|
+
return {
|
|
42
|
+
type: types.CLEAR_ASSET,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
// FOR EDIT
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
export function editTemplate(template, callback) {
|
|
51
|
+
console.log('action trigereed editTemplate line @@@');
|
|
52
|
+
return {
|
|
53
|
+
type: types.EDIT_TEMPLATE_REQUEST,
|
|
54
|
+
template,
|
|
55
|
+
callback,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function getTemplateDetails(id) {
|
|
60
|
+
console.log('getting template line @@@', id);
|
|
61
|
+
return {
|
|
62
|
+
type: types.GET_TEMPLATE_DETAILS_REQUEST,
|
|
63
|
+
id,
|
|
64
|
+
channel: 'LINE',
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function clearEditResponse() {
|
|
69
|
+
console.log('clearEditResponse');
|
|
70
|
+
return {
|
|
71
|
+
type: types.CLEAR_EDIT_RESPONSE_REQUEST,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function clearData() {
|
|
76
|
+
return {
|
|
77
|
+
type: types.CLEAR_DATA,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function getLineTemplatesList(channel, queryParams) {
|
|
82
|
+
return {
|
|
83
|
+
type: types.GET_LINE_TEMPLATES_LIST_REQUEST,
|
|
84
|
+
channel,
|
|
85
|
+
queryParams,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function setSelectedTemplate(templateData) {
|
|
90
|
+
return {
|
|
91
|
+
type: types.SET_SELECTED_TEMPLATE,
|
|
92
|
+
data: templateData,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Create constants
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const DEFAULT_ACTION = 'app/Create/DEFAULT_ACTION';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export const CREATE_TEMPLATE_REQUEST = 'app/v2Containers/Line/Create/CREATE_TEMPLATE_REQUEST';
|
|
11
|
+
export const CREATE_TEMPLATE_SUCCESS = 'app/v2Containers/Line/Create/CREATE_TEMPLATE_SUCCESS';
|
|
12
|
+
export const CREATE_TEMPLATE_FAILURE = 'app/v2Containers/Line/Create/CREATE_TEMPLATE_FAILURE';
|
|
13
|
+
export const UPLOAD_ASSET_REQUEST = 'app/v2Containers/Line/Create/UPLOAD_ASSET_REQUEST';
|
|
14
|
+
export const UPLOAD_ASSET_SUCCESS = 'app/v2Containers/Line/Create/UPLOAD_ASSET_SUCCESS';
|
|
15
|
+
export const UPLOAD_ASSET_FAILURE = 'app/v2Containers/Line/Create/UPLOAD_ASSET_FAILURE';
|
|
16
|
+
export const CLEAR_ASSET = 'app/v2Containers/Line/Create/CLEAR_ASSET';
|
|
17
|
+
|
|
18
|
+
export const CLEAR_CREATE_RESPONSE_REQUEST = 'app/v2Containers/Line/Create/CLEAR_CREATE_RESPONSE_REQUEST';
|
|
19
|
+
export const CLEAR_CREATE_RESPONSE_SUCCESS = 'app/v2Containers/Line/Create/CLEAR_CREATE_RESPONSE_SUCCESS';
|
|
20
|
+
export const CLEAR_CREATE_RESPONSE_FAILURE = 'app/v2Containers/Line/Create/CLEAR_CREATE_RESPONSE_FAILURE';
|
|
21
|
+
|
|
22
|
+
export const LINE_IMG_HEIGHT = 400;
|
|
23
|
+
export const LINE_IMG_WIDTH = 300;
|
|
24
|
+
export const LINE_IMG_SIZE = 30000000;
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
// edit
|
|
28
|
+
|
|
29
|
+
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/v2Containers/line/Edit/GET_TEMPLATE_DETAILS_REQUEST';
|
|
30
|
+
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/v2Containers/line/Edit/GET_TEMPLATE_DETAILS_SUCCESS';
|
|
31
|
+
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/v2Containers/line/Edit/GET_TEMPLATE_DETAILS_FAILURE';
|
|
32
|
+
|
|
33
|
+
export const EDIT_TEMPLATE_REQUEST = 'app/v2Containers/line/Edit/EDIT_TEMPLATE_REQUEST';
|
|
34
|
+
export const EDIT_TEMPLATE_SUCCESS = 'app/v2Containers/line/Edit/EDIT_TEMPLATE_SUCCESS';
|
|
35
|
+
export const EDIT_TEMPLATE_FAILURE = 'app/v2Containers/line/Edit/EDIT_TEMPLATE_FAILURE';
|
|
36
|
+
|
|
37
|
+
export const CLEAR_EDIT_RESPONSE_REQUEST = 'app/v2Containers/line/Edit/CLEAR_EDIT_RESPONSE_REQUEST';
|
|
38
|
+
export const CLEAR_DATA = 'app/v2Containers/Line/Edit/CLEAR_DATA';
|
|
39
|
+
export const SET_SELECTED_TEMPLATE = 'app/v2Containers/Line/Edit/SET_SELECTED_TEMPLATE';
|
|
40
|
+
|
|
41
|
+
export const GET_LINE_TEMPLATES_LIST_REQUEST = 'app/v2Containers/Line/GET_LINE_TEMPLATES_LIST_REQUEST';
|
|
42
|
+
export const GET_LINE_TEMPLATES_LIST_SUCCESS = 'app/v2Containers/Line/GET_LINE_TEMPLATES_LIST_SUCCESS';
|
|
43
|
+
export const GET_LINE_TEMPLATES_LIST_FAILURE = 'app/v2Containers/Line/GET_LINE_TEMPLATES_LIST_FAILURE';
|