@veridid/workflow-parser 0.4.4 → 0.4.6
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/dist/index.d.ts +1 -0
- package/package.json +2 -2
- package/dist/db.js +0 -40
- package/dist/dbCrud.js +0 -210
- package/dist/parser.js +0 -125
- package/dist/schema.sql +0 -16
- package/dist/src/implementations/action.default.js +0 -82
- package/dist/src/implementations/action.default.js.map +0 -1
- package/dist/src/implementations/display.default.js +0 -93
- package/dist/src/implementations/display.default.js.map +0 -1
- package/dist/src/implementations/workflow.default.js +0 -79
- package/dist/src/implementations/workflow.default.js.map +0 -1
- package/dist/src/index.js +0 -7
- package/dist/src/index.js.map +0 -1
- package/dist/src/interfaces/actionextension.js +0 -3
- package/dist/src/interfaces/actionextension.js.map +0 -1
- package/dist/src/interfaces/actioninterface.js +0 -3
- package/dist/src/interfaces/actioninterface.js.map +0 -1
- package/dist/src/interfaces/displayextension.js +0 -3
- package/dist/src/interfaces/displayextension.js.map +0 -1
- package/dist/src/interfaces/displayinterface.js +0 -3
- package/dist/src/interfaces/displayinterface.js.map +0 -1
- package/dist/src/interfaces/workflowinterface.js +0 -3
- package/dist/src/interfaces/workflowinterface.js.map +0 -1
- package/dist/src/workflowparser.js +0 -59
- package/dist/src/workflowparser.js.map +0 -1
- package/dist/test/action.extension.js +0 -34
- package/dist/test/action.extension.js.map +0 -1
- package/dist/test/display.extension.js +0 -29
- package/dist/test/display.extension.js.map +0 -1
- package/dist/test/test.js +0 -178
- package/dist/test/test.js.map +0 -1
- package/dist/test/testworkflows.json +0 -221
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"workflows": [
|
|
3
|
-
{
|
|
4
|
-
"name": "Test Workflow Display Name",
|
|
5
|
-
"workflow_id": "root-menu",
|
|
6
|
-
"initial_state": "menu",
|
|
7
|
-
"render": [
|
|
8
|
-
{}
|
|
9
|
-
],
|
|
10
|
-
"states": [
|
|
11
|
-
{
|
|
12
|
-
"name": "Test Workflow menu",
|
|
13
|
-
"state_id": "menu",
|
|
14
|
-
"display_data": [
|
|
15
|
-
{
|
|
16
|
-
"type": "image",
|
|
17
|
-
"url": "http://image.com/image.png"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"type": "text",
|
|
21
|
-
"display": "title",
|
|
22
|
-
"text": "This is the test for workflow"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"type": "text",
|
|
26
|
-
"text": "First time showing this page",
|
|
27
|
-
"condition": "instance?.state_data?.first==undefined"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"type": "button",
|
|
31
|
-
"text": "Next button",
|
|
32
|
-
"action_id": "nextButton"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"type": "button",
|
|
36
|
-
"text": "Data button",
|
|
37
|
-
"action_id": "dataButton"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"type": "button",
|
|
41
|
-
"text": "Workflow button",
|
|
42
|
-
"action_id": "workflowButton"
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
"actions": [
|
|
46
|
-
{
|
|
47
|
-
"action_id": "nextButton",
|
|
48
|
-
"type": "saveData",
|
|
49
|
-
"condition": "true",
|
|
50
|
-
"value": { "first": true }
|
|
51
|
-
}
|
|
52
|
-
],
|
|
53
|
-
"transitions": [
|
|
54
|
-
{
|
|
55
|
-
"transition_id": "nextButton",
|
|
56
|
-
"type": "stateTransition",
|
|
57
|
-
"state_id": "page1",
|
|
58
|
-
"workflow_id": "",
|
|
59
|
-
"condition": "actionInput.actionID=='nextButton'"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"transition_id": "dataButton",
|
|
63
|
-
"type": "stateTransition",
|
|
64
|
-
"state_id": "page2",
|
|
65
|
-
"workflow_id": "",
|
|
66
|
-
"condition": "actionInput.actionID=='dataButton'"
|
|
67
|
-
}
|
|
68
|
-
]
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"name": "Test Workflow page 1",
|
|
72
|
-
"state_id": "page1",
|
|
73
|
-
"display_data": [
|
|
74
|
-
{
|
|
75
|
-
"type": "text",
|
|
76
|
-
"text": "This is the page for testing state transitions."
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"type": "button",
|
|
80
|
-
"text": "Go back",
|
|
81
|
-
"action_id": "backButton"
|
|
82
|
-
}
|
|
83
|
-
],
|
|
84
|
-
"actions": [],
|
|
85
|
-
"transitions": [
|
|
86
|
-
{
|
|
87
|
-
"transition_id": "backButton",
|
|
88
|
-
"type": "stateTransition",
|
|
89
|
-
"state_id": "menu",
|
|
90
|
-
"workflow_id": "",
|
|
91
|
-
"condition": "actionInput.actionID=='backButton'"
|
|
92
|
-
}
|
|
93
|
-
]
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"name": "Test Workflow page 2 data test",
|
|
97
|
-
"state_id": "page2",
|
|
98
|
-
"display_data": [
|
|
99
|
-
{
|
|
100
|
-
"type": "text",
|
|
101
|
-
"display": "title",
|
|
102
|
-
"text": "This is the page for testing data."
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"type": "text",
|
|
106
|
-
"text": "Date={Date}",
|
|
107
|
-
"condition": "instance?.state_data?.Date!=undefined"
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"type": "extended",
|
|
111
|
-
"text": "Extended text"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"type": "button",
|
|
115
|
-
"text": "Save Data",
|
|
116
|
-
"action_id": "saveButton"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
"type": "button",
|
|
120
|
-
"text": "State Data",
|
|
121
|
-
"action_id": "stateButton"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"type": "button",
|
|
125
|
-
"text": "Extension",
|
|
126
|
-
"action_id": "extensionButton"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"type": "button",
|
|
130
|
-
"text": "Go back",
|
|
131
|
-
"action_id": "backButton"
|
|
132
|
-
}
|
|
133
|
-
],
|
|
134
|
-
"actions": [
|
|
135
|
-
{
|
|
136
|
-
"action_id": "stateButton",
|
|
137
|
-
"type": "stateData",
|
|
138
|
-
"condition": "true",
|
|
139
|
-
"value": "action.data"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"action_id": "extensionButton",
|
|
143
|
-
"type": "extension",
|
|
144
|
-
"condition": "true",
|
|
145
|
-
"value": { "extended": true }
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"action_id": "saveButton",
|
|
149
|
-
"type": "saveData",
|
|
150
|
-
"condition": "true",
|
|
151
|
-
"value": { "data": "Hello" }
|
|
152
|
-
}
|
|
153
|
-
],
|
|
154
|
-
"transitions": [
|
|
155
|
-
{
|
|
156
|
-
"transition_id": "backButton",
|
|
157
|
-
"type": "stateTransition",
|
|
158
|
-
"state_id": "menu",
|
|
159
|
-
"workflow_id": "",
|
|
160
|
-
"condition": "actionInput.actionID=='backButton'"
|
|
161
|
-
}
|
|
162
|
-
]
|
|
163
|
-
}
|
|
164
|
-
]
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
"name": "Test Other Workflow ",
|
|
168
|
-
"workflow_id": "other-menu",
|
|
169
|
-
"initial_state": "menu2",
|
|
170
|
-
"render": [
|
|
171
|
-
{}
|
|
172
|
-
],
|
|
173
|
-
"states": [
|
|
174
|
-
{
|
|
175
|
-
"name": "Test Other Workflow menu",
|
|
176
|
-
"state_id": "menu2",
|
|
177
|
-
"display_data": [
|
|
178
|
-
{
|
|
179
|
-
"type": "title",
|
|
180
|
-
"text": "This is the other test workflow."
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"type": "button",
|
|
184
|
-
"text": "Go home workflow",
|
|
185
|
-
"action_id": "homeButton"
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
"type": "button",
|
|
189
|
-
"text": "No action button",
|
|
190
|
-
"action_id": "noactionButton"
|
|
191
|
-
}
|
|
192
|
-
],
|
|
193
|
-
"actions": [
|
|
194
|
-
{
|
|
195
|
-
"action_id": "homeButton",
|
|
196
|
-
"type": "workflowTransition",
|
|
197
|
-
"condition": "true",
|
|
198
|
-
"value": "root-menu"
|
|
199
|
-
}
|
|
200
|
-
],
|
|
201
|
-
"transitions": [
|
|
202
|
-
{
|
|
203
|
-
"transition_id": "homeButton",
|
|
204
|
-
"type": "workflowTransition",
|
|
205
|
-
"state_id": "",
|
|
206
|
-
"workflow_id": "root-menu",
|
|
207
|
-
"condition": "actionInput.actionID=='homeButton'"
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
"transition_id": "noactionButton",
|
|
211
|
-
"type": "workflowTransition",
|
|
212
|
-
"state_id": "",
|
|
213
|
-
"workflow_id": "root-menu",
|
|
214
|
-
"condition": "actionInput.actionID=='noactionButton'"
|
|
215
|
-
}
|
|
216
|
-
]
|
|
217
|
-
}
|
|
218
|
-
]
|
|
219
|
-
}
|
|
220
|
-
]
|
|
221
|
-
}
|