@capillarytech/creatives-library 7.6.3 → 7.6.5
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/assets/DeviceForEmail.png +0 -0
- package/package.json +1 -1
- package/v2Containers/CreativesContainer/SlideBoxContent.js +7 -1
- package/v2Containers/CreativesContainer/index.js +33 -5
- package/v2Containers/Facebook/Advertisement/index.js +0 -1
- package/v2Containers/Facebook/Facebook.style.js +1 -1
- package/v2Containers/Facebook/constants.js +4 -0
- package/v2Containers/Facebook/index.js +192 -121
- package/v2Containers/Facebook/messages.js +20 -4
- package/v2Containers/Templates/index.js +5 -1
- package/v2Containers/TemplatesV2/index.js +9 -4
|
Binary file
|
package/package.json
CHANGED
|
@@ -137,6 +137,8 @@ function SlideBoxContent(props) {
|
|
|
137
137
|
handleClose,
|
|
138
138
|
onFTPSubmit,
|
|
139
139
|
campaignSettings,
|
|
140
|
+
messageStrategy,
|
|
141
|
+
fbAdManger,
|
|
140
142
|
} = props;
|
|
141
143
|
const type = (messageDetails.type || '').toLowerCase(); // type is context in get tags values : outbound | dvs | referral | loyalty | coupons
|
|
142
144
|
const query = { type: !isFullMode && 'embedded', module: isFullMode ? 'default' : 'library', isEditFromCampaigns: (templateData || {}).isEditFromCampaigns};
|
|
@@ -334,6 +336,7 @@ function SlideBoxContent(props) {
|
|
|
334
336
|
slidBoxContent={slidBoxContent}
|
|
335
337
|
FTPMode="create"
|
|
336
338
|
selectedOfferDetails={selectedOfferDetails}
|
|
339
|
+
messageStrategy={messageStrategy}
|
|
337
340
|
/>
|
|
338
341
|
)}
|
|
339
342
|
{isPreview && (
|
|
@@ -558,7 +561,8 @@ function SlideBoxContent(props) {
|
|
|
558
561
|
isFullMode={isFullMode}
|
|
559
562
|
createNew
|
|
560
563
|
getFormSubscriptionData={getFormData}
|
|
561
|
-
|
|
564
|
+
messageStrategy={messageStrategy}
|
|
565
|
+
fbAdManger={fbAdManger}
|
|
562
566
|
/>
|
|
563
567
|
)
|
|
564
568
|
}
|
|
@@ -687,5 +691,7 @@ SlideBoxContent.propTypes = {
|
|
|
687
691
|
saveMessage: PropTypes.func,
|
|
688
692
|
selectedAccount: PropTypes.object,
|
|
689
693
|
onFTPSubmit: PropTypes.func,
|
|
694
|
+
messageStrategy: PropTypes.string,
|
|
695
|
+
|
|
690
696
|
};
|
|
691
697
|
export default SlideBoxContent;
|
|
@@ -51,7 +51,6 @@ class Creatives extends React.Component {
|
|
|
51
51
|
currentChannel: this.props.channel || 'sms',
|
|
52
52
|
weChatTemplateType: '',
|
|
53
53
|
weChatMaptemplateStep: 0,
|
|
54
|
-
|
|
55
54
|
};
|
|
56
55
|
this.creativesTemplateSteps = {
|
|
57
56
|
1: 'modeSelection',
|
|
@@ -87,8 +86,12 @@ class Creatives extends React.Component {
|
|
|
87
86
|
onEditTemplate = () => {
|
|
88
87
|
this.setState({ slidBoxContent: 'editTemplate', showSlideBox: true });
|
|
89
88
|
};
|
|
90
|
-
onCreateNew = () => {
|
|
91
|
-
|
|
89
|
+
onCreateNew = (fbAdManger) => {
|
|
90
|
+
if (fbAdManger) {
|
|
91
|
+
this.setState({ slidBoxContent: 'createTemplate', showSlideBox: true, fbAdManger });
|
|
92
|
+
} else {
|
|
93
|
+
this.setState({ slidBoxContent: 'createTemplate', showSlideBox: true });
|
|
94
|
+
}
|
|
92
95
|
};
|
|
93
96
|
|
|
94
97
|
onShowTemplates = () => {
|
|
@@ -273,6 +276,25 @@ class Creatives extends React.Component {
|
|
|
273
276
|
};
|
|
274
277
|
break;
|
|
275
278
|
}
|
|
279
|
+
case constants.FACEBOOK: {
|
|
280
|
+
return {
|
|
281
|
+
fbContentType: "CREATIVE",
|
|
282
|
+
creativeType: "IMAGE",
|
|
283
|
+
facebookCreativeList: [{
|
|
284
|
+
subType: "IMAGE",
|
|
285
|
+
displayLink: "www.google.com",
|
|
286
|
+
callToAction: "callToAction",
|
|
287
|
+
primaryText: "primaryText",
|
|
288
|
+
linkDescription: "linkDescription",
|
|
289
|
+
linkHeadLine: "linkHeadLine",
|
|
290
|
+
websiteLink: "websiteLink",
|
|
291
|
+
imageLink: "www.kuch_bhi_link.com",
|
|
292
|
+
pageId: "1234",
|
|
293
|
+
}],
|
|
294
|
+
channel: "FACEBOOK",
|
|
295
|
+
accountId: "1310132286042455",
|
|
296
|
+
};
|
|
297
|
+
}
|
|
276
298
|
default:
|
|
277
299
|
break;
|
|
278
300
|
}
|
|
@@ -376,6 +398,8 @@ class Creatives extends React.Component {
|
|
|
376
398
|
};
|
|
377
399
|
}
|
|
378
400
|
break;
|
|
401
|
+
case constants.FACEBOOK:
|
|
402
|
+
break;
|
|
379
403
|
default:
|
|
380
404
|
break;
|
|
381
405
|
}
|
|
@@ -578,8 +602,8 @@ class Creatives extends React.Component {
|
|
|
578
602
|
return false;
|
|
579
603
|
}
|
|
580
604
|
shouldShowHeader = () => {
|
|
581
|
-
const {currentChannel} = this.state;
|
|
582
|
-
if (currentChannel === constants.FACEBOOK) {
|
|
605
|
+
const {currentChannel, slidBoxContent} = this.state;
|
|
606
|
+
if (currentChannel.toUpperCase() === constants.FACEBOOK && slidBoxContent === 'createTemplate') {
|
|
583
607
|
return false;
|
|
584
608
|
}
|
|
585
609
|
return true;
|
|
@@ -637,6 +661,7 @@ class Creatives extends React.Component {
|
|
|
637
661
|
onEnterTemplateName={this.onEnterTemplateName}
|
|
638
662
|
onRemoveTemplateName={this.onRemoveTemplateName}
|
|
639
663
|
onResetStep={this.resetStep}
|
|
664
|
+
fbAdManger={this.state.fbAdManger}
|
|
640
665
|
cap={cap}
|
|
641
666
|
setIsLoadingContent={this.setIsLoadingContent}
|
|
642
667
|
onMobilepushModeChange={this.onMobilepushModeChange}
|
|
@@ -661,6 +686,7 @@ class Creatives extends React.Component {
|
|
|
661
686
|
handleClose={this.handleCloseSlideBox}
|
|
662
687
|
onFTPSubmit={getCreativesData}
|
|
663
688
|
editor={editor}
|
|
689
|
+
messageStrategy={this.props.strategy}
|
|
664
690
|
/>
|
|
665
691
|
}
|
|
666
692
|
footer={this.shouldShowFooter() &&
|
|
@@ -713,6 +739,8 @@ Creatives.propTypes = {
|
|
|
713
739
|
selectedWeChatAccount: PropTypes.object,
|
|
714
740
|
Templates: PropTypes.object,
|
|
715
741
|
selectedAccount: PropTypes.object,
|
|
742
|
+
strategy: PropTypes.string,
|
|
743
|
+
|
|
716
744
|
};
|
|
717
745
|
const mapStatesToProps = () => createStructuredSelector({
|
|
718
746
|
isLoading: isLoadingSelector(),
|
|
@@ -47,3 +47,7 @@ export const VALUE_REACH = 'VALUE_REACH';
|
|
|
47
47
|
export const VALUE_VIDEO_VIEWS = 'VALUE_VIDEO_VIEWS';
|
|
48
48
|
export const VALUE_LINK_CLICKS = 'VALUE_LINK_CLICKS';
|
|
49
49
|
export const VALUE_POST_ENGAGEMENT = 'VALUE_POST_ENGAGEMENT';
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
export const AD_MANAGER = "AD_MANAGER";
|
|
53
|
+
export const CREATIVE = "CREATIVE";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
6
|
import PropTypes from "prop-types";
|
|
7
|
-
import React, { useState, useEffect } from "react";
|
|
7
|
+
import React, { useState, useEffect, useCallback } from "react";
|
|
8
8
|
import { injectIntl, FormattedMessage, intlShape } from "react-intl";
|
|
9
9
|
import {
|
|
10
10
|
CapHeading,
|
|
@@ -15,7 +15,9 @@ import {
|
|
|
15
15
|
CapDrawer,
|
|
16
16
|
CapCustomCard,
|
|
17
17
|
CapIcon,
|
|
18
|
+
CapRadioGroup,
|
|
18
19
|
} from '@capillarytech/cap-ui-library';
|
|
20
|
+
import Templates from '../Templates';
|
|
19
21
|
import { createStructuredSelector } from 'reselect';
|
|
20
22
|
import { connect } from 'react-redux';
|
|
21
23
|
import { bindActionCreators } from 'redux';
|
|
@@ -38,6 +40,8 @@ import {
|
|
|
38
40
|
VALUE_REACH,
|
|
39
41
|
VALUE_VIDEO_VIEWS,
|
|
40
42
|
VALUE_LINK_CLICKS,
|
|
43
|
+
AD_MANAGER,
|
|
44
|
+
CREATIVE,
|
|
41
45
|
} from './constants';
|
|
42
46
|
|
|
43
47
|
const StyledCampaignDetailCapColumn = withStyles(CapColumn, CampaignDetailCapColumn);
|
|
@@ -183,12 +187,23 @@ const Facebook = (props) => {
|
|
|
183
187
|
onCreateComplete,
|
|
184
188
|
params,
|
|
185
189
|
facebookTemplateData,
|
|
190
|
+
messageStrategy,
|
|
191
|
+
router,
|
|
192
|
+
handlePeviewTemplate,
|
|
193
|
+
renderNewCardGrid,
|
|
194
|
+
onSelectTemplate,
|
|
195
|
+
createNew,
|
|
196
|
+
fbAdManger,
|
|
197
|
+
getFormSubscriptionData,
|
|
186
198
|
} = props;
|
|
187
199
|
const {
|
|
188
200
|
selectedMarketingObjective: fbMarketingObjectiveValue = VALUE_REACH,
|
|
189
201
|
} = templateData || {};
|
|
190
202
|
const [isDrawerVisible, setDrawerVisibility] = useState(false);
|
|
191
203
|
const [selectedMarketingObjective, setMarketingObjective] = useState(socialObjective || fbMarketingObjectiveValue);
|
|
204
|
+
const [adManager, setAdManager] = useState(AD_MANAGER);
|
|
205
|
+
const [showTemplateList, setTemplateList] = useState(false);
|
|
206
|
+
|
|
192
207
|
|
|
193
208
|
useEffect(() => {
|
|
194
209
|
if (!isFullMode) {
|
|
@@ -225,131 +240,185 @@ const Facebook = (props) => {
|
|
|
225
240
|
|
|
226
241
|
const onMarketingObjectiveSelect = (value) => setMarketingObjective(value);
|
|
227
242
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
<CapHeading type="h4">
|
|
234
|
-
<FormattedMessage {...messages.fbAccount} />
|
|
235
|
-
</CapHeading>
|
|
236
|
-
<CapHeading type="h3">{accountName}</CapHeading>
|
|
237
|
-
</div>
|
|
243
|
+
const radioOptions = [{
|
|
244
|
+
label: intl.formatMessage(messages.capFbAdManager), value: CREATIVE,
|
|
245
|
+
}, {
|
|
246
|
+
label: intl.formatMessage(messages.fbAdManager), value: AD_MANAGER,
|
|
247
|
+
}];
|
|
238
248
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
</CapHeading>
|
|
243
|
-
<CapLabel type="label1">
|
|
244
|
-
<FormattedMessage
|
|
245
|
-
{...messages.fbAdCampaignSetDetailsDescription}
|
|
246
|
-
/>
|
|
247
|
-
</CapLabel>
|
|
248
|
-
</div>
|
|
249
|
+
const onChangeAdManager = useCallback(({ target: { value } }) => {
|
|
250
|
+
setAdManager(value);
|
|
251
|
+
}, [setAdManager]);
|
|
249
252
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
253
|
+
const onFacebookAdManagerContinue = useCallback(() => {
|
|
254
|
+
if (adManager === AD_MANAGER) {
|
|
255
|
+
onFacebookSubmit({ channel: "FACEBOOK", selectedMarketingObjective, accountId });
|
|
256
|
+
} else {
|
|
257
|
+
setTemplateList(true);
|
|
258
|
+
}
|
|
259
|
+
}, [
|
|
260
|
+
selectedMarketingObjective,
|
|
261
|
+
accountId,
|
|
262
|
+
adManager,
|
|
263
|
+
setAdManager,
|
|
264
|
+
setTemplateList,
|
|
265
|
+
showTemplateList,
|
|
266
|
+
]);
|
|
267
|
+
const query = {type: 'embedded', module: 'library'};
|
|
268
|
+
const location = {pathname: `/FACEBOOK`, search: '', query};
|
|
269
|
+
return (showTemplateList ? (
|
|
270
|
+
<Templates
|
|
271
|
+
key={"FACEBOOK"}
|
|
272
|
+
location={location}
|
|
273
|
+
route={{name: "FACEBOOK"}}
|
|
274
|
+
router={router}
|
|
275
|
+
isFullMode={isFullMode}
|
|
276
|
+
createNew={createNew}
|
|
277
|
+
onSelectTemplate={onSelectTemplate}
|
|
278
|
+
renderNewCardGrid={renderNewCardGrid}
|
|
279
|
+
handlePeviewTemplate={handlePeviewTemplate}
|
|
280
|
+
fbAdManger={CREATIVE}
|
|
281
|
+
/>
|
|
282
|
+
) :
|
|
283
|
+
(!isFullMode && messageStrategy !== "X_ENGAGE" && fbAdManger !== CREATIVE) ?
|
|
284
|
+
(<div className={className}>
|
|
285
|
+
|
|
286
|
+
<div className="is-scrollable-section" >
|
|
287
|
+
<div className="account-details-wrapper">
|
|
288
|
+
<div className="account-name-section">
|
|
289
|
+
<CapHeading type="h4">
|
|
290
|
+
<FormattedMessage {...messages.fbAccount} />
|
|
291
|
+
</CapHeading>
|
|
292
|
+
<CapHeading type="h3">{accountName}</CapHeading>
|
|
293
|
+
</div>
|
|
291
294
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
295
|
+
<div className="account-section-container">
|
|
296
|
+
<CapHeading type="h3">
|
|
297
|
+
<FormattedMessage {...messages.fbAdCampaignSetDetailsTitle} />
|
|
298
|
+
</CapHeading>
|
|
299
|
+
<CapLabel type="label1">
|
|
300
|
+
<FormattedMessage
|
|
301
|
+
{...messages.fbAdCampaignSetDetailsDescription}
|
|
302
|
+
/>
|
|
303
|
+
</CapLabel>
|
|
304
|
+
</div>
|
|
301
305
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
306
|
+
<CapRow span={12} type="flex">
|
|
307
|
+
{campaignDataList.map(({ label, value, onChange }, index) => (
|
|
308
|
+
<StyledCampaignDetailCapColumn
|
|
309
|
+
span={index % 2 === 0 ? 6 : 14}
|
|
310
|
+
key={label}
|
|
311
|
+
>
|
|
312
|
+
<CapRow>
|
|
313
|
+
<CapLabel type="label2">
|
|
314
|
+
<FormattedMessage {...messages[label]} />
|
|
315
|
+
</CapLabel>
|
|
316
|
+
<CapHeading type="h4">
|
|
317
|
+
{value}
|
|
318
|
+
{!socialRemoteCampaignId && onChange && (
|
|
319
|
+
<CapButton
|
|
320
|
+
type="flat"
|
|
321
|
+
className="marketingObjective-change-button facebook-marketing-objective-change"
|
|
322
|
+
onClick={onChange}
|
|
323
|
+
>
|
|
324
|
+
<FormattedMessage {...messages.fbChange} />
|
|
325
|
+
</CapButton>
|
|
326
|
+
)}
|
|
327
|
+
</CapHeading>
|
|
328
|
+
</CapRow>
|
|
329
|
+
</StyledCampaignDetailCapColumn>
|
|
330
|
+
))}
|
|
331
|
+
</CapRow>
|
|
332
|
+
<CapDrawer
|
|
333
|
+
content={
|
|
334
|
+
<MarketingObjective
|
|
335
|
+
selectedMarketingObjective={selectedMarketingObjective}
|
|
336
|
+
onMarketingObjectiveSelect={onMarketingObjectiveSelect}
|
|
337
|
+
defaultmarketingObjective={socialObjective || fbMarketingObjectiveValue}
|
|
338
|
+
onSubmit={setDrawerVisibility}
|
|
339
|
+
marketingObjectiveList={categorizedMarketingObjectiveList}
|
|
314
340
|
/>
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
341
|
+
}
|
|
342
|
+
visible={isDrawerVisible}
|
|
343
|
+
width={380}
|
|
344
|
+
onClose={() => setDrawerVisibility(false)}
|
|
345
|
+
/>
|
|
346
|
+
</div>
|
|
347
|
+
|
|
348
|
+
<div className="ad-section">
|
|
349
|
+
<CapHeading type="h4" style={{marginBottom: 17}}>
|
|
350
|
+
<FormattedMessage
|
|
351
|
+
{...messages.adManagerHeading}
|
|
352
|
+
/>
|
|
353
|
+
</CapHeading>
|
|
354
|
+
<CapRadioGroup
|
|
355
|
+
style={{paddingBottom: '18px'}}
|
|
356
|
+
options={radioOptions}
|
|
357
|
+
onChange={onChangeAdManager}
|
|
358
|
+
value={adManager}
|
|
359
|
+
key={`fb-ad-creatives`}
|
|
360
|
+
/>
|
|
361
|
+
{adManager === AD_MANAGER ? <>
|
|
362
|
+
<div className="account-section-container">
|
|
363
|
+
<CapLabel type="label1">
|
|
364
|
+
<FormattedMessage {...messages.fbAdsDescription} />
|
|
365
|
+
</CapLabel>
|
|
366
|
+
</div>
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
<CapRow span={12} type="flex">
|
|
370
|
+
<CapColumn span={6}>
|
|
371
|
+
<CapCustomCard
|
|
372
|
+
type="Facebook"
|
|
373
|
+
FBDynamicComponent={() => (
|
|
374
|
+
<CapIcon
|
|
375
|
+
size="l"
|
|
376
|
+
type="scenery"
|
|
377
|
+
className="facebook-dynamic-content"
|
|
378
|
+
/>
|
|
379
|
+
)}
|
|
380
|
+
/>
|
|
381
|
+
</CapColumn>
|
|
382
|
+
<CapColumn span={16}>
|
|
383
|
+
<ul className="parameter-list">
|
|
384
|
+
{adSetParameters.map((parameter, index) => (
|
|
385
|
+
<li key={parameter} className="parameter-list-item">
|
|
386
|
+
<CapLabel type="label2" className="parameter-index">
|
|
387
|
+
{index + 1}
|
|
388
|
+
</CapLabel>
|
|
389
|
+
<CapHeading type="h5">
|
|
390
|
+
<FormattedMessage {...messages[parameter]} />
|
|
391
|
+
</CapHeading>
|
|
392
|
+
</li>
|
|
393
|
+
))}
|
|
394
|
+
</ul>
|
|
395
|
+
</CapColumn>
|
|
396
|
+
</CapRow></> : <CapLabel type="label1"><FormattedMessage {...messages.capAdManagerHeading}/></CapLabel>}
|
|
397
|
+
|
|
398
|
+
</div>
|
|
399
|
+
</div>
|
|
400
|
+
<CapButton
|
|
401
|
+
className="facebook-confirm-button"
|
|
402
|
+
type="primary"
|
|
403
|
+
onClick={onFacebookAdManagerContinue}
|
|
404
|
+
>
|
|
405
|
+
<FormattedMessage {...messages.fbContinue} />
|
|
406
|
+
</CapButton>
|
|
407
|
+
</div>
|
|
408
|
+
) :
|
|
409
|
+
<div style={{height: '1200px'}}>
|
|
410
|
+
<Advertisement
|
|
411
|
+
isFullMode={isFullMode}
|
|
412
|
+
actions={facebookActions}
|
|
413
|
+
fbADData={fbADData}
|
|
414
|
+
onCreateComplete={onCreateComplete}
|
|
415
|
+
templateData={templateData}
|
|
416
|
+
params={params}
|
|
417
|
+
facebookTemplateData={facebookTemplateData}
|
|
418
|
+
messageStrategy={messageStrategy}
|
|
419
|
+
getFormSubscriptionData={getFormSubscriptionData}
|
|
420
|
+
/>
|
|
421
|
+
</div>
|
|
353
422
|
);
|
|
354
423
|
};
|
|
355
424
|
|
|
@@ -367,6 +436,8 @@ Facebook.propTypes = {
|
|
|
367
436
|
fbADData: PropTypes.object,
|
|
368
437
|
onCreateComplete: PropTypes.func,
|
|
369
438
|
facebookTemplateData: PropTypes.object,
|
|
439
|
+
messageStrategy: PropTypes.string,
|
|
440
|
+
getFormSubscriptionData: PropTypes.func,
|
|
370
441
|
};
|
|
371
442
|
|
|
372
443
|
Facebook.defaultProps = {
|
|
@@ -42,7 +42,7 @@ export default defineMessages({
|
|
|
42
42
|
},
|
|
43
43
|
fbAdsDescription: {
|
|
44
44
|
id: `${messagePrefix}.fbAdsDescription`,
|
|
45
|
-
defaultMessage: '
|
|
45
|
+
defaultMessage: 'Proceed with empty content block & you can create ads in Facebook Ad Manager under the mentioned ad set.',
|
|
46
46
|
},
|
|
47
47
|
fbAdsDetailOne: {
|
|
48
48
|
id: `${messagePrefix}.fbAdsDetailOne`,
|
|
@@ -56,9 +56,9 @@ export default defineMessages({
|
|
|
56
56
|
id: `${messagePrefix}.fbAdsDetailThree`,
|
|
57
57
|
defaultMessage: 'You can create ads later in Facebook ad manager.',
|
|
58
58
|
},
|
|
59
|
-
|
|
60
|
-
id: `${messagePrefix}.
|
|
61
|
-
defaultMessage: '
|
|
59
|
+
fbContinue: {
|
|
60
|
+
id: `${messagePrefix}.fbContinue`,
|
|
61
|
+
defaultMessage: 'Continue',
|
|
62
62
|
},
|
|
63
63
|
fbChange: {
|
|
64
64
|
id: `${messagePrefix}.fbChange`,
|
|
@@ -164,4 +164,20 @@ export default defineMessages({
|
|
|
164
164
|
id: `${messagePrefix}.fbMarketingObjectiveStoreTrafficDescription`,
|
|
165
165
|
defaultMessage: 'Drive visits to your physical stores by showing ads to people who are nearby.',
|
|
166
166
|
},
|
|
167
|
+
capFbAdManager: {
|
|
168
|
+
id: `${messagePrefix}.capFbAdManager`,
|
|
169
|
+
defaultMessage: 'Capillary Facebook ad manager',
|
|
170
|
+
},
|
|
171
|
+
fbAdManager: {
|
|
172
|
+
id: `${messagePrefix}.fbAdManager`,
|
|
173
|
+
defaultMessage: 'Facebook ad manager',
|
|
174
|
+
},
|
|
175
|
+
adManagerHeading:{
|
|
176
|
+
id: `${messagePrefix}.adManagerHeading`,
|
|
177
|
+
defaultMessage: "Where do you want to create your Facebook ad creative?"
|
|
178
|
+
},
|
|
179
|
+
capAdManagerHeading:{
|
|
180
|
+
id: `${messagePrefix}.capAdManagerHeading`,
|
|
181
|
+
defaultMessage: "You can create Facebook ads creative in Engage+ Facebook ad Manager."
|
|
182
|
+
}
|
|
167
183
|
});
|
|
@@ -1141,7 +1141,11 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
1141
1141
|
let routeParams = {};
|
|
1142
1142
|
timeTracker.startTimer(CHANNEL_CREATE_TRACK_MAPPING[channel]);
|
|
1143
1143
|
if (this.isEnabledInLibraryModule("callCreateFromProps")) {
|
|
1144
|
-
this.props.
|
|
1144
|
+
if (this.props.fbAdManger === "CREATIVE") {
|
|
1145
|
+
this.props.createNew(this.props.fbAdManger);
|
|
1146
|
+
} else{
|
|
1147
|
+
this.props.createNew();
|
|
1148
|
+
}
|
|
1145
1149
|
} else if (ev.key && (ev.key.toLowerCase() === "text" || ev.key.toLowerCase() === "image")) {
|
|
1146
1150
|
routeParams = {
|
|
1147
1151
|
pathname: `/${channel === 'line' ? 'line' : 'mobilepush'}/create/${ev.key.toLowerCase()}`,
|
|
@@ -148,13 +148,14 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
148
148
|
);
|
|
149
149
|
|
|
150
150
|
getFacebookComponent = () => {
|
|
151
|
-
const { messageDetails, cap, onFacebookSubmit,
|
|
151
|
+
const { messageDetails, cap, onFacebookSubmit, messageStrategy } = this.props;
|
|
152
152
|
return (
|
|
153
153
|
<Facebook
|
|
154
154
|
{...this.props}
|
|
155
155
|
messageDetails={messageDetails}
|
|
156
156
|
cap={cap}
|
|
157
157
|
onFacebookSubmit={onFacebookSubmit}
|
|
158
|
+
messageStrategy={messageStrategy}
|
|
158
159
|
/>
|
|
159
160
|
);
|
|
160
161
|
}
|
|
@@ -178,19 +179,21 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
178
179
|
getTemplatesComponent(channel) {
|
|
179
180
|
// const templates = this.props.Templates[`${channel}Templates`];
|
|
180
181
|
let query = {};
|
|
181
|
-
|
|
182
|
+
const {isFullMode, messageStrategy} = this.props;
|
|
183
|
+
if (!isFullMode) {
|
|
182
184
|
query = {type: 'embedded', module: 'library'};
|
|
183
185
|
switch (channel) {
|
|
184
186
|
case 'line':
|
|
185
187
|
return this.getLineComponent();
|
|
186
188
|
case 'ftp':
|
|
187
189
|
return this.getFTPComponent();
|
|
188
|
-
case 'facebook':
|
|
189
|
-
return this.getFacebookComponent();
|
|
190
190
|
default:
|
|
191
191
|
break;
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
+
if (messageStrategy !== "X_ENGAGE" && channel === 'facebook' && !isFullMode) {
|
|
195
|
+
return this.getFacebookComponent();
|
|
196
|
+
}
|
|
194
197
|
const location = {pathname: `/${channel}`, search: '', query};
|
|
195
198
|
switch (channel) {
|
|
196
199
|
case 'call_task':
|
|
@@ -208,6 +211,7 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
208
211
|
onSelectTemplate={(id) => this.props.onSelectTemplate(this.selectTemplate(id))}
|
|
209
212
|
renderNewCardGrid={this.getTemplateDataForGrid}
|
|
210
213
|
handlePeviewTemplate={this.props.handlePeviewTemplate}
|
|
214
|
+
messageStrategy={this.props.messageStrategy}
|
|
211
215
|
/>);
|
|
212
216
|
}
|
|
213
217
|
}
|
|
@@ -287,6 +291,7 @@ TemplatesV2.propTypes = {
|
|
|
287
291
|
cap: PropTypes.object,
|
|
288
292
|
authData: PropTypes.object,
|
|
289
293
|
FTPMode: PropTypes.string,
|
|
294
|
+
messageStrategy: PropTypes.string,
|
|
290
295
|
};
|
|
291
296
|
|
|
292
297
|
TemplatesV2.defaultProps = {
|