@capillarytech/creatives-library 8.0.345-alpha.6 → 8.0.345-alpha.8
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
|
@@ -705,8 +705,27 @@ export function SlideBoxContent(props) {
|
|
|
705
705
|
// and getDetails?type=BEE_PLUGIN would never fire. Routing BEE
|
|
706
706
|
// templates through the direct <Email> path — which is already
|
|
707
707
|
// battle-tested for the CKEditor flow — sidesteps that entirely.
|
|
708
|
+
const vBase = templateData?.versions?.base;
|
|
709
|
+
const vBaseActiveTab = vBase?.activeTab || vBase?.selectedLanguages?.[0] || 'en';
|
|
708
710
|
const isBEETemplate = templateData?.base?.is_drag_drop === true
|
|
709
|
-
|| templateData?.base?.is_drag_drop === 1
|
|
711
|
+
|| templateData?.base?.is_drag_drop === 1
|
|
712
|
+
|| vBase?.[vBaseActiveTab]?.is_drag_drop === true
|
|
713
|
+
|| vBase?.[vBaseActiveTab]?.is_drag_drop === 1;
|
|
714
|
+
console.log('[SlideBoxContent] BEE routing debug', {
|
|
715
|
+
supportCKEditor,
|
|
716
|
+
'templateData._id': templateData?._id,
|
|
717
|
+
'templateData.type': templateData?.type,
|
|
718
|
+
'templateData.base': templateData?.base,
|
|
719
|
+
'templateData.base.is_drag_drop': templateData?.base?.is_drag_drop,
|
|
720
|
+
'templateData.base.drag_drop_id': templateData?.base?.drag_drop_id,
|
|
721
|
+
vBase,
|
|
722
|
+
vBaseActiveTab,
|
|
723
|
+
'vBase[vBaseActiveTab]': vBase?.[vBaseActiveTab],
|
|
724
|
+
'vBase[vBaseActiveTab].is_drag_drop': vBase?.[vBaseActiveTab]?.is_drag_drop,
|
|
725
|
+
'vBase[vBaseActiveTab].drag_drop_id': vBase?.[vBaseActiveTab]?.drag_drop_id,
|
|
726
|
+
isBEETemplate,
|
|
727
|
+
routingTo: (supportCKEditor || isBEETemplate) ? 'Email (direct)' : 'EmailWrapper',
|
|
728
|
+
});
|
|
710
729
|
if (supportCKEditor || isBEETemplate) {
|
|
711
730
|
return (
|
|
712
731
|
<Email
|
|
@@ -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
|
}
|
|
@@ -1238,6 +1244,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1238
1244
|
// formData.base.activeTab = language;
|
|
1239
1245
|
// }
|
|
1240
1246
|
if (language && editData.versions.base[language].is_drag_drop && isBEEAppEnable) {
|
|
1247
|
+
console.log('[Rafeeq manzoor] comes here 7');
|
|
1241
1248
|
this.props.actions.getCmsSetting(BEE_PLUGIN, editData._id, 'open', language, isBEESupport, isBEEAppEnable);
|
|
1242
1249
|
}
|
|
1243
1250
|
});
|
|
@@ -1461,6 +1468,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1461
1468
|
const currentTab = this.state.currentTab - 1;
|
|
1462
1469
|
const baseLanguage = this.props.currentOrgDetails.basic_details.base_language ? this.props.currentOrgDetails.basic_details.base_language : 'en';
|
|
1463
1470
|
if (formData[currentTab][baseLanguage].is_drag_drop && isBEEAppEnable) {
|
|
1471
|
+
console.log('[Rafeeq manzoor] comes here 8');
|
|
1464
1472
|
this.props.actions.getCmsSetting(BEE_PLUGIN, formData[currentTab][baseLanguage].drag_drop_id, 'duplicate', baseLanguage, isEdmSupport, isBEEAppEnable);
|
|
1465
1473
|
}
|
|
1466
1474
|
});
|
|
@@ -2518,6 +2526,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2518
2526
|
const isBEEAppEnable = this.checkBeeEditorAllowedForLibrary();
|
|
2519
2527
|
if (templates.drag_drop_id && isBEEAppEnable) {
|
|
2520
2528
|
tempData.drag_drop_id = templates.drag_drop_id;
|
|
2529
|
+
console.log('[Rafeeq manzoor] comes here 9');
|
|
2521
2530
|
this.props.actions.getCmsSetting(BEE_PLUGIN, tempData._id, 'open', tempData.iso_code, isEdmSupport, isBEEAppEnable);
|
|
2522
2531
|
}
|
|
2523
2532
|
// formData.usingTabContainer = true;
|
|
@@ -2538,13 +2547,17 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2538
2547
|
});
|
|
2539
2548
|
this.addLanguage(false, formData, false, additionalLanguages);
|
|
2540
2549
|
}
|
|
2550
|
+
console.log("[Rafeeq manzoor] comes here lib 1", formData[0])
|
|
2541
2551
|
formData.base = _.cloneDeep(formData[0]);
|
|
2542
2552
|
if (formData?.['template-subject'] !== '') {
|
|
2553
|
+
console.log("[Rafeeq manzoor] comes here lib 1 if", formData)
|
|
2543
2554
|
this.setState({formData, loading: false, injectedTags: data.tags, tabKey, isDragDrop: (data.base.is_drag_drop !== 0 )}, () => {
|
|
2544
2555
|
// this.setState({tabKey: ''});
|
|
2545
2556
|
const isBEEEnable = this.checkBeeEditorAllowedForLibrary();
|
|
2557
|
+
console.log("[Rafeeq manzoor] comes here lib 1 isBEEEnable", isBEEEnable)
|
|
2546
2558
|
_.forEach(formData[0].selectedLanguages, (language) => {
|
|
2547
2559
|
if (formData[0][language].is_drag_drop && isBEEEnable) {
|
|
2560
|
+
console.log('[Rafeeq manzoor] comes here 10');
|
|
2548
2561
|
this.props.actions.getCmsSetting(BEE_PLUGIN, formData[0][language].drag_drop_id, 'open', language, isEdmSupport, isBEEEnable);
|
|
2549
2562
|
}
|
|
2550
2563
|
});
|
|
@@ -2887,6 +2900,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2887
2900
|
// let getQuery = '';
|
|
2888
2901
|
const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
|
|
2889
2902
|
const isBEEAppEnable = this.checkBeeEditorAllowedForLibrary();
|
|
2903
|
+
console.log('[Rafeeq manzoor] comes here 11');
|
|
2890
2904
|
this.props.actions.getCmsSetting(BEE_PLUGIN, data._id, 'create', this.state.formData[this.state.currentTab - 1].activeTab, isEdmSupport, isBEEAppEnable);
|
|
2891
2905
|
// this.props.templatesActions.setEdmTemplate(data);
|
|
2892
2906
|
this.toggleEdmEmailTemplateSelection();
|