@genesislcap/foundation-state-machine 14.408.0 → 14.409.0
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/README.md +6 -26
- package/package.json +12 -12
- package/docs/api/foundation-state-machine.abstractmachine.actor.md +0 -18
- package/docs/api/foundation-state-machine.abstractmachine.binding.md +0 -102
- package/docs/api/foundation-state-machine.abstractmachine.complete.md +0 -13
- package/docs/api/foundation-state-machine.abstractmachine.context.md +0 -13
- package/docs/api/foundation-state-machine.abstractmachine.error.md +0 -13
- package/docs/api/foundation-state-machine.abstractmachine.errors.md +0 -13
- package/docs/api/foundation-state-machine.abstractmachine.getfromcontainer.md +0 -23
- package/docs/api/foundation-state-machine.abstractmachine.getmetavaluesbykey.md +0 -58
- package/docs/api/foundation-state-machine.abstractmachine.hastag.md +0 -58
- package/docs/api/foundation-state-machine.abstractmachine.machine.md +0 -18
- package/docs/api/foundation-state-machine.abstractmachine.matches.md +0 -58
- package/docs/api/foundation-state-machine.abstractmachine.md +0 -435
- package/docs/api/foundation-state-machine.abstractmachine.meta.md +0 -13
- package/docs/api/foundation-state-machine.abstractmachine.onsendevent.md +0 -13
- package/docs/api/foundation-state-machine.abstractmachine.output.md +0 -13
- package/docs/api/foundation-state-machine.abstractmachine.provide.md +0 -54
- package/docs/api/foundation-state-machine.abstractmachine.send.md +0 -54
- package/docs/api/foundation-state-machine.abstractmachine.snapshot.md +0 -13
- package/docs/api/foundation-state-machine.abstractmachine.start.md +0 -58
- package/docs/api/foundation-state-machine.abstractmachine.startingcontext.md +0 -13
- package/docs/api/foundation-state-machine.abstractmachine.startingstate.md +0 -13
- package/docs/api/foundation-state-machine.abstractmachine.state.md +0 -13
- package/docs/api/foundation-state-machine.abstractmachine.stop.md +0 -17
- package/docs/api/foundation-state-machine.apierror._constructor_.md +0 -80
- package/docs/api/foundation-state-machine.apierror.data.md +0 -11
- package/docs/api/foundation-state-machine.apierror.isunauthorized.md +0 -16
- package/docs/api/foundation-state-machine.apierror.md +0 -147
- package/docs/api/foundation-state-machine.apierror.status.md +0 -11
- package/docs/api/foundation-state-machine.assertevent.md +0 -72
- package/docs/api/foundation-state-machine.createerrorstatenode.md +0 -86
- package/docs/api/foundation-state-machine.createfetchpolicy.md +0 -122
- package/docs/api/foundation-state-machine.createresponsedataextractorwithdeserializer.md +0 -70
- package/docs/api/foundation-state-machine.defaultfetchconfig.md +0 -13
- package/docs/api/foundation-state-machine.defaultfetchmachine._constructor_.md +0 -50
- package/docs/api/foundation-state-machine.defaultfetchmachine.getfromcontainer.md +0 -23
- package/docs/api/foundation-state-machine.defaultfetchmachine.md +0 -99
- package/docs/api/foundation-state-machine.defaultfetchmachine.start.md +0 -58
- package/docs/api/foundation-state-machine.defaultfetchmachinecontext.md +0 -13
- package/docs/api/foundation-state-machine.defaultfetchpolicy.md +0 -13
- package/docs/api/foundation-state-machine.defaultresponsedataextractor.md +0 -18
- package/docs/api/foundation-state-machine.defaultresponseokchecker.md +0 -13
- package/docs/api/foundation-state-machine.defaultretrystatscodes.md +0 -13
- package/docs/api/foundation-state-machine.errorworkflowinput.md +0 -17
- package/docs/api/foundation-state-machine.escalateerror.md +0 -42
- package/docs/api/foundation-state-machine.fetchconfig.fetcher.md +0 -13
- package/docs/api/foundation-state-machine.fetchconfig.fetchpolicy.md +0 -13
- package/docs/api/foundation-state-machine.fetchconfig.md +0 -115
- package/docs/api/foundation-state-machine.fetchconfig.responsedataextractor.md +0 -13
- package/docs/api/foundation-state-machine.fetchconfig.responseokchecker.md +0 -13
- package/docs/api/foundation-state-machine.fetchmachine.md +0 -15
- package/docs/api/foundation-state-machine.fetchmachinecontext.controller.md +0 -13
- package/docs/api/foundation-state-machine.fetchmachinecontext.data.md +0 -13
- package/docs/api/foundation-state-machine.fetchmachinecontext.md +0 -120
- package/docs/api/foundation-state-machine.fetchmachinecontext.params.md +0 -17
- package/docs/api/foundation-state-machine.fetchmachinecontext.response.md +0 -13
- package/docs/api/foundation-state-machine.fetchmachineevent.md +0 -24
- package/docs/api/foundation-state-machine.fetchmachineeventmap.md +0 -21
- package/docs/api/foundation-state-machine.fetchmachineoutput.md +0 -21
- package/docs/api/foundation-state-machine.genesisservererror._constructor_.md +0 -82
- package/docs/api/foundation-state-machine.genesisservererror.getdetailserror.md +0 -15
- package/docs/api/foundation-state-machine.genesisservererror.getmessageerror.md +0 -15
- package/docs/api/foundation-state-machine.genesisservererror.haserrorcode.md +0 -50
- package/docs/api/foundation-state-machine.genesisservererror.isignorableerror.md +0 -17
- package/docs/api/foundation-state-machine.genesisservererror.md +0 -186
- package/docs/api/foundation-state-machine.genesisservererror.received.md +0 -11
- package/docs/api/foundation-state-machine.genesisservererror.sent.md +0 -11
- package/docs/api/foundation-state-machine.isaborterror.md +0 -54
- package/docs/api/foundation-state-machine.isactorerrorevent.md +0 -70
- package/docs/api/foundation-state-machine.isapierror.md +0 -52
- package/docs/api/foundation-state-machine.isdoneinvokeevent.md +0 -54
- package/docs/api/foundation-state-machine.iserrorcustomevent.md +0 -58
- package/docs/api/foundation-state-machine.iserrorevent.md +0 -54
- package/docs/api/foundation-state-machine.iserrortype.md +0 -54
- package/docs/api/foundation-state-machine.iseventwithparams.md +0 -54
- package/docs/api/foundation-state-machine.isgenesisservererror.md +0 -52
- package/docs/api/foundation-state-machine.ismappingerror.md +0 -52
- package/docs/api/foundation-state-machine.isnetworkerror.md +0 -52
- package/docs/api/foundation-state-machine.isnotfounderror.md +0 -54
- package/docs/api/foundation-state-machine.issyntaxerror.md +0 -54
- package/docs/api/foundation-state-machine.istypeerror.md +0 -54
- package/docs/api/foundation-state-machine.isunauthorizederror.md +0 -54
- package/docs/api/foundation-state-machine.logger.md +0 -12
- package/docs/api/foundation-state-machine.machine.actor.md +0 -18
- package/docs/api/foundation-state-machine.machine.binding.md +0 -122
- package/docs/api/foundation-state-machine.machine.complete.md +0 -13
- package/docs/api/foundation-state-machine.machine.context.md +0 -13
- package/docs/api/foundation-state-machine.machine.error.md +0 -13
- package/docs/api/foundation-state-machine.machine.errors.md +0 -13
- package/docs/api/foundation-state-machine.machine.getfromcontainer.md +0 -35
- package/docs/api/foundation-state-machine.machine.getmetavaluesbykey.md +0 -58
- package/docs/api/foundation-state-machine.machine.hastag.md +0 -65
- package/docs/api/foundation-state-machine.machine.machine.md +0 -18
- package/docs/api/foundation-state-machine.machine.matches.md +0 -65
- package/docs/api/foundation-state-machine.machine.md +0 -474
- package/docs/api/foundation-state-machine.machine.meta.md +0 -13
- package/docs/api/foundation-state-machine.machine.onsendevent.md +0 -54
- package/docs/api/foundation-state-machine.machine.output.md +0 -13
- package/docs/api/foundation-state-machine.machine.provide.md +0 -74
- package/docs/api/foundation-state-machine.machine.send.md +0 -54
- package/docs/api/foundation-state-machine.machine.snapshot.md +0 -13
- package/docs/api/foundation-state-machine.machine.start.md +0 -58
- package/docs/api/foundation-state-machine.machine.startingcontext.md +0 -13
- package/docs/api/foundation-state-machine.machine.startingstate.md +0 -13
- package/docs/api/foundation-state-machine.machine.state.md +0 -13
- package/docs/api/foundation-state-machine.machine.stop.md +0 -17
- package/docs/api/foundation-state-machine.machinecontext.error.md +0 -13
- package/docs/api/foundation-state-machine.machinecontext.errors.md +0 -13
- package/docs/api/foundation-state-machine.machinecontext.md +0 -96
- package/docs/api/foundation-state-machine.mappingerror._constructor_.md +0 -66
- package/docs/api/foundation-state-machine.mappingerror.dto.md +0 -11
- package/docs/api/foundation-state-machine.mappingerror.md +0 -93
- package/docs/api/foundation-state-machine.md +0 -600
- package/docs/api/foundation-state-machine.networkerror._constructor_.md +0 -64
- package/docs/api/foundation-state-machine.networkerror.md +0 -95
- package/docs/api/foundation-state-machine.networkerror.url.md +0 -11
- package/docs/api/foundation-state-machine.responsedataextractor.md +0 -18
- package/docs/api/foundation-state-machine.responseokchecker.md +0 -13
- package/docs/api/foundation-state-machine.seterror.md +0 -25
- package/docs/api/foundation-state-machine.seterrorbykey.md +0 -65
- package/docs/api/index.md +0 -30
- package/docs/api-report.md.api.md +0 -410
package/README.md
CHANGED
|
@@ -1,45 +1,25 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @genesislcap/foundation-state-machine
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://www.typescriptlang.org/)
|
|
5
|
-
|
|
6
|
-
State machines in `foundation-ui` are built upon the [xState](https://github.com/statelyai/xstate) v5+ library and provide bindable properties and other hooks. `foundation-state-machine` provides a collection of pre-built state machines and utilities to build your own machines.
|
|
7
|
-
|
|
8
|
-
For details on how machines work see the API Docs and the v5+ version of the [xstate docs](https://stately.ai/docs/xstate-v5).
|
|
9
|
-
|
|
10
|
-
### Pre-built state machines
|
|
11
|
-
|
|
12
|
-
Overtime this package will provide a number of pre-built machines that offer common functionality. Visit their README files and API Docs for more information.
|
|
13
|
-
|
|
14
|
-
* [FetchMachine](./src/machines/fetch/README.md)
|
|
15
|
-
* ...
|
|
16
|
-
|
|
17
|
-
Domain focused machines like `AuthMachine` will live in different packages.
|
|
3
|
+
Documentation for this package is published on the Genesis docs site:
|
|
18
4
|
|
|
5
|
+
**Docs: [State management](https://docs.genesis.global/docs/develop/client-capabilities/state-management/)**
|
|
19
6
|
|
|
20
7
|
## Installation
|
|
21
8
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
1. Add `@genesislcap/foundation-state-machine` as a dependency in your `package.json` file. Whenever you change the dependencies of your project, ensure you run the `$ npm run bootstrap` command again. You can find more information in the [package.json basics](https://learn.genesis.global/secure/web/basics/package-json-basics/) page.
|
|
9
|
+
Add the package to your `package.json` dependencies. After changing dependencies, run `npm run bootstrap` (or your project's equivalent). See [package.json basics](https://learn.genesis.global/secure/web/basics/package-json-basics/) for more information.
|
|
25
10
|
|
|
26
11
|
```json
|
|
27
12
|
{
|
|
28
|
-
...
|
|
29
13
|
"dependencies": {
|
|
30
|
-
...
|
|
31
14
|
"@genesislcap/foundation-state-machine": "latest"
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
...
|
|
15
|
+
}
|
|
35
16
|
}
|
|
36
17
|
```
|
|
37
18
|
|
|
38
|
-
## [API Docs](./docs/api/index.md)
|
|
39
|
-
|
|
40
19
|
## License
|
|
41
20
|
|
|
42
21
|
Note: this project provides front-end dependencies and uses licensed components listed in the next section; thus, licenses for those components are required during development. Contact [Genesis Global](https://genesis.global/contact-us/) for more details.
|
|
43
22
|
|
|
44
23
|
### Licensed components
|
|
24
|
+
|
|
45
25
|
Genesis low-code platform
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-state-machine",
|
|
3
3
|
"description": "Genesis Foundation State Machine",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.409.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -54,18 +54,18 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@genesislcap/foundation-testing": "14.
|
|
58
|
-
"@genesislcap/genx": "14.
|
|
59
|
-
"@genesislcap/rollup-builder": "14.
|
|
60
|
-
"@genesislcap/ts-builder": "14.
|
|
61
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
62
|
-
"@genesislcap/vite-builder": "14.
|
|
63
|
-
"@genesislcap/webpack-builder": "14.
|
|
57
|
+
"@genesislcap/foundation-testing": "14.409.0",
|
|
58
|
+
"@genesislcap/genx": "14.409.0",
|
|
59
|
+
"@genesislcap/rollup-builder": "14.409.0",
|
|
60
|
+
"@genesislcap/ts-builder": "14.409.0",
|
|
61
|
+
"@genesislcap/uvu-playwright-builder": "14.409.0",
|
|
62
|
+
"@genesislcap/vite-builder": "14.409.0",
|
|
63
|
+
"@genesislcap/webpack-builder": "14.409.0"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@genesislcap/foundation-comms": "14.
|
|
67
|
-
"@genesislcap/foundation-logger": "14.
|
|
68
|
-
"@genesislcap/foundation-utils": "14.
|
|
66
|
+
"@genesislcap/foundation-comms": "14.409.0",
|
|
67
|
+
"@genesislcap/foundation-logger": "14.409.0",
|
|
68
|
+
"@genesislcap/foundation-utils": "14.409.0",
|
|
69
69
|
"@microsoft/fast-element": "1.14.0",
|
|
70
70
|
"@microsoft/fast-foundation": "2.50.0",
|
|
71
71
|
"cockatiel": "^3.1.1",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "cbe0459d170f27c35a7de18cec415947aedf4da5"
|
|
84
84
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-state-machine](./foundation-state-machine.md) > [AbstractMachine](./foundation-state-machine.abstractmachine.md) > [actor](./foundation-state-machine.abstractmachine.actor.md)
|
|
4
|
-
|
|
5
|
-
## AbstractMachine.actor property
|
|
6
|
-
|
|
7
|
-
Optional actor
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
actor: InterpreterFrom<StateMachine<TContext, TEvent, TAction, TActor, TInput, TResolvedTypesMeta>>;
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Remarks
|
|
16
|
-
|
|
17
|
-
Callers can decide to reuse/reference if set or create their own.
|
|
18
|
-
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-state-machine](./foundation-state-machine.md) > [AbstractMachine](./foundation-state-machine.abstractmachine.md) > [binding](./foundation-state-machine.abstractmachine.binding.md)
|
|
4
|
-
|
|
5
|
-
## AbstractMachine.binding() method
|
|
6
|
-
|
|
7
|
-
An api to allow the observation of values and arbitrary bindings outside the template engine.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
binding<TReturn = any, TParent = any>(token: ((target: this) => TReturn) | keyof this, subscriberChangeCallback?: SubscriberChangeCallback<TReturn> | undefined, isVolatileBinding?: boolean, context?: ExecutionContext): BindingObserver<this, TReturn, TParent>;
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Parameters
|
|
16
|
-
|
|
17
|
-
<table><thead><tr><th>
|
|
18
|
-
|
|
19
|
-
Parameter
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</th><th>
|
|
23
|
-
|
|
24
|
-
Type
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</th><th>
|
|
28
|
-
|
|
29
|
-
Description
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</th></tr></thead>
|
|
33
|
-
<tbody><tr><td>
|
|
34
|
-
|
|
35
|
-
token
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</td><td>
|
|
39
|
-
|
|
40
|
-
((target: this) => TReturn) \| keyof this
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</td><td>
|
|
44
|
-
|
|
45
|
-
A target lookup token which can take various forms.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</td></tr>
|
|
49
|
-
<tr><td>
|
|
50
|
-
|
|
51
|
-
subscriberChangeCallback
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
</td><td>
|
|
55
|
-
|
|
56
|
-
SubscriberChangeCallback<TReturn> \| undefined
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
</td><td>
|
|
60
|
-
|
|
61
|
-
_(Optional)_ .
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
</td></tr>
|
|
65
|
-
<tr><td>
|
|
66
|
-
|
|
67
|
-
isVolatileBinding
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
</td><td>
|
|
71
|
-
|
|
72
|
-
boolean
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
</td><td>
|
|
76
|
-
|
|
77
|
-
_(Optional)_ Indicates the binding is volatile.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
</td></tr>
|
|
81
|
-
<tr><td>
|
|
82
|
-
|
|
83
|
-
context
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
</td><td>
|
|
87
|
-
|
|
88
|
-
ExecutionContext
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
</td><td>
|
|
92
|
-
|
|
93
|
-
_(Optional)_ .
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
</td></tr>
|
|
97
|
-
</tbody></table>
|
|
98
|
-
|
|
99
|
-
**Returns:**
|
|
100
|
-
|
|
101
|
-
BindingObserver<this, TReturn, TParent>
|
|
102
|
-
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-state-machine](./foundation-state-machine.md) > [AbstractMachine](./foundation-state-machine.abstractmachine.md) > [complete](./foundation-state-machine.abstractmachine.complete.md)
|
|
4
|
-
|
|
5
|
-
## AbstractMachine.complete property
|
|
6
|
-
|
|
7
|
-
Indicates if the machine has completed the happy path.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
complete: boolean;
|
|
13
|
-
```
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-state-machine](./foundation-state-machine.md) > [AbstractMachine](./foundation-state-machine.abstractmachine.md) > [context](./foundation-state-machine.abstractmachine.context.md)
|
|
4
|
-
|
|
5
|
-
## AbstractMachine.context property
|
|
6
|
-
|
|
7
|
-
The current `context` of the machine. The data points in context may be considered transient in nature.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
context: Partial<TContext>;
|
|
13
|
-
```
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-state-machine](./foundation-state-machine.md) > [AbstractMachine](./foundation-state-machine.abstractmachine.md) > [error](./foundation-state-machine.abstractmachine.error.md)
|
|
4
|
-
|
|
5
|
-
## AbstractMachine.error property
|
|
6
|
-
|
|
7
|
-
A general machine error. Likely equal to `errors.lastError`<!-- -->.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
error: any;
|
|
13
|
-
```
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-state-machine](./foundation-state-machine.md) > [AbstractMachine](./foundation-state-machine.abstractmachine.md) > [errors](./foundation-state-machine.abstractmachine.errors.md)
|
|
4
|
-
|
|
5
|
-
## AbstractMachine.errors property
|
|
6
|
-
|
|
7
|
-
An of errors that may have occurred during the machine's workflows.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
errors: ErrorMap<ErrorDetailMap>;
|
|
13
|
-
```
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-state-machine](./foundation-state-machine.md) > [AbstractMachine](./foundation-state-machine.abstractmachine.md) > [getFromContainer](./foundation-state-machine.abstractmachine.getfromcontainer.md)
|
|
4
|
-
|
|
5
|
-
## AbstractMachine.getFromContainer() method
|
|
6
|
-
|
|
7
|
-
Gets the machine from the container.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
abstract getFromContainer(): this;
|
|
13
|
-
```
|
|
14
|
-
**Returns:**
|
|
15
|
-
|
|
16
|
-
this
|
|
17
|
-
|
|
18
|
-
## Remarks
|
|
19
|
-
|
|
20
|
-
Calling `getFromContainer` on an injected machine will return a new instance providing it was registered with the DI as `transient`<!-- -->. This is simply a convenience method, and may be useful as some machines contain 'final' states, meaning once they complete they can no longer receive events. However, if you want to continue to work with your injected machine reference, re-calling [start](./foundation-state-machine.machine.start.md) may also be a viable option.
|
|
21
|
-
|
|
22
|
-
Please note that machines are injected into other machines to form parts of complex workflows. In such cases, the parent machine will `invoke` or `spawn` the injected machine's `logic` directly to always create a new actor.
|
|
23
|
-
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-state-machine](./foundation-state-machine.md) > [AbstractMachine](./foundation-state-machine.abstractmachine.md) > [getMetaValuesByKey](./foundation-state-machine.abstractmachine.getmetavaluesbykey.md)
|
|
4
|
-
|
|
5
|
-
## AbstractMachine.getMetaValuesByKey() method
|
|
6
|
-
|
|
7
|
-
Get `meta` values by key.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
getMetaValuesByKey<T = string>(key?: string): T[];
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Parameters
|
|
16
|
-
|
|
17
|
-
<table><thead><tr><th>
|
|
18
|
-
|
|
19
|
-
Parameter
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</th><th>
|
|
23
|
-
|
|
24
|
-
Type
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</th><th>
|
|
28
|
-
|
|
29
|
-
Description
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</th></tr></thead>
|
|
33
|
-
<tbody><tr><td>
|
|
34
|
-
|
|
35
|
-
key
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</td><td>
|
|
39
|
-
|
|
40
|
-
string
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</td><td>
|
|
44
|
-
|
|
45
|
-
_(Optional)_ A key within the `meta` object. Defaults to `content`<!-- -->.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</td></tr>
|
|
49
|
-
</tbody></table>
|
|
50
|
-
|
|
51
|
-
**Returns:**
|
|
52
|
-
|
|
53
|
-
T\[\]
|
|
54
|
-
|
|
55
|
-
## Remarks
|
|
56
|
-
|
|
57
|
-
Meta is cumulative across all state nodes represented by the state value.
|
|
58
|
-
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-state-machine](./foundation-state-machine.md) > [AbstractMachine](./foundation-state-machine.abstractmachine.md) > [hasTag](./foundation-state-machine.abstractmachine.hastag.md)
|
|
4
|
-
|
|
5
|
-
## AbstractMachine.hasTag() method
|
|
6
|
-
|
|
7
|
-
Check `tags` contain provided tag.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
hasTag(tag: string): boolean;
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Parameters
|
|
16
|
-
|
|
17
|
-
<table><thead><tr><th>
|
|
18
|
-
|
|
19
|
-
Parameter
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</th><th>
|
|
23
|
-
|
|
24
|
-
Type
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</th><th>
|
|
28
|
-
|
|
29
|
-
Description
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</th></tr></thead>
|
|
33
|
-
<tbody><tr><td>
|
|
34
|
-
|
|
35
|
-
tag
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</td><td>
|
|
39
|
-
|
|
40
|
-
string
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</td><td>
|
|
44
|
-
|
|
45
|
-
A tag.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</td></tr>
|
|
49
|
-
</tbody></table>
|
|
50
|
-
|
|
51
|
-
**Returns:**
|
|
52
|
-
|
|
53
|
-
boolean
|
|
54
|
-
|
|
55
|
-
## Remarks
|
|
56
|
-
|
|
57
|
-
This differs from `matches`<!-- -->, as multiple states may use common tags such as `pending` to indicate some async work is occurring. As with `matches`<!-- -->, `hasTag` can be useful if you need to conditionally run logic or render markup.
|
|
58
|
-
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-state-machine](./foundation-state-machine.md) > [AbstractMachine](./foundation-state-machine.abstractmachine.md) > [machine](./foundation-state-machine.abstractmachine.machine.md)
|
|
4
|
-
|
|
5
|
-
## AbstractMachine.machine property
|
|
6
|
-
|
|
7
|
-
Mandatory machine property.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
machine: StateMachine<TContext, TEvent, TAction, TActor, TInput, TResolvedTypesMeta>;
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Remarks
|
|
16
|
-
|
|
17
|
-
The logic / config that goes into a machine is not accessible from the outside, and is owned by the implementing class. However, consumers of that may provide custom `implementations` in the xstate sense via the `provide()` api.
|
|
18
|
-
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-state-machine](./foundation-state-machine.md) > [AbstractMachine](./foundation-state-machine.abstractmachine.md) > [matches](./foundation-state-machine.abstractmachine.matches.md)
|
|
4
|
-
|
|
5
|
-
## AbstractMachine.matches() method
|
|
6
|
-
|
|
7
|
-
Check `state` matches provided value.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
matches(value: StateValueFrom<typeof this.machine>): boolean;
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Parameters
|
|
16
|
-
|
|
17
|
-
<table><thead><tr><th>
|
|
18
|
-
|
|
19
|
-
Parameter
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</th><th>
|
|
23
|
-
|
|
24
|
-
Type
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</th><th>
|
|
28
|
-
|
|
29
|
-
Description
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</th></tr></thead>
|
|
33
|
-
<tbody><tr><td>
|
|
34
|
-
|
|
35
|
-
value
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</td><td>
|
|
39
|
-
|
|
40
|
-
StateValueFrom<typeof [this.machine](./foundation-state-machine.abstractmachine.machine.md)<!-- -->>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</td><td>
|
|
44
|
-
|
|
45
|
-
A state value.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</td></tr>
|
|
49
|
-
</tbody></table>
|
|
50
|
-
|
|
51
|
-
**Returns:**
|
|
52
|
-
|
|
53
|
-
boolean
|
|
54
|
-
|
|
55
|
-
## Remarks
|
|
56
|
-
|
|
57
|
-
Can be useful if you need to conditionally run logic or render markup.
|
|
58
|
-
|