@capillarytech/creatives-library 9.0.43 → 9.0.44
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/v2Components/CapDeviceContent/index.scss +1 -1
- package/v2Components/CommonTestAndPreview/UnifiedPreview/ViberPreviewContent.js +15 -106
- package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +1 -139
- package/v2Components/CommonTestAndPreview/_commonTestAndPreview.scss +5 -1
- package/v2Components/CommonTestAndPreview/constants.js +0 -2
- package/v2Components/CommonTestAndPreview/index.js +26 -240
- package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/ViberPreviewContent.test.js +0 -364
- package/v2Components/CommonTestAndPreview/tests/utils.test.js +0 -49
- package/v2Components/CommonTestAndPreview/utils.js +0 -20
- package/v2Components/FormBuilder/_formBuilder.scss +1 -1
- package/v2Containers/Email/_email.scss +4 -0
- package/v2Containers/Email/index.js +1 -1
- package/v2Containers/MobilePush/Create/_mobilePushCreate.scss +14 -10
- package/v2Containers/MobilePush/Edit/_mobilePushCreate.scss +14 -9
- package/v2Containers/Templates/_templates.scss +12 -180
- package/v2Containers/Templates/index.js +18 -104
- package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +15 -6
- package/v2Containers/Viber/constants.js +0 -21
- package/v2Containers/Viber/index.js +49 -719
- package/v2Containers/Viber/index.scss +0 -175
- package/v2Containers/Viber/messages.js +0 -121
- package/v2Containers/Viber/tests/index.test.js +0 -80
- package/v2Containers/Whatsapp/index.js +4 -2
- package/v2Containers/Whatsapp/index.scss +8 -5
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +280 -224
- package/v2Components/CommonTestAndPreview/UnifiedPreview/ViberCarouselPreviewCards.js +0 -127
- package/v2Components/CommonTestAndPreview/UnifiedPreview/_viberCarouselPreviewCards.scss +0 -133
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@import '~@capillarytech/cap-ui-library/styles/_variables.scss';
|
|
2
2
|
|
|
3
3
|
.ant-tabs-content{
|
|
4
|
-
margin-top:
|
|
4
|
+
margin-top: 0.171rem;
|
|
5
5
|
// .creatives-templates-list.full-mode{
|
|
6
6
|
.v2-pagination-container, .v2-pagination-container-half {
|
|
7
7
|
.ant-tabs-tabpane-active{
|
|
@@ -160,6 +160,7 @@
|
|
|
160
160
|
line-clamp: 3;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
+
|
|
163
164
|
}
|
|
164
165
|
|
|
165
166
|
&.no-image .ant-card-meta {
|
|
@@ -167,44 +168,6 @@
|
|
|
167
168
|
word-wrap: break-word;
|
|
168
169
|
}
|
|
169
170
|
}
|
|
170
|
-
|
|
171
|
-
&.viber-carousel-static {
|
|
172
|
-
height: auto;
|
|
173
|
-
min-height: 21.125rem;
|
|
174
|
-
overflow: visible;
|
|
175
|
-
|
|
176
|
-
.ant-card-body {
|
|
177
|
-
height: auto;
|
|
178
|
-
overflow: visible;
|
|
179
|
-
padding-bottom: $CAP_SPACE_12;
|
|
180
|
-
|
|
181
|
-
.ant-card-meta,
|
|
182
|
-
.ant-card-meta-detail,
|
|
183
|
-
.ant-card-meta-description {
|
|
184
|
-
height: auto;
|
|
185
|
-
max-height: none;
|
|
186
|
-
overflow: visible;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.truncate-text-viber {
|
|
190
|
-
.ant-card-meta-description {
|
|
191
|
-
display: block;
|
|
192
|
-
overflow: visible;
|
|
193
|
-
max-height: none;
|
|
194
|
-
-webkit-box-orient: unset;
|
|
195
|
-
-webkit-line-clamp: unset;
|
|
196
|
-
line-clamp: unset;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.content,
|
|
201
|
-
.cards,
|
|
202
|
-
.card {
|
|
203
|
-
overflow: visible;
|
|
204
|
-
height: auto;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
171
|
|
|
209
172
|
|
|
210
173
|
&.carousel-img-section {
|
|
@@ -1259,147 +1222,6 @@
|
|
|
1259
1222
|
max-height: 11rem;
|
|
1260
1223
|
margin-bottom: $CAP_SPACE_04;
|
|
1261
1224
|
}
|
|
1262
|
-
|
|
1263
|
-
/* Listing carousel preview: always grow with content so title + buttons stay visible for any image */
|
|
1264
|
-
.cap-custom-card.ant-card.VIBER.viber-carousel-static {
|
|
1265
|
-
height: auto;
|
|
1266
|
-
min-height: 21.125rem;
|
|
1267
|
-
overflow: visible;
|
|
1268
|
-
|
|
1269
|
-
> .ant-card-body {
|
|
1270
|
-
height: auto;
|
|
1271
|
-
max-height: none;
|
|
1272
|
-
overflow: visible;
|
|
1273
|
-
padding-bottom: $CAP_SPACE_12;
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
.ant-card-meta,
|
|
1277
|
-
.ant-card-meta-detail,
|
|
1278
|
-
.ant-card-meta-description,
|
|
1279
|
-
.truncate-text-viber,
|
|
1280
|
-
.truncate-text-viber .ant-card-meta-description {
|
|
1281
|
-
height: auto;
|
|
1282
|
-
max-height: none;
|
|
1283
|
-
overflow: visible;
|
|
1284
|
-
display: block;
|
|
1285
|
-
-webkit-line-clamp: unset;
|
|
1286
|
-
line-clamp: unset;
|
|
1287
|
-
-webkit-box-orient: unset;
|
|
1288
|
-
}
|
|
1289
|
-
}
|
|
1290
|
-
|
|
1291
|
-
.viber-carousel-static {
|
|
1292
|
-
.content {
|
|
1293
|
-
width: 100%;
|
|
1294
|
-
overflow: visible;
|
|
1295
|
-
display: flex;
|
|
1296
|
-
flex-direction: column;
|
|
1297
|
-
height: auto;
|
|
1298
|
-
|
|
1299
|
-
.message-box {
|
|
1300
|
-
width: 100%;
|
|
1301
|
-
height: auto;
|
|
1302
|
-
border-radius: $CAP_SPACE_04;
|
|
1303
|
-
background: $CAP_WHITE;
|
|
1304
|
-
margin-bottom: $CAP_SPACE_08;
|
|
1305
|
-
display: flex;
|
|
1306
|
-
align-items: flex-start;
|
|
1307
|
-
|
|
1308
|
-
.message {
|
|
1309
|
-
display: -webkit-box;
|
|
1310
|
-
width: 100%;
|
|
1311
|
-
color: $CAP_G01;
|
|
1312
|
-
line-height: 1.3;
|
|
1313
|
-
overflow: hidden;
|
|
1314
|
-
text-overflow: ellipsis;
|
|
1315
|
-
-webkit-line-clamp: 2;
|
|
1316
|
-
line-clamp: 2;
|
|
1317
|
-
-webkit-box-orient: vertical;
|
|
1318
|
-
white-space: normal;
|
|
1319
|
-
word-break: break-word;
|
|
1320
|
-
}
|
|
1321
|
-
}
|
|
1322
|
-
|
|
1323
|
-
.cards {
|
|
1324
|
-
display: flex;
|
|
1325
|
-
gap: $CAP_SPACE_08;
|
|
1326
|
-
overflow: visible;
|
|
1327
|
-
width: 100%;
|
|
1328
|
-
height: auto;
|
|
1329
|
-
|
|
1330
|
-
.card {
|
|
1331
|
-
flex: 1;
|
|
1332
|
-
min-width: 0;
|
|
1333
|
-
width: 100%;
|
|
1334
|
-
background: $CAP_WHITE;
|
|
1335
|
-
border-radius: $CAP_SPACE_04;
|
|
1336
|
-
overflow: visible;
|
|
1337
|
-
display: flex;
|
|
1338
|
-
flex-direction: column;
|
|
1339
|
-
height: auto;
|
|
1340
|
-
|
|
1341
|
-
.image {
|
|
1342
|
-
width: 100%;
|
|
1343
|
-
max-height: 11rem;
|
|
1344
|
-
margin-bottom: $CAP_SPACE_04;
|
|
1345
|
-
border-radius: $CAP_SPACE_04;
|
|
1346
|
-
display: block;
|
|
1347
|
-
flex-shrink: 0;
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
.image-placeholder {
|
|
1351
|
-
width: 100%;
|
|
1352
|
-
height: 7.143rem;
|
|
1353
|
-
border-radius: $CAP_SPACE_04;
|
|
1354
|
-
background: $CAP_G07;
|
|
1355
|
-
}
|
|
1356
|
-
|
|
1357
|
-
.text {
|
|
1358
|
-
display: -webkit-box;
|
|
1359
|
-
color: $CAP_G01;
|
|
1360
|
-
margin: $CAP_SPACE_04 0;
|
|
1361
|
-
line-height: 1.3;
|
|
1362
|
-
overflow: hidden;
|
|
1363
|
-
text-overflow: ellipsis;
|
|
1364
|
-
white-space: normal;
|
|
1365
|
-
-webkit-line-clamp: 2;
|
|
1366
|
-
line-clamp: 2;
|
|
1367
|
-
-webkit-box-orient: vertical;
|
|
1368
|
-
flex-shrink: 0;
|
|
1369
|
-
width: 100%;
|
|
1370
|
-
visibility: visible;
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
.buttons {
|
|
1374
|
-
display: flex;
|
|
1375
|
-
flex-direction: column;
|
|
1376
|
-
gap: $CAP_SPACE_04;
|
|
1377
|
-
flex-shrink: 0;
|
|
1378
|
-
width: 100%;
|
|
1379
|
-
visibility: visible;
|
|
1380
|
-
|
|
1381
|
-
.button {
|
|
1382
|
-
display: block;
|
|
1383
|
-
min-height: 1.5rem;
|
|
1384
|
-
border-radius: $CAP_SPACE_12;
|
|
1385
|
-
background: $CAP_PURPLE01;
|
|
1386
|
-
color: $CAP_WHITE;
|
|
1387
|
-
text-align: center;
|
|
1388
|
-
padding: 0.179rem $CAP_SPACE_08;
|
|
1389
|
-
white-space: normal;
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
.button-secondary {
|
|
1393
|
-
color: $CAP_PURPLE01;
|
|
1394
|
-
background: transparent;
|
|
1395
|
-
border: none;
|
|
1396
|
-
box-shadow: none;
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1399
|
-
}
|
|
1400
|
-
}
|
|
1401
|
-
}
|
|
1402
|
-
}
|
|
1403
1225
|
.whatsapp-doc {
|
|
1404
1226
|
width: 100%;
|
|
1405
1227
|
max-height: 123px;
|
|
@@ -1657,3 +1479,13 @@
|
|
|
1657
1479
|
opacity: 0.4;
|
|
1658
1480
|
cursor: not-allowed;
|
|
1659
1481
|
}
|
|
1482
|
+
|
|
1483
|
+
.template-action-dropdown {
|
|
1484
|
+
min-width: 14.286rem !important;
|
|
1485
|
+
.template-action-menu {
|
|
1486
|
+
padding: 4px 0px;
|
|
1487
|
+
.template-action-menu-item {
|
|
1488
|
+
padding: 12px 24px;
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
@@ -73,7 +73,6 @@ import * as ebillActions from '../Ebill/actions';
|
|
|
73
73
|
import * as emailActions from '../Email/actions';
|
|
74
74
|
import * as lineActions from '../Line/Container/actions';
|
|
75
75
|
import * as viberActions from '../Viber/actions';
|
|
76
|
-
import { VIBER_MEDIA_TYPES } from '../Viber/constants';
|
|
77
76
|
import * as facebookActions from '../Facebook/actions';
|
|
78
77
|
import * as whatsappActions from '../Whatsapp/actions';
|
|
79
78
|
import * as rcsActions from '../Rcs/actions';
|
|
@@ -1400,11 +1399,6 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
1400
1399
|
const image = viberContent.image || {};
|
|
1401
1400
|
const video = viberContent.video || {};
|
|
1402
1401
|
const button = viberContent.button || {};
|
|
1403
|
-
const messageType = viberContent.type || '';
|
|
1404
|
-
const cardsRaw = viberContent.cards;
|
|
1405
|
-
const cards = Array.isArray(cardsRaw) ? cardsRaw : [];
|
|
1406
|
-
const isCarousel =
|
|
1407
|
-
messageType === VIBER_MEDIA_TYPES.CAROUSEL || cards.length > 0;
|
|
1408
1402
|
|
|
1409
1403
|
const viberPreview = {
|
|
1410
1404
|
messageContent: text,
|
|
@@ -1422,39 +1416,14 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
1422
1416
|
};
|
|
1423
1417
|
}
|
|
1424
1418
|
|
|
1425
|
-
if (isCarousel) {
|
|
1426
|
-
viberPreview.type = VIBER_MEDIA_TYPES.CAROUSEL;
|
|
1427
|
-
viberPreview.cards = cards.map((card) => ({
|
|
1428
|
-
text: card?.text || '',
|
|
1429
|
-
mediaUrl: card?.mediaUrl || '',
|
|
1430
|
-
buttons: (card?.buttons || []).map((btn) => ({
|
|
1431
|
-
title: btn?.title || '',
|
|
1432
|
-
action: btn?.action || '',
|
|
1433
|
-
})),
|
|
1434
|
-
}));
|
|
1435
|
-
viberPreview.showCarouselEditorPreview = true;
|
|
1436
|
-
}
|
|
1437
|
-
|
|
1438
1419
|
// Extract account name
|
|
1439
1420
|
const accountName = get(template, 'definition.accountName', '');
|
|
1440
1421
|
|
|
1441
1422
|
// Return Viber content object (same as Viber/index.js getTemplateContent)
|
|
1442
1423
|
return {
|
|
1443
1424
|
viberPreviewContent: viberPreview,
|
|
1444
|
-
accountName: accountName
|
|
1445
|
-
brandName: accountName
|
|
1446
|
-
messageContent: text,
|
|
1447
|
-
...(isCarousel && {
|
|
1448
|
-
type: VIBER_MEDIA_TYPES.CAROUSEL,
|
|
1449
|
-
cards: viberPreview.cards,
|
|
1450
|
-
}),
|
|
1451
|
-
...(!isCarousel && !isEmpty(button) && button.text && (button.url || viberContent.buttonURL) && {
|
|
1452
|
-
button: {
|
|
1453
|
-
text: button.text,
|
|
1454
|
-
url: button.url || viberContent.buttonURL || '',
|
|
1455
|
-
},
|
|
1456
|
-
}),
|
|
1457
|
-
buttonURL: button.url || viberContent.buttonURL || '',
|
|
1425
|
+
accountName: accountName ? [accountName] : [],
|
|
1426
|
+
brandName: accountName ? [accountName] : [],
|
|
1458
1427
|
};
|
|
1459
1428
|
}
|
|
1460
1429
|
|
|
@@ -2177,15 +2146,16 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
2177
2146
|
if (this.props.isFullMode && !this.props.isDltFromRcs && !(this.state.hostName === HOST_GUPSHUP)) {
|
|
2178
2147
|
templateData.extra.push(
|
|
2179
2148
|
<CapDropdown
|
|
2149
|
+
rootClassName="template-action-dropdown"
|
|
2180
2150
|
overlay={
|
|
2181
|
-
<CapMenu>
|
|
2151
|
+
<CapMenu className="template-action-menu">
|
|
2182
2152
|
{/* Phase 16: Test and Preview menu item - Show for supported channels, hide in archived mode */}
|
|
2183
2153
|
{!isArchivedMode && (this.isTestAndPreviewSupported() ||
|
|
2184
2154
|
(this.state.channel.toUpperCase() === WHATSAPP &&
|
|
2185
2155
|
status === WHATSAPP_STATUSES.approved) || (this.state.channel.toUpperCase() === RCS &&
|
|
2186
2156
|
rcsStatus === RCS_STATUSES.approved)) && (
|
|
2187
2157
|
<CapMenu.Item
|
|
2188
|
-
className={`test-and-preview-${channelLowerCase}`}
|
|
2158
|
+
className={`test-and-preview-${channelLowerCase} template-action-menu-item`}
|
|
2189
2159
|
onClick={() => {
|
|
2190
2160
|
if ([ZALO, WHATSAPP, RCS].includes(this.state.channel.toUpperCase()) || (isTraiDltFeature && this.state.channel.toUpperCase() === SMS)) {
|
|
2191
2161
|
handlers.handleEditClick(undefined, template, undefined, undefined, {
|
|
@@ -2205,7 +2175,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
2205
2175
|
) &&
|
|
2206
2176
|
!isTraiDltFeature && !template.isArchived && this.gatedMenuItem({
|
|
2207
2177
|
allowed: this.canPerform(PERMISSIONS.CREATIVE_CREATE),
|
|
2208
|
-
className: `duplicate-${channelLowerCase}`,
|
|
2178
|
+
className: `duplicate-${channelLowerCase} template-action-menu-item`,
|
|
2209
2179
|
onClick: () => this.duplicateTemplate(template),
|
|
2210
2180
|
label: <FormattedMessage {...messages.duplicateButton} />,
|
|
2211
2181
|
})}
|
|
@@ -2217,13 +2187,13 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
2217
2187
|
return !template?.isArchived
|
|
2218
2188
|
? this.gatedMenuItem({
|
|
2219
2189
|
allowed: canArchive,
|
|
2220
|
-
className: `archive-${channelLowerCase}`,
|
|
2190
|
+
className: `archive-${channelLowerCase} template-action-menu-item`,
|
|
2221
2191
|
onClick: () => this.handleTemplateArchiveAction({ templateId: template._id, templateName: template.name }),
|
|
2222
2192
|
label: <FormattedMessage {...messages.archiveButton} />,
|
|
2223
2193
|
})
|
|
2224
2194
|
: this.gatedMenuItem({
|
|
2225
2195
|
allowed: canArchive,
|
|
2226
|
-
className: `unarchive-${channelLowerCase}`,
|
|
2196
|
+
className: `unarchive-${channelLowerCase} template-action-menu-item`,
|
|
2227
2197
|
onClick: () => this.handleTemplateArchiveAction({ templateId: template._id, templateName: template.name, isUnarchive: true }),
|
|
2228
2198
|
label: <FormattedMessage {...messages.unarchiveButton} />,
|
|
2229
2199
|
});
|
|
@@ -2236,8 +2206,8 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
2236
2206
|
allowed: this.canPerform(PERMISSIONS.CREATIVE_DELETE),
|
|
2237
2207
|
className:
|
|
2238
2208
|
this.state.channel.toUpperCase() === WECHAT && !template.definition
|
|
2239
|
-
? `unmap-${channelLowerCase}`
|
|
2240
|
-
: `delete-${channelLowerCase}`,
|
|
2209
|
+
? `unmap-${channelLowerCase} template-action-menu-item`
|
|
2210
|
+
: `delete-${channelLowerCase} template-action-menu-item`,
|
|
2241
2211
|
onClick: () => this.toggleDeleteTemplateModal(template),
|
|
2242
2212
|
label:
|
|
2243
2213
|
this.state.channel.toUpperCase() === WECHAT && !template.definition
|
|
@@ -2466,59 +2436,10 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
2466
2436
|
image = {},
|
|
2467
2437
|
button = {},
|
|
2468
2438
|
video = {},
|
|
2469
|
-
type = '',
|
|
2470
|
-
cards = [],
|
|
2471
2439
|
} = {},
|
|
2472
2440
|
} = {},
|
|
2473
2441
|
} = template.versions.base;
|
|
2474
|
-
const isViberCarousel = type === VIBER_MEDIA_TYPES.CAROUSEL;
|
|
2475
2442
|
templateData.content = text;
|
|
2476
|
-
if (isViberCarousel) {
|
|
2477
|
-
const previewCards = Array.isArray(cards) ? cards.slice(0, 1) : [];
|
|
2478
|
-
// Bypass CapCustomCard Viber Meta + line-clamp (clips title/buttons for tall images).
|
|
2479
|
-
// Parent class `viber-carousel-static` scopes listing styles in _templates.scss.
|
|
2480
|
-
// cardType hits the default content path; keep VIBER for channel card styles.
|
|
2481
|
-
templateData.cardType = 'VIBER_CAROUSEL_PREVIEW';
|
|
2482
|
-
templateData.className = 'viber-carousel-static VIBER';
|
|
2483
|
-
templateData.content = (
|
|
2484
|
-
<CapRow vertical className="content">
|
|
2485
|
-
<CapRow className="message-box">
|
|
2486
|
-
<CapLabel type="label1" className="message">
|
|
2487
|
-
{text}
|
|
2488
|
-
</CapLabel>
|
|
2489
|
-
</CapRow>
|
|
2490
|
-
<CapRow className="cards">
|
|
2491
|
-
{previewCards?.map((card, cardIdx) => (
|
|
2492
|
-
<CapRow vertical className="card" key={`viber-carousel-static-card-${cardIdx}`}>
|
|
2493
|
-
{card?.mediaUrl ? (
|
|
2494
|
-
<CapImage src={card.mediaUrl} className="image" />
|
|
2495
|
-
) : (
|
|
2496
|
-
<CapRow className="image-placeholder" />
|
|
2497
|
-
)}
|
|
2498
|
-
<CapLabel type="label1" className="text">
|
|
2499
|
-
{card?.text}
|
|
2500
|
-
</CapLabel>
|
|
2501
|
-
<CapRow vertical className="buttons">
|
|
2502
|
-
{(Array.isArray(card?.buttons) && card.buttons.length
|
|
2503
|
-
? card.buttons
|
|
2504
|
-
: [{}, {}]
|
|
2505
|
-
).slice(0, 2).map((carouselButton, btnIdx) => (
|
|
2506
|
-
<CapLabel
|
|
2507
|
-
key={`viber-carousel-static-btn-${cardIdx}-${btnIdx}`}
|
|
2508
|
-
type="label1"
|
|
2509
|
-
className={`button${btnIdx === 1 ? ' button-secondary' : ''}`}
|
|
2510
|
-
>
|
|
2511
|
-
{(carouselButton?.title || '').trim()}
|
|
2512
|
-
</CapLabel>
|
|
2513
|
-
))}
|
|
2514
|
-
</CapRow>
|
|
2515
|
-
</CapRow>
|
|
2516
|
-
))}
|
|
2517
|
-
</CapRow>
|
|
2518
|
-
</CapRow>
|
|
2519
|
-
);
|
|
2520
|
-
break;
|
|
2521
|
-
}
|
|
2522
2443
|
if (!isEmpty(image)) {
|
|
2523
2444
|
const { url = '' } = image;
|
|
2524
2445
|
templateData.url = url;
|
|
@@ -5186,22 +5107,15 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
5186
5107
|
? this.props.Templates.selectedWhatsappAccount.name
|
|
5187
5108
|
: null
|
|
5188
5109
|
}
|
|
5189
|
-
// Pass formData for
|
|
5110
|
+
// Pass formData for EMAIL and SMS channels for tag extraction
|
|
5190
5111
|
formData={
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
return previewContent.formData || null;
|
|
5199
|
-
}
|
|
5200
|
-
if (channelUpper === VIBER) {
|
|
5201
|
-
return previewContent;
|
|
5202
|
-
}
|
|
5203
|
-
return null;
|
|
5204
|
-
})()
|
|
5112
|
+
this.state.testAndPreviewContent &&
|
|
5113
|
+
(this.state.channel?.toUpperCase() === EMAIL ||
|
|
5114
|
+
this.state.channel?.toUpperCase() === SMS) &&
|
|
5115
|
+
typeof this.state.testAndPreviewContent === 'object' &&
|
|
5116
|
+
this.state.testAndPreviewContent?.formData
|
|
5117
|
+
? this.state.testAndPreviewContent.formData
|
|
5118
|
+
: null
|
|
5205
5119
|
}
|
|
5206
5120
|
/>
|
|
5207
5121
|
)}
|
|
@@ -1339,9 +1339,11 @@ Click {{unsubscribe}} to unsubscribe
|
|
|
1339
1339
|
null,
|
|
1340
1340
|
<CapDropdownComponent
|
|
1341
1341
|
overlay={
|
|
1342
|
-
<CapMenuComponent
|
|
1342
|
+
<CapMenuComponent
|
|
1343
|
+
className="template-action-menu"
|
|
1344
|
+
>
|
|
1343
1345
|
<withItemHOC
|
|
1344
|
-
className="delete-whatsapp rbac-disabled"
|
|
1346
|
+
className="delete-whatsapp template-action-menu-item rbac-disabled"
|
|
1345
1347
|
onClick={[Function]}
|
|
1346
1348
|
>
|
|
1347
1349
|
<CapTooltip
|
|
@@ -1364,6 +1366,7 @@ Click {{unsubscribe}} to unsubscribe
|
|
|
1364
1366
|
</withItemHOC>
|
|
1365
1367
|
</CapMenuComponent>
|
|
1366
1368
|
}
|
|
1369
|
+
rootClassName="template-action-dropdown"
|
|
1367
1370
|
>
|
|
1368
1371
|
<CapIcon
|
|
1369
1372
|
type="more"
|
|
@@ -1823,9 +1826,11 @@ Click {{unsubscribe}} to unsubscribe
|
|
|
1823
1826
|
null,
|
|
1824
1827
|
<CapDropdownComponent
|
|
1825
1828
|
overlay={
|
|
1826
|
-
<CapMenuComponent
|
|
1829
|
+
<CapMenuComponent
|
|
1830
|
+
className="template-action-menu"
|
|
1831
|
+
>
|
|
1827
1832
|
<withItemHOC
|
|
1828
|
-
className="delete-whatsapp rbac-disabled"
|
|
1833
|
+
className="delete-whatsapp template-action-menu-item rbac-disabled"
|
|
1829
1834
|
onClick={[Function]}
|
|
1830
1835
|
>
|
|
1831
1836
|
<CapTooltip
|
|
@@ -1848,6 +1853,7 @@ Click {{unsubscribe}} to unsubscribe
|
|
|
1848
1853
|
</withItemHOC>
|
|
1849
1854
|
</CapMenuComponent>
|
|
1850
1855
|
}
|
|
1856
|
+
rootClassName="template-action-dropdown"
|
|
1851
1857
|
>
|
|
1852
1858
|
<CapIcon
|
|
1853
1859
|
type="more"
|
|
@@ -2307,9 +2313,11 @@ Click {{unsubscribe}} to unsubscribe
|
|
|
2307
2313
|
null,
|
|
2308
2314
|
<CapDropdownComponent
|
|
2309
2315
|
overlay={
|
|
2310
|
-
<CapMenuComponent
|
|
2316
|
+
<CapMenuComponent
|
|
2317
|
+
className="template-action-menu"
|
|
2318
|
+
>
|
|
2311
2319
|
<withItemHOC
|
|
2312
|
-
className="delete-whatsapp rbac-disabled"
|
|
2320
|
+
className="delete-whatsapp template-action-menu-item rbac-disabled"
|
|
2313
2321
|
onClick={[Function]}
|
|
2314
2322
|
>
|
|
2315
2323
|
<CapTooltip
|
|
@@ -2332,6 +2340,7 @@ Click {{unsubscribe}} to unsubscribe
|
|
|
2332
2340
|
</withItemHOC>
|
|
2333
2341
|
</CapMenuComponent>
|
|
2334
2342
|
}
|
|
2343
|
+
rootClassName="template-action-dropdown"
|
|
2335
2344
|
>
|
|
2336
2345
|
<CapIcon
|
|
2337
2346
|
type="more"
|
|
@@ -47,24 +47,7 @@ export const VIBER_MEDIA_TYPES = {
|
|
|
47
47
|
TEXT: 'TEXT',
|
|
48
48
|
IMAGE: 'IMAGE',
|
|
49
49
|
VIDEO: 'VIDEO',
|
|
50
|
-
CAROUSEL: 'CAROUSEL',
|
|
51
50
|
};
|
|
52
|
-
export const VIBER_CAROUSEL_MIN_CARDS = 2;
|
|
53
|
-
export const VIBER_CAROUSEL_MAX_CARDS = 5;
|
|
54
|
-
export const VIBER_CAROUSEL_MAX_BUTTONS = 2;
|
|
55
|
-
export const VIBER_CAROUSEL_CARD_TITLE_MIN_LENGTH = 2;
|
|
56
|
-
export const VIBER_CAROUSEL_CARD_TITLE_MAX_LENGTH = 38;
|
|
57
|
-
export const VIBER_CAROUSEL_FIRST_BUTTON_TITLE_MAX_LENGTH = 10;
|
|
58
|
-
export const VIBER_CAROUSEL_SECOND_BUTTON_TITLE_MAX_LENGTH = 12;
|
|
59
|
-
export const VIBER_CAROUSEL_BUTTON_URL_MAX_LENGTH = 1000;
|
|
60
|
-
export const STATIC_URL = 'STATIC_URL';
|
|
61
|
-
export const DYNAMIC_URL = 'DYNAMIC_URL';
|
|
62
|
-
/** Recommended / validated carousel image height in pixels (passed to image upload). */
|
|
63
|
-
export const VIBER_CAROUSEL_IMG_HEIGHT = 600;
|
|
64
|
-
/** Recommended / validated carousel image width in pixels (passed to image upload). */
|
|
65
|
-
export const VIBER_CAROUSEL_IMG_WIDTH = 696;
|
|
66
|
-
/** Maximum carousel image file size (bytes). 10_000_000 ≈ 10 MB (decimal). */
|
|
67
|
-
export const VIBER_CAROUSEL_IMG_SIZE = 10000000;
|
|
68
51
|
export const ALLOWED_IMAGE_EXTENSIONS_REGEX_VIBER = /\.(jpe?g|png)$/i;
|
|
69
52
|
export const ALLOWED_EXTENSIONS_VIDEO_REGEX_VIBER = /\.(mp4|3gp|m4v|mov)$/i;
|
|
70
53
|
export const NONE = 'NONE';
|
|
@@ -86,10 +69,6 @@ export const mediaRadioOptions = [
|
|
|
86
69
|
value: VIBER_MEDIA_TYPES.VIDEO,
|
|
87
70
|
label: <FormattedMessage {...messages.mediaVideo} />,
|
|
88
71
|
},
|
|
89
|
-
{
|
|
90
|
-
value: VIBER_MEDIA_TYPES.CAROUSEL,
|
|
91
|
-
label: <FormattedMessage {...messages.mediaCarousel} />,
|
|
92
|
-
},
|
|
93
72
|
];
|
|
94
73
|
|
|
95
74
|
export const buttonRadioOptions = [
|