@@ -44,8 +44,6 @@ export class WMLUIProperty<V=any,T=any>{
4444 ...props
4545 }
4646 )
47-
48-
4947 }
5048
5149
@@ -131,15 +129,11 @@ export class WMLView<V=any,T=any> extends WMLUIProperty<V,T>{
131129 )
132130 }
133131
134- /**
135- * @deprecated use angular.cdref instead
136- */
132+
137133 get cdref ( ) {
138134 return this . angular . cdref
139135 }
140- /**
141- * @deprecated use angular.cdref instead
142- */
136+
143137 set cdref ( val ) {
144138 this . angular . cdref = val
145139 }
@@ -222,6 +216,12 @@ export class WMLMotionUIProperty<V=any,T="animation" | "transition"> extends WML
222216 }
223217
224218 autoOpen = false
219+ eventType : "subject" | "callback" = ( ( ) => {
220+ if ( [ "Angular" ] . includes ( getGlobalObject ( ) . WINDMILLCODE . framework . name ) ) {
221+ return "subject"
222+ }
223+ return "callback"
224+ } ) ( )
225225 /**
226226 * Necessary for animations to work properly.
227227 * Modify only if you know what you are doing.
@@ -255,7 +255,7 @@ export class WMLMotionUIProperty<V=any,T="animation" | "transition"> extends WML
255255 }
256256 triggerMotionEndEvent = ( motionState ?:WMLMotionUIPropertyState ) => {
257257 motionState ??= this . motionState
258- if ( [ "Angular" ] . includes ( getGlobalObject ( ) . WINDMILLCODE . framework . name ) ) {
258+ if ( this . eventType === "subject" ) {
259259 // @ts -ignore
260260 this . motionEndEvent . next ?.( motionState )
261261 }
@@ -267,7 +267,7 @@ export class WMLMotionUIProperty<V=any,T="animation" | "transition"> extends WML
267267 }
268268 triggerMotionKeyFrameEvent = ( keyFrame ?:string ) => {
269269 keyFrame ??= this . currentTransitionInfo . keyframe
270- if ( [ "Angular" ] . includes ( getGlobalObject ( ) . WINDMILLCODE . framework . name ) ) {
270+ if ( this . eventType === "subject" ) {
271271 // @ts -ignore
272272 this . motionKeyFrameEvent . next ?.( keyFrame )
273273 }
@@ -293,12 +293,11 @@ export class WMLMotionUIProperty<V=any,T="animation" | "transition"> extends WML
293293 } )
294294
295295 this . triggerMotionEndEvent ( )
296- if ( [ "Angular" ] . includes ( getGlobalObject ( ) . WINDMILLCODE . framework . name ) ) {
296+ if ( this . eventType === "subject" ) {
297297 this . angular . cdref ?. detectChanges ( )
298298 }
299299
300300 }
301-
302301 readonly transitionEnd :( evt ?:TransitionEvent ) => void = ( evt ) => {
303302 let state = this . getGroupMotionState ( )
304303 this . currentTransitionInfo . transitionEndStyles . push ( evt ?. propertyName . replace ( / - ./ g, ( match ) => match . charAt ( 1 ) . toUpperCase ( ) ) )
@@ -634,6 +633,8 @@ export class WMLMotionUIProperty<V=any,T="animation" | "transition"> extends WML
634633}
635634
636635
636+
637+
637638export class WMLWrapper < V = any , T = any > {
638639 constructor ( props :Partial < WMLWrapper > = { } ) {
639640 Object . assign (
0 commit comments