@capillarytech/creatives-library 0.0.6 → 0.0.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.
|
@@ -88,7 +88,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
88
88
|
this.props.globalActions.fetchSchemaForEntity(query);
|
|
89
89
|
}
|
|
90
90
|
componentDidMount() {
|
|
91
|
-
if (this.props.location.query && this.props.location.query.module === '
|
|
91
|
+
if (this.props.location.query && this.props.location.query.module === 'library') {
|
|
92
92
|
this.props.actions.setTemplateDetails(this.props.templateData);
|
|
93
93
|
} else {
|
|
94
94
|
this.props.actions.getTemplateDetails(this.props.params.id);
|
|
@@ -104,10 +104,10 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
componentWillReceiveProps(nextProps) {
|
|
107
|
-
if (nextProps.location.query.module === '
|
|
107
|
+
if (nextProps.location.query.module === 'library' && nextProps.isGetFormData) {
|
|
108
108
|
nextProps.getFormSubscriptionData(this.getFormData());
|
|
109
109
|
}
|
|
110
|
-
if ( nextProps.location.query.module === '
|
|
110
|
+
if ( nextProps.location.query.module === 'library' && nextProps.subscriptionTemplateDetails && nextProps.subscriptionTemplateDetails.name && _.isEmpty(this.state.editData) && !_.isEmpty(this.state.schema)) {
|
|
111
111
|
this.setEditState(nextProps.subscriptionTemplateDetails);
|
|
112
112
|
}
|
|
113
113
|
if (nextProps.templateDetails && nextProps.templateDetails.name && _.isEmpty(this.state.editData) && !_.isEmpty(this.state.schema)) {
|
|
@@ -117,7 +117,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
117
117
|
this.setState({schema: nextProps.metaEntities.layouts[0].definition}, () => {
|
|
118
118
|
this.injectEvents(nextProps.metaEntities.layouts[0].definition);
|
|
119
119
|
});
|
|
120
|
-
if (this.props.location.query.module !== '
|
|
120
|
+
if (this.props.location.query.module !== 'library') {
|
|
121
121
|
const query = {
|
|
122
122
|
layout: 'SMS',
|
|
123
123
|
type: 'TAG',
|
|
@@ -1372,7 +1372,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
1372
1372
|
tipText = this.props.Edit && ("editTemplateInProgress" in this.props.Edit && this.props.Edit.editTemplateInProgress) ? this.props.intl.formatMessage(messages.saveTemplateLoader) : '';
|
|
1373
1373
|
const spinning = this.state.loading || (this.props.Edit && (("getTemplateDetailsInProgress" in this.props.Edit && this.props.Edit.getTemplateDetailsInProgress) || ("editTemplateInProgress" in this.props.Edit && this.props.Edit.editTemplateInProgress)));
|
|
1374
1374
|
let tags = this.props.metaEntities && this.props.metaEntities.tags ? this.props.metaEntities.tags.standard : [];
|
|
1375
|
-
if (this.props.location.query.type === 'embedded' && this.props.location.query.module === '
|
|
1375
|
+
if (this.props.location.query.type === 'embedded' && this.props.location.query.module === 'library') {
|
|
1376
1376
|
tags = this.props.supportedTags;
|
|
1377
1377
|
}
|
|
1378
1378
|
return (
|