@capillarytech/creatives-library 8.0.316 → 8.0.317
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
|
@@ -762,6 +762,7 @@ export class Creatives extends React.Component {
|
|
|
762
762
|
smsFallBackContent = {},
|
|
763
763
|
creativeName = "",
|
|
764
764
|
channel = constants.RCS,
|
|
765
|
+
accountId = "",
|
|
765
766
|
} = templateData || {};
|
|
766
767
|
const cardContent = (rcsContent.cardContent && rcsContent.cardContent[0]) || {};
|
|
767
768
|
const Status = RCS_STATUSES.approved || '';
|
|
@@ -775,6 +776,7 @@ export class Creatives extends React.Component {
|
|
|
775
776
|
content: {
|
|
776
777
|
RCS: {
|
|
777
778
|
rcsContent: {
|
|
779
|
+
...(accountId && !isFullMode && { accountId }),
|
|
778
780
|
...rcsContent,
|
|
779
781
|
cardContent: [
|
|
780
782
|
{
|
|
@@ -1279,6 +1281,7 @@ export class Creatives extends React.Component {
|
|
|
1279
1281
|
contentType = "",
|
|
1280
1282
|
cardType = "",
|
|
1281
1283
|
cardSettings = {},
|
|
1284
|
+
accountId = "",
|
|
1282
1285
|
} = get(versions, 'base.content.RCS.rcsContent', {});
|
|
1283
1286
|
const rcsContent = {
|
|
1284
1287
|
contentType,
|
|
@@ -1290,6 +1293,7 @@ export class Creatives extends React.Component {
|
|
|
1290
1293
|
channel,
|
|
1291
1294
|
creativeName: name,
|
|
1292
1295
|
rcsContent,
|
|
1296
|
+
accountId: accountId,
|
|
1293
1297
|
};
|
|
1294
1298
|
}
|
|
1295
1299
|
}
|
|
@@ -300,6 +300,7 @@ export const Rcs = (props) => {
|
|
|
300
300
|
const [accessToken, setAccessToken] = useState('');
|
|
301
301
|
const [hostName, setHostName] = useState('');
|
|
302
302
|
const [accountName, setAccountName] = useState('');
|
|
303
|
+
const [rcsAccount, setRcsAccount] = useState('');
|
|
303
304
|
useEffect(() => {
|
|
304
305
|
const accountObj = accountData.selectedRcsAccount || {};
|
|
305
306
|
if (!isEmpty(accountObj)) {
|
|
@@ -312,6 +313,7 @@ export const Rcs = (props) => {
|
|
|
312
313
|
setAccessToken(configs.accessToken || '');
|
|
313
314
|
setHostName(accountObj.hostName || '');
|
|
314
315
|
setAccountName(accountObj.name || '');
|
|
316
|
+
setRcsAccount(accountObj.id || '');
|
|
315
317
|
}
|
|
316
318
|
}, [accountData.selectedRcsAccount]);
|
|
317
319
|
|
|
@@ -606,6 +608,8 @@ export const Rcs = (props) => {
|
|
|
606
608
|
const mediaData = get(details, 'versions.base.content.RCS.rcsContent.cardContent[0].media', '');
|
|
607
609
|
const cardSettings = get(details, 'versions.base.content.RCS.rcsContent.cardSettings', '');
|
|
608
610
|
setMediaData(mediaData, mediaType, cardSettings);
|
|
611
|
+
const rcsAccountId = get(details, 'versions.base.content.RCS.rcsContent.accountId', '');
|
|
612
|
+
setRcsAccount(rcsAccountId);
|
|
609
613
|
}
|
|
610
614
|
}, [rcsData, templateData, isFullMode, isEditFlow]);
|
|
611
615
|
|
|
@@ -1961,6 +1965,7 @@ const splitTemplateVarString = (str) => {
|
|
|
1961
1965
|
content: {
|
|
1962
1966
|
RCS: {
|
|
1963
1967
|
rcsContent: {
|
|
1968
|
+
...(rcsAccount && !isFullMode && { accountId: rcsAccount }),
|
|
1964
1969
|
cardType: STANDALONE,
|
|
1965
1970
|
cardSettings: {
|
|
1966
1971
|
cardOrientation: isMediaTypeImage ? RCS_IMAGE_DIMENSIONS[selectedDimension]?.orientation || VERTICAL : RCS_VIDEO_THUMBNAIL_DIMENSIONS[selectedDimension]?.orientation || VERTICAL,
|