@capillarytech/creatives-library 8.0.128 → 8.0.129
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/App/constants.js +1 -0
- package/package.json +1 -1
- package/services/api.js +1 -1
- package/tests/integration/TemplateCreation/TemplateCreation.integration.test.js +8 -3
- package/tests/integration/TemplateCreation/api-response.js +5 -0
- package/tests/integration/TemplateCreation/msw-handler.js +42 -63
- package/utils/common.js +7 -0
- package/utils/commonUtils.js +2 -6
- package/utils/createPayload.js +405 -0
- package/utils/tests/createPayload.test.js +785 -0
- package/v2Components/CapImageUpload/index.js +59 -46
- package/v2Components/CapInAppCTA/index.js +1 -0
- package/v2Components/CapMpushCTA/constants.js +25 -0
- package/v2Components/CapMpushCTA/index.js +402 -0
- package/v2Components/CapMpushCTA/index.scss +95 -0
- package/v2Components/CapMpushCTA/messages.js +101 -0
- package/v2Components/CapTagList/index.js +177 -120
- package/v2Components/CapVideoUpload/constants.js +3 -0
- package/v2Components/CapVideoUpload/index.js +167 -110
- package/v2Components/CapVideoUpload/messages.js +16 -0
- package/v2Components/Carousel/index.js +15 -13
- package/v2Components/ErrorInfoNote/style.scss +1 -0
- package/v2Components/MobilePushPreviewV2/index.js +37 -5
- package/v2Components/TemplatePreview/_templatePreview.scss +114 -72
- package/v2Components/TemplatePreview/assets/images/Android _ With date and time.svg +29 -0
- package/v2Components/TemplatePreview/assets/images/android.svg +9 -0
- package/v2Components/TemplatePreview/assets/images/iOS _ With date and time.svg +26 -0
- package/v2Components/TemplatePreview/assets/images/ios.svg +9 -0
- package/v2Components/TemplatePreview/index.js +178 -50
- package/v2Components/TemplatePreview/messages.js +4 -0
- package/v2Containers/CreativesContainer/SlideBoxContent.js +127 -62
- package/v2Containers/CreativesContainer/index.js +191 -136
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +0 -22
- package/v2Containers/InApp/constants.js +1 -0
- package/v2Containers/InApp/index.js +13 -13
- package/v2Containers/MobilePush/Create/index.js +1 -0
- package/v2Containers/MobilePush/commonMethods.js +7 -14
- package/v2Containers/MobilePushNew/actions.js +116 -0
- package/v2Containers/MobilePushNew/components/CtaButtons.js +181 -0
- package/v2Containers/MobilePushNew/components/MediaUploaders.js +834 -0
- package/v2Containers/MobilePushNew/components/PlatformContentFields.js +345 -0
- package/v2Containers/MobilePushNew/components/index.js +5 -0
- package/v2Containers/MobilePushNew/components/tests/CtaButtons.test.js +798 -0
- package/v2Containers/MobilePushNew/components/tests/MediaUploaders.test.js +2114 -0
- package/v2Containers/MobilePushNew/components/tests/PlatformContentFields.test.js +343 -0
- package/v2Containers/MobilePushNew/constants.js +115 -0
- package/v2Containers/MobilePushNew/hooks/tests/usePlatformSync.test.js +1299 -0
- package/v2Containers/MobilePushNew/hooks/tests/useUpload.test.js +1223 -0
- package/v2Containers/MobilePushNew/hooks/usePlatformSync.js +246 -0
- package/v2Containers/MobilePushNew/hooks/useUpload.js +726 -0
- package/v2Containers/MobilePushNew/index.js +3412 -0
- package/v2Containers/MobilePushNew/index.scss +308 -0
- package/v2Containers/MobilePushNew/messages.js +242 -0
- package/v2Containers/MobilePushNew/reducer.js +160 -0
- package/v2Containers/MobilePushNew/sagas.js +198 -0
- package/v2Containers/MobilePushNew/selectors.js +55 -0
- package/v2Containers/MobilePushNew/tests/reducer.test.js +741 -0
- package/v2Containers/MobilePushNew/tests/sagas.test.js +863 -0
- package/v2Containers/MobilePushNew/tests/selectors.test.js +425 -0
- package/v2Containers/MobilePushNew/tests/utils.test.js +322 -0
- package/v2Containers/MobilePushNew/utils.js +33 -0
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +5 -5
- package/v2Containers/TagList/index.js +56 -10
- package/v2Containers/Templates/_templates.scss +101 -1
- package/v2Containers/Templates/index.js +147 -35
- package/v2Containers/Templates/messages.js +8 -0
- package/v2Containers/Templates/sagas.js +2 -0
- package/v2Containers/Whatsapp/constants.js +1 -0
|
@@ -90,4 +90,8 @@ export default defineMessages({
|
|
|
90
90
|
id: `creatives.componentsV2.TemplatePreview.addToCart`,
|
|
91
91
|
defaultMessage: 'Add to cart',
|
|
92
92
|
},
|
|
93
|
+
videoNotSupported: {
|
|
94
|
+
id: 'creatives.componentsV2.TemplatePreview.videoNotSupported',
|
|
95
|
+
defaultMessage: 'Your browser does not support the video tag.',
|
|
96
|
+
},
|
|
93
97
|
});
|
|
@@ -7,7 +7,6 @@ import cloneDeep from 'lodash/cloneDeep';
|
|
|
7
7
|
import TemplatesV2 from '../TemplatesV2';
|
|
8
8
|
import TemplatePreview from '../../v2Components/TemplatePreview';
|
|
9
9
|
import SmsWrapper from '../SmsWrapper';
|
|
10
|
-
// import SmsEdit from '../Sms/Edit';
|
|
11
10
|
import Email from '../Email';
|
|
12
11
|
import EmailWrapper from '../EmailWrapper';
|
|
13
12
|
import MobilepushWrapper from '../MobilepushWrapper';
|
|
@@ -28,6 +27,7 @@ import Rcs from '../Rcs';
|
|
|
28
27
|
import { getWhatsappContent } from '../Whatsapp/utils';
|
|
29
28
|
import * as commonUtil from '../../utils/common';
|
|
30
29
|
import Zalo from '../Zalo';
|
|
30
|
+
import MobilePushNew from '../MobilePushNew';
|
|
31
31
|
const CreativesWrapper = styled.div`
|
|
32
32
|
.ant-popover,
|
|
33
33
|
.ant-notification,
|
|
@@ -424,7 +424,6 @@ export function SlideBoxContent(props) {
|
|
|
424
424
|
channelsToDisable={channelsToDisable}
|
|
425
425
|
messageDetails={messageDetails}
|
|
426
426
|
onFacebookSubmit={onFacebookSubmit}
|
|
427
|
-
location={creativesLocationProps}
|
|
428
427
|
onCreateComplete={onCreateComplete}
|
|
429
428
|
getFormSubscriptionData={getFormData}
|
|
430
429
|
handleClose={handleClose}
|
|
@@ -479,9 +478,7 @@ export function SlideBoxContent(props) {
|
|
|
479
478
|
forwardedTags={forwardedTags}
|
|
480
479
|
/>
|
|
481
480
|
)}
|
|
482
|
-
|
|
483
|
-
<MobilePushPreview templateData={templateData} channel={channel}/>
|
|
484
|
-
}
|
|
481
|
+
|
|
485
482
|
{
|
|
486
483
|
(currentChannel === constants.WECHAT && !!slidBoxContent) && <WechatWrapper
|
|
487
484
|
mode={slidBoxContent}
|
|
@@ -665,63 +662,131 @@ export function SlideBoxContent(props) {
|
|
|
665
662
|
handleCloseTestAndPreview={handleCloseTestAndPreview}
|
|
666
663
|
/>
|
|
667
664
|
)}
|
|
668
|
-
{isEditMPush &&
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
}
|
|
665
|
+
{isEditMPush && (
|
|
666
|
+
(isFullMode && !commonUtil.hasNewMobilePushFeatureEnabled()) ||
|
|
667
|
+
(!isFullMode && isLoyaltyModule) ||
|
|
668
|
+
(!isFullMode && !isLoyaltyModule && !commonUtil.hasNewMobilePushFeatureEnabled()) ? (
|
|
669
|
+
<MobliPushEdit
|
|
670
|
+
getFormLibraryData={getFormData}
|
|
671
|
+
setIsLoadingContent={setIsLoadingContent}
|
|
672
|
+
location={{
|
|
673
|
+
pathname: `/mobilepush/edit/`,
|
|
674
|
+
query,
|
|
675
|
+
}}
|
|
676
|
+
params={{ id: templateData._id }}
|
|
677
|
+
isFullMode={isFullMode}
|
|
678
|
+
isGetFormData={isGetFormData}
|
|
679
|
+
route={{ name: 'mobilepush' }}
|
|
680
|
+
templateData={templateData}
|
|
681
|
+
showTemplateName={showTemplateName}
|
|
682
|
+
getDefaultTags={type}
|
|
683
|
+
onValidationFail={onValidationFail}
|
|
684
|
+
forwardedTags={forwardedTags}
|
|
685
|
+
selectedOfferDetails={selectedOfferDetails}
|
|
686
|
+
onPreviewContentClicked={onPreviewContentClicked}
|
|
687
|
+
onTestContentClicked={onTestContentClicked}
|
|
688
|
+
type={type}
|
|
689
|
+
hideTestAndPreviewBtn={hideTestAndPreviewBtn}
|
|
690
|
+
creativesMode={creativesMode}
|
|
691
|
+
eventContextTags={eventContextTags}
|
|
692
|
+
showLiquidErrorInFooter={showLiquidErrorInFooter}
|
|
693
|
+
/>
|
|
694
|
+
) : (
|
|
695
|
+
<MobilePushNew
|
|
696
|
+
getFormLibraryData={getFormData}
|
|
697
|
+
setIsLoadingContent={setIsLoadingContent}
|
|
698
|
+
location={{
|
|
699
|
+
pathname: `/mobilepush/edit/`,
|
|
700
|
+
query,
|
|
701
|
+
}}
|
|
702
|
+
params={{ id: templateData._id }}
|
|
703
|
+
isFullMode={isFullMode}
|
|
704
|
+
isGetFormData={isGetFormData}
|
|
705
|
+
route={{ name: 'mobilepush' }}
|
|
706
|
+
templateData={templateData}
|
|
707
|
+
showTemplateName={showTemplateName}
|
|
708
|
+
getDefaultTags={type}
|
|
709
|
+
onValidationFail={onValidationFail}
|
|
710
|
+
forwardedTags={forwardedTags}
|
|
711
|
+
selectedOfferDetails={selectedOfferDetails}
|
|
712
|
+
onPreviewContentClicked={onPreviewContentClicked}
|
|
713
|
+
onTestContentClicked={onTestContentClicked}
|
|
714
|
+
type={type}
|
|
715
|
+
hideTestAndPreviewBtn={hideTestAndPreviewBtn}
|
|
716
|
+
creativesMode={creativesMode}
|
|
717
|
+
eventContextTags={eventContextTags}
|
|
718
|
+
showLiquidErrorInFooter={showLiquidErrorInFooter}
|
|
719
|
+
/>
|
|
720
|
+
)
|
|
721
|
+
)}
|
|
722
|
+
{isCreateMPush && (
|
|
723
|
+
(isFullMode && !commonUtil.hasNewMobilePushFeatureEnabled()) ||
|
|
724
|
+
(!isFullMode && isLoyaltyModule) ||
|
|
725
|
+
(!isFullMode && !isLoyaltyModule && !commonUtil.hasNewMobilePushFeatureEnabled()) ? (
|
|
726
|
+
<MobilepushWrapper
|
|
727
|
+
key="creatives-mobilepush-wrapper"
|
|
728
|
+
date={new Date().getMilliseconds()}
|
|
729
|
+
setIsLoadingContent={setIsLoadingContent}
|
|
730
|
+
onMobilepushModeChange={onMobilepushModeChange}
|
|
731
|
+
mobilePushCreateMode={mobilePushCreateMode}
|
|
732
|
+
isGetFormData={isGetFormData}
|
|
733
|
+
getFormData={getFormData}
|
|
734
|
+
templateData={templateData}
|
|
735
|
+
type={type}
|
|
736
|
+
step={templateStep}
|
|
737
|
+
showNextStep={onCreateNextStep}
|
|
738
|
+
isFullMode={isFullMode}
|
|
739
|
+
onEnterTemplateName={onEnterTemplateName}
|
|
740
|
+
onRemoveTemplateName={onRemoveTemplateName}
|
|
741
|
+
cap={cap}
|
|
742
|
+
onResetStep={onResetStep}
|
|
743
|
+
showTemplateName={showTemplateName}
|
|
744
|
+
query={query}
|
|
745
|
+
forwardedTags={forwardedTags}
|
|
746
|
+
onValidationFail={onValidationFail}
|
|
747
|
+
selectedOfferDetails={selectedOfferDetails}
|
|
748
|
+
onPreviewContentClicked={onPreviewContentClicked}
|
|
749
|
+
hideTestAndPreviewBtn={hideTestAndPreviewBtn}
|
|
750
|
+
onTestContentClicked={onTestContentClicked}
|
|
751
|
+
eventContextTags={eventContextTags}
|
|
752
|
+
showLiquidErrorInFooter={showLiquidErrorInFooter}
|
|
753
|
+
/>
|
|
754
|
+
) : (
|
|
755
|
+
<MobilePushNew
|
|
756
|
+
key="creatives-mobilepush-wrapper"
|
|
757
|
+
date={new Date().getMilliseconds()}
|
|
758
|
+
setIsLoadingContent={setIsLoadingContent}
|
|
759
|
+
onMobilepushModeChange={onMobilepushModeChange}
|
|
760
|
+
mobilePushCreateMode={mobilePushCreateMode}
|
|
761
|
+
isGetFormData={isGetFormData}
|
|
762
|
+
getFormLibraryData={getFormData}
|
|
763
|
+
location={location}
|
|
764
|
+
getDefaultTags={type}
|
|
765
|
+
templateData={templateData}
|
|
766
|
+
type={type}
|
|
767
|
+
handleClose={handleClose}
|
|
768
|
+
step={templateStep}
|
|
769
|
+
showNextStep={onCreateNextStep}
|
|
770
|
+
isFullMode={isFullMode}
|
|
771
|
+
onEnterTemplateName={onEnterTemplateName}
|
|
772
|
+
onRemoveTemplateName={onRemoveTemplateName}
|
|
773
|
+
cap={cap}
|
|
774
|
+
onResetStep={onResetStep}
|
|
775
|
+
showTemplateName={showTemplateName}
|
|
776
|
+
query={query}
|
|
777
|
+
forwardedTags={forwardedTags}
|
|
778
|
+
onValidationFail={onValidationFail}
|
|
779
|
+
selectedOfferDetails={selectedOfferDetails}
|
|
780
|
+
onPreviewContentClicked={onPreviewContentClicked}
|
|
781
|
+
hideTestAndPreviewBtn={hideTestAndPreviewBtn}
|
|
782
|
+
onTestContentClicked={onTestContentClicked}
|
|
783
|
+
eventContextTags={eventContextTags}
|
|
784
|
+
showLiquidErrorInFooter={showLiquidErrorInFooter}
|
|
785
|
+
onCreateComplete={onCreateComplete}
|
|
786
|
+
creativesMode={creativesMode}
|
|
787
|
+
/>
|
|
788
|
+
)
|
|
789
|
+
)}
|
|
725
790
|
{
|
|
726
791
|
isCreateFacebook && (
|
|
727
792
|
<Facebook
|