@capillarytech/creatives-library 8.0.345-alpha.5 → 8.0.345-alpha.6

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.5",
4
+ "version": "8.0.345-alpha.6",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -705,12 +705,6 @@ 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
- console.log('[SlideBoxContent] templateData:', templateData);
709
- console.log('[SlideBoxContent] templateData.base:', templateData?.base);
710
- console.log('[SlideBoxContent] templateData.base.is_drag_drop:', templateData?.base?.is_drag_drop);
711
- console.log('[SlideBoxContent] typeof templateData.base.is_drag_drop:', typeof templateData?.base?.is_drag_drop);
712
- console.log('[SlideBoxContent] is_drag_drop === true:', templateData?.base?.is_drag_drop === true);
713
- console.log('[SlideBoxContent] is_drag_drop === 1:', templateData?.base?.is_drag_drop === 1);
714
708
  const isBEETemplate = templateData?.base?.is_drag_drop === true
715
709
  || templateData?.base?.is_drag_drop === 1;
716
710
  if (supportCKEditor || isBEETemplate) {
@@ -966,10 +966,13 @@ export class Creatives extends React.Component {
966
966
  case constants.EMAIL:
967
967
  if (template?.value?.base) {
968
968
  let emailBase = template.value.base;
969
- const { html_content } = emailBase || {};
969
+ const { html_content, drag_drop_id: formDragDropId } = emailBase || {};
970
970
  if (!html_content) {
971
971
  emailBase = templateRecords.base;
972
972
  }
973
+ if (!emailBase.drag_drop_id && formDragDropId) {
974
+ emailBase = { ...emailBase, drag_drop_id: formDragDropId };
975
+ }
973
976
  const newHtmlContent = await updateImagesInHtml(html_content);
974
977
  templateData = {
975
978
  ...templateData, ...emailBase, emailBody: newHtmlContent, emailSubject: (emailBase && emailBase.subject) ? emailBase.subject : '',
@@ -1639,6 +1639,9 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
1639
1639
  if (content.id) {
1640
1640
  tmpData.id = content.id;
1641
1641
  }
1642
+ if (content.drag_drop_id) {
1643
+ tmpData.drag_drop_id = content.drag_drop_id;
1644
+ }
1642
1645
  }
1643
1646
  newFormData.base = _.cloneDeep(tmpData);
1644
1647
  newFormData.secondary_templates.push({template_data: tmpData});
@@ -65,11 +65,11 @@ const useEmailWrapper = ({
65
65
  location,
66
66
  emailActions,
67
67
  Email,
68
+ templateData,
68
69
  params,
69
70
  isEditEmail = true,
70
71
  }) => {
71
72
  // State management
72
- console.log('[SlideBoxContent] mode:', isFullMode);
73
73
  const [templateName, setTemplateName] = useState('');
74
74
  const [isTemplateNameEmpty, setIsTemplateNameEmpty] = useState(true);
75
75
  const [selectedCreateMode, setSelectedCreateMode] = useState('');
@@ -103,9 +103,7 @@ const useEmailWrapper = ({
103
103
  }, [onEnterTemplateName, onRemoveTemplateName]);
104
104
 
105
105
  useEffect(() => () => {
106
- return () =>{
107
- emailActions.clearStoreValues();
108
- }
106
+ emailActions.clearStoreValues();
109
107
  }, []);
110
108
 
111
109
  // Check BEE enabled status from API response
@@ -728,7 +726,6 @@ const useEmailWrapper = ({
728
726
  location: routeParams,
729
727
  route: { name: 'email' },
730
728
  params: emailParams,
731
- templateData,
732
729
  isGetFormData,
733
730
  getFormdata,
734
731
  getFormSubscriptionData: getFormdata,