@capillarytech/creatives-library 9.0.53-alpha.3 → 9.0.54-0
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/.vscode/settings.json +3 -0
- package/constants/unified.js +1 -0
- package/package.json +1 -1
- package/services/api.js +0 -9
- package/utils/common.js +4 -0
- package/v2Components/CommonTestAndPreview/UnifiedPreview/ViberCarouselPreviewCards.js +127 -0
- package/v2Components/CommonTestAndPreview/UnifiedPreview/ViberPreviewContent.js +106 -15
- package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +139 -1
- package/v2Components/CommonTestAndPreview/UnifiedPreview/_viberCarouselPreviewCards.scss +133 -0
- package/v2Components/CommonTestAndPreview/constants.js +2 -0
- package/v2Components/CommonTestAndPreview/index.js +243 -26
- package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/ViberPreviewContent.test.js +364 -0
- package/v2Components/CommonTestAndPreview/tests/utils.test.js +49 -0
- package/v2Components/CommonTestAndPreview/utils.js +20 -0
- package/v2Containers/CommunicationFlow/CommunicationFlow.js +58 -93
- package/v2Containers/CommunicationFlow/CommunicationFlowCard.js +4 -20
- package/v2Containers/CommunicationFlow/Tests/CommunicationFlow.test.js +49 -194
- package/v2Containers/CommunicationFlow/Tests/CommunicationFlowCard.test.js +0 -16
- package/v2Containers/CommunicationFlow/constants.js +0 -47
- package/v2Containers/CommunicationFlow/index.js +20 -15
- package/v2Containers/CommunicationFlow/messages.js +0 -4
- package/v2Containers/CreativesContainer/index.js +2 -0
- package/v2Containers/Rcs/constants.js +1 -0
- package/v2Containers/Rcs/index.js +9 -1
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +108 -0
- package/v2Containers/Rcs/tests/index.test.js +121 -0
- package/v2Containers/Templates/_templates.scss +179 -1
- package/v2Containers/Templates/index.js +120 -10
- package/v2Containers/Viber/constants.js +23 -0
- package/v2Containers/Viber/index.js +718 -43
- package/v2Containers/Viber/index.scss +175 -0
- package/v2Containers/Viber/messages.js +121 -0
- package/v2Containers/Viber/tests/index.test.js +80 -0
|
@@ -358,6 +358,8 @@ export const Rcs = (props) => {
|
|
|
358
358
|
const [accessToken, setAccessToken] = useState('');
|
|
359
359
|
const [hostName, setHostName] = useState('');
|
|
360
360
|
const [accountName, setAccountName] = useState('');
|
|
361
|
+
const [botId, setBotId] = useState('');
|
|
362
|
+
const [vfTemplateId, setVfTemplateId] = useState('');
|
|
361
363
|
const isHostInfoBip = hostName === HOST_INFOBIP;
|
|
362
364
|
const isHostIcs = hostName === HOST_ICS;
|
|
363
365
|
|
|
@@ -381,12 +383,14 @@ export const Rcs = (props) => {
|
|
|
381
383
|
setHostName(accountObj.hostName || '');
|
|
382
384
|
setAccountName(accountObj.name || '');
|
|
383
385
|
setRcsAccount(accountObj.id || '');
|
|
386
|
+
setBotId(accountObj.connectionProperties?.agentid || '');
|
|
384
387
|
} else {
|
|
385
388
|
setAccountId('');
|
|
386
389
|
setWecrmAccountId('');
|
|
387
390
|
setAccessToken('');
|
|
388
391
|
setHostName('');
|
|
389
392
|
setAccountName('');
|
|
393
|
+
setBotId('');
|
|
390
394
|
}
|
|
391
395
|
}, [accountData.selectedRcsAccount]);
|
|
392
396
|
|
|
@@ -1387,6 +1391,8 @@ export const Rcs = (props) => {
|
|
|
1387
1391
|
const rcsAccountId = get(details, 'versions.base.content.RCS.rcsContent.accountId', '');
|
|
1388
1392
|
setRcsAccount(rcsAccountId);
|
|
1389
1393
|
}
|
|
1394
|
+
const storedVfTemplateId = get(details, 'versions.base.content.RCS.rcsContent.vfTemplateId', '');
|
|
1395
|
+
if (storedVfTemplateId) setVfTemplateId(storedVfTemplateId);
|
|
1390
1396
|
|
|
1391
1397
|
applySmsFallbackHydration({
|
|
1392
1398
|
details,
|
|
@@ -2824,7 +2830,8 @@ const onTitleAddVar = () => {
|
|
|
2824
2830
|
}
|
|
2825
2831
|
],
|
|
2826
2832
|
contentType: isFullMode ? templateType : RICHCARD,
|
|
2827
|
-
...(isFullMode && {accountId
|
|
2833
|
+
...(isFullMode && {accountId, accessToken, accountName, hostName, botId}),
|
|
2834
|
+
...(vfTemplateId && { vfTemplateId }),
|
|
2828
2835
|
},
|
|
2829
2836
|
...smsFallbackPayloadContent,
|
|
2830
2837
|
},
|
|
@@ -2964,6 +2971,7 @@ const onTitleAddVar = () => {
|
|
|
2964
2971
|
accountName,
|
|
2965
2972
|
hostName,
|
|
2966
2973
|
smsRegister,
|
|
2974
|
+
vfTemplateId,
|
|
2967
2975
|
]);
|
|
2968
2976
|
|
|
2969
2977
|
/**
|