@capillarytech/creatives-library 7.17.223 → 7.17.225
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/package.json
CHANGED
package/utils/commonUtils.js
CHANGED
|
@@ -17,11 +17,14 @@ export const addBaseToTemplate = (template) => {
|
|
|
17
17
|
...template,
|
|
18
18
|
versions: {
|
|
19
19
|
...template.versions,
|
|
20
|
-
base:
|
|
21
|
-
|
|
20
|
+
base:{
|
|
21
|
+
...history[0],
|
|
22
|
+
...( !history?.[0]?.subject && { subject: get(template, 'versions.base.subject') })
|
|
23
|
+
}
|
|
24
|
+
}
|
|
22
25
|
});
|
|
23
26
|
}
|
|
24
|
-
|
|
27
|
+
return template;
|
|
25
28
|
};
|
|
26
29
|
|
|
27
30
|
export const isEmbeddedEditOrPreview = (queryType, creativesMode) => queryType === EMBEDDED &&
|
|
@@ -25,8 +25,7 @@ import messages from './messages';
|
|
|
25
25
|
import './_email.scss';
|
|
26
26
|
import {getMessageObject} from '../../utils/messageUtils';
|
|
27
27
|
import EmailPreview from '../../v2Components/EmailPreview';
|
|
28
|
-
import { getDecodedFileName } from '../../utils/common';
|
|
29
|
-
|
|
28
|
+
import { getDecodedFileName ,hasLiquidSupportFeature} from '../../utils/common';
|
|
30
29
|
import Pagination from '../../v2Components/Pagination';
|
|
31
30
|
import * as creativesContainerActions from '../CreativesContainer/actions';
|
|
32
31
|
import withCreatives from '../../hoc/withCreatives';
|
|
@@ -38,7 +37,6 @@ import { gtmPush } from '../../utils/gtmTrackers';
|
|
|
38
37
|
const {CapCustomCardList} = CapCustomCard;
|
|
39
38
|
import {transformEmailTemplates, storeS3FileSizeDetails, CREATIVES_S3_ASSET_FILESIZES} from '../../utils/cdnTransformation';
|
|
40
39
|
import { CUSTOMER_BARCODE_TAG } from '../../containers/App/constants';
|
|
41
|
-
|
|
42
40
|
export class Email extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
43
41
|
constructor(props) {
|
|
44
42
|
super(props);
|
|
@@ -151,6 +149,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
151
149
|
deleteLanguage: this.deleteLanguage,
|
|
152
150
|
},
|
|
153
151
|
};
|
|
152
|
+
this.liquidFlow = hasLiquidSupportFeature();
|
|
154
153
|
}
|
|
155
154
|
componentWillMount() {
|
|
156
155
|
const formData = this.initFormData(this.props, true); //_.cloneDeep(this.state.formData);
|
|
@@ -212,6 +211,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
212
211
|
layout: 'EMAIL',
|
|
213
212
|
type: 'LAYOUT',
|
|
214
213
|
version: 'v2',
|
|
214
|
+
liquidFlow:this.liquidFlow,
|
|
215
215
|
};
|
|
216
216
|
this.props.globalActions.fetchSchemaForEntity(query);
|
|
217
217
|
window.addEventListener("message", this.handleFrameTasks);
|
|
@@ -252,6 +252,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
252
252
|
type: 'TAG',
|
|
253
253
|
context: this.props.location.query.type === 'embedded' ? this.props.location.query.module : 'default',
|
|
254
254
|
embedded: this.props.location.query.type === 'embedded' ? this.props.location.query.type : 'full',
|
|
255
|
+
liquidFlow:this.liquidFlow
|
|
255
256
|
};
|
|
256
257
|
if (this.props.getDefaultTags) {
|
|
257
258
|
query.context = this.props.getDefaultTags;
|
|
@@ -1503,7 +1504,6 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1503
1504
|
const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
|
|
1504
1505
|
if (isSelected) {
|
|
1505
1506
|
const data = _.find(this.props.Email.assetList, {_id: id});
|
|
1506
|
-
|
|
1507
1507
|
if (data) {
|
|
1508
1508
|
storeS3FileSizeDetails(data?.metaInfo?.secure_file_path, data?.metaInfo?.file_size);
|
|
1509
1509
|
|
|
@@ -2012,6 +2012,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2012
2012
|
type: 'TAG',
|
|
2013
2013
|
context: (data || '').toLowerCase() === 'all' ? 'default' : (data || '').toLowerCase(),
|
|
2014
2014
|
embedded: 'full',
|
|
2015
|
+
liquidFlow:this.liquidFlow
|
|
2015
2016
|
};
|
|
2016
2017
|
this.props.globalActions.fetchSchemaForEntity(query);
|
|
2017
2018
|
}
|