@textbus/adapter-viewfly 4.3.3 → 4.3.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/bundles/index.esm.js +5 -2
- package/bundles/index.js +4 -1
- package/package.json +7 -7
package/bundles/index.esm.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { makeError, VElement, VTextNode, merge, Adapter } from '@textbus/core';
|
2
|
-
import { createDynamicRef, DynamicRef, jsx, withAnnotation, getCurrentInstance, onUpdated, ReflectiveInjector } from '@viewfly/core';
|
2
|
+
import { createDynamicRef, DynamicRef, jsx, withAnnotation, getCurrentInstance, onUnmounted, onUpdated, ReflectiveInjector } from '@viewfly/core';
|
3
3
|
import { DomAdapter } from '@textbus/platform-browser';
|
4
4
|
import { NodeViewAdapter } from '@textbus/platform-node';
|
5
5
|
|
@@ -102,11 +102,14 @@ class ViewflyAdapter extends DomAdapter {
|
|
102
102
|
this.components[key] = withAnnotation(Object.assign({}, viewFlyComponent.annotation), (props) => {
|
103
103
|
const comp = getCurrentInstance();
|
104
104
|
const textbusComponent = props.component;
|
105
|
-
merge(textbusComponent.changeMarker.onChange, textbusComponent.changeMarker.onForceChange).subscribe(() => {
|
105
|
+
const subscription = merge(textbusComponent.changeMarker.onChange, textbusComponent.changeMarker.onForceChange).subscribe(() => {
|
106
106
|
if (textbusComponent.changeMarker.dirty) {
|
107
107
|
comp.markAsDirtied();
|
108
108
|
}
|
109
109
|
});
|
110
|
+
onUnmounted(() => {
|
111
|
+
subscription.unsubscribe();
|
112
|
+
});
|
110
113
|
if (isRoot) {
|
111
114
|
onUpdated(() => {
|
112
115
|
this.onViewUpdated.next();
|
package/bundles/index.js
CHANGED
@@ -104,11 +104,14 @@ class ViewflyAdapter extends platformBrowser.DomAdapter {
|
|
104
104
|
this.components[key] = core$1.withAnnotation(Object.assign({}, viewFlyComponent.annotation), (props) => {
|
105
105
|
const comp = core$1.getCurrentInstance();
|
106
106
|
const textbusComponent = props.component;
|
107
|
-
core.merge(textbusComponent.changeMarker.onChange, textbusComponent.changeMarker.onForceChange).subscribe(() => {
|
107
|
+
const subscription = core.merge(textbusComponent.changeMarker.onChange, textbusComponent.changeMarker.onForceChange).subscribe(() => {
|
108
108
|
if (textbusComponent.changeMarker.dirty) {
|
109
109
|
comp.markAsDirtied();
|
110
110
|
}
|
111
111
|
});
|
112
|
+
core$1.onUnmounted(() => {
|
113
|
+
subscription.unsubscribe();
|
114
|
+
});
|
112
115
|
if (isRoot) {
|
113
116
|
core$1.onUpdated(() => {
|
114
117
|
this.onViewUpdated.next();
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@textbus/adapter-viewfly",
|
3
|
-
"version": "4.3.
|
3
|
+
"version": "4.3.4",
|
4
4
|
"description": "Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.",
|
5
5
|
"main": "./bundles/index.js",
|
6
6
|
"module": "./bundles/index.esm.js",
|
@@ -26,11 +26,11 @@
|
|
26
26
|
],
|
27
27
|
"dependencies": {
|
28
28
|
"@tanbo/stream": "^1.2.6",
|
29
|
-
"@textbus/core": "^4.3.
|
30
|
-
"@textbus/platform-browser": "^4.3.
|
31
|
-
"@textbus/platform-node": "^4.3.
|
32
|
-
"@viewfly/core": "^1.1.
|
33
|
-
"@viewfly/platform-browser": "^1.1.
|
29
|
+
"@textbus/core": "^4.3.4",
|
30
|
+
"@textbus/platform-browser": "^4.3.4",
|
31
|
+
"@textbus/platform-node": "^4.3.4",
|
32
|
+
"@viewfly/core": "^1.1.6",
|
33
|
+
"@viewfly/platform-browser": "^1.1.6"
|
34
34
|
},
|
35
35
|
"devDependencies": {
|
36
36
|
"@rollup/plugin-commonjs": "^23.0.2",
|
@@ -50,5 +50,5 @@
|
|
50
50
|
"bugs": {
|
51
51
|
"url": "https://github.com/textbus/textbus.git/issues"
|
52
52
|
},
|
53
|
-
"gitHead": "
|
53
|
+
"gitHead": "b5c3e177447812e7316ac6fb6d9cd6d5e6300c7b"
|
54
54
|
}
|