@textbus/collaborate 5.4.7 → 5.4.9
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/dist/index.esm.js +14 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +14 -7
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -874,26 +874,33 @@ exports.Collaborate = /*#__PURE__*/ function() {
|
|
|
874
874
|
Object.keys(attrs).forEach(function(key) {
|
|
875
875
|
var attribute = _this.registry.getAttribute(key);
|
|
876
876
|
if (attribute) {
|
|
877
|
-
localSlot.
|
|
877
|
+
localSlot.skipCheckHost(function() {
|
|
878
|
+
localSlot.setAttribute(attribute, attrs[key]);
|
|
879
|
+
});
|
|
878
880
|
}
|
|
879
881
|
});
|
|
880
882
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
881
883
|
try {
|
|
882
|
-
|
|
884
|
+
var _this1, _loop = function() {
|
|
883
885
|
var action = _step.value;
|
|
884
886
|
if (action.insert) {
|
|
885
887
|
if (typeof action.insert === 'string') {
|
|
886
|
-
var formats = remoteInsertFormatsToLocal(
|
|
887
|
-
localSlot.
|
|
888
|
+
var formats = remoteInsertFormatsToLocal(_this1.registry, action.attributes);
|
|
889
|
+
localSlot.skipCheckHost(function() {
|
|
890
|
+
localSlot.insert(action.insert, formats);
|
|
891
|
+
});
|
|
888
892
|
} else {
|
|
889
893
|
var sharedComponent = action.insert;
|
|
890
|
-
var component =
|
|
891
|
-
localSlot.
|
|
894
|
+
var component = _this1.createLocalComponentBySharedComponent(sharedComponent);
|
|
895
|
+
localSlot.skipCheckHost(function() {
|
|
896
|
+
localSlot.insert(component, remoteInsertFormatsToLocal(_this.registry, action.attributes));
|
|
897
|
+
});
|
|
892
898
|
}
|
|
893
899
|
} else {
|
|
894
900
|
throw collaborateErrorFn('unexpected delta action.');
|
|
895
901
|
}
|
|
896
|
-
}
|
|
902
|
+
};
|
|
903
|
+
for(var _iterator = delta[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_this1 = this, _loop();
|
|
897
904
|
} catch (err) {
|
|
898
905
|
_didIteratorError = true;
|
|
899
906
|
_iteratorError = err;
|