@capillarytech/creatives-library 7.7.13 → 7.7.15
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/package.json +1 -1
- package/v2Containers/CreativesContainer/SlideBoxContent.js +2 -0
- package/v2Containers/Facebook/Advertisement/index.js +2 -2
- package/v2Containers/Facebook/Advertisement/index.scss +1 -1
- package/v2Containers/Facebook/index.js +15 -4
- package/v2Containers/Templates/_templates.scss +4 -2
- package/v2Containers/Templates/index.js +5 -2
- package/v2Containers/TemplatesV2/index.js +7 -2
package/package.json
CHANGED
|
@@ -578,6 +578,7 @@ function SlideBoxContent(props) {
|
|
|
578
578
|
templateData={templateData}
|
|
579
579
|
messageDetails={messageDetails}
|
|
580
580
|
cap={cap}
|
|
581
|
+
createNew={onCreateNew}
|
|
581
582
|
onFacebookSubmit={onFacebookSubmit}
|
|
582
583
|
onCreateComplete={onCreateComplete}
|
|
583
584
|
isFullMode={isFullMode}
|
|
@@ -586,6 +587,7 @@ function SlideBoxContent(props) {
|
|
|
586
587
|
}}
|
|
587
588
|
getFormSubscriptionData={getFormData}
|
|
588
589
|
fbAdManager={fbAdManager}
|
|
590
|
+
onSelectTemplate={onSelectTemplate}
|
|
589
591
|
/>
|
|
590
592
|
)
|
|
591
593
|
}
|
|
@@ -474,9 +474,9 @@ export const Advertisement = (props) => {
|
|
|
474
474
|
if (webSiteLink === "" || errorMsg.websiteLinkErrorMsg ) {
|
|
475
475
|
flag = true;
|
|
476
476
|
}
|
|
477
|
-
if (
|
|
477
|
+
if (!imageData?.imageSrc && subType === IMAGE) {
|
|
478
478
|
flag = true;
|
|
479
|
-
} else if (
|
|
479
|
+
} else if (!videoData?.videoSrc && subType === VIDEO) {
|
|
480
480
|
flag = true;
|
|
481
481
|
}
|
|
482
482
|
subTypes.push(subType);
|
|
@@ -269,7 +269,11 @@ const Facebook = (props) => {
|
|
|
269
269
|
]);
|
|
270
270
|
const query = {type: 'embedded', module: 'library'};
|
|
271
271
|
const location = {pathname: `/FACEBOOK`, search: '', query};
|
|
272
|
-
|
|
272
|
+
|
|
273
|
+
// fbAdManager ==cretaives only the case for default startegy and user selected "capillary ad manager"
|
|
274
|
+
// below condition (fbAdManager !==CREATIVE) is for edit fb ad manager from campaign
|
|
275
|
+
//-> select capillary ad manager-> select template
|
|
276
|
+
return ((showTemplateList && fbAdManager !==CREATIVE) ? (
|
|
273
277
|
<Templates
|
|
274
278
|
key={"FACEBOOK"}
|
|
275
279
|
location={location}
|
|
@@ -280,11 +284,18 @@ const Facebook = (props) => {
|
|
|
280
284
|
onSelectTemplate={onSelectTemplate}
|
|
281
285
|
renderNewCardGrid={renderNewCardGrid}
|
|
282
286
|
handlePeviewTemplate={handlePeviewTemplate}
|
|
283
|
-
fbAdManager={CREATIVE}
|
|
287
|
+
fbAdManager={CREATIVE} // it means we are selecting capillary ad manager from campaign
|
|
284
288
|
/>
|
|
285
289
|
) :
|
|
286
|
-
(!isFullMode && (fbAdManager !== CREATIVE && messageStrategy === "DEFAULT"
|
|
287
|
-
|
|
290
|
+
(!isFullMode && ((fbAdManager !== CREATIVE && messageStrategy === "DEFAULT")
|
|
291
|
+
|| (templateData?.edit && templateData?.fbContentType !==CREATIVE && fbAdManager !== CREATIVE )) ) ?
|
|
292
|
+
|
|
293
|
+
// not fullmode +
|
|
294
|
+
// default strtaegy and not selected "capillary ad manager" from campaign message +
|
|
295
|
+
//edit template && not coming from campaign message where user selected "capillary ad manager" (means edit "fb ad manager" from campaign) &&
|
|
296
|
+
// & also we are not selecting capillary ad manager from campaign
|
|
297
|
+
|
|
298
|
+
(<div className={className}>
|
|
288
299
|
|
|
289
300
|
<div className="is-scrollable-section" >
|
|
290
301
|
<div className="account-details-wrapper">
|
|
@@ -32,8 +32,7 @@
|
|
|
32
32
|
padding: $CAP_SPACE_16 $CAP_SPACE_12;
|
|
33
33
|
|
|
34
34
|
.ant-card-meta-description {
|
|
35
|
-
height:
|
|
36
|
-
word-wrap: break-word;
|
|
35
|
+
height: 222px;
|
|
37
36
|
}
|
|
38
37
|
}
|
|
39
38
|
|
|
@@ -41,6 +40,9 @@
|
|
|
41
40
|
.ant-card-body {
|
|
42
41
|
padding: $CAP_SPACE_24 0;
|
|
43
42
|
}
|
|
43
|
+
.ant-card-meta-description {
|
|
44
|
+
height: 250px;
|
|
45
|
+
}
|
|
44
46
|
.ant-card-meta {
|
|
45
47
|
padding: 0;
|
|
46
48
|
}
|
|
@@ -1418,7 +1418,11 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
1418
1418
|
}
|
|
1419
1419
|
}
|
|
1420
1420
|
if (this.isEnabledInLibraryModule("callSelectFromProps")) {
|
|
1421
|
-
|
|
1421
|
+
let data =id;
|
|
1422
|
+
if(this.props.fbAdManager){
|
|
1423
|
+
data = this.selectTemplate(id)
|
|
1424
|
+
}
|
|
1425
|
+
this.props.onSelectTemplate(data, this.props.fbAdManager);
|
|
1422
1426
|
} else {
|
|
1423
1427
|
timeTracker.startTimer(CHANNEL_EDIT_TRACK_MAPPING[this.state.channel.toLowerCase()]);
|
|
1424
1428
|
if (this.state.channel.toLowerCase() === 'ebill') {
|
|
@@ -1433,7 +1437,6 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
1433
1437
|
|
|
1434
1438
|
selectTemplate = (id) => find(this.props.TemplatesList, {_id: id})
|
|
1435
1439
|
|
|
1436
|
-
|
|
1437
1440
|
handlePreviewClick(template, modeType) {
|
|
1438
1441
|
this.togglePreview();
|
|
1439
1442
|
const templateInfo = cloneDeep(template);
|
|
@@ -158,7 +158,11 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
158
158
|
);
|
|
159
159
|
|
|
160
160
|
getFacebookComponent = () => {
|
|
161
|
-
const { messageDetails, cap, onFacebookSubmit,
|
|
161
|
+
const { messageDetails, cap, onFacebookSubmit,
|
|
162
|
+
messageStrategy,
|
|
163
|
+
showDisabledFBInfo,
|
|
164
|
+
orgUnitId,
|
|
165
|
+
onSelectTemplate } = this.props;
|
|
162
166
|
return (
|
|
163
167
|
<Facebook
|
|
164
168
|
{...this.props}
|
|
@@ -168,6 +172,7 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
168
172
|
messageStrategy={messageStrategy}
|
|
169
173
|
showDisabledFBInfo={showDisabledFBInfo}
|
|
170
174
|
orgUnitId={orgUnitId}
|
|
175
|
+
onSelectTemplate={onSelectTemplate}
|
|
171
176
|
/>
|
|
172
177
|
);
|
|
173
178
|
}
|
|
@@ -220,7 +225,7 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
|
|
|
220
225
|
router={this.props.router}
|
|
221
226
|
isFullMode={this.props.isFullMode}
|
|
222
227
|
createNew={this.props.createNew}
|
|
223
|
-
onSelectTemplate={this.props.onSelectTemplate}
|
|
228
|
+
onSelectTemplate={(id) => this.props.onSelectTemplate(this.selectTemplate(id))}
|
|
224
229
|
renderNewCardGrid={this.getTemplateDataForGrid}
|
|
225
230
|
handlePeviewTemplate={this.props.handlePeviewTemplate}
|
|
226
231
|
messageStrategy={this.props.messageStrategy}
|