@capillarytech/creatives-library 2.0.64 → 2.0.65
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.
|
@@ -420,6 +420,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
420
420
|
return undefined;
|
|
421
421
|
}).filter((custom) => custom),
|
|
422
422
|
};
|
|
423
|
+
obj.name = isEmpty(obj.name) ? android['message-title'] : obj.name;
|
|
423
424
|
}
|
|
424
425
|
if (android['cta-deeplink'] && android['cta-deeplink'] !== "") {
|
|
425
426
|
obj.versions.base.ANDROID.cta = {
|
|
@@ -452,6 +453,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
452
453
|
return undefined;
|
|
453
454
|
}).filter((custom) => custom),
|
|
454
455
|
};
|
|
456
|
+
obj.name = isEmpty(obj.name) ? ios['message-title2'] : obj.name;
|
|
455
457
|
}
|
|
456
458
|
if (ios['cta-deeplink2'] && ios['cta-deeplink2'] !== "") {
|
|
457
459
|
obj.versions.base.IOS.cta = {
|
|
@@ -560,6 +562,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
560
562
|
}
|
|
561
563
|
if (secondaryCtaIos) {
|
|
562
564
|
obj.versions.base.IOS.expandableDetails.ctas = [];
|
|
565
|
+
const templateCtaId = get(this.state, "templateCta.ctaTemplateDetails[0].id");
|
|
563
566
|
const cta = {
|
|
564
567
|
actionText: ios['secondary-cta-1-label'],
|
|
565
568
|
actionLabel: ios['secondary-cta-1-action'],
|
|
@@ -567,7 +570,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
567
570
|
type: ios['cta-deeplink-secondary-cta-1'] && (ios['cta-deeplink-secondary-cta-1'].toLowerCase() === "deeplink" ? "DEEP_LINK" : "EXTERNAL_URL"),
|
|
568
571
|
actionLink: ios['cta-deeplink-secondary-cta-1'] && (ios['cta-deeplink-secondary-cta-1'].toLowerCase() === "deeplink" ? (ios['cta-deeplink-secondary-cta-1-select2'] || ios['cta-deeplink-secondary-cta-1-select']) : ios['cta-deeplink-secondary-cta-1-text']),
|
|
569
572
|
ioscdeepLinkName: this.getLinkName(ios['cta-deeplink-secondary-cta-1-select']),
|
|
570
|
-
templateCtaId
|
|
573
|
+
templateCtaId,
|
|
571
574
|
};
|
|
572
575
|
if (this.props.location.query.type === 'embedded') {
|
|
573
576
|
delete cta.ioscdeepLinkName;
|
|
@@ -547,6 +547,8 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
547
547
|
|
|
548
548
|
if (secondaryCtaIos) {
|
|
549
549
|
obj.versions.base.IOS.expandableDetails.ctas = [];
|
|
550
|
+
const templateCtaId = get(this.state, "templateCta.ctaTemplateDetails[0].id");
|
|
551
|
+
|
|
550
552
|
const cta = {
|
|
551
553
|
actionText: ios['secondary-cta-1-label'],
|
|
552
554
|
actionLabel: ios['secondary-cta-1-action'],
|
|
@@ -554,7 +556,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
554
556
|
type: ios['cta-deeplink-secondary-cta-1'] && (ios['cta-deeplink-secondary-cta-1'].toLowerCase() === "deeplink" ? "DEEP_LINK" : "EXTERNAL_URL"),
|
|
555
557
|
actionLink: ios['cta-deeplink-secondary-cta-1'] && (ios['cta-deeplink-secondary-cta-1'].toLowerCase() === "deeplink" ? ios['cta-deeplink-secondary-cta-1-select2'] : ios['cta-deeplink-secondary-cta-1-text2']),
|
|
556
558
|
ioscdeepLinkName: this.getLinkName(ios['cta-deeplink-secondary-cta-1-select']),
|
|
557
|
-
templateCtaId
|
|
559
|
+
templateCtaId,
|
|
558
560
|
};
|
|
559
561
|
if (this.props.location.query.type === 'embedded') {
|
|
560
562
|
delete cta.ioscdeepLinkName;
|
|
@@ -470,6 +470,8 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
470
470
|
templateData.content = template.versions.base['sms-editor'];
|
|
471
471
|
} else if (currentChannel === "EMAIL") {
|
|
472
472
|
templateData.url = template.versions.base.preview_http_url;
|
|
473
|
+
} else if (currentChannel === "MOBILEPUSH" && template.type === "MOBILEPUSH") {
|
|
474
|
+
templateData.content = template;
|
|
473
475
|
}
|
|
474
476
|
return templateData;
|
|
475
477
|
});
|