@capillarytech/creatives-library 8.0.343-alpha.2 → 8.0.343-alpha.4

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.343-alpha.2",
4
+ "version": "8.0.343-alpha.4",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -698,9 +698,16 @@ export function SlideBoxContent(props) {
698
698
  {(isEditEmailWithId || isEmailEditWithContent) && (
699
699
  (() => {
700
700
  const supportCKEditor = commonUtil.hasSupportCKEditor();
701
- // When supportCKEditor is true: Use Email component (legacy flow with CKEditor).
702
- // When supportCKEditor is false: Always use EmailWrapper (BEE or HTML editor, never CKEditor).
703
- if (supportCKEditor) {
701
+ // BEE templates always use the <Email> component directly (the same
702
+ // path the SUPPORT_CK_EDITOR=true branch uses). EmailWrapper's
703
+ // useEmailWrapper strips templateData from props, so library-mode
704
+ // pencil-edit on a BEE template would never reach startTemplateCreation
705
+ // and getDetails?type=BEE_PLUGIN would never fire. Routing BEE
706
+ // templates through the direct <Email> path — which is already
707
+ // battle-tested for the CKEditor flow — sidesteps that entirely.
708
+ const isBEETemplate = templateData?.base?.is_drag_drop === true
709
+ || templateData?.base?.is_drag_drop === 1;
710
+ if (supportCKEditor || isBEETemplate) {
704
711
  return (
705
712
  <Email
706
713
  key="cretives-container-email-edit"
@@ -102,6 +102,10 @@ const useEmailWrapper = ({
102
102
  }
103
103
  }, [onEnterTemplateName, onRemoveTemplateName]);
104
104
 
105
+ useEffect(() => () => {
106
+ emailActions.clearStoreValues();
107
+ }, []);
108
+
105
109
  // Check BEE enabled status from API response
106
110
  // BEE is enabled if isDragDrop is true in the API response
107
111
  // This should work for both full mode and library mode