@capillarytech/creatives-library 9.1.8-alpha.sprint-cap-214249.38 → 9.2.0

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.
Files changed (127) hide show
  1. package/constants/unified.js +4 -0
  2. package/index.js +13 -0
  3. package/package.json +1 -1
  4. package/services/getSchema.js +4 -1
  5. package/services/tests/getSchema.test.js +2 -2
  6. package/translations/en.json +1 -0
  7. package/translations/ja-JP.json +1 -0
  8. package/translations/zh.json +1 -0
  9. package/utils/common.js +6 -0
  10. package/utils/createMobilePushPayload.js +33 -47
  11. package/utils/tagValidations.js +35 -4
  12. package/utils/templateVarUtils.js +49 -0
  13. package/utils/tests/createMobilePushPayload.test.js +8 -102
  14. package/utils/tests/tagValidations.test.js +48 -0
  15. package/utils/tests/templateVarUtils.test.js +89 -0
  16. package/v2Components/CapMpushCTA/index.js +9 -10
  17. package/v2Components/CapMpushCTA/index.scss +3 -29
  18. package/v2Components/CapTagList/TagFallbackPanel.js +124 -0
  19. package/v2Components/CapTagList/constants.js +5 -0
  20. package/v2Components/CapTagList/index.js +46 -7
  21. package/v2Components/CapTagList/messages.js +44 -0
  22. package/v2Components/CapTagList/style.scss +113 -1
  23. package/v2Components/CapTagList/tests/TagFallback.test.js +222 -0
  24. package/v2Components/CapTagList/utils.js +17 -0
  25. package/v2Components/CommonTestAndPreview/UnifiedPreview/MobilePushPreviewContent.js +13 -26
  26. package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +1 -13
  27. package/v2Components/CommonTestAndPreview/constants.js +3 -2
  28. package/v2Components/CommonTestAndPreview/index.js +62 -62
  29. package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/MobilePushPreviewContent.test.js +5 -79
  30. package/v2Components/CommonTestAndPreview/tests/index.test.js +0 -86
  31. package/v2Components/CommonTestAndPreview/tests/utils.test.js +102 -0
  32. package/v2Components/CommonTestAndPreview/utils.js +42 -3
  33. package/v2Components/FormBuilder/Classic.js +24 -14
  34. package/v2Components/FormBuilder/Functional/channels/mobilepush/config.js +1 -0
  35. package/v2Components/FormBuilder/Functional/channels/mobilepush/getEditorErrorDescriptor.js +1 -1
  36. package/v2Components/FormBuilder/Functional/channels/mobilepush/tests/validate.test.js +57 -0
  37. package/v2Components/FormBuilder/Functional/channels/mobilepush/validate.js +4 -4
  38. package/v2Components/FormBuilder/Functional/channels/sms/getEditorErrorDescriptor.js +3 -0
  39. package/v2Components/FormBuilder/Functional/channels/sms/tests/getEditorErrorDescriptor.test.js +5 -0
  40. package/v2Components/FormBuilder/Functional/channels/sms/tests/validate.test.js +6 -0
  41. package/v2Components/FormBuilder/Functional/channels/sms/validate.js +3 -1
  42. package/v2Components/FormBuilder/Functional/renderers/mpushRenderers.js +3 -0
  43. package/v2Components/FormBuilder/Functional/tests/manual.typingPerf.test.js +135 -0
  44. package/v2Components/FormBuilder/Functional/tests/mpush.crossFlowParity.test.js +1 -1
  45. package/v2Components/FormBuilder/Functional/tests/mpush.ctaFlows.parity.test.js +320 -0
  46. package/v2Components/FormBuilder/Functional/tests/mpush.editContainer.parity.test.js +148 -0
  47. package/v2Components/FormBuilder/Functional/tests/mpush.libraryValidity.parity.test.js +152 -0
  48. package/v2Components/FormBuilder/Functional/tests/mpush.shellEvents.test.js +1 -1
  49. package/v2Components/FormBuilder/Functional/tests/mpush.singlePlatform.test.js +1 -1
  50. package/v2Components/FormBuilder/Functional/tests/mpushRenderers.test.js +22 -0
  51. package/v2Components/FormBuilder/tests/mpush.characterization.test.js +2 -2
  52. package/v2Components/TemplatePreview/_templatePreview.scss +2 -12
  53. package/v2Components/TemplatePreview/index.js +17 -30
  54. package/v2Components/TemplatePreview/tests/index.test.js +0 -61
  55. package/v2Containers/Cap/index.js +3 -0
  56. package/v2Containers/Cap/messages.js +4 -0
  57. package/v2Containers/Cap/tests/__snapshots__/index.test.js.snap +1 -0
  58. package/v2Containers/CreativesContainer/SlideBoxContent.js +151 -70
  59. package/v2Containers/CreativesContainer/index.js +6 -3
  60. package/v2Containers/CreativesContainer/tests/SlideBoxContent.test.js +0 -29
  61. package/v2Containers/InApp/index.js +4 -1
  62. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +3 -0
  63. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +2 -0
  64. package/v2Containers/Line/Container/Text/index.js +3 -1
  65. package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +16 -0
  66. package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +18 -0
  67. package/v2Containers/MobilePush/Create/_mobilePushCreate.scss +70 -0
  68. package/v2Containers/MobilePush/Create/actions.js +52 -0
  69. package/v2Containers/MobilePush/Create/constants.js +26 -0
  70. package/v2Containers/MobilePush/Create/index.js +2149 -0
  71. package/v2Containers/MobilePush/Create/messages.js +349 -0
  72. package/v2Containers/MobilePush/Create/reducer.js +72 -0
  73. package/v2Containers/MobilePush/Create/sagas.js +79 -0
  74. package/v2Containers/MobilePush/Create/selectors.js +29 -0
  75. package/v2Containers/MobilePush/Create/test/contentValidity.test.js +154 -0
  76. package/v2Containers/MobilePush/Create/test/saga.test.js +19 -0
  77. package/v2Containers/MobilePush/Create/test/stayOpenOnSave.test.js +80 -0
  78. package/v2Containers/MobilePush/Edit/_mobilePushCreate.scss +65 -0
  79. package/v2Containers/MobilePush/Edit/actions.js +94 -0
  80. package/v2Containers/MobilePush/Edit/constants.js +37 -0
  81. package/v2Containers/MobilePush/Edit/index.js +2407 -0
  82. package/v2Containers/MobilePush/Edit/messages.js +341 -0
  83. package/v2Containers/MobilePush/Edit/reducer.js +113 -0
  84. package/v2Containers/MobilePush/Edit/sagas.js +113 -0
  85. package/v2Containers/MobilePush/Edit/selectors.js +33 -0
  86. package/v2Containers/MobilePush/Edit/test/contentValidity.test.js +149 -0
  87. package/v2Containers/MobilePush/Edit/test/saga.test.js +255 -0
  88. package/v2Containers/MobilePush/Edit/test/stayOpenOnSave.test.js +60 -0
  89. package/v2Containers/MobilePush/commonMethods.js +333 -0
  90. package/v2Containers/MobilePush/eventsMap.js +130 -0
  91. package/v2Containers/MobilePush/tests/commonMethods.test.js +401 -0
  92. package/v2Containers/MobilePushNew/components/CtaButtons.js +47 -52
  93. package/v2Containers/MobilePushNew/components/MediaUploaders.js +192 -207
  94. package/v2Containers/MobilePushNew/components/PlatformContentFields.js +121 -116
  95. package/v2Containers/MobilePushNew/components/tests/CtaButtons.test.js +208 -30
  96. package/v2Containers/MobilePushNew/components/tests/MediaUploaders.test.js +72 -316
  97. package/v2Containers/MobilePushNew/components/tests/PlatformContentFields.test.js +16 -45
  98. package/v2Containers/MobilePushNew/constants.js +0 -5
  99. package/v2Containers/MobilePushNew/hooks/tests/usePlatformSync.test.js +1 -63
  100. package/v2Containers/MobilePushNew/hooks/tests/useUpload.test.js +0 -52
  101. package/v2Containers/MobilePushNew/hooks/usePlatformSync.js +1 -38
  102. package/v2Containers/MobilePushNew/hooks/useUpload.js +39 -29
  103. package/v2Containers/MobilePushNew/index.js +192 -454
  104. package/v2Containers/MobilePushNew/index.scss +4 -188
  105. package/v2Containers/MobilePushNew/messages.js +6 -86
  106. package/v2Containers/MobilePushNew/tests/index.test.js +1 -450
  107. package/v2Containers/MobilePushNew/tests/utils.test.js +0 -25
  108. package/v2Containers/MobilePushNew/utils.js +0 -8
  109. package/v2Containers/MobilepushWrapper/_mobilepushWrapper.scss +22 -0
  110. package/v2Containers/MobilepushWrapper/index.js +178 -0
  111. package/v2Containers/MobilepushWrapper/messages.js +29 -0
  112. package/v2Containers/Rcs/index.js +8 -1
  113. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +59 -0
  114. package/v2Containers/SmsTrai/Create/tests/__snapshots__/index.test.js.snap +4 -0
  115. package/v2Containers/SmsTrai/Edit/index.js +17 -7
  116. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +42 -0
  117. package/v2Containers/Templates/_templates.scss +2 -10
  118. package/v2Containers/Templates/index.js +90 -84
  119. package/v2Containers/Templates/tests/index.test.js +0 -68
  120. package/v2Containers/Viber/index.js +3 -1
  121. package/v2Containers/WebPush/Create/utils/validation.js +6 -0
  122. package/v2Containers/WebPush/Create/utils/validation.test.js +50 -0
  123. package/v2Containers/Whatsapp/index.js +9 -5
  124. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +2 -2
  125. package/v2Containers/Zalo/index.js +4 -1
  126. package/v2Components/CapMpushCTA/tests/index.test.js +0 -89
  127. /package/{v2Components/FormBuilder/Functional/tests/fixtures/mpushInitialSchema.js → v2Containers/MobilePush/initialSchema.js} +0 -0
@@ -10,6 +10,7 @@ import TemplatePreview from '../../v2Components/TemplatePreview';
10
10
  import SmsWrapper from '../SmsWrapper';
11
11
  import Email from '../Email';
12
12
  import EmailWrapper from '../EmailWrapper';
13
+ import MobilepushWrapper from '../MobilepushWrapper';
13
14
  import InAppWrapper from '../InAppWrapper';
14
15
  import EmailPreviewV2 from '../../v2Components/EmailPreviewV2';
15
16
  import MobilePushPreview from '../../v2Components/MobilePushPreviewV2';
@@ -17,6 +18,7 @@ import WechatWrapper from '../WeChat/Wrapper';
17
18
  import Facebook from '../Facebook';
18
19
  import { RICH_MEDIA, MAP_TEMPLATE, CREATE } from '../WeChat/Wrapper/constants';
19
20
  import CallTask from '../CallTask';
21
+ import MobliPushEdit from '../MobilePush/Edit';
20
22
  import * as constants from './constants';
21
23
  import { SMS as SMS_LOWERCASE } from '../../constants/unified';
22
24
  import LineContainer from '../Line/Container';
@@ -844,78 +846,157 @@ export function SlideBoxContent(props) {
844
846
  })()
845
847
  )}
846
848
  {isEditMPush && (
847
- <MobilePushNew
848
- getFormLibraryData={getFormData}
849
- setIsLoadingContent={setIsLoadingContent}
850
- location={{
851
- pathname: `/mobilepush/edit/`,
852
- query,
853
- }}
854
- params={{ id: templateData._id }}
855
- isFullMode={isFullMode}
856
- isGetFormData={isGetFormData}
857
- route={{ name: 'mobilepush' }}
858
- templateData={templateData}
859
- showTemplateName={showTemplateName}
860
- getDefaultTags={type}
861
- onValidationFail={onValidationFail}
862
- forwardedTags={forwardedTags}
863
- selectedOfferDetails={selectedOfferDetails}
864
- onPreviewContentClicked={onPreviewContentClicked}
865
- onTestContentClicked={onTestContentClicked}
866
- type={type}
867
- hideTestAndPreviewBtn={hideTestAndPreviewBtn}
868
- creativesMode={creativesMode}
869
- eventContextTags={eventContextTags}
870
- waitEventContextTags={waitEventContextTags}
871
- showLiquidErrorInFooter={showLiquidErrorInFooter}
872
- handleClose={handleClose}
873
- showTestAndPreviewSlidebox={showTestAndPreviewSlidebox}
874
- handleCloseTestAndPreview={handleCloseTestAndPreview}
875
- restrictPersonalization={restrictPersonalization}
876
- isAnonymousType={isAnonymousType}
877
- onPersonalizationTokensChange={onPersonalizationTokensChange}
878
- onContentValidityChange={onContentValidityChange}
879
- />
849
+ (isFullMode && !commonUtil.hasNewMobilePushFeatureEnabled()) ||
850
+ (!isFullMode && isLoyaltyModule) ||
851
+ (!isFullMode && !isLoyaltyModule && !commonUtil.hasNewMobilePushFeatureEnabled()) ? (
852
+ <MobliPushEdit
853
+ getFormLibraryData={getFormData}
854
+ setIsLoadingContent={setIsLoadingContent}
855
+ getLiquidTags={getLiquidTags}
856
+ location={{
857
+ pathname: `/mobilepush/edit/`,
858
+ query,
859
+ }}
860
+ params={{ id: templateData._id }}
861
+ isFullMode={isFullMode}
862
+ isGetFormData={isGetFormData}
863
+ route={{ name: 'mobilepush' }}
864
+ templateData={templateData}
865
+ showTemplateName={showTemplateName}
866
+ getDefaultTags={type}
867
+ onValidationFail={onValidationFail}
868
+ forwardedTags={forwardedTags}
869
+ selectedOfferDetails={selectedOfferDetails}
870
+ onPreviewContentClicked={onPreviewContentClicked}
871
+ onTestContentClicked={onTestContentClicked}
872
+ type={type}
873
+ hideTestAndPreviewBtn={hideTestAndPreviewBtn}
874
+ creativesMode={creativesMode}
875
+ eventContextTags={eventContextTags}
876
+ waitEventContextTags={waitEventContextTags}
877
+ showLiquidErrorInFooter={showLiquidErrorInFooter}
878
+ showTestAndPreviewSlidebox={showTestAndPreviewSlidebox}
879
+ handleTestAndPreview={handleTestAndPreview}
880
+ handleCloseTestAndPreview={handleCloseTestAndPreview}
881
+ restrictPersonalization={restrictPersonalization}
882
+ isAnonymousType={isAnonymousType}
883
+ onPersonalizationTokensChange={onPersonalizationTokensChange}
884
+ onContentValidityChange={onContentValidityChange}
885
+ />
886
+ ) : (
887
+ <MobilePushNew
888
+ getFormLibraryData={getFormData}
889
+ setIsLoadingContent={setIsLoadingContent}
890
+ location={{
891
+ pathname: `/mobilepush/edit/`,
892
+ query,
893
+ }}
894
+ params={{ id: templateData._id }}
895
+ isFullMode={isFullMode}
896
+ isGetFormData={isGetFormData}
897
+ route={{ name: 'mobilepush' }}
898
+ templateData={templateData}
899
+ showTemplateName={showTemplateName}
900
+ getDefaultTags={type}
901
+ onValidationFail={onValidationFail}
902
+ forwardedTags={forwardedTags}
903
+ selectedOfferDetails={selectedOfferDetails}
904
+ onPreviewContentClicked={onPreviewContentClicked}
905
+ onTestContentClicked={onTestContentClicked}
906
+ type={type}
907
+ hideTestAndPreviewBtn={hideTestAndPreviewBtn}
908
+ creativesMode={creativesMode}
909
+ eventContextTags={eventContextTags}
910
+ waitEventContextTags={waitEventContextTags}
911
+ showLiquidErrorInFooter={showLiquidErrorInFooter}
912
+ handleClose={handleClose}
913
+ restrictPersonalization={restrictPersonalization}
914
+ isAnonymousType={isAnonymousType}
915
+ onPersonalizationTokensChange={onPersonalizationTokensChange}
916
+ onContentValidityChange={onContentValidityChange}
917
+ />
918
+ )
880
919
  )}
881
920
  {isCreateMPush && (
882
- <MobilePushNew
883
- key="creatives-mobilepush-create-new"
884
- date={new Date().getMilliseconds()}
885
- setIsLoadingContent={setIsLoadingContent}
886
- onMobilepushModeChange={onMobilepushModeChange}
887
- mobilePushCreateMode={mobilePushCreateMode}
888
- isGetFormData={isGetFormData}
889
- getFormLibraryData={getFormData}
890
- location={location}
891
- getDefaultTags={type}
892
- templateData={templateData}
893
- type={type}
894
- handleClose={handleClose}
895
- step={templateStep}
896
- showNextStep={onCreateNextStep}
897
- isFullMode={isFullMode}
898
- onEnterTemplateName={onEnterTemplateName}
899
- onRemoveTemplateName={onRemoveTemplateName}
900
- cap={cap}
901
- onResetStep={onResetStep}
902
- showTemplateName={showTemplateName}
903
- query={query}
904
- forwardedTags={forwardedTags}
905
- onValidationFail={onValidationFail}
906
- selectedOfferDetails={selectedOfferDetails}
907
- onPreviewContentClicked={onPreviewContentClicked}
908
- hideTestAndPreviewBtn={hideTestAndPreviewBtn}
909
- onTestContentClicked={onTestContentClicked}
910
- eventContextTags={eventContextTags}
911
- waitEventContextTags={waitEventContextTags}
912
- showLiquidErrorInFooter={showLiquidErrorInFooter}
913
- onCreateComplete={onCreateComplete}
914
- creativesMode={creativesMode}
915
- restrictPersonalization={restrictPersonalization}
916
- isAnonymousType={isAnonymousType}
917
- onContentValidityChange={onContentValidityChange}
918
- />
921
+ (isFullMode && !commonUtil.hasNewMobilePushFeatureEnabled()) ||
922
+ (!isFullMode && isLoyaltyModule) ||
923
+ (!isFullMode && !isLoyaltyModule && !commonUtil.hasNewMobilePushFeatureEnabled()) ? (
924
+ <MobilepushWrapper
925
+ key="creatives-mobilepush-wrapper"
926
+ date={new Date().getMilliseconds()}
927
+ setIsLoadingContent={setIsLoadingContent}
928
+ onMobilepushModeChange={onMobilepushModeChange}
929
+ mobilePushCreateMode={mobilePushCreateMode}
930
+ isGetFormData={isGetFormData}
931
+ getFormData={getFormData}
932
+ getLiquidTags={getLiquidTags}
933
+ templateData={templateData}
934
+ type={type}
935
+ step={templateStep}
936
+ showNextStep={onCreateNextStep}
937
+ isFullMode={isFullMode}
938
+ onEnterTemplateName={onEnterTemplateName}
939
+ onRemoveTemplateName={onRemoveTemplateName}
940
+ cap={cap}
941
+ onResetStep={onResetStep}
942
+ showTemplateName={showTemplateName}
943
+ query={query}
944
+ forwardedTags={forwardedTags}
945
+ onValidationFail={onValidationFail}
946
+ selectedOfferDetails={selectedOfferDetails}
947
+ onPreviewContentClicked={onPreviewContentClicked}
948
+ hideTestAndPreviewBtn={hideTestAndPreviewBtn}
949
+ onTestContentClicked={onTestContentClicked}
950
+ eventContextTags={eventContextTags}
951
+ waitEventContextTags={waitEventContextTags}
952
+ showLiquidErrorInFooter={showLiquidErrorInFooter}
953
+ showTestAndPreviewSlidebox={showTestAndPreviewSlidebox}
954
+ handleTestAndPreview={handleTestAndPreview}
955
+ handleCloseTestAndPreview={handleCloseTestAndPreview}
956
+ restrictPersonalization={restrictPersonalization}
957
+ isAnonymousType={isAnonymousType}
958
+ onPersonalizationTokensChange={onPersonalizationTokensChange}
959
+ onContentValidityChange={onContentValidityChange}
960
+ />
961
+ ) : (
962
+ <MobilePushNew
963
+ key="creatives-mobilepush-create-new"
964
+ date={new Date().getMilliseconds()}
965
+ setIsLoadingContent={setIsLoadingContent}
966
+ onMobilepushModeChange={onMobilepushModeChange}
967
+ mobilePushCreateMode={mobilePushCreateMode}
968
+ isGetFormData={isGetFormData}
969
+ getFormLibraryData={getFormData}
970
+ location={location}
971
+ getDefaultTags={type}
972
+ templateData={templateData}
973
+ type={type}
974
+ handleClose={handleClose}
975
+ step={templateStep}
976
+ showNextStep={onCreateNextStep}
977
+ isFullMode={isFullMode}
978
+ onEnterTemplateName={onEnterTemplateName}
979
+ onRemoveTemplateName={onRemoveTemplateName}
980
+ cap={cap}
981
+ onResetStep={onResetStep}
982
+ showTemplateName={showTemplateName}
983
+ query={query}
984
+ forwardedTags={forwardedTags}
985
+ onValidationFail={onValidationFail}
986
+ selectedOfferDetails={selectedOfferDetails}
987
+ onPreviewContentClicked={onPreviewContentClicked}
988
+ hideTestAndPreviewBtn={hideTestAndPreviewBtn}
989
+ onTestContentClicked={onTestContentClicked}
990
+ eventContextTags={eventContextTags}
991
+ waitEventContextTags={waitEventContextTags}
992
+ showLiquidErrorInFooter={showLiquidErrorInFooter}
993
+ onCreateComplete={onCreateComplete}
994
+ creativesMode={creativesMode}
995
+ restrictPersonalization={restrictPersonalization}
996
+ isAnonymousType={isAnonymousType}
997
+ onContentValidityChange={onContentValidityChange}
998
+ />
999
+ )
919
1000
  )}
920
1001
  {
921
1002
  isCreateFacebook && (
@@ -110,6 +110,8 @@ import callTaskReducer from '../CallTask/reducer';
110
110
  import tagListReducer from '../TagList/reducer';
111
111
  import smsCreateReducer from '../Sms/Create/reducer';
112
112
  import smsEditReducer from '../Sms/Edit/reducer';
113
+ import mobilePushCreateReducer from '../MobilePush/Create/reducer';
114
+ import mobilePushEditReducer from '../MobilePush/Edit/reducer';
113
115
  import mobilePushNewReducer from '../MobilePushNew/reducer';
114
116
  import beeEditorReducer from '../BeeEditor/reducer';
115
117
  import ftpReducer from '../FTP/reducer';
@@ -1040,8 +1042,7 @@ export class Creatives extends React.Component {
1040
1042
  newExpandableDetails.message = expandableDetails.message || '';
1041
1043
  newExpandableDetails.ctas = expandableDetails.ctas || [];
1042
1044
  newExpandableDetails.media = expandableDetails.carouselData.map((carousel) => ({
1043
- // Video cards keep their url in videoSrc
1044
- url: carousel?.mediaType?.toUpperCase() === VIDEO ? carousel.videoSrc : carousel.imageUrl,
1045
+ url: carousel.imageUrl,
1045
1046
  type: carousel?.mediaType?.toUpperCase(),
1046
1047
  text: '',
1047
1048
  }));
@@ -2608,6 +2609,8 @@ const withCallTaskReducer = injectReducer({ key: 'callTask', reducer: callTaskRe
2608
2609
  const withTagListReducer = injectReducer({ key: 'tagList', reducer: tagListReducer });
2609
2610
  const withSmsCreateReducer = injectReducer({ key: 'create', reducer: smsCreateReducer });
2610
2611
  const withSmsEditReducer = injectReducer({ key: 'edit', reducer: smsEditReducer });
2612
+ const withMobilePushCreateReducer = injectReducer({ key: 'mobileCreate', reducer: mobilePushCreateReducer });
2613
+ const withMobilePushEditReducer = injectReducer({ key: 'mobileEdit', reducer: mobilePushEditReducer });
2611
2614
  const withMobilePushNewReducer = injectReducer({ key: 'mobilePushNew', reducer: mobilePushNewReducer });
2612
2615
  const withBeeEditorReducer = injectReducer({ key: 'beeEditor', reducer: beeEditorReducer });
2613
2616
  const withFTPReducer = injectReducer({ key: 'FTP', reducer: ftpReducer });
@@ -2634,7 +2637,7 @@ export default compose(
2634
2637
  withReducer, withTemplateReducer, withEmailReducer, withCapReducer,
2635
2638
  withCallTaskReducer, withTagListReducer,
2636
2639
  withSmsCreateReducer, withSmsEditReducer,
2637
- withMobilePushNewReducer,
2640
+ withMobilePushCreateReducer, withMobilePushEditReducer, withMobilePushNewReducer,
2638
2641
  withBeeEditorReducer, withFTPReducer,
2639
2642
  withFacebookReducer, withGalleryReducer, withFacebookPreviewReducer,
2640
2643
  withSmsTraiReducer, withWhatsappReducer, withRcsReducer, withZaloReducer,
@@ -4,7 +4,6 @@ import { SlideBoxContent } from '../SlideBoxContent';
4
4
  import mockdata from '../../mockdata';
5
5
  import { templateDetailsImage, templateDetailsVideo, templateDetailsText, templateDetails_ } from '../../Viber/tests/mockData';
6
6
  import { CREATE, RICH_MEDIA } from '../../WeChat/Wrapper/constants';
7
- import MobilePushNew from '../../MobilePushNew';
8
7
 
9
8
  const {
10
9
  whatsappEditTemplateData,
@@ -1016,32 +1015,4 @@ describe('Test SlideBoxContent container', () => {
1016
1015
  });
1017
1016
 
1018
1017
  });
1019
-
1020
- describe('Mobile push editor choice', () => {
1021
- const editTemplateData = { _id: 'mp-1', type: 'MOBILEPUSH' };
1022
-
1023
- it.each([
1024
- ['full mode', { isFullMode: true }],
1025
- ['embedded outside Loyalty', { isFullMode: false, isLoyaltyModule: false }],
1026
- ['embedded in Loyalty', { isFullMode: false, isLoyaltyModule: true }],
1027
- ])('opens the new editor for create and edit in %s', (_, modeProps) => {
1028
- renderFunction('MOBILEPUSH', 'createTemplate', { mode: 'create' }, modeProps);
1029
- expect(renderedComponent.find(MobilePushNew).exists()).toBe(true);
1030
-
1031
- renderFunction('MOBILEPUSH', 'editTemplate', editTemplateData, modeProps);
1032
- expect(renderedComponent.find(MobilePushNew).exists()).toBe(true);
1033
- });
1034
-
1035
- it('passes the footer Test & Preview state to the new editor in edit', () => {
1036
- const handleCloseTestAndPreview = jest.fn();
1037
- renderFunction('MOBILEPUSH', 'editTemplate', editTemplateData, {
1038
- isFullMode: true,
1039
- showTestAndPreviewSlidebox: true,
1040
- handleCloseTestAndPreview,
1041
- });
1042
- const editor = renderedComponent.find(MobilePushNew);
1043
- expect(editor.prop('showTestAndPreviewSlidebox')).toBe(true);
1044
- expect(editor.prop('handleCloseTestAndPreview')).toBe(handleCloseTestAndPreview);
1045
- });
1046
- });
1047
1018
  });
@@ -1269,7 +1269,7 @@ export const InApp = (props) => {
1269
1269
  }, [clearDeviceErrors]);
1270
1270
 
1271
1271
  const templateDescErrorHandler = (value) => {
1272
- const { unsupportedTags, isBraceError } = validateTags({
1272
+ const { unsupportedTags, isBraceError, isDefaultQuoteError } = validateTags({
1273
1273
  content: value,
1274
1274
  tagsParam: tags,
1275
1275
  injectedTagsParams: injectedTags,
@@ -1283,6 +1283,9 @@ export const InApp = (props) => {
1283
1283
  if (isBraceError) {
1284
1284
  return formatMessage(globalMessages.unbalanacedCurlyBraces);
1285
1285
  }
1286
+ if (isDefaultQuoteError) {
1287
+ return formatMessage(globalMessages.unquotedTagDefaultValue);
1288
+ }
1286
1289
  return '';
1287
1290
  };
1288
1291
 
@@ -341,6 +341,7 @@ exports[`Creatives line image carousel test/> should render 1`] = `
341
341
  "creatives.componentsV2.TopBar.profile": "Profile",
342
342
  "creatives.componentsV2.TopBar.settings": "Settings",
343
343
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
344
+ "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
344
345
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
345
346
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
346
347
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -4482,6 +4483,7 @@ exports[`Creatives line image carousel test/> should render 2`] = `
4482
4483
  "creatives.componentsV2.TopBar.profile": "Profile",
4483
4484
  "creatives.componentsV2.TopBar.settings": "Settings",
4484
4485
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
4486
+ "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
4485
4487
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
4486
4488
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
4487
4489
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -8762,6 +8764,7 @@ exports[`Creatives line image carousel test/> should render 3`] = `
8762
8764
  "creatives.componentsV2.TopBar.profile": "Profile",
8763
8765
  "creatives.componentsV2.TopBar.settings": "Settings",
8764
8766
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
8767
+ "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
8765
8768
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
8766
8769
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
8767
8770
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -341,6 +341,7 @@ exports[`line wrapper test/> should render line component new 1`] = `
341
341
  "creatives.componentsV2.TopBar.profile": "Profile",
342
342
  "creatives.componentsV2.TopBar.settings": "Settings",
343
343
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
344
+ "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
344
345
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
345
346
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
346
347
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -15392,6 +15393,7 @@ exports[`line wrapper test/> should render line component old 1`] = `
15392
15393
  "creatives.componentsV2.TopBar.profile": "Profile",
15393
15394
  "creatives.componentsV2.TopBar.settings": "Settings",
15394
15395
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
15396
+ "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
15395
15397
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
15396
15398
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
15397
15399
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -135,7 +135,7 @@ export const LineText = ({
135
135
 
136
136
  const updateTextContentError = (value) => {
137
137
  let errorMessage = false;
138
- const { valid, isBraceError } = validateTags({
138
+ const { valid, isBraceError, isDefaultQuoteError } = validateTags({
139
139
  content: value,
140
140
  tagsParam: tags,
141
141
  location,
@@ -148,6 +148,8 @@ export const LineText = ({
148
148
  errorMessage = formatMessage(messages.limitExceededContentErrorMessage);
149
149
  } else if (isBraceError) {
150
150
  errorMessage = formatMessage(globalMessages.unbalanacedCurlyBraces);
151
+ } else if (isDefaultQuoteError) {
152
+ errorMessage = formatMessage(globalMessages.unquotedTagDefaultValue);
151
153
  } else if (!valid && !isFullMode) {
152
154
  errorMessage = formatMessage(messages.invalidTagError);
153
155
  }
@@ -341,6 +341,7 @@ exports[`line wrapper test/> should render create mode 1`] = `
341
341
  "creatives.componentsV2.TopBar.profile": "Profile",
342
342
  "creatives.componentsV2.TopBar.settings": "Settings",
343
343
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
344
+ "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
344
345
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
345
346
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
346
347
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -10995,6 +10996,7 @@ new message content.",
10995
10996
  "creatives.componentsV2.TopBar.profile": "Profile",
10996
10997
  "creatives.componentsV2.TopBar.settings": "Settings",
10997
10998
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
10999
+ "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
10998
11000
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
10999
11001
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
11000
11002
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -13541,6 +13543,7 @@ new message content.",
13541
13543
  "creatives.componentsV2.TopBar.profile": "Profile",
13542
13544
  "creatives.componentsV2.TopBar.settings": "Settings",
13543
13545
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
13546
+ "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
13544
13547
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
13545
13548
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
13546
13549
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -16560,6 +16563,7 @@ new message content.",
16560
16563
  "creatives.componentsV2.TopBar.profile": "Profile",
16561
16564
  "creatives.componentsV2.TopBar.settings": "Settings",
16562
16565
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
16566
+ "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
16563
16567
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
16564
16568
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
16565
16569
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -18974,6 +18978,7 @@ exports[`line wrapper test/> should render create mode 2`] = `
18974
18978
  "creatives.componentsV2.TopBar.profile": "Profile",
18975
18979
  "creatives.componentsV2.TopBar.settings": "Settings",
18976
18980
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
18981
+ "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
18977
18982
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
18978
18983
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
18979
18984
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -34044,6 +34049,7 @@ new message content.",
34044
34049
  "creatives.componentsV2.TopBar.profile": "Profile",
34045
34050
  "creatives.componentsV2.TopBar.settings": "Settings",
34046
34051
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
34052
+ "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
34047
34053
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
34048
34054
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
34049
34055
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -36782,6 +36788,7 @@ new message content.",
36782
36788
  "creatives.componentsV2.TopBar.profile": "Profile",
36783
36789
  "creatives.componentsV2.TopBar.settings": "Settings",
36784
36790
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
36791
+ "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
36785
36792
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
36786
36793
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
36787
36794
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -40077,6 +40084,7 @@ new message content.",
40077
40084
  "creatives.componentsV2.TopBar.profile": "Profile",
40078
40085
  "creatives.componentsV2.TopBar.settings": "Settings",
40079
40086
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
40087
+ "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
40080
40088
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
40081
40089
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
40082
40090
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -42815,6 +42823,7 @@ new message content.",
42815
42823
  "creatives.componentsV2.TopBar.profile": "Profile",
42816
42824
  "creatives.componentsV2.TopBar.settings": "Settings",
42817
42825
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
42826
+ "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
42818
42827
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
42819
42828
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
42820
42829
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -46664,6 +46673,7 @@ new message content.",
46664
46673
  "creatives.componentsV2.TopBar.profile": "Profile",
46665
46674
  "creatives.componentsV2.TopBar.settings": "Settings",
46666
46675
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
46676
+ "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
46667
46677
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
46668
46678
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
46669
46679
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -49545,6 +49555,7 @@ new message content.",
49545
49555
  "creatives.componentsV2.TopBar.profile": "Profile",
49546
49556
  "creatives.componentsV2.TopBar.settings": "Settings",
49547
49557
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
49558
+ "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
49548
49559
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
49549
49560
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
49550
49561
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -52444,6 +52455,7 @@ new message content.",
52444
52455
  "creatives.componentsV2.TopBar.profile": "Profile",
52445
52456
  "creatives.componentsV2.TopBar.settings": "Settings",
52446
52457
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
52458
+ "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
52447
52459
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
52448
52460
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
52449
52461
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -55777,6 +55789,7 @@ new message content.",
55777
55789
  "creatives.componentsV2.TopBar.profile": "Profile",
55778
55790
  "creatives.componentsV2.TopBar.settings": "Settings",
55779
55791
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
55792
+ "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
55780
55793
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
55781
55794
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
55782
55795
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -61960,6 +61973,7 @@ new message content.",
61960
61973
  "creatives.componentsV2.TopBar.profile": "Profile",
61961
61974
  "creatives.componentsV2.TopBar.settings": "Settings",
61962
61975
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
61976
+ "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
61963
61977
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
61964
61978
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
61965
61979
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -64702,6 +64716,7 @@ new message content.",
64702
64716
  "creatives.componentsV2.TopBar.profile": "Profile",
64703
64717
  "creatives.componentsV2.TopBar.settings": "Settings",
64704
64718
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
64719
+ "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
64705
64720
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
64706
64721
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
64707
64722
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -67290,6 +67305,7 @@ new message content.",
67290
67305
  "creatives.componentsV2.TopBar.profile": "Profile",
67291
67306
  "creatives.componentsV2.TopBar.settings": "Settings",
67292
67307
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
67308
+ "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
67293
67309
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
67294
67310
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
67295
67311
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",