@capillarytech/creatives-library 8.0.214-beta.1 → 8.0.214-beta.2
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
|
@@ -179,8 +179,15 @@ const useEmailWrapper = ({
|
|
|
179
179
|
const onChange = useCallback((e) => {
|
|
180
180
|
const { target: { value } } = e;
|
|
181
181
|
|
|
182
|
+
console.log('[useEmailWrapper] onChange called:', {
|
|
183
|
+
value,
|
|
184
|
+
isFullMode,
|
|
185
|
+
checkBeeEditorEnabled: checkBeeEditorEnabled(),
|
|
186
|
+
});
|
|
187
|
+
|
|
182
188
|
// Prevent selection if Drag & Drop is selected but BEE editor is not enabled
|
|
183
189
|
if (value === EMAIL_CREATE_MODES.DRAG_DROP && !checkBeeEditorEnabled()) {
|
|
190
|
+
console.log('[useEmailWrapper] Blocking DRAG_DROP - BEE not enabled');
|
|
184
191
|
return; // Ignore selection if BEE editor is disabled
|
|
185
192
|
}
|
|
186
193
|
|
|
@@ -192,24 +199,21 @@ const useEmailWrapper = ({
|
|
|
192
199
|
setSelectedCreateMode(value);
|
|
193
200
|
}
|
|
194
201
|
|
|
202
|
+
console.log('[useEmailWrapper] Setting selectedCreateMode to:', value);
|
|
203
|
+
|
|
195
204
|
const supportCKEditor = hasSupportCKEditor();
|
|
196
205
|
|
|
197
206
|
// Map new modes to existing modes for backwards compatibility
|
|
198
207
|
let mappedValue = value;
|
|
199
208
|
|
|
200
209
|
if (!supportCKEditor) {
|
|
201
|
-
// New flow:
|
|
202
|
-
// Don't auto-navigate - wait for Next button click
|
|
210
|
+
// New flow: Map EMAIL_CREATE_MODES to existing modes
|
|
203
211
|
if (value === EMAIL_CREATE_MODES.HTML_EDITOR) {
|
|
204
|
-
|
|
205
|
-
mappedValue = EMAIL_CREATE_MODES.EDITOR;
|
|
206
|
-
setModeContent({ skipTemplateSelection: true });
|
|
212
|
+
mappedValue = 'simple';
|
|
207
213
|
} else if (value === EMAIL_CREATE_MODES.DRAG_DROP) {
|
|
208
|
-
|
|
209
|
-
mappedValue = EMAIL_CREATE_MODES.EDITOR;
|
|
214
|
+
mappedValue = 'advanced';
|
|
210
215
|
} else if (value === EMAIL_CREATE_MODES.UPLOAD) {
|
|
211
|
-
|
|
212
|
-
mappedValue = EMAIL_CREATE_MODES.UPLOAD;
|
|
216
|
+
mappedValue = 'upload';
|
|
213
217
|
}
|
|
214
218
|
} else if (value === EMAIL_CREATE_MODES.EDITOR && showNextStep) {
|
|
215
219
|
// Legacy flow: Auto-navigate immediately (existing behavior)
|
|
@@ -729,7 +733,18 @@ const useEmailWrapper = ({
|
|
|
729
733
|
const hasTemplateName = !isFullMode || !isTemplateNameEmpty;
|
|
730
734
|
const hasEditorSelection = !!selectedCreateMode;
|
|
731
735
|
|
|
732
|
-
|
|
736
|
+
const result = hasTemplateName && hasEditorSelection;
|
|
737
|
+
|
|
738
|
+
console.log('[useEmailWrapper] isNextButtonEnabled calculation:', {
|
|
739
|
+
isFullMode,
|
|
740
|
+
isTemplateNameEmpty,
|
|
741
|
+
selectedCreateMode,
|
|
742
|
+
hasTemplateName,
|
|
743
|
+
hasEditorSelection,
|
|
744
|
+
result,
|
|
745
|
+
});
|
|
746
|
+
|
|
747
|
+
return result;
|
|
733
748
|
}, [isTemplateNameEmpty, isFullMode, selectedCreateMode]);
|
|
734
749
|
|
|
735
750
|
// Upload button label
|