@capillarytech/creatives-library 7.1.6 → 7.1.7

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.
@@ -1115,7 +1115,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1115
1115
  {content}
1116
1116
  </div>
1117
1117
  {!layoutSelection && template._id === this.state.hoveredItem ? <CapButton onClick={(e) => this.handleEditClick(e, template._id)} className="edit-button" type="secondary">{type === 'embedded' ? this.props.intl.formatMessage(messages.selectButton) : this.props.intl.formatMessage(messages.editButton)}</CapButton> : ''}
1118
- {layoutSelection && template._id === this.state.hoveredItem ? <CapButton onClick={() => this.handleEdmDefaultTemplateSelection(true, template._id)} className="select-button" type="secondary">{type === 'embedded' ? this.props.intl.formatMessage(messages.selectDefaultButton) : this.props.intl.formatMessage(messages.selectDefaultButton)}</CapButton> : ''}
1118
+ {layoutSelection && template._id === this.state.hoveredItem ? <CapButton onClick={(event) =>{this.handleEdmDefaultTemplateSelection(true, template._id); event.stopPropagation();}} className="select-button" type="secondary">{type === 'embedded' ? this.props.intl.formatMessage(messages.selectDefaultButton) : this.props.intl.formatMessage(messages.selectDefaultButton)}</CapButton> : ''}
1119
1119
  {!layoutSelection && template._id === this.state.hoveredItem ? <CapButton onClick={() => this.handlePreviewClick(template)} className="preview-button" type="cancel">{this.props.intl.formatMessage(messages.previewButton)}</CapButton> : ''}
1120
1120
  </div>);
1121
1121
  } else if (this.state.channel.toLowerCase() === 'mobilepush') {
package/favicon.ico CHANGED
Binary file
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "7.1.6",
4
+ "version": "7.1.7",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -122,13 +122,14 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
122
122
  }
123
123
  if (nextProps.startValidation && nextProps.startValidation !== false && this.props.startValidation !== nextProps.startValidation) {
124
124
  this.setState({checkValidation: true});
125
- this.validateForm(null, null, true, true);
125
+ this.validateForm(null, null, true, true, () => {
126
126
  //triggering the saveFormData or onSubmit when validation sets isFormValid to TRUE
127
- if (this.state.isFormValid) {
127
+ if (this.state.isFormValid) {
128
128
  this.saveForm(true);
129
- this.setState({isFormValid:false});
130
- }
129
+ } else {
131
130
  this.props.stopValidation();
131
+ }
132
+ });
132
133
  }
133
134
  // if (nextProps.saveForm && this.props.saveForm !== nextProps.saveForm) {
134
135
  // this.saveForm(saveForm);