@capillarytech/creatives-library 7.17.223-alpha.1 → 7.17.224
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/containers/MobilePush/Create/index.js +1 -1
- package/containers/MobilePush/Edit/index.js +1 -1
- package/package.json +1 -1
- package/v2Containers/Email/index.js +5 -4
- package/v2Containers/MobilePush/Create/index.js +1 -1
- package/v2Containers/MobilePush/Edit/index.js +1 -1
- package/v2Containers/TagList/index.js +6 -7
- package/v2Containers/TagList/tests/TagList.test.js +4 -5
- package/v2Containers/TagList/tests/mockdata.js +2 -23
|
@@ -568,7 +568,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
568
568
|
message: ios['message-editor2'],
|
|
569
569
|
expandableDetails: {
|
|
570
570
|
style: "BIG_TEXT",
|
|
571
|
-
message: ios['message-
|
|
571
|
+
message: ios['message-editor2'],
|
|
572
572
|
ctas: [
|
|
573
573
|
],
|
|
574
574
|
categoryId: ios['secondary-cta-1-table'] ? ios['secondary-cta-1-table'].id : undefined,
|
|
@@ -631,7 +631,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
631
631
|
message: ios['message-editor2'],
|
|
632
632
|
expandableDetails: {
|
|
633
633
|
style: "BIG_TEXT",
|
|
634
|
-
message: ios['message-
|
|
634
|
+
message: ios['message-editor2'],
|
|
635
635
|
ctas: [
|
|
636
636
|
|
|
637
637
|
],
|
package/package.json
CHANGED
|
@@ -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
|
}
|
|
@@ -462,7 +462,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
462
462
|
message: ios['message-editor2'],
|
|
463
463
|
expandableDetails: {
|
|
464
464
|
style: "BIG_TEXT",
|
|
465
|
-
message: ios['message-
|
|
465
|
+
message: ios['message-editor2'],
|
|
466
466
|
ctas: [
|
|
467
467
|
],
|
|
468
468
|
},
|
|
@@ -482,7 +482,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
482
482
|
message: ios['message-editor2'],
|
|
483
483
|
expandableDetails: {
|
|
484
484
|
style: "BIG_TEXT",
|
|
485
|
-
message: ios['message-
|
|
485
|
+
message: ios['message-editor2'],
|
|
486
486
|
ctas: [
|
|
487
487
|
|
|
488
488
|
],
|
|
@@ -127,14 +127,13 @@ export class TagList extends React.Component { // eslint-disable-line react/pref
|
|
|
127
127
|
"tag-header": true,
|
|
128
128
|
subtags: {},
|
|
129
129
|
};
|
|
130
|
-
} else {
|
|
131
|
-
// Adding the current tag to the profile group
|
|
132
|
-
eventContextTagsObj.eventContextTags.subtags[profileId].subtags[tagName] = {
|
|
133
|
-
name: label,
|
|
134
|
-
desc: label,
|
|
135
|
-
resolved: true,
|
|
136
|
-
};
|
|
137
130
|
}
|
|
131
|
+
// Adding the current tag to the profile group
|
|
132
|
+
eventContextTagsObj.eventContextTags.subtags[profileId].subtags[tagName] = {
|
|
133
|
+
name: label,
|
|
134
|
+
desc: label,
|
|
135
|
+
resolved: true,
|
|
136
|
+
};
|
|
138
137
|
});
|
|
139
138
|
}
|
|
140
139
|
this.setState({tags: _.merge( {}, tags, injectedTags, eventContextTagsObj )});
|
|
@@ -7,7 +7,7 @@ import { TagList } from '../index';
|
|
|
7
7
|
import { TagListData, eventContextTags } from './mockdata';
|
|
8
8
|
import { Provider } from 'react-redux';
|
|
9
9
|
import { screen, render } from '../../../utils/test-utils';
|
|
10
|
-
const { getByText } = screen;
|
|
10
|
+
const { getByText, queryByText } = screen;
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
const initializeTagList = (props) => {
|
|
@@ -52,9 +52,8 @@ describe("TagList test : UNIT", () => {
|
|
|
52
52
|
fireEvent.click(CUSTOMER_PROFILE);
|
|
53
53
|
expect(getByText(/lifetimePurchases/i)).toBeInTheDocument();
|
|
54
54
|
|
|
55
|
-
// Behavioural event profile tags
|
|
56
|
-
const BEHAVIOURAL_EVENT_PROFILE =
|
|
57
|
-
|
|
58
|
-
expect(getByText(/raindrops/i)).toBeInTheDocument();
|
|
55
|
+
// Behavioural event profile tags should not be visible as label and profile name is not present
|
|
56
|
+
const BEHAVIOURAL_EVENT_PROFILE = queryByText(/Behavioural event/i);
|
|
57
|
+
expect(BEHAVIOURAL_EVENT_PROFILE).not.toBeInTheDocument();
|
|
59
58
|
});
|
|
60
59
|
});
|
|
@@ -110,29 +110,8 @@ export const TagListData = {
|
|
|
110
110
|
export const eventContextTags = [
|
|
111
111
|
{
|
|
112
112
|
"profileId": "BEHAVIOURAL_EVENT_PROFILE",
|
|
113
|
-
"profileName": "Behavioural event",
|
|
114
|
-
"label":
|
|
115
|
-
"method": "getEventData",
|
|
116
|
-
"field": "butterfly",
|
|
117
|
-
"params": null,
|
|
118
|
-
"returnType": {
|
|
119
|
-
"isList": false,
|
|
120
|
-
"typeInfo": {
|
|
121
|
-
"type": "DOUBLE",
|
|
122
|
-
"typeId": null
|
|
123
|
-
},
|
|
124
|
-
"list": false
|
|
125
|
-
},
|
|
126
|
-
"factId": "getEventData_butterfly",
|
|
127
|
-
"tagName": "(butterfly)",
|
|
128
|
-
"isTaggable": true,
|
|
129
|
-
"uniqueId": "yW_DH7vjKk__BEHAVIOURAL__monsoon",
|
|
130
|
-
"isDynamicFact": true
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
"profileId": "BEHAVIOURAL_EVENT_PROFILE",
|
|
134
|
-
"profileName": "Behavioural event",
|
|
135
|
-
"label": 'raindrops',
|
|
113
|
+
// "profileName": "Behavioural event",
|
|
114
|
+
// "label": 'raindrops',
|
|
136
115
|
"method": "getEventData",
|
|
137
116
|
"field": "raindrops",
|
|
138
117
|
"params": null,
|