@arc-fusion/pb-editor-wrapper
Advanced tools
Comparing version 0.0.365 to 0.0.367
@@ -49,32 +49,36 @@ "use strict"; | ||
function observeBoundaries(enterNode) { | ||
var parentNode = enterNode.parentNode; | ||
var config = { | ||
childList: true | ||
}; | ||
var observer = new MutationObserver(callback); | ||
console.log('NEXT SIBLING', enterNode.nextSibling); | ||
if (isChain) return; | ||
observer.observe(parentNode, config); | ||
var _enterNode$nextSiblin; | ||
function callback(mutationsList) { | ||
var _iterator = _createForOfIteratorHelper(mutationsList), | ||
_step; | ||
if (!isChain && enterNode !== null && enterNode !== void 0 && (_enterNode$nextSiblin = enterNode.nextSibling) !== null && _enterNode$nextSiblin !== void 0 && _enterNode$nextSiblin.matches("[data-fusion-component=\"".concat(fingerprint, "\"]"))) { | ||
var callback = function callback(mutationsList) { | ||
var _iterator = _createForOfIteratorHelper(mutationsList), | ||
_step; | ||
try { | ||
for (_iterator.s(); !(_step = _iterator.n()).done;) { | ||
var _mutation$addedNodes; | ||
try { | ||
for (_iterator.s(); !(_step = _iterator.n()).done;) { | ||
var _mutation$addedNodes; | ||
var mutation = _step.value; | ||
var mutation = _step.value; | ||
if ((mutation === null || mutation === void 0 ? void 0 : mutation.type) === 'childList' && mutation !== null && mutation !== void 0 && (_mutation$addedNodes = mutation.addedNodes) !== null && _mutation$addedNodes !== void 0 && _mutation$addedNodes.length) { | ||
addMouseEventsToSiblings(enterNode); | ||
} else { | ||
observer.disconnect(); | ||
if ((mutation === null || mutation === void 0 ? void 0 : mutation.type) === 'childList' && mutation !== null && mutation !== void 0 && (_mutation$addedNodes = mutation.addedNodes) !== null && _mutation$addedNodes !== void 0 && _mutation$addedNodes.length) { | ||
console.log('ADD WRAPPER'); | ||
addMouseEventsToSiblings(enterNode); | ||
} else { | ||
observer.disconnect(); | ||
} | ||
} | ||
} catch (err) { | ||
_iterator.e(err); | ||
} finally { | ||
_iterator.f(); | ||
} | ||
} catch (err) { | ||
_iterator.e(err); | ||
} finally { | ||
_iterator.f(); | ||
} | ||
}; | ||
var parentNode = enterNode.parentNode; | ||
var config = { | ||
childList: true | ||
}; | ||
var observer = new MutationObserver(callback); | ||
observer.observe(parentNode, config); | ||
console.log('ENTERNODE', enterNode); | ||
} | ||
@@ -137,3 +141,3 @@ } | ||
}), children, /*#__PURE__*/_react.default.createElement("fusion-exit", { | ||
id: "fusion-exit", | ||
id: "fusion-exit-".concat(fingerprint), | ||
"data-fusion-component": fingerprint, | ||
@@ -140,0 +144,0 @@ style: { |
{ | ||
"name": "@arc-fusion/pb-editor-wrapper", | ||
"description": "PageBuilder Preview Wrapper", | ||
"version": "0.0.365", | ||
"version": "0.0.367", | ||
"module": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "files": [ |
10669
157