@capillarytech/creatives-library 8.0.121 → 8.0.122
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/containers/MobilePush/Create/_mobilePushCreate.scss +5 -3
- package/containers/MobilePush/Edit/_mobilePushCreate.scss +5 -3
- package/containers/Sms/Create/_smsCreate.scss +8 -5
- package/package.json +1 -1
- package/v2Containers/Whatsapp/index.js +6 -14
- package/v2Containers/Whatsapp/messages.js +14 -11
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +6 -6
|
@@ -17,9 +17,11 @@
|
|
|
17
17
|
flex-direction: row-reverse;
|
|
18
18
|
justify-content: flex-end;
|
|
19
19
|
}
|
|
20
|
-
.
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
.creatives-templates-container {
|
|
21
|
+
.ant-tabs-tabpane{
|
|
22
|
+
padding: 16px 16px 16px 0;
|
|
23
|
+
border: solid 1px #D6D6D6;
|
|
24
|
+
}
|
|
23
25
|
}
|
|
24
26
|
.ant-radio-wrapper{
|
|
25
27
|
font-size: 14px;
|
|
@@ -17,9 +17,11 @@
|
|
|
17
17
|
flex-direction: row-reverse;
|
|
18
18
|
justify-content: flex-end;
|
|
19
19
|
}
|
|
20
|
-
.
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
.creatives-templates-container {
|
|
21
|
+
.ant-tabs-tabpane{
|
|
22
|
+
padding: 16px 16px 16px 0;
|
|
23
|
+
border: solid 1px #D6D6D6;
|
|
24
|
+
}
|
|
23
25
|
}
|
|
24
26
|
.ant-radio-wrapper{
|
|
25
27
|
font-size: 14px;
|
|
@@ -16,11 +16,14 @@
|
|
|
16
16
|
flex-direction: row-reverse;
|
|
17
17
|
justify-content: flex-end;
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
|
|
20
|
+
.creatives-templates-container {
|
|
21
|
+
.ant-tabs-tabpane{
|
|
22
|
+
border: solid 1px #d9d9d9;
|
|
23
|
+
border-top: none;
|
|
24
|
+
margin-top: -0.2%;
|
|
25
|
+
min-height: calc(70vh);
|
|
26
|
+
}
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
.ant-tabs-extra-content{
|
package/package.json
CHANGED
|
@@ -2353,14 +2353,7 @@ const isAuthenticationTemplate = isEqual(templateCategory, WHATSAPP_CATEGORIES.a
|
|
|
2353
2353
|
const textAreaValueChange = ({ target: { value, id } }, type, carousel) => {
|
|
2354
2354
|
const numId = Number(id.slice(id.indexOf("_") + 1));
|
|
2355
2355
|
// Validation: Prevent empty or only-space values
|
|
2356
|
-
const isInvalidValue = value
|
|
2357
|
-
let errorMsg = false;
|
|
2358
|
-
if (isInvalidValue) {
|
|
2359
|
-
errorMsg = formatMessage(messages.emptyVariableValueErrorMessage || {
|
|
2360
|
-
id: 'whatsapp.emptyVariableValueErrorMessage',
|
|
2361
|
-
defaultMessage: 'Variable value cannot be empty or only spaces.'
|
|
2362
|
-
});
|
|
2363
|
-
}
|
|
2356
|
+
const isInvalidValue = value?.trim() === "";
|
|
2364
2357
|
//assign entered value to varMap
|
|
2365
2358
|
if (type === HEADER_TEXT) {
|
|
2366
2359
|
const arr = [...updatedHeaderData];
|
|
@@ -2370,18 +2363,18 @@ const isAuthenticationTemplate = isEqual(templateCategory, WHATSAPP_CATEGORIES.a
|
|
|
2370
2363
|
}));
|
|
2371
2364
|
if (isInvalidValue) {
|
|
2372
2365
|
arr[numId] = id.slice(0, id.indexOf("_"));
|
|
2366
|
+
setTemplateHeaderError(formatMessage(messages.emptyVariableValueErrorMessage));
|
|
2373
2367
|
} else {
|
|
2374
2368
|
arr[numId] = value;
|
|
2369
|
+
setTemplateHeaderError(false);
|
|
2375
2370
|
}
|
|
2376
2371
|
setUpdatedHeaderData(arr);
|
|
2377
|
-
// Set error for header variable if needed
|
|
2378
|
-
if (errorMsg) setTemplateHeaderError(errorMsg);
|
|
2379
|
-
else setTemplateHeaderError(false);
|
|
2380
2372
|
} else if (type === CAROUSEL_TEXT) {
|
|
2381
2373
|
const carouselUpdatedBodyTextData = carousel?.data?.updatedBodyText || [];
|
|
2382
2374
|
const arr = [...carouselUpdatedBodyTextData];
|
|
2383
2375
|
if (isInvalidValue) {
|
|
2384
2376
|
arr[numId] = id.slice(0, id.indexOf("_"));
|
|
2377
|
+
// (You may want to add a state for carousel variable errors if not present)
|
|
2385
2378
|
} else {
|
|
2386
2379
|
arr[numId] = value;
|
|
2387
2380
|
}
|
|
@@ -2400,13 +2393,12 @@ const isAuthenticationTemplate = isEqual(templateCategory, WHATSAPP_CATEGORIES.a
|
|
|
2400
2393
|
//based on entered value update updatedSmsEditor
|
|
2401
2394
|
if (isInvalidValue) {
|
|
2402
2395
|
arr[numId] = id.slice(0, id.indexOf("_"));
|
|
2396
|
+
setTemplateMessageError(formatMessage(messages.emptyVariableValueErrorMessage));
|
|
2403
2397
|
} else {
|
|
2404
2398
|
arr[numId] = value;
|
|
2399
|
+
setTemplateMessageError(false);
|
|
2405
2400
|
}
|
|
2406
2401
|
setUpdatedSmsEditor(arr);
|
|
2407
|
-
// Set error for message variable if needed
|
|
2408
|
-
if (errorMsg) setTemplateMessageError(errorMsg);
|
|
2409
|
-
else setTemplateMessageError(false);
|
|
2410
2402
|
}
|
|
2411
2403
|
};
|
|
2412
2404
|
|
|
@@ -265,8 +265,7 @@ export default defineMessages({
|
|
|
265
265
|
},
|
|
266
266
|
tagContentMismatchError: {
|
|
267
267
|
id: `${prefix}.tagContentMismatchError`,
|
|
268
|
-
defaultMessage:
|
|
269
|
-
'TAG CONTENT MISMATCH: The language and/or template category selected don’t match the template content.',
|
|
268
|
+
defaultMessage: "TAG CONTENT MISMATCH: The language and/or template category selected do not match the template content.",
|
|
270
269
|
},
|
|
271
270
|
invalidFormatError: {
|
|
272
271
|
id: `${prefix}.invalidFormatError`,
|
|
@@ -697,37 +696,37 @@ export default defineMessages({
|
|
|
697
696
|
id: `${prefix}.checkExpiryCode`,
|
|
698
697
|
defaultMessage: 'OTP settings',
|
|
699
698
|
},
|
|
700
|
-
expiryCodeNote:{
|
|
699
|
+
expiryCodeNote: {
|
|
701
700
|
id: `${prefix}.expiryCodeNote`,
|
|
702
701
|
defaultMessage: 'We suggest using the same expiry time as specified in the OTP settings.',
|
|
703
702
|
},
|
|
704
|
-
codeExpiresIn:{
|
|
703
|
+
codeExpiresIn: {
|
|
705
704
|
id: `${prefix}.codeExpiresIn`,
|
|
706
705
|
defaultMessage: 'This code expires in',
|
|
707
706
|
},
|
|
708
|
-
minutes:{
|
|
707
|
+
minutes: {
|
|
709
708
|
id: `${prefix}.minutes`,
|
|
710
709
|
defaultMessage: 'minutes',
|
|
711
710
|
},
|
|
712
|
-
codeExpiryNumMinutes:{
|
|
711
|
+
codeExpiryNumMinutes: {
|
|
713
712
|
id: `${prefix}.codeExpiryNumMinutes`,
|
|
714
713
|
defaultMessage: 'This code expires in <num_minutes> minutes.',
|
|
715
714
|
},
|
|
716
|
-
authenticationMsg:{
|
|
715
|
+
authenticationMsg: {
|
|
717
716
|
id: `${prefix}.authenticationMsg`,
|
|
718
717
|
defaultMessage: "{{verification_code}} is your verification code.",
|
|
719
718
|
},
|
|
720
|
-
securitySuffix:{
|
|
719
|
+
securitySuffix: {
|
|
721
720
|
id: `${prefix}.securitySuffix`,
|
|
722
721
|
defaultMessage: 'For your security, do not share this code.',
|
|
723
722
|
},
|
|
724
|
-
numMinutes:{
|
|
723
|
+
numMinutes: {
|
|
725
724
|
id: `${prefix}.numMinutes`,
|
|
726
725
|
defaultMessage: '<num_minutes>',
|
|
727
726
|
},
|
|
728
|
-
enterExpiryTime:{
|
|
727
|
+
enterExpiryTime: {
|
|
729
728
|
id: `${prefix}.enterExpiryTime`,
|
|
730
|
-
defaultMessage: "Enter expiry time"
|
|
729
|
+
defaultMessage: "Enter expiry time",
|
|
731
730
|
},
|
|
732
731
|
checkExpiryTooltipHeader: {
|
|
733
732
|
id: `${prefix}.checkExpiryTooltipHeader`,
|
|
@@ -773,4 +772,8 @@ export default defineMessages({
|
|
|
773
772
|
id: `${prefix}.paused`,
|
|
774
773
|
defaultMessage: 'Paused',
|
|
775
774
|
},
|
|
775
|
+
emptyVariableValueErrorMessage: {
|
|
776
|
+
id: `${prefix}.emptyVariableValueErrorMessage`,
|
|
777
|
+
defaultMessage: 'Variable value cannot be empty or only spaces.',
|
|
778
|
+
},
|
|
776
779
|
});
|
|
@@ -227089,7 +227089,7 @@ new message content.",
|
|
|
227089
227089
|
],
|
|
227090
227090
|
Array [
|
|
227091
227091
|
Object {
|
|
227092
|
-
"defaultMessage": "TAG CONTENT MISMATCH: The language and/or template category selected
|
|
227092
|
+
"defaultMessage": "TAG CONTENT MISMATCH: The language and/or template category selected do not match the template content.",
|
|
227093
227093
|
"id": "creatives.containersV2.Whatsapp.tagContentMismatchError",
|
|
227094
227094
|
},
|
|
227095
227095
|
],
|
|
@@ -227201,7 +227201,7 @@ new message content.",
|
|
|
227201
227201
|
],
|
|
227202
227202
|
Array [
|
|
227203
227203
|
Object {
|
|
227204
|
-
"defaultMessage": "TAG CONTENT MISMATCH: The language and/or template category selected
|
|
227204
|
+
"defaultMessage": "TAG CONTENT MISMATCH: The language and/or template category selected do not match the template content.",
|
|
227205
227205
|
"id": "creatives.containersV2.Whatsapp.tagContentMismatchError",
|
|
227206
227206
|
},
|
|
227207
227207
|
],
|
|
@@ -235685,7 +235685,7 @@ Click {{3}} to unsubscribe'",
|
|
|
235685
235685
|
],
|
|
235686
235686
|
Array [
|
|
235687
235687
|
Object {
|
|
235688
|
-
"defaultMessage": "TAG CONTENT MISMATCH: The language and/or template category selected
|
|
235688
|
+
"defaultMessage": "TAG CONTENT MISMATCH: The language and/or template category selected do not match the template content.",
|
|
235689
235689
|
"id": "creatives.containersV2.Whatsapp.tagContentMismatchError",
|
|
235690
235690
|
},
|
|
235691
235691
|
],
|
|
@@ -235797,7 +235797,7 @@ Click {{3}} to unsubscribe'",
|
|
|
235797
235797
|
],
|
|
235798
235798
|
Array [
|
|
235799
235799
|
Object {
|
|
235800
|
-
"defaultMessage": "TAG CONTENT MISMATCH: The language and/or template category selected
|
|
235800
|
+
"defaultMessage": "TAG CONTENT MISMATCH: The language and/or template category selected do not match the template content.",
|
|
235801
235801
|
"id": "creatives.containersV2.Whatsapp.tagContentMismatchError",
|
|
235802
235802
|
},
|
|
235803
235803
|
],
|
|
@@ -248917,7 +248917,7 @@ new message content.",
|
|
|
248917
248917
|
],
|
|
248918
248918
|
Array [
|
|
248919
248919
|
Object {
|
|
248920
|
-
"defaultMessage": "TAG CONTENT MISMATCH: The language and/or template category selected
|
|
248920
|
+
"defaultMessage": "TAG CONTENT MISMATCH: The language and/or template category selected do not match the template content.",
|
|
248921
248921
|
"id": "creatives.containersV2.Whatsapp.tagContentMismatchError",
|
|
248922
248922
|
},
|
|
248923
248923
|
],
|
|
@@ -249029,7 +249029,7 @@ new message content.",
|
|
|
249029
249029
|
],
|
|
249030
249030
|
Array [
|
|
249031
249031
|
Object {
|
|
249032
|
-
"defaultMessage": "TAG CONTENT MISMATCH: The language and/or template category selected
|
|
249032
|
+
"defaultMessage": "TAG CONTENT MISMATCH: The language and/or template category selected do not match the template content.",
|
|
249033
249033
|
"id": "creatives.containersV2.Whatsapp.tagContentMismatchError",
|
|
249034
249034
|
},
|
|
249035
249035
|
],
|