scjson 0.1.8 → 0.2.1
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 +93 -0
- package/browser.mjs +1 -1
- package/package.json +9 -1
- package/scjson.schema.json +0 -1
- package/scjsonProps.ts +721 -0
- package/types/scjsonProps.d.ts +528 -0
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
This directory contains the JavaScript implementation of **scjson**, a format for representing SCXML state machines in JSON. The package provides a command line interface to convert between `.scxml` and `.scjson` files and to validate documents against the project's schema.
|
|
4
4
|
|
|
5
|
+
The package includes typescript types for the functions and default functions to return each.
|
|
6
|
+
|
|
5
7
|
## Installation
|
|
6
8
|
|
|
7
9
|
```bash
|
|
@@ -14,6 +16,18 @@ You can also install from a checkout of this repository:
|
|
|
14
16
|
cd js && npm install
|
|
15
17
|
```
|
|
16
18
|
|
|
19
|
+
## Source Code - Multi-Language Support
|
|
20
|
+
[https://github.com/SoftOboros/scjson/]
|
|
21
|
+
- csharp
|
|
22
|
+
- go
|
|
23
|
+
- java
|
|
24
|
+
- javascript / typescript
|
|
25
|
+
- lua
|
|
26
|
+
- python
|
|
27
|
+
- ruby
|
|
28
|
+
- rust
|
|
29
|
+
- swift
|
|
30
|
+
|
|
17
31
|
## Command Line Usage
|
|
18
32
|
|
|
19
33
|
After installation the `scjson` command is available:
|
|
@@ -29,6 +43,85 @@ scjson xml path/to/machine.scjson
|
|
|
29
43
|
scjson validate path/to/dir -r
|
|
30
44
|
```
|
|
31
45
|
|
|
46
|
+
## Conversion Functions
|
|
47
|
+
```js
|
|
48
|
+
/**
|
|
49
|
+
* xmlToJson
|
|
50
|
+
* Convert an SCXML string to scjson.
|
|
51
|
+
*
|
|
52
|
+
* @param {string} xmlStr - XML input.
|
|
53
|
+
* @param {boolean} [omitEmpty=true] - Remove empty values when true.
|
|
54
|
+
* @returns {string} JSON representation.
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* jsonToXml
|
|
59
|
+
* Convert a scjson string to SCXML.
|
|
60
|
+
*
|
|
61
|
+
* @param {string} jsonStr - JSON input.
|
|
62
|
+
* @returns {string} XML output.
|
|
63
|
+
*/
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Common JS Translate Usage
|
|
67
|
+
```js
|
|
68
|
+
const { xmlToJson, jsonToXml } = require('scjson');
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## ESR translate usage
|
|
73
|
+
```js
|
|
74
|
+
import { xmlToJson, jsonToXml }from "scjson/browser"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Axios Endpoint Example
|
|
78
|
+
```typescript
|
|
79
|
+
import axios from "axios"
|
|
80
|
+
import * as scjson from "scjson/props"
|
|
81
|
+
|
|
82
|
+
// A function to creat a new doc with three states and transitions.
|
|
83
|
+
const newScxml = (): scjson.ScxmlProps => {
|
|
84
|
+
const doc: scjson.ScxmlProps = scjson.defaultScxml();
|
|
85
|
+
let state: scjson.StateProps = scjson.defaultState();
|
|
86
|
+
let transition: scjson.TransitionProps = scjson.defaultTransition();
|
|
87
|
+
doc.name = 'New State Machine';
|
|
88
|
+
doc.exmode = scjson.ExmodeDatatypeProps.Lax;
|
|
89
|
+
doc.binding = scjson.BindingDatatypeProps.Early;
|
|
90
|
+
doc.initial.push('Start');
|
|
91
|
+
state.id = 'Start';
|
|
92
|
+
transition.target.push('Process');
|
|
93
|
+
state.transition.push(transition);
|
|
94
|
+
doc.state.push(state);
|
|
95
|
+
state = scjson.defaultState();
|
|
96
|
+
state.id = 'Process';
|
|
97
|
+
transition = scjson.defaultTransition();
|
|
98
|
+
transition.target.push('End');
|
|
99
|
+
state.transition.push(transition);
|
|
100
|
+
doc.state.push(state);
|
|
101
|
+
state = scjson.defaultState();
|
|
102
|
+
state.id = 'End';
|
|
103
|
+
transition = scjson.defaultTransition();
|
|
104
|
+
transition.target.push('Start');
|
|
105
|
+
state.transition.push(transition);
|
|
106
|
+
doc.state.push(state);
|
|
107
|
+
return doc;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Create Axios instance
|
|
111
|
+
const ax = axios.create({
|
|
112
|
+
baseURL: "https://api.example.com/scxml",
|
|
113
|
+
headers: { "Content-Type": "application/json" },
|
|
114
|
+
withCredentials: true,
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
// Export a function to send the doc
|
|
118
|
+
export const sendNewScxml = () => {
|
|
119
|
+
const doc = newScxml();
|
|
120
|
+
ax.post('/newDoc', doc);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
|
|
32
125
|
### Other Resources
|
|
33
126
|
github: [https://github.com/SoftOboros/scjson]
|
|
34
127
|
```bash
|
package/browser.mjs
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { XMLParser, XMLBuilder } from 'fast-xml-parser';
|
|
14
14
|
import Ajv from 'ajv';
|
|
15
|
-
import schema from './scjson.schema.json'
|
|
15
|
+
import schema from './scjson.schema.json';
|
|
16
16
|
|
|
17
17
|
const ajv = new Ajv({ useDefaults: true, strict: false });
|
|
18
18
|
const validate = ajv.compile(schema);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scjson",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "A JSON-based serialization of SCXML (State Chart XML) for modern tooling, interoperability, and education.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"scjson",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"type": "commonjs",
|
|
32
32
|
"exports": {
|
|
33
33
|
".": "./index.js",
|
|
34
|
+
"./props": "./scjsonProps.ts",
|
|
34
35
|
"./browser": {
|
|
35
36
|
"import": "./browser.mjs",
|
|
36
37
|
"require": "./browser.cjs"
|
|
@@ -40,15 +41,22 @@
|
|
|
40
41
|
"*": {
|
|
41
42
|
"browser": [
|
|
42
43
|
"/types/scjson-browser.d.ts"
|
|
44
|
+
],
|
|
45
|
+
"props": [
|
|
46
|
+
"/types/scjsonProps.d.ts"
|
|
43
47
|
]
|
|
48
|
+
|
|
44
49
|
}
|
|
45
50
|
},
|
|
51
|
+
"types": "types/*",
|
|
46
52
|
"files": [
|
|
47
53
|
"bin/",
|
|
48
54
|
"index.js",
|
|
49
55
|
"browser.mjs",
|
|
50
56
|
"browser.cjs",
|
|
57
|
+
"scjsonProps.ts",
|
|
51
58
|
"types/scjson-browser.d.ts",
|
|
59
|
+
"types/scjsonProps.d.ts",
|
|
52
60
|
"tests/",
|
|
53
61
|
"scjson.schema.json",
|
|
54
62
|
"README.md",
|
package/scjson.schema.json
CHANGED
package/scjsonProps.ts
ADDED
|
@@ -0,0 +1,721 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* scjsonProps.ts : Properties runtime file for scjson types
|
|
3
|
+
*
|
|
4
|
+
* Part of the scjson project.
|
|
5
|
+
* Developed by Softoboros Technology Inc.
|
|
6
|
+
* Licensed under the BSD 1-Clause License.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export interface AssignProps {
|
|
10
|
+
location: string;
|
|
11
|
+
expr: string | null;
|
|
12
|
+
typeValue: AssignTypeDatatypeProps;
|
|
13
|
+
attr: string | null;
|
|
14
|
+
otherAttributes: Record<string, object>;
|
|
15
|
+
content: Record<string, object>[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const defaultAssign = (): AssignProps => ({
|
|
19
|
+
location: "",
|
|
20
|
+
expr: null,
|
|
21
|
+
typeValue: AssignTypeDatatypeProps.Replacechildren,
|
|
22
|
+
attr: null,
|
|
23
|
+
otherAttributes: {},
|
|
24
|
+
content: [],
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export type AssignArray = AssignProps[];
|
|
28
|
+
|
|
29
|
+
export const AssignTypeDatatypeProps = {
|
|
30
|
+
Addattribute: "addattribute",
|
|
31
|
+
Delete: "delete",
|
|
32
|
+
Firstchild: "firstchild",
|
|
33
|
+
Lastchild: "lastchild",
|
|
34
|
+
Nextsibling: "nextsibling",
|
|
35
|
+
Previoussibling: "previoussibling",
|
|
36
|
+
Replace: "replace",
|
|
37
|
+
Replacechildren: "replacechildren",
|
|
38
|
+
} as const;
|
|
39
|
+
|
|
40
|
+
export type AssignTypeDatatypeProps = typeof AssignTypeDatatypeProps[keyof typeof AssignTypeDatatypeProps];
|
|
41
|
+
|
|
42
|
+
export const BindingDatatypeProps = {
|
|
43
|
+
Early: "early",
|
|
44
|
+
Late: "late",
|
|
45
|
+
} as const;
|
|
46
|
+
|
|
47
|
+
export type BindingDatatypeProps = typeof BindingDatatypeProps[keyof typeof BindingDatatypeProps];
|
|
48
|
+
|
|
49
|
+
export const BooleanDatatypeProps = {
|
|
50
|
+
False: "false",
|
|
51
|
+
True: "true",
|
|
52
|
+
} as const;
|
|
53
|
+
|
|
54
|
+
export type BooleanDatatypeProps = typeof BooleanDatatypeProps[keyof typeof BooleanDatatypeProps];
|
|
55
|
+
|
|
56
|
+
export interface CancelProps {
|
|
57
|
+
otherElement: Record<string, object>[];
|
|
58
|
+
sendid: string | null;
|
|
59
|
+
sendidexpr: string | null;
|
|
60
|
+
otherAttributes: Record<string, object>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export const defaultCancel = (): CancelProps => ({
|
|
64
|
+
otherElement: [],
|
|
65
|
+
sendid: null,
|
|
66
|
+
sendidexpr: null,
|
|
67
|
+
otherAttributes: {},
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
export type CancelArray = CancelProps[];
|
|
71
|
+
|
|
72
|
+
export interface ContentProps {
|
|
73
|
+
otherAttributes: Record<string, object>;
|
|
74
|
+
expr: string | null;
|
|
75
|
+
content: Record<string, object>[];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export const defaultContent = (): ContentProps => ({
|
|
79
|
+
otherAttributes: {},
|
|
80
|
+
expr: null,
|
|
81
|
+
content: [],
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
export type ContentArray = ContentProps[];
|
|
85
|
+
|
|
86
|
+
export interface DataProps {
|
|
87
|
+
id: string;
|
|
88
|
+
src: string | null;
|
|
89
|
+
expr: string | null;
|
|
90
|
+
otherAttributes: Record<string, object>;
|
|
91
|
+
content: Record<string, object>[];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export const defaultData = (): DataProps => ({
|
|
95
|
+
id: "",
|
|
96
|
+
src: null,
|
|
97
|
+
expr: null,
|
|
98
|
+
otherAttributes: {},
|
|
99
|
+
content: [],
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
export type DataArray = DataProps[];
|
|
103
|
+
|
|
104
|
+
export interface DatamodelProps {
|
|
105
|
+
data: DataProps[];
|
|
106
|
+
otherElement: Record<string, object>[];
|
|
107
|
+
otherAttributes: Record<string, object>;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export const defaultDatamodel = (): DatamodelProps => ({
|
|
111
|
+
data: [],
|
|
112
|
+
otherElement: [],
|
|
113
|
+
otherAttributes: {},
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
export type DatamodelArray = DatamodelProps[];
|
|
117
|
+
|
|
118
|
+
export interface DonedataProps {
|
|
119
|
+
content: ContentProps | null;
|
|
120
|
+
param: ParamProps[];
|
|
121
|
+
otherAttributes: Record<string, object>;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export const defaultDonedata = (): DonedataProps => ({
|
|
125
|
+
content: null,
|
|
126
|
+
param: [],
|
|
127
|
+
otherAttributes: {},
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
export type DonedataArray = DonedataProps[];
|
|
131
|
+
|
|
132
|
+
export interface ElseProps {
|
|
133
|
+
otherAttributes: Record<string, object>;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export const defaultElse = (): ElseProps => ({
|
|
137
|
+
otherAttributes: {},
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
export interface ElseifProps {
|
|
141
|
+
cond: string;
|
|
142
|
+
otherAttributes: Record<string, object>;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export const defaultElseif = (): ElseifProps => ({
|
|
146
|
+
cond: "",
|
|
147
|
+
otherAttributes: {},
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
export const ExmodeDatatypeProps = {
|
|
151
|
+
Lax: "lax",
|
|
152
|
+
Strict: "strict",
|
|
153
|
+
} as const;
|
|
154
|
+
|
|
155
|
+
export type ExmodeDatatypeProps = typeof ExmodeDatatypeProps[keyof typeof ExmodeDatatypeProps];
|
|
156
|
+
|
|
157
|
+
export interface FinalProps {
|
|
158
|
+
onentry: OnentryProps[];
|
|
159
|
+
onexit: OnexitProps[];
|
|
160
|
+
donedata: DonedataProps[];
|
|
161
|
+
otherElement: Record<string, object>[];
|
|
162
|
+
id: string | null;
|
|
163
|
+
otherAttributes: Record<string, object>;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export const defaultFinal = (): FinalProps => ({
|
|
167
|
+
onentry: [],
|
|
168
|
+
onexit: [],
|
|
169
|
+
donedata: [],
|
|
170
|
+
otherElement: [],
|
|
171
|
+
id: null,
|
|
172
|
+
otherAttributes: {},
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
export type FinalArray = FinalProps[];
|
|
176
|
+
|
|
177
|
+
export interface FinalizeProps {
|
|
178
|
+
otherElement: Record<string, object>[];
|
|
179
|
+
raiseValue: RaiseProps[];
|
|
180
|
+
ifValue: IfProps[];
|
|
181
|
+
foreach: ForeachProps[];
|
|
182
|
+
send: SendProps[];
|
|
183
|
+
script: ScriptProps[];
|
|
184
|
+
assign: AssignProps[];
|
|
185
|
+
log: LogProps[];
|
|
186
|
+
cancel: CancelProps[];
|
|
187
|
+
otherAttributes: Record<string, object>;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export const defaultFinalize = (): FinalizeProps => ({
|
|
191
|
+
otherElement: [],
|
|
192
|
+
raiseValue: [],
|
|
193
|
+
ifValue: [],
|
|
194
|
+
foreach: [],
|
|
195
|
+
send: [],
|
|
196
|
+
script: [],
|
|
197
|
+
assign: [],
|
|
198
|
+
log: [],
|
|
199
|
+
cancel: [],
|
|
200
|
+
otherAttributes: {},
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
export type FinalizeArray = FinalizeProps[];
|
|
204
|
+
|
|
205
|
+
export interface ForeachProps {
|
|
206
|
+
otherElement: Record<string, object>[];
|
|
207
|
+
raiseValue: RaiseProps[];
|
|
208
|
+
ifValue: IfProps[];
|
|
209
|
+
foreach: ForeachProps[];
|
|
210
|
+
send: SendProps[];
|
|
211
|
+
script: ScriptProps[];
|
|
212
|
+
assign: AssignProps[];
|
|
213
|
+
log: LogProps[];
|
|
214
|
+
cancel: CancelProps[];
|
|
215
|
+
array: string;
|
|
216
|
+
item: string;
|
|
217
|
+
index: string | null;
|
|
218
|
+
otherAttributes: Record<string, object>;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export const defaultForeach = (): ForeachProps => ({
|
|
222
|
+
otherElement: [],
|
|
223
|
+
raiseValue: [],
|
|
224
|
+
ifValue: [],
|
|
225
|
+
foreach: [],
|
|
226
|
+
send: [],
|
|
227
|
+
script: [],
|
|
228
|
+
assign: [],
|
|
229
|
+
log: [],
|
|
230
|
+
cancel: [],
|
|
231
|
+
array: "",
|
|
232
|
+
item: "",
|
|
233
|
+
index: null,
|
|
234
|
+
otherAttributes: {},
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
export type ForeachArray = ForeachProps[];
|
|
238
|
+
|
|
239
|
+
export interface HistoryProps {
|
|
240
|
+
otherElement: Record<string, object>[];
|
|
241
|
+
transition: TransitionProps;
|
|
242
|
+
id: string | null;
|
|
243
|
+
typeValue: HistoryTypeDatatypeProps | null;
|
|
244
|
+
otherAttributes: Record<string, object>;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export const defaultHistory = (): HistoryProps => ({
|
|
248
|
+
otherElement: [],
|
|
249
|
+
transition: defaultTransition(),
|
|
250
|
+
id: null,
|
|
251
|
+
typeValue: null,
|
|
252
|
+
otherAttributes: {},
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
export type HistoryArray = HistoryProps[];
|
|
256
|
+
|
|
257
|
+
export const HistoryTypeDatatypeProps = {
|
|
258
|
+
Deep: "deep",
|
|
259
|
+
Shallow: "shallow",
|
|
260
|
+
} as const;
|
|
261
|
+
|
|
262
|
+
export type HistoryTypeDatatypeProps = typeof HistoryTypeDatatypeProps[keyof typeof HistoryTypeDatatypeProps];
|
|
263
|
+
|
|
264
|
+
export interface IfProps {
|
|
265
|
+
otherElement: Record<string, object>[];
|
|
266
|
+
raiseValue: RaiseProps[];
|
|
267
|
+
ifValue: IfProps[];
|
|
268
|
+
foreach: ForeachProps[];
|
|
269
|
+
send: SendProps[];
|
|
270
|
+
script: ScriptProps[];
|
|
271
|
+
assign: AssignProps[];
|
|
272
|
+
log: LogProps[];
|
|
273
|
+
cancel: CancelProps[];
|
|
274
|
+
elseif: ElseifProps | null;
|
|
275
|
+
elseValue: ElseProps | null;
|
|
276
|
+
cond: string;
|
|
277
|
+
otherAttributes: Record<string, object>;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export const defaultIf = (): IfProps => ({
|
|
281
|
+
otherElement: [],
|
|
282
|
+
raiseValue: [],
|
|
283
|
+
ifValue: [],
|
|
284
|
+
foreach: [],
|
|
285
|
+
send: [],
|
|
286
|
+
script: [],
|
|
287
|
+
assign: [],
|
|
288
|
+
log: [],
|
|
289
|
+
cancel: [],
|
|
290
|
+
elseif: null,
|
|
291
|
+
elseValue: null,
|
|
292
|
+
cond: "",
|
|
293
|
+
otherAttributes: {},
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
export type IfArray = IfProps[];
|
|
297
|
+
|
|
298
|
+
export interface InitialProps {
|
|
299
|
+
otherElement: Record<string, object>[];
|
|
300
|
+
transition: TransitionProps;
|
|
301
|
+
otherAttributes: Record<string, object>;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export const defaultInitial = (): InitialProps => ({
|
|
305
|
+
otherElement: [],
|
|
306
|
+
transition: defaultTransition(),
|
|
307
|
+
otherAttributes: {},
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
export type InitialArray = InitialProps[];
|
|
311
|
+
|
|
312
|
+
export interface InvokeProps {
|
|
313
|
+
content: ContentProps[];
|
|
314
|
+
param: ParamProps[];
|
|
315
|
+
finalize: FinalizeProps[];
|
|
316
|
+
otherElement: Record<string, object>[];
|
|
317
|
+
typeValue: string;
|
|
318
|
+
typeexpr: string | null;
|
|
319
|
+
src: string | null;
|
|
320
|
+
srcexpr: string | null;
|
|
321
|
+
id: string | null;
|
|
322
|
+
idlocation: string | null;
|
|
323
|
+
namelist: string | null;
|
|
324
|
+
autoforward: BooleanDatatypeProps;
|
|
325
|
+
otherAttributes: Record<string, object>;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export const defaultInvoke = (): InvokeProps => ({
|
|
329
|
+
content: [],
|
|
330
|
+
param: [],
|
|
331
|
+
finalize: [],
|
|
332
|
+
otherElement: [],
|
|
333
|
+
typeValue: "scxml",
|
|
334
|
+
typeexpr: null,
|
|
335
|
+
src: null,
|
|
336
|
+
srcexpr: null,
|
|
337
|
+
id: null,
|
|
338
|
+
idlocation: null,
|
|
339
|
+
namelist: null,
|
|
340
|
+
autoforward: BooleanDatatypeProps.False,
|
|
341
|
+
otherAttributes: {},
|
|
342
|
+
});
|
|
343
|
+
|
|
344
|
+
export type InvokeArray = InvokeProps[];
|
|
345
|
+
|
|
346
|
+
export interface LogProps {
|
|
347
|
+
otherElement: Record<string, object>[];
|
|
348
|
+
label: string | null;
|
|
349
|
+
expr: string | null;
|
|
350
|
+
otherAttributes: Record<string, object>;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export const defaultLog = (): LogProps => ({
|
|
354
|
+
otherElement: [],
|
|
355
|
+
label: null,
|
|
356
|
+
expr: null,
|
|
357
|
+
otherAttributes: {},
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
export type LogArray = LogProps[];
|
|
361
|
+
|
|
362
|
+
export interface OnentryProps {
|
|
363
|
+
otherElement: Record<string, object>[];
|
|
364
|
+
raiseValue: RaiseProps[];
|
|
365
|
+
ifValue: IfProps[];
|
|
366
|
+
foreach: ForeachProps[];
|
|
367
|
+
send: SendProps[];
|
|
368
|
+
script: ScriptProps[];
|
|
369
|
+
assign: AssignProps[];
|
|
370
|
+
log: LogProps[];
|
|
371
|
+
cancel: CancelProps[];
|
|
372
|
+
otherAttributes: Record<string, object>;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export const defaultOnentry = (): OnentryProps => ({
|
|
376
|
+
otherElement: [],
|
|
377
|
+
raiseValue: [],
|
|
378
|
+
ifValue: [],
|
|
379
|
+
foreach: [],
|
|
380
|
+
send: [],
|
|
381
|
+
script: [],
|
|
382
|
+
assign: [],
|
|
383
|
+
log: [],
|
|
384
|
+
cancel: [],
|
|
385
|
+
otherAttributes: {},
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
export type OnentryArray = OnentryProps[];
|
|
389
|
+
|
|
390
|
+
export interface OnexitProps {
|
|
391
|
+
otherElement: Record<string, object>[];
|
|
392
|
+
raiseValue: RaiseProps[];
|
|
393
|
+
ifValue: IfProps[];
|
|
394
|
+
foreach: ForeachProps[];
|
|
395
|
+
send: SendProps[];
|
|
396
|
+
script: ScriptProps[];
|
|
397
|
+
assign: AssignProps[];
|
|
398
|
+
log: LogProps[];
|
|
399
|
+
cancel: CancelProps[];
|
|
400
|
+
otherAttributes: Record<string, object>;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
export const defaultOnexit = (): OnexitProps => ({
|
|
404
|
+
otherElement: [],
|
|
405
|
+
raiseValue: [],
|
|
406
|
+
ifValue: [],
|
|
407
|
+
foreach: [],
|
|
408
|
+
send: [],
|
|
409
|
+
script: [],
|
|
410
|
+
assign: [],
|
|
411
|
+
log: [],
|
|
412
|
+
cancel: [],
|
|
413
|
+
otherAttributes: {},
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
export type OnexitArray = OnexitProps[];
|
|
417
|
+
|
|
418
|
+
export interface ParallelProps {
|
|
419
|
+
onentry: OnentryProps[];
|
|
420
|
+
onexit: OnexitProps[];
|
|
421
|
+
transition: TransitionProps[];
|
|
422
|
+
state: StateProps[];
|
|
423
|
+
parallel: ParallelProps[];
|
|
424
|
+
history: HistoryProps[];
|
|
425
|
+
datamodel: DatamodelProps[];
|
|
426
|
+
invoke: InvokeProps[];
|
|
427
|
+
otherElement: Record<string, object>[];
|
|
428
|
+
id: string | null;
|
|
429
|
+
otherAttributes: Record<string, object>;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
export const defaultParallel = (): ParallelProps => ({
|
|
433
|
+
onentry: [],
|
|
434
|
+
onexit: [],
|
|
435
|
+
transition: [],
|
|
436
|
+
state: [],
|
|
437
|
+
parallel: [],
|
|
438
|
+
history: [],
|
|
439
|
+
datamodel: [],
|
|
440
|
+
invoke: [],
|
|
441
|
+
otherElement: [],
|
|
442
|
+
id: null,
|
|
443
|
+
otherAttributes: {},
|
|
444
|
+
});
|
|
445
|
+
|
|
446
|
+
export type ParallelArray = ParallelProps[];
|
|
447
|
+
|
|
448
|
+
export interface ParamProps {
|
|
449
|
+
otherElement: Record<string, object>[];
|
|
450
|
+
name: string;
|
|
451
|
+
expr: string | null;
|
|
452
|
+
location: string | null;
|
|
453
|
+
otherAttributes: Record<string, object>;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
export const defaultParam = (): ParamProps => ({
|
|
457
|
+
otherElement: [],
|
|
458
|
+
name: "",
|
|
459
|
+
expr: null,
|
|
460
|
+
location: null,
|
|
461
|
+
otherAttributes: {},
|
|
462
|
+
});
|
|
463
|
+
|
|
464
|
+
export type ParamArray = ParamProps[];
|
|
465
|
+
|
|
466
|
+
export interface RaiseProps {
|
|
467
|
+
event: string;
|
|
468
|
+
otherAttributes: Record<string, object>;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
export const defaultRaise = (): RaiseProps => ({
|
|
472
|
+
event: "",
|
|
473
|
+
otherAttributes: {},
|
|
474
|
+
});
|
|
475
|
+
|
|
476
|
+
export type RaiseArray = RaiseProps[];
|
|
477
|
+
|
|
478
|
+
export interface ScriptProps {
|
|
479
|
+
src: string | null;
|
|
480
|
+
otherAttributes: Record<string, object>;
|
|
481
|
+
content: Record<string, object>[];
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
export const defaultScript = (): ScriptProps => ({
|
|
485
|
+
src: null,
|
|
486
|
+
otherAttributes: {},
|
|
487
|
+
content: [],
|
|
488
|
+
});
|
|
489
|
+
|
|
490
|
+
export type ScriptArray = ScriptProps[];
|
|
491
|
+
|
|
492
|
+
export interface ScxmlProps {
|
|
493
|
+
state: StateProps[];
|
|
494
|
+
parallel: ParallelProps[];
|
|
495
|
+
final: FinalProps[];
|
|
496
|
+
datamodel: DatamodelProps[];
|
|
497
|
+
script: ScriptProps[];
|
|
498
|
+
otherElement: Record<string, object>[];
|
|
499
|
+
initial: string[];
|
|
500
|
+
name: string | null;
|
|
501
|
+
version: number | string;
|
|
502
|
+
datamodelAttribute: string;
|
|
503
|
+
binding: BindingDatatypeProps | null;
|
|
504
|
+
exmode: ExmodeDatatypeProps | null;
|
|
505
|
+
otherAttributes: Record<string, object>;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
export const defaultScxml = (): ScxmlProps => ({
|
|
509
|
+
state: [],
|
|
510
|
+
parallel: [],
|
|
511
|
+
final: [],
|
|
512
|
+
datamodel: [],
|
|
513
|
+
script: [],
|
|
514
|
+
otherElement: [],
|
|
515
|
+
initial: [],
|
|
516
|
+
name: null,
|
|
517
|
+
version: 1.0,
|
|
518
|
+
datamodelAttribute: "null",
|
|
519
|
+
binding: null,
|
|
520
|
+
exmode: null,
|
|
521
|
+
otherAttributes: {},
|
|
522
|
+
});
|
|
523
|
+
|
|
524
|
+
export interface SendProps {
|
|
525
|
+
content: ContentProps[];
|
|
526
|
+
param: ParamProps[];
|
|
527
|
+
otherElement: Record<string, object>[];
|
|
528
|
+
event: string | null;
|
|
529
|
+
eventexpr: string | null;
|
|
530
|
+
target: string | null;
|
|
531
|
+
targetexpr: string | null;
|
|
532
|
+
typeValue: string;
|
|
533
|
+
typeexpr: string | null;
|
|
534
|
+
id: string | null;
|
|
535
|
+
idlocation: string | null;
|
|
536
|
+
delay: string;
|
|
537
|
+
delayexpr: string | null;
|
|
538
|
+
namelist: string | null;
|
|
539
|
+
otherAttributes: Record<string, object>;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
export const defaultSend = (): SendProps => ({
|
|
543
|
+
content: [],
|
|
544
|
+
param: [],
|
|
545
|
+
otherElement: [],
|
|
546
|
+
event: null,
|
|
547
|
+
eventexpr: null,
|
|
548
|
+
target: null,
|
|
549
|
+
targetexpr: null,
|
|
550
|
+
typeValue: "scxml",
|
|
551
|
+
typeexpr: null,
|
|
552
|
+
id: null,
|
|
553
|
+
idlocation: null,
|
|
554
|
+
delay: "0s",
|
|
555
|
+
delayexpr: null,
|
|
556
|
+
namelist: null,
|
|
557
|
+
otherAttributes: {},
|
|
558
|
+
});
|
|
559
|
+
|
|
560
|
+
export type SendArray = SendProps[];
|
|
561
|
+
|
|
562
|
+
export interface StateProps {
|
|
563
|
+
onentry: OnentryProps[];
|
|
564
|
+
onexit: OnexitProps[];
|
|
565
|
+
transition: TransitionProps[];
|
|
566
|
+
initial: InitialProps[];
|
|
567
|
+
state: StateProps[];
|
|
568
|
+
parallel: ParallelProps[];
|
|
569
|
+
final: FinalProps[];
|
|
570
|
+
history: HistoryProps[];
|
|
571
|
+
datamodel: DatamodelProps[];
|
|
572
|
+
invoke: InvokeProps[];
|
|
573
|
+
otherElement: Record<string, object>[];
|
|
574
|
+
id: string | null;
|
|
575
|
+
initialAttribute: string[];
|
|
576
|
+
otherAttributes: Record<string, object>;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
export const defaultState = (): StateProps => ({
|
|
580
|
+
onentry: [],
|
|
581
|
+
onexit: [],
|
|
582
|
+
transition: [],
|
|
583
|
+
initial: [],
|
|
584
|
+
state: [],
|
|
585
|
+
parallel: [],
|
|
586
|
+
final: [],
|
|
587
|
+
history: [],
|
|
588
|
+
datamodel: [],
|
|
589
|
+
invoke: [],
|
|
590
|
+
otherElement: [],
|
|
591
|
+
id: null,
|
|
592
|
+
initialAttribute: [],
|
|
593
|
+
otherAttributes: {},
|
|
594
|
+
});
|
|
595
|
+
|
|
596
|
+
export type StateArray = StateProps[];
|
|
597
|
+
|
|
598
|
+
export interface TransitionProps {
|
|
599
|
+
otherElement: Record<string, object>[];
|
|
600
|
+
raiseValue: RaiseProps[];
|
|
601
|
+
ifValue: IfProps[];
|
|
602
|
+
foreach: ForeachProps[];
|
|
603
|
+
send: SendProps[];
|
|
604
|
+
script: ScriptProps[];
|
|
605
|
+
assign: AssignProps[];
|
|
606
|
+
log: LogProps[];
|
|
607
|
+
cancel: CancelProps[];
|
|
608
|
+
event: string | null;
|
|
609
|
+
cond: string | null;
|
|
610
|
+
target: string[];
|
|
611
|
+
typeValue: TransitionTypeDatatypeProps | null;
|
|
612
|
+
otherAttributes: Record<string, object>;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
export const defaultTransition = (): TransitionProps => ({
|
|
616
|
+
otherElement: [],
|
|
617
|
+
raiseValue: [],
|
|
618
|
+
ifValue: [],
|
|
619
|
+
foreach: [],
|
|
620
|
+
send: [],
|
|
621
|
+
script: [],
|
|
622
|
+
assign: [],
|
|
623
|
+
log: [],
|
|
624
|
+
cancel: [],
|
|
625
|
+
event: null,
|
|
626
|
+
cond: null,
|
|
627
|
+
target: [],
|
|
628
|
+
typeValue: null,
|
|
629
|
+
otherAttributes: {},
|
|
630
|
+
});
|
|
631
|
+
|
|
632
|
+
export type TransitionArray = TransitionProps[];
|
|
633
|
+
|
|
634
|
+
export const TransitionTypeDatatypeProps = {
|
|
635
|
+
External: "external",
|
|
636
|
+
Internal: "internal",
|
|
637
|
+
} as const;
|
|
638
|
+
|
|
639
|
+
export type TransitionTypeDatatypeProps = typeof TransitionTypeDatatypeProps[keyof typeof TransitionTypeDatatypeProps];
|
|
640
|
+
|
|
641
|
+
export type Kind = "number" | "string" | "record<string, object>" | "number[]" | "string[]"
|
|
642
|
+
| "record<string, object>[]" | "assign" | "assigntypedatatype" | "bindingdatatype" | "booleandatatype"
|
|
643
|
+
| "cancel" | "content" | "data" | "datamodel" | "donedata" | "else" | "elseif"
|
|
644
|
+
| "exmodedatatype" | "final" | "finalize" | "foreach" | "history" | "historytypedatatype" | "if"
|
|
645
|
+
| "initial" | "invoke" | "log" | "onentry" | "onexit" | "parallel" | "param" | "raise"
|
|
646
|
+
| "script" | "scxml" | "send" | "state" | "transition" | "transitiontypedatatype"
|
|
647
|
+
| "assignarray" | "cancelarray" | "contentarray" | "dataarray" | "datamodelarray"
|
|
648
|
+
| "donedataarray" | "finalarray" | "finalizearray" | "foreacharray" | "historyarray" | "ifarray"
|
|
649
|
+
| "initialarray" | "invokearray" | "logarray" | "onentryarray" | "onexitarray" | "parallelarray"
|
|
650
|
+
| "paramarray" | "raisearray" | "scriptarray" | "sendarray" | "statearray" | "transitionarray";
|
|
651
|
+
|
|
652
|
+
export type PropsUnion = null | string | number | Record<string, object> | string[] | number[]
|
|
653
|
+
| Record<string, object>[] | AssignProps | AssignTypeDatatypeProps | BindingDatatypeProps
|
|
654
|
+
| BooleanDatatypeProps | CancelProps | ContentProps | DataProps | DatamodelProps | DonedataProps
|
|
655
|
+
| ElseProps | ElseifProps | ExmodeDatatypeProps | FinalProps | FinalizeProps | ForeachProps
|
|
656
|
+
| HistoryProps | HistoryTypeDatatypeProps | IfProps | InitialProps | InvokeProps | LogProps
|
|
657
|
+
| OnentryProps | OnexitProps | ParallelProps | ParamProps | RaiseProps | ScriptProps
|
|
658
|
+
| ScxmlProps | SendProps | StateProps | TransitionProps | TransitionTypeDatatypeProps
|
|
659
|
+
| AssignArray | CancelArray | ContentArray | DataArray | DatamodelArray | DonedataArray
|
|
660
|
+
| FinalArray | FinalizeArray | ForeachArray | HistoryArray | IfArray | InitialArray
|
|
661
|
+
| InvokeArray | LogArray | OnentryArray | OnexitArray | ParallelArray | ParamArray
|
|
662
|
+
| RaiseArray | ScriptArray | SendArray | StateArray | TransitionArray;
|
|
663
|
+
|
|
664
|
+
export type KindMap = {
|
|
665
|
+
assign: AssignProps
|
|
666
|
+
assignarray: AssignArray
|
|
667
|
+
assigntypedatatype: AssignTypeDatatypeProps
|
|
668
|
+
bindingdatatype: BindingDatatypeProps
|
|
669
|
+
booleandatatype: BooleanDatatypeProps
|
|
670
|
+
cancel: CancelProps
|
|
671
|
+
cancelarray: CancelArray
|
|
672
|
+
content: ContentProps
|
|
673
|
+
contentarray: ContentArray
|
|
674
|
+
data: DataProps
|
|
675
|
+
dataarray: DataArray
|
|
676
|
+
datamodel: DatamodelProps
|
|
677
|
+
datamodelarray: DatamodelArray
|
|
678
|
+
donedata: DonedataProps
|
|
679
|
+
donedataarray: DonedataArray
|
|
680
|
+
else: ElseProps
|
|
681
|
+
elseif: ElseifProps
|
|
682
|
+
exmodedatatype: ExmodeDatatypeProps
|
|
683
|
+
final: FinalProps
|
|
684
|
+
finalarray: FinalArray
|
|
685
|
+
finalize: FinalizeProps
|
|
686
|
+
finalizearray: FinalizeArray
|
|
687
|
+
foreach: ForeachProps
|
|
688
|
+
foreacharray: ForeachArray
|
|
689
|
+
history: HistoryProps
|
|
690
|
+
historyarray: HistoryArray
|
|
691
|
+
historytypedatatype: HistoryTypeDatatypeProps
|
|
692
|
+
if: IfProps
|
|
693
|
+
ifarray: IfArray
|
|
694
|
+
initial: InitialProps
|
|
695
|
+
initialarray: InitialArray
|
|
696
|
+
invoke: InvokeProps
|
|
697
|
+
invokearray: InvokeArray
|
|
698
|
+
log: LogProps
|
|
699
|
+
logarray: LogArray
|
|
700
|
+
onentry: OnentryProps
|
|
701
|
+
onentryarray: OnentryArray
|
|
702
|
+
onexit: OnexitProps
|
|
703
|
+
onexitarray: OnexitArray
|
|
704
|
+
parallel: ParallelProps
|
|
705
|
+
parallelarray: ParallelArray
|
|
706
|
+
param: ParamProps
|
|
707
|
+
paramarray: ParamArray
|
|
708
|
+
raise: RaiseProps
|
|
709
|
+
raisearray: RaiseArray
|
|
710
|
+
script: ScriptProps
|
|
711
|
+
scriptarray: ScriptArray
|
|
712
|
+
scxml: ScxmlProps
|
|
713
|
+
send: SendProps
|
|
714
|
+
sendarray: SendArray
|
|
715
|
+
state: StateProps
|
|
716
|
+
statearray: StateArray
|
|
717
|
+
transition: TransitionProps
|
|
718
|
+
transitionarray: TransitionArray
|
|
719
|
+
transitiontypedatatype: TransitionTypeDatatypeProps
|
|
720
|
+
}
|
|
721
|
+
|
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* scjsonProps.d.ts : Properties definition file for scjson types
|
|
3
|
+
*
|
|
4
|
+
* Part of the scjson project.
|
|
5
|
+
* Developed by Softoboros Technology Inc.
|
|
6
|
+
* Licensed under the BSD 1-Clause License.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export interface AssignProps {
|
|
10
|
+
location: string;
|
|
11
|
+
expr: string | null;
|
|
12
|
+
typeValue: typeof AssignTypeDatatypeProps;
|
|
13
|
+
attr: string | null;
|
|
14
|
+
otherAttributes: Record<string, object>;
|
|
15
|
+
content: Record<string, object>[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare const defaultAssign: () => AssignProps;
|
|
19
|
+
|
|
20
|
+
export type AssignArray = AssignProps[];
|
|
21
|
+
|
|
22
|
+
export type AssignTypeDatatypePropsType =
|
|
23
|
+
| "addattribute"
|
|
24
|
+
| "delete"
|
|
25
|
+
| "firstchild"
|
|
26
|
+
| "lastchild"
|
|
27
|
+
| "nextsibling"
|
|
28
|
+
| "previoussibling"
|
|
29
|
+
| "replace"
|
|
30
|
+
| "replacechildren"
|
|
31
|
+
;
|
|
32
|
+
|
|
33
|
+
export declare const AssignTypeDatatypeProps: {
|
|
34
|
+
readonly Addattribute: "addattribute",
|
|
35
|
+
readonly Delete: "delete",
|
|
36
|
+
readonly Firstchild: "firstchild",
|
|
37
|
+
readonly Lastchild: "lastchild",
|
|
38
|
+
readonly Nextsibling: "nextsibling",
|
|
39
|
+
readonly Previoussibling: "previoussibling",
|
|
40
|
+
readonly Replace: "replace",
|
|
41
|
+
readonly Replacechildren: "replacechildren",
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type BindingDatatypePropsType =
|
|
45
|
+
| "early"
|
|
46
|
+
| "late"
|
|
47
|
+
;
|
|
48
|
+
|
|
49
|
+
export declare const BindingDatatypeProps: {
|
|
50
|
+
readonly Early: "early",
|
|
51
|
+
readonly Late: "late",
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export type BooleanDatatypePropsType =
|
|
55
|
+
| "false"
|
|
56
|
+
| "true"
|
|
57
|
+
;
|
|
58
|
+
|
|
59
|
+
export declare const BooleanDatatypeProps: {
|
|
60
|
+
readonly False: "false",
|
|
61
|
+
readonly True: "true",
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export interface CancelProps {
|
|
65
|
+
otherElement: Record<string, object>[];
|
|
66
|
+
sendid: string | null;
|
|
67
|
+
sendidexpr: string | null;
|
|
68
|
+
otherAttributes: Record<string, object>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export declare const defaultCancel: () => CancelProps;
|
|
72
|
+
|
|
73
|
+
export type CancelArray = CancelProps[];
|
|
74
|
+
|
|
75
|
+
export interface ContentProps {
|
|
76
|
+
otherAttributes: Record<string, object>;
|
|
77
|
+
expr: string | null;
|
|
78
|
+
content: Record<string, object>[];
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export declare const defaultContent: () => ContentProps;
|
|
82
|
+
|
|
83
|
+
export type ContentArray = ContentProps[];
|
|
84
|
+
|
|
85
|
+
export interface DataProps {
|
|
86
|
+
id: string;
|
|
87
|
+
src: string | null;
|
|
88
|
+
expr: string | null;
|
|
89
|
+
otherAttributes: Record<string, object>;
|
|
90
|
+
content: Record<string, object>[];
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export declare const defaultData: () => DataProps;
|
|
94
|
+
|
|
95
|
+
export type DataArray = DataProps[];
|
|
96
|
+
|
|
97
|
+
export interface DatamodelProps {
|
|
98
|
+
data: DataProps[];
|
|
99
|
+
otherElement: Record<string, object>[];
|
|
100
|
+
otherAttributes: Record<string, object>;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export declare const defaultDatamodel: () => DatamodelProps;
|
|
104
|
+
|
|
105
|
+
export type DatamodelArray = DatamodelProps[];
|
|
106
|
+
|
|
107
|
+
export interface DonedataProps {
|
|
108
|
+
content: ContentProps | null;
|
|
109
|
+
param: ParamProps[];
|
|
110
|
+
otherAttributes: Record<string, object>;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export declare const defaultDonedata: () => DonedataProps;
|
|
114
|
+
|
|
115
|
+
export type DonedataArray = DonedataProps[];
|
|
116
|
+
|
|
117
|
+
export interface ElseProps {
|
|
118
|
+
otherAttributes: Record<string, object>;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export declare const defaultElse: () => ElseProps;
|
|
122
|
+
|
|
123
|
+
export interface ElseifProps {
|
|
124
|
+
cond: string;
|
|
125
|
+
otherAttributes: Record<string, object>;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export declare const defaultElseif: () => ElseifProps;
|
|
129
|
+
|
|
130
|
+
export type ExmodeDatatypePropsType =
|
|
131
|
+
| "lax"
|
|
132
|
+
| "strict"
|
|
133
|
+
;
|
|
134
|
+
|
|
135
|
+
export declare const ExmodeDatatypeProps: {
|
|
136
|
+
readonly Lax: "lax",
|
|
137
|
+
readonly Strict: "strict",
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
export interface FinalProps {
|
|
141
|
+
onentry: OnentryProps[];
|
|
142
|
+
onexit: OnexitProps[];
|
|
143
|
+
donedata: DonedataProps[];
|
|
144
|
+
otherElement: Record<string, object>[];
|
|
145
|
+
id: string | null;
|
|
146
|
+
otherAttributes: Record<string, object>;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export declare const defaultFinal: () => FinalProps;
|
|
150
|
+
|
|
151
|
+
export type FinalArray = FinalProps[];
|
|
152
|
+
|
|
153
|
+
export interface FinalizeProps {
|
|
154
|
+
otherElement: Record<string, object>[];
|
|
155
|
+
raiseValue: RaiseProps[];
|
|
156
|
+
ifValue: IfProps[];
|
|
157
|
+
foreach: ForeachProps[];
|
|
158
|
+
send: SendProps[];
|
|
159
|
+
script: ScriptProps[];
|
|
160
|
+
assign: AssignProps[];
|
|
161
|
+
log: LogProps[];
|
|
162
|
+
cancel: CancelProps[];
|
|
163
|
+
otherAttributes: Record<string, object>;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export declare const defaultFinalize: () => FinalizeProps;
|
|
167
|
+
|
|
168
|
+
export type FinalizeArray = FinalizeProps[];
|
|
169
|
+
|
|
170
|
+
export interface ForeachProps {
|
|
171
|
+
otherElement: Record<string, object>[];
|
|
172
|
+
raiseValue: RaiseProps[];
|
|
173
|
+
ifValue: IfProps[];
|
|
174
|
+
foreach: ForeachProps[];
|
|
175
|
+
send: SendProps[];
|
|
176
|
+
script: ScriptProps[];
|
|
177
|
+
assign: AssignProps[];
|
|
178
|
+
log: LogProps[];
|
|
179
|
+
cancel: CancelProps[];
|
|
180
|
+
array: string;
|
|
181
|
+
item: string;
|
|
182
|
+
index: string | null;
|
|
183
|
+
otherAttributes: Record<string, object>;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export declare const defaultForeach: () => ForeachProps;
|
|
187
|
+
|
|
188
|
+
export type ForeachArray = ForeachProps[];
|
|
189
|
+
|
|
190
|
+
export interface HistoryProps {
|
|
191
|
+
otherElement: Record<string, object>[];
|
|
192
|
+
transition: TransitionProps;
|
|
193
|
+
id: string | null;
|
|
194
|
+
typeValue: typeof HistoryTypeDatatypeProps | null;
|
|
195
|
+
otherAttributes: Record<string, object>;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export declare const defaultHistory: () => HistoryProps;
|
|
199
|
+
|
|
200
|
+
export type HistoryArray = HistoryProps[];
|
|
201
|
+
|
|
202
|
+
export type HistoryTypeDatatypePropsType =
|
|
203
|
+
| "deep"
|
|
204
|
+
| "shallow"
|
|
205
|
+
;
|
|
206
|
+
|
|
207
|
+
export declare const HistoryTypeDatatypeProps: {
|
|
208
|
+
readonly Deep: "deep",
|
|
209
|
+
readonly Shallow: "shallow",
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
export interface IfProps {
|
|
213
|
+
otherElement: Record<string, object>[];
|
|
214
|
+
raiseValue: RaiseProps[];
|
|
215
|
+
ifValue: IfProps[];
|
|
216
|
+
foreach: ForeachProps[];
|
|
217
|
+
send: SendProps[];
|
|
218
|
+
script: ScriptProps[];
|
|
219
|
+
assign: AssignProps[];
|
|
220
|
+
log: LogProps[];
|
|
221
|
+
cancel: CancelProps[];
|
|
222
|
+
elseif: ElseifProps | null;
|
|
223
|
+
elseValue: ElseProps | null;
|
|
224
|
+
cond: string;
|
|
225
|
+
otherAttributes: Record<string, object>;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export declare const defaultIf: () => IfProps;
|
|
229
|
+
|
|
230
|
+
export type IfArray = IfProps[];
|
|
231
|
+
|
|
232
|
+
export interface InitialProps {
|
|
233
|
+
otherElement: Record<string, object>[];
|
|
234
|
+
transition: TransitionProps;
|
|
235
|
+
otherAttributes: Record<string, object>;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export declare const defaultInitial: () => InitialProps;
|
|
239
|
+
|
|
240
|
+
export type InitialArray = InitialProps[];
|
|
241
|
+
|
|
242
|
+
export interface InvokeProps {
|
|
243
|
+
content: ContentProps[];
|
|
244
|
+
param: ParamProps[];
|
|
245
|
+
finalize: FinalizeProps[];
|
|
246
|
+
otherElement: Record<string, object>[];
|
|
247
|
+
typeValue: string;
|
|
248
|
+
typeexpr: string | null;
|
|
249
|
+
src: string | null;
|
|
250
|
+
srcexpr: string | null;
|
|
251
|
+
id: string | null;
|
|
252
|
+
idlocation: string | null;
|
|
253
|
+
namelist: string | null;
|
|
254
|
+
autoforward: typeof BooleanDatatypeProps;
|
|
255
|
+
otherAttributes: Record<string, object>;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export declare const defaultInvoke: () => InvokeProps;
|
|
259
|
+
|
|
260
|
+
export type InvokeArray = InvokeProps[];
|
|
261
|
+
|
|
262
|
+
export interface LogProps {
|
|
263
|
+
otherElement: Record<string, object>[];
|
|
264
|
+
label: string | null;
|
|
265
|
+
expr: string | null;
|
|
266
|
+
otherAttributes: Record<string, object>;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export declare const defaultLog: () => LogProps;
|
|
270
|
+
|
|
271
|
+
export type LogArray = LogProps[];
|
|
272
|
+
|
|
273
|
+
export interface OnentryProps {
|
|
274
|
+
otherElement: Record<string, object>[];
|
|
275
|
+
raiseValue: RaiseProps[];
|
|
276
|
+
ifValue: IfProps[];
|
|
277
|
+
foreach: ForeachProps[];
|
|
278
|
+
send: SendProps[];
|
|
279
|
+
script: ScriptProps[];
|
|
280
|
+
assign: AssignProps[];
|
|
281
|
+
log: LogProps[];
|
|
282
|
+
cancel: CancelProps[];
|
|
283
|
+
otherAttributes: Record<string, object>;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export declare const defaultOnentry: () => OnentryProps;
|
|
287
|
+
|
|
288
|
+
export type OnentryArray = OnentryProps[];
|
|
289
|
+
|
|
290
|
+
export interface OnexitProps {
|
|
291
|
+
otherElement: Record<string, object>[];
|
|
292
|
+
raiseValue: RaiseProps[];
|
|
293
|
+
ifValue: IfProps[];
|
|
294
|
+
foreach: ForeachProps[];
|
|
295
|
+
send: SendProps[];
|
|
296
|
+
script: ScriptProps[];
|
|
297
|
+
assign: AssignProps[];
|
|
298
|
+
log: LogProps[];
|
|
299
|
+
cancel: CancelProps[];
|
|
300
|
+
otherAttributes: Record<string, object>;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export declare const defaultOnexit: () => OnexitProps;
|
|
304
|
+
|
|
305
|
+
export type OnexitArray = OnexitProps[];
|
|
306
|
+
|
|
307
|
+
export interface ParallelProps {
|
|
308
|
+
onentry: OnentryProps[];
|
|
309
|
+
onexit: OnexitProps[];
|
|
310
|
+
transition: TransitionProps[];
|
|
311
|
+
state: StateProps[];
|
|
312
|
+
parallel: ParallelProps[];
|
|
313
|
+
history: HistoryProps[];
|
|
314
|
+
datamodel: DatamodelProps[];
|
|
315
|
+
invoke: InvokeProps[];
|
|
316
|
+
otherElement: Record<string, object>[];
|
|
317
|
+
id: string | null;
|
|
318
|
+
otherAttributes: Record<string, object>;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export declare const defaultParallel: () => ParallelProps;
|
|
322
|
+
|
|
323
|
+
export type ParallelArray = ParallelProps[];
|
|
324
|
+
|
|
325
|
+
export interface ParamProps {
|
|
326
|
+
otherElement: Record<string, object>[];
|
|
327
|
+
name: string;
|
|
328
|
+
expr: string | null;
|
|
329
|
+
location: string | null;
|
|
330
|
+
otherAttributes: Record<string, object>;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export declare const defaultParam: () => ParamProps;
|
|
334
|
+
|
|
335
|
+
export type ParamArray = ParamProps[];
|
|
336
|
+
|
|
337
|
+
export interface RaiseProps {
|
|
338
|
+
event: string;
|
|
339
|
+
otherAttributes: Record<string, object>;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export declare const defaultRaise: () => RaiseProps;
|
|
343
|
+
|
|
344
|
+
export type RaiseArray = RaiseProps[];
|
|
345
|
+
|
|
346
|
+
export interface ScriptProps {
|
|
347
|
+
src: string | null;
|
|
348
|
+
otherAttributes: Record<string, object>;
|
|
349
|
+
content: Record<string, object>[];
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export declare const defaultScript: () => ScriptProps;
|
|
353
|
+
|
|
354
|
+
export type ScriptArray = ScriptProps[];
|
|
355
|
+
|
|
356
|
+
export interface ScxmlProps {
|
|
357
|
+
state: StateProps[];
|
|
358
|
+
parallel: ParallelProps[];
|
|
359
|
+
final: FinalProps[];
|
|
360
|
+
datamodel: DatamodelProps[];
|
|
361
|
+
script: ScriptProps[];
|
|
362
|
+
otherElement: Record<string, object>[];
|
|
363
|
+
initial: string[];
|
|
364
|
+
name: string | null;
|
|
365
|
+
version: number | string;
|
|
366
|
+
datamodelAttribute: string;
|
|
367
|
+
binding: typeof BindingDatatypeProps | null;
|
|
368
|
+
exmode: typeof ExmodeDatatypeProps | null;
|
|
369
|
+
otherAttributes: Record<string, object>;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
export declare const defaultScxml: () => ScxmlProps;
|
|
373
|
+
|
|
374
|
+
export interface SendProps {
|
|
375
|
+
content: ContentProps[];
|
|
376
|
+
param: ParamProps[];
|
|
377
|
+
otherElement: Record<string, object>[];
|
|
378
|
+
event: string | null;
|
|
379
|
+
eventexpr: string | null;
|
|
380
|
+
target: string | null;
|
|
381
|
+
targetexpr: string | null;
|
|
382
|
+
typeValue: string;
|
|
383
|
+
typeexpr: string | null;
|
|
384
|
+
id: string | null;
|
|
385
|
+
idlocation: string | null;
|
|
386
|
+
delay: string;
|
|
387
|
+
delayexpr: string | null;
|
|
388
|
+
namelist: string | null;
|
|
389
|
+
otherAttributes: Record<string, object>;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
export declare const defaultSend: () => SendProps;
|
|
393
|
+
|
|
394
|
+
export type SendArray = SendProps[];
|
|
395
|
+
|
|
396
|
+
export interface StateProps {
|
|
397
|
+
onentry: OnentryProps[];
|
|
398
|
+
onexit: OnexitProps[];
|
|
399
|
+
transition: TransitionProps[];
|
|
400
|
+
initial: InitialProps[];
|
|
401
|
+
state: StateProps[];
|
|
402
|
+
parallel: ParallelProps[];
|
|
403
|
+
final: FinalProps[];
|
|
404
|
+
history: HistoryProps[];
|
|
405
|
+
datamodel: DatamodelProps[];
|
|
406
|
+
invoke: InvokeProps[];
|
|
407
|
+
otherElement: Record<string, object>[];
|
|
408
|
+
id: string | null;
|
|
409
|
+
initialAttribute: string[];
|
|
410
|
+
otherAttributes: Record<string, object>;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
export declare const defaultState: () => StateProps;
|
|
414
|
+
|
|
415
|
+
export type StateArray = StateProps[];
|
|
416
|
+
|
|
417
|
+
export interface TransitionProps {
|
|
418
|
+
otherElement: Record<string, object>[];
|
|
419
|
+
raiseValue: RaiseProps[];
|
|
420
|
+
ifValue: IfProps[];
|
|
421
|
+
foreach: ForeachProps[];
|
|
422
|
+
send: SendProps[];
|
|
423
|
+
script: ScriptProps[];
|
|
424
|
+
assign: AssignProps[];
|
|
425
|
+
log: LogProps[];
|
|
426
|
+
cancel: CancelProps[];
|
|
427
|
+
event: string | null;
|
|
428
|
+
cond: string | null;
|
|
429
|
+
target: string[];
|
|
430
|
+
typeValue: typeof TransitionTypeDatatypeProps | null;
|
|
431
|
+
otherAttributes: Record<string, object>;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
export declare const defaultTransition: () => TransitionProps;
|
|
435
|
+
|
|
436
|
+
export type TransitionArray = TransitionProps[];
|
|
437
|
+
|
|
438
|
+
export type TransitionTypeDatatypePropsType =
|
|
439
|
+
| "external"
|
|
440
|
+
| "internal"
|
|
441
|
+
;
|
|
442
|
+
|
|
443
|
+
export declare const TransitionTypeDatatypeProps: {
|
|
444
|
+
readonly External: "external",
|
|
445
|
+
readonly Internal: "internal",
|
|
446
|
+
};
|
|
447
|
+
|
|
448
|
+
export type Kind = "number" | "string" | "record<string, object>" | "number[]" | "string[]"
|
|
449
|
+
| "record<string, object>[]" | "assign" | "assigntypedatatype" | "bindingdatatype" | "booleandatatype"
|
|
450
|
+
| "cancel" | "content" | "data" | "datamodel" | "donedata" | "else" | "elseif"
|
|
451
|
+
| "exmodedatatype" | "final" | "finalize" | "foreach" | "history" | "historytypedatatype" | "if"
|
|
452
|
+
| "initial" | "invoke" | "log" | "onentry" | "onexit" | "parallel" | "param" | "raise"
|
|
453
|
+
| "script" | "scxml" | "send" | "state" | "transition" | "transitiontypedatatype"
|
|
454
|
+
| "assignarray" | "cancelarray" | "contentarray" | "dataarray" | "datamodelarray"
|
|
455
|
+
| "donedataarray" | "finalarray" | "finalizearray" | "foreacharray" | "historyarray" | "ifarray"
|
|
456
|
+
| "initialarray" | "invokearray" | "logarray" | "onentryarray" | "onexitarray" | "parallelarray"
|
|
457
|
+
| "paramarray" | "raisearray" | "scriptarray" | "sendarray" | "statearray" | "transitionarray";
|
|
458
|
+
|
|
459
|
+
export type PropsUnion = null | string | number | Record<string, object> | string[] | number[]
|
|
460
|
+
| Record<string, object>[] | AssignProps | typeof AssignTypeDatatypeProps | typeof BindingDatatypeProps
|
|
461
|
+
| typeof BooleanDatatypeProps | CancelProps | ContentProps | DataProps | DatamodelProps | DonedataProps
|
|
462
|
+
| ElseProps | ElseifProps | typeof ExmodeDatatypeProps | FinalProps | FinalizeProps
|
|
463
|
+
| ForeachProps | HistoryProps | typeof HistoryTypeDatatypeProps | IfProps | InitialProps
|
|
464
|
+
| InvokeProps | LogProps | OnentryProps | OnexitProps | ParallelProps | ParamProps
|
|
465
|
+
| RaiseProps | ScriptProps | ScxmlProps | SendProps | StateProps | TransitionProps
|
|
466
|
+
| typeof TransitionTypeDatatypeProps | AssignArray | CancelArray | ContentArray | DataArray | DatamodelArray
|
|
467
|
+
| DonedataArray | FinalArray | FinalizeArray | ForeachArray | HistoryArray | IfArray
|
|
468
|
+
| InitialArray | InvokeArray | LogArray | OnentryArray | OnexitArray | ParallelArray
|
|
469
|
+
| ParamArray | RaiseArray | ScriptArray | SendArray | StateArray | TransitionArray;
|
|
470
|
+
|
|
471
|
+
export type KindMap = {
|
|
472
|
+
assign: AssignProps
|
|
473
|
+
assignarray: AssignArray
|
|
474
|
+
assigntypedatatype: typeof AssignTypeDatatypeProps
|
|
475
|
+
bindingdatatype: typeof BindingDatatypeProps
|
|
476
|
+
booleandatatype: typeof BooleanDatatypeProps
|
|
477
|
+
cancel: CancelProps
|
|
478
|
+
cancelarray: CancelArray
|
|
479
|
+
content: ContentProps
|
|
480
|
+
contentarray: ContentArray
|
|
481
|
+
data: DataProps
|
|
482
|
+
dataarray: DataArray
|
|
483
|
+
datamodel: DatamodelProps
|
|
484
|
+
datamodelarray: DatamodelArray
|
|
485
|
+
donedata: DonedataProps
|
|
486
|
+
donedataarray: DonedataArray
|
|
487
|
+
else: ElseProps
|
|
488
|
+
elseif: ElseifProps
|
|
489
|
+
exmodedatatype: typeof ExmodeDatatypeProps
|
|
490
|
+
final: FinalProps
|
|
491
|
+
finalarray: FinalArray
|
|
492
|
+
finalize: FinalizeProps
|
|
493
|
+
finalizearray: FinalizeArray
|
|
494
|
+
foreach: ForeachProps
|
|
495
|
+
foreacharray: ForeachArray
|
|
496
|
+
history: HistoryProps
|
|
497
|
+
historyarray: HistoryArray
|
|
498
|
+
historytypedatatype: typeof HistoryTypeDatatypeProps
|
|
499
|
+
if: IfProps
|
|
500
|
+
ifarray: IfArray
|
|
501
|
+
initial: InitialProps
|
|
502
|
+
initialarray: InitialArray
|
|
503
|
+
invoke: InvokeProps
|
|
504
|
+
invokearray: InvokeArray
|
|
505
|
+
log: LogProps
|
|
506
|
+
logarray: LogArray
|
|
507
|
+
onentry: OnentryProps
|
|
508
|
+
onentryarray: OnentryArray
|
|
509
|
+
onexit: OnexitProps
|
|
510
|
+
onexitarray: OnexitArray
|
|
511
|
+
parallel: ParallelProps
|
|
512
|
+
parallelarray: ParallelArray
|
|
513
|
+
param: ParamProps
|
|
514
|
+
paramarray: ParamArray
|
|
515
|
+
raise: RaiseProps
|
|
516
|
+
raisearray: RaiseArray
|
|
517
|
+
script: ScriptProps
|
|
518
|
+
scriptarray: ScriptArray
|
|
519
|
+
scxml: ScxmlProps
|
|
520
|
+
send: SendProps
|
|
521
|
+
sendarray: SendArray
|
|
522
|
+
state: StateProps
|
|
523
|
+
statearray: StateArray
|
|
524
|
+
transition: TransitionProps
|
|
525
|
+
transitionarray: TransitionArray
|
|
526
|
+
transitiontypedatatype: typeof TransitionTypeDatatypeProps
|
|
527
|
+
}
|
|
528
|
+
|