@capillarytech/creatives-library 8.0.345-alpha.7 → 8.0.345-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "8.0.345-alpha.7",
4
+ "version": "8.0.345-alpha.9",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -224,6 +224,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
224
224
  || _.get(this.props.Templates.BEETemplate, 'versions.base.drag_drop_id')
225
225
  || _.get(this.props.Templates.BEETemplate, 'versions.base.id')
226
226
  || this.props.Templates.BEETemplate?._id;
227
+ console.log('[Rafeeq manzoor] comes here 1');
227
228
  this.props.actions.getCmsSetting(BEE_PLUGIN, dragDropId, 'open', undefined, isBEESupport, isBEEAppEnable);
228
229
  } else if (this.props.location.query.module !== "library" || (this.props.location.query.module === "library" && !this.props.templateData)) {
229
230
  // Extract drag_drop_id - check multiple possible paths
@@ -234,6 +235,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
234
235
  || _.get(this.props.Templates.BEETemplate, 'versions.base.drag_drop_id')
235
236
  || _.get(this.props.Templates.BEETemplate, 'versions.base.id')
236
237
  || this.props.Templates.BEETemplate?._id;
238
+ console.log('[Rafeeq manzoor] comes here 2');
237
239
  this.props.actions.getCmsSetting(BEE_PLUGIN, dragDropId, 'create', undefined, isBEESupport, isBEEAppEnable);
238
240
  }
239
241
  }
@@ -286,8 +288,10 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
286
288
 
287
289
  if (this.props.params.id) {
288
290
  const activeTabForLang = beeTemplate.versions?.base?.activeTab || 'en';
291
+ console.log('[Rafeeq manzoor] comes here 3');
289
292
  this.props.actions.getCmsSetting(BEE_PLUGIN, dragDropId, 'open', activeTabForLang, isBEESupport, isBEEAppEnable);
290
293
  } else {
294
+ console.log('[Rafeeq manzoor] comes here 4');
291
295
  this.props.actions.getCmsSetting(BEE_PLUGIN, dragDropId, 'create', undefined, isBEESupport, isBEEAppEnable);
292
296
  }
293
297
  }
@@ -452,8 +456,10 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
452
456
  // Extract langId from active tab
453
457
  const activeTabForLang = beeTemplate.versions?.base?.activeTab || 'en';
454
458
  if (hasParamsId) {
459
+ console.log('[Rafeeq manzoor] comes here 5');
455
460
  this.props.actions.getCmsSetting(BEE_PLUGIN, dragDropId, 'open', activeTabForLang, isBEESupport, isBEEAppEnable);
456
461
  } else if (nextProps.location.query.module !== "library" || (nextProps.location.query.module === "library" && !nextProps.templateData)) {
462
+ console.log('[Rafeeq manzoor] comes here 6');
457
463
  this.props.actions.getCmsSetting(BEE_PLUGIN, dragDropId, 'create', undefined, isBEESupport, isBEEAppEnable);
458
464
  }
459
465
  }
@@ -470,6 +476,10 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
470
476
  }
471
477
  });
472
478
  }
479
+ console.log('[Rafeeq manzoor] here we have data 1', this.state.isEdit, nextProps.location.query.module);
480
+ console.log('[Rafeeq manzoor] here we have data 2', nextProps.templateData, !_.isEmpty(nextProps.templateData), this.props.params.id, nextProps.isGetFormData);
481
+ console.log('[Rafeeq manzoor] here we have data 3', _.isEmpty(_.get(this, `state.formData['template-subject']`)));
482
+
473
483
  if (this.state.isEdit && nextProps.location.query.module === "library" && !_.isEmpty(nextProps.templateData) && !this.props.params.id && !nextProps.isGetFormData && _.isEmpty(_.get(this, `state.formData['template-subject']`))) {
474
484
  this.startTemplateCreation(nextProps.templateData);
475
485
  }
@@ -1238,6 +1248,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
1238
1248
  // formData.base.activeTab = language;
1239
1249
  // }
1240
1250
  if (language && editData.versions.base[language].is_drag_drop && isBEEAppEnable) {
1251
+ console.log('[Rafeeq manzoor] comes here 7');
1241
1252
  this.props.actions.getCmsSetting(BEE_PLUGIN, editData._id, 'open', language, isBEESupport, isBEEAppEnable);
1242
1253
  }
1243
1254
  });
@@ -1461,6 +1472,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
1461
1472
  const currentTab = this.state.currentTab - 1;
1462
1473
  const baseLanguage = this.props.currentOrgDetails.basic_details.base_language ? this.props.currentOrgDetails.basic_details.base_language : 'en';
1463
1474
  if (formData[currentTab][baseLanguage].is_drag_drop && isBEEAppEnable) {
1475
+ console.log('[Rafeeq manzoor] comes here 8');
1464
1476
  this.props.actions.getCmsSetting(BEE_PLUGIN, formData[currentTab][baseLanguage].drag_drop_id, 'duplicate', baseLanguage, isEdmSupport, isBEEAppEnable);
1465
1477
  }
1466
1478
  });
@@ -2518,6 +2530,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
2518
2530
  const isBEEAppEnable = this.checkBeeEditorAllowedForLibrary();
2519
2531
  if (templates.drag_drop_id && isBEEAppEnable) {
2520
2532
  tempData.drag_drop_id = templates.drag_drop_id;
2533
+ console.log('[Rafeeq manzoor] comes here 9');
2521
2534
  this.props.actions.getCmsSetting(BEE_PLUGIN, tempData._id, 'open', tempData.iso_code, isEdmSupport, isBEEAppEnable);
2522
2535
  }
2523
2536
  // formData.usingTabContainer = true;
@@ -2538,13 +2551,17 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
2538
2551
  });
2539
2552
  this.addLanguage(false, formData, false, additionalLanguages);
2540
2553
  }
2554
+ console.log("[Rafeeq manzoor] comes here lib 1", formData[0])
2541
2555
  formData.base = _.cloneDeep(formData[0]);
2542
2556
  if (formData?.['template-subject'] !== '') {
2557
+ console.log("[Rafeeq manzoor] comes here lib 1 if", formData)
2543
2558
  this.setState({formData, loading: false, injectedTags: data.tags, tabKey, isDragDrop: (data.base.is_drag_drop !== 0 )}, () => {
2544
2559
  // this.setState({tabKey: ''});
2545
2560
  const isBEEEnable = this.checkBeeEditorAllowedForLibrary();
2561
+ console.log("[Rafeeq manzoor] comes here lib 1 isBEEEnable", isBEEEnable)
2546
2562
  _.forEach(formData[0].selectedLanguages, (language) => {
2547
2563
  if (formData[0][language].is_drag_drop && isBEEEnable) {
2564
+ console.log('[Rafeeq manzoor] comes here 10');
2548
2565
  this.props.actions.getCmsSetting(BEE_PLUGIN, formData[0][language].drag_drop_id, 'open', language, isEdmSupport, isBEEEnable);
2549
2566
  }
2550
2567
  });
@@ -2887,6 +2904,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
2887
2904
  // let getQuery = '';
2888
2905
  const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
2889
2906
  const isBEEAppEnable = this.checkBeeEditorAllowedForLibrary();
2907
+ console.log('[Rafeeq manzoor] comes here 11');
2890
2908
  this.props.actions.getCmsSetting(BEE_PLUGIN, data._id, 'create', this.state.formData[this.state.currentTab - 1].activeTab, isEdmSupport, isBEEAppEnable);
2891
2909
  // this.props.templatesActions.setEdmTemplate(data);
2892
2910
  this.toggleEdmEmailTemplateSelection();