flowstudio 0.0.1 → 0.0.2
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 +7 -7
- package/dist/components/app_layout.d.ts +3 -0
- package/dist/components/app_layout.jsx +15 -0
- package/dist/components/app_settings/data_sources.d.ts +1 -0
- package/dist/components/app_settings/data_sources.jsx +119 -0
- package/dist/components/app_settings/deploy.d.ts +1 -0
- package/dist/components/app_settings/deploy.jsx +22 -0
- package/dist/components/app_settings/index.d.ts +1 -0
- package/dist/components/app_settings/index.jsx +41 -0
- package/dist/components/app_settings/service_providers.d.ts +1 -0
- package/dist/components/app_settings/service_providers.jsx +84 -0
- package/dist/components/app_settings/simulator.d.ts +1 -0
- package/dist/components/app_settings/simulator.jsx +55 -0
- package/dist/components/combo_box/index.d.ts +3 -0
- package/dist/components/combo_box/index.jsx +104 -0
- package/dist/components/context.d.ts +1 -0
- package/dist/components/context.jsx +24 -0
- package/dist/components/dock_panel.d.ts +2 -0
- package/dist/components/dock_panel.jsx +55 -0
- package/dist/components/end.d.ts +1 -0
- package/dist/components/end.jsx +4 -0
- package/dist/components/input.d.ts +1 -0
- package/dist/components/input.jsx +19 -0
- package/dist/components/normal.d.ts +1 -0
- package/dist/components/normal.jsx +4 -0
- package/dist/components/sheet/index.d.ts +1 -0
- package/dist/components/sheet/index.jsx +32 -0
- package/dist/components/simulator/index.d.ts +1 -0
- package/dist/components/simulator/index.jsx +11 -0
- package/dist/components/start.d.ts +1 -0
- package/dist/components/start.jsx +37 -0
- package/dist/components/studio/index.d.ts +1 -1
- package/dist/components/studio/index.jsx +87 -12
- package/dist/components/xnode.d.ts +2 -0
- package/dist/components/xnode.jsx +84 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -8
- package/dist/zustand/store.d.ts +414 -0
- package/dist/zustand/store.js +47 -0
- package/package.json +14 -3
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
export declare const useConfigStore: import("zustand").UseBoundStore<Omit<Omit<import("zustand").StoreApi<{
|
|
2
|
+
pageTitle: any;
|
|
3
|
+
setPageTitle: (title: any) => any;
|
|
4
|
+
appTheme: any;
|
|
5
|
+
setAppTheme: (theme: any) => any;
|
|
6
|
+
stateType: any;
|
|
7
|
+
setStateType: (state: any) => any;
|
|
8
|
+
showContextMenu: boolean;
|
|
9
|
+
setShowContextMenu: () => any;
|
|
10
|
+
contextMenuPosition: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
};
|
|
14
|
+
setContextMenuPosition: () => any;
|
|
15
|
+
nodesData: any;
|
|
16
|
+
setNodesData: (payload: any) => any;
|
|
17
|
+
edgesData: {
|
|
18
|
+
id: string;
|
|
19
|
+
source: string;
|
|
20
|
+
sourceHandle: string;
|
|
21
|
+
target: string;
|
|
22
|
+
type: string;
|
|
23
|
+
animated: boolean;
|
|
24
|
+
}[];
|
|
25
|
+
setEdgesData: (payload: any) => any;
|
|
26
|
+
updateEdgesAnimated: () => any;
|
|
27
|
+
}>, "setState"> & {
|
|
28
|
+
setState(partial: {
|
|
29
|
+
pageTitle: any;
|
|
30
|
+
setPageTitle: (title: any) => any;
|
|
31
|
+
appTheme: any;
|
|
32
|
+
setAppTheme: (theme: any) => any;
|
|
33
|
+
stateType: any;
|
|
34
|
+
setStateType: (state: any) => any;
|
|
35
|
+
showContextMenu: boolean;
|
|
36
|
+
setShowContextMenu: () => any;
|
|
37
|
+
contextMenuPosition: {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
};
|
|
41
|
+
setContextMenuPosition: () => any;
|
|
42
|
+
nodesData: any;
|
|
43
|
+
setNodesData: (payload: any) => any;
|
|
44
|
+
edgesData: {
|
|
45
|
+
id: string;
|
|
46
|
+
source: string;
|
|
47
|
+
sourceHandle: string;
|
|
48
|
+
target: string;
|
|
49
|
+
type: string;
|
|
50
|
+
animated: boolean;
|
|
51
|
+
}[];
|
|
52
|
+
setEdgesData: (payload: any) => any;
|
|
53
|
+
updateEdgesAnimated: () => any;
|
|
54
|
+
} | Partial<{
|
|
55
|
+
pageTitle: any;
|
|
56
|
+
setPageTitle: (title: any) => any;
|
|
57
|
+
appTheme: any;
|
|
58
|
+
setAppTheme: (theme: any) => any;
|
|
59
|
+
stateType: any;
|
|
60
|
+
setStateType: (state: any) => any;
|
|
61
|
+
showContextMenu: boolean;
|
|
62
|
+
setShowContextMenu: () => any;
|
|
63
|
+
contextMenuPosition: {
|
|
64
|
+
x: number;
|
|
65
|
+
y: number;
|
|
66
|
+
};
|
|
67
|
+
setContextMenuPosition: () => any;
|
|
68
|
+
nodesData: any;
|
|
69
|
+
setNodesData: (payload: any) => any;
|
|
70
|
+
edgesData: {
|
|
71
|
+
id: string;
|
|
72
|
+
source: string;
|
|
73
|
+
sourceHandle: string;
|
|
74
|
+
target: string;
|
|
75
|
+
type: string;
|
|
76
|
+
animated: boolean;
|
|
77
|
+
}[];
|
|
78
|
+
setEdgesData: (payload: any) => any;
|
|
79
|
+
updateEdgesAnimated: () => any;
|
|
80
|
+
}> | ((state: {
|
|
81
|
+
pageTitle: any;
|
|
82
|
+
setPageTitle: (title: any) => any;
|
|
83
|
+
appTheme: any;
|
|
84
|
+
setAppTheme: (theme: any) => any;
|
|
85
|
+
stateType: any;
|
|
86
|
+
setStateType: (state: any) => any;
|
|
87
|
+
showContextMenu: boolean;
|
|
88
|
+
setShowContextMenu: () => any;
|
|
89
|
+
contextMenuPosition: {
|
|
90
|
+
x: number;
|
|
91
|
+
y: number;
|
|
92
|
+
};
|
|
93
|
+
setContextMenuPosition: () => any;
|
|
94
|
+
nodesData: any;
|
|
95
|
+
setNodesData: (payload: any) => any;
|
|
96
|
+
edgesData: {
|
|
97
|
+
id: string;
|
|
98
|
+
source: string;
|
|
99
|
+
sourceHandle: string;
|
|
100
|
+
target: string;
|
|
101
|
+
type: string;
|
|
102
|
+
animated: boolean;
|
|
103
|
+
}[];
|
|
104
|
+
setEdgesData: (payload: any) => any;
|
|
105
|
+
updateEdgesAnimated: () => any;
|
|
106
|
+
}) => {
|
|
107
|
+
pageTitle: any;
|
|
108
|
+
setPageTitle: (title: any) => any;
|
|
109
|
+
appTheme: any;
|
|
110
|
+
setAppTheme: (theme: any) => any;
|
|
111
|
+
stateType: any;
|
|
112
|
+
setStateType: (state: any) => any;
|
|
113
|
+
showContextMenu: boolean;
|
|
114
|
+
setShowContextMenu: () => any;
|
|
115
|
+
contextMenuPosition: {
|
|
116
|
+
x: number;
|
|
117
|
+
y: number;
|
|
118
|
+
};
|
|
119
|
+
setContextMenuPosition: () => any;
|
|
120
|
+
nodesData: any;
|
|
121
|
+
setNodesData: (payload: any) => any;
|
|
122
|
+
edgesData: {
|
|
123
|
+
id: string;
|
|
124
|
+
source: string;
|
|
125
|
+
sourceHandle: string;
|
|
126
|
+
target: string;
|
|
127
|
+
type: string;
|
|
128
|
+
animated: boolean;
|
|
129
|
+
}[];
|
|
130
|
+
setEdgesData: (payload: any) => any;
|
|
131
|
+
updateEdgesAnimated: () => any;
|
|
132
|
+
} | Partial<{
|
|
133
|
+
pageTitle: any;
|
|
134
|
+
setPageTitle: (title: any) => any;
|
|
135
|
+
appTheme: any;
|
|
136
|
+
setAppTheme: (theme: any) => any;
|
|
137
|
+
stateType: any;
|
|
138
|
+
setStateType: (state: any) => any;
|
|
139
|
+
showContextMenu: boolean;
|
|
140
|
+
setShowContextMenu: () => any;
|
|
141
|
+
contextMenuPosition: {
|
|
142
|
+
x: number;
|
|
143
|
+
y: number;
|
|
144
|
+
};
|
|
145
|
+
setContextMenuPosition: () => any;
|
|
146
|
+
nodesData: any;
|
|
147
|
+
setNodesData: (payload: any) => any;
|
|
148
|
+
edgesData: {
|
|
149
|
+
id: string;
|
|
150
|
+
source: string;
|
|
151
|
+
sourceHandle: string;
|
|
152
|
+
target: string;
|
|
153
|
+
type: string;
|
|
154
|
+
animated: boolean;
|
|
155
|
+
}[];
|
|
156
|
+
setEdgesData: (payload: any) => any;
|
|
157
|
+
updateEdgesAnimated: () => any;
|
|
158
|
+
}>), replace?: false | undefined, action?: (string | {
|
|
159
|
+
[x: string]: unknown;
|
|
160
|
+
[x: number]: unknown;
|
|
161
|
+
[x: symbol]: unknown;
|
|
162
|
+
type: string;
|
|
163
|
+
}) | undefined): void;
|
|
164
|
+
setState(state: {
|
|
165
|
+
pageTitle: any;
|
|
166
|
+
setPageTitle: (title: any) => any;
|
|
167
|
+
appTheme: any;
|
|
168
|
+
setAppTheme: (theme: any) => any;
|
|
169
|
+
stateType: any;
|
|
170
|
+
setStateType: (state: any) => any;
|
|
171
|
+
showContextMenu: boolean;
|
|
172
|
+
setShowContextMenu: () => any;
|
|
173
|
+
contextMenuPosition: {
|
|
174
|
+
x: number;
|
|
175
|
+
y: number;
|
|
176
|
+
};
|
|
177
|
+
setContextMenuPosition: () => any;
|
|
178
|
+
nodesData: any;
|
|
179
|
+
setNodesData: (payload: any) => any;
|
|
180
|
+
edgesData: {
|
|
181
|
+
id: string;
|
|
182
|
+
source: string;
|
|
183
|
+
sourceHandle: string;
|
|
184
|
+
target: string;
|
|
185
|
+
type: string;
|
|
186
|
+
animated: boolean;
|
|
187
|
+
}[];
|
|
188
|
+
setEdgesData: (payload: any) => any;
|
|
189
|
+
updateEdgesAnimated: () => any;
|
|
190
|
+
} | ((state: {
|
|
191
|
+
pageTitle: any;
|
|
192
|
+
setPageTitle: (title: any) => any;
|
|
193
|
+
appTheme: any;
|
|
194
|
+
setAppTheme: (theme: any) => any;
|
|
195
|
+
stateType: any;
|
|
196
|
+
setStateType: (state: any) => any;
|
|
197
|
+
showContextMenu: boolean;
|
|
198
|
+
setShowContextMenu: () => any;
|
|
199
|
+
contextMenuPosition: {
|
|
200
|
+
x: number;
|
|
201
|
+
y: number;
|
|
202
|
+
};
|
|
203
|
+
setContextMenuPosition: () => any;
|
|
204
|
+
nodesData: any;
|
|
205
|
+
setNodesData: (payload: any) => any;
|
|
206
|
+
edgesData: {
|
|
207
|
+
id: string;
|
|
208
|
+
source: string;
|
|
209
|
+
sourceHandle: string;
|
|
210
|
+
target: string;
|
|
211
|
+
type: string;
|
|
212
|
+
animated: boolean;
|
|
213
|
+
}[];
|
|
214
|
+
setEdgesData: (payload: any) => any;
|
|
215
|
+
updateEdgesAnimated: () => any;
|
|
216
|
+
}) => {
|
|
217
|
+
pageTitle: any;
|
|
218
|
+
setPageTitle: (title: any) => any;
|
|
219
|
+
appTheme: any;
|
|
220
|
+
setAppTheme: (theme: any) => any;
|
|
221
|
+
stateType: any;
|
|
222
|
+
setStateType: (state: any) => any;
|
|
223
|
+
showContextMenu: boolean;
|
|
224
|
+
setShowContextMenu: () => any;
|
|
225
|
+
contextMenuPosition: {
|
|
226
|
+
x: number;
|
|
227
|
+
y: number;
|
|
228
|
+
};
|
|
229
|
+
setContextMenuPosition: () => any;
|
|
230
|
+
nodesData: any;
|
|
231
|
+
setNodesData: (payload: any) => any;
|
|
232
|
+
edgesData: {
|
|
233
|
+
id: string;
|
|
234
|
+
source: string;
|
|
235
|
+
sourceHandle: string;
|
|
236
|
+
target: string;
|
|
237
|
+
type: string;
|
|
238
|
+
animated: boolean;
|
|
239
|
+
}[];
|
|
240
|
+
setEdgesData: (payload: any) => any;
|
|
241
|
+
updateEdgesAnimated: () => any;
|
|
242
|
+
}), replace: true, action?: (string | {
|
|
243
|
+
[x: string]: unknown;
|
|
244
|
+
[x: number]: unknown;
|
|
245
|
+
[x: symbol]: unknown;
|
|
246
|
+
type: string;
|
|
247
|
+
}) | undefined): void;
|
|
248
|
+
}, "persist"> & {
|
|
249
|
+
persist: {
|
|
250
|
+
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<{
|
|
251
|
+
pageTitle: any;
|
|
252
|
+
setPageTitle: (title: any) => any;
|
|
253
|
+
appTheme: any;
|
|
254
|
+
setAppTheme: (theme: any) => any;
|
|
255
|
+
stateType: any;
|
|
256
|
+
setStateType: (state: any) => any;
|
|
257
|
+
showContextMenu: boolean;
|
|
258
|
+
setShowContextMenu: () => any;
|
|
259
|
+
contextMenuPosition: {
|
|
260
|
+
x: number;
|
|
261
|
+
y: number;
|
|
262
|
+
};
|
|
263
|
+
setContextMenuPosition: () => any;
|
|
264
|
+
nodesData: any;
|
|
265
|
+
setNodesData: (payload: any) => any;
|
|
266
|
+
edgesData: {
|
|
267
|
+
id: string;
|
|
268
|
+
source: string;
|
|
269
|
+
sourceHandle: string;
|
|
270
|
+
target: string;
|
|
271
|
+
type: string;
|
|
272
|
+
animated: boolean;
|
|
273
|
+
}[];
|
|
274
|
+
setEdgesData: (payload: any) => any;
|
|
275
|
+
updateEdgesAnimated: () => any;
|
|
276
|
+
}, {
|
|
277
|
+
pageTitle: any;
|
|
278
|
+
setPageTitle: (title: any) => any;
|
|
279
|
+
appTheme: any;
|
|
280
|
+
setAppTheme: (theme: any) => any;
|
|
281
|
+
stateType: any;
|
|
282
|
+
setStateType: (state: any) => any;
|
|
283
|
+
showContextMenu: boolean;
|
|
284
|
+
setShowContextMenu: () => any;
|
|
285
|
+
contextMenuPosition: {
|
|
286
|
+
x: number;
|
|
287
|
+
y: number;
|
|
288
|
+
};
|
|
289
|
+
setContextMenuPosition: () => any;
|
|
290
|
+
nodesData: any;
|
|
291
|
+
setNodesData: (payload: any) => any;
|
|
292
|
+
edgesData: {
|
|
293
|
+
id: string;
|
|
294
|
+
source: string;
|
|
295
|
+
sourceHandle: string;
|
|
296
|
+
target: string;
|
|
297
|
+
type: string;
|
|
298
|
+
animated: boolean;
|
|
299
|
+
}[];
|
|
300
|
+
setEdgesData: (payload: any) => any;
|
|
301
|
+
updateEdgesAnimated: () => any;
|
|
302
|
+
}>>) => void;
|
|
303
|
+
clearStorage: () => void;
|
|
304
|
+
rehydrate: () => Promise<void> | void;
|
|
305
|
+
hasHydrated: () => boolean;
|
|
306
|
+
onHydrate: (fn: (state: {
|
|
307
|
+
pageTitle: any;
|
|
308
|
+
setPageTitle: (title: any) => any;
|
|
309
|
+
appTheme: any;
|
|
310
|
+
setAppTheme: (theme: any) => any;
|
|
311
|
+
stateType: any;
|
|
312
|
+
setStateType: (state: any) => any;
|
|
313
|
+
showContextMenu: boolean;
|
|
314
|
+
setShowContextMenu: () => any;
|
|
315
|
+
contextMenuPosition: {
|
|
316
|
+
x: number;
|
|
317
|
+
y: number;
|
|
318
|
+
};
|
|
319
|
+
setContextMenuPosition: () => any;
|
|
320
|
+
nodesData: any;
|
|
321
|
+
setNodesData: (payload: any) => any;
|
|
322
|
+
edgesData: {
|
|
323
|
+
id: string;
|
|
324
|
+
source: string;
|
|
325
|
+
sourceHandle: string;
|
|
326
|
+
target: string;
|
|
327
|
+
type: string;
|
|
328
|
+
animated: boolean;
|
|
329
|
+
}[];
|
|
330
|
+
setEdgesData: (payload: any) => any;
|
|
331
|
+
updateEdgesAnimated: () => any;
|
|
332
|
+
}) => void) => () => void;
|
|
333
|
+
onFinishHydration: (fn: (state: {
|
|
334
|
+
pageTitle: any;
|
|
335
|
+
setPageTitle: (title: any) => any;
|
|
336
|
+
appTheme: any;
|
|
337
|
+
setAppTheme: (theme: any) => any;
|
|
338
|
+
stateType: any;
|
|
339
|
+
setStateType: (state: any) => any;
|
|
340
|
+
showContextMenu: boolean;
|
|
341
|
+
setShowContextMenu: () => any;
|
|
342
|
+
contextMenuPosition: {
|
|
343
|
+
x: number;
|
|
344
|
+
y: number;
|
|
345
|
+
};
|
|
346
|
+
setContextMenuPosition: () => any;
|
|
347
|
+
nodesData: any;
|
|
348
|
+
setNodesData: (payload: any) => any;
|
|
349
|
+
edgesData: {
|
|
350
|
+
id: string;
|
|
351
|
+
source: string;
|
|
352
|
+
sourceHandle: string;
|
|
353
|
+
target: string;
|
|
354
|
+
type: string;
|
|
355
|
+
animated: boolean;
|
|
356
|
+
}[];
|
|
357
|
+
setEdgesData: (payload: any) => any;
|
|
358
|
+
updateEdgesAnimated: () => any;
|
|
359
|
+
}) => void) => () => void;
|
|
360
|
+
getOptions: () => Partial<import("zustand/middleware").PersistOptions<{
|
|
361
|
+
pageTitle: any;
|
|
362
|
+
setPageTitle: (title: any) => any;
|
|
363
|
+
appTheme: any;
|
|
364
|
+
setAppTheme: (theme: any) => any;
|
|
365
|
+
stateType: any;
|
|
366
|
+
setStateType: (state: any) => any;
|
|
367
|
+
showContextMenu: boolean;
|
|
368
|
+
setShowContextMenu: () => any;
|
|
369
|
+
contextMenuPosition: {
|
|
370
|
+
x: number;
|
|
371
|
+
y: number;
|
|
372
|
+
};
|
|
373
|
+
setContextMenuPosition: () => any;
|
|
374
|
+
nodesData: any;
|
|
375
|
+
setNodesData: (payload: any) => any;
|
|
376
|
+
edgesData: {
|
|
377
|
+
id: string;
|
|
378
|
+
source: string;
|
|
379
|
+
sourceHandle: string;
|
|
380
|
+
target: string;
|
|
381
|
+
type: string;
|
|
382
|
+
animated: boolean;
|
|
383
|
+
}[];
|
|
384
|
+
setEdgesData: (payload: any) => any;
|
|
385
|
+
updateEdgesAnimated: () => any;
|
|
386
|
+
}, {
|
|
387
|
+
pageTitle: any;
|
|
388
|
+
setPageTitle: (title: any) => any;
|
|
389
|
+
appTheme: any;
|
|
390
|
+
setAppTheme: (theme: any) => any;
|
|
391
|
+
stateType: any;
|
|
392
|
+
setStateType: (state: any) => any;
|
|
393
|
+
showContextMenu: boolean;
|
|
394
|
+
setShowContextMenu: () => any;
|
|
395
|
+
contextMenuPosition: {
|
|
396
|
+
x: number;
|
|
397
|
+
y: number;
|
|
398
|
+
};
|
|
399
|
+
setContextMenuPosition: () => any;
|
|
400
|
+
nodesData: any;
|
|
401
|
+
setNodesData: (payload: any) => any;
|
|
402
|
+
edgesData: {
|
|
403
|
+
id: string;
|
|
404
|
+
source: string;
|
|
405
|
+
sourceHandle: string;
|
|
406
|
+
target: string;
|
|
407
|
+
type: string;
|
|
408
|
+
animated: boolean;
|
|
409
|
+
}[];
|
|
410
|
+
setEdgesData: (payload: any) => any;
|
|
411
|
+
updateEdgesAnimated: () => any;
|
|
412
|
+
}>>;
|
|
413
|
+
};
|
|
414
|
+
}>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { create } from 'zustand';
|
|
2
|
+
import { devtools, persist } from 'zustand/middleware';
|
|
3
|
+
const configStore = (set) => ({
|
|
4
|
+
pageTitle: ``,
|
|
5
|
+
setPageTitle: (title) => set(() => ({ pageTitle: `${title}` })),
|
|
6
|
+
appTheme: `light`,
|
|
7
|
+
setAppTheme: (theme) => set(() => ({ appTheme: `${theme}` })),
|
|
8
|
+
stateType: `build`,
|
|
9
|
+
setStateType: (state) => set(() => ({ stateType: `${state}` })),
|
|
10
|
+
showContextMenu: false,
|
|
11
|
+
setShowContextMenu: () => set((state) => ({ showContextMenu: state })),
|
|
12
|
+
contextMenuPosition: { x: 0, y: 0 },
|
|
13
|
+
setContextMenuPosition: () => set((state) => ({ contextMenuPosition: state })),
|
|
14
|
+
nodesData: [
|
|
15
|
+
{ id: 'node-1', type: 'startNode', dragHandle: '.drag-handle', position: { x: 100, y: 200 }, data: { id: 1, type: "start", value: 123, message: 'Welcome [Michelle] to Grow For Me:', inputs: [{ id: 1, type: 'choice', text: 'I want to Fund/Sponsor' }, { id: 2, type: 'choice', text: 'Check Fund Updates' }, { id: 3, type: 'choice', text: 'I want to Buy' }, { id: 4, type: 'choice', text: 'I want to Sell' }, { id: 5, type: 'choice', text: 'I am a Farmer' }] } },
|
|
16
|
+
{ id: 'node-2', type: 'normalNode', dragHandle: '.drag-handle', position: { x: 450, y: 50 }, data: { id: 2, type: "normal", value: 321, message: 'Will you like to Sponsor/Fund a Campaign?', inputs: [{ id: 1, type: 'choice', text: 'Yes' }, { id: 2, type: 'choice', text: 'No' }] } },
|
|
17
|
+
{ id: 'node-3', type: 'normalNode', dragHandle: '.drag-handle', position: { x: 500, y: 500 }, data: { id: 3, type: "normal", value: 321, message: 'Will you like to check your Fund Updates?', inputs: [{ id: 1, type: 'choice', text: 'Yes' }, { id: 2, type: 'choice', text: 'No' }] } },
|
|
18
|
+
{ id: 'node-4', type: 'normalNode', dragHandle: '.drag-handle', position: { x: 800, y: 60 }, data: { id: 4, type: "normal", value: 321, message: 'How many units will you like to fund?', inputs: [{ id: 1, type: 'user_input', text: '', inputType: 'number' }] } },
|
|
19
|
+
{ id: 'node-5', type: 'normalNode', dragHandle: '.drag-handle', position: { x: 830, y: 370 }, data: { id: 5, type: "normal", value: 3281, message: 'Is that all you be doing for now?', inputs: [{ id: 1, type: 'choice', text: 'Yes for now' }, { id: 2, type: 'choice', text: 'No, I want to see more' }] } },
|
|
20
|
+
{ id: 'node-6', type: 'endNode', dragHandle: '.drag-handle', position: { x: 1500, y: 200 }, data: { id: 6, type: "end", value: 3121, message: 'Thank you for trying our service.' } },
|
|
21
|
+
{ id: 'node-7', type: 'endNode', dragHandle: '.drag-handle', position: { x: 1300, y: 600 }, data: { id: 7, type: "end", value: 3122, message: 'We will surely get back to you with more information' } },
|
|
22
|
+
],
|
|
23
|
+
setNodesData: (payload) => set((state) => ({ ...state, nodesData: payload })),
|
|
24
|
+
// edgesData: [],
|
|
25
|
+
edgesData: [
|
|
26
|
+
{ id: 'e1-1', source: 'node-1', sourceHandle: '1', target: 'node-2', type: 'smoothstep', animated: false },
|
|
27
|
+
{ id: 'e1-2', source: 'node-1', sourceHandle: '2', target: 'node-3', type: 'smoothstep', animated: true },
|
|
28
|
+
{ id: 'e1-3', source: 'node-2', sourceHandle: '1', target: 'node-4', type: 'smoothstep', animated: false },
|
|
29
|
+
{ id: 'e1-4', source: 'node-3', sourceHandle: '1', target: 'node-5', type: 'smoothstep', animated: true },
|
|
30
|
+
{ id: 'e1-5', source: 'node-3', sourceHandle: '2', target: 'node-6', type: 'smoothstep', animated: false },
|
|
31
|
+
{ id: 'e1-6', source: 'node-4', sourceHandle: '1', target: 'node-6', type: 'smoothstep', animated: false },
|
|
32
|
+
{ id: 'e1-7', source: 'node-5', sourceHandle: '1', target: 'node-6', type: 'smoothstep', animated: false },
|
|
33
|
+
{ id: 'e1-8', source: 'node-5', sourceHandle: '2', target: 'node-7', type: 'smoothstep', animated: true },
|
|
34
|
+
],
|
|
35
|
+
setEdgesData: (payload) => set((state) => ({ ...state, edgesData: payload })),
|
|
36
|
+
updateEdgesAnimated: () => set((state) => ({
|
|
37
|
+
edgesData: state.edgesData.map((edge) => ({
|
|
38
|
+
...edge,
|
|
39
|
+
animated: state.stateType === 'build' ? false : true,
|
|
40
|
+
}))
|
|
41
|
+
})),
|
|
42
|
+
});
|
|
43
|
+
// Apply middlewares (devtools and persist)
|
|
44
|
+
export const useConfigStore = create(devtools(persist(configStore, { name: 'uxxd_config' })));
|
|
45
|
+
// configStore = devtools(configStore);
|
|
46
|
+
// configStore = persist(configStore, { name: 'uxxd_config' });
|
|
47
|
+
// export const useConfigStore = create(configStore)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowstudio",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Enterprise Flow Designer",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,10 +14,21 @@
|
|
|
14
14
|
"prepublishOnly": "npm run build"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
+
"@hookform/resolvers": "latest",
|
|
18
|
+
"@radix-ui/react-form": "latest",
|
|
19
|
+
"@radix-ui/react-icons": "latest",
|
|
20
|
+
"@radix-ui/themes": "latest",
|
|
21
|
+
"@tanstack/react-query": "latest",
|
|
17
22
|
"@types/node": "latest",
|
|
18
|
-
"@types/react": "
|
|
23
|
+
"@types/react": "latest",
|
|
24
|
+
"@xyflow/react": "latest",
|
|
25
|
+
"html-react-parser": "^5.2.2",
|
|
26
|
+
"lucide-react": "latest",
|
|
27
|
+
"react-hook-form": "latest",
|
|
19
28
|
"react-icons": "latest",
|
|
20
|
-
"typescript": "latest"
|
|
29
|
+
"typescript": "latest",
|
|
30
|
+
"yup": "latest",
|
|
31
|
+
"zustand": "latest"
|
|
21
32
|
},
|
|
22
33
|
"files": [
|
|
23
34
|
"dist/**/*"
|