@capillarytech/creatives-library 7.6.2 → 7.6.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.
Files changed (112) hide show
  1. package/components/CapTagList/index.js +5 -5
  2. package/components/Card/index.js +1 -1
  3. package/components/Ckeditor/index.js +5 -5
  4. package/components/CustomPopOver/index.js +3 -3
  5. package/components/Edmeditor/index.js +4 -4
  6. package/components/EmailPreview/index.js +1 -1
  7. package/components/PreviewSideBar/index.js +3 -3
  8. package/components/Sidebar/index.js +1 -1
  9. package/components/SmsTest/index.js +4 -4
  10. package/components/TemplatePreview/index.js +2 -2
  11. package/components/Toastr/index.js +1 -1
  12. package/containers/Assets/Gallery/index.js +2 -2
  13. package/containers/Assets/Gallery/sagas.js +1 -1
  14. package/containers/Cap/actions.js +2 -2
  15. package/containers/Cap/reducer.js +1 -1
  16. package/containers/Cap/sagas.js +3 -3
  17. package/containers/Cap/selectors.js +1 -1
  18. package/containers/Ebill/actions.js +1 -1
  19. package/containers/Ebill/index.js +34 -34
  20. package/containers/Ebill/sagas.js +3 -3
  21. package/containers/Email/actions.js +2 -2
  22. package/containers/Email/index.js +171 -171
  23. package/containers/Email/reducer.js +1 -1
  24. package/containers/Email/sagas.js +6 -6
  25. package/containers/LanguageProvider/actions.js +1 -1
  26. package/containers/Line/Create/actions.js +5 -5
  27. package/containers/Line/Create/index.js +37 -37
  28. package/containers/Line/Create/sagas.js +7 -7
  29. package/containers/Line/Edit/actions.js +3 -3
  30. package/containers/Line/Edit/index.js +24 -24
  31. package/containers/Line/Edit/sagas.js +4 -4
  32. package/containers/MobilePush/Create/actions.js +2 -2
  33. package/containers/MobilePush/Create/index.js +35 -35
  34. package/containers/MobilePush/Create/sagas.js +2 -2
  35. package/containers/MobilePush/Edit/actions.js +3 -3
  36. package/containers/MobilePush/Edit/index.js +32 -32
  37. package/containers/MobilePush/Edit/sagas.js +5 -5
  38. package/containers/Sms/Create/actions.js +2 -2
  39. package/containers/Sms/Create/index.js +57 -57
  40. package/containers/Sms/Create/sagas.js +2 -2
  41. package/containers/Sms/Edit/actions.js +3 -3
  42. package/containers/Sms/Edit/index.js +44 -44
  43. package/containers/Sms/Edit/sagas.js +3 -3
  44. package/containers/TagList/index.js +9 -9
  45. package/containers/Templates/actions.js +5 -5
  46. package/containers/Templates/index.js +44 -44
  47. package/containers/Templates/sagas.js +5 -5
  48. package/containers/WeChat/MapTemplates/actions.js +1 -1
  49. package/containers/WeChat/MapTemplates/index.js +34 -34
  50. package/containers/WeChat/MapTemplates/sagas.js +2 -2
  51. package/containers/WeChat/RichmediaTemplates/Create/index.js +9 -9
  52. package/containers/WeChat/RichmediaTemplates/Edit/actions.js +1 -1
  53. package/containers/WeChat/RichmediaTemplates/Edit/sagas.js +1 -1
  54. package/package.json +1 -1
  55. package/services/api.js +13 -13
  56. package/utils/authWrapper.js +2 -2
  57. package/utils/smsCharCount.js +5 -5
  58. package/v2Components/CapTagList/index.js +1 -1
  59. package/v2Components/Card/index.js +1 -1
  60. package/v2Components/Ckeditor/index.js +5 -5
  61. package/v2Components/CustomPopOver/index.js +3 -3
  62. package/v2Components/Edmeditor/index.js +4 -4
  63. package/v2Components/EmailMobilePreview/index.js +4 -4
  64. package/v2Components/EmailPreviewV2/index.js +4 -4
  65. package/v2Components/FormBuilder/index.js +3 -3
  66. package/v2Components/PreviewSideBar/index.js +3 -3
  67. package/v2Components/SmsTest/index.js +4 -4
  68. package/v2Components/TemplatePreview/index.js +1 -1
  69. package/v2Components/Toastr/index.js +1 -1
  70. package/v2Containers/Assets/Gallery/sagas.js +1 -1
  71. package/v2Containers/Cap/actions.js +1 -1
  72. package/v2Containers/Cap/index.js +2 -2
  73. package/v2Containers/Cap/reducer.js +1 -1
  74. package/v2Containers/Cap/sagas.js +3 -3
  75. package/v2Containers/Cap/selectors.js +1 -1
  76. package/v2Containers/CreativesContainer/SlideBoxContent.js +7 -1
  77. package/v2Containers/CreativesContainer/index.js +10 -3
  78. package/v2Containers/Ebill/actions.js +1 -1
  79. package/v2Containers/Ebill/index.js +34 -34
  80. package/v2Containers/Ebill/sagas.js +3 -3
  81. package/v2Containers/Email/reducer.js +1 -1
  82. package/v2Containers/EmailWrapper/index.js +4 -4
  83. package/v2Containers/Facebook/Advertisement/index.js +0 -1
  84. package/v2Containers/Facebook/Facebook.style.js +1 -1
  85. package/v2Containers/Facebook/constants.js +4 -0
  86. package/v2Containers/Facebook/index.js +189 -121
  87. package/v2Containers/Facebook/messages.js +20 -4
  88. package/v2Containers/Facebook/sagas.js +1 -1
  89. package/v2Containers/LanguageProvider/actions.js +1 -1
  90. package/v2Containers/Line/Container/actions.js +5 -5
  91. package/v2Containers/Line/Container/sagas.js +4 -4
  92. package/v2Containers/MobilePush/Create/actions.js +2 -2
  93. package/v2Containers/MobilePush/Create/index.js +1 -1
  94. package/v2Containers/MobilePush/Create/sagas.js +2 -2
  95. package/v2Containers/MobilePush/Edit/actions.js +3 -3
  96. package/v2Containers/MobilePush/Edit/index.js +26 -26
  97. package/v2Containers/MobilePush/Edit/sagas.js +5 -5
  98. package/v2Containers/Sms/Create/index.js +4 -4
  99. package/v2Containers/TagList/index.js +6 -6
  100. package/v2Containers/Templates/actions.js +5 -5
  101. package/v2Containers/Templates/index.js +6 -2
  102. package/v2Containers/Templates/sagas.js +4 -4
  103. package/v2Containers/TemplatesV2/index.js +9 -4
  104. package/v2Containers/Viber/actions.js +2 -2
  105. package/v2Containers/Viber/sagas.js +2 -2
  106. package/v2Containers/WeChat/MapTemplates/actions.js +1 -1
  107. package/v2Containers/WeChat/MapTemplates/index.js +19 -19
  108. package/v2Containers/WeChat/MapTemplates/sagas.js +3 -3
  109. package/v2Containers/WeChat/RichmediaTemplates/Create/actions.js +1 -1
  110. package/v2Containers/WeChat/RichmediaTemplates/Edit/actions.js +1 -1
  111. package/v2Containers/WeChat/RichmediaTemplates/Edit/sagas.js +1 -1
  112. package/assets/DeviceForEmail.png +0 -0
@@ -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
+ console.log('Got editor Instance ', instance, id);
192
192
  window.CKEDITOR.on( 'instanceReady', ( event ) => {
193
193
  this.setState({editorInstanse: event.editor});
194
194
  event.editor.on( 'focus', () => {
195
-
195
+ console.log( 'focused', event.editor, this );
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
+ console.log("moveToTemplates richmedia getCurrentWindow");
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
+ console.log("getformdata wechat richmedia: ", this.state.templateData, this.props, this.state);
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
+ console.log("getformdata2 wechat richmedia: ", data);
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
+ console.log("moveToTemplates richmedia");
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
+ console.log("richmedia shownext");
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
+ console.log("richmedia handleFrameTasks: ", e.data);
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
+ console.log("moveToTemplates richmedia case");
346
346
  this.moveToTemplates();
347
347
  break;
348
348
  default:
@@ -13,7 +13,7 @@ export function defaultAction() {
13
13
  }
14
14
 
15
15
  export function getTemplateDetails(id, channel) {
16
-
16
+ console.log('getting template', id);
17
17
  return {
18
18
  type: types.GET_TEMPLATE_DETAILS_REQUEST, id, channel,
19
19
  };
@@ -12,7 +12,7 @@ export function* getTemplateDetails({id, channel}) {
12
12
  const params = {
13
13
  id, channel,
14
14
  };
15
-
15
+ console.log('saga get Template details', id);
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "7.6.2",
4
+ "version": "7.6.4",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
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
+ console.log('requestCallerName error :', e);
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
+ console.log('in api.js', template);
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
+ console.log('in api.js', template);
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
+ console.log('in api.js', template);
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
+ console.log('in api.js', template);
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
+ console.log('in api.js duplicateTemplate', id, channel);
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
+ console.log('in api.js', template);
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
+ console.log('in api.js', template);
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
+ console.log('in api.js', template);
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
+ console.log('in api.js', id);
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
+ console.log('in api.js delete', id, channel);
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
+ console.log('in api.js');
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
+ console.log('LINE : in api.js', template);
367
367
  const url = `${API_ENDPOINT}/templates/LINE`;
368
368
  return request(url, getAPICallObject('POST', template));
369
369
  };
@@ -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
+ console.log("Auth wrapper production", isLoggedIn);
14
14
  } else if (localStorage.getItem("token")) {
15
15
  isLoggedIn = true;
16
-
16
+ console.log("Auth wrapper development", isLoggedIn);
17
17
  }
18
18
  return isLoggedIn;
19
19
  };
@@ -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
+ console.log('Test 1', msgContent, matches);
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
+ console.log('i18n Error', err.message);
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
+ console.log('Box val', boxVal);
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
+ console.log("only 1000 character allowed in normal sms remaining character will be discarded");
341
341
  } else if (charset && totalChars > 500) {
342
-
342
+ console.log("only 500 character allowed in unicode sms remaining character will be discarded");
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
+ console.log(supportedTagsString);
143
143
  if (_.has(val, 'subtags')) {
144
144
  const temp = this.renderTags(val.subtags);
145
145
  list.push((
@@ -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
+ console.log('hover mouse data', data);
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
+ console.log('nextProps CKEditor', nextProps, this.state.content, this.props.id);
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
+ console.log('CKEditor Loading');
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(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, "\"");
194
-
194
+ console.log("ckeditor loading 1", this.node, html);
195
195
  this.editorInstance = window.CKEDITOR.appendTo(
196
196
  this.node,
197
197
  this.state.config,
198
198
  html
199
199
  );
200
-
200
+ console.log('2');
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
+ console.log('ckeditor loading render', this.props);
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
+ console.log('popOver List ', this.props.popOverList, this.props.excludeList);
21
21
  }
22
22
 
23
23
  componentWillReceiveProps(nextProps) {
24
-
24
+ console.log('next popOver List ', nextProps.popOverList, nextProps.excludeList);
25
25
  }
26
26
 
27
27
  renderPopoverContent() {
28
28
  const elem = [];
29
29
  _.forEach(this.props.popOverList, (content, index) => {
30
-
30
+ console.log('PopOver Content', content);
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
+ console.log('current language edm editor mounted', this.props.id, this.props.edmSrc);
29
29
  }
30
30
 
31
31
  componentWillReceiveProps(nextProps) {
32
-
32
+ console.log('current language nextProps', nextProps, nextProps.id, nextProps.edmSrc);
33
33
  // if (!_.isEqual(nextProps.content, this.props.content)) {
34
- //
34
+ // console.log(nextProps.content);
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
+ console.log('current language edm editor loading', this.props.id, this.props.edmSrc);
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/DeviceForEmail.png';
20
+ import mobileBody from '../../assets/mobile.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: "541",
28
- width: "340",
27
+ height: "415",
28
+ width: "238",
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="386" />
98
+ <img src={mobileBody} alt="capillary" width="270" />
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/DeviceForEmail.png';
21
+ import mobileBody from '../../assets/mobile.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 ? "541" : "511",
38
- width: "340",
37
+ height: emailSubject ? "570" : "600",
38
+ width: "310",
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="386" />
130
+ <img src={mobileBody} alt="capillary" width="350" />
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
+ console.log('Call Event ', event, data, this.props.parent);
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
+ console.log("filedialog: ");
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
+ console.log('CKEditor Data 2', this.state.formData, this.state.formData[`${this.state.currentTab - 1}`], val, this.state.currentTab, this.state.currentLangTab, langIndex);
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
+ console.log('preview sidebar', this.props);
51
51
  let content = '';
52
52
  if ((this.props.channel || '').toLowerCase() === 'wechat') {
53
-
53
+ console.log('Template Infog ', this.props.templateData);
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
+ console.log('final content is', content);
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
+ console.log('Template name changed to ', name);
27
27
  }
28
28
 
29
29
  onTemplateContentChange(content) {
30
-
30
+ console.log('Template content changed to ', content);
31
31
  }
32
32
 
33
33
  onFormDataChange(formData) {
34
-
34
+ console.log('Form data changed is ', formData);
35
35
  }
36
36
 
37
37
  saveFormData(formData) {
38
38
  //Logic to save in db etc
39
-
39
+ console.log('Saving form data', formData);
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
+ //console.log('message text', smsText);
150
150
  }
151
151
  const type = this.props.location && this.props.location.query.type ? this.props.location.query.type : '';
152
152
  let iosActions = [];
@@ -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
+ console.log('Messages', message);
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
+ console.log({"delete Asset Id": result});
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 });
@@ -45,7 +45,7 @@ export function getUserData(callback) {
45
45
  }
46
46
 
47
47
  export function fetchSchemaForEntity(queryParams) {
48
-
48
+ console.log('fetch schema action');
49
49
  return {
50
50
  type: types.GET_SCHEMA_FOR_ENTITY_REQUEST, queryParams,
51
51
  };
@@ -103,7 +103,7 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
103
103
  }
104
104
  locale = this.getMappedLocale(locale);
105
105
  //locale = 'zh';
106
-
106
+ console.log('Setting final locale as', locale);
107
107
  moment.locale(locale);
108
108
  window.addEventListener('storage', this.handleStorageChange, false);
109
109
  document.addEventListener(
@@ -404,7 +404,7 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
404
404
  const type = this.props.location.query.type;
405
405
  const toastMessages = this.props.Global.messages;
406
406
  const { isCreativesAccessible, showOrgChangeModal, showRefreshModal } = this.state;
407
-
407
+ console.log('v2 locale loading', this.props.loader.localeLoading);
408
408
  return (
409
409
  <CapWrapper>
410
410
  { this.props.loader.localeLoading || this.props.Global.fetching_userdata ?
@@ -82,7 +82,7 @@ function capReducer(state = fromJS(initialState.cap), action) {
82
82
  .set('fetchingSchema', false);
83
83
  case types.GET_SCHEMA_FOR_ENTITY_SUCCESS: {
84
84
  const stateMeta = state.get('metaEntities');
85
-
85
+ console.log('stateMeta', stateMeta);
86
86
  return state
87
87
  .set('fetchingSchema', false)
88
88
  .set('metaEntities', {
@@ -106,9 +106,9 @@ export function* fetchUserInfo(option) {
106
106
 
107
107
  export function* fetchSchemaForEntity(queryParams) {
108
108
  try {
109
-
109
+ console.log('saga fetch Schema For Entity', queryParams);
110
110
  const result = yield call(Api.fetchSchemaForEntity, queryParams);
111
-
111
+ console.log('cap saga', result);
112
112
  // const sidebar = result.response.sidebar;
113
113
  yield put({ type: types.GET_SCHEMA_FOR_ENTITY_SUCCESS, data: result.response, statusCode: result.status ? result.status.code : '', entityType: queryParams.queryParams.type });
114
114
  } catch (error) {
@@ -129,7 +129,7 @@ function* getTopbarMenuData() {
129
129
 
130
130
 
131
131
  function* watchFetchSchemaForEntity() {
132
-
132
+ console.log('inside watch get schema');
133
133
  const watcher = yield takeLatest(types.GET_SCHEMA_FOR_ENTITY_REQUEST, fetchSchemaForEntity);
134
134
  yield take(LOCATION_CHANGE);
135
135
  yield cancel(watcher);
@@ -31,7 +31,7 @@ const setInjectedTags = () => createSelector(
31
31
  const { tags } = metaEntities;
32
32
  const customTags = tags && (tags.custom || {});
33
33
  const extendedTags = tags && (tags.extended || {});
34
-
34
+ console.log("selector cap: ", injectedTags, customTags, metaEntities, extendedTags);
35
35
  return (injectedTags = _.merge({}, injectedTags, customTags, extendedTags));
36
36
  }
37
37
  );
@@ -137,6 +137,8 @@ function SlideBoxContent(props) {
137
137
  handleClose,
138
138
  onFTPSubmit,
139
139
  campaignSettings,
140
+ messageStrategy,
141
+ fbAdManger,
140
142
  } = props;
141
143
  const type = (messageDetails.type || '').toLowerCase(); // type is context in get tags values : outbound | dvs | referral | loyalty | coupons
142
144
  const query = { type: !isFullMode && 'embedded', module: isFullMode ? 'default' : 'library', isEditFromCampaigns: (templateData || {}).isEditFromCampaigns};
@@ -334,6 +336,7 @@ function SlideBoxContent(props) {
334
336
  slidBoxContent={slidBoxContent}
335
337
  FTPMode="create"
336
338
  selectedOfferDetails={selectedOfferDetails}
339
+ messageStrategy={messageStrategy}
337
340
  />
338
341
  )}
339
342
  {isPreview && (
@@ -558,7 +561,8 @@ function SlideBoxContent(props) {
558
561
  isFullMode={isFullMode}
559
562
  createNew
560
563
  getFormSubscriptionData={getFormData}
561
-
564
+ messageStrategy={messageStrategy}
565
+ fbAdManger={fbAdManger}
562
566
  />
563
567
  )
564
568
  }
@@ -687,5 +691,7 @@ SlideBoxContent.propTypes = {
687
691
  saveMessage: PropTypes.func,
688
692
  selectedAccount: PropTypes.object,
689
693
  onFTPSubmit: PropTypes.func,
694
+ messageStrategy: PropTypes.string,
695
+
690
696
  };
691
697
  export default SlideBoxContent;