@capillarytech/creatives-library 8.0.264 → 8.0.265

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 (158) hide show
  1. package/constants/unified.js +0 -1
  2. package/package.json +1 -1
  3. package/services/api.js +0 -5
  4. package/utils/common.js +0 -6
  5. package/utils/tagValidations.js +1 -2
  6. package/utils/tests/transformerUtils.test.js +0 -297
  7. package/utils/transformerUtils.js +0 -40
  8. package/v2Components/CapImageUpload/constants.js +0 -2
  9. package/v2Components/CapImageUpload/index.js +16 -65
  10. package/v2Components/CapImageUpload/index.scss +1 -4
  11. package/v2Components/CapImageUpload/messages.js +1 -5
  12. package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +2 -2
  13. package/v2Components/FormBuilder/index.js +8 -8
  14. package/v2Containers/App/constants.js +0 -5
  15. package/v2Containers/CreativesContainer/SlideBoxContent.js +2 -57
  16. package/v2Containers/CreativesContainer/SlideBoxHeader.js +0 -1
  17. package/v2Containers/CreativesContainer/constants.js +0 -3
  18. package/v2Containers/CreativesContainer/index.js +0 -168
  19. package/v2Containers/CreativesContainer/messages.js +0 -4
  20. package/v2Containers/CreativesContainer/tests/SlideBoxContent.test.js +0 -210
  21. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +0 -304
  22. package/v2Containers/Email/index.js +7 -3
  23. package/v2Containers/FTP/index.js +1 -1
  24. package/v2Containers/InApp/index.js +0 -1
  25. package/v2Containers/Line/Container/Text/index.js +0 -1
  26. package/v2Containers/MobilePushNew/index.js +0 -1
  27. package/v2Containers/Rcs/index.js +0 -3
  28. package/v2Containers/SmsTrai/Edit/index.js +0 -1
  29. package/v2Containers/Templates/ChannelTypeIllustration.js +1 -13
  30. package/v2Containers/Templates/_templates.scss +0 -205
  31. package/v2Containers/Templates/actions.js +1 -2
  32. package/v2Containers/Templates/constants.js +0 -1
  33. package/v2Containers/Templates/index.js +34 -274
  34. package/v2Containers/Templates/messages.js +0 -24
  35. package/v2Containers/Templates/reducer.js +0 -2
  36. package/v2Containers/Templates/tests/index.test.js +0 -10
  37. package/v2Containers/TemplatesV2/index.js +7 -15
  38. package/v2Containers/TemplatesV2/messages.js +0 -4
  39. package/v2Containers/Viber/index.js +0 -1
  40. package/v2Containers/Whatsapp/index.js +0 -1
  41. package/v2Containers/Zalo/index.js +0 -1
  42. package/v2Containers/Zalo/tests/index.test.js +5 -1
  43. package/utils/imageUrlUpload.js +0 -141
  44. package/v2Components/CapImageUrlUpload/constants.js +0 -26
  45. package/v2Components/CapImageUrlUpload/index.js +0 -365
  46. package/v2Components/CapImageUrlUpload/index.scss +0 -35
  47. package/v2Components/CapImageUrlUpload/messages.js +0 -47
  48. package/v2Containers/WebPush/Create/components/BrandIconSection.js +0 -108
  49. package/v2Containers/WebPush/Create/components/ButtonForm.js +0 -172
  50. package/v2Containers/WebPush/Create/components/ButtonItem.js +0 -101
  51. package/v2Containers/WebPush/Create/components/ButtonList.js +0 -145
  52. package/v2Containers/WebPush/Create/components/ButtonsLinksSection.js +0 -164
  53. package/v2Containers/WebPush/Create/components/ButtonsLinksSection.test.js +0 -463
  54. package/v2Containers/WebPush/Create/components/FormActions.js +0 -54
  55. package/v2Containers/WebPush/Create/components/FormActions.test.js +0 -163
  56. package/v2Containers/WebPush/Create/components/MediaSection.js +0 -142
  57. package/v2Containers/WebPush/Create/components/MediaSection.test.js +0 -341
  58. package/v2Containers/WebPush/Create/components/MessageSection.js +0 -103
  59. package/v2Containers/WebPush/Create/components/MessageSection.test.js +0 -268
  60. package/v2Containers/WebPush/Create/components/NotificationTitleSection.js +0 -87
  61. package/v2Containers/WebPush/Create/components/NotificationTitleSection.test.js +0 -210
  62. package/v2Containers/WebPush/Create/components/TemplateNameSection.js +0 -54
  63. package/v2Containers/WebPush/Create/components/TemplateNameSection.test.js +0 -143
  64. package/v2Containers/WebPush/Create/components/__snapshots__/ButtonsLinksSection.test.js.snap +0 -86
  65. package/v2Containers/WebPush/Create/components/__snapshots__/FormActions.test.js.snap +0 -16
  66. package/v2Containers/WebPush/Create/components/__snapshots__/MediaSection.test.js.snap +0 -41
  67. package/v2Containers/WebPush/Create/components/__snapshots__/MessageSection.test.js.snap +0 -54
  68. package/v2Containers/WebPush/Create/components/__snapshots__/NotificationTitleSection.test.js.snap +0 -37
  69. package/v2Containers/WebPush/Create/components/__snapshots__/TemplateNameSection.test.js.snap +0 -21
  70. package/v2Containers/WebPush/Create/components/_buttons.scss +0 -246
  71. package/v2Containers/WebPush/Create/components/tests/ButtonForm.test.js +0 -554
  72. package/v2Containers/WebPush/Create/components/tests/ButtonItem.test.js +0 -607
  73. package/v2Containers/WebPush/Create/components/tests/ButtonList.test.js +0 -633
  74. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonForm.test.js.snap +0 -666
  75. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonItem.test.js.snap +0 -74
  76. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonList.test.js.snap +0 -78
  77. package/v2Containers/WebPush/Create/hooks/useButtonManagement.js +0 -138
  78. package/v2Containers/WebPush/Create/hooks/useButtonManagement.test.js +0 -406
  79. package/v2Containers/WebPush/Create/hooks/useCharacterCount.js +0 -30
  80. package/v2Containers/WebPush/Create/hooks/useCharacterCount.test.js +0 -151
  81. package/v2Containers/WebPush/Create/hooks/useImageUpload.js +0 -104
  82. package/v2Containers/WebPush/Create/hooks/useImageUpload.test.js +0 -538
  83. package/v2Containers/WebPush/Create/hooks/useTagManagement.js +0 -122
  84. package/v2Containers/WebPush/Create/hooks/useTagManagement.test.js +0 -633
  85. package/v2Containers/WebPush/Create/index.js +0 -1148
  86. package/v2Containers/WebPush/Create/index.scss +0 -134
  87. package/v2Containers/WebPush/Create/messages.js +0 -211
  88. package/v2Containers/WebPush/Create/preview/DevicePreviewContent.js +0 -228
  89. package/v2Containers/WebPush/Create/preview/NotificationContainer.js +0 -294
  90. package/v2Containers/WebPush/Create/preview/PreviewContent.js +0 -90
  91. package/v2Containers/WebPush/Create/preview/PreviewControls.js +0 -305
  92. package/v2Containers/WebPush/Create/preview/PreviewDisclaimer.js +0 -25
  93. package/v2Containers/WebPush/Create/preview/WebPushPreview.js +0 -155
  94. package/v2Containers/WebPush/Create/preview/assets/Light.svg +0 -53
  95. package/v2Containers/WebPush/Create/preview/assets/Top.svg +0 -5
  96. package/v2Containers/WebPush/Create/preview/assets/android-arrow-down.svg +0 -9
  97. package/v2Containers/WebPush/Create/preview/assets/android-arrow-up.svg +0 -9
  98. package/v2Containers/WebPush/Create/preview/assets/chrome-icon.png +0 -0
  99. package/v2Containers/WebPush/Create/preview/assets/edge-icon.png +0 -0
  100. package/v2Containers/WebPush/Create/preview/assets/firefox-icon.svg +0 -106
  101. package/v2Containers/WebPush/Create/preview/assets/iOS.svg +0 -26
  102. package/v2Containers/WebPush/Create/preview/assets/macos-arrow-down-icon.svg +0 -9
  103. package/v2Containers/WebPush/Create/preview/assets/macos-triple-dot-icon.svg +0 -9
  104. package/v2Containers/WebPush/Create/preview/assets/opera-icon.svg +0 -18
  105. package/v2Containers/WebPush/Create/preview/assets/safari-icon.svg +0 -29
  106. package/v2Containers/WebPush/Create/preview/assets/windows-close-icon.svg +0 -9
  107. package/v2Containers/WebPush/Create/preview/assets/windows-triple-dot-icon.svg +0 -9
  108. package/v2Containers/WebPush/Create/preview/components/AndroidMobileChromeHeader.js +0 -51
  109. package/v2Containers/WebPush/Create/preview/components/AndroidMobileExpanded.js +0 -145
  110. package/v2Containers/WebPush/Create/preview/components/IOSHeader.js +0 -45
  111. package/v2Containers/WebPush/Create/preview/components/NotificationExpandedContent.js +0 -68
  112. package/v2Containers/WebPush/Create/preview/components/NotificationHeader.js +0 -61
  113. package/v2Containers/WebPush/Create/preview/components/WindowsChromeExpanded.js +0 -99
  114. package/v2Containers/WebPush/Create/preview/components/tests/AndroidMobileExpanded.test.js +0 -733
  115. package/v2Containers/WebPush/Create/preview/components/tests/WindowsChromeExpanded.test.js +0 -571
  116. package/v2Containers/WebPush/Create/preview/components/tests/__snapshots__/AndroidMobileExpanded.test.js.snap +0 -85
  117. package/v2Containers/WebPush/Create/preview/components/tests/__snapshots__/WindowsChromeExpanded.test.js.snap +0 -81
  118. package/v2Containers/WebPush/Create/preview/config/notificationMappings.js +0 -50
  119. package/v2Containers/WebPush/Create/preview/constants.js +0 -637
  120. package/v2Containers/WebPush/Create/preview/notification-container.scss +0 -79
  121. package/v2Containers/WebPush/Create/preview/preview.scss +0 -358
  122. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-chrome.scss +0 -370
  123. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-edge.scss +0 -12
  124. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-firefox.scss +0 -12
  125. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-opera.scss +0 -12
  126. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-chrome.scss +0 -47
  127. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-edge.scss +0 -11
  128. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-firefox.scss +0 -11
  129. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-opera.scss +0 -11
  130. package/v2Containers/WebPush/Create/preview/styles/_base.scss +0 -207
  131. package/v2Containers/WebPush/Create/preview/styles/_ios.scss +0 -153
  132. package/v2Containers/WebPush/Create/preview/styles/_ipados.scss +0 -107
  133. package/v2Containers/WebPush/Create/preview/styles/_macos-chrome.scss +0 -101
  134. package/v2Containers/WebPush/Create/preview/styles/_windows-chrome.scss +0 -229
  135. package/v2Containers/WebPush/Create/preview/tests/DevicePreviewContent.test.js +0 -909
  136. package/v2Containers/WebPush/Create/preview/tests/NotificationContainer.test.js +0 -1081
  137. package/v2Containers/WebPush/Create/preview/tests/PreviewControls.test.js +0 -723
  138. package/v2Containers/WebPush/Create/preview/tests/WebPushPreview.test.js +0 -1327
  139. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/DevicePreviewContent.test.js.snap +0 -131
  140. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/NotificationContainer.test.js.snap +0 -112
  141. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/PreviewControls.test.js.snap +0 -144
  142. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/WebPushPreview.test.js.snap +0 -129
  143. package/v2Containers/WebPush/Create/utils/payloadBuilder.js +0 -96
  144. package/v2Containers/WebPush/Create/utils/payloadBuilder.test.js +0 -396
  145. package/v2Containers/WebPush/Create/utils/previewUtils.js +0 -89
  146. package/v2Containers/WebPush/Create/utils/urlValidation.js +0 -115
  147. package/v2Containers/WebPush/Create/utils/urlValidation.test.js +0 -449
  148. package/v2Containers/WebPush/Create/utils/validation.js +0 -76
  149. package/v2Containers/WebPush/Create/utils/validation.test.js +0 -283
  150. package/v2Containers/WebPush/actions.js +0 -60
  151. package/v2Containers/WebPush/constants.js +0 -132
  152. package/v2Containers/WebPush/index.js +0 -2
  153. package/v2Containers/WebPush/reducer.js +0 -104
  154. package/v2Containers/WebPush/sagas.js +0 -119
  155. package/v2Containers/WebPush/selectors.js +0 -65
  156. package/v2Containers/WebPush/tests/reducer.test.js +0 -863
  157. package/v2Containers/WebPush/tests/sagas.test.js +0 -566
  158. package/v2Containers/WebPush/tests/selectors.test.js +0 -960
@@ -79,7 +79,6 @@ import * as whatsappActions from '../Whatsapp/actions';
79
79
  import * as rcsActions from '../Rcs/actions';
80
80
  import * as zaloActions from '../Zalo/actions';
81
81
  import * as inAppActions from '../InApp/actions';
82
- import * as webpushActions from '../WebPush/actions';
83
82
  import * as globalActions from '../Cap/actions';
84
83
  import { makeSelectAuthenticated } from '../Cap/selectors';
85
84
  import { UserIsAuthenticated } from '../../utils/authWrapper';
@@ -138,7 +137,7 @@ import rcsMessages from '../Rcs/messages';
138
137
  import globalMessages from '../../v2Containers/Cap/messages';
139
138
  import { handlePreviewInNewTab } from '../../utils/common';
140
139
 
141
- import { MOBILE_PUSH, WECHAT, SMS, EMAIL, EBILL, LINE, VIBER, FACEBOOK, WHATSAPP, RCS, ZALO, INAPP, WEBPUSH } from '../CreativesContainer/constants';
140
+ import { MOBILE_PUSH, WECHAT, SMS, EMAIL, EBILL, LINE, VIBER, FACEBOOK, WHATSAPP, RCS, ZALO, INAPP } from '../CreativesContainer/constants';
142
141
 
143
142
  import {CREATIVE} from '../Facebook/constants';
144
143
  import videoPlay from '../../assets/videoPlay.svg';
@@ -156,13 +155,10 @@ import { DAEMON } from '@capillarytech/vulcan-react-sdk/utils/sagaInjectorTypes'
156
155
  import { Rcs } from '../Rcs';
157
156
  import { makeSelectRcs } from '../Rcs/selectors';
158
157
  import { getRcsStatusType } from '../Rcs/utils';
159
- import { makeSelectWebPush } from '../WebPush/selectors';
160
158
  import { v2MobilePushSagas } from '../MobilePushNew/sagas';
161
159
  import { AUTO_CAROUSEL, BIG_PICTURE, FILMSTRIP_CAROUSEL, MANUAL_CAROUSEL } from '../MobilePushNew/constants';
162
160
  import CapPageSpinner from '../../v2Components/CapPageSpinner';
163
- import webPushSagas from '../WebPush/sagas';
164
161
  const withMobilePushNewSaga = injectSaga({ key: 'mobilePushNew', saga: v2MobilePushSagas, mode: DAEMON });
165
- const withWebPushSaga = injectSaga({ key: 'webPush', saga: webPushSagas, mode: DAEMON });
166
162
 
167
163
  const { timeTracker } = GA;
168
164
  const {CapCustomCardList} = CapCustomCard;
@@ -216,7 +212,6 @@ const EBILL_LOWERCASE = EBILL.toLowerCase();
216
212
  const LINE_LOWERCASE = LINE.toLowerCase();
217
213
  const ZALO_LOWERCASE = ZALO.toLowerCase();
218
214
  const WECHAT_LOWERCASE = WECHAT.toLowerCase();
219
- const WEBPUSH_LOWERCASE = WEBPUSH.toLowerCase();
220
215
  const duplicateEnum = {
221
216
  sms: "smsActions",
222
217
  line: "lineActions",
@@ -275,9 +270,6 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
275
270
  // Phase 18: EMAIL API call flag
276
271
  isWaitingForEmailTemplateDetails: false,
277
272
  };
278
- // Timeout IDs for cleanup
279
- this._clearEditTimeout = null;
280
- this._clearCreateTimeout = null;
281
273
  this.getAllTemplates = this.getAllTemplates.bind(this);
282
274
  this.createTemplate = this.createTemplate.bind(this);
283
275
  this.searchTemplate = this.searchTemplate.bind(this);
@@ -403,19 +395,10 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
403
395
  orgUnitId: -1,
404
396
  });
405
397
  break;
406
- case WEBPUSH:
407
- channel = 'Webpush';
408
- activeMode = ACCOUNT_SELECTION_MODE;
409
- this.props.actions.getWeCrmAccounts('WebPush');
410
- break;
411
398
  default:
412
399
  channel = '';
413
400
  }
414
401
  this.setState({ channel, activeMode });
415
- // Clear templates when entering account selection mode to prevent showing old channel templates
416
- if (activeMode === ACCOUNT_SELECTION_MODE) {
417
- this.props.actions.resetTemplate();
418
- }
419
402
  if (isEmpty(this.props.Templates?.userList)) {
420
403
  this.props.actions.getUserList();
421
404
  }
@@ -513,10 +496,6 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
513
496
  channel = 'Facebook';
514
497
  this.setState({defaultAccount: true});
515
498
  nextProps.actions.getAccountsSettings();
516
- } else if (nextProps.route.name.toLowerCase() === WEBPUSH_LOWERCASE) {
517
- this.setState({defaultAccount: true});
518
- channel = 'Webpush';
519
- nextProps.actions.getWeCrmAccounts('WebPush');
520
499
  }
521
500
 
522
501
  // Phase 14: Reset Test and Preview state on channel change
@@ -668,50 +647,6 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
668
647
  }, 1000);
669
648
  }
670
649
 
671
- // Check for WebPush edit response - prevent duplicate calls
672
- if (selectedChannel === WEBPUSH_LOWERCASE && nextProps.WebPush?.editResponse && (nextProps.WebPush.editResponse.templateId || nextProps.WebPush.editResponse._id) && !isEqual(nextProps.WebPush.editResponse, this.props.WebPush?.editResponse)) {
673
- const channelLabel = this.props.intl.formatMessage(messages.webpushHeader);
674
- const message = `${channelLabel} ${this.props.intl.formatMessage(messages.templateUpdateSuccess)}`;
675
- CapNotification.success({
676
- key: 'webpushEditSuccess',
677
- message
678
- });
679
- // Clear previous state before loading newer templates
680
- this.props.actions.resetTemplate();
681
- this.getAllTemplates({params, resetPage: true});
682
- // Delay clearing to allow drawer to close first
683
- // Clear any existing timeout before setting a new one
684
- if (this._clearEditTimeout) {
685
- clearTimeout(this._clearEditTimeout);
686
- }
687
- this._clearEditTimeout = setTimeout(() => {
688
- this.props.webpushActions.clearEditResponse();
689
- this._clearEditTimeout = null;
690
- }, 200);
691
- }
692
-
693
- // Check for WebPush create response (for new template creation)
694
- if (selectedChannel === WEBPUSH_LOWERCASE && nextProps.WebPush?.response && (nextProps.WebPush.response?.templateId || nextProps.WebPush.response?._id) && !isEqual(nextProps.WebPush.response, this.props.WebPush?.response)) {
695
- // Skip showing generic "created" toast when this is a duplicate operation
696
- if (!nextProps.WebPush.response.meta?.isDuplicate) {
697
- const channelLabel = this.props.intl.formatMessage(messages.webpushHeader);
698
- const message = `${channelLabel} ${this.props.intl.formatMessage(messages.templateCreateSuccess)}`;
699
- CapNotification.success({key: 'webpushCreateSuccess', message});
700
- // Clear previous state before loading newer templates
701
- this.props.actions.resetTemplate();
702
- this.getAllTemplates({params, resetPage: true});
703
- // Delay clearing to allow drawer to close first
704
- // Clear any existing timeout before setting a new one
705
- if (this._clearCreateTimeout) {
706
- clearTimeout(this._clearCreateTimeout);
707
- }
708
- this._clearCreateTimeout = setTimeout(() => {
709
- this.props.webpushActions.clearCreateResponse();
710
- this._clearCreateTimeout = null;
711
- }, 200);
712
- }
713
- }
714
-
715
650
 
716
651
 
717
652
  if (nextProps.Create && this.props.Create && nextProps.Create.createTemplateError && !isEqual(nextProps.Create.createTemplateError, this.props.Create.createTemplateError)) {
@@ -719,7 +654,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
719
654
  if ((this.state.channel || '').toLowerCase() !== "sms") {
720
655
  CapNotification.error({key: 'somethingWrong', message});
721
656
  }
722
- const { smsActions, mobilepushActions, ebillActions, lineActions, viberActions, facebookActions, whatsappActions, inAppActions, rcsActions, webpushActions } = this.props;
657
+ const { smsActions, mobilepushActions, ebillActions, lineActions, viberActions, facebookActions, whatsappActions, inAppActions, rcsActions } = this.props;
723
658
  switch (selectedChannel) {
724
659
  case SMS_LOWERCASE:
725
660
  smsActions.clearCreateResponse();
@@ -748,9 +683,6 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
748
683
  case inAppActions:
749
684
  inAppActions.clearCreateResponse();
750
685
  break;
751
- case WEBPUSH_LOWERCASE:
752
- webpushActions.clearCreateResponse();
753
- break;
754
686
  default:
755
687
  break;
756
688
  }
@@ -763,10 +695,6 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
763
695
  nextProps.Templates.deleteResponse) {
764
696
  const message = `${this.state.channel} ${this.props.intl.formatMessage(messages['Template deleted successfully'])}`;
765
697
  CapNotification.success({key: 'deleteSucess', message});
766
- // Clear previous state before loading newer templates for web push channel
767
- if (selectedChannel === WEBPUSH_LOWERCASE) {
768
- this.props.actions.resetTemplate();
769
- }
770
698
  this.getAllTemplates({params, resetPage: true});
771
699
  }
772
700
 
@@ -879,7 +807,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
879
807
  this.setState({ previewTemplate: nextProps.Templates.templateDetails });
880
808
  }
881
809
  const { weCrmAccounts: weCrmAccountsList = [], senderDetails = {} } = get(nextProps, 'Templates', {});
882
- const weCrmChannels = [WHATSAPP_LOWERCASE, ZALO_LOWERCASE, RCS_LOWERCASE, WEBPUSH_LOWERCASE];
810
+ const weCrmChannels = [WHATSAPP_LOWERCASE, ZALO_LOWERCASE, RCS_LOWERCASE];
883
811
 
884
812
  // Keeping the wechat flow separate as it has different logic for setting the account. Currently we don't support wechat but still keeping the flow.
885
813
  if (weCrmAccountsList?.length === 1 && this.state?.defaultAccount && selectedChannel === WECHAT_LOWERCASE && !isEmpty(senderDetails?.hostName)) {
@@ -906,9 +834,9 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
906
834
  const isSingleAccount = weCrmAccountsList?.length === 1;
907
835
  const selectedAccount = this.props.Templates[ACCOUNT_MAPPING_ON_CHANNEL[selectedChannel]] || {};
908
836
  const hostName = this.getHostName(isSingleAccount ? weCrmAccountsList[0]?.sourceAccountIdentifier : selectedAccount?.sourceAccountIdentifier, senderDetails?.domainProperties);
909
- if (!isEmpty(hostName) || selectedChannel === WEBPUSH_LOWERCASE) {
837
+ if (!isEmpty(hostName)) {
910
838
  const paramsDefault = {};
911
- const {name, sourceAccountIdentifier, configs, id } = weCrmAccountsList?.[0] || {};
839
+ const {name, sourceAccountIdentifier, configs } = weCrmAccountsList?.[0] || {};
912
840
  if (isSingleAccount) {
913
841
  weCrmAccountsList[0].hostName = hostName;
914
842
  this.setState({ selectedAccount: name });
@@ -933,9 +861,6 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
933
861
  paramsDefault.accessToken = configs?.accessToken;
934
862
  paramsDefault.host = hostName || this.props.Templates?.selectedRcsAccount?.hostName;
935
863
  }
936
- if (selectedChannel === WEBPUSH_LOWERCASE) {
937
- paramsDefault.accountId = id;
938
- }
939
864
  this.setState({ defaultAccount: false });
940
865
  /**
941
866
  * Incase of multiple accounts, getAllTemplates is called on selecting the account. It's handled in onAccountSelect function.
@@ -958,15 +883,6 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
958
883
  window.removeEventListener("message", this.handleFrameTasks);
959
884
  this.props.actions.resetTemplateStoreData();
960
885
  this.props.globalActions.clearMetaEntities();
961
- // Clear any pending timeouts to prevent memory leaks
962
- if (this._clearEditTimeout) {
963
- clearTimeout(this._clearEditTimeout);
964
- this._clearEditTimeout = null;
965
- }
966
- if (this._clearCreateTimeout) {
967
- clearTimeout(this._clearCreateTimeout);
968
- this._clearCreateTimeout = null;
969
- }
970
886
  // this.props.actions.resetAccount();
971
887
  // this.setState({defaultAccount: false});
972
888
  // Phase 14: Cleanup Test and Preview state
@@ -977,10 +893,8 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
977
893
  });
978
894
  }
979
895
 
980
- onAccountSelect(e) {
896
+ onAccountSelect(e) {
981
897
  const value = e.target.value;
982
- // Clear templates immediately when account is selected to prevent showing old channel templates
983
- this.props.actions.resetTemplate();
984
898
  this.setState({selectedAccount: value}, () => {
985
899
  const params = {};
986
900
  if (this.state.channel.toLowerCase() !== ZALO_LOWERCASE) {
@@ -1008,7 +922,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1008
922
  } else {
1009
923
  this.setState({ selectedAccountError: false });
1010
924
  }
1011
- } else if ([LINE.toLowerCase(), RCS_LOWERCASE, ZALO_LOWERCASE, WHATSAPP_LOWERCASE, WEBPUSH_LOWERCASE].includes(selectedChannel)) {
925
+ } else if ([LINE.toLowerCase(), RCS_LOWERCASE, ZALO_LOWERCASE, WHATSAPP_LOWERCASE].includes(selectedChannel)) {
1012
926
  const setAcc = this.props?.Templates?.weCrmAccounts?.find((item) => item?.name === this.state.selectedAccount);
1013
927
  const { domainProperties = [] } = this.props?.Templates?.senderDetails || {};
1014
928
  let hostName = '';
@@ -1035,9 +949,6 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1035
949
  params.accountId = sourceAccountIdentifier;
1036
950
  params.host = hostName;
1037
951
  }
1038
- if (selectedChannel === WEBPUSH_LOWERCASE && setAcc) {
1039
- params.accountId = setAcc.accountId || setAcc.id;
1040
- }
1041
952
  if (selectedChannel === RCS_LOWERCASE && hostName) {
1042
953
  const { configs: { accessToken = "" } = {} } = setAcc || {};
1043
954
  params.accountId = sourceAccountIdentifier;
@@ -1491,41 +1402,32 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1491
1402
  let creativesParams = {mode: ''};
1492
1403
  if (!isEmpty(routeParams)) {
1493
1404
  const { pathname } = routeParams;
1494
- if (pathname) {
1495
- if (pathname.includes('create')) {
1496
- creativesParams.mode = 'create';
1497
- } else if (pathname.includes('edit') || pathname.includes('overview')) {
1498
- creativesParams.mode = 'edit';
1499
- if (pathname.includes('richmedia')) {
1500
- creativesParams._id = pathname.split('/')[4];
1501
- creativesParams.definition = {
1502
- msgcontent: "RICH_MEDIA_WECHAT",
1503
- };
1504
- } else {
1505
- creativesParams._id = pathname.split('/')[3];
1506
- creativesParams.modeType = pathname.split('/')[4];
1507
- creativesParams.account = pathname.split('/')[5];
1508
- if (this.state.channel.toLowerCase() === WHATSAPP_LOWERCASE) {
1509
- const whatsappSelectedTemplateData = this.selectTemplate(creativesParams._id) || {};
1510
- const { name = '', versions = {} } = whatsappSelectedTemplateData;
1511
- creativesParams.whatsappTemplateName = name;
1512
- creativesParams.whatsappTemplateCategory = get(versions, `base.content.whatsapp.category`, '');
1513
- creativesParams.whatsappTemplateLanguageCode = get(versions, `base.content.whatsapp.languages[0].language`, '');
1514
- } else if (this.state.channel.toLocaleLowerCase() === ZALO_LOWERCASE) {
1515
- const zaloSelectedTemplateData = this.selectTemplate(parseInt(creativesParams._id, 10)) || {};
1516
- const { name = '' } = zaloSelectedTemplateData;
1517
- creativesParams.name = name
1518
- } else if (this.state.channel.toLowerCase() === WEBPUSH_LOWERCASE) {
1519
- // For WebPush, extract only the fields the component uses
1520
- const webpushSelectedTemplateData = this.selectTemplate(creativesParams._id) || {};
1521
- const { name = '', definition = {}, versions = {} } = webpushSelectedTemplateData;
1522
- creativesParams.name = name;
1523
- creativesParams.definition = definition;
1524
- creativesParams.versions = versions;
1525
- }
1405
+ if (pathname.includes('create')) {
1406
+ creativesParams.mode = 'create';
1407
+ } else if (pathname.includes('edit') || pathname.includes('overview')) {
1408
+ creativesParams.mode = 'edit';
1409
+ if (pathname.includes('richmedia')) {
1410
+ creativesParams._id = pathname.split('/')[4];
1411
+ creativesParams.definition = {
1412
+ msgcontent: "RICH_MEDIA_WECHAT",
1413
+ };
1414
+ } else {
1415
+ creativesParams._id = pathname.split('/')[3];
1416
+ creativesParams.modeType = pathname.split('/')[4];
1417
+ creativesParams.account = pathname.split('/')[5];
1418
+ if (this.state.channel.toLowerCase() === WHATSAPP_LOWERCASE) {
1419
+ const whatsappSelectedTemplateData = this.selectTemplate(creativesParams._id) || {};
1420
+ const { name = '', versions = {} } = whatsappSelectedTemplateData;
1421
+ creativesParams.whatsappTemplateName = name;
1422
+ creativesParams.whatsappTemplateCategory = get(versions, `base.content.whatsapp.category`, '');
1423
+ creativesParams.whatsappTemplateLanguageCode = get(versions, `base.content.whatsapp.languages[0].language`, '');
1424
+ } else if (this.state.channel.toLocaleLowerCase() === ZALO_LOWERCASE) {
1425
+ const zaloSelectedTemplateData = this.selectTemplate(parseInt(creativesParams._id, 10)) || {};
1426
+ const { name = '' } = zaloSelectedTemplateData;
1427
+ creativesParams.name = name
1526
1428
  }
1527
- creativesParams.type = this.state.channel.toUpperCase();
1528
1429
  }
1430
+ creativesParams.type = this.state.channel.toUpperCase();
1529
1431
  }
1530
1432
  }
1531
1433
  if (this.state.previewOpen) {
@@ -1559,13 +1461,6 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1559
1461
  queryParams.host = params?.host || this.state?.hostName;
1560
1462
  };
1561
1463
 
1562
- setWebpushQueryParams = (queryParams, params) => {
1563
- const selectedAccount = this.props.Templates?.selectedWebPushAccount;
1564
- queryParams.accountId = params?.accountId
1565
- || selectedAccount?.accountId
1566
- || selectedAccount?.id;
1567
- };
1568
-
1569
1464
  getAllTemplates = ({params, getNextPage, resetPage}, resetTemplates) => {
1570
1465
  let queryParams = params || {};
1571
1466
  let page = this.state.page;
@@ -1597,9 +1492,6 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1597
1492
  if (this.state?.channel?.toLowerCase() === WHATSAPP_LOWERCASE) {
1598
1493
  this.setWhatsappQueryParams(queryParams, params);
1599
1494
  }
1600
- if (this.state?.channel?.toLowerCase() === WEBPUSH_LOWERCASE) {
1601
- this.setWebpushQueryParams(queryParams, params);
1602
- }
1603
1495
  if (this.state?.channel?.toLowerCase() === RCS_LOWERCASE && !isEmpty(this.props.Templates?.selectedRcsAccount)) {
1604
1496
  const { sourceAccountIdentifier = '', configs: { accessToken = '' } = {}, hostName = '' } = this.props.Templates.selectedRcsAccount;
1605
1497
  if (sourceAccountIdentifier) {
@@ -1664,9 +1556,6 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
1664
1556
  if (this.state?.channel?.toLowerCase() === WHATSAPP_LOWERCASE) {
1665
1557
  this.setWhatsappQueryParams(queryParams, params);
1666
1558
  }
1667
- if (this.state?.channel?.toLowerCase() === WEBPUSH_LOWERCASE) {
1668
- this.setWebpushQueryParams(queryParams, params);
1669
- }
1670
1559
  if (this.state?.channel?.toLowerCase() === RCS_LOWERCASE && !isEmpty(this.props.Templates?.selectedRcsAccount)) {
1671
1560
  const { sourceAccountIdentifier = '', configs: { accessToken = '' } = {}, hostName = '' } = this.props.Templates.selectedRcsAccount;
1672
1561
  if (sourceAccountIdentifier) {
@@ -2413,70 +2302,6 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
2413
2302
  templateData.content = <CapLabel type="label19" className="zalo-listing-content desc">{template.name}</CapLabel>;
2414
2303
  break;
2415
2304
  }
2416
- case WEBPUSH: {
2417
- const webpushContent = get(template, 'versions.base.content.webpush', {});
2418
- const notificationTitle = webpushContent?.title || '';
2419
- const notificationMessage = webpushContent?.message || '';
2420
- const brandIcon = webpushContent?.brandIcon || '';
2421
- const mediaImage = webpushContent?.image || '';
2422
- const ctaButtons = Array.isArray(webpushContent?.ctas)
2423
- ? webpushContent.ctas.filter(
2424
- (cta) => typeof cta?.actionText === 'string' && cta.actionText.trim()
2425
- )
2426
- : [];
2427
- const visibleCtas = ctaButtons.slice(0, 2);
2428
- templateData.content = (
2429
- <div className="sms-template-content webpush-template-content">
2430
- <div className="webpush-template-card">
2431
- <div className="webpush-template-meta">
2432
- {brandIcon ? (
2433
- <img
2434
- src={brandIcon}
2435
- alt="Brand Icon"
2436
- className="webpush-brand-icon"
2437
- />
2438
- ) : (
2439
- <span className="webpush-brand-icon-placeholder" />
2440
- )}
2441
- <div className="webpush-template-text">
2442
- <div className="webpush-template-header">
2443
- <div className="webpush-template-title">
2444
- {notificationTitle}
2445
- </div>
2446
- <div className="webpush-template-time">2:29 PM</div>
2447
- </div>
2448
- {notificationMessage ? (
2449
- <div className="webpush-template-message">
2450
- {notificationMessage}
2451
- </div>
2452
- ) : null}
2453
- {mediaImage ? (
2454
- <img
2455
- src={mediaImage}
2456
- alt="Media"
2457
- className="webpush-media-image"
2458
- />
2459
- ) : null}
2460
- </div>
2461
- </div>
2462
- {visibleCtas.length ? (
2463
- <div
2464
- className={`webpush-template-cta-section${
2465
- visibleCtas.length === 1 ? ' single-cta' : ''
2466
- }`}
2467
- >
2468
- {visibleCtas.map((cta, index) => (
2469
- <div className="webpush-template-cta-item" key={`webpush-cta-${index}`}>
2470
- <span className="webpush-template-cta-text">{cta.actionText}</span>
2471
- </div>
2472
- ))}
2473
- </div>
2474
- ) : null}
2475
- </div>
2476
- </div>
2477
- );
2478
- break;
2479
- }
2480
2305
  default:
2481
2306
  templateData.content = "";
2482
2307
  }
@@ -2512,7 +2337,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
2512
2337
  const noLoaderAndSearchText = isEmpty(this.state.searchText) && !isLoading;
2513
2338
 
2514
2339
  return (<div>
2515
- {[WECHAT, MOBILE_PUSH, WEBPUSH, INAPP, WHATSAPP, ZALO, RCS].includes(currentChannel) && this.showAccountName()}
2340
+ {[WECHAT, MOBILE_PUSH, INAPP, WHATSAPP, ZALO,RCS].includes(currentChannel) && this.showAccountName()}
2516
2341
  {filterContent}
2517
2342
  {[WHATSAPP, ZALO,RCS].includes(currentChannel) && this.selectedFilters()}
2518
2343
  {<div>
@@ -2586,11 +2411,6 @@ return (<div>
2586
2411
  <ChannelTypeIllustration isFullMode={this.props.isFullMode} createTemplate={this.createTemplate} currentChannel={currentChannel}/>
2587
2412
  </div>
2588
2413
  }
2589
- {showIllustrationForChannel(WEBPUSH_LOWERCASE) &&
2590
- <div style={this.isFullMode() ? { height: "calc(100vh - 20.3125rem)", overflow: 'auto' } : {}}>
2591
- <ChannelTypeIllustration isFullMode={this.props.isFullMode} createTemplate={this.createTemplate} currentChannel={currentChannel} hostName={this.state?.hostName}/>
2592
- </div>
2593
- }
2594
2414
  {<CapCustomSkeleton loader={isInitialLoading && (isLoading || getAllTemplatesInProgress)} />}
2595
2415
  {<CapPageSpinner spinning={!isInitialLoading && (isLoading || getAllTemplatesInProgress)} />}
2596
2416
  </div>
@@ -2984,10 +2804,6 @@ return (<div>
2984
2804
  params.host = this.state?.hostName;
2985
2805
  }
2986
2806
  this.delay(() => {
2987
- // Clear previous state before loading newer templates for web push channel
2988
- if (this.state.channel.toLowerCase() === WEBPUSH_LOWERCASE) {
2989
- this.props.actions.resetTemplate();
2990
- }
2991
2807
  this.getAllTemplates({params, resetPage: true});
2992
2808
  }, 500);
2993
2809
  });
@@ -3151,32 +2967,6 @@ return (<div>
3151
2967
  this.getAllTemplates({params: {}}, true);
3152
2968
  this.props.inAppActions.clearCreateResponse();
3153
2969
  });
3154
- } else if (this.state.channel.toLowerCase() === "webpush") {
3155
- const params = {
3156
- name: this.state.searchText,
3157
- sortBy: this.state.sortBy,
3158
- };
3159
-
3160
- // Get the selected WebPush account
3161
- const selectedAccount = this.props.Templates?.selectedWebPushAccount;
3162
-
3163
- // Set the accountId in the duplicate object
3164
- if (duplicateObj.definition) {
3165
- duplicateObj.definition.accountId = selectedAccount?.accountId || selectedAccount?.id;
3166
- }
3167
-
3168
- const channelLabel = this.props.intl.formatMessage(messages.webpushHeader);
3169
- this.props.webpushActions.createTemplate(duplicateObj, (response) => {
3170
- if (response && (response.templateId || response._id)) {
3171
- // Clear response immediately to prevent componentWillReceiveProps from showing "created" notification
3172
- this.props.webpushActions.clearCreateResponse();
3173
- // Clear previous state before loading newer templates
3174
- this.props.actions.resetTemplate();
3175
- const message = `${channelLabel} ${this.props.intl.formatMessage(messages.templateDuplicateSuccess)}`;
3176
- CapNotification.success({key: 'duplicateSuccess', message});
3177
- this.getAllTemplates({params, resetPage: true});
3178
- }
3179
- }, { isDuplicate: true });
3180
2970
  } else if (this.state.channel.toLowerCase() === "ebill") {
3181
2971
  this.props.ebillActions.createTemplate(duplicateObj);
3182
2972
  } else if (this.state.channel.toLowerCase() === "email") {
@@ -3311,10 +3101,6 @@ return (<div>
3311
3101
  pathName = `/inapp/edit/${id}/`;
3312
3102
  break;
3313
3103
  }
3314
- case WEBPUSH: {
3315
- pathName = `/webpush/edit/${id}`;
3316
- break;
3317
- }
3318
3104
  default:
3319
3105
  break;
3320
3106
  }
@@ -3662,14 +3448,6 @@ return (<div>
3662
3448
  fetchingWeCrmAccounts,
3663
3449
  sendingFile,
3664
3450
  } = Templates;
3665
-
3666
- // Show loading when in account selection or account change mode
3667
- const isAccountSelectionMode = this.state.activeMode === ACCOUNT_SELECTION_MODE ||
3668
- this.state.activeMode === ACCOUNT_CHANGE_MODE;
3669
- if (isAccountSelectionMode) {
3670
- return false;
3671
- }
3672
-
3673
3451
  const lineLoader = this.checkLoader('line');
3674
3452
  const smsLoader = this.checkLoader('sms');
3675
3453
  const viberLoader = this.checkLoader(VIBER_CHANNEL);
@@ -3692,10 +3470,6 @@ return (<div>
3692
3470
  fetchingWeCrmAccounts ) &&
3693
3471
  this.state.channel.toLowerCase() === ZALO_LOWERCASE;
3694
3472
  const mobilePushLoader = (((getAllTemplatesInProgress) || (fetchingWeCrmAccounts)) && this.state.channel.toLowerCase() === 'mobilepush');
3695
- const webpushLoader = (
3696
- (getAllTemplatesInProgress && this.state.channel.toLowerCase() === WEBPUSH_LOWERCASE) ||
3697
- (fetchingWeCrmAccounts && this.state.channel.toLowerCase() === WEBPUSH_LOWERCASE)
3698
- );
3699
3473
  const inAppLoader = (((this.state.selectedAccount !== '' && getAllTemplatesInProgress) || (fetchingWeCrmAccounts)) && this.state.channel.toLowerCase() === INAPP_LOWERCASE);
3700
3474
  const emailLoader = (
3701
3475
  (getAllTemplatesInProgress ||
@@ -3710,7 +3484,6 @@ return (<div>
3710
3484
  (emailLoader !== undefined ? emailLoader : false) ||
3711
3485
  (ebillLoader !== undefined ? ebillLoader : false) ||
3712
3486
  (mobilePushLoader !== undefined ? mobilePushLoader : false) ||
3713
- (webpushLoader !== undefined ? webpushLoader : false) ||
3714
3487
  (lineLoader !== undefined ? lineLoader : false) ||
3715
3488
  (facebookLoader !== undefined ? facebookLoader : false) ||
3716
3489
  (viberLoader !== undefined ? viberLoader : false) ||
@@ -3781,9 +3554,9 @@ return (<div>
3781
3554
  const isMobilePushChannel = channel === MOBILE_PUSH;
3782
3555
  const isInAppChannel = channel === INAPP;
3783
3556
  const isFacebookChannel = channel === FACEBOOK;
3784
- if ([WECHAT, MOBILE_PUSH, INAPP, LINE, ZALO, WHATSAPP, WEBPUSH, RCS].includes(channel) && !isEmpty(weCrmAccounts) && !isFacebookChannel) {
3557
+ if ([WECHAT, MOBILE_PUSH, INAPP, LINE, ZALO, WHATSAPP, RCS].includes(channel) && !isEmpty(weCrmAccounts) && !isFacebookChannel) {
3785
3558
  forEach(weCrmAccounts, (account) => {
3786
- if ((isWechatChannel && account.configs && account.configs.is_wecrm_enabled) || [MOBILE_PUSH, INAPP, LINE, ZALO, WHATSAPP, WEBPUSH, RCS].includes(channel)) {
3559
+ if ((isWechatChannel && account.configs && account.configs.is_wecrm_enabled) || [MOBILE_PUSH, INAPP, LINE, ZALO, WHATSAPP, RCS].includes(channel)) {
3787
3560
  if (query.type === 'embedded' && (!query.module || (query.module && query.module !== 'library'))) {
3788
3561
  if (query.source_account_id && account.sourceAccountIdentifier === query.source_account_id) {
3789
3562
  accountOptions.push(
@@ -3862,11 +3635,6 @@ return (<div>
3862
3635
  noAccountHeader = messages.noAccountsPresentZalo;
3863
3636
  break;
3864
3637
  }
3865
- case WEBPUSH: {
3866
- accountHeader = formatMessage(messages.webpushAccount);
3867
- noAccountHeader = messages.noAccountsPresentWebpush;
3868
- break;
3869
- }
3870
3638
  case RCS: {
3871
3639
  accountHeader = formatMessage(messages.rcsAccount);
3872
3640
  noAccountHeader = messages.noAccountsPresentRcs;
@@ -3923,12 +3691,10 @@ return (<div>
3923
3691
  };
3924
3692
 
3925
3693
  setAccountSelectionMode = () => {
3926
- this.props.actions.resetTemplate();
3927
3694
  this.setState({activeMode: ACCOUNT_SELECTION_MODE});
3928
3695
  }
3929
3696
 
3930
3697
  setAccountChangeMode = () => {
3931
- this.props.actions.resetTemplate();
3932
3698
  this.setState({activeMode: ACCOUNT_CHANGE_MODE});
3933
3699
  }
3934
3700
 
@@ -3945,7 +3711,6 @@ return (<div>
3945
3711
 
3946
3712
  const channelObj = {
3947
3713
  [MOBILE_PUSH]: 'mobilepushAccount',
3948
- [WEBPUSH]: 'webpushAccount',
3949
3714
  [WECHAT]: 'wechatAccount',
3950
3715
  [WHATSAPP]: 'whatsappAccount',
3951
3716
  [INAPP]: 'inappAccount',
@@ -4564,8 +4329,6 @@ Templates.propTypes = {
4564
4329
  rcsActions: PropTypes.object,
4565
4330
  zaloActions: PropTypes.object,
4566
4331
  inAppActions: PropTypes.object,
4567
- webpushActions: PropTypes.object,
4568
- WebPush: PropTypes.object,
4569
4332
  smsRegister: PropTypes.any,
4570
4333
  isDltFromRcs: PropTypes.bool,
4571
4334
  };
@@ -4585,7 +4348,6 @@ const mapStateToProps = createStructuredSelector({
4585
4348
  Rcs: makeSelectRcs(),
4586
4349
  Zalo: makeSelectZalo(),
4587
4350
  InApp: makeSelectInApp(),
4588
- WebPush: makeSelectWebPush(),
4589
4351
  });
4590
4352
 
4591
4353
  function mapDispatchToProps(dispatch) {
@@ -4605,7 +4367,6 @@ function mapDispatchToProps(dispatch) {
4605
4367
  whatsappActions: bindActionCreators(whatsappActions, dispatch),
4606
4368
  rcsActions: bindActionCreators(rcsActions, dispatch),
4607
4369
  zaloActions: bindActionCreators(zaloActions, dispatch),
4608
- webpushActions: bindActionCreators(webpushActions, dispatch),
4609
4370
  };
4610
4371
  }
4611
4372
 
@@ -4619,7 +4380,6 @@ export default compose(
4619
4380
  UserIsAuthenticated,
4620
4381
  withSaga,
4621
4382
  withMobilePushNewSaga,
4622
- withWebPushSaga,
4623
4383
  withReducer,
4624
4384
  withConnect,
4625
4385
  )(injectIntl(Templates));
@@ -46,10 +46,6 @@ export default defineMessages({
46
46
  id: `${scope}.mobilepushHeader`,
47
47
  defaultMessage: `Mobile Push`,
48
48
  },
49
- "webpushHeader": {
50
- id: `${scope}.webpushHeader`,
51
- defaultMessage: `Web Push`,
52
- },
53
49
  "ebillHeader": {
54
50
  id: `${scope}.ebillHeader`,
55
51
  defaultMessage: `Ebill`,
@@ -346,10 +342,6 @@ export default defineMessages({
346
342
  id: `${scope}.newWhatsappTemplate`,
347
343
  defaultMessage: 'Add new Whatsapp {template}',
348
344
  },
349
- "newWebPushTemplate": {
350
- id: `${scope}.newWebPushTemplate`,
351
- defaultMessage: 'Add new Web push {template}',
352
- },
353
345
  "newInAppMessageTemplate": {
354
346
  id: `${scope}.newInAppMessageTemplate`,
355
347
  defaultMessage: 'Add new In app message {template}',
@@ -386,14 +378,6 @@ export default defineMessages({
386
378
  id: `${scope}.whatsappDescIllustration`,
387
379
  defaultMessage: 'These templates can be reused when creating a\nnew message content.',
388
380
  },
389
- "webPushTitleIllustration": {
390
- id: `${scope}.webPushTitleIllustration`,
391
- defaultMessage: 'Add a new Web push creative {template}',
392
- },
393
- "webPushDescIllustration": {
394
- id: `${scope}.webPushDescIllustration`,
395
- defaultMessage: 'These templates can be reused when creating a new message content.',
396
- },
397
381
  "whatsappAccountNotConfiguredTitle": {
398
382
  id: `${scope}.whatsappAccountNotConfiguredTitle`,
399
383
  defaultMessage: 'Whatsapp account is not configured',
@@ -478,10 +462,6 @@ export default defineMessages({
478
462
  id: `${scope}.zaloAccount`,
479
463
  defaultMessage: 'Zalo account',
480
464
  },
481
- "webpushAccount": {
482
- id: `${scope}.webpushAccount`,
483
- defaultMessage: 'Web push account',
484
- },
485
465
  "rcsAccount": {
486
466
  id: `${scope}.rcsAccount`,
487
467
  defaultMessage: 'RCS account',
@@ -518,10 +498,6 @@ export default defineMessages({
518
498
  id: `${scope}.noAccountsPresentZalo`,
519
499
  defaultMessage: "Zalo accounts are not setup for your brand",
520
500
  },
521
- "noAccountsPresentWebpush": {
522
- id: `${scope}.noAccountsPresentWebpush`,
523
- defaultMessage: "Web push accounts are not setup for your brand",
524
- },
525
501
  "noAccountsPresentRcs": {
526
502
  id: `${scope}.noAccountsPresentRcs`,
527
503
  defaultMessage: "RCS accounts are not setup for your brand",
@@ -124,8 +124,6 @@ function templatesReducer(state = initialState, action) {
124
124
  return state
125
125
  .set('selectedFacebookAccount', fromJS(action.faceBookAccount))
126
126
  .set('templates', []);
127
- case types.SET_WEBPUSH_ACCOUNT:
128
- return state.set('selectedWebPushAccount', fromJS(action.account));
129
127
  case types.RESET_ACCOUNT:
130
128
  return state
131
129
  .remove('selectedWeChatAccount')