@arc-fusion/pb-editor-wrapper
Advanced tools
Comparing version 0.0.353 to 0.0.354
@@ -36,31 +36,2 @@ "use strict"; | ||
var enterRef = (0, _react.useRef)(); | ||
var previewEvents = { | ||
generateHover: function generateHover(component) { | ||
return new CustomEvent('onFeatureHover', { | ||
detail: { | ||
fingerprint: fingerprint, | ||
component: component, | ||
plugins: plugins | ||
} | ||
}); | ||
}, | ||
generateHoverEnd: function generateHoverEnd(component) { | ||
return new CustomEvent('onFeatureHoverEnd', { | ||
detail: { | ||
fingerprint: fingerprint, | ||
component: component, | ||
plugins: plugins | ||
} | ||
}); | ||
} | ||
}; | ||
var onFeatureHover = function onFeatureHover(component) { | ||
window.dispatchEvent(previewEvents.generateHover(component)); | ||
}; | ||
var onFeatureHoverEnd = function onFeatureHoverEnd(component) { | ||
window.dispatchEvent(previewEvents.generateHoverEnd(component)); | ||
}; | ||
(0, _react.useEffect)(function () { | ||
@@ -101,3 +72,7 @@ if (isChain) return; | ||
if (isChain || (mutation === null || mutation === void 0 ? void 0 : mutation.oldValue) !== null && (mutation === null || mutation === void 0 ? void 0 : (_mutation$target = mutation.target) === null || _mutation$target === void 0 ? void 0 : _mutation$target.id) === 'fusion-app') { | ||
console.log('MUTATION', { | ||
mutation: mutation | ||
}); | ||
if (isChain || (mutation === null || mutation === void 0 ? void 0 : (_mutation$target = mutation.target) === null || _mutation$target === void 0 ? void 0 : _mutation$target.id) === 'fusion-app') { | ||
console.log('DISCONNECT'); | ||
@@ -118,2 +93,31 @@ observer.disconnect(); | ||
var previewEvents = { | ||
generateHover: function generateHover(component) { | ||
return new CustomEvent('onFeatureHover', { | ||
detail: { | ||
fingerprint: fingerprint, | ||
component: component, | ||
plugins: plugins | ||
} | ||
}); | ||
}, | ||
generateHoverEnd: function generateHoverEnd(component) { | ||
return new CustomEvent('onFeatureHoverEnd', { | ||
detail: { | ||
fingerprint: fingerprint, | ||
component: component, | ||
plugins: plugins | ||
} | ||
}); | ||
} | ||
}; | ||
var onFeatureHover = function onFeatureHover(component) { | ||
window.dispatchEvent(previewEvents.generateHover(component)); | ||
}; | ||
var onFeatureHoverEnd = function onFeatureHoverEnd(component) { | ||
window.dispatchEvent(previewEvents.generateHoverEnd(component)); | ||
}; | ||
function addMouseEventsToSiblings(enterNode) { | ||
@@ -120,0 +124,0 @@ var siblingNodes = (0, _getSiblingNodes.getSiblingNodes)(fingerprint, enterNode); |
{ | ||
"name": "@arc-fusion/pb-editor-wrapper", | ||
"description": "PageBuilder Preview Wrapper", | ||
"version": "0.0.353", | ||
"version": "0.0.354", | ||
"module": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "files": [ |
10656
161