scjson 0.2.1 → 0.3.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 +189 -3
- package/bin/scjson.js +1 -1
- package/dist/browser.cjs +12 -0
- package/dist/browser.d.cts +2 -0
- package/dist/browser.d.mts +6 -0
- package/dist/browser.mjs +12 -0
- package/dist/converters.d.ts +230 -0
- package/dist/converters.js +1372 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +236 -0
- package/{types → dist}/scjsonProps.d.ts +92 -226
- package/dist/scjsonProps.js +309 -0
- package/package.json +31 -56
- package/scjson.schema.json +160 -13
- package/browser.cjs +0 -243
- package/browser.mjs +0 -92
- package/index.js +0 -243
- package/scjsonProps.ts +0 -721
- package/tests/cli.test.js +0 -172
- package/types/scjson-browser.d.ts +0 -25
package/scjsonProps.ts
DELETED
|
@@ -1,721 +0,0 @@
|
|
|
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
|
-
|