@capillarytech/creatives-library 8.0.321 → 8.0.322
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
CHANGED
|
@@ -743,7 +743,6 @@ export class Creatives extends React.Component {
|
|
|
743
743
|
smsFallBackContent = {},
|
|
744
744
|
creativeName = "",
|
|
745
745
|
channel = constants.RCS,
|
|
746
|
-
accountId = "",
|
|
747
746
|
rcsCardVarMapped,
|
|
748
747
|
} = templateData || {};
|
|
749
748
|
const { isFullMode: isFullModeForRcsPayload } = this.props;
|
|
@@ -785,7 +784,6 @@ export class Creatives extends React.Component {
|
|
|
785
784
|
RCS: {
|
|
786
785
|
rcsContent: {
|
|
787
786
|
...rcsContent,
|
|
788
|
-
...(accountId && !isFullMode && { accountId }),
|
|
789
787
|
cardContent: [
|
|
790
788
|
{
|
|
791
789
|
...cardContent,
|
|
@@ -1237,7 +1235,7 @@ export class Creatives extends React.Component {
|
|
|
1237
1235
|
};
|
|
1238
1236
|
}
|
|
1239
1237
|
break;
|
|
1240
|
-
case constants.FACEBOOK:
|
|
1238
|
+
case constants.FACEBOOK: {
|
|
1241
1239
|
if (template.value) {
|
|
1242
1240
|
const FacebookAd = template?.value?.versions?.base?.content?.FacebookAd;
|
|
1243
1241
|
const { type } = FacebookAd[0];
|
|
@@ -1281,8 +1279,9 @@ export class Creatives extends React.Component {
|
|
|
1281
1279
|
selectedMarketingObjective: template.value.selectedMarketingObjective,
|
|
1282
1280
|
};
|
|
1283
1281
|
}
|
|
1282
|
+
}
|
|
1284
1283
|
break;
|
|
1285
|
-
case constants.RCS:
|
|
1284
|
+
case constants.RCS: {
|
|
1286
1285
|
if (template.value) {
|
|
1287
1286
|
const { isFullMode: isFullModeForRcsConsumerPayload } = this.props;
|
|
1288
1287
|
const { name = "", versions = {} } = template.value || {};
|
|
@@ -1330,7 +1329,6 @@ export class Creatives extends React.Component {
|
|
|
1330
1329
|
contentType = "",
|
|
1331
1330
|
cardType = "",
|
|
1332
1331
|
cardSettings = {},
|
|
1333
|
-
accountId = "",
|
|
1334
1332
|
} = get(versions, 'base.content.RCS.rcsContent', {});
|
|
1335
1333
|
const rootRcsCardVarMappedFromSubmit = get(template, 'value.rcsCardVarMapped');
|
|
1336
1334
|
const firstCardFromSubmit = Array.isArray(cardContentFromSubmit)
|
|
@@ -1360,7 +1358,6 @@ export class Creatives extends React.Component {
|
|
|
1360
1358
|
channel,
|
|
1361
1359
|
creativeName: name,
|
|
1362
1360
|
rcsContent,
|
|
1363
|
-
accountId: accountId,
|
|
1364
1361
|
...(includeRootRcsCardVarMappedOnConsumerPayload
|
|
1365
1362
|
? { rcsCardVarMapped: cardVarMappedFromFirstRcsCard }
|
|
1366
1363
|
: {}),
|
|
@@ -1382,8 +1379,9 @@ export class Creatives extends React.Component {
|
|
|
1382
1379
|
};
|
|
1383
1380
|
}
|
|
1384
1381
|
}
|
|
1382
|
+
}
|
|
1385
1383
|
break;
|
|
1386
|
-
case constants.ZALO:
|
|
1384
|
+
case constants.ZALO: {
|
|
1387
1385
|
if (template.value) {
|
|
1388
1386
|
templateData = {
|
|
1389
1387
|
...template.value,
|
|
@@ -1392,6 +1390,7 @@ export class Creatives extends React.Component {
|
|
|
1392
1390
|
delete templateData.type;
|
|
1393
1391
|
}
|
|
1394
1392
|
}
|
|
1393
|
+
}
|
|
1395
1394
|
break;
|
|
1396
1395
|
case constants.WEBPUSH: {
|
|
1397
1396
|
if (template.value) {
|
|
@@ -257,7 +257,6 @@ export const Rcs = (props) => {
|
|
|
257
257
|
const [accessToken, setAccessToken] = useState('');
|
|
258
258
|
const [hostName, setHostName] = useState('');
|
|
259
259
|
const [accountName, setAccountName] = useState('');
|
|
260
|
-
const [rcsAccount, setRcsAccount] = useState('');
|
|
261
260
|
useEffect(() => {
|
|
262
261
|
const accountObj = accountData.selectedRcsAccount || {};
|
|
263
262
|
if (!isEmpty(accountObj)) {
|
|
@@ -273,14 +272,12 @@ export const Rcs = (props) => {
|
|
|
273
272
|
setAccessToken(configs.accessToken || '');
|
|
274
273
|
setHostName(accountObj.hostName || '');
|
|
275
274
|
setAccountName(accountObj.name || '');
|
|
276
|
-
setRcsAccount(accountObj.id || '');
|
|
277
275
|
} else {
|
|
278
276
|
setAccountId('');
|
|
279
277
|
setWecrmAccountId('');
|
|
280
278
|
setAccessToken('');
|
|
281
279
|
setHostName('');
|
|
282
280
|
setAccountName('');
|
|
283
|
-
setRcsAccount('');
|
|
284
281
|
}
|
|
285
282
|
}, [accountData.selectedRcsAccount]);
|
|
286
283
|
|
|
@@ -748,10 +745,7 @@ export const Rcs = (props) => {
|
|
|
748
745
|
get(details, 'versions.base.content.RCS.rcsContent.cardSettings', '')
|
|
749
746
|
|| get(details, 'rcsContent.cardSettings', '');
|
|
750
747
|
setMediaData(mediaData, mediaType, cardSettings);
|
|
751
|
-
|
|
752
|
-
const rcsAccountId = get(details, 'versions.base.content.RCS.rcsContent.accountId', '');
|
|
753
|
-
setRcsAccount(rcsAccountId);
|
|
754
|
-
}
|
|
748
|
+
|
|
755
749
|
const smsFallbackContent = mergeRcsSmsFallBackContentFromDetails(details);
|
|
756
750
|
const base = get(smsFallbackContent, 'versions.base', {});
|
|
757
751
|
const updatedEditor = base['updated-sms-editor'] ?? base['sms-editor'];
|
|
@@ -1934,7 +1928,6 @@ const onTitleAddVar = () => {
|
|
|
1934
1928
|
content: {
|
|
1935
1929
|
RCS: {
|
|
1936
1930
|
rcsContent: {
|
|
1937
|
-
...(rcsAccount && !isFullMode && { accountId: rcsAccount }),
|
|
1938
1931
|
cardType: STANDALONE,
|
|
1939
1932
|
cardSettings: {
|
|
1940
1933
|
cardOrientation: isMediaTypeImage ? RCS_IMAGE_DIMENSIONS[selectedDimension]?.orientation || VERTICAL : RCS_VIDEO_THUMBNAIL_DIMENSIONS[selectedDimension]?.orientation || VERTICAL,
|