@capillarytech/creatives-library 7.6.4 → 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.
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "7.6.4",
4
+ "version": "7.6.5",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -276,6 +276,25 @@ class Creatives extends React.Component {
276
276
  };
277
277
  break;
278
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
+ }
279
298
  default:
280
299
  break;
281
300
  }
@@ -379,6 +398,8 @@ class Creatives extends React.Component {
379
398
  };
380
399
  }
381
400
  break;
401
+ case constants.FACEBOOK:
402
+ break;
382
403
  default:
383
404
  break;
384
405
  }
@@ -581,8 +602,8 @@ class Creatives extends React.Component {
581
602
  return false;
582
603
  }
583
604
  shouldShowHeader = () => {
584
- const {currentChannel} = this.state;
585
- if (currentChannel === constants.FACEBOOK) {
605
+ const {currentChannel, slidBoxContent} = this.state;
606
+ if (currentChannel.toUpperCase() === constants.FACEBOOK && slidBoxContent === 'createTemplate') {
586
607
  return false;
587
608
  }
588
609
  return true;
@@ -194,6 +194,7 @@ const Facebook = (props) => {
194
194
  onSelectTemplate,
195
195
  createNew,
196
196
  fbAdManger,
197
+ getFormSubscriptionData,
197
198
  } = props;
198
199
  const {
199
200
  selectedMarketingObjective: fbMarketingObjectiveValue = VALUE_REACH,
@@ -347,7 +348,7 @@ const Facebook = (props) => {
347
348
  <div className="ad-section">
348
349
  <CapHeading type="h4" style={{marginBottom: 17}}>
349
350
  <FormattedMessage
350
- {...messages.adManagerHeading}
351
+ {...messages.adManagerHeading}
351
352
  />
352
353
  </CapHeading>
353
354
  <CapRadioGroup
@@ -359,18 +360,18 @@ const Facebook = (props) => {
359
360
  />
360
361
  {adManager === AD_MANAGER ? <>
361
362
  <div className="account-section-container">
362
- <CapLabel type="label1">
363
- <FormattedMessage {...messages.fbAdsDescription} />
364
- </CapLabel>
365
- </div>
363
+ <CapLabel type="label1">
364
+ <FormattedMessage {...messages.fbAdsDescription} />
365
+ </CapLabel>
366
+ </div>
366
367
 
367
368
 
368
369
  <CapRow span={12} type="flex">
369
- <CapColumn span={6}>
370
+ <CapColumn span={6}>
370
371
  <CapCustomCard
371
372
  type="Facebook"
372
373
  FBDynamicComponent={() => (
373
- <CapIcon
374
+ <CapIcon
374
375
  size="l"
375
376
  type="scenery"
376
377
  className="facebook-dynamic-content"
@@ -378,10 +379,10 @@ const Facebook = (props) => {
378
379
  )}
379
380
  />
380
381
  </CapColumn>
381
- <CapColumn span={16}>
382
+ <CapColumn span={16}>
382
383
  <ul className="parameter-list">
383
384
  {adSetParameters.map((parameter, index) => (
384
- <li key={parameter} className="parameter-list-item">
385
+ <li key={parameter} className="parameter-list-item">
385
386
  <CapLabel type="label2" className="parameter-index">
386
387
  {index + 1}
387
388
  </CapLabel>
@@ -392,7 +393,7 @@ const Facebook = (props) => {
392
393
  ))}
393
394
  </ul>
394
395
  </CapColumn>
395
- </CapRow></> : <CapLabel type="label1"><FormattedMessage {...messages.capAdManagerHeading}/></CapLabel>}
396
+ </CapRow></> : <CapLabel type="label1"><FormattedMessage {...messages.capAdManagerHeading}/></CapLabel>}
396
397
 
397
398
  </div>
398
399
  </div>
@@ -406,7 +407,7 @@ const Facebook = (props) => {
406
407
  </div>
407
408
  ) :
408
409
  <div style={{height: '1200px'}}>
409
- <Advertisement
410
+ <Advertisement
410
411
  isFullMode={isFullMode}
411
412
  actions={facebookActions}
412
413
  fbADData={fbADData}
@@ -415,8 +416,9 @@ const Facebook = (props) => {
415
416
  params={params}
416
417
  facebookTemplateData={facebookTemplateData}
417
418
  messageStrategy={messageStrategy}
419
+ getFormSubscriptionData={getFormSubscriptionData}
418
420
  />
419
- </div>
421
+ </div>
420
422
  );
421
423
  };
422
424
 
@@ -435,6 +437,7 @@ Facebook.propTypes = {
435
437
  onCreateComplete: PropTypes.func,
436
438
  facebookTemplateData: PropTypes.object,
437
439
  messageStrategy: PropTypes.string,
440
+ getFormSubscriptionData: PropTypes.func,
438
441
  };
439
442
 
440
443
  Facebook.defaultProps = {