@capillarytech/creatives-library 8.0.221 → 8.0.222
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/constants/unified.js +0 -2
- package/package.json +1 -1
- package/v2Containers/Cap/index.js +2 -7
- package/v2Containers/Login/index.js +2 -7
- package/v2Containers/Rcs/index.js +14 -3
- package/v2Containers/Rcs/messages.js +1 -5
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +176 -12
package/constants/unified.js
CHANGED
|
@@ -187,5 +187,3 @@ export const LOGOUT_FAILURE = 'cap/LOGOUT_FAILURE';
|
|
|
187
187
|
export const JAPANESE_HELP_TEXT = 'ヘルプ :トークンの定義';
|
|
188
188
|
|
|
189
189
|
export const TAG_TRANSLATION_DOC = 'https://docs.capillarytech.com/docs/tags-translation';
|
|
190
|
-
|
|
191
|
-
export const CAPILLARY_LOADING_LOGO = 'https://storage.crm.n.content-cdn.io/capillary/capillary_loading_logo.gif';
|
package/package.json
CHANGED
|
@@ -54,7 +54,6 @@ import { v2ViberSagas } from '../Viber/sagas';
|
|
|
54
54
|
import { v2FacebookSagas } from '../Facebook/sagas';
|
|
55
55
|
import createReducer from '../Line/Container/reducer';
|
|
56
56
|
import { DAEMON } from '@capillarytech/vulcan-react-sdk/utils/sagaInjectorTypes';
|
|
57
|
-
import {CAPILLARY_LOADING_LOGO} from '../../constants/unified';
|
|
58
57
|
const gtm = window.dataLayer || [];
|
|
59
58
|
const {
|
|
60
59
|
logNewTab,
|
|
@@ -511,12 +510,8 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
511
510
|
<div className="cap-loader-box">
|
|
512
511
|
<img
|
|
513
512
|
className="loader-image"
|
|
514
|
-
src=
|
|
515
|
-
alt="Capillary"
|
|
516
|
-
loading="lazy"
|
|
517
|
-
data-testid="capillary-logo"
|
|
518
|
-
aria-label="Capillary loading logo"
|
|
519
|
-
/>
|
|
513
|
+
src="https://s3.amazonaws.com/fileservice.in/intouch_creative_assets/88561f46de9407021cad.gif"
|
|
514
|
+
alt="Capillary"/>
|
|
520
515
|
</div> : <>
|
|
521
516
|
<Helmet
|
|
522
517
|
titleTemplate="Capillary - %s"
|
|
@@ -14,7 +14,6 @@ import LoginForm from './components/LoginForm';
|
|
|
14
14
|
import * as actions from '../Cap/actions';
|
|
15
15
|
import { UserIsNotAuthenticated } from '../../utils/authWrapper';
|
|
16
16
|
const logo = require('./assets/images/capillary_logo.png');
|
|
17
|
-
import {CAPILLARY_LOADING_LOGO} from '../../constants/unified';
|
|
18
17
|
|
|
19
18
|
export class Login extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
20
19
|
constructor(props) {
|
|
@@ -66,12 +65,8 @@ export class Login extends React.Component { // eslint-disable-line react/prefer
|
|
|
66
65
|
? <div className="cap-loader-box">
|
|
67
66
|
<img
|
|
68
67
|
className="loader-image"
|
|
69
|
-
src={
|
|
70
|
-
alt="Capillary"
|
|
71
|
-
loading="lazy"
|
|
72
|
-
data-testid="capillary-logo"
|
|
73
|
-
aria-label="Capillary loading logo"
|
|
74
|
-
/>
|
|
68
|
+
src={"https://storage.crm.n.content-cdn.io/capillary/capillary_loading_logo.gif"}
|
|
69
|
+
alt="Capillary"/>
|
|
75
70
|
</div>
|
|
76
71
|
: <Col className="login-box" style={{textAlign: 'center'}}>
|
|
77
72
|
<h2 className="ui image header">
|
|
@@ -611,6 +611,9 @@ export const Rcs = (props) => {
|
|
|
611
611
|
|
|
612
612
|
useEffect(() => {
|
|
613
613
|
if (templateType === contentType.text_message) {
|
|
614
|
+
setTemplateMediaType(RCS_MEDIA_TYPES.NONE);
|
|
615
|
+
setTemplateTitle('');
|
|
616
|
+
setTemplateTitleError('');
|
|
614
617
|
if (!isEditFlow && isFullMode) {
|
|
615
618
|
setUpdateRcsImageSrc('');
|
|
616
619
|
setUpdateRcsVideoSrc({});
|
|
@@ -631,6 +634,7 @@ export const Rcs = (props) => {
|
|
|
631
634
|
updateRcsImageSrc('');
|
|
632
635
|
setRcsThumbnailSrc('');
|
|
633
636
|
}
|
|
637
|
+
onTemplateDescChange({ target: { value: templateDesc } });
|
|
634
638
|
}, [templateType, isEditFlow, isFullMode]);
|
|
635
639
|
|
|
636
640
|
useEffect(() => {
|
|
@@ -875,9 +879,16 @@ export const Rcs = (props) => {
|
|
|
875
879
|
};
|
|
876
880
|
|
|
877
881
|
const onTemplateDescChange = ({ target: { value } }) => {
|
|
878
|
-
|
|
882
|
+
let errorMessage = false;
|
|
883
|
+
if(templateType === contentType.text_message && value?.length > RCS_TEXT_MESSAGE_MAX_LENGTH){
|
|
884
|
+
errorMessage = formatMessage(messages.templateMessageLengthError);
|
|
885
|
+
} else if(templateType === contentType.rich_card && value?.length > RCS_RICH_CARD_MAX_LENGTH){
|
|
886
|
+
errorMessage = formatMessage(messages.templateMessageLengthError);
|
|
887
|
+
} else {
|
|
888
|
+
errorMessage = false;
|
|
889
|
+
}
|
|
879
890
|
const varError = variableErrorHandling(value);
|
|
880
|
-
const error =
|
|
891
|
+
const error = errorMessage || varError;
|
|
881
892
|
setTemplateDesc(value);
|
|
882
893
|
setTemplateDescError(error);
|
|
883
894
|
};
|
|
@@ -900,7 +911,7 @@ export const Rcs = (props) => {
|
|
|
900
911
|
if (value === '' && isMediaTypeText) {
|
|
901
912
|
errorMessage = formatMessage(messages.emptyTemplateDescErrorMessage);
|
|
902
913
|
} else if (value?.length > maxLength) {
|
|
903
|
-
errorMessage = formatMessage(messages.
|
|
914
|
+
errorMessage = formatMessage(messages.templateMessageLengthError);
|
|
904
915
|
}
|
|
905
916
|
|
|
906
917
|
if (isBraceError) {
|
|
@@ -127,7 +127,7 @@ export default defineMessages({
|
|
|
127
127
|
},
|
|
128
128
|
templateHeaderLengthError: {
|
|
129
129
|
id: `${prefix}.templateHeaderLengthError`,
|
|
130
|
-
defaultMessage: '
|
|
130
|
+
defaultMessage: 'Title text exceeds the character limit.',
|
|
131
131
|
},
|
|
132
132
|
emptyTemplateMessageErrorMessage: {
|
|
133
133
|
id: `${prefix}.emptyTemplateMessageErrorMessage`,
|
|
@@ -242,10 +242,6 @@ export default defineMessages({
|
|
|
242
242
|
id: `${prefix}.carousel`,
|
|
243
243
|
defaultMessage: 'carousel',
|
|
244
244
|
},
|
|
245
|
-
templateDescLengthError: {
|
|
246
|
-
id: `${prefix}.templateDescLengthError`,
|
|
247
|
-
defaultMessage: 'Template message length cannot exceed {maxLength} characters',
|
|
248
|
-
},
|
|
249
245
|
rcsDoneBtnToolTip: {
|
|
250
246
|
id: `${prefix}.rcsDoneBtnToolTip`,
|
|
251
247
|
defaultMessage: 'Please add template name {type} to proceed further',
|
|
@@ -64825,7 +64825,7 @@ new message content.",
|
|
|
64825
64825
|
className="rcs-template-title-input rcs-edit-disabled"
|
|
64826
64826
|
data-testid="template_title"
|
|
64827
64827
|
disabled={false}
|
|
64828
|
-
errorMessage=
|
|
64828
|
+
errorMessage=""
|
|
64829
64829
|
labelPosition="top"
|
|
64830
64830
|
onChange={[Function]}
|
|
64831
64831
|
size="default"
|
|
@@ -64834,13 +64834,13 @@ new message content.",
|
|
|
64834
64834
|
<ComponentWithLabelHOC__CapComponentStyled
|
|
64835
64835
|
className="component-with-label rcs-template-title-input rcs-edit-disabled"
|
|
64836
64836
|
disabled={false}
|
|
64837
|
-
errorMessage=
|
|
64837
|
+
errorMessage=""
|
|
64838
64838
|
labelPosition="top"
|
|
64839
64839
|
>
|
|
64840
64840
|
<div
|
|
64841
64841
|
className="ComponentWithLabelHOC__CapComponentStyled-sc-1qk6bpg-0 kOOkix component-with-label rcs-template-title-input rcs-edit-disabled"
|
|
64842
64842
|
disabled={false}
|
|
64843
|
-
errorMessage=
|
|
64843
|
+
errorMessage=""
|
|
64844
64844
|
labelPosition="top"
|
|
64845
64845
|
>
|
|
64846
64846
|
<ComponentWithLabelHOC__ComponentWithLabelWrapper
|
|
@@ -64853,7 +64853,7 @@ new message content.",
|
|
|
64853
64853
|
<CapInput
|
|
64854
64854
|
data-testid="template_title"
|
|
64855
64855
|
disabled={false}
|
|
64856
|
-
errorMessage=
|
|
64856
|
+
errorMessage=""
|
|
64857
64857
|
onChange={[Function]}
|
|
64858
64858
|
size="default"
|
|
64859
64859
|
value=""
|
|
@@ -78317,7 +78317,7 @@ new message content.",
|
|
|
78317
78317
|
className="rcs-template-title-input rcs-edit-disabled"
|
|
78318
78318
|
data-testid="template_title"
|
|
78319
78319
|
disabled={false}
|
|
78320
|
-
errorMessage=
|
|
78320
|
+
errorMessage=""
|
|
78321
78321
|
labelPosition="top"
|
|
78322
78322
|
onChange={[Function]}
|
|
78323
78323
|
size="default"
|
|
@@ -78326,13 +78326,13 @@ new message content.",
|
|
|
78326
78326
|
<ComponentWithLabelHOC__CapComponentStyled
|
|
78327
78327
|
className="component-with-label rcs-template-title-input rcs-edit-disabled"
|
|
78328
78328
|
disabled={false}
|
|
78329
|
-
errorMessage=
|
|
78329
|
+
errorMessage=""
|
|
78330
78330
|
labelPosition="top"
|
|
78331
78331
|
>
|
|
78332
78332
|
<div
|
|
78333
78333
|
className="ComponentWithLabelHOC__CapComponentStyled-sc-1qk6bpg-0 kOOkix component-with-label rcs-template-title-input rcs-edit-disabled"
|
|
78334
78334
|
disabled={false}
|
|
78335
|
-
errorMessage=
|
|
78335
|
+
errorMessage=""
|
|
78336
78336
|
labelPosition="top"
|
|
78337
78337
|
>
|
|
78338
78338
|
<ComponentWithLabelHOC__ComponentWithLabelWrapper
|
|
@@ -78345,7 +78345,7 @@ new message content.",
|
|
|
78345
78345
|
<CapInput
|
|
78346
78346
|
data-testid="template_title"
|
|
78347
78347
|
disabled={false}
|
|
78348
|
-
errorMessage=
|
|
78348
|
+
errorMessage=""
|
|
78349
78349
|
onChange={[Function]}
|
|
78350
78350
|
size="default"
|
|
78351
78351
|
value=""
|
|
@@ -88907,6 +88907,12 @@ new message content.",
|
|
|
88907
88907
|
Array [
|
|
88908
88908
|
0,
|
|
88909
88909
|
],
|
|
88910
|
+
Array [
|
|
88911
|
+
0,
|
|
88912
|
+
],
|
|
88913
|
+
Array [
|
|
88914
|
+
1,
|
|
88915
|
+
],
|
|
88910
88916
|
],
|
|
88911
88917
|
"results": Array [
|
|
88912
88918
|
Object {
|
|
@@ -88945,6 +88951,14 @@ new message content.",
|
|
|
88945
88951
|
"type": "return",
|
|
88946
88952
|
"value": undefined,
|
|
88947
88953
|
},
|
|
88954
|
+
Object {
|
|
88955
|
+
"type": "return",
|
|
88956
|
+
"value": undefined,
|
|
88957
|
+
},
|
|
88958
|
+
Object {
|
|
88959
|
+
"type": "return",
|
|
88960
|
+
"value": undefined,
|
|
88961
|
+
},
|
|
88948
88962
|
],
|
|
88949
88963
|
},
|
|
88950
88964
|
"createTemplate": [MockFunction],
|
|
@@ -89822,6 +89836,100 @@ new message content.",
|
|
|
89822
89836
|
"id": "creatives.containersV2.Rcs.btnDesc",
|
|
89823
89837
|
},
|
|
89824
89838
|
],
|
|
89839
|
+
Array [
|
|
89840
|
+
Object {
|
|
89841
|
+
"defaultMessage": "Image",
|
|
89842
|
+
"id": "creatives.containersV2.Rcs.mediaImage",
|
|
89843
|
+
},
|
|
89844
|
+
],
|
|
89845
|
+
Array [
|
|
89846
|
+
Object {
|
|
89847
|
+
"defaultMessage": "Video/Slideshow",
|
|
89848
|
+
"id": "creatives.containersV2.Rcs.mediaVideo",
|
|
89849
|
+
},
|
|
89850
|
+
],
|
|
89851
|
+
Array [
|
|
89852
|
+
Object {
|
|
89853
|
+
"defaultMessage": "text message",
|
|
89854
|
+
"id": "creatives.containersV2.Rcs.text_message",
|
|
89855
|
+
},
|
|
89856
|
+
],
|
|
89857
|
+
Array [
|
|
89858
|
+
Object {
|
|
89859
|
+
"defaultMessage": "rich card",
|
|
89860
|
+
"id": "creatives.containersV2.Rcs.richCard",
|
|
89861
|
+
},
|
|
89862
|
+
],
|
|
89863
|
+
Array [
|
|
89864
|
+
Object {
|
|
89865
|
+
"defaultMessage": "Not yet enabled. Coming soon!",
|
|
89866
|
+
"id": "creatives.containersV2.Rcs.disabledCarouselTooltip",
|
|
89867
|
+
},
|
|
89868
|
+
],
|
|
89869
|
+
Array [
|
|
89870
|
+
Object {
|
|
89871
|
+
"defaultMessage": "carousel",
|
|
89872
|
+
"id": "creatives.containersV2.Rcs.carousel",
|
|
89873
|
+
},
|
|
89874
|
+
],
|
|
89875
|
+
Array [
|
|
89876
|
+
Object {
|
|
89877
|
+
"defaultMessage": "Enter template name",
|
|
89878
|
+
"id": "creatives.containersV2.templateNamePlaceholder",
|
|
89879
|
+
},
|
|
89880
|
+
],
|
|
89881
|
+
Array [
|
|
89882
|
+
Object {
|
|
89883
|
+
"defaultMessage": "Creative name",
|
|
89884
|
+
"id": "creatives.containersV2.creativeNameLabel",
|
|
89885
|
+
},
|
|
89886
|
+
],
|
|
89887
|
+
Array [
|
|
89888
|
+
Object {
|
|
89889
|
+
"defaultMessage": "Template Type",
|
|
89890
|
+
"id": "creatives.containersV2.Rcs.templateTypeLabel",
|
|
89891
|
+
},
|
|
89892
|
+
],
|
|
89893
|
+
Array [
|
|
89894
|
+
Object {
|
|
89895
|
+
"defaultMessage": "Text message",
|
|
89896
|
+
"id": "creatives.containersV2.Rcs.templateDescLabel",
|
|
89897
|
+
},
|
|
89898
|
+
],
|
|
89899
|
+
Array [
|
|
89900
|
+
Object {
|
|
89901
|
+
"defaultMessage": "Add variables",
|
|
89902
|
+
"id": "creatives.containersV2.Rcs.addVar",
|
|
89903
|
+
},
|
|
89904
|
+
],
|
|
89905
|
+
Array [
|
|
89906
|
+
Object {
|
|
89907
|
+
"defaultMessage": "Enter the text message",
|
|
89908
|
+
"id": "creatives.containersV2.Rcs.templateDescPlaceholder",
|
|
89909
|
+
},
|
|
89910
|
+
],
|
|
89911
|
+
Array [
|
|
89912
|
+
Object {
|
|
89913
|
+
"defaultMessage": "Characters count: {currentLength}/{maxLength}",
|
|
89914
|
+
"id": "creatives.containersV2.Rcs.templateMessageLength",
|
|
89915
|
+
},
|
|
89916
|
+
Object {
|
|
89917
|
+
"currentLength": 0,
|
|
89918
|
+
"maxLength": 160,
|
|
89919
|
+
},
|
|
89920
|
+
],
|
|
89921
|
+
Array [
|
|
89922
|
+
Object {
|
|
89923
|
+
"defaultMessage": "Buttons",
|
|
89924
|
+
"id": "creatives.containersV2.Rcs.btnLabel",
|
|
89925
|
+
},
|
|
89926
|
+
],
|
|
89927
|
+
Array [
|
|
89928
|
+
Object {
|
|
89929
|
+
"defaultMessage": "Use buttons to redirect user to respective link or quick response/ action.",
|
|
89930
|
+
"id": "creatives.containersV2.Rcs.btnDesc",
|
|
89931
|
+
},
|
|
89932
|
+
],
|
|
89825
89933
|
],
|
|
89826
89934
|
"results": Array [
|
|
89827
89935
|
Object {
|
|
@@ -90344,6 +90452,66 @@ new message content.",
|
|
|
90344
90452
|
"type": "return",
|
|
90345
90453
|
"value": undefined,
|
|
90346
90454
|
},
|
|
90455
|
+
Object {
|
|
90456
|
+
"type": "return",
|
|
90457
|
+
"value": undefined,
|
|
90458
|
+
},
|
|
90459
|
+
Object {
|
|
90460
|
+
"type": "return",
|
|
90461
|
+
"value": undefined,
|
|
90462
|
+
},
|
|
90463
|
+
Object {
|
|
90464
|
+
"type": "return",
|
|
90465
|
+
"value": undefined,
|
|
90466
|
+
},
|
|
90467
|
+
Object {
|
|
90468
|
+
"type": "return",
|
|
90469
|
+
"value": undefined,
|
|
90470
|
+
},
|
|
90471
|
+
Object {
|
|
90472
|
+
"type": "return",
|
|
90473
|
+
"value": undefined,
|
|
90474
|
+
},
|
|
90475
|
+
Object {
|
|
90476
|
+
"type": "return",
|
|
90477
|
+
"value": undefined,
|
|
90478
|
+
},
|
|
90479
|
+
Object {
|
|
90480
|
+
"type": "return",
|
|
90481
|
+
"value": undefined,
|
|
90482
|
+
},
|
|
90483
|
+
Object {
|
|
90484
|
+
"type": "return",
|
|
90485
|
+
"value": undefined,
|
|
90486
|
+
},
|
|
90487
|
+
Object {
|
|
90488
|
+
"type": "return",
|
|
90489
|
+
"value": undefined,
|
|
90490
|
+
},
|
|
90491
|
+
Object {
|
|
90492
|
+
"type": "return",
|
|
90493
|
+
"value": undefined,
|
|
90494
|
+
},
|
|
90495
|
+
Object {
|
|
90496
|
+
"type": "return",
|
|
90497
|
+
"value": undefined,
|
|
90498
|
+
},
|
|
90499
|
+
Object {
|
|
90500
|
+
"type": "return",
|
|
90501
|
+
"value": undefined,
|
|
90502
|
+
},
|
|
90503
|
+
Object {
|
|
90504
|
+
"type": "return",
|
|
90505
|
+
"value": undefined,
|
|
90506
|
+
},
|
|
90507
|
+
Object {
|
|
90508
|
+
"type": "return",
|
|
90509
|
+
"value": undefined,
|
|
90510
|
+
},
|
|
90511
|
+
Object {
|
|
90512
|
+
"type": "return",
|
|
90513
|
+
"value": undefined,
|
|
90514
|
+
},
|
|
90347
90515
|
],
|
|
90348
90516
|
},
|
|
90349
90517
|
}
|
|
@@ -97024,7 +97192,6 @@ new message content.",
|
|
|
97024
97192
|
Object {
|
|
97025
97193
|
"rcsPreviewContent": Object {
|
|
97026
97194
|
"rcsDesc": "",
|
|
97027
|
-
"rcsImageSrc": "",
|
|
97028
97195
|
"rcsSuggestions": Array [
|
|
97029
97196
|
Object {
|
|
97030
97197
|
"index": 0,
|
|
@@ -97037,7 +97204,6 @@ new message content.",
|
|
|
97037
97204
|
},
|
|
97038
97205
|
],
|
|
97039
97206
|
"rcsTitle": "",
|
|
97040
|
-
"rcsVideoSrc": "",
|
|
97041
97207
|
},
|
|
97042
97208
|
}
|
|
97043
97209
|
}
|
|
@@ -97051,7 +97217,6 @@ new message content.",
|
|
|
97051
97217
|
Object {
|
|
97052
97218
|
"rcsPreviewContent": Object {
|
|
97053
97219
|
"rcsDesc": "",
|
|
97054
|
-
"rcsImageSrc": "",
|
|
97055
97220
|
"rcsSuggestions": Array [
|
|
97056
97221
|
Object {
|
|
97057
97222
|
"index": 0,
|
|
@@ -97064,7 +97229,6 @@ new message content.",
|
|
|
97064
97229
|
},
|
|
97065
97230
|
],
|
|
97066
97231
|
"rcsTitle": "",
|
|
97067
|
-
"rcsVideoSrc": "",
|
|
97068
97232
|
},
|
|
97069
97233
|
}
|
|
97070
97234
|
}
|