@capillarytech/creatives-library 8.0.316 → 8.0.317-alpha.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 (172) hide show
  1. package/constants/unified.js +15 -0
  2. package/package.json +1 -1
  3. package/services/api.js +6 -0
  4. package/services/tests/api.test.js +7 -0
  5. package/utils/common.js +6 -1
  6. package/utils/templateVarUtils.js +172 -0
  7. package/utils/tests/tagValidations.test.js +34 -0
  8. package/utils/tests/templateVarUtils.test.js +160 -0
  9. package/v2Components/CapTagList/index.js +25 -22
  10. package/v2Components/CapTagList/style.scss +48 -0
  11. package/v2Components/CapTagListWithInput/__tests__/CapTagListWithInput.test.js +63 -0
  12. package/v2Components/CapTagListWithInput/index.js +4 -0
  13. package/v2Components/CapWhatsappCTA/index.js +2 -0
  14. package/v2Components/CommonTestAndPreview/CustomValuesEditor.js +70 -49
  15. package/v2Components/CommonTestAndPreview/DeliverySettings/DeliverySettings.scss +8 -2
  16. package/v2Components/CommonTestAndPreview/DeliverySettings/ModifyDeliverySettings.js +207 -21
  17. package/v2Components/CommonTestAndPreview/DeliverySettings/constants.js +16 -0
  18. package/v2Components/CommonTestAndPreview/DeliverySettings/index.js +85 -10
  19. package/v2Components/CommonTestAndPreview/DeliverySettings/messages.js +30 -0
  20. package/v2Components/CommonTestAndPreview/DeliverySettings/utils/parseSenderDetailsResponse.js +79 -11
  21. package/v2Components/CommonTestAndPreview/SendTestMessage.js +11 -5
  22. package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +20 -1
  23. package/v2Components/CommonTestAndPreview/UnifiedPreview/index.js +133 -4
  24. package/v2Components/CommonTestAndPreview/_commonTestAndPreview.scss +12 -0
  25. package/v2Components/CommonTestAndPreview/constants.js +38 -0
  26. package/v2Components/CommonTestAndPreview/index.js +693 -155
  27. package/v2Components/CommonTestAndPreview/messages.js +41 -3
  28. package/v2Components/CommonTestAndPreview/previewApiUtils.js +59 -0
  29. package/v2Components/CommonTestAndPreview/sagas.js +15 -6
  30. package/v2Components/CommonTestAndPreview/tests/CustomValuesEditor.test.js +352 -0
  31. package/v2Components/CommonTestAndPreview/tests/DeliverySettings/ModifyDeliverySettings.test.js +269 -1
  32. package/v2Components/CommonTestAndPreview/tests/DeliverySettings/index.test.js +118 -5
  33. package/v2Components/CommonTestAndPreview/tests/DeliverySettings/utils/parseSenderDetailsResponse.test.js +341 -0
  34. package/v2Components/CommonTestAndPreview/tests/SendTestMessage.test.js +25 -4
  35. package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/index.test.js +199 -1
  36. package/v2Components/CommonTestAndPreview/tests/index.test.js +132 -4
  37. package/v2Components/CommonTestAndPreview/tests/previewApiUtils.test.js +67 -0
  38. package/v2Components/CommonTestAndPreview/tests/sagas.test.js +2 -2
  39. package/v2Components/FormBuilder/index.js +14 -1
  40. package/v2Components/HtmlEditor/HTMLEditor.js +6 -1
  41. package/v2Components/HtmlEditor/__tests__/HTMLEditor.apiErrors.test.js +1 -0
  42. package/v2Components/HtmlEditor/__tests__/HTMLEditor.test.js +927 -2
  43. package/v2Components/HtmlEditor/components/CodeEditorPane/index.js +3 -0
  44. package/v2Components/SmsFallback/SmsFallbackLocalSelector.js +87 -0
  45. package/v2Components/SmsFallback/constants.js +73 -0
  46. package/v2Components/SmsFallback/index.js +956 -0
  47. package/v2Components/SmsFallback/index.scss +265 -0
  48. package/v2Components/SmsFallback/messages.js +78 -0
  49. package/v2Components/SmsFallback/smsFallbackUtils.js +107 -0
  50. package/v2Components/SmsFallback/tests/SmsFallbackLocalSelector.test.js +50 -0
  51. package/v2Components/SmsFallback/tests/rcsSmsFallback.acceptance.test.js +147 -0
  52. package/v2Components/SmsFallback/tests/smsFallbackHandlers.test.js +304 -0
  53. package/v2Components/SmsFallback/tests/smsFallbackUi.test.js +197 -0
  54. package/v2Components/SmsFallback/tests/smsFallbackUtils.test.js +261 -0
  55. package/v2Components/SmsFallback/tests/useLocalTemplateList.test.js +422 -0
  56. package/v2Components/SmsFallback/useLocalTemplateList.js +92 -0
  57. package/v2Components/TestAndPreviewSlidebox/index.js +8 -1
  58. package/v2Components/TestAndPreviewSlidebox/sagas.js +11 -4
  59. package/v2Components/TestAndPreviewSlidebox/tests/saga.test.js +3 -1
  60. package/v2Components/VarSegmentMessageEditor/constants.js +2 -0
  61. package/v2Components/VarSegmentMessageEditor/index.js +125 -0
  62. package/v2Components/VarSegmentMessageEditor/index.scss +46 -0
  63. package/v2Containers/BeeEditor/index.js +3 -0
  64. package/v2Containers/CommunicationFlow/CommunicationFlow.js +291 -0
  65. package/v2Containers/CommunicationFlow/CommunicationFlow.scss +25 -0
  66. package/v2Containers/CommunicationFlow/Tests/CommunicationFlow.test.js +255 -0
  67. package/v2Containers/CommunicationFlow/constants.js +200 -0
  68. package/v2Containers/CommunicationFlow/index.js +102 -0
  69. package/v2Containers/CommunicationFlow/messages.js +346 -0
  70. package/v2Containers/CommunicationFlow/steps/ChannelSelectionStep/ChannelSelectionStep.js +522 -0
  71. package/v2Containers/CommunicationFlow/steps/ChannelSelectionStep/ChannelSelectionStep.scss +170 -0
  72. package/v2Containers/CommunicationFlow/steps/ChannelSelectionStep/Tests/ChannelSelectionStep.test.js +796 -0
  73. package/v2Containers/CommunicationFlow/steps/ChannelSelectionStep/index.js +5 -0
  74. package/v2Containers/CommunicationFlow/steps/CommunicationStrategyStep/CommunicationStrategyStep.js +95 -0
  75. package/v2Containers/CommunicationFlow/steps/CommunicationStrategyStep/Tests/CommunicationStrategyStep.test.js +133 -0
  76. package/v2Containers/CommunicationFlow/steps/CommunicationStrategyStep/index.js +5 -0
  77. package/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/DeliverySettingsSection.js +289 -0
  78. package/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/DeliverySettingsSection.scss +70 -0
  79. package/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/SenderDetails.js +319 -0
  80. package/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/SenderDetails.scss +69 -0
  81. package/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/Tests/DeliverySettingsSection.test.js +616 -0
  82. package/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/Tests/SenderDetails.test.js +577 -0
  83. package/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/Tests/deliverySettingsConfig.test.js +1111 -0
  84. package/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/deliverySettingsConfig.js +696 -0
  85. package/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/index.js +7 -0
  86. package/v2Containers/CommunicationFlow/steps/DynamicControlsStep/DynamicControlsStep.js +102 -0
  87. package/v2Containers/CommunicationFlow/steps/DynamicControlsStep/DynamicControlsStep.scss +36 -0
  88. package/v2Containers/CommunicationFlow/steps/DynamicControlsStep/Tests/DynamicControlsStep.test.js +91 -0
  89. package/v2Containers/CommunicationFlow/steps/DynamicControlsStep/index.js +5 -0
  90. package/v2Containers/CommunicationFlow/steps/MessageTypeStep/MessageTypeStep.js +86 -0
  91. package/v2Containers/CommunicationFlow/steps/MessageTypeStep/Tests/MessageTypeStep.test.js +100 -0
  92. package/v2Containers/CommunicationFlow/steps/MessageTypeStep/index.js +5 -0
  93. package/v2Containers/CommunicationFlow/utils/getEnabledSteps.js +30 -0
  94. package/v2Containers/CreativesContainer/CreativesSlideBoxWrapper.js +43 -0
  95. package/v2Containers/CreativesContainer/SlideBoxContent.js +64 -5
  96. package/v2Containers/CreativesContainer/SlideBoxFooter.js +10 -1
  97. package/v2Containers/CreativesContainer/SlideBoxHeader.js +29 -4
  98. package/v2Containers/CreativesContainer/constants.js +12 -0
  99. package/v2Containers/CreativesContainer/embeddedSlideboxUtils.js +67 -0
  100. package/v2Containers/CreativesContainer/index.js +289 -93
  101. package/v2Containers/CreativesContainer/index.scss +51 -1
  102. package/v2Containers/CreativesContainer/tests/SlideBoxContent.localTemplates.test.js +90 -0
  103. package/v2Containers/CreativesContainer/tests/SlideBoxFooter.test.js +104 -0
  104. package/v2Containers/CreativesContainer/tests/SlideBoxHeader.test.js +110 -0
  105. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +8 -0
  106. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxHeader.test.js.snap +363 -0
  107. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +20 -10
  108. package/v2Containers/CreativesContainer/tests/embeddedSlideboxUtils.test.js +258 -0
  109. package/v2Containers/CreativesContainer/tests/index.test.js +71 -9
  110. package/v2Containers/CreativesContainer/tests/useLocalTemplatesProp.test.js +125 -0
  111. package/v2Containers/Email/index.js +1 -0
  112. package/v2Containers/EmailWrapper/components/EmailHTMLEditor.js +7 -1
  113. package/v2Containers/EmailWrapper/components/EmailWrapperView.js +3 -0
  114. package/v2Containers/EmailWrapper/components/__tests__/EmailHTMLEditor.test.js +20 -2
  115. package/v2Containers/EmailWrapper/components/__tests__/EmailWrapperView.test.js +16 -1
  116. package/v2Containers/EmailWrapper/hooks/useEmailWrapper.js +3 -0
  117. package/v2Containers/EmailWrapper/index.js +4 -0
  118. package/v2Containers/EmailWrapper/tests/useEmailWrapper.edgeCases.test.js +1 -0
  119. package/v2Containers/EmailWrapper/tests/useEmailWrapper.test.js +9 -0
  120. package/v2Containers/InAppWrapper/hooks/__tests__/useInAppWrapper.test.js +19 -0
  121. package/v2Containers/InAppWrapper/hooks/useInAppWrapper.js +3 -0
  122. package/v2Containers/InAppWrapper/index.js +3 -0
  123. package/v2Containers/MobilePush/Create/index.js +2 -0
  124. package/v2Containers/MobilePush/Edit/index.js +2 -0
  125. package/v2Containers/MobilepushWrapper/index.js +3 -1
  126. package/v2Containers/Rcs/constants.js +32 -1
  127. package/v2Containers/Rcs/index.js +951 -873
  128. package/v2Containers/Rcs/index.scss +85 -6
  129. package/v2Containers/Rcs/messages.js +10 -1
  130. package/v2Containers/Rcs/rcsLibraryHydrationUtils.js +205 -0
  131. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +40834 -1963
  132. package/v2Containers/Rcs/tests/__snapshots__/utils.test.js.snap +0 -5
  133. package/v2Containers/Rcs/tests/index.test.js +41 -38
  134. package/v2Containers/Rcs/tests/mockData.js +38 -0
  135. package/v2Containers/Rcs/tests/rcsLibraryHydrationUtils.test.js +251 -0
  136. package/v2Containers/Rcs/tests/utils.test.js +379 -1
  137. package/v2Containers/Rcs/utils.js +358 -10
  138. package/v2Containers/Sms/Create/index.js +83 -36
  139. package/v2Containers/Sms/Edit/index.js +2 -0
  140. package/v2Containers/Sms/smsFormDataHelpers.js +67 -0
  141. package/v2Containers/Sms/tests/smsFormDataHelpers.test.js +253 -0
  142. package/v2Containers/SmsTrai/Create/index.js +9 -4
  143. package/v2Containers/SmsTrai/Edit/constants.js +2 -0
  144. package/v2Containers/SmsTrai/Edit/index.js +611 -128
  145. package/v2Containers/SmsTrai/Edit/index.scss +121 -0
  146. package/v2Containers/SmsTrai/Edit/messages.js +9 -4
  147. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +4327 -2374
  148. package/v2Containers/SmsWrapper/index.js +39 -8
  149. package/v2Containers/TagList/index.js +47 -2
  150. package/v2Containers/TagList/messages.js +4 -0
  151. package/v2Containers/TagList/tests/TagList.test.js +122 -20
  152. package/v2Containers/TagList/tests/mockdata.js +17 -0
  153. package/v2Containers/Templates/TemplatesActionBar.js +101 -0
  154. package/v2Containers/Templates/_templates.scss +61 -2
  155. package/v2Containers/Templates/actions.js +11 -0
  156. package/v2Containers/Templates/constants.js +2 -0
  157. package/v2Containers/Templates/index.js +90 -40
  158. package/v2Containers/Templates/sagas.js +57 -12
  159. package/v2Containers/Templates/tests/TemplatesActionBar.test.js +120 -0
  160. package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +1043 -1079
  161. package/v2Containers/Templates/tests/sagas.test.js +193 -12
  162. package/v2Containers/Templates/tests/smsTemplatesListApi.test.js +180 -0
  163. package/v2Containers/Templates/utils/smsTemplatesListApi.js +79 -0
  164. package/v2Containers/TemplatesV2/TemplatesV2.style.js +72 -1
  165. package/v2Containers/TemplatesV2/index.js +86 -23
  166. package/v2Containers/TemplatesV2/tests/TemplatesV2.localTemplates.test.js +131 -0
  167. package/v2Containers/Viber/index.js +5 -0
  168. package/v2Containers/WebPush/Create/hooks/useTagManagement.js +0 -2
  169. package/v2Containers/WebPush/Create/index.js +9 -1
  170. package/v2Containers/Whatsapp/index.js +8 -20
  171. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +598 -34
  172. package/v2Containers/Zalo/index.js +2 -0
@@ -63,6 +63,7 @@ const EmailWrapper = (props) => {
63
63
  onEnterTemplateName,
64
64
  onRemoveTemplateName,
65
65
  eventContextTags,
66
+ waitEventContextTags,
66
67
  isLoyaltyModule,
67
68
  cmsTemplatesLoader,
68
69
  onPreviewContentClicked,
@@ -130,6 +131,7 @@ const EmailWrapper = (props) => {
130
131
  onEnterTemplateName,
131
132
  onRemoveTemplateName,
132
133
  eventContextTags,
134
+ waitEventContextTags,
133
135
  isLoyaltyModule,
134
136
  cmsTemplatesLoader,
135
137
  onPreviewContentClicked,
@@ -184,6 +186,7 @@ const EmailWrapper = (props) => {
184
186
  forwardedTags={forwardedTags}
185
187
  selectedOfferDetails={selectedOfferDetails}
186
188
  eventContextTags={eventContextTags}
189
+ waitEventContextTags={waitEventContextTags}
187
190
  getFormdata={getFormdata}
188
191
  isGetFormData={isGetFormData}
189
192
  getLiquidTags={globalActionsProp?.getLiquidTags}
@@ -241,6 +244,7 @@ EmailWrapper.propTypes = {
241
244
  onEnterTemplateName: PropTypes.func,
242
245
  onRemoveTemplateName: PropTypes.func,
243
246
  eventContextTags: PropTypes.array,
247
+ waitEventContextTags: PropTypes.object,
244
248
  isLoyaltyModule: PropTypes.bool,
245
249
  onPreviewContentClicked: PropTypes.func,
246
250
  onTestContentClicked: PropTypes.func,
@@ -112,6 +112,7 @@ describe('useEmailWrapper - Edge Cases', () => {
112
112
  editor: 'HTML',
113
113
  moduleType: null,
114
114
  eventContextTags: [],
115
+ waitEventContextTags: {},
115
116
  isLoyaltyModule: false,
116
117
  cmsTemplatesLoader: jest.fn(),
117
118
  currentOrgDetails: {},
@@ -102,6 +102,7 @@ describe('useEmailWrapper', () => {
102
102
  editor: null,
103
103
  moduleType: '',
104
104
  eventContextTags: [],
105
+ waitEventContextTags: {},
105
106
  isLoyaltyModule: false,
106
107
  cmsTemplatesLoader: false,
107
108
  currentOrgDetails: { id: 'org1' },
@@ -120,6 +121,14 @@ describe('useEmailWrapper', () => {
120
121
  expect(result.current.onTemplateNameChange).toBeInstanceOf(Function);
121
122
  });
122
123
 
124
+ it('passes waitEventContextTags through emailProps', () => {
125
+ const waitMap = { block1: { eventName: 'E', blockName: 'B', tags: [] } };
126
+ const { result } = renderHook(() =>
127
+ useEmailWrapper({ ...mockProps, waitEventContextTags: waitMap }),
128
+ );
129
+ expect(result.current.emailProps.waitEventContextTags).toEqual(waitMap);
130
+ });
131
+
123
132
  it('handles template name change correctly', () => {
124
133
  const { result } = renderHook(() => useEmailWrapper(mockProps));
125
134
 
@@ -78,6 +78,7 @@ describe('useInAppWrapper', () => {
78
78
  onPreviewContentClicked: jest.fn(),
79
79
  onTestContentClicked: jest.fn(),
80
80
  eventContextTags: {},
81
+ waitEventContextTags: {},
81
82
  onCreateComplete: jest.fn(),
82
83
  handleClose: jest.fn(),
83
84
  templateData: null,
@@ -424,6 +425,24 @@ describe('useInAppWrapper', () => {
424
425
 
425
426
  expect(capturedState.inAppProps.getDefaultTags).toBe('defaultTags');
426
427
  });
428
+
429
+ it('passes waitEventContextTags through to inAppProps', () => {
430
+ const waitMap = { block1: { eventName: 'E', blockName: 'B', tags: [] } };
431
+ let capturedState = null;
432
+ render(
433
+ <TestComponent
434
+ hookProps={{
435
+ ...defaultHookProps,
436
+ waitEventContextTags: waitMap,
437
+ }}
438
+ onStateChange={(state) => {
439
+ capturedState = state;
440
+ }}
441
+ />
442
+ );
443
+
444
+ expect(capturedState.inAppProps.waitEventContextTags).toEqual(waitMap);
445
+ });
427
446
  });
428
447
 
429
448
  describe('isShowInAppCreate', () => {
@@ -33,6 +33,7 @@ const useInAppWrapper = ({
33
33
  onPreviewContentClicked,
34
34
  onTestContentClicked,
35
35
  eventContextTags,
36
+ waitEventContextTags,
36
37
  onCreateComplete,
37
38
  handleClose,
38
39
  templateData,
@@ -149,6 +150,7 @@ const useInAppWrapper = ({
149
150
  onPreviewContentClicked,
150
151
  onTestContentClicked,
151
152
  eventContextTags,
153
+ waitEventContextTags,
152
154
  onCreateComplete,
153
155
  handleClose,
154
156
  };
@@ -173,6 +175,7 @@ const useInAppWrapper = ({
173
175
  onPreviewContentClicked,
174
176
  onTestContentClicked,
175
177
  eventContextTags,
178
+ waitEventContextTags,
176
179
  onCreateComplete,
177
180
  handleClose,
178
181
  ]);
@@ -36,6 +36,7 @@ const InAppWrapper = (props) => {
36
36
  onPreviewContentClicked,
37
37
  onTestContentClicked,
38
38
  eventContextTags,
39
+ waitEventContextTags,
39
40
  onCreateComplete,
40
41
  handleClose,
41
42
  templateData,
@@ -78,6 +79,7 @@ const InAppWrapper = (props) => {
78
79
  onPreviewContentClicked,
79
80
  onTestContentClicked,
80
81
  eventContextTags,
82
+ waitEventContextTags,
81
83
  onCreateComplete,
82
84
  handleClose,
83
85
  templateData,
@@ -124,6 +126,7 @@ InAppWrapper.propTypes = {
124
126
  onPreviewContentClicked: PropTypes.func,
125
127
  onTestContentClicked: PropTypes.func,
126
128
  eventContextTags: PropTypes.array,
129
+ waitEventContextTags: PropTypes.object,
127
130
  onCreateComplete: PropTypes.func,
128
131
  handleClose: PropTypes.func,
129
132
  templateData: PropTypes.object,
@@ -1966,6 +1966,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
1966
1966
  hideTestAndPreviewBtn={this.props.hideTestAndPreviewBtn}
1967
1967
  isFullMode={this.props.isFullMode}
1968
1968
  eventContextTags={this.props?.eventContextTags}
1969
+ waitEventContextTags={this.props?.waitEventContextTags}
1969
1970
  messageDetails={this.props?.messageDetails}
1970
1971
  restrictPersonalization={this.props.restrictPersonalization}
1971
1972
  />
@@ -2068,6 +2069,7 @@ Create.propTypes = {
2068
2069
  onPreviewContentClicked: PropTypes.func,
2069
2070
  onTestContentClicked: PropTypes.func,
2070
2071
  eventContextTags: PropTypes.array,
2072
+ waitEventContextTags: PropTypes.object,
2071
2073
  getLiquidTags: PropTypes.func,
2072
2074
  showLiquidErrorInFooter: PropTypes.func,
2073
2075
  showTestAndPreviewSlidebox: PropTypes.bool,
@@ -2233,6 +2233,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
2233
2233
  hideTestAndPreviewBtn={this.props.hideTestAndPreviewBtn}
2234
2234
  isFullMode={this.props.isFullMode}
2235
2235
  eventContextTags={this.props?.eventContextTags}
2236
+ waitEventContextTags={this.props?.waitEventContextTags}
2236
2237
  restrictPersonalization={this.props.restrictPersonalization}
2237
2238
  />;
2238
2239
  })()}
@@ -2339,6 +2340,7 @@ Edit.propTypes = {
2339
2340
  onTestContentClicked: PropTypes.func,
2340
2341
  creativesMode: PropTypes.string,
2341
2342
  eventContextTags: PropTypes.array,
2343
+ waitEventContextTags: PropTypes.object,
2342
2344
  getLiquidTags: PropTypes.func,
2343
2345
  showLiquidErrorInFooter: PropTypes.func,
2344
2346
  showTestAndPreviewSlidebox: PropTypes.bool,
@@ -72,7 +72,7 @@ export class MobilepushWrapper extends React.Component { // eslint-disable-line
72
72
  }
73
73
 
74
74
  render() {
75
- const {mobilePushCreateMode, step, getFormData, getLiquidTags, setIsLoadingContent, isGetFormData, query, isFullMode, showTemplateName, type, onValidationFail, onPreviewContentClicked, onTestContentClicked, templateData, eventContextTags = [], showTestAndPreviewSlidebox, handleTestAndPreview, handleCloseTestAndPreview, restrictPersonalization, isAnonymousType, onPersonalizationTokensChange} = this.props;
75
+ const {mobilePushCreateMode, step, getFormData, getLiquidTags, setIsLoadingContent, isGetFormData, query, isFullMode, showTemplateName, type, onValidationFail, onPreviewContentClicked, onTestContentClicked, templateData, eventContextTags = [], waitEventContextTags = {},showTestAndPreviewSlidebox, handleTestAndPreview, handleCloseTestAndPreview, restrictPersonalization, isAnonymousType, onPersonalizationTokensChange} = this.props;
76
76
  const {templateName} = this.state;
77
77
  const isShowMobilepushCreate = !isEmpty(mobilePushCreateMode);
78
78
  return (
@@ -121,6 +121,7 @@ export class MobilepushWrapper extends React.Component { // eslint-disable-line
121
121
  templateData={templateData}
122
122
  hideTestAndPreviewBtn={this.props.hideTestAndPreviewBtn}
123
123
  eventContextTags={eventContextTags}
124
+ waitEventContextTags={waitEventContextTags}
124
125
  showLiquidErrorInFooter={this.props.showLiquidErrorInFooter}
125
126
  showTestAndPreviewSlidebox={showTestAndPreviewSlidebox}
126
127
  handleTestAndPreview={handleTestAndPreview}
@@ -155,6 +156,7 @@ MobilepushWrapper.propTypes = {
155
156
  type: PropTypes.string,
156
157
  onValidationFail: PropTypes.func,
157
158
  eventContextTags: PropTypes.array,
159
+ waitEventContextTags: PropTypes.object,
158
160
  showLiquidErrorInFooter: PropTypes.func,
159
161
  showTestAndPreviewSlidebox: PropTypes.bool,
160
162
  handleTestAndPreview: PropTypes.func,
@@ -40,6 +40,22 @@ export const contentType = {
40
40
  carousel: 'carousel',
41
41
  };
42
42
 
43
+ export const CHANNELS = [
44
+ 'email',
45
+ 'mPush',
46
+ 'viber',
47
+ 'whatsapp',
48
+ 'zalo',
49
+ 'facebook',
50
+ 'rcs',
51
+ 'inApp',
52
+ 'line',
53
+ 'weChat',
54
+ 'callTask',
55
+ 'FTP',
56
+ 'webpush',
57
+ ];
58
+
43
59
  export const STATUS_OPTIONS = [
44
60
  // {
45
61
  // key: 'created',
@@ -76,8 +92,23 @@ export const RCS_MEDIA_TYPES = {
76
92
 
77
93
  export const rcsVarRegex = /\{\{\w+\}\}/g;
78
94
  export const rcsVarTestRegex = /\{\{\w+\}\}/;
95
+
96
+ /** `cardVarMapped` slot keys that are numeric only (legacy ordering). */
97
+ export const RCS_NUMERIC_VAR_NAME_REGEX = /^\d+$/;
98
+ /** Escape `RegExp` metacharacters when building a pattern from user/tag text. */
99
+ export const RCS_REGEX_META_CHARS_PATTERN = /[.*+?^${}()|[\]\\]/g;
100
+ /** Entire string is a single `{{tag}}` token (value still a placeholder). */
101
+ export const RCS_SINGLE_MUSTACHE_PLACEHOLDER_REGEX = /^\{\{[^}]+\}\}$/;
102
+ /** Strip leading `{{` and trailing `}}` from a token. */
103
+ export const RCS_STRIP_MUSTACHE_DELIMITERS_REGEX = /^\{\{|\}\}$/g;
104
+
105
+ /** Tag-popover target: title vs description field (matches `onTagSelect` `field` argument). */
106
+ export const RCS_TAG_AREA_FIELD_TITLE = 'title';
107
+ export const RCS_TAG_AREA_FIELD_DESC = 'desc';
108
+
79
109
  export const TEMPLATE_DESC_MAX_LENGTH = 2500;
80
- export const FALLBACK_MESSAGE_MAX_LENGTH = 160;
110
+ /** Resolved SMS fallback body cap. Must allow multi-segment DLT (>160); aligns with TRAI / `TEMPLATE_MESSAGE_MAX_LENGTH`. */
111
+ export const FALLBACK_MESSAGE_MAX_LENGTH = TEMPLATE_MESSAGE_MAX_LENGTH;
81
112
  export const TEMPLATE_TITLE_MAX_LENGTH = 200;
82
113
  export const TEMPLATE_BUTTON_TEXT_MAX_LENGTH = 25;
83
114
  export const CTA = 'CTA';