@capillarytech/creatives-library 7.6.7 → 7.6.8
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/index.js +3 -3
- package/package.json +1 -1
- package/v2Containers/CreativesContainer/index.js +29 -31
package/index.js
CHANGED
|
@@ -76,8 +76,8 @@ import viberSaga from './v2Containers/Viber/sagas';
|
|
|
76
76
|
import TemplatesV2 from './v2Containers/TemplatesV2/index';
|
|
77
77
|
|
|
78
78
|
import FacebookPreview from './v2Containers/CapFacebookPreview';
|
|
79
|
-
import
|
|
80
|
-
import
|
|
79
|
+
import facebookPreviewReducer from './v2Containers/CapFacebookPreview/reducer';
|
|
80
|
+
import facebookPreviewSaga from './v2Containers/CapFacebookPreview/sagas';
|
|
81
81
|
|
|
82
82
|
import CreativesContainer from './v2Containers/CreativesContainer';
|
|
83
83
|
import CreativesContainerReducer from './v2Containers/CreativesContainer/reducer';
|
|
@@ -105,7 +105,7 @@ const LineCreateContainer = {LineCreate, lineCreateReducer, lineCreateSaga};
|
|
|
105
105
|
const TemplatesV2Container = {TemplatesV2, templateReducer, templateSaga};
|
|
106
106
|
const FacebookContainer = {Facebook, facebookReducer, facebookSaga};
|
|
107
107
|
const ViberContainer = {Viber, viberReducer, viberSaga};
|
|
108
|
-
const FacebookPreviewContainer = { FacebookPreview,
|
|
108
|
+
const FacebookPreviewContainer = { FacebookPreview, facebookPreviewReducer, facebookPreviewSaga };
|
|
109
109
|
|
|
110
110
|
const GalleryContainer = {Gallery, galleryReducer, gallerySagas};
|
|
111
111
|
const FTPContainer = {FTP, FTPReducer, FTPSagas};
|
package/package.json
CHANGED
|
@@ -228,36 +228,36 @@ class Creatives extends React.Component {
|
|
|
228
228
|
}
|
|
229
229
|
case constants.FACEBOOK: {
|
|
230
230
|
if (templateData.fbContentType === "CREATIVE") {
|
|
231
|
-
const {
|
|
231
|
+
const { creativeType, selectedFacebookAccount } = templateData || {};
|
|
232
232
|
const fBContent = templateData.facebookCreativeList;
|
|
233
233
|
const facebookCreativeList = [];
|
|
234
234
|
fBContent.forEach((obj) => {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
235
|
+
const data = cloneDeep(obj);
|
|
236
|
+
const {subType, linkDescription, imageLink, websiteLink, videoId} = obj;
|
|
237
|
+
delete data.linkDescription;
|
|
238
|
+
delete data.websiteLink;
|
|
239
|
+
data.linkDesc = linkDescription;
|
|
240
|
+
data.webSiteLink = websiteLink;
|
|
241
|
+
data.type = creativeType;
|
|
242
|
+
switch (subType) {
|
|
243
|
+
case "IMAGE":
|
|
244
|
+
data.imgSrc = imageLink;
|
|
245
|
+
delete data.imageLink;
|
|
246
|
+
break;
|
|
247
|
+
case "VIDEO":
|
|
248
|
+
data.video = {
|
|
249
|
+
previewImageUrl: imageLink,
|
|
250
|
+
videoId,
|
|
251
|
+
videoSrc: "",
|
|
252
|
+
videoName: "",
|
|
253
|
+
};
|
|
254
|
+
delete data.imageLink;
|
|
255
|
+
break;
|
|
256
|
+
default:
|
|
257
|
+
break;
|
|
258
|
+
}
|
|
259
|
+
facebookCreativeList.push(data);
|
|
260
|
+
});
|
|
261
261
|
creativesTemplateData = {
|
|
262
262
|
versions: {
|
|
263
263
|
base: {
|
|
@@ -269,11 +269,9 @@ class Creatives extends React.Component {
|
|
|
269
269
|
},
|
|
270
270
|
type: "FACEBOOK",
|
|
271
271
|
edit: true,
|
|
272
|
-
selectedFacebookAccount
|
|
273
|
-
accountId,
|
|
274
|
-
},
|
|
272
|
+
selectedFacebookAccount,
|
|
275
273
|
};
|
|
276
|
-
}else {
|
|
274
|
+
} else {
|
|
277
275
|
creativesTemplateData = {
|
|
278
276
|
selectedMarketingObjective: templateData.selectedMarketingObjective,
|
|
279
277
|
edit: true,
|