Class: MachineInstance<ContextT, EventT>
Type parameters
Name | Type |
---|---|
ContextT |
extends Context = Context |
EventT |
extends Event = Event |
Constructors
constructor
• new MachineInstance<ContextT
, EventT
>(data
, resourceBase
, config
): MachineInstance
<ContextT
, EventT
>
Type parameters
Name | Type |
---|---|
ContextT |
extends Context = Context |
EventT |
extends EventObject = EventObject |
Parameters
Name | Type |
---|---|
data |
Machine |
resourceBase |
string |
config |
MachineConfig <ContextT , EventT > |
Returns
MachineInstance
<ContextT
, EventT
>
Properties
data
• data: Machine
idServiceMap
• Protected
idServiceMap: Record
<string
, InvokeConfig
<ContextT
, EventObject
>[]>
idStateMap
• Protected
idStateMap: Record
<string
, StateNodeConfig
<ContextT
, State
, EventObject
, BaseActionObject
>[]>
instant
• instant: boolean
machine
• machine: StateMachine
<ContextT
, State
, EventT
, { context
: ContextT
; value
: any
}, BaseActionObject
, ServiceMap
, ResolveTypegenMeta
<TypegenDisabled
, NoInfer
<EventT
>, BaseActionObject
, ServiceMap
>>
options
• Protected
options: MachineOptions
<ContextT
, any
>
resourceBase
• Protected
resourceBase: string
safeArea
• Protected
safeArea: null
| SafeArea
serviceNames
• serviceNames: Record
<string
, null
| string
>
strict
• Protected
strict: boolean
Methods
createDragOffsetAction
▸ createDragOffsetAction(schema
): (context
: ContextT
, event
: EventObject
, meta
: ActionMeta
<ContextT
, EventObject
, BaseActionObject
>) => void
Parameters
Name | Type |
---|---|
schema |
DragOffsetAction |
Returns
fn
▸ (context
, event
, meta
): void
Parameters
Name | Type |
---|---|
context |
ContextT |
event |
EventObject |
meta |
ActionMeta <ContextT , EventObject , BaseActionObject > |
Returns
void
createLayer
▸ createLayer(context
, renderer
, container
, zIndex
, layer
, template
): void
Parameters
Name | Type |
---|---|
context |
ContextT |
renderer |
LayoutRenderer |
container |
Container <DisplayObject > |
zIndex |
number |
layer |
Layer |
template |
LayoutTemplate |
Returns
void
createLayoutButtonService
▸ createLayoutButtonService(schema
): InvokeCreator
<ContextT
, EventObject
, any
, any
, EventObject
>
Parameters
Name | Type |
---|---|
schema |
LayoutButtonActivity |
Returns
InvokeCreator
<ContextT
, EventObject
, any
, any
, EventObject
>
createLayoutDragService
▸ createLayoutDragService(schema
): InvokeCreator
<ContextT
, EventObject
, any
, any
, EventObject
>
Parameters
Name | Type |
---|---|
schema |
LayoutDragActivity |
Returns
InvokeCreator
<ContextT
, EventObject
, any
, any
, EventObject
>
createLayoutEventActivity
▸ createLayoutEventActivity(schema
): ActivityConfig
<ContextT
, EventObject
>
Parameters
Name | Type |
---|---|
schema |
LayoutEventActivity |
Returns
ActivityConfig
<ContextT
, EventObject
>
createLayoutHoverService
▸ createLayoutHoverService(schema
): InvokeCreator
<ContextT
, EventObject
, any
, any
, EventObject
>
Parameters
Name | Type |
---|---|
schema |
LayoutHoverActivity |
Returns
InvokeCreator
<ContextT
, EventObject
, any
, any
, EventObject
>
createLayoutLoadService
▸ createLayoutLoadService(schema
, config
): InvokeCreator
<ContextT
, EventObject
, any
, any
, EventObject
>
Parameters
Name | Type |
---|---|
schema |
LayoutServiceCommon |
config |
MachineConfig <ContextT , EventT > |
Returns
InvokeCreator
<ContextT
, EventObject
, any
, any
, EventObject
>
createLayoutStateActivity
▸ createLayoutStateActivity(schema
): ActivityConfig
<ContextT
, EventObject
>
Parameters
Name | Type |
---|---|
schema |
LayoutStateActivity |
Returns
ActivityConfig
<ContextT
, EventObject
>
createSendAction
▸ createSendAction(schema
): (context
: ContextT
, event
: EventObject
, meta
: ActionMeta
<ContextT
, EventObject
, BaseActionObject
>) => void
Parameters
Name | Type |
---|---|
schema |
SendAction |
Returns
fn
▸ (context
, event
, meta
): void
Parameters
Name | Type |
---|---|
context |
ContextT |
event |
EventObject |
meta |
ActionMeta <ContextT , EventObject , BaseActionObject > |
Returns
void
createWaitService
▸ createWaitService(schema
): InvokeCreator
<ContextT
, EventObject
, any
, any
, EventObject
>
Parameters
Name | Type |
---|---|
schema |
WaitService |
Returns
InvokeCreator
<ContextT
, EventObject
, any
, any
, EventObject
>
findLayer
▸ findLayer(name
): Object
Parameters
Name | Type |
---|---|
name |
string |
Returns
Object
Name | Type |
---|---|
layer |
null | Layer |
zIndex |
number |
interpret
▸ interpret(): Interpreter
<ContextT
, State
, EventT
, { context
: ContextT
; value
: any
}, ResolveTypegenMeta
<TypegenDisabled
, NoInfer
<EventT
>, BaseActionObject
, ServiceMap
>>
Returns
Interpreter
<ContextT
, State
, EventT
, { context
: ContextT
; value
: any
}, ResolveTypegenMeta
<TypegenDisabled
, NoInfer
<EventT
>, BaseActionObject
, ServiceMap
>>
invokeService
▸ invokeService(name
, context
, event
, meta
): undefined
| PromiseLike
<any
> | Behavior
<any
, any
> | StateMachine
<any
, any
, any
, any
, any
, any
, any
> | Subscribable
<EventObject
> | InvokeCallback
<EventObject
, any
>
Parameters
Name | Type |
---|---|
name |
string |
context |
ContextT |
event |
EventObject |
meta |
InvokeMeta |
Returns
undefined
| PromiseLike
<any
> | Behavior
<any
, any
> | StateMachine
<any
, any
, any
, any
, any
, any
, any
> | Subscribable
<EventObject
> | InvokeCallback
<EventObject
, any
>
mapServiceConfig
▸ mapServiceConfig(schema
): InvokeConfig
<ContextT
, EventObject
>
Parameters
Name | Type |
---|---|
schema |
Service |
Returns
InvokeConfig
<ContextT
, EventObject
>
mapStateConfig
▸ mapStateConfig(schema
, statePath
): StateNodeConfig
<ContextT
, State
, EventObject
, BaseActionObject
>
Parameters
Name | Type |
---|---|
schema |
Node |
statePath |
string [] |
Returns
StateNodeConfig
<ContextT
, State
, EventObject
, BaseActionObject
>
mapTransitionConfig
▸ mapTransitionConfig(schema
): TransitionConfig
<ContextT
, EventObject
, EventObject
>
Parameters
Name | Type |
---|---|
schema |
EventlessTransition |
Returns
TransitionConfig
<ContextT
, EventObject
, EventObject
>
setSafeArea
▸ setSafeArea(context
, «destructured»
): void
Update the safe area insets dynamically.
Parameters
Name | Type |
---|---|
context |
ContextT |
«destructured» |
SafeArea |
Returns
void
updateLayerSafeArea
▸ updateLayerSafeArea(context
, layer
): void
Parameters
Name | Type |
---|---|
context |
ContextT |
layer |
Layer |
Returns
void