@capillarytech/creatives-library 8.0.306 → 8.0.307-alpha.5

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 (46) hide show
  1. package/package.json +1 -1
  2. package/utils/commonUtils.js +3 -1
  3. package/utils/tagValidations.js +12 -4
  4. package/utils/tests/tagValidations.test.js +34 -0
  5. package/v2Components/CapTagListWithInput/index.js +4 -0
  6. package/v2Components/CapWhatsappCTA/index.js +2 -0
  7. package/v2Components/FormBuilder/index.js +15 -0
  8. package/v2Components/HtmlEditor/HTMLEditor.js +5 -0
  9. package/v2Components/HtmlEditor/components/CodeEditorPane/index.js +3 -0
  10. package/v2Containers/BeeEditor/index.js +3 -0
  11. package/v2Containers/CreativesContainer/SlideBoxContent.js +25 -0
  12. package/v2Containers/CreativesContainer/index.js +3 -0
  13. package/v2Containers/Email/index.js +1 -0
  14. package/v2Containers/EmailWrapper/components/EmailHTMLEditor.js +10 -1
  15. package/v2Containers/EmailWrapper/components/EmailWrapperView.js +3 -0
  16. package/v2Containers/EmailWrapper/components/__tests__/EmailHTMLEditor.test.js +1 -0
  17. package/v2Containers/EmailWrapper/components/__tests__/EmailWrapperView.test.js +1 -0
  18. package/v2Containers/EmailWrapper/hooks/useEmailWrapper.js +3 -0
  19. package/v2Containers/EmailWrapper/index.js +4 -0
  20. package/v2Containers/EmailWrapper/tests/useEmailWrapper.edgeCases.test.js +1 -0
  21. package/v2Containers/EmailWrapper/tests/useEmailWrapper.test.js +1 -0
  22. package/v2Containers/InApp/index.js +3 -0
  23. package/v2Containers/InAppWrapper/hooks/__tests__/useInAppWrapper.test.js +1 -0
  24. package/v2Containers/InAppWrapper/hooks/useInAppWrapper.js +3 -0
  25. package/v2Containers/InAppWrapper/index.js +3 -0
  26. package/v2Containers/InappAdvance/index.js +3 -0
  27. package/v2Containers/MobilePush/Create/index.js +2 -0
  28. package/v2Containers/MobilePush/Edit/index.js +2 -0
  29. package/v2Containers/MobilePushNew/index.js +1 -0
  30. package/v2Containers/MobilepushWrapper/index.js +3 -1
  31. package/v2Containers/Rcs/index.js +2 -0
  32. package/v2Containers/Sms/Create/index.js +2 -0
  33. package/v2Containers/Sms/Edit/index.js +2 -0
  34. package/v2Containers/SmsTrai/Edit/index.js +4 -0
  35. package/v2Containers/SmsWrapper/index.js +2 -0
  36. package/v2Containers/TagList/index.js +41 -2
  37. package/v2Containers/TagList/messages.js +4 -0
  38. package/v2Containers/TagList/tests/TagList.test.js +13 -1
  39. package/v2Containers/TagList/tests/mockdata.js +17 -0
  40. package/v2Containers/Viber/index.js +5 -0
  41. package/v2Containers/WebPush/Create/hooks/useTagManagement.js +3 -1
  42. package/v2Containers/WebPush/Create/hooks/useTagManagement.test.js +3 -0
  43. package/v2Containers/WebPush/Create/index.js +9 -1
  44. package/v2Containers/WebPush/Create/utils/validation.test.js +2 -0
  45. package/v2Containers/Whatsapp/index.js +6 -0
  46. package/v2Containers/Zalo/index.js +3 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "8.0.306",
4
+ "version": "8.0.307-alpha.5",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -145,6 +145,7 @@ export const validateLiquidTemplateContent = async (
145
145
  onSuccess = () => {},
146
146
  tagLookupMap,
147
147
  eventContextTags,
148
+ waitEventContextTags = {},
148
149
  isLiquidFlow,
149
150
  forwardedTags = {},
150
151
  tabType,
@@ -214,7 +215,8 @@ export const validateLiquidTemplateContent = async (
214
215
  tagLookupMap,
215
216
  eventContextTags,
216
217
  isLiquidFlow,
217
- forwardedTags
218
+ forwardedTags,
219
+ waitEventContextTags
218
220
  );
219
221
  // Helper function to check if a tag appears only inside {% %} blocks
220
222
  const isTagOnlyInsideLiquidBlocks = (tagName) => {
@@ -18,20 +18,21 @@ const SUBTAGS = 'subtags';
18
18
  * @param {Object} response - The response object to check.
19
19
  * @param {Object} tagObject - The tagLookupMap.
20
20
  */
21
- export const checkSupport = (response = {}, tagObject = {}, eventContextTags = [], isLiquidFlow = false, forwardedTags = {}) => {
21
+ export const checkSupport = (response = {}, tagObject = {}, eventContextTags = [], isLiquidFlow = false, forwardedTags = {}, waitEventContextTags = {}) => {
22
22
  const supportedList = [];
23
23
  // Verifies the presence of the tag in the 'Add Labels' section.
24
24
  // Incase of journey event context the tags won't be available in the tagObject(tagLookupMap).
25
25
  //Here forwardedTags only use in case of loyalty module
26
26
  const mappedForwardedTags = handleForwardedTags(forwardedTags);
27
- const checkNameInTagObjectOrEventContext = (name) => !!tagObject[name] || eventContextTags?.some((tag) => tag?.tagName === name) || mappedForwardedTags.includes(name);
27
+ const allTags = [...eventContextTags, ...Object.values(waitEventContextTags).flatMap(block => block.tags)];
28
+ const checkNameInTagObjectOrEventContext = (name) => !!tagObject[name] || allTags?.some((tag) => tag?.tagName === name) || mappedForwardedTags.includes(name);
28
29
 
29
30
  // Verify if childTag is a valid sub-tag of parentTag from the 'Add Labels' section or if it's unsupported.
30
31
  const checkSubtags = (parentTag, childName) => {
31
32
  // For event context tags the parentTag will be the event context tag name and subtags will be the child attributes for leaderboards
32
- if (checkNameInTagObjectOrEventContext(parentTag) && isLiquidFlow && eventContextTags?.length) {
33
+ if (checkNameInTagObjectOrEventContext(parentTag) && isLiquidFlow && allTags?.length) {
33
34
  const childNameAfterDot = childName?.split(".")?.[1];
34
- if (eventContextTags?.some((tag) => tag?.subTags?.includes(childNameAfterDot))) {
35
+ if (allTags?.some((tag) => tag?.subTags?.includes(childNameAfterDot))) {
35
36
  supportedList.push(childName);
36
37
  }
37
38
  }
@@ -187,6 +188,7 @@ export const validateTags = ({
187
188
  location,
188
189
  tagModule,
189
190
  eventContextTags,
191
+ waitEventContextTags = {},
190
192
  isFullMode,
191
193
  }) => {
192
194
  const tags = tagsParam;
@@ -250,6 +252,12 @@ export const validateTags = ({
250
252
  ifSupported = true;
251
253
  }
252
254
  });
255
+ // Wait Event Context Tags support
256
+ Object.values(waitEventContextTags).flatMap(block => block.tags)?.forEach((tag) => {
257
+ if (tagValue === tag?.tagName) {
258
+ ifSupported = true;
259
+ }
260
+ });
253
261
  ifSupported = ifSupported || checkIfSupportedTag(tagValue, injectedTags);
254
262
  // Only add to unsupportedTags if not inside a {% ... %} block and does not contain a dot
255
263
  if (!ifSupported && !isInsideLiquidBlock(content, tagIndex) && tagValue?.indexOf('.') === -1) {
@@ -75,6 +75,7 @@ describe("validateTags", () => {
75
75
  location,
76
76
  tagModule,
77
77
  eventContextTags,
78
+ waitEventContextTags: {},
78
79
  });
79
80
 
80
81
  expect(result.valid).toEqual(true);
@@ -101,6 +102,7 @@ describe("validateTags", () => {
101
102
  injectedTagsParams,
102
103
  location,
103
104
  tagModule,
105
+ waitEventContextTags: {},
104
106
  });
105
107
 
106
108
  expect(result.valid).toEqual(true);
@@ -134,6 +136,7 @@ describe("validateTags", () => {
134
136
  injectedTagsParams,
135
137
  location,
136
138
  tagModule,
139
+ waitEventContextTags: {},
137
140
  });
138
141
 
139
142
  expect(result.valid).toEqual(true);
@@ -174,6 +177,7 @@ describe("validateTags", () => {
174
177
  injectedTagsParams,
175
178
  location,
176
179
  tagModule,
180
+ waitEventContextTags: {},
177
181
  });
178
182
 
179
183
  expect(result.valid).toEqual(false);
@@ -204,6 +208,7 @@ describe("validateTags", () => {
204
208
  injectedTagsParams,
205
209
  location,
206
210
  tagModule,
211
+ waitEventContextTags: {},
207
212
  });
208
213
  expect(resultMissing.missingTags).toContain("unsubscribe");
209
214
 
@@ -216,10 +221,39 @@ describe("validateTags", () => {
216
221
  injectedTagsParams,
217
222
  location,
218
223
  tagModule,
224
+ waitEventContextTags: {},
219
225
  });
220
226
  expect(resultSkipped.missingTags).not.toContain("unsubscribe");
221
227
  expect(resultSkipped.valid).toBe(true);
222
228
  });
229
+
230
+ it('should treat tags from waitEventContextTags as supported', () => {
231
+ const content = 'Hello {{waitEvent.orderId}}';
232
+ const tagsParam = [];
233
+ const injectedTagsParams = [];
234
+ const location = { query: { module: 'DEFAULT' } };
235
+ const tagModule = null;
236
+ const waitEventContextTags = {
237
+ block1: {
238
+ eventName: 'Order Placed',
239
+ blockName: 'Wait Block',
240
+ tags: [{ tagName: 'waitEvent.orderId', label: 'Order ID' }],
241
+ },
242
+ };
243
+
244
+ const result = validateTags({
245
+ content,
246
+ tagsParam,
247
+ injectedTagsParams,
248
+ location,
249
+ tagModule,
250
+ eventContextTags: [],
251
+ waitEventContextTags,
252
+ });
253
+
254
+ expect(result.valid).toEqual(true);
255
+ expect(result.unsupportedTags).toEqual([]);
256
+ });
223
257
  });
224
258
 
225
259
  describe("extractNames", () => {
@@ -27,6 +27,7 @@ export const CapTagListWithInput = (props) => {
27
27
  userLocale = 'en',
28
28
  eventContextTags = [],
29
29
  restrictPersonalization = false,
30
+ waitEventContextTags = {},
30
31
  // CapInput props
31
32
  inputId,
32
33
  inputValue = '',
@@ -77,6 +78,7 @@ export const CapTagListWithInput = (props) => {
77
78
  userLocale={userLocale}
78
79
  selectedOfferDetails={selectedOfferDetails}
79
80
  eventContextTags={eventContextTags}
81
+ waitEventContextTags={waitEventContextTags}
80
82
  style={tagListStyle}
81
83
  popoverPlacement={popoverPlacement}
82
84
  restrictPersonalization={restrictPersonalization}
@@ -116,6 +118,7 @@ CapTagListWithInput.propTypes = {
116
118
  userLocale: PropTypes.string,
117
119
  eventContextTags: PropTypes.array,
118
120
  restrictPersonalization: PropTypes.bool,
121
+ waitEventContextTags: PropTypes.object,
119
122
 
120
123
  // CapInput props
121
124
  inputId: PropTypes.string.isRequired,
@@ -154,6 +157,7 @@ CapTagListWithInput.defaultProps = {
154
157
  userLocale: 'en',
155
158
  eventContextTags: [],
156
159
  restrictPersonalization: false,
160
+ waitEventContextTags: {},
157
161
  inputValue: '',
158
162
  inputSize: 'default',
159
163
  inputRequired: false,
@@ -52,6 +52,7 @@ export const CapWhatsappCTA = (props) => {
52
52
  injectedTags = {},
53
53
  selectedOfferDetails = [],
54
54
  eventContextTags = [],
55
+ waitEventContextTags = [],
55
56
  } = props;
56
57
  const { formatMessage } = intl;
57
58
  const invalidVarRegex = /{{(.*?)}}/g;
@@ -283,6 +284,7 @@ export const CapWhatsappCTA = (props) => {
283
284
  injectedTags={injectedTags}
284
285
  selectedOfferDetails={selectedOfferDetails}
285
286
  eventContextTags={eventContextTags}
287
+ waitEventContextTags={waitEventContextTags}
286
288
  />
287
289
  </CapColumn>
288
290
  )}
@@ -1377,6 +1377,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
1377
1377
  onSuccess,
1378
1378
  tagLookupMap: this.props?.metaEntities?.tagLookupMap,
1379
1379
  eventContextTags: this.props?.eventContextTags,
1380
+ waitEventContextTags: this.props?.waitEventContextTags,
1380
1381
  isLiquidFlow: this.liquidFlow(),
1381
1382
  forwardedTags: this.props?.isLoyaltyModule ? this.props?.forwardedTags : {},
1382
1383
  skipTags: this.skipTags.bind(this)
@@ -1449,6 +1450,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
1449
1450
  messages: messages,
1450
1451
  tagLookupMap: this.props?.metaEntities?.tagLookupMap,
1451
1452
  eventContextTags: this.props?.eventContextTags,
1453
+ waitEventContextTags: this.props?.waitEventContextTags,
1452
1454
  isLiquidFlow: this.liquidFlow(), // Use the method instead of props
1453
1455
  forwardedTags: this.props?.isLoyaltyModule ? this.props?.forwardedTags : {},
1454
1456
  skipTags: this.skipTags.bind(this),
@@ -1601,6 +1603,12 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
1601
1603
  ifSupported = true;
1602
1604
  }
1603
1605
  });
1606
+ // Wait Event Context Tags support
1607
+ Object.values(this.props?.waitEventContextTags || {}).flatMap(block => block?.tags || [])?.forEach((tag) => {
1608
+ if (tagValue === tag?.tagName) {
1609
+ ifSupported = true;
1610
+ }
1611
+ });
1604
1612
 
1605
1613
  ifSupported = ifSupported || this.checkIfSupportedTag(tagValue, injectedTags);
1606
1614
  // Only add to unsupportedTags if not inside a {% ... %} block (scenario 3: liquid orgs also get unsupported-tag errors)
@@ -3059,6 +3067,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
3059
3067
  selectedOfferDetails={this.props.selectedOfferDetails}
3060
3068
  eventContextTags={this.props?.eventContextTags}
3061
3069
  restrictPersonalization={this.props.restrictPersonalization}
3070
+ waitEventContextTags={this.props?.waitEventContextTags}
3062
3071
  />
3063
3072
  </CapColumn>
3064
3073
  );
@@ -3088,6 +3097,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
3088
3097
  userLocale={this.props.userLocale}
3089
3098
  selectedOfferDetails={this.props.selectedOfferDetails}
3090
3099
  eventContextTags={this.props?.eventContextTags}
3100
+ waitEventContextTags={this.props?.waitEventContextTags}
3091
3101
  moduleFilterEnabled={this.props.location && this.props.location.query && this.props.location.query.type !== 'embedded'}
3092
3102
  containerStyle={val.style || {}}
3093
3103
  inputProps={val.inputProps || {}}
@@ -3730,6 +3740,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
3730
3740
  channel={channel}
3731
3741
  eventContextTags={this.props?.eventContextTags}
3732
3742
  restrictPersonalization={this.props.restrictPersonalization}
3743
+ waitEventContextTags={this.props?.waitEventContextTags}
3733
3744
  />
3734
3745
  </CapColumn>
3735
3746
  );
@@ -3776,6 +3787,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
3776
3787
  userLocale={this.state.translationLang}
3777
3788
  selectedOfferDetails={this.props.selectedOfferDetails}
3778
3789
  eventContextTags={this.props?.eventContextTags}
3790
+ waitEventContextTags={this.props?.waitEventContextTags}
3779
3791
  moduleFilterEnabled={moduleFilterEnabledForCapTagList}
3780
3792
  containerStyle={val.style || {}}
3781
3793
  inputProps={val.inputProps || {}}
@@ -4070,6 +4082,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
4070
4082
  onContextChange={this.props.onContextChange}
4071
4083
  moduleFilterEnabled={isModuleFilterEnabled}
4072
4084
  eventContextTags={this.props?.eventContextTags}
4085
+ waitEventContextTags={this.props?.waitEventContextTags}
4073
4086
  />
4074
4087
  </CapColumn>
4075
4088
  );
@@ -4372,6 +4385,7 @@ FormBuilder.defaultProps = {
4372
4385
  userLocale: localStorage.getItem('jlocale') || 'en',
4373
4386
  showLiquidErrorInFooter: () => {},
4374
4387
  metaDataStatus: "",
4388
+ waitEventContextTags: {},
4375
4389
  isTestAndPreviewMode: false, // Default to false to maintain existing behavior
4376
4390
  };
4377
4391
 
@@ -4422,6 +4436,7 @@ FormBuilder.propTypes = {
4422
4436
  moduleType: PropTypes.string.isRequired,
4423
4437
  showLiquidErrorInFooter: PropTypes.bool.isRequired,
4424
4438
  eventContextTags: PropTypes.array.isRequired,
4439
+ waitEventContextTags: PropTypes.object,
4425
4440
  forwardedTags: PropTypes.object.isRequired,
4426
4441
  isLoyaltyModule: PropTypes.bool.isRequired,
4427
4442
  isTestAndPreviewMode: PropTypes.bool, // Add new prop type
@@ -94,6 +94,7 @@ const HTMLEditor = forwardRef(({
94
94
  injectedTags = {},
95
95
  location,
96
96
  eventContextTags = [],
97
+ waitEventContextTags = {},
97
98
  selectedOfferDetails = [],
98
99
  channel,
99
100
  userLocale = 'en',
@@ -666,6 +667,7 @@ const HTMLEditor = forwardRef(({
666
667
  injectedTags={injectedTags}
667
668
  location={location}
668
669
  eventContextTags={eventContextTags}
670
+ waitEventContextTags={waitEventContextTags}
669
671
  selectedOfferDetails={selectedOfferDetails}
670
672
  channel={channel}
671
673
  userLocale={userLocale}
@@ -737,6 +739,7 @@ const HTMLEditor = forwardRef(({
737
739
  injectedTags={injectedTags}
738
740
  location={location}
739
741
  eventContextTags={eventContextTags}
742
+ waitEventContextTags={waitEventContextTags}
740
743
  selectedOfferDetails={selectedOfferDetails}
741
744
  channel={channel}
742
745
  userLocale={userLocale}
@@ -775,6 +778,7 @@ HTMLEditor.propTypes = {
775
778
  injectedTags: PropTypes.object,
776
779
  location: PropTypes.object,
777
780
  eventContextTags: PropTypes.array,
781
+ waitEventContextTags: PropTypes.object,
778
782
  selectedOfferDetails: PropTypes.array,
779
783
  channel: PropTypes.string,
780
784
  userLocale: PropTypes.string,
@@ -809,6 +813,7 @@ HTMLEditor.defaultProps = {
809
813
  injectedTags: {},
810
814
  location: null,
811
815
  eventContextTags: [],
816
+ waitEventContextTags: {},
812
817
  selectedOfferDetails: [],
813
818
  channel: null,
814
819
  userLocale: 'en',
@@ -59,6 +59,7 @@ const CodeEditorPaneComponent = ({
59
59
  injectedTags = {},
60
60
  location,
61
61
  eventContextTags = [],
62
+ waitEventContextTags = {},
62
63
  selectedOfferDetails = [],
63
64
  channel,
64
65
  userLocale = 'en',
@@ -289,6 +290,7 @@ const CodeEditorPaneComponent = ({
289
290
  location={location}
290
291
  selectedOfferDetails={selectedOfferDetails}
291
292
  eventContextTags={eventContextTags}
293
+ waitEventContextTags={waitEventContextTags}
292
294
  popoverPlacement="rightTop"
293
295
  />
294
296
  </CapRow>
@@ -328,6 +330,7 @@ CodeEditorPane.propTypes = {
328
330
  injectedTags: PropTypes.object,
329
331
  location: PropTypes.object,
330
332
  eventContextTags: PropTypes.array,
333
+ waitEventContextTags: PropTypes.object,
331
334
  selectedOfferDetails: PropTypes.array,
332
335
  channel: PropTypes.string,
333
336
  userLocale: PropTypes.string,
@@ -53,6 +53,7 @@ function BeeEditor(props) {
53
53
  BEESelect,
54
54
  currentOrgDetails,
55
55
  eventContextTags,
56
+ waitEventContextTags,
56
57
  } = props;
57
58
  const { saveRowRequest } = BEESelect;
58
59
  const {formatMessage} = intl;
@@ -368,6 +369,7 @@ function BeeEditor(props) {
368
369
  }}
369
370
  onContextChange={onContextChange}
370
371
  eventContextTags={eventContextTags}
372
+ waitEventContextTags={waitEventContextTags}
371
373
  />
372
374
  <CapModal
373
375
  className="custom-row-modal"
@@ -414,6 +416,7 @@ BeeEditor.propTypes = {
414
416
  onContextChange: PropTypes.func,
415
417
  userLocale: PropTypes.string,
416
418
  eventContextTags: PropTypes.array,
419
+ waitEventContextTags: PropTypes.object,
417
420
  };
418
421
 
419
422
  const mapStateToProps = () => createStructuredSelector({
@@ -168,6 +168,7 @@ export function SlideBoxContent(props) {
168
168
  creativesMode,
169
169
  hostName = '',
170
170
  eventContextTags,
171
+ waitEventContextTags,
171
172
  isLoyaltyModule,
172
173
  loyaltyMetaData = {},
173
174
  showTestAndPreviewSlidebox,
@@ -424,6 +425,7 @@ export function SlideBoxContent(props) {
424
425
  selectedOfferDetails,
425
426
  getFormData,
426
427
  eventContextTags,
428
+ waitEventContextTags,
427
429
  };
428
430
 
429
431
  return (
@@ -458,6 +460,7 @@ export function SlideBoxContent(props) {
458
460
  enableNewChannels={enableNewChannels}
459
461
  hideTestAndPreviewBtn={hideTestAndPreviewBtn}
460
462
  eventContextTags={eventContextTags}
463
+ waitEventContextTags={waitEventContextTags}
461
464
  loyaltyMetaData={loyaltyMetaData}
462
465
  isLoyaltyModule={isLoyaltyModule}
463
466
  />
@@ -561,6 +564,7 @@ export function SlideBoxContent(props) {
561
564
  onCreateComplete={onCreateComplete}
562
565
  smsRegister={smsRegister}
563
566
  eventContextTags={eventContextTags}
567
+ waitEventContextTags={waitEventContextTags}
564
568
  getLiquidTags={getLiquidTags}
565
569
  showTestAndPreviewSlidebox={showTestAndPreviewSlidebox}
566
570
  handleTestAndPreview={handleTestAndPreview}
@@ -603,6 +607,7 @@ export function SlideBoxContent(props) {
603
607
  }}
604
608
  hostName={hostName}
605
609
  eventContextTags={eventContextTags}
610
+ waitEventContextTags={waitEventContextTags}
606
611
  showLiquidErrorInFooter={showLiquidErrorInFooter}
607
612
  showTestAndPreviewSlidebox={showTestAndPreviewSlidebox}
608
613
  handleTestAndPreview={handleTestAndPreview}
@@ -642,6 +647,7 @@ export function SlideBoxContent(props) {
642
647
  eventContextTags={eventContextTags}
643
648
  restrictPersonalization={restrictPersonalization}
644
649
  isAnonymousType={isAnonymousType}
650
+ waitEventContextTags={waitEventContextTags}
645
651
  />
646
652
  )}
647
653
 
@@ -675,6 +681,7 @@ export function SlideBoxContent(props) {
675
681
  moduleType={moduleType}
676
682
  showLiquidErrorInFooter={showLiquidErrorInFooter}
677
683
  eventContextTags={eventContextTags}
684
+ waitEventContextTags={waitEventContextTags}
678
685
  isLoyaltyModule={isLoyaltyModule}
679
686
  showTestAndPreviewSlidebox={showTestAndPreviewSlidebox}
680
687
  handleTestAndPreview={handleTestAndPreview}
@@ -719,6 +726,7 @@ export function SlideBoxContent(props) {
719
726
  moduleType={moduleType}
720
727
  showLiquidErrorInFooter={showLiquidErrorInFooter}
721
728
  eventContextTags={eventContextTags}
729
+ waitEventContextTags={waitEventContextTags}
722
730
  isLoyaltyModule={isLoyaltyModule}
723
731
  showTestAndPreviewSlidebox={showTestAndPreviewSlidebox}
724
732
  handleTestAndPreview={handleTestAndPreview}
@@ -758,6 +766,7 @@ export function SlideBoxContent(props) {
758
766
  moduleType={moduleType}
759
767
  showLiquidErrorInFooter={showLiquidErrorInFooter}
760
768
  eventContextTags={eventContextTags}
769
+ waitEventContextTags={waitEventContextTags}
761
770
  isLoyaltyModule={isLoyaltyModule}
762
771
  showTestAndPreviewSlidebox={showTestAndPreviewSlidebox}
763
772
  handleTestAndPreview={handleTestAndPreview}
@@ -800,6 +809,7 @@ export function SlideBoxContent(props) {
800
809
  hideTestAndPreviewBtn={hideTestAndPreviewBtn}
801
810
  creativesMode={creativesMode}
802
811
  eventContextTags={eventContextTags}
812
+ waitEventContextTags={waitEventContextTags}
803
813
  showLiquidErrorInFooter={showLiquidErrorInFooter}
804
814
  showTestAndPreviewSlidebox={showTestAndPreviewSlidebox}
805
815
  handleTestAndPreview={handleTestAndPreview}
@@ -832,6 +842,7 @@ export function SlideBoxContent(props) {
832
842
  hideTestAndPreviewBtn={hideTestAndPreviewBtn}
833
843
  creativesMode={creativesMode}
834
844
  eventContextTags={eventContextTags}
845
+ waitEventContextTags={waitEventContextTags}
835
846
  showLiquidErrorInFooter={showLiquidErrorInFooter}
836
847
  handleClose={handleClose}
837
848
  restrictPersonalization={restrictPersonalization}
@@ -870,6 +881,7 @@ export function SlideBoxContent(props) {
870
881
  hideTestAndPreviewBtn={hideTestAndPreviewBtn}
871
882
  onTestContentClicked={onTestContentClicked}
872
883
  eventContextTags={eventContextTags}
884
+ waitEventContextTags={waitEventContextTags}
873
885
  showLiquidErrorInFooter={showLiquidErrorInFooter}
874
886
  showTestAndPreviewSlidebox={showTestAndPreviewSlidebox}
875
887
  handleTestAndPreview={handleTestAndPreview}
@@ -908,6 +920,7 @@ export function SlideBoxContent(props) {
908
920
  hideTestAndPreviewBtn={hideTestAndPreviewBtn}
909
921
  onTestContentClicked={onTestContentClicked}
910
922
  eventContextTags={eventContextTags}
923
+ waitEventContextTags={waitEventContextTags}
911
924
  showLiquidErrorInFooter={showLiquidErrorInFooter}
912
925
  onCreateComplete={onCreateComplete}
913
926
  creativesMode={creativesMode}
@@ -933,6 +946,7 @@ export function SlideBoxContent(props) {
933
946
  onSelectTemplate={onSelectTemplate}
934
947
  orgUnitId={orgUnitId}
935
948
  eventContextTags={eventContextTags}
949
+ waitEventContextTags={waitEventContextTags}
936
950
  showLiquidErrorInFooter={showLiquidErrorInFooter}
937
951
  />
938
952
  )
@@ -954,6 +968,7 @@ export function SlideBoxContent(props) {
954
968
  fbAdManager={fbAdManager}
955
969
  onSelectTemplate={onSelectTemplate}
956
970
  eventContextTags={eventContextTags}
971
+ waitEventContextTags={waitEventContextTags}
957
972
  showLiquidErrorInFooter={showLiquidErrorInFooter}
958
973
  />
959
974
  )
@@ -977,6 +992,7 @@ export function SlideBoxContent(props) {
977
992
  handleClose={handleClose}
978
993
  selectedOfferDetails={selectedOfferDetails}
979
994
  eventContextTags={eventContextTags}
995
+ waitEventContextTags={waitEventContextTags}
980
996
  showLiquidErrorInFooter={showLiquidErrorInFooter}
981
997
  />
982
998
  )
@@ -997,6 +1013,7 @@ export function SlideBoxContent(props) {
997
1013
  handleClose={handleClose}
998
1014
  selectedOfferDetails={selectedOfferDetails}
999
1015
  eventContextTags={eventContextTags}
1016
+ waitEventContextTags={waitEventContextTags}
1000
1017
  showLiquidErrorInFooter={showLiquidErrorInFooter}
1001
1018
  />
1002
1019
  )
@@ -1013,6 +1030,7 @@ export function SlideBoxContent(props) {
1013
1030
  templateData={templateData}
1014
1031
  selectedOfferDetails={selectedOfferDetails}
1015
1032
  eventContextTags={eventContextTags}
1033
+ waitEventContextTags={waitEventContextTags}
1016
1034
  showLiquidErrorInFooter={showLiquidErrorInFooter}
1017
1035
  showTestAndPreviewSlidebox={showTestAndPreviewSlidebox}
1018
1036
  handleTestAndPreview={handleTestAndPreview}
@@ -1037,6 +1055,7 @@ export function SlideBoxContent(props) {
1037
1055
  handleTestAndPreview={handleTestAndPreview}
1038
1056
  handleCloseTestAndPreview={handleCloseTestAndPreview}
1039
1057
  eventContextTags={eventContextTags}
1058
+ waitEventContextTags={waitEventContextTags}
1040
1059
  showLiquidErrorInFooter={showLiquidErrorInFooter}
1041
1060
  createNew/> }
1042
1061
 
@@ -1044,6 +1063,7 @@ export function SlideBoxContent(props) {
1044
1063
  isFullMode={isFullMode}
1045
1064
  onCreateComplete={onCreateComplete}
1046
1065
  eventContextTags={eventContextTags}
1066
+ waitEventContextTags={waitEventContextTags}
1047
1067
  handleClose={handleClose}
1048
1068
  showLiquidErrorInFooter={showLiquidErrorInFooter}
1049
1069
  showTestAndPreviewSlidebox={showTestAndPreviewSlidebox}
@@ -1061,6 +1081,7 @@ export function SlideBoxContent(props) {
1061
1081
  forwardedTags={forwardedTags}
1062
1082
  selectedOfferDetails={selectedOfferDetails}
1063
1083
  eventContextTags={eventContextTags}
1084
+ waitEventContextTags={waitEventContextTags}
1064
1085
  showTestAndPreviewSlidebox={showTestAndPreviewSlidebox}
1065
1086
  handleTestAndPreview={handleTestAndPreview}
1066
1087
  handleCloseTestAndPreview={handleCloseTestAndPreview}
@@ -1099,6 +1120,7 @@ export function SlideBoxContent(props) {
1099
1120
  onPreviewContentClicked={onPreviewContentClicked}
1100
1121
  onTestContentClicked={onTestContentClicked}
1101
1122
  eventContextTags={eventContextTags}
1123
+ waitEventContextTags={waitEventContextTags}
1102
1124
  onCreateComplete={onCreateComplete}
1103
1125
  handleClose={handleClose}
1104
1126
  moduleType={moduleType}
@@ -1134,6 +1156,7 @@ export function SlideBoxContent(props) {
1134
1156
  moduleType={moduleType}
1135
1157
  showLiquidErrorInFooter={showLiquidErrorInFooter}
1136
1158
  eventContextTags={eventContextTags}
1159
+ waitEventContextTags={waitEventContextTags}
1137
1160
  onCreateComplete={onCreateComplete}
1138
1161
  handleClose={handleClose}
1139
1162
  getDefaultTags={type}
@@ -1157,6 +1180,7 @@ export function SlideBoxContent(props) {
1157
1180
  onCreateComplete={onCreateComplete}
1158
1181
  selectedOfferDetails={selectedOfferDetails}
1159
1182
  eventContextTags={eventContextTags}
1183
+ waitEventContextTags={waitEventContextTags}
1160
1184
  params={{
1161
1185
  id: templateData._id,
1162
1186
  }}
@@ -1195,6 +1219,7 @@ export function SlideBoxContent(props) {
1195
1219
  eventContextTags={eventContextTags}
1196
1220
  restrictPersonalization={restrictPersonalization}
1197
1221
  isAnonymousType={isAnonymousType}
1222
+ waitEventContextTags={waitEventContextTags}
1198
1223
  />
1199
1224
  )}
1200
1225
  {isCreateRcs && (<Rcs
@@ -1909,6 +1909,7 @@ export class Creatives extends React.Component {
1909
1909
  smsRegister,
1910
1910
  enableNewChannels,
1911
1911
  eventContextTags,
1912
+ waitEventContextTags,
1912
1913
  isLoyaltyModule,
1913
1914
  loyaltyMetaData = {},
1914
1915
  } = this.props;
@@ -2076,6 +2077,7 @@ export class Creatives extends React.Component {
2076
2077
  creativesMode={creativesMode} // An existing prop that we're using here. Required to ensure correct account details in Edit or Preview in case of Embedded mode.
2077
2078
  hostName={this.props?.hostName || ''}
2078
2079
  eventContextTags={eventContextTags}
2080
+ waitEventContextTags={waitEventContextTags}
2079
2081
  isLoyaltyModule={isLoyaltyModule}
2080
2082
  loyaltyMetaData={loyaltyMetaData}
2081
2083
  showTestAndPreviewSlidebox={showTestAndPreviewSlidebox}
@@ -2168,6 +2170,7 @@ Creatives.propTypes = {
2168
2170
  orgUnitId: PropTypes.number,
2169
2171
  hostName: PropTypes.string,
2170
2172
  eventContextTags: PropTypes.array,
2173
+ waitEventContextTags: PropTypes.object,
2171
2174
  loyaltyTagFetchingDependencies: PropTypes.object,
2172
2175
  customerType: PropTypes.string,
2173
2176
  intl: PropTypes.shape({
@@ -3138,6 +3138,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
3138
3138
  moduleType={moduleType}
3139
3139
  showLiquidErrorInFooter={this.props.showLiquidErrorInFooter}
3140
3140
  eventContextTags={this.props?.eventContextTags}
3141
+ waitEventContextTags={this.props?.waitEventContextTags}
3141
3142
  forwardedTags={this.props?.forwardedTags}
3142
3143
  isLoyaltyModule={this.props?.isLoyaltyModule}
3143
3144
  isTestAndPreviewMode={this.state.isTestAndPreviewMode} // Add flag to prevent validation
@@ -54,6 +54,7 @@ const EmailHTMLEditor = (props) => {
54
54
  globalActions,
55
55
  loadingTags,
56
56
  eventContextTags,
57
+ waitEventContextTags,
57
58
  forwardedTags,
58
59
  selectedOfferDetails,
59
60
  currentOrgDetails,
@@ -498,6 +499,7 @@ const EmailHTMLEditor = (props) => {
498
499
  tagModule: getDefaultTags,
499
500
  eventContextTags,
500
501
  isFullMode,
502
+ waitEventContextTags,
501
503
  });
502
504
 
503
505
  if (!validationResult.valid) {
@@ -506,7 +508,7 @@ const EmailHTMLEditor = (props) => {
506
508
  setTagValidationError(null);
507
509
  }
508
510
  }
509
- }, [tags, injectedTags, location, getDefaultTags, eventContextTags]);
511
+ }, [tags, injectedTags, location, getDefaultTags, eventContextTags, waitEventContextTags]);
510
512
 
511
513
  // Store the last validation state received from HTMLEditor
512
514
  const lastValidationStateRef = useRef(null);
@@ -749,6 +751,7 @@ const EmailHTMLEditor = (props) => {
749
751
  tagModule: getDefaultTags,
750
752
  eventContextTags,
751
753
  isFullMode,
754
+ waitEventContextTags,
752
755
  });
753
756
 
754
757
  const hasUnsupportedTags = validationResult?.unsupportedTags?.length > 0;
@@ -1000,6 +1003,7 @@ const EmailHTMLEditor = (props) => {
1000
1003
  onSuccess,
1001
1004
  tagLookupMap: metaEntities?.tagLookupMap,
1002
1005
  eventContextTags,
1006
+ waitEventContextTags,
1003
1007
  isLiquidFlow: true,
1004
1008
  forwardedTags: forwardedTags || {},
1005
1009
  });
@@ -1014,6 +1018,7 @@ const EmailHTMLEditor = (props) => {
1014
1018
  location,
1015
1019
  getDefaultTags,
1016
1020
  eventContextTags,
1021
+ waitEventContextTags,
1017
1022
  formatMessage,
1018
1023
  subjectError,
1019
1024
  isFullMode,
@@ -1146,6 +1151,7 @@ const EmailHTMLEditor = (props) => {
1146
1151
  injectedTags={injectedTags || {}}
1147
1152
  selectedOfferDetails={selectedOfferDetails}
1148
1153
  eventContextTags={eventContextTags}
1154
+ waitEventContextTags={waitEventContextTags}
1149
1155
  showHeading
1150
1156
  showTagList
1151
1157
  showInput
@@ -1170,6 +1176,7 @@ const EmailHTMLEditor = (props) => {
1170
1176
  injectedTags={injectedTags}
1171
1177
  location={location}
1172
1178
  eventContextTags={eventContextTags}
1179
+ waitEventContextTags={waitEventContextTags}
1173
1180
  selectedOfferDetails={selectedOfferDetails}
1174
1181
  channel={EMAIL}
1175
1182
  userLocale={intl.locale || 'en'}
@@ -1198,6 +1205,7 @@ EmailHTMLEditor.propTypes = {
1198
1205
  globalActions: PropTypes.object,
1199
1206
  loadingTags: PropTypes.bool,
1200
1207
  eventContextTags: PropTypes.array,
1208
+ waitEventContextTags: PropTypes.object,
1201
1209
  forwardedTags: PropTypes.object,
1202
1210
  selectedOfferDetails: PropTypes.array,
1203
1211
  currentOrgDetails: PropTypes.object,
@@ -1244,6 +1252,7 @@ EmailHTMLEditor.defaultProps = {
1244
1252
  globalActions: {},
1245
1253
  loadingTags: false,
1246
1254
  eventContextTags: [],
1255
+ waitEventContextTags: {},
1247
1256
  forwardedTags: {},
1248
1257
  selectedOfferDetails: [],
1249
1258
  currentOrgDetails: {},