initial-data.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. import { WorkflowJSON } from '@flowgram.ai/free-layout-editor';
  2. export const initialData: WorkflowJSON = {
  3. nodes: [
  4. {
  5. id: '1',
  6. type: 'start',
  7. meta: {
  8. position: { x: 0, y: 0 },
  9. },
  10. data: {
  11. title: 'Start Node',
  12. },
  13. },
  14. {
  15. id: '2',
  16. type: 'custom',
  17. meta: {
  18. position: { x: 400, y: -200 },
  19. },
  20. data: {
  21. title: 'Custom Node A',
  22. },
  23. },
  24. {
  25. id: '3',
  26. type: 'custom',
  27. meta: {
  28. position: { x: 400, y: 0 },
  29. },
  30. data: {
  31. title: 'Custom Node B',
  32. },
  33. },
  34. {
  35. id: '4',
  36. type: 'custom',
  37. meta: {
  38. position: { x: 400, y: 200 },
  39. },
  40. data: {
  41. title: 'Custom Node C',
  42. },
  43. },
  44. {
  45. id: '5',
  46. type: 'end',
  47. meta: {
  48. position: { x: 800, y: 0 },
  49. },
  50. data: {
  51. title: 'End Node',
  52. },
  53. },
  54. ],
  55. edges: [
  56. {
  57. sourceNodeID: '1',
  58. targetNodeID: '2',
  59. },
  60. {
  61. sourceNodeID: '1',
  62. targetNodeID: '3',
  63. },
  64. {
  65. sourceNodeID: '1',
  66. targetNodeID: '4',
  67. },
  68. {
  69. sourceNodeID: '2',
  70. targetNodeID: '5',
  71. },
  72. {
  73. sourceNodeID: '3',
  74. targetNodeID: '5',
  75. },
  76. {
  77. sourceNodeID: '4',
  78. targetNodeID: '5',
  79. },
  80. ],
  81. };