@textbus/core
Advanced tools
Comparing version 2.0.0-alpha.31 to 2.0.0-alpha.33
@@ -26,2 +26,5 @@ import { Observable } from '@tanbo/stream'; | ||
onChange: Observable<void>; | ||
onBack: Observable<void>; | ||
onForward: Observable<void>; | ||
onPush: Observable<void>; | ||
/** | ||
@@ -38,2 +41,5 @@ * 历史记录是否可回退 | ||
private changeEvent; | ||
private backEvent; | ||
private forwardEvent; | ||
private pushEvent; | ||
private subscription; | ||
@@ -40,0 +46,0 @@ private forceChangeSubscription; |
@@ -31,5 +31,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
this.changeEvent = new Subject(); | ||
this.backEvent = new Subject(); | ||
this.forwardEvent = new Subject(); | ||
this.pushEvent = new Subject(); | ||
this.subscription = null; | ||
this.forceChangeSubscription = null; | ||
this.onChange = this.changeEvent.asObservable(); | ||
this.onBack = this.backEvent.asObservable(); | ||
this.onForward = this.forwardEvent.asObservable(); | ||
this.onPush = this.pushEvent.asObservable(); | ||
} | ||
@@ -69,2 +75,3 @@ /** | ||
this.record(); | ||
this.forwardEvent.next(); | ||
this.changeEvent.next(); | ||
@@ -85,2 +92,3 @@ } | ||
this.record(); | ||
this.backEvent.next(); | ||
this.changeEvent.next(); | ||
@@ -116,2 +124,3 @@ } | ||
operations = []; | ||
this.pushEvent.next(); | ||
this.changeEvent.next(); | ||
@@ -118,0 +127,0 @@ }); |
@@ -97,3 +97,3 @@ import { produce, enablePatches } from 'immer'; | ||
dynamicShortcut: [], | ||
eventCache: new EventCache() | ||
eventCache: new EventCache(), | ||
}; | ||
@@ -110,3 +110,3 @@ contextStack.push(context); | ||
componentInstance.shortcutList = context.dynamicShortcut; | ||
let state = context.initState; | ||
let state = Reflect.has(context, 'initState') ? context.initState : initData.state; | ||
const subscriptions = [ | ||
@@ -113,0 +113,0 @@ context.slots.onChange.subscribe(ops => { |
{ | ||
"name": "@textbus/core", | ||
"version": "2.0.0-alpha.31", | ||
"version": "2.0.0-alpha.33", | ||
"description": "TextBus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.", | ||
@@ -43,3 +43,3 @@ "main": "./bundles/public-api.js", | ||
}, | ||
"gitHead": "7a27a20ebfe9c50c3672734df5798e2618ce6ea6" | ||
"gitHead": "feae02fc4f039bca2deb714b8a2efe75a673f11a" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
409092
6653