@capillarytech/creatives-library 7.17.118-alpha.0 → 7.17.118
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/tests/integration/TemplateCreation/TemplateCreation.integration.test.js +12 -16
- package/v2Components/CapImageUpload/index.js +16 -15
- package/v2Components/CapImageUpload/messages.js +5 -1
- package/v2Components/CapVideoUpload/constants.js +0 -5
- package/v2Components/CapVideoUpload/index.js +8 -28
- package/v2Components/CapVideoUpload/index.scss +1 -4
- package/v2Components/CapVideoUpload/messages.js +4 -4
- package/v2Components/FormBuilder/constants.js +1 -0
- package/v2Components/FormBuilder/index.js +2 -2
- package/v2Components/TemplatePreview/_templatePreview.scss +0 -21
- package/v2Components/TemplatePreview/index.js +45 -56
- package/v2Containers/CreativesContainer/SlideBoxContent.js +8 -10
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +0 -1
- package/v2Containers/CreativesContainer/index.js +1 -0
- package/v2Containers/CreativesContainer/messages.js +0 -4
- package/v2Containers/CreativesContainer/tests/SlideBoxContent.test.js +0 -11
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +0 -225
- package/v2Containers/Email/index.js +3 -1
- package/v2Containers/EmailWrapper/index.js +3 -0
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +20 -35
- package/v2Containers/Templates/_templates.scss +4 -9
- package/v2Containers/Templates/index.js +8 -29
- package/v2Containers/Viber/constants.js +0 -58
- package/v2Containers/Viber/index.js +421 -409
- package/v2Containers/Viber/messages.js +0 -68
- package/v2Components/CapImageUpload/constants.js +0 -6
- package/v2Containers/Viber/index.scss +0 -113
- package/v2Containers/Viber/style.js +0 -20
- package/v2Containers/Viber/tests/index.test.js +0 -297
- package/v2Containers/Viber/tests/mockData.js +0 -134
|
@@ -658,231 +658,6 @@ exports[`Test SlideBoxContent container Should render correct component for rcs
|
|
|
658
658
|
</SlideBoxContent__CreativesWrapper>
|
|
659
659
|
`;
|
|
660
660
|
|
|
661
|
-
exports[`Test SlideBoxContent container Should render correct component for viber channel preview mode 1`] = `
|
|
662
|
-
<SlideBoxContent__CreativesWrapper>
|
|
663
|
-
<InjectIntl(TemplatePreview)
|
|
664
|
-
channel="viber"
|
|
665
|
-
charCounterEnabled={false}
|
|
666
|
-
content={
|
|
667
|
-
Object {
|
|
668
|
-
"viberPreviewContent": Object {
|
|
669
|
-
"buttonText": undefined,
|
|
670
|
-
"messageContent": "",
|
|
671
|
-
"videoParams": Object {
|
|
672
|
-
"viberVideoPreviewImg": "https://crm-nightly-new-fileservice.s3.amazonaws.com/video_screenshot_assets__1715924855107.png/1040",
|
|
673
|
-
"viberVideoSrc": "https://crm-nightly-new-fileservice.s3.amazonaws.com/video_screenshot_assets__1715924855107.png/1040",
|
|
674
|
-
},
|
|
675
|
-
},
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
showCount={true}
|
|
679
|
-
templateData={
|
|
680
|
-
Object {
|
|
681
|
-
"_id": "6646ef8af3c82f686462cf91",
|
|
682
|
-
"createdAt": "2024-05-17T05:47:54.636Z",
|
|
683
|
-
"createdBy": "50685415",
|
|
684
|
-
"isActive": true,
|
|
685
|
-
"name": "test temp_2",
|
|
686
|
-
"orgId": 1231,
|
|
687
|
-
"type": "VIBER",
|
|
688
|
-
"updatedAt": "2024-05-17T12:05:52.950Z",
|
|
689
|
-
"updatedBy": "50685415",
|
|
690
|
-
"versions": Object {
|
|
691
|
-
"base": Object {
|
|
692
|
-
"content": Object {
|
|
693
|
-
"content": Object {
|
|
694
|
-
"video": Object {
|
|
695
|
-
"duration": "",
|
|
696
|
-
"thumbnailUrl": "https://crm-nightly-new-fileservice.s3.amazonaws.com/video_screenshot_assets__1715924855107.png/1040",
|
|
697
|
-
"url": "https://crm-nightly-new-fileservice.s3.amazonaws.com/video_screenshot_assets__1715924855107.png/1040",
|
|
698
|
-
},
|
|
699
|
-
},
|
|
700
|
-
"destinations": Array [
|
|
701
|
-
Object {
|
|
702
|
-
"to": Object {
|
|
703
|
-
"phoneNumber": "{{viber_user_id}}",
|
|
704
|
-
},
|
|
705
|
-
},
|
|
706
|
-
],
|
|
707
|
-
},
|
|
708
|
-
},
|
|
709
|
-
"history": Array [],
|
|
710
|
-
},
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
viberBrandName=""
|
|
714
|
-
/>
|
|
715
|
-
</SlideBoxContent__CreativesWrapper>
|
|
716
|
-
`;
|
|
717
|
-
|
|
718
|
-
exports[`Test SlideBoxContent container Should render correct component for viber channel preview mode 2`] = `
|
|
719
|
-
<SlideBoxContent__CreativesWrapper>
|
|
720
|
-
<InjectIntl(TemplatePreview)
|
|
721
|
-
channel="viber"
|
|
722
|
-
charCounterEnabled={false}
|
|
723
|
-
content={
|
|
724
|
-
Object {
|
|
725
|
-
"viberPreviewContent": Object {
|
|
726
|
-
"buttonText": "test button",
|
|
727
|
-
"imageURL": "https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/19e1c698-7be8-4f03-beb5-c96b11a3.jpg",
|
|
728
|
-
"messageContent": "test msg",
|
|
729
|
-
},
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
showCount={true}
|
|
733
|
-
templateData={
|
|
734
|
-
Object {
|
|
735
|
-
"_id": "664670d929ce5e6fd17c355f",
|
|
736
|
-
"createdAt": "2024-05-16T20:47:21.488Z",
|
|
737
|
-
"createdBy": "50685415",
|
|
738
|
-
"isActive": true,
|
|
739
|
-
"name": "test temp_1",
|
|
740
|
-
"orgId": 1231,
|
|
741
|
-
"type": "VIBER",
|
|
742
|
-
"updatedAt": "2024-05-17T13:25:49.078Z",
|
|
743
|
-
"updatedBy": "50685415",
|
|
744
|
-
"versions": Object {
|
|
745
|
-
"base": Object {
|
|
746
|
-
"content": Object {
|
|
747
|
-
"content": Object {
|
|
748
|
-
"button": Object {
|
|
749
|
-
"text": "test button",
|
|
750
|
-
"url": "https://www.figma.com/file/2iksCNafQinyHxqAoKYR0z/Badges-in-Campaigns-and-Journeys?type=design&node-id=10-66632&mode=design&t=J0LMbSnho0paUjJK-0",
|
|
751
|
-
},
|
|
752
|
-
"image": Object {
|
|
753
|
-
"url": "https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/19e1c698-7be8-4f03-beb5-c96b11a3.jpg",
|
|
754
|
-
},
|
|
755
|
-
"text": "test msg",
|
|
756
|
-
},
|
|
757
|
-
"destinations": Array [
|
|
758
|
-
Object {
|
|
759
|
-
"to": Object {
|
|
760
|
-
"phoneNumber": "{{viber_user_id}}",
|
|
761
|
-
},
|
|
762
|
-
},
|
|
763
|
-
],
|
|
764
|
-
},
|
|
765
|
-
},
|
|
766
|
-
"history": Array [],
|
|
767
|
-
},
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
viberBrandName=""
|
|
771
|
-
/>
|
|
772
|
-
</SlideBoxContent__CreativesWrapper>
|
|
773
|
-
`;
|
|
774
|
-
|
|
775
|
-
exports[`Test SlideBoxContent container Should render correct component for viber channel preview mode 3`] = `
|
|
776
|
-
<SlideBoxContent__CreativesWrapper>
|
|
777
|
-
<InjectIntl(TemplatePreview)
|
|
778
|
-
channel="viber"
|
|
779
|
-
charCounterEnabled={false}
|
|
780
|
-
content={
|
|
781
|
-
Object {
|
|
782
|
-
"viberPreviewContent": Object {
|
|
783
|
-
"buttonText": "test button",
|
|
784
|
-
"messageContent": "test video message test video messagetest video messagetest video messagetest video messagetest video messagetest video messagetest video messagetest video messagetest video messagetest video messagetest video messagetest video message test video message test video messagetest video messagetest video messagetest video messagetest video messagetest video messagetest video messagetest overrrrrrrrr",
|
|
785
|
-
"videoParams": Object {
|
|
786
|
-
"viberVideoPreviewImg": "https://crm-nightly-new-fileservice.s3.amazonaws.com/video_screenshot_assets__1715924855107.png/1040",
|
|
787
|
-
"viberVideoSrc": "https://crm-nightly-new-fileservice.s3.amazonaws.com/video_screenshot_assets__1715924855107.png/1040",
|
|
788
|
-
},
|
|
789
|
-
},
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
showCount={true}
|
|
793
|
-
templateData={
|
|
794
|
-
Object {
|
|
795
|
-
"_id": "6646ef8af3c82f686462cf91",
|
|
796
|
-
"createdAt": "2024-05-17T05:47:54.636Z",
|
|
797
|
-
"createdBy": "50685415",
|
|
798
|
-
"isActive": true,
|
|
799
|
-
"name": "test temp_2",
|
|
800
|
-
"orgId": 1231,
|
|
801
|
-
"type": "VIBER",
|
|
802
|
-
"updatedAt": "2024-05-17T12:05:52.950Z",
|
|
803
|
-
"updatedBy": "50685415",
|
|
804
|
-
"versions": Object {
|
|
805
|
-
"base": Object {
|
|
806
|
-
"content": Object {
|
|
807
|
-
"content": Object {
|
|
808
|
-
"button": Object {
|
|
809
|
-
"text": "test button",
|
|
810
|
-
"url": "https://www.test.com/file/",
|
|
811
|
-
},
|
|
812
|
-
"text": "test video message test video messagetest video messagetest video messagetest video messagetest video messagetest video messagetest video messagetest video messagetest video messagetest video messagetest video messagetest video message test video message test video messagetest video messagetest video messagetest video messagetest video messagetest video messagetest video messagetest overrrrrrrrr",
|
|
813
|
-
"video": Object {
|
|
814
|
-
"duration": "",
|
|
815
|
-
"thumbnailUrl": "https://crm-nightly-new-fileservice.s3.amazonaws.com/video_screenshot_assets__1715924855107.png/1040",
|
|
816
|
-
"url": "https://crm-nightly-new-fileservice.s3.amazonaws.com/video_screenshot_assets__1715924855107.png/1040",
|
|
817
|
-
},
|
|
818
|
-
},
|
|
819
|
-
"destinations": Array [
|
|
820
|
-
Object {
|
|
821
|
-
"to": Object {
|
|
822
|
-
"phoneNumber": "{{viber_user_id}}",
|
|
823
|
-
},
|
|
824
|
-
},
|
|
825
|
-
],
|
|
826
|
-
},
|
|
827
|
-
},
|
|
828
|
-
"history": Array [],
|
|
829
|
-
},
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
viberBrandName=""
|
|
833
|
-
/>
|
|
834
|
-
</SlideBoxContent__CreativesWrapper>
|
|
835
|
-
`;
|
|
836
|
-
|
|
837
|
-
exports[`Test SlideBoxContent container Should render correct component for viber channel preview mode 4`] = `
|
|
838
|
-
<SlideBoxContent__CreativesWrapper>
|
|
839
|
-
<InjectIntl(TemplatePreview)
|
|
840
|
-
channel="viber"
|
|
841
|
-
charCounterEnabled={false}
|
|
842
|
-
content={
|
|
843
|
-
Object {
|
|
844
|
-
"viberPreviewContent": Object {
|
|
845
|
-
"buttonText": undefined,
|
|
846
|
-
"messageContent": "test",
|
|
847
|
-
},
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
showCount={true}
|
|
851
|
-
templateData={
|
|
852
|
-
Object {
|
|
853
|
-
"_id": "6646ef8af3c82f686462cf91",
|
|
854
|
-
"createdAt": "2024-05-17T05:47:54.636Z",
|
|
855
|
-
"createdBy": "50685415",
|
|
856
|
-
"isActive": true,
|
|
857
|
-
"name": "test temp_2",
|
|
858
|
-
"orgId": 1231,
|
|
859
|
-
"type": "VIBER",
|
|
860
|
-
"updatedAt": "2024-05-17T12:05:52.950Z",
|
|
861
|
-
"updatedBy": "50685415",
|
|
862
|
-
"versions": Object {
|
|
863
|
-
"base": Object {
|
|
864
|
-
"content": Object {
|
|
865
|
-
"content": Object {
|
|
866
|
-
"text": "test",
|
|
867
|
-
},
|
|
868
|
-
"destinations": Array [
|
|
869
|
-
Object {
|
|
870
|
-
"to": Object {
|
|
871
|
-
"phoneNumber": "{{viber_user_id}}",
|
|
872
|
-
},
|
|
873
|
-
},
|
|
874
|
-
],
|
|
875
|
-
},
|
|
876
|
-
},
|
|
877
|
-
"history": Array [],
|
|
878
|
-
},
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
viberBrandName=""
|
|
882
|
-
/>
|
|
883
|
-
</SlideBoxContent__CreativesWrapper>
|
|
884
|
-
`;
|
|
885
|
-
|
|
886
661
|
exports[`Test SlideBoxContent container Should render correct component for whatsapp channel create mode 1`] = `
|
|
887
662
|
<SlideBoxContent__CreativesWrapper>
|
|
888
663
|
<Connect(UserIsAuthenticated(Connect(InjectIntl(CreativesCommon))))
|
|
@@ -2653,7 +2653,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2653
2653
|
const previewHeader = (<h3>{this.props.intl.formatMessage(messages.h3emailPreview)}</h3>);
|
|
2654
2654
|
const imagePreviewHeader = (<h3>{this.props.intl.formatMessage(messages.h3imageSelection)}</h3>);
|
|
2655
2655
|
const imagePreviewContent = this.getImagePreviewContent();
|
|
2656
|
-
const { selectedOfferDetails, getDefaultTags, Email: { CmsSettings = {} } = {} } = this.props;
|
|
2656
|
+
const { selectedOfferDetails, getDefaultTags, Email: { CmsSettings = {} } = {}, moduleType = '' } = this.props;
|
|
2657
2657
|
if (!this.props.currentOrgDetails || !this.props.currentOrgDetails.basic_details) {
|
|
2658
2658
|
return (<div>Loading...</div>);
|
|
2659
2659
|
}
|
|
@@ -2721,6 +2721,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2721
2721
|
uuid={CmsSettings.uuid}
|
|
2722
2722
|
type={CmsSettings.type}
|
|
2723
2723
|
isEmailLoading={isLoading}
|
|
2724
|
+
moduleType={moduleType}
|
|
2724
2725
|
/> : ''}
|
|
2725
2726
|
</Col>
|
|
2726
2727
|
</Row>
|
|
@@ -2776,6 +2777,7 @@ Email.propTypes = {
|
|
|
2776
2777
|
selectedOfferDetails: PropTypes.array,
|
|
2777
2778
|
onPreviewContentClicked: PropTypes.func,
|
|
2778
2779
|
onTestContentClicked: PropTypes.func,
|
|
2780
|
+
moduleType: PropTypes.string,
|
|
2779
2781
|
};
|
|
2780
2782
|
|
|
2781
2783
|
const mapStateToProps = (state, props) => createStructuredSelector({
|
|
@@ -208,6 +208,7 @@ export class EmailWrapper extends React.Component { // eslint-disable-line react
|
|
|
208
208
|
cmsTemplatesLoader,
|
|
209
209
|
editor,
|
|
210
210
|
currentOrgDetails,
|
|
211
|
+
moduleType,
|
|
211
212
|
} = this.props;
|
|
212
213
|
const {
|
|
213
214
|
templateName,
|
|
@@ -278,6 +279,7 @@ export class EmailWrapper extends React.Component { // eslint-disable-line react
|
|
|
278
279
|
onPreviewContentClicked={onPreviewContentClicked}
|
|
279
280
|
onTestContentClicked={onTestContentClicked}
|
|
280
281
|
editor={editor}
|
|
282
|
+
moduleType={moduleType}
|
|
281
283
|
/>}
|
|
282
284
|
{!isShowEmailCreate && (
|
|
283
285
|
<CmsTemplatesComponent
|
|
@@ -319,6 +321,7 @@ EmailWrapper.propTypes = {
|
|
|
319
321
|
selectedOfferDetails: PropTypes.array,
|
|
320
322
|
getCmsTemplatesInProgress: PropTypes.bool,
|
|
321
323
|
currentOrgDetails: PropTypes.object,
|
|
324
|
+
moduleType: PropTypes.string,
|
|
322
325
|
};
|
|
323
326
|
|
|
324
327
|
const mapStateToProps = createStructuredSelector({
|
|
@@ -52033,20 +52033,17 @@ new message content.",
|
|
|
52033
52033
|
</span>
|
|
52034
52034
|
</CapHeading__CapHeadingSpan>
|
|
52035
52035
|
<CapHeading__CapHeadingSpan
|
|
52036
|
+
className="image-size"
|
|
52036
52037
|
type="label2"
|
|
52037
52038
|
>
|
|
52038
52039
|
<span
|
|
52039
|
-
className="CapHeading__CapHeadingSpan-vrvcag-1 gVHIPQ"
|
|
52040
|
+
className="image-size CapHeading__CapHeadingSpan-vrvcag-1 gVHIPQ"
|
|
52040
52041
|
type="label2"
|
|
52041
52042
|
>
|
|
52042
52043
|
<FormattedMessage
|
|
52043
|
-
defaultMessage="Size upto:
|
|
52044
|
+
defaultMessage="Size upto: 2MB"
|
|
52044
52045
|
id="creatives.componentsV2.CapImageUpload.imageSize"
|
|
52045
|
-
values={
|
|
52046
|
-
Object {
|
|
52047
|
-
"size": 2,
|
|
52048
|
-
}
|
|
52049
|
-
}
|
|
52046
|
+
values={Object {}}
|
|
52050
52047
|
>
|
|
52051
52048
|
<span>
|
|
52052
52049
|
Size upto: 2MB
|
|
@@ -67479,20 +67476,17 @@ new message content.",
|
|
|
67479
67476
|
</span>
|
|
67480
67477
|
</CapHeading__CapHeadingSpan>
|
|
67481
67478
|
<CapHeading__CapHeadingSpan
|
|
67479
|
+
className="image-size"
|
|
67482
67480
|
type="label2"
|
|
67483
67481
|
>
|
|
67484
67482
|
<span
|
|
67485
|
-
className="CapHeading__CapHeadingSpan-vrvcag-1 gVHIPQ"
|
|
67483
|
+
className="image-size CapHeading__CapHeadingSpan-vrvcag-1 gVHIPQ"
|
|
67486
67484
|
type="label2"
|
|
67487
67485
|
>
|
|
67488
67486
|
<FormattedMessage
|
|
67489
|
-
defaultMessage="Size upto:
|
|
67487
|
+
defaultMessage="Size upto: 2MB"
|
|
67490
67488
|
id="creatives.componentsV2.CapImageUpload.imageSize"
|
|
67491
|
-
values={
|
|
67492
|
-
Object {
|
|
67493
|
-
"size": 2,
|
|
67494
|
-
}
|
|
67495
|
-
}
|
|
67489
|
+
values={Object {}}
|
|
67496
67490
|
>
|
|
67497
67491
|
<span>
|
|
67498
67492
|
Size upto: 2MB
|
|
@@ -82819,20 +82813,17 @@ new message content.",
|
|
|
82819
82813
|
</span>
|
|
82820
82814
|
</CapHeading__CapHeadingSpan>
|
|
82821
82815
|
<CapHeading__CapHeadingSpan
|
|
82816
|
+
className="image-size"
|
|
82822
82817
|
type="label2"
|
|
82823
82818
|
>
|
|
82824
82819
|
<span
|
|
82825
|
-
className="CapHeading__CapHeadingSpan-vrvcag-1 gVHIPQ"
|
|
82820
|
+
className="image-size CapHeading__CapHeadingSpan-vrvcag-1 gVHIPQ"
|
|
82826
82821
|
type="label2"
|
|
82827
82822
|
>
|
|
82828
82823
|
<FormattedMessage
|
|
82829
|
-
defaultMessage="Size upto:
|
|
82824
|
+
defaultMessage="Size upto: 2MB"
|
|
82830
82825
|
id="creatives.componentsV2.CapImageUpload.imageSize"
|
|
82831
|
-
values={
|
|
82832
|
-
Object {
|
|
82833
|
-
"size": 2,
|
|
82834
|
-
}
|
|
82835
|
-
}
|
|
82826
|
+
values={Object {}}
|
|
82836
82827
|
>
|
|
82837
82828
|
<span>
|
|
82838
82829
|
Size upto: 2MB
|
|
@@ -98265,20 +98256,17 @@ new message content.",
|
|
|
98265
98256
|
</span>
|
|
98266
98257
|
</CapHeading__CapHeadingSpan>
|
|
98267
98258
|
<CapHeading__CapHeadingSpan
|
|
98259
|
+
className="image-size"
|
|
98268
98260
|
type="label2"
|
|
98269
98261
|
>
|
|
98270
98262
|
<span
|
|
98271
|
-
className="CapHeading__CapHeadingSpan-vrvcag-1 gVHIPQ"
|
|
98263
|
+
className="image-size CapHeading__CapHeadingSpan-vrvcag-1 gVHIPQ"
|
|
98272
98264
|
type="label2"
|
|
98273
98265
|
>
|
|
98274
98266
|
<FormattedMessage
|
|
98275
|
-
defaultMessage="Size upto:
|
|
98267
|
+
defaultMessage="Size upto: 2MB"
|
|
98276
98268
|
id="creatives.componentsV2.CapImageUpload.imageSize"
|
|
98277
|
-
values={
|
|
98278
|
-
Object {
|
|
98279
|
-
"size": 2,
|
|
98280
|
-
}
|
|
98281
|
-
}
|
|
98269
|
+
values={Object {}}
|
|
98282
98270
|
>
|
|
98283
98271
|
<span>
|
|
98284
98272
|
Size upto: 2MB
|
|
@@ -122762,20 +122750,17 @@ new message content.",
|
|
|
122762
122750
|
</span>
|
|
122763
122751
|
</CapHeading__CapHeadingSpan>
|
|
122764
122752
|
<CapHeading__CapHeadingSpan
|
|
122753
|
+
className="image-size"
|
|
122765
122754
|
type="label2"
|
|
122766
122755
|
>
|
|
122767
122756
|
<span
|
|
122768
|
-
className="CapHeading__CapHeadingSpan-vrvcag-1 gVHIPQ"
|
|
122757
|
+
className="image-size CapHeading__CapHeadingSpan-vrvcag-1 gVHIPQ"
|
|
122769
122758
|
type="label2"
|
|
122770
122759
|
>
|
|
122771
122760
|
<FormattedMessage
|
|
122772
|
-
defaultMessage="Size upto:
|
|
122761
|
+
defaultMessage="Size upto: 2MB"
|
|
122773
122762
|
id="creatives.componentsV2.CapImageUpload.imageSize"
|
|
122774
|
-
values={
|
|
122775
|
-
Object {
|
|
122776
|
-
"size": 2,
|
|
122777
|
-
}
|
|
122778
|
-
}
|
|
122763
|
+
values={Object {}}
|
|
122779
122764
|
>
|
|
122780
122765
|
<span>
|
|
122781
122766
|
Size upto: 2MB
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
}
|
|
118
118
|
.VIBER {
|
|
119
119
|
&.cap-custom-card{
|
|
120
|
-
height:
|
|
120
|
+
height: 241px;
|
|
121
121
|
.ant-card-body {
|
|
122
122
|
padding:0px 24px 0px;
|
|
123
123
|
.button-content {
|
|
@@ -137,18 +137,18 @@
|
|
|
137
137
|
.truncate-text-viber{
|
|
138
138
|
.ant-card-meta-description{
|
|
139
139
|
display: -webkit-box;
|
|
140
|
-
-webkit-line-clamp:
|
|
140
|
+
-webkit-line-clamp: 9;
|
|
141
141
|
-webkit-box-orient: vertical;
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
.truncate-text-with-button{
|
|
145
145
|
.ant-card-meta-description{
|
|
146
|
-
-webkit-line-clamp:
|
|
146
|
+
-webkit-line-clamp: 8;
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
.truncate-text-with-image{
|
|
150
150
|
.ant-card-meta-description{
|
|
151
|
-
-webkit-line-clamp:
|
|
151
|
+
-webkit-line-clamp: 2;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
|
|
@@ -620,11 +620,6 @@
|
|
|
620
620
|
max-height: 123px;
|
|
621
621
|
margin-bottom: 4px;
|
|
622
622
|
}
|
|
623
|
-
.viber-image{
|
|
624
|
-
width: 100%;
|
|
625
|
-
max-height: 11rem;
|
|
626
|
-
margin-bottom: $CAP_SPACE_04;
|
|
627
|
-
}
|
|
628
623
|
.whatsapp-doc {
|
|
629
624
|
width: 100%;
|
|
630
625
|
max-height: 123px;
|
|
@@ -1232,41 +1232,20 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
1232
1232
|
case VIBER: {
|
|
1233
1233
|
const {
|
|
1234
1234
|
content: {
|
|
1235
|
-
|
|
1235
|
+
viber: {
|
|
1236
1236
|
text = '',
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1237
|
+
imageURL = '',
|
|
1238
|
+
buttonURL = '',
|
|
1239
|
+
buttonText = '',
|
|
1240
1240
|
} = {},
|
|
1241
1241
|
} = {},
|
|
1242
1242
|
} = template.versions.base;
|
|
1243
1243
|
templateData.content = text;
|
|
1244
|
-
if (
|
|
1245
|
-
|
|
1246
|
-
templateData.url = url;
|
|
1247
|
-
templateData.mediaContent = (
|
|
1248
|
-
<CapImage src={url} className="viber-image" />
|
|
1249
|
-
);
|
|
1250
|
-
}
|
|
1251
|
-
if (!isEmpty(video)) {
|
|
1252
|
-
const { thumbnailUrl = '' } = video;
|
|
1253
|
-
templateData.url = thumbnailUrl;
|
|
1254
|
-
templateData.mediaContent = (
|
|
1255
|
-
<>
|
|
1256
|
-
<div className="video-preview">
|
|
1257
|
-
<CapImage
|
|
1258
|
-
src={thumbnailUrl}
|
|
1259
|
-
className="viber-image"
|
|
1260
|
-
/>
|
|
1261
|
-
<div className="icon-position">
|
|
1262
|
-
<CapImage className="video-icon" src={videoPlay} />
|
|
1263
|
-
</div>
|
|
1264
|
-
</div>
|
|
1265
|
-
</>
|
|
1266
|
-
);
|
|
1244
|
+
if (imageURL) {
|
|
1245
|
+
templateData.url = imageURL;
|
|
1267
1246
|
}
|
|
1268
|
-
if (
|
|
1269
|
-
templateData.buttonText =
|
|
1247
|
+
if (buttonURL && buttonText) {
|
|
1248
|
+
templateData.buttonText = buttonText;
|
|
1270
1249
|
}
|
|
1271
1250
|
break;
|
|
1272
1251
|
}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import { FormattedMessage } from "react-intl";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import CapHeading from "@capillarytech/cap-ui-library/CapHeading";
|
|
4
|
-
import CapLabel from "@capillarytech/cap-ui-library/CapLabel";
|
|
5
|
-
import messages from "./messages";
|
|
6
|
-
|
|
7
1
|
export const DEFAULT_ACTION = 'app/v2Containers/Viber/DEFAULT_ACTION';
|
|
8
2
|
export const ALLOWED_EXTENSIONS_REGEX = (/\.(jpe?g|png)$/i);
|
|
9
3
|
export const VIBER_IMG_HEIGHT = 400;
|
|
10
4
|
export const VIBER_IMG_WIDTH = 300;
|
|
11
5
|
export const VIBER_IMG_SIZE = 10000000;
|
|
12
|
-
export const VIBER_VIDEO_SIZE = 209715200;
|
|
13
6
|
export const charLimit = 1000;
|
|
14
7
|
|
|
15
8
|
export const UPLOAD_VIBER_ASSET_REQUEST = 'app/v2Containers/Viber/UPLOAD_ASSET_REQUEST';
|
|
@@ -35,54 +28,3 @@ export const CLEAR_VIBER_DATA = 'app/v2Containers/VIBER/Edit/CLEAR_DATA';
|
|
|
35
28
|
export const CLEAR_VIBER_CREATE_RESPONSE_REQUEST = 'app/v2Containers/VIBER/Create/CLEAR_EDIT_RESPONSE_REQUEST';
|
|
36
29
|
export const CLEAR_VIBER_ASSET = 'app/v2Containers/Viber/CLEAR_ASSET';
|
|
37
30
|
|
|
38
|
-
export const VIBER_MEDIA_TYPES = {
|
|
39
|
-
TEXT: 'TEXT',
|
|
40
|
-
IMAGE: 'IMAGE',
|
|
41
|
-
VIDEO: 'VIDEO',
|
|
42
|
-
};
|
|
43
|
-
export const ALLOWED_IMAGE_EXTENSIONS_REGEX_VIBER = /\.(jpe?g|png)$/i;
|
|
44
|
-
export const ALLOWED_EXTENSIONS_VIDEO_REGEX_VIBER = /\.(mp4|3gp|m4v|mov)$/i;
|
|
45
|
-
export const NONE = 'NONE';
|
|
46
|
-
export const CTA = 'CTA';
|
|
47
|
-
export const VIBER_BUTTON_TYPES = {
|
|
48
|
-
NONE,
|
|
49
|
-
CTA,
|
|
50
|
-
};
|
|
51
|
-
export const mediaRadioOptions = [
|
|
52
|
-
{
|
|
53
|
-
value: VIBER_MEDIA_TYPES.TEXT,
|
|
54
|
-
label: <FormattedMessage {...messages.mediaText} />,
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
value: VIBER_MEDIA_TYPES.IMAGE,
|
|
58
|
-
label: <FormattedMessage {...messages.mediaImage} />,
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
value: VIBER_MEDIA_TYPES.VIDEO,
|
|
62
|
-
label: <FormattedMessage {...messages.mediaVideo} />,
|
|
63
|
-
},
|
|
64
|
-
];
|
|
65
|
-
|
|
66
|
-
export const buttonRadioOptions = [
|
|
67
|
-
{
|
|
68
|
-
value: VIBER_BUTTON_TYPES.NONE,
|
|
69
|
-
label: (
|
|
70
|
-
<CapHeading type="h4" className="viber-button-none">
|
|
71
|
-
{<FormattedMessage {...messages.btnTypeNone} />}
|
|
72
|
-
</CapHeading>
|
|
73
|
-
),
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
value: VIBER_BUTTON_TYPES.CTA,
|
|
77
|
-
label: (
|
|
78
|
-
<>
|
|
79
|
-
<div className="viber-button-cta">
|
|
80
|
-
<CapHeading type="h4">
|
|
81
|
-
{<FormattedMessage {...messages.btnTypeCTA} />}
|
|
82
|
-
</CapHeading>
|
|
83
|
-
<CapLabel>{<FormattedMessage {...messages.ctaDesc} />}</CapLabel>
|
|
84
|
-
</div>
|
|
85
|
-
</>
|
|
86
|
-
),
|
|
87
|
-
},
|
|
88
|
-
];
|