@capillarytech/creatives-library 7.12.67 → 7.12.69
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/config/app.js +1 -0
- package/package.json +1 -1
- package/services/tests/api.test.js +26 -0
- package/v2Components/CapWhatsappCTA/index.js +7 -8
- package/v2Components/CapWhatsappCTA/index.scss +2 -1
- package/v2Components/CapWhatsappCTA/messages.js +6 -2
- package/v2Components/CapWhatsappCTA/tests/index.test.js +11 -8
- package/v2Components/TemplatePreview/tests/__snapshots__/index.test.js.snap +13 -6
- package/v2Components/TemplatePreview/tests/index.test.js +5 -3
- package/v2Components/WhatsappStatusContainer/tests/__snapshots__/index.test.js.snap +55 -2
- package/v2Components/WhatsappStatusContainer/tests/index.test.js +8 -4
- package/v2Components/mockdata.js +94 -37
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +4 -3
- package/v2Containers/CreativesContainer/index.scss +15 -0
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +27 -25
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxHeader.test.js.snap +19 -4
- package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +76 -3
- package/v2Containers/CreativesContainer/tests/index.test.js +26 -12
- package/v2Containers/Templates/_templates.scss +20 -0
- package/v2Containers/Templates/index.js +15 -5
- package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +39 -265
- package/v2Containers/Templates/tests/index.test.js +35 -25
- package/v2Containers/Whatsapp/index.js +9 -7
- package/v2Containers/Whatsapp/index.scss +1 -0
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +60140 -4887
- package/v2Containers/Whatsapp/tests/__snapshots__/utils.test.js.snap +28 -21
- package/v2Containers/Whatsapp/tests/index.test.js +18 -4
- package/v2Containers/Whatsapp/tests/mockData.js +15 -1
- package/v2Containers/Whatsapp/tests/utils.test.js +11 -5
- package/v2Containers/mockdata.js +262 -227
|
@@ -69,7 +69,14 @@ exports[`Test SlideBoxHeader container Should render correct component for rcs c
|
|
|
69
69
|
</SlideBoxHeader__PrefixWrapper>
|
|
70
70
|
}
|
|
71
71
|
size="large"
|
|
72
|
-
title=
|
|
72
|
+
title={
|
|
73
|
+
<CapHeading
|
|
74
|
+
className="slidebox-header-template-name"
|
|
75
|
+
type="h1"
|
|
76
|
+
>
|
|
77
|
+
amit123456
|
|
78
|
+
</CapHeading>
|
|
79
|
+
}
|
|
73
80
|
titleClass=""
|
|
74
81
|
/>
|
|
75
82
|
</div>
|
|
@@ -145,6 +152,7 @@ exports[`Test SlideBoxHeader container Should render correct component for whats
|
|
|
145
152
|
/>
|
|
146
153
|
</SlideBoxHeader__StyledLabel>
|
|
147
154
|
<SlideBoxHeader__StyledLabel
|
|
155
|
+
className="whatsapp-rcs-template-name"
|
|
148
156
|
type="label2"
|
|
149
157
|
>
|
|
150
158
|
amit123456
|
|
@@ -242,8 +250,8 @@ exports[`Test SlideBoxHeader container Should render correct component for whats
|
|
|
242
250
|
id="creatives.containersV2.Creatives.lastUpdated"
|
|
243
251
|
values={
|
|
244
252
|
Object {
|
|
245
|
-
"date": "17
|
|
246
|
-
"user":
|
|
253
|
+
"date": "17 Jul 2022",
|
|
254
|
+
"user": undefined,
|
|
247
255
|
}
|
|
248
256
|
}
|
|
249
257
|
/>
|
|
@@ -257,7 +265,14 @@ exports[`Test SlideBoxHeader container Should render correct component for whats
|
|
|
257
265
|
</SlideBoxHeader__PrefixWrapper>
|
|
258
266
|
}
|
|
259
267
|
size="large"
|
|
260
|
-
title=
|
|
268
|
+
title={
|
|
269
|
+
<CapHeading
|
|
270
|
+
className="slidebox-header-template-name"
|
|
271
|
+
type="h1"
|
|
272
|
+
>
|
|
273
|
+
creatives_whatsapp6
|
|
274
|
+
</CapHeading>
|
|
275
|
+
}
|
|
261
276
|
titleClass=""
|
|
262
277
|
/>
|
|
263
278
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Test SlideBoxContent container
|
|
3
|
+
exports[`Test SlideBoxContent container campaign message, add creative click rcs 1`] = `
|
|
4
4
|
<CreativesContainer__SlideBoxWrapper
|
|
5
5
|
className="add-creatives-section creatives-library-mode "
|
|
6
6
|
>
|
|
@@ -71,7 +71,7 @@ exports[`Test SlideBoxContent container Should render correct component for rcs
|
|
|
71
71
|
</CreativesContainer__SlideBoxWrapper>
|
|
72
72
|
`;
|
|
73
73
|
|
|
74
|
-
exports[`Test SlideBoxContent container
|
|
74
|
+
exports[`Test SlideBoxContent container campaign message, add creative click whatsapp 1`] = `
|
|
75
75
|
<CreativesContainer__SlideBoxWrapper
|
|
76
76
|
className="add-creatives-section creatives-library-mode "
|
|
77
77
|
>
|
|
@@ -142,7 +142,80 @@ exports[`Test SlideBoxContent container Should render correct component for what
|
|
|
142
142
|
</CreativesContainer__SlideBoxWrapper>
|
|
143
143
|
`;
|
|
144
144
|
|
|
145
|
-
exports[`Test SlideBoxContent container
|
|
145
|
+
exports[`Test SlideBoxContent container campaign message, whatsapp edit all data 1`] = `
|
|
146
|
+
<CreativesContainer__SlideBoxWrapper
|
|
147
|
+
className="add-creatives-section creatives-library-mode "
|
|
148
|
+
>
|
|
149
|
+
<CapSlideBox
|
|
150
|
+
closeIconSize="m"
|
|
151
|
+
content={
|
|
152
|
+
<SlideBoxContent
|
|
153
|
+
currentChannel="WHATSAPP"
|
|
154
|
+
getFormData={[Function]}
|
|
155
|
+
handleClose={[Function]}
|
|
156
|
+
onCallTaskSubmit={[Function]}
|
|
157
|
+
onChannelChange={[Function]}
|
|
158
|
+
onCreateComplete={[MockFunction]}
|
|
159
|
+
onCreateNew={[Function]}
|
|
160
|
+
onCreateNextStep={[Function]}
|
|
161
|
+
onEmailModeChange={[Function]}
|
|
162
|
+
onEnterTemplateName={[Function]}
|
|
163
|
+
onFTPSubmit={[MockFunction]}
|
|
164
|
+
onFacebookSubmit={[MockFunction]}
|
|
165
|
+
onMobilepushModeChange={[Function]}
|
|
166
|
+
onPreviewTemplate={[Function]}
|
|
167
|
+
onRemoveTemplateName={[Function]}
|
|
168
|
+
onResetStep={[Function]}
|
|
169
|
+
onSelectTemplate={[Function]}
|
|
170
|
+
onShowTemplates={[Function]}
|
|
171
|
+
onValidationFail={[Function]}
|
|
172
|
+
onWeChatMaptemplateStepChange={[Function]}
|
|
173
|
+
onWechatTemplateChange={[Function]}
|
|
174
|
+
saveMessage={[Function]}
|
|
175
|
+
setIsLoadingContent={[Function]}
|
|
176
|
+
showTemplateName={[Function]}
|
|
177
|
+
slidBoxContent="editTemplate"
|
|
178
|
+
templateStep="modeSelection"
|
|
179
|
+
weChatMaptemplateStep={0}
|
|
180
|
+
weChatTemplateType=""
|
|
181
|
+
/>
|
|
182
|
+
}
|
|
183
|
+
footer={
|
|
184
|
+
<SlideBoxFooter
|
|
185
|
+
currentChannel="WHATSAPP"
|
|
186
|
+
onCreateNextStep={[Function]}
|
|
187
|
+
onDiscard={[Function]}
|
|
188
|
+
onEditTemplate={[Function]}
|
|
189
|
+
onSave={[Function]}
|
|
190
|
+
shouldShowContinueFooter={[Function]}
|
|
191
|
+
shouldShowDoneFooter={[Function]}
|
|
192
|
+
slidBoxContent="editTemplate"
|
|
193
|
+
templateStep="modeSelection"
|
|
194
|
+
/>
|
|
195
|
+
}
|
|
196
|
+
handleClose={[Function]}
|
|
197
|
+
header={
|
|
198
|
+
<SlideBoxHeader
|
|
199
|
+
channel="WHATSAPP"
|
|
200
|
+
isLoadingContent={true}
|
|
201
|
+
onShowTemplates={[Function]}
|
|
202
|
+
onWeChatMaptemplateStepChange={[Function]}
|
|
203
|
+
showPrefix={true}
|
|
204
|
+
slidBoxContent="editTemplate"
|
|
205
|
+
templateNameRenderProp={[Function]}
|
|
206
|
+
templateStep="modeSelection"
|
|
207
|
+
weChatMaptemplateStep={0}
|
|
208
|
+
weChatTemplateType=""
|
|
209
|
+
/>
|
|
210
|
+
}
|
|
211
|
+
position="right"
|
|
212
|
+
show={false}
|
|
213
|
+
size="size-xl"
|
|
214
|
+
/>
|
|
215
|
+
</CreativesContainer__SlideBoxWrapper>
|
|
216
|
+
`;
|
|
217
|
+
|
|
218
|
+
exports[`Test SlideBoxContent container campaign message, whatsapp edit min data 1`] = `
|
|
146
219
|
<CreativesContainer__SlideBoxWrapper
|
|
147
220
|
className="add-creatives-section creatives-library-mode "
|
|
148
221
|
>
|
|
@@ -6,11 +6,12 @@ import mockdata from '../../mockdata';
|
|
|
6
6
|
|
|
7
7
|
const {
|
|
8
8
|
whatsappTemplates,
|
|
9
|
+
whatsappGetCreativeData1,
|
|
10
|
+
whatsappGetCreativeData2,
|
|
11
|
+
whatsappGetTemplateData1,
|
|
12
|
+
whatsappGetTemplateData2,
|
|
9
13
|
rcsTemplates,
|
|
10
|
-
whatsappGetCreativeData,
|
|
11
|
-
whatsappGetTemplateData,
|
|
12
14
|
rcsEditTemplateData,
|
|
13
|
-
whatsappGetCreativeData2,
|
|
14
15
|
} = mockdata;
|
|
15
16
|
|
|
16
17
|
jest.mock('../../../v2Components/FormBuilder', () => ({
|
|
@@ -44,19 +45,33 @@ describe('Test SlideBoxContent container', () => {
|
|
|
44
45
|
);
|
|
45
46
|
};
|
|
46
47
|
|
|
47
|
-
it('
|
|
48
|
+
it('campaign message, add creative click whatsapp', () => {
|
|
48
49
|
renderFunction('WHATSAPP', 'createTemplate', whatsappTemplates, {
|
|
49
50
|
mode: 'create',
|
|
50
51
|
});
|
|
51
52
|
expect(renderedComponent).toMatchSnapshot();
|
|
52
53
|
});
|
|
53
54
|
|
|
54
|
-
it('
|
|
55
|
+
it('campaign message, whatsapp edit min data', () => {
|
|
56
|
+
renderFunction(
|
|
57
|
+
'WHATSAPP',
|
|
58
|
+
'editTemplate',
|
|
59
|
+
whatsappTemplates,
|
|
60
|
+
whatsappGetTemplateData1,
|
|
61
|
+
);
|
|
62
|
+
renderedComponent.instance().onEditTemplate();
|
|
63
|
+
renderedComponent.find('CapSlideBox').props().content.props.handleClose();
|
|
64
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
65
|
+
expect(handleCloseCreatives).toHaveBeenCalledTimes(1);
|
|
66
|
+
expect(handleCloseCreatives).toHaveBeenCalledWith(true);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it('campaign message, whatsapp edit all data', () => {
|
|
55
70
|
renderFunction(
|
|
56
71
|
'WHATSAPP',
|
|
57
72
|
'editTemplate',
|
|
58
73
|
whatsappTemplates,
|
|
59
|
-
|
|
74
|
+
whatsappGetTemplateData2,
|
|
60
75
|
);
|
|
61
76
|
renderedComponent.instance().onEditTemplate();
|
|
62
77
|
renderedComponent.find('CapSlideBox').props().content.props.handleClose();
|
|
@@ -65,19 +80,18 @@ describe('Test SlideBoxContent container', () => {
|
|
|
65
80
|
expect(handleCloseCreatives).toHaveBeenCalledWith(true);
|
|
66
81
|
});
|
|
67
82
|
|
|
68
|
-
it('Text getCreatives data for whatsapp', () => {
|
|
69
|
-
console.log('abcRcb');
|
|
83
|
+
it('Text getCreatives data for whatsapp, data from creatives done to campaigns', () => {
|
|
70
84
|
renderFunction(
|
|
71
85
|
'WHATSAPP',
|
|
72
86
|
'editTemplate',
|
|
73
87
|
whatsappTemplates,
|
|
74
|
-
|
|
88
|
+
whatsappGetCreativeData1,
|
|
75
89
|
);
|
|
76
90
|
renderedComponent.instance().onEditTemplate();
|
|
77
91
|
renderedComponent
|
|
78
92
|
.find('CapSlideBox')
|
|
79
93
|
.props()
|
|
80
|
-
.content.props.getFormData(
|
|
94
|
+
.content.props.getFormData(whatsappGetCreativeData1);
|
|
81
95
|
renderedComponent
|
|
82
96
|
.find('CapSlideBox')
|
|
83
97
|
.props()
|
|
@@ -85,12 +99,12 @@ describe('Test SlideBoxContent container', () => {
|
|
|
85
99
|
expect(getCreativesData).toHaveBeenCalledTimes(2);
|
|
86
100
|
});
|
|
87
101
|
|
|
88
|
-
it('
|
|
102
|
+
it('campaign message, add creative click rcs', () => {
|
|
89
103
|
renderFunction('RCS', 'createTemplate', rcsTemplates, { mode: 'create' });
|
|
90
104
|
expect(renderedComponent).toMatchSnapshot();
|
|
91
105
|
});
|
|
92
106
|
|
|
93
|
-
it('Text getCreatives data for rcs', () => {
|
|
107
|
+
it('Text getCreatives data for rcs, data from creatives done to campaigns', () => {
|
|
94
108
|
renderFunction('RCS', 'editTemplate', rcsTemplates, rcsEditTemplateData);
|
|
95
109
|
renderedComponent.instance().onEditTemplate();
|
|
96
110
|
renderedComponent
|
|
@@ -592,4 +592,24 @@
|
|
|
592
592
|
width: 100%;
|
|
593
593
|
max-height: 123px;
|
|
594
594
|
margin-bottom: 4px;
|
|
595
|
+
}
|
|
596
|
+
.whatsapp-rcs-template-name {
|
|
597
|
+
max-width: 170px;
|
|
598
|
+
overflow: hidden;
|
|
599
|
+
white-space: nowrap;
|
|
600
|
+
text-overflow: ellipsis;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.whatsapp-message-with-image {
|
|
604
|
+
display: -webkit-box;
|
|
605
|
+
-webkit-line-clamp: 3;
|
|
606
|
+
-webkit-box-orient: vertical;
|
|
607
|
+
overflow: hidden;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
.whatsapp-message-without-image {
|
|
611
|
+
display: -webkit-box;
|
|
612
|
+
-webkit-line-clamp: 10;
|
|
613
|
+
-webkit-box-orient: vertical;
|
|
614
|
+
overflow: hidden;
|
|
595
615
|
}
|
|
@@ -1069,22 +1069,32 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
1069
1069
|
case WHATSAPP: {
|
|
1070
1070
|
const { whatsappImageSrc = '', templateMsg} = getWhatsappContent(template);
|
|
1071
1071
|
templateData.title = (
|
|
1072
|
-
<CapRow
|
|
1073
|
-
<CapLabel>{template.name}</CapLabel>
|
|
1072
|
+
<CapRow>
|
|
1073
|
+
<CapLabel className="whatsapp-rcs-template-name">{template.name}</CapLabel>
|
|
1074
1074
|
<WhatsappStatusContainer template={template} />
|
|
1075
1075
|
</CapRow>
|
|
1076
1076
|
);
|
|
1077
1077
|
templateData.content = (
|
|
1078
1078
|
<>
|
|
1079
|
-
{whatsappImageSrc &&
|
|
1080
|
-
|
|
1079
|
+
{whatsappImageSrc && (
|
|
1080
|
+
<CapImage src={whatsappImageSrc} className="whatsapp-image" />
|
|
1081
|
+
)}
|
|
1082
|
+
<span
|
|
1083
|
+
className={`${
|
|
1084
|
+
whatsappImageSrc
|
|
1085
|
+
? 'whatsapp-message-with-image'
|
|
1086
|
+
: 'whatsapp-message-without-image'
|
|
1087
|
+
}`}
|
|
1088
|
+
>
|
|
1089
|
+
{templateMsg}
|
|
1090
|
+
</span>
|
|
1081
1091
|
{getWhatsappCta(template)}
|
|
1082
1092
|
</>
|
|
1083
1093
|
);
|
|
1084
1094
|
break;
|
|
1085
1095
|
}
|
|
1086
1096
|
case RCS: {
|
|
1087
|
-
templateData.title = template.name
|
|
1097
|
+
templateData.title = <CapLabel className="whatsapp-rcs-template-name">{template.name}</CapLabel>;
|
|
1088
1098
|
templateData.content = getRCSContent(template);
|
|
1089
1099
|
break;
|
|
1090
1100
|
}
|
|
@@ -13,250 +13,15 @@ exports[`Test Templates container Should render correct component for whatsapp c
|
|
|
13
13
|
`;
|
|
14
14
|
|
|
15
15
|
exports[`Test Templates container Should render illustration when no templates are passed 1`] = `
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
Object {
|
|
26
|
-
"display": "none",
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
type="file"
|
|
30
|
-
/>
|
|
31
|
-
<CapRow>
|
|
32
|
-
<Pagination
|
|
33
|
-
onPageChange={[Function]}
|
|
34
|
-
paginationContainer="pagination-container"
|
|
35
|
-
paginationSelector="pagination-container"
|
|
36
|
-
>
|
|
37
|
-
<div>
|
|
38
|
-
<div
|
|
39
|
-
className="action-container"
|
|
40
|
-
>
|
|
41
|
-
<_class
|
|
42
|
-
className="search-text"
|
|
43
|
-
disabled={false}
|
|
44
|
-
labelPosition="top"
|
|
45
|
-
onChange={[Function]}
|
|
46
|
-
onClear={[Function]}
|
|
47
|
-
onScroll={[Function]}
|
|
48
|
-
placeholder="Search"
|
|
49
|
-
style={
|
|
50
|
-
Object {
|
|
51
|
-
"width": "210px",
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
value=""
|
|
55
|
-
/>
|
|
56
|
-
<div
|
|
57
|
-
className="whatsapp-filters"
|
|
58
|
-
>
|
|
59
|
-
<CapSelectFilter
|
|
60
|
-
data={
|
|
61
|
-
Array [
|
|
62
|
-
Object {
|
|
63
|
-
"key": "transactional",
|
|
64
|
-
"label": <FormattedMessage
|
|
65
|
-
defaultMessage="Transactional"
|
|
66
|
-
id="creatives.containersV2.Whatsapp.transactional"
|
|
67
|
-
values={Object {}}
|
|
68
|
-
/>,
|
|
69
|
-
"tagColor": "#f2e7fe",
|
|
70
|
-
"tagTextColor": "#a451ff",
|
|
71
|
-
"tooltipLabel": <FormattedMessage
|
|
72
|
-
defaultMessage="Send account updates, order updates, alerts, and more to share important information."
|
|
73
|
-
id="creatives.containersV2.Whatsapp.transactionalTooltip"
|
|
74
|
-
values={Object {}}
|
|
75
|
-
/>,
|
|
76
|
-
"value": "TRANSACTIONAL",
|
|
77
|
-
},
|
|
78
|
-
Object {
|
|
79
|
-
"key": "marketing",
|
|
80
|
-
"label": <FormattedMessage
|
|
81
|
-
defaultMessage="Marketing"
|
|
82
|
-
id="creatives.containersV2.Whatsapp.marketing"
|
|
83
|
-
values={Object {}}
|
|
84
|
-
/>,
|
|
85
|
-
"tagColor": "#ffe5d2",
|
|
86
|
-
"tagTextColor": "#f87d23",
|
|
87
|
-
"tooltipLabel": <FormattedMessage
|
|
88
|
-
defaultMessage="Send promotional offers, product announcements, and more to increase awareness and engagement."
|
|
89
|
-
id="creatives.containersV2.Whatsapp.marketingTooltip"
|
|
90
|
-
values={Object {}}
|
|
91
|
-
/>,
|
|
92
|
-
"value": "MARKETING",
|
|
93
|
-
},
|
|
94
|
-
Object {
|
|
95
|
-
"key": "otp",
|
|
96
|
-
"label": <FormattedMessage
|
|
97
|
-
defaultMessage="Otp"
|
|
98
|
-
id="creatives.containersV2.Whatsapp.otp"
|
|
99
|
-
values={Object {}}
|
|
100
|
-
/>,
|
|
101
|
-
"tagColor": "#ecf7ec",
|
|
102
|
-
"tagTextColor": "#6bb56b",
|
|
103
|
-
"tooltipLabel": <FormattedMessage
|
|
104
|
-
defaultMessage="Send codes that allow your customers to securely access their accounts."
|
|
105
|
-
id="creatives.containersV2.Whatsapp.otpTooltip"
|
|
106
|
-
values={Object {}}
|
|
107
|
-
/>,
|
|
108
|
-
"value": "OTP",
|
|
109
|
-
},
|
|
110
|
-
]
|
|
111
|
-
}
|
|
112
|
-
dropdownMaxHeight="320px"
|
|
113
|
-
dropdownWidth="228px"
|
|
114
|
-
onSelect={[Function]}
|
|
115
|
-
overlayStyle={
|
|
116
|
-
Object {
|
|
117
|
-
"overflowY": "hidden",
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
placeholder="Category"
|
|
121
|
-
placement="bottomLeft"
|
|
122
|
-
selectedValue=""
|
|
123
|
-
showBadge={true}
|
|
124
|
-
width="105px"
|
|
125
|
-
/>
|
|
126
|
-
</div>
|
|
127
|
-
<Component />
|
|
128
|
-
<Component />
|
|
129
|
-
<div
|
|
130
|
-
style={
|
|
131
|
-
Object {
|
|
132
|
-
"alignItems": "center",
|
|
133
|
-
"display": "flex",
|
|
134
|
-
"justifyContent": "space-between",
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
>
|
|
138
|
-
<CapLink
|
|
139
|
-
className="create-new-link"
|
|
140
|
-
disabled={false}
|
|
141
|
-
onClick={[Function]}
|
|
142
|
-
suffix={
|
|
143
|
-
<CapIcon
|
|
144
|
-
size="s"
|
|
145
|
-
type="open-in-new"
|
|
146
|
-
/>
|
|
147
|
-
}
|
|
148
|
-
title="Create new template"
|
|
149
|
-
/>
|
|
150
|
-
</div>
|
|
151
|
-
</div>
|
|
152
|
-
<CapRow
|
|
153
|
-
align="middle"
|
|
154
|
-
className="selected-whatsapp-filters"
|
|
155
|
-
type="flex"
|
|
156
|
-
/>
|
|
157
|
-
<CapSpin
|
|
158
|
-
spinning={false}
|
|
159
|
-
style={
|
|
160
|
-
Object {
|
|
161
|
-
"width": "100%",
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
tip="Getting all templates..."
|
|
165
|
-
>
|
|
166
|
-
<div>
|
|
167
|
-
<div
|
|
168
|
-
style={
|
|
169
|
-
Object {
|
|
170
|
-
"height": "calc(100vh - 325px)",
|
|
171
|
-
"overflow": "auto",
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
>
|
|
175
|
-
<Wrapper
|
|
176
|
-
buttonClassName="create-new-whatsapp"
|
|
177
|
-
buttonLabel={
|
|
178
|
-
<FormattedMessage
|
|
179
|
-
defaultMessage="Add new Whatsapp {template}"
|
|
180
|
-
id="creatives.containersV2.Templates.newWhatsappTemplate"
|
|
181
|
-
values={
|
|
182
|
-
Object {
|
|
183
|
-
"template": "",
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
/>
|
|
187
|
-
}
|
|
188
|
-
description={
|
|
189
|
-
<FormattedMessage
|
|
190
|
-
defaultMessage="These templates can be reused when creating a
|
|
191
|
-
new message content."
|
|
192
|
-
id="creatives.containersV2.Templates.whatsappDescIllustration"
|
|
193
|
-
values={Object {}}
|
|
194
|
-
/>
|
|
195
|
-
}
|
|
196
|
-
descriptionClassName="illustration-desc"
|
|
197
|
-
descriptionPosition="bottom"
|
|
198
|
-
illustrationImage="test-file-stub"
|
|
199
|
-
onClick={[Function]}
|
|
200
|
-
title={
|
|
201
|
-
<FormattedMessage
|
|
202
|
-
defaultMessage="Add a new Whatsapp creative {template}"
|
|
203
|
-
id="creatives.containersV2.Templates.whatsappTitleIllustration"
|
|
204
|
-
values={
|
|
205
|
-
Object {
|
|
206
|
-
"template": "",
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
/>
|
|
210
|
-
}
|
|
211
|
-
/>
|
|
212
|
-
</div>
|
|
213
|
-
</div>
|
|
214
|
-
</CapSpin>
|
|
215
|
-
</div>
|
|
216
|
-
</Pagination>
|
|
217
|
-
</CapRow>
|
|
218
|
-
<CapRow />
|
|
219
|
-
<CapRow>
|
|
220
|
-
<CapSlideBox
|
|
221
|
-
closeIconSize="m"
|
|
222
|
-
content={
|
|
223
|
-
<CardGrid
|
|
224
|
-
className=""
|
|
225
|
-
colNumber={2}
|
|
226
|
-
gutterSize={16}
|
|
227
|
-
isLoading={false}
|
|
228
|
-
listItem={Array []}
|
|
229
|
-
onHoverItem={[Function]}
|
|
230
|
-
onItemClick={[Function]}
|
|
231
|
-
/>
|
|
232
|
-
}
|
|
233
|
-
handleClose={[Function]}
|
|
234
|
-
header={
|
|
235
|
-
<h3>
|
|
236
|
-
Select layout
|
|
237
|
-
</h3>
|
|
238
|
-
}
|
|
239
|
-
loadingText="Loading EDM Templates"
|
|
240
|
-
position="right"
|
|
241
|
-
show={false}
|
|
242
|
-
size="size-r"
|
|
243
|
-
width={60}
|
|
244
|
-
/>
|
|
245
|
-
<Wrapper
|
|
246
|
-
centered={true}
|
|
247
|
-
className="delete-template-confirm"
|
|
248
|
-
closeText="Cancel"
|
|
249
|
-
okText="Yes, delete"
|
|
250
|
-
onCancel={[Function]}
|
|
251
|
-
onOk={[Function]}
|
|
252
|
-
title="Confirm delete template"
|
|
253
|
-
visible={false}
|
|
254
|
-
>
|
|
255
|
-
Are you sure you wish to delete this template?
|
|
256
|
-
</Wrapper>
|
|
257
|
-
</CapRow>
|
|
258
|
-
</div>
|
|
259
|
-
</Fragment>
|
|
16
|
+
<CapSpin
|
|
17
|
+
spinning={false}
|
|
18
|
+
>
|
|
19
|
+
<FormattedMessage
|
|
20
|
+
defaultMessage="Whatsapp accounts are not setup for your brand"
|
|
21
|
+
id="creatives.containersV2.Templates.noAccountsPresentWhatsapp"
|
|
22
|
+
values={Object {}}
|
|
23
|
+
/>
|
|
24
|
+
</CapSpin>
|
|
260
25
|
`;
|
|
261
26
|
|
|
262
27
|
exports[`Test Templates container Should render temlates when whatsapp templates are passed 1`] = `
|
|
@@ -1021,12 +786,16 @@ exports[`Test Templates container Test max templates exceeded 1`] = `
|
|
|
1021
786
|
className="whatsapp-image"
|
|
1022
787
|
src="https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/c9edc114-923b-4ac7-82d0-d6682213.jpg"
|
|
1023
788
|
/>
|
|
1024
|
-
<
|
|
1025
|
-
|
|
789
|
+
<span
|
|
790
|
+
className="whatsapp-message-with-image"
|
|
1026
791
|
>
|
|
1027
|
-
|
|
792
|
+
<CapLabel
|
|
793
|
+
type="label9"
|
|
794
|
+
>
|
|
795
|
+
Hey {{1}}, Easier implementation, tracking, reporting and planning of promotions is now live! Check it out at {{2}}
|
|
1028
796
|
Click {{unsubscribe}} to unsubscribe
|
|
1029
|
-
|
|
797
|
+
</CapLabel>
|
|
798
|
+
</span>
|
|
1030
799
|
<CapLabel
|
|
1031
800
|
style={
|
|
1032
801
|
Object {
|
|
@@ -1113,10 +882,9 @@ Click {{unsubscribe}} to unsubscribe
|
|
|
1113
882
|
Overview
|
|
1114
883
|
</CapButton>,
|
|
1115
884
|
"key": "WHATSAPP-card-creatives_whatsapp6",
|
|
1116
|
-
"title": <CapRow
|
|
1117
|
-
className="whatsapp-card-title"
|
|
1118
|
-
>
|
|
885
|
+
"title": <CapRow>
|
|
1119
886
|
<CapLabel
|
|
887
|
+
className="whatsapp-rcs-template-name"
|
|
1120
888
|
type="label1"
|
|
1121
889
|
>
|
|
1122
890
|
creatives_whatsapp6
|
|
@@ -1452,12 +1220,16 @@ exports[`Test Templates container Test max templates not exceeded 1`] = `
|
|
|
1452
1220
|
className="whatsapp-image"
|
|
1453
1221
|
src="https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/c9edc114-923b-4ac7-82d0-d6682213.jpg"
|
|
1454
1222
|
/>
|
|
1455
|
-
<
|
|
1456
|
-
|
|
1223
|
+
<span
|
|
1224
|
+
className="whatsapp-message-with-image"
|
|
1457
1225
|
>
|
|
1458
|
-
|
|
1226
|
+
<CapLabel
|
|
1227
|
+
type="label9"
|
|
1228
|
+
>
|
|
1229
|
+
Hey {{1}}, Easier implementation, tracking, reporting and planning of promotions is now live! Check it out at {{2}}
|
|
1459
1230
|
Click {{unsubscribe}} to unsubscribe
|
|
1460
|
-
|
|
1231
|
+
</CapLabel>
|
|
1232
|
+
</span>
|
|
1461
1233
|
<CapLabel
|
|
1462
1234
|
style={
|
|
1463
1235
|
Object {
|
|
@@ -1544,10 +1316,9 @@ Click {{unsubscribe}} to unsubscribe
|
|
|
1544
1316
|
Overview
|
|
1545
1317
|
</CapButton>,
|
|
1546
1318
|
"key": "WHATSAPP-card-creatives_whatsapp6",
|
|
1547
|
-
"title": <CapRow
|
|
1548
|
-
className="whatsapp-card-title"
|
|
1549
|
-
>
|
|
1319
|
+
"title": <CapRow>
|
|
1550
1320
|
<CapLabel
|
|
1321
|
+
className="whatsapp-rcs-template-name"
|
|
1551
1322
|
type="label1"
|
|
1552
1323
|
>
|
|
1553
1324
|
creatives_whatsapp6
|
|
@@ -1883,12 +1654,16 @@ exports[`Test Templates container Test max templates warning 1`] = `
|
|
|
1883
1654
|
className="whatsapp-image"
|
|
1884
1655
|
src="https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/c9edc114-923b-4ac7-82d0-d6682213.jpg"
|
|
1885
1656
|
/>
|
|
1886
|
-
<
|
|
1887
|
-
|
|
1657
|
+
<span
|
|
1658
|
+
className="whatsapp-message-with-image"
|
|
1888
1659
|
>
|
|
1889
|
-
|
|
1660
|
+
<CapLabel
|
|
1661
|
+
type="label9"
|
|
1662
|
+
>
|
|
1663
|
+
Hey {{1}}, Easier implementation, tracking, reporting and planning of promotions is now live! Check it out at {{2}}
|
|
1890
1664
|
Click {{unsubscribe}} to unsubscribe
|
|
1891
|
-
|
|
1665
|
+
</CapLabel>
|
|
1666
|
+
</span>
|
|
1892
1667
|
<CapLabel
|
|
1893
1668
|
style={
|
|
1894
1669
|
Object {
|
|
@@ -1975,10 +1750,9 @@ Click {{unsubscribe}} to unsubscribe
|
|
|
1975
1750
|
Overview
|
|
1976
1751
|
</CapButton>,
|
|
1977
1752
|
"key": "WHATSAPP-card-creatives_whatsapp6",
|
|
1978
|
-
"title": <CapRow
|
|
1979
|
-
className="whatsapp-card-title"
|
|
1980
|
-
>
|
|
1753
|
+
"title": <CapRow>
|
|
1981
1754
|
<CapLabel
|
|
1755
|
+
className="whatsapp-rcs-template-name"
|
|
1982
1756
|
type="label1"
|
|
1983
1757
|
>
|
|
1984
1758
|
creatives_whatsapp6
|