@capillarytech/creatives-library 7.6.0 → 7.6.2
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/assets/DeviceForEmail.png +0 -0
- package/components/CapTagList/index.js +5 -5
- package/components/Card/index.js +1 -1
- package/components/Ckeditor/index.js +5 -5
- package/components/CustomPopOver/index.js +3 -3
- package/components/Edmeditor/index.js +4 -4
- package/components/EmailPreview/index.js +1 -1
- package/components/PreviewSideBar/index.js +3 -3
- package/components/Sidebar/index.js +1 -1
- package/components/SmsTest/index.js +4 -4
- package/components/TemplatePreview/index.js +2 -2
- package/components/Toastr/index.js +1 -1
- package/containers/Assets/Gallery/index.js +2 -2
- package/containers/Assets/Gallery/sagas.js +1 -1
- package/containers/Cap/actions.js +2 -2
- package/containers/Cap/reducer.js +1 -1
- package/containers/Cap/sagas.js +3 -3
- package/containers/Cap/selectors.js +1 -1
- package/containers/Ebill/actions.js +1 -1
- package/containers/Ebill/index.js +34 -34
- package/containers/Ebill/sagas.js +3 -3
- package/containers/Email/actions.js +2 -2
- package/containers/Email/index.js +171 -171
- package/containers/Email/reducer.js +1 -1
- package/containers/Email/sagas.js +6 -6
- package/containers/LanguageProvider/actions.js +1 -1
- package/containers/Line/Create/actions.js +5 -5
- package/containers/Line/Create/index.js +37 -37
- package/containers/Line/Create/sagas.js +7 -7
- package/containers/Line/Edit/actions.js +3 -3
- package/containers/Line/Edit/index.js +24 -24
- package/containers/Line/Edit/sagas.js +4 -4
- package/containers/MobilePush/Create/actions.js +2 -2
- package/containers/MobilePush/Create/index.js +35 -35
- package/containers/MobilePush/Create/sagas.js +2 -2
- package/containers/MobilePush/Edit/actions.js +3 -3
- package/containers/MobilePush/Edit/index.js +32 -32
- package/containers/MobilePush/Edit/sagas.js +5 -5
- package/containers/Sms/Create/actions.js +2 -2
- package/containers/Sms/Create/index.js +57 -57
- package/containers/Sms/Create/sagas.js +2 -2
- package/containers/Sms/Edit/actions.js +3 -3
- package/containers/Sms/Edit/index.js +44 -44
- package/containers/Sms/Edit/sagas.js +3 -3
- package/containers/TagList/index.js +9 -9
- package/containers/Templates/actions.js +5 -5
- package/containers/Templates/index.js +44 -44
- package/containers/Templates/sagas.js +5 -5
- package/containers/WeChat/MapTemplates/actions.js +1 -1
- package/containers/WeChat/MapTemplates/index.js +34 -34
- package/containers/WeChat/MapTemplates/sagas.js +2 -2
- package/containers/WeChat/RichmediaTemplates/Create/index.js +9 -9
- package/containers/WeChat/RichmediaTemplates/Edit/actions.js +1 -1
- package/containers/WeChat/RichmediaTemplates/Edit/sagas.js +1 -1
- package/package.json +1 -1
- package/services/api.js +20 -24
- package/utils/authWrapper.js +2 -2
- package/utils/smsCharCount.js +5 -5
- package/v2Components/CapTagList/index.js +1 -1
- package/v2Components/CapVideoUpload/index.js +14 -6
- package/v2Components/Card/index.js +1 -1
- package/v2Components/Ckeditor/index.js +5 -5
- package/v2Components/CustomPopOver/index.js +3 -3
- package/v2Components/Edmeditor/index.js +4 -4
- package/v2Components/EmailMobilePreview/index.js +4 -4
- package/v2Components/EmailPreviewV2/index.js +4 -4
- package/v2Components/FormBuilder/index.js +3 -3
- package/v2Components/PreviewSideBar/index.js +3 -3
- package/v2Components/SmsTest/index.js +4 -4
- package/v2Components/TemplatePreview/index.js +5 -1
- package/v2Components/Toastr/index.js +1 -1
- package/v2Containers/Assets/Gallery/sagas.js +1 -1
- package/v2Containers/Cap/actions.js +1 -1
- package/v2Containers/Cap/index.js +2 -2
- package/v2Containers/Cap/reducer.js +1 -1
- package/v2Containers/Cap/sagas.js +3 -3
- package/v2Containers/Cap/selectors.js +1 -1
- package/v2Containers/CapFacebookPreview/actions.js +3 -15
- package/v2Containers/CapFacebookPreview/constants.js +3 -11
- package/v2Containers/CapFacebookPreview/index.js +6 -6
- package/v2Containers/CapFacebookPreview/reducer.js +3 -9
- package/v2Containers/CapFacebookPreview/sagas.js +6 -65
- package/v2Containers/CreativesContainer/SlideBoxContent.js +16 -7
- package/v2Containers/CreativesContainer/index.js +1 -0
- package/v2Containers/Ebill/actions.js +1 -1
- package/v2Containers/Ebill/index.js +34 -34
- package/v2Containers/Ebill/sagas.js +3 -3
- package/v2Containers/Email/reducer.js +1 -1
- package/v2Containers/EmailWrapper/index.js +4 -4
- package/v2Containers/Facebook/Advertisement/index.js +38 -15
- package/v2Containers/Facebook/Advertisement/index.scss +9 -0
- package/v2Containers/Facebook/Advertisement/messages.js +2 -2
- package/v2Containers/Facebook/actions.js +2 -1
- package/v2Containers/Facebook/reducer.js +3 -0
- package/v2Containers/Facebook/sagas.js +18 -7
- package/v2Containers/LanguageProvider/actions.js +1 -1
- package/v2Containers/Line/Container/actions.js +5 -5
- package/v2Containers/Line/Container/sagas.js +4 -4
- package/v2Containers/MobilePush/Create/actions.js +2 -2
- package/v2Containers/MobilePush/Create/index.js +1 -1
- package/v2Containers/MobilePush/Create/sagas.js +2 -2
- package/v2Containers/MobilePush/Edit/actions.js +3 -3
- package/v2Containers/MobilePush/Edit/index.js +26 -26
- package/v2Containers/MobilePush/Edit/sagas.js +5 -5
- package/v2Containers/Sms/Create/index.js +4 -4
- package/v2Containers/TagList/index.js +6 -6
- package/v2Containers/Templates/actions.js +5 -5
- package/v2Containers/Templates/index.js +23 -2
- package/v2Containers/Templates/sagas.js +4 -4
- package/v2Containers/Viber/actions.js +2 -2
- package/v2Containers/Viber/sagas.js +2 -2
- package/v2Containers/WeChat/MapTemplates/actions.js +1 -1
- package/v2Containers/WeChat/MapTemplates/index.js +19 -19
- package/v2Containers/WeChat/MapTemplates/sagas.js +3 -3
- package/v2Containers/WeChat/RichmediaTemplates/Create/actions.js +1 -1
- package/v2Containers/WeChat/RichmediaTemplates/Edit/actions.js +1 -1
- package/v2Containers/WeChat/RichmediaTemplates/Edit/sagas.js +1 -1
|
@@ -188,11 +188,11 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
188
188
|
this.setState({templateData});
|
|
189
189
|
}
|
|
190
190
|
getEditorInstanse = (instance, id) => {
|
|
191
|
-
|
|
191
|
+
|
|
192
192
|
window.CKEDITOR.on( 'instanceReady', ( event ) => {
|
|
193
193
|
this.setState({editorInstanse: event.editor});
|
|
194
194
|
event.editor.on( 'focus', () => {
|
|
195
|
-
|
|
195
|
+
|
|
196
196
|
this.setState({editorInstanse: event.editor});
|
|
197
197
|
});
|
|
198
198
|
});
|
|
@@ -208,7 +208,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
208
208
|
this.setState({isFormValid});
|
|
209
209
|
}
|
|
210
210
|
getCurrentWindow(e) {
|
|
211
|
-
|
|
211
|
+
|
|
212
212
|
const response = {
|
|
213
213
|
action: e.action,
|
|
214
214
|
value: 'edit',
|
|
@@ -217,7 +217,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
217
217
|
parent.postMessage(JSON.stringify(response), '*');
|
|
218
218
|
}
|
|
219
219
|
getFormData(e) {
|
|
220
|
-
|
|
220
|
+
|
|
221
221
|
const message = {
|
|
222
222
|
mediaList: this.props.templateData.templateDetails.versions.base.mediaList,
|
|
223
223
|
media_id: this.props.templateData.templateDetails.versions.base.mediaId,
|
|
@@ -241,7 +241,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
241
241
|
value: data,
|
|
242
242
|
validity: this.state.isFormValid,
|
|
243
243
|
};
|
|
244
|
-
|
|
244
|
+
|
|
245
245
|
e.source.postMessage(JSON.stringify(response), e.origin);
|
|
246
246
|
}
|
|
247
247
|
injectMessages(elem) {
|
|
@@ -300,7 +300,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
300
300
|
// }
|
|
301
301
|
// }
|
|
302
302
|
moveToTemplates() {
|
|
303
|
-
|
|
303
|
+
|
|
304
304
|
const modalContent = {
|
|
305
305
|
title: this.props.intl.formatMessage(messages.modalTitle),
|
|
306
306
|
body: this.props.intl.formatMessage(messages.modalBody),
|
|
@@ -314,7 +314,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
314
314
|
this.setState({showModal: false});
|
|
315
315
|
}
|
|
316
316
|
showNext() {
|
|
317
|
-
|
|
317
|
+
|
|
318
318
|
const response = {
|
|
319
319
|
action: "showNext",
|
|
320
320
|
value: true,
|
|
@@ -322,7 +322,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
322
322
|
parent.postMessage(JSON.stringify(response), '*');
|
|
323
323
|
}
|
|
324
324
|
handleFrameTasks = (e) => {
|
|
325
|
-
|
|
325
|
+
|
|
326
326
|
const type = e.data;
|
|
327
327
|
if (typeof type === 'object') {
|
|
328
328
|
const action = type.action;
|
|
@@ -342,7 +342,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
342
342
|
this.getFormData(e);
|
|
343
343
|
break;
|
|
344
344
|
case "moveToTemplates":
|
|
345
|
-
|
|
345
|
+
|
|
346
346
|
this.moveToTemplates();
|
|
347
347
|
break;
|
|
348
348
|
default:
|
|
@@ -12,7 +12,7 @@ export function* getTemplateDetails({id, channel}) {
|
|
|
12
12
|
const params = {
|
|
13
13
|
id, channel,
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
const result = yield call(Api.getTemplateDetails, params);
|
|
17
17
|
// const sidebar = result.response.sidebar;
|
|
18
18
|
yield put({ type: types.GET_TEMPLATE_DETAILS_SUCCESS, data: result.response });
|
package/package.json
CHANGED
package/services/api.js
CHANGED
|
@@ -87,7 +87,7 @@ function request(url, options) {
|
|
|
87
87
|
try {
|
|
88
88
|
requestCallerName = getCallerName();
|
|
89
89
|
} catch (e) {
|
|
90
|
-
|
|
90
|
+
|
|
91
91
|
}
|
|
92
92
|
const fetchUrl = url.indexOf('?') !== -1 ? `${url}&time=${Date.now()}` : `${url}?time=${Date.now()}`;
|
|
93
93
|
return fetch(fetchUrl, options)
|
|
@@ -190,31 +190,31 @@ export const getUserData = () => {
|
|
|
190
190
|
};
|
|
191
191
|
|
|
192
192
|
export const createTemplate = ({template}) => {
|
|
193
|
-
|
|
193
|
+
|
|
194
194
|
const url = `${API_ENDPOINT}/templates/SMS`;
|
|
195
195
|
return request(url, getAPICallObject('POST', template));
|
|
196
196
|
};
|
|
197
197
|
|
|
198
198
|
export const editTemplate = ({template}) => {
|
|
199
|
-
|
|
199
|
+
|
|
200
200
|
const url = `${API_ENDPOINT}/templates/SMS`;
|
|
201
201
|
return request(url, getAPICallObject('POST', template));
|
|
202
202
|
};
|
|
203
203
|
|
|
204
204
|
export const createWeChatTemplate = ({template}) => {
|
|
205
|
-
|
|
205
|
+
|
|
206
206
|
const url = `${API_ENDPOINT}/templates/WECHAT`;
|
|
207
207
|
return request(url, getAPICallObject('POST', template));
|
|
208
208
|
};
|
|
209
209
|
|
|
210
210
|
export const createMobilePushTemplate = ({template}) => {
|
|
211
|
-
|
|
211
|
+
|
|
212
212
|
const url = `${API_ENDPOINT}/templates/MOBILEPUSH`;
|
|
213
213
|
return request(url, getAPICallObject('POST', template));
|
|
214
214
|
};
|
|
215
215
|
|
|
216
216
|
export const duplicateTemplate = ({id, channel}) => {
|
|
217
|
-
|
|
217
|
+
|
|
218
218
|
const url = `${API_ENDPOINT}/templates/duplicate/${id}/${channel}`;
|
|
219
219
|
return request(url, getAPICallObject('GET'));
|
|
220
220
|
};
|
|
@@ -225,25 +225,25 @@ export const getFTPServers = () => {
|
|
|
225
225
|
};
|
|
226
226
|
|
|
227
227
|
export const editWeChatTemplate = ({template}) => {
|
|
228
|
-
|
|
228
|
+
|
|
229
229
|
const url = `${API_ENDPOINT}/templates/WECHAT`;
|
|
230
230
|
return request(url, getAPICallObject('POST', template));
|
|
231
231
|
};
|
|
232
232
|
|
|
233
233
|
export const createEmailTemplate = ({template}) => {
|
|
234
|
-
|
|
234
|
+
|
|
235
235
|
const url = `${API_ENDPOINT}/templates/EMAIL`;
|
|
236
236
|
return request(url, getAPICallObject('POST', template));
|
|
237
237
|
};
|
|
238
238
|
|
|
239
239
|
export const createEbillTemplate = ({template}) => {
|
|
240
|
-
|
|
240
|
+
|
|
241
241
|
const url = `${API_ENDPOINT}/templates/EBILL`;
|
|
242
242
|
return request(url, getAPICallObject('POST', template));
|
|
243
243
|
};
|
|
244
244
|
|
|
245
245
|
export const getTemplateDetails = ({id, channel}) => {
|
|
246
|
-
|
|
246
|
+
|
|
247
247
|
const url = `${API_ENDPOINT}/templates/${id}/${channel ? channel.toUpperCase() : 'SMS'}`;
|
|
248
248
|
return request(url, getAPICallObject('GET'));
|
|
249
249
|
};
|
|
@@ -254,7 +254,7 @@ export const getAllTemplates = ({channel, queryParams}) => {
|
|
|
254
254
|
};
|
|
255
255
|
|
|
256
256
|
export const deleteTemplate = ({channel, id}) => {
|
|
257
|
-
|
|
257
|
+
|
|
258
258
|
const url = `${API_ENDPOINT}/templates/${id}/${channel}`;
|
|
259
259
|
return request(url, getAPICallObject('DELETE'));
|
|
260
260
|
//return API.deleteResource(url);
|
|
@@ -350,7 +350,7 @@ export const getCmsData = (cmsType, projectId, langId) => {
|
|
|
350
350
|
};
|
|
351
351
|
|
|
352
352
|
export const getEdmTemplates = () => {
|
|
353
|
-
|
|
353
|
+
|
|
354
354
|
const url = `${API_ENDPOINT}/templates/email/default`;
|
|
355
355
|
return request(url, getAPICallObject('GET'));
|
|
356
356
|
};
|
|
@@ -363,7 +363,7 @@ export const getDefaultBeeTemplates = () => {
|
|
|
363
363
|
// All about line
|
|
364
364
|
|
|
365
365
|
export const createLineTemplate = ({template}) => {
|
|
366
|
-
|
|
366
|
+
|
|
367
367
|
const url = `${API_ENDPOINT}/templates/LINE`;
|
|
368
368
|
return request(url, getAPICallObject('POST', template));
|
|
369
369
|
};
|
|
@@ -412,20 +412,11 @@ export const createCustomRow = (data) => {
|
|
|
412
412
|
return request(url, getAPICallObject('POST', data));
|
|
413
413
|
};
|
|
414
414
|
|
|
415
|
-
export const
|
|
416
|
-
const url = `${API_ENDPOINT}/facebook/
|
|
415
|
+
export const getFacebookPreview = ({previewData}) => {
|
|
416
|
+
const url = `${API_ENDPOINT}/facebook/getPreview`;
|
|
417
417
|
return request(url, getAPICallObject('POST', previewData));
|
|
418
418
|
};
|
|
419
419
|
|
|
420
|
-
export const getVideoFacebookPreview = ({previewData}) => {
|
|
421
|
-
const url = `${API_ENDPOINT}/facebook/getVideoPreview`;
|
|
422
|
-
return request(url, getAPICallObject('POST', previewData));
|
|
423
|
-
};
|
|
424
|
-
|
|
425
|
-
export const getCarouselFacebookPreview = ({previewData}) => {
|
|
426
|
-
const url = `${API_ENDPOINT}/facebook/getCarouselPreview`;
|
|
427
|
-
return request(url, getAPICallObject('POST', previewData));
|
|
428
|
-
};
|
|
429
420
|
|
|
430
421
|
export const getOrgOUs = ({ orgID }) => {
|
|
431
422
|
const url = `${ARYA_ENDPOINT}/org/${orgID}/oulist`;
|
|
@@ -436,3 +427,8 @@ export const getOrgLevelCampaignSettings = () => {
|
|
|
436
427
|
const url = `${CAMPAIGNS_API_ORG_ENDPOINT}/settings`;
|
|
437
428
|
return request(url, getAPICallObject('GET', null, false, true));
|
|
438
429
|
};
|
|
430
|
+
|
|
431
|
+
export const getFacebookVideoId = ({videoUrl, accessToken, actId, pageAccessToken, pageId}) => {
|
|
432
|
+
const url = `${API_ENDPOINT}/facebook/getFacebookVideoId`;
|
|
433
|
+
return request(url, getAPICallObject('POST', {videoUrl, accessToken, actId, pageAccessToken, pageId}));
|
|
434
|
+
};
|
package/utils/authWrapper.js
CHANGED
|
@@ -10,10 +10,10 @@ const getIsLoggedIn = () => {
|
|
|
10
10
|
let isLoggedIn = false;
|
|
11
11
|
if (process.env.NODE_ENV === "production" && JSON.parse(window.localStorage.getItem('isLoggedIn'))) {
|
|
12
12
|
isLoggedIn = true;
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
} else if (localStorage.getItem("token")) {
|
|
15
15
|
isLoggedIn = true;
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
}
|
|
18
18
|
return isLoggedIn;
|
|
19
19
|
};
|
package/utils/smsCharCount.js
CHANGED
|
@@ -174,7 +174,7 @@ let updateSmsData = (chars) => {
|
|
|
174
174
|
msgContent = msgContent.replace(/\r/g, " ").replace(/\f/g, " ");
|
|
175
175
|
|
|
176
176
|
const matches = msgContent.split("");
|
|
177
|
-
|
|
177
|
+
|
|
178
178
|
let use7bit = true;
|
|
179
179
|
let length7bit = 0;
|
|
180
180
|
let length16bit = 0;
|
|
@@ -255,7 +255,7 @@ function _camp1(s) {
|
|
|
255
255
|
try {
|
|
256
256
|
return i18n.dgettext("camp1", s) !== '' ? this.i18n.dgettext("camp1", s) : s;
|
|
257
257
|
} catch (err) {
|
|
258
|
-
|
|
258
|
+
|
|
259
259
|
return s;
|
|
260
260
|
}
|
|
261
261
|
}
|
|
@@ -328,7 +328,7 @@ export function updateCharCount(boxVal) {
|
|
|
328
328
|
|
|
329
329
|
// let unicodeFlag = 0;
|
|
330
330
|
// let extraChars = 0;
|
|
331
|
-
|
|
331
|
+
|
|
332
332
|
let msgCount = 0;
|
|
333
333
|
const lenCount = smsCharCount(boxVal);
|
|
334
334
|
const len = lenCount[0];
|
|
@@ -337,9 +337,9 @@ export function updateCharCount(boxVal) {
|
|
|
337
337
|
const totalChars = lenCount[2].total_chars;
|
|
338
338
|
const charset = lenCount[2].charset;
|
|
339
339
|
if (!charset && totalChars > 1000) {
|
|
340
|
-
|
|
340
|
+
|
|
341
341
|
} else if (charset && totalChars > 500) {
|
|
342
|
-
|
|
342
|
+
|
|
343
343
|
}
|
|
344
344
|
|
|
345
345
|
// return `${len} characters = ${msgCount} Messages*, Characters left: ${charLeft}`;
|
|
@@ -139,7 +139,7 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
139
139
|
supportedTagsString += `${supportedTag} ,`;
|
|
140
140
|
});
|
|
141
141
|
supportedTagsString = supportedTagsString.replace(/,\s*$/, "");
|
|
142
|
-
|
|
142
|
+
|
|
143
143
|
if (_.has(val, 'subtags')) {
|
|
144
144
|
const temp = this.renderTags(val.subtags);
|
|
145
145
|
list.push((
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
CapError,
|
|
18
18
|
CapUploader,
|
|
19
19
|
CapSpin,
|
|
20
|
+
CapNotification,
|
|
20
21
|
} from '@capillarytech/cap-ui-library';
|
|
21
22
|
import {bytes2Size} from '../../utils/common';
|
|
22
23
|
import './index.scss';
|
|
@@ -48,6 +49,7 @@ function CapVideoUpload(props) {
|
|
|
48
49
|
previewUrl,
|
|
49
50
|
videoHeight,
|
|
50
51
|
videoWidth,
|
|
52
|
+
videoId,
|
|
51
53
|
} = uploadedAssetList;
|
|
52
54
|
|
|
53
55
|
const [isTemplateDrawerRequired, updateTemplateDrawerRequirement] = useState(false);
|
|
@@ -82,11 +84,14 @@ function CapVideoUpload(props) {
|
|
|
82
84
|
const metaVideoSrc = get(videoData, `uploadedAssetDataVideo_${index}.metaInfo.secure_file_path`, '');
|
|
83
85
|
const previewImgUrl = get(videoData, `uploadedAssetDataVideo_${index}.metaInfo.video_file_path_preview`, '');
|
|
84
86
|
const metaVideoName = get(videoData, `uploadedAssetDataVideo_${index}.metaInfo.name`, '');
|
|
87
|
+
const metaVideoId = get(videoData, `uploadedAssetDataVideo_${index}.videoIdResponse.fbVideo.id`, '');
|
|
88
|
+
|
|
85
89
|
if (metaVideoSrc && videoSrc === "") {
|
|
86
90
|
onVideoUploadUpdateAssestList(index, {
|
|
87
91
|
previewUrl: previewImgUrl,
|
|
88
92
|
videoSrc: metaVideoSrc,
|
|
89
93
|
videoName: metaVideoName,
|
|
94
|
+
videoId: metaVideoId,
|
|
90
95
|
},
|
|
91
96
|
);
|
|
92
97
|
}
|
|
@@ -100,6 +105,7 @@ function CapVideoUpload(props) {
|
|
|
100
105
|
}
|
|
101
106
|
}, [videoData[`assetUploadingVideo_${index}`]]);
|
|
102
107
|
|
|
108
|
+
|
|
103
109
|
useEffect(() => {
|
|
104
110
|
if (!isEmpty(uploadedAssetList)) {
|
|
105
111
|
const {
|
|
@@ -184,12 +190,13 @@ function CapVideoUpload(props) {
|
|
|
184
190
|
onVideoUploadUpdateAssestList(
|
|
185
191
|
index,
|
|
186
192
|
{
|
|
187
|
-
previewUrl,
|
|
188
|
-
videoName,
|
|
189
|
-
videoHeight,
|
|
190
|
-
videoWidth,
|
|
191
|
-
videoSrc,
|
|
192
|
-
videoDuration,
|
|
193
|
+
previewUrl: "",
|
|
194
|
+
videoName: "",
|
|
195
|
+
videoHeight: "",
|
|
196
|
+
videoWidth: "",
|
|
197
|
+
videoSrc: "",
|
|
198
|
+
videoDuration: "",
|
|
199
|
+
videoId: "",
|
|
193
200
|
}
|
|
194
201
|
);
|
|
195
202
|
};
|
|
@@ -204,6 +211,7 @@ function CapVideoUpload(props) {
|
|
|
204
211
|
index,
|
|
205
212
|
{
|
|
206
213
|
videoSrc,
|
|
214
|
+
videoId,
|
|
207
215
|
videoName,
|
|
208
216
|
videoHeight: metaVideoHeight,
|
|
209
217
|
videoWidth: metaVideoWidth,
|
|
@@ -33,7 +33,7 @@ class CustomCard extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
handleMouseHover(data) {
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
this.setState({isHovering: data});
|
|
38
38
|
this.props.onHover(!this.state.isHovering, this.props.id);
|
|
39
39
|
}
|
|
@@ -166,7 +166,7 @@ class Ckeditor extends React.Component { // eslint-disable-line react/prefer-sta
|
|
|
166
166
|
// setTimeout(() => {
|
|
167
167
|
// this.editorInstance.name = this.id;
|
|
168
168
|
// }, 5000);
|
|
169
|
-
|
|
169
|
+
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
|
|
@@ -183,7 +183,7 @@ class Ckeditor extends React.Component { // eslint-disable-line react/prefer-sta
|
|
|
183
183
|
onLoad() {
|
|
184
184
|
if (this.unmounting) return;
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
|
|
187
187
|
if (!window.CKEDITOR) {
|
|
188
188
|
console.error("CKEditor not found");
|
|
189
189
|
return;
|
|
@@ -191,13 +191,13 @@ class Ckeditor extends React.Component { // eslint-disable-line react/prefer-sta
|
|
|
191
191
|
|
|
192
192
|
let html = this.props.content;
|
|
193
193
|
html = html.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, "\"");
|
|
194
|
-
|
|
194
|
+
|
|
195
195
|
this.editorInstance = window.CKEDITOR.appendTo(
|
|
196
196
|
this.node,
|
|
197
197
|
this.state.config,
|
|
198
198
|
html
|
|
199
199
|
);
|
|
200
|
-
|
|
200
|
+
|
|
201
201
|
|
|
202
202
|
if (this.props.getEditorInstanse) {
|
|
203
203
|
this.props.getEditorInstanse(this.editorInstance, this.props.id);
|
|
@@ -248,7 +248,7 @@ class Ckeditor extends React.Component { // eslint-disable-line react/prefer-sta
|
|
|
248
248
|
};
|
|
249
249
|
|
|
250
250
|
render() {
|
|
251
|
-
|
|
251
|
+
|
|
252
252
|
return (
|
|
253
253
|
<div id={this.props.id} style={{borderRight: "1px solid #000 !important"}}>
|
|
254
254
|
<div className={this.props.activeClass} ref={(node) => (this.node = node)}/>
|
|
@@ -17,17 +17,17 @@ import messages from './messages';
|
|
|
17
17
|
|
|
18
18
|
class CustomPopOver extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
19
19
|
componentWillMount() {
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
componentWillReceiveProps(nextProps) {
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
renderPopoverContent() {
|
|
28
28
|
const elem = [];
|
|
29
29
|
_.forEach(this.props.popOverList, (content, index) => {
|
|
30
|
-
|
|
30
|
+
|
|
31
31
|
if (this.props.excludeList.indexOf(content.iso_code) === -1) {
|
|
32
32
|
elem.push(
|
|
33
33
|
<p style={{ cursor: "pointer"}} key={index} onClick={() => this.props.handlePopOverClick(content)}>{content.language}</p>
|
|
@@ -25,13 +25,13 @@ class Edmeditor extends React.Component { // eslint-disable-line react/prefer-st
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
componentDidMount() {
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
componentWillReceiveProps(nextProps) {
|
|
32
|
-
|
|
32
|
+
|
|
33
33
|
// if (!_.isEqual(nextProps.content, this.props.content)) {
|
|
34
|
-
//
|
|
34
|
+
//
|
|
35
35
|
// this.editorInstance.content = nextProps.content;
|
|
36
36
|
// }
|
|
37
37
|
}
|
|
@@ -41,7 +41,7 @@ class Edmeditor extends React.Component { // eslint-disable-line react/prefer-st
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
render() {
|
|
44
|
-
|
|
44
|
+
|
|
45
45
|
return (
|
|
46
46
|
this.props.edmSrc ?
|
|
47
47
|
(<iframe id={this.props.id} className={this.props.activeClass} src={this.props.edmSrc} height="460" width="100%" style={{height: "calc(100vh - 180px)"}}></iframe>)
|
|
@@ -17,15 +17,15 @@ import moment from 'moment';
|
|
|
17
17
|
import EmailPreviewV2 from '../EmailPreviewV2';
|
|
18
18
|
import messages from '../EmailPreviewV2/messages';
|
|
19
19
|
import './index.scss';
|
|
20
|
-
import mobileBody from '../../assets/
|
|
20
|
+
import mobileBody from '../../assets/DeviceForEmail.png';
|
|
21
21
|
import { removeLinksFromHtmlContent } from './../../utils/common';
|
|
22
22
|
import {selectTemplateContent} from '../../containers/Templates/selectors';
|
|
23
23
|
import * as templateActions from '../../containers/Templates/actions';
|
|
24
24
|
|
|
25
25
|
const deviceAspectRatio = {
|
|
26
26
|
mobile: {
|
|
27
|
-
height: "
|
|
28
|
-
width: "
|
|
27
|
+
height: "541",
|
|
28
|
+
width: "340",
|
|
29
29
|
},
|
|
30
30
|
};
|
|
31
31
|
|
|
@@ -95,7 +95,7 @@ class EmailMobilePreview extends React.Component {
|
|
|
95
95
|
)}
|
|
96
96
|
<div className={"shell align-center"}>
|
|
97
97
|
|
|
98
|
-
<img src={mobileBody} alt="capillary" width="
|
|
98
|
+
<img src={mobileBody} alt="capillary" width="386" />
|
|
99
99
|
<div className={`${messageContainerName} ${emailSubjectLabel ? 'with-subject' : ''}`}>
|
|
100
100
|
{emailSubjectLabel}
|
|
101
101
|
<iframe srcDoc={copyContent} {...deviceAspectRatio.mobile} >
|
|
@@ -18,7 +18,7 @@ import moment from 'moment';
|
|
|
18
18
|
import messages from './messages';
|
|
19
19
|
import './_emailPreviewV2.scss';
|
|
20
20
|
import tabletBody from '../../assets/iPad.svg';
|
|
21
|
-
import mobileBody from '../../assets/
|
|
21
|
+
import mobileBody from '../../assets/DeviceForEmail.png';
|
|
22
22
|
import { removeLinksFromHtmlContent } from './../../utils/common';
|
|
23
23
|
|
|
24
24
|
import {selectTemplateContent} from '../../v2Containers/Templates/selectors';
|
|
@@ -34,8 +34,8 @@ const deviceAspectRatio = {
|
|
|
34
34
|
width: "450",
|
|
35
35
|
}),
|
|
36
36
|
mobile: (emailSubject) => ({
|
|
37
|
-
height: emailSubject ? "
|
|
38
|
-
width: "
|
|
37
|
+
height: emailSubject ? "541" : "511",
|
|
38
|
+
width: "340",
|
|
39
39
|
}),
|
|
40
40
|
};
|
|
41
41
|
const devices = {
|
|
@@ -127,7 +127,7 @@ class EmailPreviewV2 extends React.Component {
|
|
|
127
127
|
tab: <StyledCapIcon type="mobile" active={currentDevice === 'mobile'} />,
|
|
128
128
|
content: (<div className="email-preview-container">
|
|
129
129
|
<div className="shell align-center">
|
|
130
|
-
<img src={mobileBody} alt="capillary" width="
|
|
130
|
+
<img src={mobileBody} alt="capillary" width="386" />
|
|
131
131
|
{iframeDiv}
|
|
132
132
|
</div>
|
|
133
133
|
</div>),
|
|
@@ -2067,12 +2067,12 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
2067
2067
|
// }
|
|
2068
2068
|
return;
|
|
2069
2069
|
}
|
|
2070
|
-
|
|
2070
|
+
|
|
2071
2071
|
// val.injectedEvents[event].call(this.props.parent, data);
|
|
2072
2072
|
val.injectedEvents[event].call(this.props.parent, data, val.id);
|
|
2073
2073
|
}
|
|
2074
2074
|
openFileDialog = (e, parentID) => {
|
|
2075
|
-
|
|
2075
|
+
|
|
2076
2076
|
document.querySelector(`#${parentID} #fileName`).click();
|
|
2077
2077
|
};
|
|
2078
2078
|
handleOk = (ev) => {
|
|
@@ -3185,7 +3185,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
3185
3185
|
if (val.id.indexOf('template-content') > -1 && val.id !== 'template-content') {
|
|
3186
3186
|
langIndex = parseInt(val.id.replace('template-content', ''), 10) - 1;
|
|
3187
3187
|
}
|
|
3188
|
-
|
|
3188
|
+
|
|
3189
3189
|
const currentLang = ((!_.isEmpty(this.state.formData) && !_.isEmpty(this.state.formData[`${this.state.currentTab - 1}`]) && !_.isEmpty(this.state.formData[`${this.state.currentTab - 1}`].selectedLanguages) && this.state.formData[`${this.state.currentTab - 1}`].selectedLanguages[langIndex]) ? this.state.formData[`${this.state.currentTab - 1}`].selectedLanguages[langIndex] : this.props.baseLanguage) || 'en';
|
|
3190
3190
|
const content = (!_.isEmpty(this.state.formData) && this.state.formData[`${this.state.currentTab - 1}`] && this.state.formData[`${this.state.currentTab - 1}`][currentLang] && this.state.formData[`${this.state.currentTab - 1}`][currentLang]['template-content'] || '');
|
|
3191
3191
|
columns.push(
|
|
@@ -47,10 +47,10 @@ class PreviewSideBar extends React.Component { // eslint-disable-line react/pref
|
|
|
47
47
|
this.props.onEditClick(e, this.props.templateData._id, this.props.templateData.modeType, path);
|
|
48
48
|
}
|
|
49
49
|
render() {
|
|
50
|
-
|
|
50
|
+
|
|
51
51
|
let content = '';
|
|
52
52
|
if ((this.props.channel || '').toLowerCase() === 'wechat') {
|
|
53
|
-
|
|
53
|
+
|
|
54
54
|
content = this.props.templateData.content;
|
|
55
55
|
} else if ((this.props.channel || '').toLowerCase() === "mobilepush" && !_.isEmpty(this.props.templateData)) {
|
|
56
56
|
const data = this.state.device === "android" ? this.props.templateData.versions.base.ANDROID : this.props.templateData.versions.base.IOS;
|
|
@@ -88,7 +88,7 @@ class PreviewSideBar extends React.Component { // eslint-disable-line react/pref
|
|
|
88
88
|
if ((this.props.channel || '').toLowerCase() === 'wechat') {
|
|
89
89
|
path = this.props.templateData && this.props.templateData.definition && this.props.templateData.definition.msgcontent === "RICH_MEDIA_WECHAT" ? `/wechat/richmedia/edit/${this.props.templateData._id}` : `/wechat/edit/${this.props.templateData._id}`;
|
|
90
90
|
}
|
|
91
|
-
|
|
91
|
+
|
|
92
92
|
return (
|
|
93
93
|
<SlideBox
|
|
94
94
|
header={this.props.templateData && this.props.templateData.name ? this.props.templateData.name : ''}
|
|
@@ -23,20 +23,20 @@ class SmsTest extends React.Component { // eslint-disable-line react/prefer-stat
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
onTemplateNameChange(name) {
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
onTemplateContentChange(content) {
|
|
30
|
-
|
|
30
|
+
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
onFormDataChange(formData) {
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
saveFormData(formData) {
|
|
38
38
|
//Logic to save in db etc
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
}
|
|
41
41
|
render() {
|
|
42
42
|
const schema = {
|
|
@@ -146,7 +146,7 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
|
|
|
146
146
|
document.getElementById("msg_count").val = smsDetails.parts;
|
|
147
147
|
}
|
|
148
148
|
//smsText = this.props.intl.formatMessage(messages.previewGenerationMessage);
|
|
149
|
-
//
|
|
149
|
+
//
|
|
150
150
|
}
|
|
151
151
|
const type = this.props.location && this.props.location.query.type ? this.props.location.query.type : '';
|
|
152
152
|
let iosActions = [];
|
|
@@ -647,6 +647,10 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
|
|
|
647
647
|
primaryText={content.primaryText}
|
|
648
648
|
callToAction={content.callToAction}
|
|
649
649
|
displayLink={content.displayLink}
|
|
650
|
+
orgUnitFacebookPageSettingsMap={{pageAccessToken: content.pageAccessToken,
|
|
651
|
+
pageId: content.pageId}}
|
|
652
|
+
accountId={content.accountId}
|
|
653
|
+
accessToken={content.accessToken}
|
|
650
654
|
/>
|
|
651
655
|
</div>
|
|
652
656
|
)}
|
|
@@ -37,7 +37,7 @@ class Toastr extends React.Component { // eslint-disable-line react/prefer-state
|
|
|
37
37
|
return (
|
|
38
38
|
<StyledMessageContainer style={{ ...messagePositionConfig[this.props.position] }}>
|
|
39
39
|
{this.props.messagesList.map((message) => {
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
return <ToastrMessage key={message.messageId} timeout={this.props.timeout} messageId={message.messageId} title={message.title} text={message.text} type={message.type} handleMessageClose={this.closeMessagePopup} hideProgressBar={message.hideProgressBar} />;
|
|
42
42
|
})}
|
|
43
43
|
</StyledMessageContainer>
|
|
@@ -24,7 +24,7 @@ export function* uploadAsset(file, assetType, fileParams) {
|
|
|
24
24
|
export function* deleteAssetById(assetId, assetType) {
|
|
25
25
|
try {
|
|
26
26
|
const result = yield call(Api.deleteAssetById, assetId, assetType);
|
|
27
|
-
|
|
27
|
+
|
|
28
28
|
yield put({ type: types.DELETE_ASSET_SUCCESS, data: result.response });
|
|
29
29
|
} catch (error) {
|
|
30
30
|
yield put({ type: types.DELETE_ASSET_FAILURE, error });
|