@capillarytech/creatives-library 7.6.2 → 7.6.4
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/components/CapTagList/index.js +5 -5
- package/components/Card/index.js +1 -1
- package/components/Ckeditor/index.js +5 -5
- package/components/CustomPopOver/index.js +3 -3
- package/components/Edmeditor/index.js +4 -4
- package/components/EmailPreview/index.js +1 -1
- package/components/PreviewSideBar/index.js +3 -3
- package/components/Sidebar/index.js +1 -1
- package/components/SmsTest/index.js +4 -4
- package/components/TemplatePreview/index.js +2 -2
- package/components/Toastr/index.js +1 -1
- package/containers/Assets/Gallery/index.js +2 -2
- package/containers/Assets/Gallery/sagas.js +1 -1
- package/containers/Cap/actions.js +2 -2
- package/containers/Cap/reducer.js +1 -1
- package/containers/Cap/sagas.js +3 -3
- package/containers/Cap/selectors.js +1 -1
- package/containers/Ebill/actions.js +1 -1
- package/containers/Ebill/index.js +34 -34
- package/containers/Ebill/sagas.js +3 -3
- package/containers/Email/actions.js +2 -2
- package/containers/Email/index.js +171 -171
- package/containers/Email/reducer.js +1 -1
- package/containers/Email/sagas.js +6 -6
- package/containers/LanguageProvider/actions.js +1 -1
- package/containers/Line/Create/actions.js +5 -5
- package/containers/Line/Create/index.js +37 -37
- package/containers/Line/Create/sagas.js +7 -7
- package/containers/Line/Edit/actions.js +3 -3
- package/containers/Line/Edit/index.js +24 -24
- package/containers/Line/Edit/sagas.js +4 -4
- package/containers/MobilePush/Create/actions.js +2 -2
- package/containers/MobilePush/Create/index.js +35 -35
- package/containers/MobilePush/Create/sagas.js +2 -2
- package/containers/MobilePush/Edit/actions.js +3 -3
- package/containers/MobilePush/Edit/index.js +32 -32
- package/containers/MobilePush/Edit/sagas.js +5 -5
- package/containers/Sms/Create/actions.js +2 -2
- package/containers/Sms/Create/index.js +57 -57
- package/containers/Sms/Create/sagas.js +2 -2
- package/containers/Sms/Edit/actions.js +3 -3
- package/containers/Sms/Edit/index.js +44 -44
- package/containers/Sms/Edit/sagas.js +3 -3
- package/containers/TagList/index.js +9 -9
- package/containers/Templates/actions.js +5 -5
- package/containers/Templates/index.js +44 -44
- package/containers/Templates/sagas.js +5 -5
- package/containers/WeChat/MapTemplates/actions.js +1 -1
- package/containers/WeChat/MapTemplates/index.js +34 -34
- package/containers/WeChat/MapTemplates/sagas.js +2 -2
- package/containers/WeChat/RichmediaTemplates/Create/index.js +9 -9
- package/containers/WeChat/RichmediaTemplates/Edit/actions.js +1 -1
- package/containers/WeChat/RichmediaTemplates/Edit/sagas.js +1 -1
- package/package.json +1 -1
- package/services/api.js +13 -13
- package/utils/authWrapper.js +2 -2
- package/utils/smsCharCount.js +5 -5
- package/v2Components/CapTagList/index.js +1 -1
- package/v2Components/Card/index.js +1 -1
- package/v2Components/Ckeditor/index.js +5 -5
- package/v2Components/CustomPopOver/index.js +3 -3
- package/v2Components/Edmeditor/index.js +4 -4
- package/v2Components/EmailMobilePreview/index.js +4 -4
- package/v2Components/EmailPreviewV2/index.js +4 -4
- package/v2Components/FormBuilder/index.js +3 -3
- package/v2Components/PreviewSideBar/index.js +3 -3
- package/v2Components/SmsTest/index.js +4 -4
- package/v2Components/TemplatePreview/index.js +1 -1
- package/v2Components/Toastr/index.js +1 -1
- package/v2Containers/Assets/Gallery/sagas.js +1 -1
- package/v2Containers/Cap/actions.js +1 -1
- package/v2Containers/Cap/index.js +2 -2
- package/v2Containers/Cap/reducer.js +1 -1
- package/v2Containers/Cap/sagas.js +3 -3
- package/v2Containers/Cap/selectors.js +1 -1
- package/v2Containers/CreativesContainer/SlideBoxContent.js +7 -1
- package/v2Containers/CreativesContainer/index.js +10 -3
- package/v2Containers/Ebill/actions.js +1 -1
- package/v2Containers/Ebill/index.js +34 -34
- package/v2Containers/Ebill/sagas.js +3 -3
- package/v2Containers/Email/reducer.js +1 -1
- package/v2Containers/EmailWrapper/index.js +4 -4
- 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 +189 -121
- package/v2Containers/Facebook/messages.js +20 -4
- package/v2Containers/Facebook/sagas.js +1 -1
- package/v2Containers/LanguageProvider/actions.js +1 -1
- package/v2Containers/Line/Container/actions.js +5 -5
- package/v2Containers/Line/Container/sagas.js +4 -4
- package/v2Containers/MobilePush/Create/actions.js +2 -2
- package/v2Containers/MobilePush/Create/index.js +1 -1
- package/v2Containers/MobilePush/Create/sagas.js +2 -2
- package/v2Containers/MobilePush/Edit/actions.js +3 -3
- package/v2Containers/MobilePush/Edit/index.js +26 -26
- package/v2Containers/MobilePush/Edit/sagas.js +5 -5
- package/v2Containers/Sms/Create/index.js +4 -4
- package/v2Containers/TagList/index.js +6 -6
- package/v2Containers/Templates/actions.js +5 -5
- package/v2Containers/Templates/index.js +6 -2
- package/v2Containers/Templates/sagas.js +4 -4
- package/v2Containers/TemplatesV2/index.js +9 -4
- package/v2Containers/Viber/actions.js +2 -2
- package/v2Containers/Viber/sagas.js +2 -2
- package/v2Containers/WeChat/MapTemplates/actions.js +1 -1
- package/v2Containers/WeChat/MapTemplates/index.js +19 -19
- package/v2Containers/WeChat/MapTemplates/sagas.js +3 -3
- package/v2Containers/WeChat/RichmediaTemplates/Create/actions.js +1 -1
- package/v2Containers/WeChat/RichmediaTemplates/Edit/actions.js +1 -1
- package/v2Containers/WeChat/RichmediaTemplates/Edit/sagas.js +1 -1
- package/assets/DeviceForEmail.png +0 -0
|
@@ -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,22 @@ 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,
|
|
186
197
|
} = props;
|
|
187
198
|
const {
|
|
188
199
|
selectedMarketingObjective: fbMarketingObjectiveValue = VALUE_REACH,
|
|
189
200
|
} = templateData || {};
|
|
190
201
|
const [isDrawerVisible, setDrawerVisibility] = useState(false);
|
|
191
202
|
const [selectedMarketingObjective, setMarketingObjective] = useState(socialObjective || fbMarketingObjectiveValue);
|
|
203
|
+
const [adManager, setAdManager] = useState(AD_MANAGER);
|
|
204
|
+
const [showTemplateList, setTemplateList] = useState(false);
|
|
205
|
+
|
|
192
206
|
|
|
193
207
|
useEffect(() => {
|
|
194
208
|
if (!isFullMode) {
|
|
@@ -225,131 +239,184 @@ const Facebook = (props) => {
|
|
|
225
239
|
|
|
226
240
|
const onMarketingObjectiveSelect = (value) => setMarketingObjective(value);
|
|
227
241
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
<CapHeading type="h4">
|
|
234
|
-
<FormattedMessage {...messages.fbAccount} />
|
|
235
|
-
</CapHeading>
|
|
236
|
-
<CapHeading type="h3">{accountName}</CapHeading>
|
|
237
|
-
</div>
|
|
242
|
+
const radioOptions = [{
|
|
243
|
+
label: intl.formatMessage(messages.capFbAdManager), value: CREATIVE,
|
|
244
|
+
}, {
|
|
245
|
+
label: intl.formatMessage(messages.fbAdManager), value: AD_MANAGER,
|
|
246
|
+
}];
|
|
238
247
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
</CapHeading>
|
|
243
|
-
<CapLabel type="label1">
|
|
244
|
-
<FormattedMessage
|
|
245
|
-
{...messages.fbAdCampaignSetDetailsDescription}
|
|
246
|
-
/>
|
|
247
|
-
</CapLabel>
|
|
248
|
-
</div>
|
|
248
|
+
const onChangeAdManager = useCallback(({ target: { value } }) => {
|
|
249
|
+
setAdManager(value);
|
|
250
|
+
}, [setAdManager]);
|
|
249
251
|
|
|
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
|
-
|
|
252
|
+
const onFacebookAdManagerContinue = useCallback(() => {
|
|
253
|
+
if (adManager === AD_MANAGER) {
|
|
254
|
+
onFacebookSubmit({ channel: "FACEBOOK", selectedMarketingObjective, accountId });
|
|
255
|
+
} else {
|
|
256
|
+
setTemplateList(true);
|
|
257
|
+
}
|
|
258
|
+
}, [
|
|
259
|
+
selectedMarketingObjective,
|
|
260
|
+
accountId,
|
|
261
|
+
adManager,
|
|
262
|
+
setAdManager,
|
|
263
|
+
setTemplateList,
|
|
264
|
+
showTemplateList,
|
|
265
|
+
]);
|
|
266
|
+
const query = {type: 'embedded', module: 'library'};
|
|
267
|
+
const location = {pathname: `/FACEBOOK`, search: '', query};
|
|
268
|
+
return (showTemplateList ? (
|
|
269
|
+
<Templates
|
|
270
|
+
key={"FACEBOOK"}
|
|
271
|
+
location={location}
|
|
272
|
+
route={{name: "FACEBOOK"}}
|
|
273
|
+
router={router}
|
|
274
|
+
isFullMode={isFullMode}
|
|
275
|
+
createNew={createNew}
|
|
276
|
+
onSelectTemplate={onSelectTemplate}
|
|
277
|
+
renderNewCardGrid={renderNewCardGrid}
|
|
278
|
+
handlePeviewTemplate={handlePeviewTemplate}
|
|
279
|
+
fbAdManger={CREATIVE}
|
|
280
|
+
/>
|
|
281
|
+
) :
|
|
282
|
+
(!isFullMode && messageStrategy !== "X_ENGAGE" && fbAdManger !== CREATIVE) ?
|
|
283
|
+
(<div className={className}>
|
|
284
|
+
|
|
285
|
+
<div className="is-scrollable-section" >
|
|
286
|
+
<div className="account-details-wrapper">
|
|
287
|
+
<div className="account-name-section">
|
|
288
|
+
<CapHeading type="h4">
|
|
289
|
+
<FormattedMessage {...messages.fbAccount} />
|
|
290
|
+
</CapHeading>
|
|
291
|
+
<CapHeading type="h3">{accountName}</CapHeading>
|
|
292
|
+
</div>
|
|
291
293
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
294
|
+
<div className="account-section-container">
|
|
295
|
+
<CapHeading type="h3">
|
|
296
|
+
<FormattedMessage {...messages.fbAdCampaignSetDetailsTitle} />
|
|
297
|
+
</CapHeading>
|
|
298
|
+
<CapLabel type="label1">
|
|
299
|
+
<FormattedMessage
|
|
300
|
+
{...messages.fbAdCampaignSetDetailsDescription}
|
|
301
|
+
/>
|
|
302
|
+
</CapLabel>
|
|
303
|
+
</div>
|
|
301
304
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
305
|
+
<CapRow span={12} type="flex">
|
|
306
|
+
{campaignDataList.map(({ label, value, onChange }, index) => (
|
|
307
|
+
<StyledCampaignDetailCapColumn
|
|
308
|
+
span={index % 2 === 0 ? 6 : 14}
|
|
309
|
+
key={label}
|
|
310
|
+
>
|
|
311
|
+
<CapRow>
|
|
312
|
+
<CapLabel type="label2">
|
|
313
|
+
<FormattedMessage {...messages[label]} />
|
|
314
|
+
</CapLabel>
|
|
315
|
+
<CapHeading type="h4">
|
|
316
|
+
{value}
|
|
317
|
+
{!socialRemoteCampaignId && onChange && (
|
|
318
|
+
<CapButton
|
|
319
|
+
type="flat"
|
|
320
|
+
className="marketingObjective-change-button facebook-marketing-objective-change"
|
|
321
|
+
onClick={onChange}
|
|
322
|
+
>
|
|
323
|
+
<FormattedMessage {...messages.fbChange} />
|
|
324
|
+
</CapButton>
|
|
325
|
+
)}
|
|
326
|
+
</CapHeading>
|
|
327
|
+
</CapRow>
|
|
328
|
+
</StyledCampaignDetailCapColumn>
|
|
329
|
+
))}
|
|
330
|
+
</CapRow>
|
|
331
|
+
<CapDrawer
|
|
332
|
+
content={
|
|
333
|
+
<MarketingObjective
|
|
334
|
+
selectedMarketingObjective={selectedMarketingObjective}
|
|
335
|
+
onMarketingObjectiveSelect={onMarketingObjectiveSelect}
|
|
336
|
+
defaultmarketingObjective={socialObjective || fbMarketingObjectiveValue}
|
|
337
|
+
onSubmit={setDrawerVisibility}
|
|
338
|
+
marketingObjectiveList={categorizedMarketingObjectiveList}
|
|
314
339
|
/>
|
|
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
|
-
|
|
340
|
+
}
|
|
341
|
+
visible={isDrawerVisible}
|
|
342
|
+
width={380}
|
|
343
|
+
onClose={() => setDrawerVisibility(false)}
|
|
344
|
+
/>
|
|
345
|
+
</div>
|
|
346
|
+
|
|
347
|
+
<div className="ad-section">
|
|
348
|
+
<CapHeading type="h4" style={{marginBottom: 17}}>
|
|
349
|
+
<FormattedMessage
|
|
350
|
+
{...messages.adManagerHeading}
|
|
351
|
+
/>
|
|
352
|
+
</CapHeading>
|
|
353
|
+
<CapRadioGroup
|
|
354
|
+
style={{paddingBottom: '18px'}}
|
|
355
|
+
options={radioOptions}
|
|
356
|
+
onChange={onChangeAdManager}
|
|
357
|
+
value={adManager}
|
|
358
|
+
key={`fb-ad-creatives`}
|
|
359
|
+
/>
|
|
360
|
+
{adManager === AD_MANAGER ? <>
|
|
361
|
+
<div className="account-section-container">
|
|
362
|
+
<CapLabel type="label1">
|
|
363
|
+
<FormattedMessage {...messages.fbAdsDescription} />
|
|
364
|
+
</CapLabel>
|
|
365
|
+
</div>
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
<CapRow span={12} type="flex">
|
|
369
|
+
<CapColumn span={6}>
|
|
370
|
+
<CapCustomCard
|
|
371
|
+
type="Facebook"
|
|
372
|
+
FBDynamicComponent={() => (
|
|
373
|
+
<CapIcon
|
|
374
|
+
size="l"
|
|
375
|
+
type="scenery"
|
|
376
|
+
className="facebook-dynamic-content"
|
|
377
|
+
/>
|
|
378
|
+
)}
|
|
379
|
+
/>
|
|
380
|
+
</CapColumn>
|
|
381
|
+
<CapColumn span={16}>
|
|
382
|
+
<ul className="parameter-list">
|
|
383
|
+
{adSetParameters.map((parameter, index) => (
|
|
384
|
+
<li key={parameter} className="parameter-list-item">
|
|
385
|
+
<CapLabel type="label2" className="parameter-index">
|
|
386
|
+
{index + 1}
|
|
387
|
+
</CapLabel>
|
|
388
|
+
<CapHeading type="h5">
|
|
389
|
+
<FormattedMessage {...messages[parameter]} />
|
|
390
|
+
</CapHeading>
|
|
391
|
+
</li>
|
|
392
|
+
))}
|
|
393
|
+
</ul>
|
|
394
|
+
</CapColumn>
|
|
395
|
+
</CapRow></> : <CapLabel type="label1"><FormattedMessage {...messages.capAdManagerHeading}/></CapLabel>}
|
|
396
|
+
|
|
397
|
+
</div>
|
|
398
|
+
</div>
|
|
399
|
+
<CapButton
|
|
400
|
+
className="facebook-confirm-button"
|
|
401
|
+
type="primary"
|
|
402
|
+
onClick={onFacebookAdManagerContinue}
|
|
403
|
+
>
|
|
404
|
+
<FormattedMessage {...messages.fbContinue} />
|
|
405
|
+
</CapButton>
|
|
406
|
+
</div>
|
|
407
|
+
) :
|
|
408
|
+
<div style={{height: '1200px'}}>
|
|
409
|
+
<Advertisement
|
|
410
|
+
isFullMode={isFullMode}
|
|
411
|
+
actions={facebookActions}
|
|
412
|
+
fbADData={fbADData}
|
|
413
|
+
onCreateComplete={onCreateComplete}
|
|
414
|
+
templateData={templateData}
|
|
415
|
+
params={params}
|
|
416
|
+
facebookTemplateData={facebookTemplateData}
|
|
417
|
+
messageStrategy={messageStrategy}
|
|
418
|
+
/>
|
|
419
|
+
</div>
|
|
353
420
|
);
|
|
354
421
|
};
|
|
355
422
|
|
|
@@ -367,6 +434,7 @@ Facebook.propTypes = {
|
|
|
367
434
|
fbADData: PropTypes.object,
|
|
368
435
|
onCreateComplete: PropTypes.func,
|
|
369
436
|
facebookTemplateData: PropTypes.object,
|
|
437
|
+
messageStrategy: PropTypes.string,
|
|
370
438
|
};
|
|
371
439
|
|
|
372
440
|
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
|
});
|
|
@@ -76,7 +76,7 @@ export function* uploadFbAdAsset(file, assetType, fileParams) {
|
|
|
76
76
|
}
|
|
77
77
|
if (result.status.isError) {
|
|
78
78
|
yield put({ type: UPLOAD_FB_AD_ASSET_FAILURE, error: result.status.message });
|
|
79
|
-
} else if (videoIdResponse.status
|
|
79
|
+
} else if (videoIdResponse.status.isError) {
|
|
80
80
|
yield put({ type: UPLOAD_FB_AD_ASSET_FAILURE, error: result.status });
|
|
81
81
|
} else {
|
|
82
82
|
yield put({
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import * as types from './constants';
|
|
8
8
|
|
|
9
9
|
export function createTemplate(template, callback) {
|
|
10
|
-
|
|
10
|
+
console.log('action trigereed createtemplate');
|
|
11
11
|
return {
|
|
12
12
|
type: types.CREATE_TEMPLATE_REQUEST,
|
|
13
13
|
template,
|
|
@@ -16,7 +16,7 @@ export function createTemplate(template, callback) {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export function clearCreateResponse() {
|
|
19
|
-
|
|
19
|
+
console.log('clearCreateResponse');
|
|
20
20
|
return {
|
|
21
21
|
type: types.CLEAR_CREATE_RESPONSE_REQUEST,
|
|
22
22
|
};
|
|
@@ -50,7 +50,7 @@ export function clearAsset(templateType) {
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
export function editTemplate(template, callback) {
|
|
53
|
-
|
|
53
|
+
console.log('action trigereed editTemplate line @@@');
|
|
54
54
|
return {
|
|
55
55
|
type: types.EDIT_TEMPLATE_REQUEST,
|
|
56
56
|
template,
|
|
@@ -59,7 +59,7 @@ export function editTemplate(template, callback) {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
export function getTemplateDetails(id, callback) {
|
|
62
|
-
|
|
62
|
+
console.log('getting template line @@@', id);
|
|
63
63
|
return {
|
|
64
64
|
type: types.GET_TEMPLATE_DETAILS_REQUEST,
|
|
65
65
|
id,
|
|
@@ -69,7 +69,7 @@ export function getTemplateDetails(id, callback) {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
export function clearEditResponse() {
|
|
72
|
-
|
|
72
|
+
console.log('clearEditResponse');
|
|
73
73
|
return {
|
|
74
74
|
type: types.CLEAR_EDIT_RESPONSE_REQUEST,
|
|
75
75
|
};
|
|
@@ -34,13 +34,13 @@ export function* uploadAsset(file, assetType, fileParams ) {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
function* watchCreateTemplate() {
|
|
37
|
-
|
|
37
|
+
console.log('inside watch line saga createTemplate@@@');
|
|
38
38
|
const watcher = yield takeLatest(types.CREATE_TEMPLATE_REQUEST, createTemplate);
|
|
39
39
|
yield take(LOCATION_CHANGE);
|
|
40
40
|
yield cancel(watcher);
|
|
41
41
|
}
|
|
42
42
|
function* watchUploadAsset() {
|
|
43
|
-
|
|
43
|
+
console.log("inside watchUploadAsset");
|
|
44
44
|
const watcher = yield takeLatest(types.UPLOAD_ASSET_REQUEST, uploadAsset);
|
|
45
45
|
yield take(LOCATION_CHANGE);
|
|
46
46
|
yield cancel(watcher);
|
|
@@ -70,7 +70,7 @@ export function* editTemplate({ template, callback }) {
|
|
|
70
70
|
|
|
71
71
|
export function* getTemplateDetails(id) {
|
|
72
72
|
try {
|
|
73
|
-
|
|
73
|
+
console.log('saga get Template details line', id);
|
|
74
74
|
const result = yield call(Api.getTemplateDetails, id);
|
|
75
75
|
// const sidebar = result.response.sidebar;
|
|
76
76
|
yield put({ type: types.GET_TEMPLATE_DETAILS_SUCCESS, data: result.response });
|
|
@@ -84,7 +84,7 @@ export function* getTemplateDetails(id) {
|
|
|
84
84
|
|
|
85
85
|
export function* getLineTemplatesList(params) {
|
|
86
86
|
try {
|
|
87
|
-
|
|
87
|
+
console.log('Saga param line ', params.channel, params.queryParams);
|
|
88
88
|
const result = yield call(Api.getAllTemplates, {channel: params.channel, queryParams: params.queryParams});
|
|
89
89
|
yield put({ type: types.GET_LINE_TEMPLATES_LIST_SUCCESS, data: result.response.templates, templateData: result.response.mapped});
|
|
90
90
|
} catch (error) {
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
import * as types from './constants';
|
|
8
8
|
|
|
9
9
|
export function createTemplate(template, callback) {
|
|
10
|
-
|
|
10
|
+
console.log('action trigereed createtemplate');
|
|
11
11
|
return {
|
|
12
12
|
type: types.CREATE_TEMPLATE_REQUEST, template, callback,
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export function clearCreateResponse() {
|
|
17
|
-
|
|
17
|
+
console.log('clearCreateResponse');
|
|
18
18
|
return {
|
|
19
19
|
type: types.CLEAR_CREATE_RESPONSE_REQUEST,
|
|
20
20
|
};
|
|
@@ -9,7 +9,7 @@ import * as types from './constants';
|
|
|
9
9
|
export function* createTemplate(template) {
|
|
10
10
|
let errorMsg;
|
|
11
11
|
try {
|
|
12
|
-
|
|
12
|
+
console.log('saga createTemplate mobilepush', template);
|
|
13
13
|
const result = yield call(Api.createMobilePushTemplate, template);
|
|
14
14
|
if (result.message) {
|
|
15
15
|
errorMsg = result.message;
|
|
@@ -43,7 +43,7 @@ export function* getIosCtas(licenseCode) {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
function* watchCreateTemplate() {
|
|
46
|
-
|
|
46
|
+
console.log('inside watch');
|
|
47
47
|
const watcher = yield takeLatest(types.CREATE_TEMPLATE_REQUEST, createTemplate);
|
|
48
48
|
yield take(LOCATION_CHANGE);
|
|
49
49
|
yield cancel(watcher);
|
|
@@ -14,14 +14,14 @@ export function defaultAction() {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export function editTemplate(template, callback) {
|
|
17
|
-
|
|
17
|
+
console.log('action trigereed');
|
|
18
18
|
return {
|
|
19
19
|
type: types.EDIT_TEMPLATE_REQUEST, template, callback,
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export function getTemplateDetails(id) {
|
|
24
|
-
|
|
24
|
+
console.log('getting template', id);
|
|
25
25
|
return {
|
|
26
26
|
type: types.GET_TEMPLATE_DETAILS_REQUEST, id,
|
|
27
27
|
};
|
|
@@ -41,7 +41,7 @@ export function uploadAsset(file, assetType, fileParams, mode) {
|
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
export function clearEditResponse() {
|
|
44
|
-
|
|
44
|
+
console.log('clearEditResponse');
|
|
45
45
|
return {
|
|
46
46
|
type: types.CLEAR_EDIT_RESPONSE_REQUEST,
|
|
47
47
|
};
|