@capillarytech/creatives-library 2.0.25 → 2.0.26

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.
@@ -36,6 +36,7 @@ function SlideBoxContent(props) {
36
36
  query,
37
37
  search: '',
38
38
  };
39
+ let channel = currentChannel;//for create mode
39
40
  const isCreateSms = slidBoxContent === 'createTemplate' && channel === constants.SMS;
40
41
  let isEditSms = false;
41
42
  let isEditEmailWithId = false;
@@ -43,7 +44,6 @@ function SlideBoxContent(props) {
43
44
  let isPreview = false;
44
45
  let isEmailPreview = false;
45
46
  //let isEmailCreate = false;
46
- let channel = currentChannel;//for create mode
47
47
  if (templateData && channel) {
48
48
  channel = templateData.type;// for edit mode with template data
49
49
  isEditSms = slidBoxContent === 'editTemplate' && channel === constants.SMS;
@@ -117,6 +117,7 @@ class Creatives extends React.Component {
117
117
  this.setState(
118
118
  {
119
119
  isGetFormData: false,
120
+ templateData: template,
120
121
  },
121
122
  () => {
122
123
  const channel = this.state.templateData.type;
@@ -254,6 +254,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
254
254
  value: result,
255
255
  postAction: value || 'next',
256
256
  validity: this.state.isFormValid,
257
+ type: 'SMS',
257
258
  };
258
259
  this.setState({checkValidation: true});
259
260
  console.log('posting final result internal', response);
@@ -184,7 +184,6 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
184
184
  } else if (nextProps.route.name.toLowerCase() === 'line') {
185
185
  channel = 'Line';
186
186
  }
187
- //
188
187
  this.setState({ channel }, () => {
189
188
  if (this.state.channel.toLowerCase() === 'line' || this.state.channel.toLowerCase() === 'sms' || this.state.channel.toLowerCase() === 'email' || this.state.channel.toLowerCase() === 'ebill' || (this.state.channel.toLowerCase() === 'wechat' && !_.isEmpty(nextProps.Templates.selectedWeChatAccount))) {
190
189
  if (this.state.channel.toLowerCase() === 'wechat' && !_.isEmpty(nextProps.Templates.selectedWeChatAccount)) {
@@ -349,7 +348,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
349
348
  // this.setState({defaultAccount: false});
350
349
  }
351
350
 
352
- onAccountSelect(value, option) {
351
+ onAccountSelect(value) {
353
352
  this.setState({selectedAccount: value}, () => {
354
353
  const params = {
355
354
  name: this.state.searchText,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "2.0.25",
4
+ "version": "2.0.26",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",