@capillarytech/creatives-library 8.0.327 → 8.0.329
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 +1 -1
- package/services/api.js +17 -0
- package/services/tests/api.test.js +85 -0
- package/utils/commonUtils.js +10 -0
- package/utils/tagValidations.js +2 -3
- package/utils/tests/commonUtil.test.js +169 -0
- package/utils/tests/tagValidations.test.js +1 -35
- package/v2Components/CapTagList/index.js +22 -14
- package/v2Components/CapTagList/style.scss +0 -48
- package/v2Components/CapTagListWithInput/index.js +0 -4
- package/v2Components/CapWhatsappCTA/index.js +0 -2
- package/v2Components/CommonTestAndPreview/AddTestCustomer.js +42 -0
- package/v2Components/CommonTestAndPreview/CustomerCreationModal.js +155 -0
- package/v2Components/CommonTestAndPreview/ExistingCustomerModal.js +93 -0
- package/v2Components/CommonTestAndPreview/SendTestMessage.js +79 -51
- package/v2Components/CommonTestAndPreview/_commonTestAndPreview.scss +134 -34
- package/v2Components/CommonTestAndPreview/actions.js +10 -0
- package/v2Components/CommonTestAndPreview/constants.js +15 -1
- package/v2Components/CommonTestAndPreview/index.js +315 -15
- package/v2Components/CommonTestAndPreview/messages.js +106 -0
- package/v2Components/CommonTestAndPreview/reducer.js +10 -0
- package/v2Components/CommonTestAndPreview/tests/AddTestCustomer.test.js +66 -0
- package/v2Components/CommonTestAndPreview/tests/CommonTestAndPreview.addTestCustomer.test.js +648 -0
- package/v2Components/CommonTestAndPreview/tests/CustomValuesEditor.test.js +24 -0
- package/v2Components/CommonTestAndPreview/tests/CustomerCreationModal.test.js +174 -0
- package/v2Components/CommonTestAndPreview/tests/ExistingCustomerModal.test.js +114 -0
- package/v2Components/CommonTestAndPreview/tests/SendTestMessage.test.js +52 -0
- package/v2Components/CommonTestAndPreview/tests/constants.test.js +31 -1
- package/v2Components/CommonTestAndPreview/tests/index.test.js +36 -0
- package/v2Components/CommonTestAndPreview/tests/reducer.test.js +71 -0
- package/v2Components/CommonTestAndPreview/tests/selectors.test.js +17 -0
- package/v2Components/FormBuilder/index.js +0 -7
- package/v2Components/HtmlEditor/HTMLEditor.js +1 -6
- package/v2Components/HtmlEditor/__tests__/HTMLEditor.apiErrors.test.js +0 -1
- package/v2Components/HtmlEditor/__tests__/HTMLEditor.test.js +2 -927
- package/v2Components/HtmlEditor/components/CodeEditorPane/index.js +0 -3
- package/v2Containers/BeeEditor/index.js +0 -3
- package/v2Containers/CreativesContainer/SlideBoxContent.js +1 -28
- package/v2Containers/CreativesContainer/index.js +0 -3
- package/v2Containers/Email/index.js +0 -1
- package/v2Containers/EmailWrapper/components/EmailHTMLEditor.js +1 -7
- package/v2Containers/EmailWrapper/components/EmailWrapperView.js +0 -3
- package/v2Containers/EmailWrapper/components/__tests__/EmailHTMLEditor.test.js +2 -20
- package/v2Containers/EmailWrapper/components/__tests__/EmailWrapperView.test.js +1 -16
- package/v2Containers/EmailWrapper/hooks/useEmailWrapper.js +0 -3
- package/v2Containers/EmailWrapper/index.js +0 -4
- package/v2Containers/EmailWrapper/tests/useEmailWrapper.edgeCases.test.js +0 -1
- package/v2Containers/EmailWrapper/tests/useEmailWrapper.test.js +0 -9
- package/v2Containers/InAppWrapper/hooks/__tests__/useInAppWrapper.test.js +0 -19
- package/v2Containers/InAppWrapper/hooks/useInAppWrapper.js +0 -3
- package/v2Containers/InAppWrapper/index.js +0 -3
- package/v2Containers/MobilePush/Create/index.js +0 -2
- package/v2Containers/MobilePush/Edit/index.js +0 -2
- package/v2Containers/MobilepushWrapper/index.js +1 -3
- package/v2Containers/Rcs/index.js +0 -1
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +1886 -1754
- package/v2Containers/Sms/Create/index.js +0 -2
- package/v2Containers/Sms/Edit/index.js +0 -2
- package/v2Containers/SmsTrai/Edit/index.js +0 -2
- package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +351 -318
- package/v2Containers/SmsWrapper/index.js +0 -2
- package/v2Containers/TagList/index.js +2 -41
- package/v2Containers/TagList/messages.js +0 -4
- package/v2Containers/TagList/tests/TagList.test.js +20 -122
- package/v2Containers/TagList/tests/mockdata.js +0 -17
- package/v2Containers/Viber/index.js +0 -5
- package/v2Containers/WebPush/Create/hooks/useTagManagement.js +2 -0
- package/v2Containers/WebPush/Create/index.js +1 -9
- package/v2Containers/Whatsapp/index.js +0 -5
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +5586 -5232
- package/v2Containers/Zalo/index.js +0 -2
- package/v2Components/CapTagListWithInput/__tests__/CapTagListWithInput.test.js +0 -63
|
@@ -32,7 +32,6 @@ const SmsWrapper = (props) => {
|
|
|
32
32
|
smsRegister,
|
|
33
33
|
onShowTemplates,
|
|
34
34
|
eventContextTags,
|
|
35
|
-
waitEventContextTags,
|
|
36
35
|
showLiquidErrorInFooter,
|
|
37
36
|
getLiquidTags,
|
|
38
37
|
showTestAndPreviewSlidebox,
|
|
@@ -74,7 +73,6 @@ const SmsWrapper = (props) => {
|
|
|
74
73
|
onPreviewContentClicked,
|
|
75
74
|
onTestContentClicked,
|
|
76
75
|
eventContextTags,
|
|
77
|
-
waitEventContextTags,
|
|
78
76
|
showLiquidErrorInFooter,
|
|
79
77
|
getLiquidTags,
|
|
80
78
|
showTestAndPreviewSlidebox,
|
|
@@ -167,7 +167,7 @@ export class TagList extends React.Component { // eslint-disable-line react/pref
|
|
|
167
167
|
let injectedTags = {};
|
|
168
168
|
const eventContextTagsObj = {};
|
|
169
169
|
|
|
170
|
-
const {selectedOfferDetails, eventContextTags
|
|
170
|
+
const {selectedOfferDetails, eventContextTags } = props;
|
|
171
171
|
if (props.injectedTags && !_.isEmpty(props.injectedTags)) {
|
|
172
172
|
const formattedInjectedTags = handleInjectedData(
|
|
173
173
|
props.injectedTags,
|
|
@@ -219,43 +219,6 @@ export class TagList extends React.Component { // eslint-disable-line react/pref
|
|
|
219
219
|
};
|
|
220
220
|
});
|
|
221
221
|
}
|
|
222
|
-
// Wait event context tags should be displayed in the Add Labels when node is next to Event based wait node.
|
|
223
|
-
if (waitEventContextTags && Object.keys(waitEventContextTags)?.length) {
|
|
224
|
-
|
|
225
|
-
Object.keys(waitEventContextTags).forEach((blockId) => {
|
|
226
|
-
const WAIT_EVENT_HEADER_MSG_LABEL = `${waitEventContextTags[blockId].eventName} (${waitEventContextTags[blockId].blockName})`;
|
|
227
|
-
eventContextTagsObj[blockId] = {
|
|
228
|
-
"name": WAIT_EVENT_HEADER_MSG_LABEL,
|
|
229
|
-
"desc": WAIT_EVENT_HEADER_MSG_LABEL,
|
|
230
|
-
"resolved": true,
|
|
231
|
-
'tag-header': true,
|
|
232
|
-
"subtags": {},
|
|
233
|
-
};
|
|
234
|
-
|
|
235
|
-
waitEventContextTags?.[blockId]?.tags?.forEach((tag) => {
|
|
236
|
-
const {
|
|
237
|
-
tagName, label, profileId, profileName, blockName, eventName
|
|
238
|
-
} = tag || {};
|
|
239
|
-
if (!profileId || !tagName || !label || !profileName) return;
|
|
240
|
-
// Initializing the tags profile if it doesn't exist
|
|
241
|
-
if (!eventContextTagsObj?.[blockId]?.subtags?.[profileId]) {
|
|
242
|
-
eventContextTagsObj[blockId].subtags[profileId] = {
|
|
243
|
-
"name": profileName,
|
|
244
|
-
"desc": profileName,
|
|
245
|
-
"resolved": true,
|
|
246
|
-
'tag-header': true,
|
|
247
|
-
"subtags": {},
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
// Adding the current tag to the profile group
|
|
251
|
-
eventContextTagsObj[blockId].subtags[profileId].subtags[tagName] = {
|
|
252
|
-
name: label,
|
|
253
|
-
desc: label,
|
|
254
|
-
resolved: true,
|
|
255
|
-
};
|
|
256
|
-
});
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
222
|
this.setState({tags: _.merge( {}, tags, injectedTags, eventContextTagsObj )});
|
|
260
223
|
}
|
|
261
224
|
|
|
@@ -443,7 +406,7 @@ export class TagList extends React.Component { // eslint-disable-line react/pref
|
|
|
443
406
|
isDisabled = true;
|
|
444
407
|
tooltipMsg = intl.formatMessage(messages.personalizationNotSupportedAnonymous);
|
|
445
408
|
}
|
|
446
|
-
|
|
409
|
+
|
|
447
410
|
return (
|
|
448
411
|
<div className={this.props.className ? this.props.className : ''}>
|
|
449
412
|
<CapTagList
|
|
@@ -477,7 +440,6 @@ TagList.defaultProps = {
|
|
|
477
440
|
isNewVersionFlow: false,
|
|
478
441
|
userLocale: 'en',
|
|
479
442
|
eventContextTags: [],
|
|
480
|
-
waitEventContextTags: {},
|
|
481
443
|
};
|
|
482
444
|
|
|
483
445
|
TagList.propTypes = {
|
|
@@ -498,7 +460,6 @@ TagList.propTypes = {
|
|
|
498
460
|
disabled: PropTypes.bool,
|
|
499
461
|
fetchingSchemaError: PropTypes.bool,
|
|
500
462
|
eventContextTags: PropTypes.array,
|
|
501
|
-
waitEventContextTags: PropTypes.object,
|
|
502
463
|
popoverPlacement: PropTypes.string,
|
|
503
464
|
// message to show when Add Label button is disabled (e.g. personalization restriction)
|
|
504
465
|
disableTooltipMsg: PropTypes.string,
|
|
@@ -19,8 +19,4 @@ export default defineMessages({
|
|
|
19
19
|
id: `${scope}.personalizationNotSupportedAnonymous`,
|
|
20
20
|
defaultMessage: 'Personalization tags are not supported for anonymous customers',
|
|
21
21
|
},
|
|
22
|
-
waitEvent: {
|
|
23
|
-
id: `${scope}.waitEvent`,
|
|
24
|
-
defaultMessage: 'Wait Event',
|
|
25
|
-
},
|
|
26
22
|
});
|
|
@@ -5,34 +5,28 @@ import { initialReducer } from '../../../initialReducer';
|
|
|
5
5
|
import { injectIntl } from "react-intl";
|
|
6
6
|
import { fireEvent } from "@testing-library/react";
|
|
7
7
|
import { TagList } from '../index';
|
|
8
|
-
import { TagListData, eventContextTags
|
|
9
|
-
import { OfferTag, badgesTags, offer } from '../../../utils/tests/common.mockdata';
|
|
10
|
-
import * as commonUtils from "../../../utils/common";
|
|
8
|
+
import { TagListData, eventContextTags } from './mockdata';
|
|
11
9
|
import { Provider } from 'react-redux';
|
|
12
10
|
import { screen, render } from '../../../utils/test-utils';
|
|
13
11
|
import history from '../../../utils/history';
|
|
14
12
|
const { getByText, queryByText } = screen;
|
|
15
13
|
|
|
16
|
-
const buildProps = (props = {}) => ({
|
|
17
|
-
...TagListData,
|
|
18
|
-
onTagSelect: jest.fn(),
|
|
19
|
-
...props,
|
|
20
|
-
});
|
|
21
14
|
|
|
22
|
-
const initializeTagList = (props
|
|
15
|
+
const initializeTagList = (props) => {
|
|
23
16
|
const store = configureStore({}, initialReducer, history);
|
|
24
17
|
const Component = injectIntl(TagList);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
...
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</Provider>
|
|
31
|
-
),
|
|
32
|
-
store,
|
|
33
|
-
Component,
|
|
34
|
-
propsObj,
|
|
18
|
+
|
|
19
|
+
const propsObj = {
|
|
20
|
+
...TagListData,
|
|
21
|
+
onTagSelect: jest.fn(),
|
|
22
|
+
...props,
|
|
35
23
|
};
|
|
24
|
+
|
|
25
|
+
return render(
|
|
26
|
+
<Provider store={store}>
|
|
27
|
+
<Component {...propsObj} />
|
|
28
|
+
</Provider>
|
|
29
|
+
);
|
|
36
30
|
};
|
|
37
31
|
|
|
38
32
|
const addLabelBtnAssertion = () => {
|
|
@@ -47,115 +41,19 @@ describe("TagList test : UNIT", () => {
|
|
|
47
41
|
addLabelBtnAssertion();
|
|
48
42
|
});
|
|
49
43
|
|
|
50
|
-
it('should render event context
|
|
51
|
-
initializeTagList({
|
|
44
|
+
it('should render event context tags correctly from generateTags and show tags under profile', () => {
|
|
45
|
+
initializeTagList({eventContextTags});
|
|
52
46
|
addLabelBtnAssertion();
|
|
53
47
|
const EVENT_CONTEXT_TAG_HEADER = getByText(/Entry event/i);
|
|
54
48
|
expect(EVENT_CONTEXT_TAG_HEADER).toBeInTheDocument();
|
|
49
|
+
fireEvent.click(EVENT_CONTEXT_TAG_HEADER);
|
|
50
|
+
// Customer profile tags
|
|
51
|
+
const CUSTOMER_PROFILE = getByText(/Current Customer/i);
|
|
52
|
+
fireEvent.click(CUSTOMER_PROFILE);
|
|
53
|
+
expect(getByText(/lifetimePurchases/i)).toBeInTheDocument();
|
|
55
54
|
|
|
56
55
|
// Behavioural event profile tags should not be visible as label and profile name is not present
|
|
57
56
|
const BEHAVIOURAL_EVENT_PROFILE = queryByText(/Behavioural event/i);
|
|
58
57
|
expect(BEHAVIOURAL_EVENT_PROFILE).not.toBeInTheDocument();
|
|
59
58
|
});
|
|
60
|
-
|
|
61
|
-
it('should render wait event context section when waitEventContextTags is provided', () => {
|
|
62
|
-
initializeTagList({ waitEventContextTags, moduleFilterEnabled: false });
|
|
63
|
-
addLabelBtnAssertion();
|
|
64
|
-
const WAIT_EVENT_HEADER = getByText(/Order Placed \(Wait Block\)/i);
|
|
65
|
-
expect(WAIT_EVENT_HEADER).toBeInTheDocument();
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
it('should merge empty waitEventContextTags with entry event tags', () => {
|
|
69
|
-
initializeTagList({ eventContextTags, waitEventContextTags: {}, moduleFilterEnabled: false });
|
|
70
|
-
addLabelBtnAssertion();
|
|
71
|
-
expect(getByText(/Entry event/i)).toBeInTheDocument();
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
it('calls parent onContextChange with Outbound when tags and injectedTags are empty on mount', () => {
|
|
75
|
-
const onContextChange = jest.fn();
|
|
76
|
-
initializeTagList({
|
|
77
|
-
tags: [],
|
|
78
|
-
injectedTags: {},
|
|
79
|
-
onContextChange,
|
|
80
|
-
onTagSelect: jest.fn(),
|
|
81
|
-
});
|
|
82
|
-
expect(onContextChange).toHaveBeenCalledWith('Outbound');
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
it('applies fetchingSchemaError from props via componentWillReceiveProps', () => {
|
|
86
|
-
const { rerender, Component, propsObj, store } = initializeTagList({ fetchingSchemaError: false });
|
|
87
|
-
addLabelBtnAssertion();
|
|
88
|
-
rerender(
|
|
89
|
-
<Provider store={store}>
|
|
90
|
-
<Component {...propsObj} fetchingSchemaError />
|
|
91
|
-
</Provider>
|
|
92
|
-
);
|
|
93
|
-
expect(screen.getByText(/add label/i)).toBeInTheDocument();
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
it('disables Add label when restrictPersonalization is true', () => {
|
|
97
|
-
initializeTagList({
|
|
98
|
-
restrictPersonalization: true,
|
|
99
|
-
disabled: false,
|
|
100
|
-
moduleFilterEnabled: false,
|
|
101
|
-
});
|
|
102
|
-
const btn = screen.getByText(/add label/i).closest('button');
|
|
103
|
-
expect(btn).toBeDisabled();
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
it('calls transformCouponTags when selectedOfferDetails and coupon tags are present', () => {
|
|
107
|
-
const spy = jest.spyOn(TagList.prototype, 'transformCouponTags');
|
|
108
|
-
initializeTagList({
|
|
109
|
-
tags: OfferTag,
|
|
110
|
-
injectedTags: {},
|
|
111
|
-
selectedOfferDetails: [{ id: 'c1', couponName: 'Promo Coupon', couponSeriesId: 'c1' }],
|
|
112
|
-
moduleFilterEnabled: false,
|
|
113
|
-
});
|
|
114
|
-
expect(spy).toHaveBeenCalled();
|
|
115
|
-
spy.mockRestore();
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
it('calls transformBadgeTags from common when badge offer and Badge tags are present', () => {
|
|
119
|
-
const spy = jest.spyOn(commonUtils, 'transformBadgeTags');
|
|
120
|
-
initializeTagList({
|
|
121
|
-
tags: badgesTags,
|
|
122
|
-
injectedTags: {},
|
|
123
|
-
selectedOfferDetails: offer,
|
|
124
|
-
moduleFilterEnabled: false,
|
|
125
|
-
});
|
|
126
|
-
expect(spy).toHaveBeenCalled();
|
|
127
|
-
spy.mockRestore();
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
it('unmounts without throwing', () => {
|
|
131
|
-
const { unmount } = initializeTagList();
|
|
132
|
-
expect(() => unmount()).not.toThrow();
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
it('regenerates tags when props.tags change (componentDidUpdate)', () => {
|
|
136
|
-
const { rerender, Component, store } = initializeTagList({ tags: TagListData.tags });
|
|
137
|
-
const extra = [
|
|
138
|
-
...TagListData.tags,
|
|
139
|
-
{
|
|
140
|
-
_id: 'extra-tag',
|
|
141
|
-
type: 'TAG',
|
|
142
|
-
definition: {
|
|
143
|
-
label: { en: 'Extra' },
|
|
144
|
-
value: 'extra_value',
|
|
145
|
-
subtags: [],
|
|
146
|
-
'tag-header': false,
|
|
147
|
-
supportedModules: [{ context: 'default', layout: 'sms', mandatory: false }],
|
|
148
|
-
},
|
|
149
|
-
scope: { tag: 'STANDARD', orgId: -1, verticals: [] },
|
|
150
|
-
isActive: true,
|
|
151
|
-
},
|
|
152
|
-
];
|
|
153
|
-
rerender(
|
|
154
|
-
<Provider store={store}>
|
|
155
|
-
<Component {...buildProps({ tags: extra })} />
|
|
156
|
-
</Provider>
|
|
157
|
-
);
|
|
158
|
-
addLabelBtnAssertion();
|
|
159
|
-
expect(screen.getByText(/add label/i)).toBeInTheDocument();
|
|
160
|
-
});
|
|
161
59
|
});
|
|
@@ -149,20 +149,3 @@ export const eventContextTags = [
|
|
|
149
149
|
"isDynamicFact": false
|
|
150
150
|
}
|
|
151
151
|
];
|
|
152
|
-
|
|
153
|
-
export const waitEventContextTags = {
|
|
154
|
-
block1: {
|
|
155
|
-
eventName: 'Order Placed',
|
|
156
|
-
blockName: 'Wait Block',
|
|
157
|
-
tags: [
|
|
158
|
-
{
|
|
159
|
-
tagName: 'waitEvent.orderId',
|
|
160
|
-
label: 'Order ID',
|
|
161
|
-
profileId: 'ORDER_PROFILE',
|
|
162
|
-
profileName: 'Order Profile',
|
|
163
|
-
blockName: 'Wait Block',
|
|
164
|
-
eventName: 'Order Placed',
|
|
165
|
-
},
|
|
166
|
-
],
|
|
167
|
-
},
|
|
168
|
-
};
|
|
@@ -82,7 +82,6 @@ export const Viber = (props) => {
|
|
|
82
82
|
viberData = {},
|
|
83
83
|
selectedOfferDetails = [],
|
|
84
84
|
eventContextTags,
|
|
85
|
-
waitEventContextTags,
|
|
86
85
|
// TestAndPreviewSlidebox props
|
|
87
86
|
showTestAndPreviewSlidebox: propsShowTestAndPreviewSlidebox,
|
|
88
87
|
handleTestAndPreview: propsHandleTestAndPreview,
|
|
@@ -233,8 +232,6 @@ export const Viber = (props) => {
|
|
|
233
232
|
tagsParam: tags,
|
|
234
233
|
location,
|
|
235
234
|
tagModule: 'outbound',
|
|
236
|
-
eventContextTags,
|
|
237
|
-
waitEventContextTags,
|
|
238
235
|
isFullMode,
|
|
239
236
|
}) || {};
|
|
240
237
|
if (value.trim() === '') {
|
|
@@ -290,7 +287,6 @@ export const Viber = (props) => {
|
|
|
290
287
|
userLocale={localStorage.getItem("jlocale") || "en"}
|
|
291
288
|
selectedOfferDetails={selectedOfferDetails}
|
|
292
289
|
eventContextTags={eventContextTags}
|
|
293
|
-
waitEventContextTags={waitEventContextTags}
|
|
294
290
|
/>
|
|
295
291
|
</CapColumn>
|
|
296
292
|
<div className="viber-textarea-wrapper">
|
|
@@ -596,7 +592,6 @@ export const Viber = (props) => {
|
|
|
596
592
|
userLocale={localStorage.getItem("jlocale") || "en"}
|
|
597
593
|
selectedOfferDetails={selectedOfferDetails}
|
|
598
594
|
eventContextTags={eventContextTags}
|
|
599
|
-
waitEventContextTags={waitEventContextTags}
|
|
600
595
|
/>
|
|
601
596
|
<CapColumn className="cta-actions">
|
|
602
597
|
<CapButton
|
|
@@ -84,7 +84,6 @@ const MemoizedTagList = memo(({
|
|
|
84
84
|
injectedTags,
|
|
85
85
|
selectedOfferDetails,
|
|
86
86
|
eventContextTags,
|
|
87
|
-
waitEventContextTags,
|
|
88
87
|
forwardedTags,
|
|
89
88
|
onTagSelect,
|
|
90
89
|
restrictPersonalization = false,
|
|
@@ -100,7 +99,6 @@ const MemoizedTagList = memo(({
|
|
|
100
99
|
injectedTags={injectedTags}
|
|
101
100
|
selectedOfferDetails={selectedOfferDetails}
|
|
102
101
|
eventContextTags={eventContextTags}
|
|
103
|
-
waitEventContextTags={waitEventContextTags}
|
|
104
102
|
forwardedTags={forwardedTags}
|
|
105
103
|
onTagSelect={onTagSelect}
|
|
106
104
|
restrictPersonalization={restrictPersonalization}
|
|
@@ -118,7 +116,6 @@ const MemoizedTagList = memo(({
|
|
|
118
116
|
&& prevProps.injectedTags === nextProps.injectedTags
|
|
119
117
|
&& prevProps.selectedOfferDetails === nextProps.selectedOfferDetails
|
|
120
118
|
&& prevProps.eventContextTags === nextProps.eventContextTags
|
|
121
|
-
&& prevProps.waitEventContextTags === nextProps.waitEventContextTags
|
|
122
119
|
&& prevProps.forwardedTags === nextProps.forwardedTags
|
|
123
120
|
&& prevProps.onTagSelect === nextProps.onTagSelect
|
|
124
121
|
&& prevProps.restrictPersonalization === nextProps.restrictPersonalization
|
|
@@ -155,7 +152,6 @@ const WebPushCreate = ({
|
|
|
155
152
|
forwardedTags,
|
|
156
153
|
selectedOfferDetails = [],
|
|
157
154
|
eventContextTags = [],
|
|
158
|
-
waitEventContextTags = {},
|
|
159
155
|
templateActions: templateActionsProps,
|
|
160
156
|
Templates,
|
|
161
157
|
restrictPersonalization = false,
|
|
@@ -236,7 +232,6 @@ const WebPushCreate = ({
|
|
|
236
232
|
supportedTags: memoizedSupportedTags,
|
|
237
233
|
injectedTags,
|
|
238
234
|
eventContextTags,
|
|
239
|
-
waitEventContextTags,
|
|
240
235
|
});
|
|
241
236
|
const { tags, handleOnTagsContextChange, validationConfig } = tagState;
|
|
242
237
|
const { weCrmAccounts } = Templates;
|
|
@@ -842,13 +837,12 @@ const WebPushCreate = ({
|
|
|
842
837
|
injectedTags,
|
|
843
838
|
selectedOfferDetails,
|
|
844
839
|
eventContextTags,
|
|
845
|
-
waitEventContextTags,
|
|
846
840
|
forwardedTags,
|
|
847
841
|
restrictPersonalization,
|
|
848
842
|
disabled: restrictPersonalization,
|
|
849
843
|
disableTooltipMsg: restrictPersonalization ? formatMessage(messages.personalizationNotSupportedAnonymous) : undefined,
|
|
850
844
|
}),
|
|
851
|
-
[tags, injectedTags, selectedOfferDetails, eventContextTags,
|
|
845
|
+
[tags, injectedTags, selectedOfferDetails, eventContextTags, forwardedTags, restrictPersonalization, formatMessage],
|
|
852
846
|
);
|
|
853
847
|
|
|
854
848
|
// Memoized TagList components with optimized props
|
|
@@ -1089,7 +1083,6 @@ WebPushCreate.propTypes = {
|
|
|
1089
1083
|
forwardedTags: PropTypes.object,
|
|
1090
1084
|
selectedOfferDetails: PropTypes.array,
|
|
1091
1085
|
eventContextTags: PropTypes.array,
|
|
1092
|
-
waitEventContextTags: PropTypes.object,
|
|
1093
1086
|
templateActions: PropTypes.object,
|
|
1094
1087
|
restrictPersonalization: PropTypes.bool,
|
|
1095
1088
|
};
|
|
@@ -1118,7 +1111,6 @@ WebPushCreate.defaultProps = {
|
|
|
1118
1111
|
forwardedTags: {},
|
|
1119
1112
|
selectedOfferDetails: [],
|
|
1120
1113
|
eventContextTags: [],
|
|
1121
|
-
waitEventContextTags: {},
|
|
1122
1114
|
templateActions: {},
|
|
1123
1115
|
Templates: {},
|
|
1124
1116
|
restrictPersonalization: false,
|
|
@@ -181,7 +181,6 @@ export const Whatsapp = (props) => {
|
|
|
181
181
|
getFormData,
|
|
182
182
|
selectedOfferDetails,
|
|
183
183
|
eventContextTags,
|
|
184
|
-
waitEventContextTags = {},
|
|
185
184
|
metaDataStatus = "",
|
|
186
185
|
showTestAndPreviewSlidebox: propsShowTestAndPreviewSlidebox,
|
|
187
186
|
handleTestAndPreview: propsHandleTestAndPreview,
|
|
@@ -934,7 +933,6 @@ const isAuthenticationTemplate = isEqual(templateCategory, WHATSAPP_CATEGORIES.a
|
|
|
934
933
|
injectedTags={injectedTags || {}}
|
|
935
934
|
selectedOfferDetails={selectedOfferDetails}
|
|
936
935
|
eventContextTags={eventContextTags}
|
|
937
|
-
waitEventContextTags={waitEventContextTags}
|
|
938
936
|
/>
|
|
939
937
|
)}
|
|
940
938
|
</>
|
|
@@ -1936,7 +1934,6 @@ const isAuthenticationTemplate = isEqual(templateCategory, WHATSAPP_CATEGORIES.a
|
|
|
1936
1934
|
injectedTags={injectedTags || {}}
|
|
1937
1935
|
selectedOfferDetails={selectedOfferDetails}
|
|
1938
1936
|
eventContextTags={eventContextTags}
|
|
1939
|
-
waitEventContextTags={waitEventContextTags}
|
|
1940
1937
|
/>
|
|
1941
1938
|
)
|
|
1942
1939
|
: !isAuthenticationTemplate && (
|
|
@@ -2743,7 +2740,6 @@ const isAuthenticationTemplate = isEqual(templateCategory, WHATSAPP_CATEGORIES.a
|
|
|
2743
2740
|
injectedTags={injectedTags || {}}
|
|
2744
2741
|
selectedOfferDetails={selectedOfferDetails}
|
|
2745
2742
|
eventContextTags={eventContextTags}
|
|
2746
|
-
waitEventContextTags={waitEventContextTags}
|
|
2747
2743
|
/>
|
|
2748
2744
|
)
|
|
2749
2745
|
}
|
|
@@ -2862,7 +2858,6 @@ const isAuthenticationTemplate = isEqual(templateCategory, WHATSAPP_CATEGORIES.a
|
|
|
2862
2858
|
injectedTags={injectedTags || {}}
|
|
2863
2859
|
selectedOfferDetails={selectedOfferDetails}
|
|
2864
2860
|
eventContextTags={eventContextTags}
|
|
2865
|
-
waitEventContextTags={waitEventContextTags}
|
|
2866
2861
|
/>
|
|
2867
2862
|
)}
|
|
2868
2863
|
{isBtnTypeQuickReply && (
|