@capillarytech/creatives-library 8.0.345-alpha.4 → 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
|
@@ -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});
|
|
@@ -37,7 +37,6 @@ const useEmailWrapper = ({
|
|
|
37
37
|
// Props for Email component
|
|
38
38
|
setIsLoadingContent,
|
|
39
39
|
isGetFormData,
|
|
40
|
-
templateData,
|
|
41
40
|
getFormdata,
|
|
42
41
|
type,
|
|
43
42
|
isFullMode,
|
|
@@ -66,11 +65,11 @@ const useEmailWrapper = ({
|
|
|
66
65
|
location,
|
|
67
66
|
emailActions,
|
|
68
67
|
Email,
|
|
68
|
+
templateData,
|
|
69
69
|
params,
|
|
70
70
|
isEditEmail = true,
|
|
71
71
|
}) => {
|
|
72
72
|
// State management
|
|
73
|
-
console.log('[SlideBoxContent] mode:', isFullMode);
|
|
74
73
|
const [templateName, setTemplateName] = useState('');
|
|
75
74
|
const [isTemplateNameEmpty, setIsTemplateNameEmpty] = useState(true);
|
|
76
75
|
const [selectedCreateMode, setSelectedCreateMode] = useState('');
|
|
@@ -727,7 +726,6 @@ const useEmailWrapper = ({
|
|
|
727
726
|
location: routeParams,
|
|
728
727
|
route: { name: 'email' },
|
|
729
728
|
params: emailParams,
|
|
730
|
-
templateData,
|
|
731
729
|
isGetFormData,
|
|
732
730
|
getFormdata,
|
|
733
731
|
getFormSubscriptionData: getFormdata,
|