Dynamic Form Example

Example of a Typeform-like dynamic form made with Orvanta.

json · 1171 lines
1
{
2
  "summary": "Dynamic Form Example",
3
  "value": {
4
    "css": {
5
      "buttoncomponent": {
6
        "button": {
7
          "class": "",
8
          "style": ""
9
        },
10
        "container": {
11
          "class": "",
12
          "style": ""
13
        }
14
      }
15
    },
16
    "grid": [
17
      {
18
        "3": {
19
          "h": 8,
20
          "w": 2,
21
          "x": 0,
22
          "y": 0,
23
          "fixed": false
24
        },
25
        "12": {
26
          "h": 11,
27
          "w": 9,
28
          "x": 2,
29
          "y": 1,
30
          "id": "a",
31
          "fixed": false
32
        },
33
        "id": "a",
34
        "data": {
35
          "id": "a",
36
          "type": "decisiontreecomponent",
37
          "nodes": [
38
            {
39
              "id": "a",
40
              "next": [
41
                {
42
                  "id": "b",
43
                  "condition": {
44
                    "expr": "true",
45
                    "type": "evalv2",
46
                    "fieldType": "boolean",
47
                    "connections": []
48
                  }
49
                }
50
              ],
51
              "label": "Credentials",
52
              "allowed": {
53
                "expr": "true",
54
                "type": "evalv2",
55
                "fieldType": "boolean",
56
                "connections": []
57
              }
58
            },
59
            {
60
              "id": "b",
61
              "next": [
62
                {
63
                  "id": "c",
64
                  "condition": {
65
                    "expr": "true",
66
                    "type": "evalv2",
67
                    "fieldType": "boolean",
68
                    "connections": []
69
                  }
70
                }
71
              ],
72
              "label": "Contact",
73
              "allowed": {
74
                "expr": "true",
75
                "type": "evalv2",
76
                "fieldType": "boolean",
77
                "connections": []
78
              }
79
            },
80
            {
81
              "id": "c",
82
              "next": [
83
                {
84
                  "id": "f",
85
                  "condition": {
86
                    "expr": "f.result > 5",
87
                    "type": "evalv2",
88
                    "fieldType": "boolean",
89
                    "connections": [
90
                      {
91
                        "id": "result",
92
                        "componentId": "f"
93
                      }
94
                    ]
95
                  }
96
                },
97
                {
98
                  "id": "e",
99
                  "condition": {
100
                    "expr": "f.result <= 5",
101
                    "type": "evalv2",
102
                    "fieldType": "boolean",
103
                    "connections": [
104
                      {
105
                        "id": "result",
106
                        "componentId": "f"
107
                      }
108
                    ]
109
                  }
110
                }
111
              ],
112
              "label": "Feedback",
113
              "allowed": {
114
                "expr": "true",
115
                "type": "evalv2",
116
                "fieldType": "boolean",
117
                "connections": []
118
              }
119
            },
120
            {
121
              "id": "d",
122
              "next": [],
123
              "label": "d",
124
              "allowed": {
125
                "expr": "true",
126
                "type": "evalv2",
127
                "fieldType": "boolean",
128
                "connections": []
129
              }
130
            },
131
            {
132
              "id": "e",
133
              "next": [
134
                {
135
                  "id": "d",
136
                  "condition": {
137
                    "expr": "true",
138
                    "type": "evalv2",
139
                    "fieldType": "boolean",
140
                    "connections": []
141
                  }
142
                }
143
              ],
144
              "label": "Not happy",
145
              "allowed": {
146
                "expr": "true",
147
                "type": "evalv2",
148
                "fieldType": "boolean",
149
                "connections": []
150
              }
151
            },
152
            {
153
              "id": "f",
154
              "next": [
155
                {
156
                  "id": "d",
157
                  "condition": {
158
                    "expr": "true",
159
                    "type": "evalv2",
160
                    "fieldType": "boolean",
161
                    "connections": []
162
                  }
163
                }
164
              ],
165
              "label": "Happy",
166
              "allowed": {
167
                "expr": "true",
168
                "type": "evalv2",
169
                "fieldType": "boolean",
170
                "connections": []
171
              }
172
            }
173
          ],
174
          "customCss": {
175
            "container": {
176
              "class": "",
177
              "style": ""
178
            }
179
          },
180
          "configuration": {},
181
          "numberOfSubgrids": 6
182
        }
183
      }
184
    ],
185
    "theme": {
186
      "path": "f/app_themes/theme_0",
187
      "type": "path"
188
    },
189
    "subgrids": {
190
      "a-0": [
191
        {
192
          "3": {
193
            "h": 8,
194
            "w": 3,
195
            "x": 0,
196
            "y": 0,
197
            "fixed": false
198
          },
199
          "12": {
200
            "h": 9,
201
            "w": 12,
202
            "x": 0,
203
            "y": 0,
204
            "id": "b",
205
            "fixed": false
206
          },
207
          "id": "b",
208
          "data": {
209
            "id": "b",
210
            "type": "schemaformcomponent",
211
            "customCss": {
212
              "label": {
213
                "class": "",
214
                "style": ""
215
              },
216
              "container": {
217
                "class": "",
218
                "style": ""
219
              },
220
              "description": {
221
                "class": "",
222
                "style": ""
223
              }
224
            },
225
            "configuration": {
226
              "largeGap": {
227
                "type": "static",
228
                "value": false
229
              },
230
              "displayType": {
231
                "type": "static",
232
                "value": false
233
              }
234
            },
235
            "componentInput": {
236
              "type": "static",
237
              "value": {
238
                "order": [
239
                  "first_name",
240
                  "City"
241
                ],
242
                "required": [],
243
                "properties": {
244
                  "City": {
245
                    "type": "string",
246
                    "default": "",
247
                    "description": "Where do you live"
248
                  },
249
                  "first_name": {
250
                    "type": "string",
251
                    "default": "",
252
                    "description": "your name"
253
                  }
254
                }
255
              },
256
              "fieldType": "schema"
257
            }
258
          }
259
        }
260
      ],
261
      "a-1": [
262
        {
263
          "3": {
264
            "h": 8,
265
            "w": 3,
266
            "x": 0,
267
            "y": 0,
268
            "fixed": false
269
          },
270
          "12": {
271
            "h": 6,
272
            "w": 12,
273
            "x": 0,
274
            "y": 0,
275
            "id": "c",
276
            "fixed": false
277
          },
278
          "id": "c",
279
          "data": {
280
            "id": "c",
281
            "type": "schemaformcomponent",
282
            "customCss": {
283
              "label": {
284
                "class": "",
285
                "style": ""
286
              },
287
              "container": {
288
                "class": "",
289
                "style": ""
290
              },
291
              "description": {
292
                "class": "",
293
                "style": ""
294
              }
295
            },
296
            "configuration": {
297
              "largeGap": {
298
                "type": "static",
299
                "value": false
300
              },
301
              "displayType": {
302
                "type": "static",
303
                "value": false
304
              }
305
            },
306
            "componentInput": {
307
              "type": "static",
308
              "value": {
309
                "order": [
310
                  "Email",
311
                  "Contact"
312
                ],
313
                "required": [],
314
                "properties": {
315
                  "Email": {
316
                    "type": "string",
317
                    "format": "email",
318
                    "default": "",
319
                    "pattern": "^[\\w-.]+@([\\w-]+\\.)+[\\w-]{2,4}$",
320
                    "description": ""
321
                  },
322
                  "Contact": {
323
                    "enum": [
324
                      "Email",
325
                      "Slack"
326
                    ],
327
                    "type": "string",
328
                    "default": "",
329
                    "description": "How should we get in touch?"
330
                  }
331
                }
332
              },
333
              "fieldType": "schema"
334
            }
335
          }
336
        },
337
        {
338
          "3": {
339
            "h": 1,
340
            "w": 1,
341
            "x": 0,
342
            "y": 8,
343
            "fixed": false
344
          },
345
          "12": {
346
            "h": 1,
347
            "w": 4,
348
            "x": 4,
349
            "y": 6,
350
            "id": "d",
351
            "fixed": false
352
          },
353
          "id": "d",
354
          "data": {
355
            "id": "d",
356
            "type": "buttoncomponent",
357
            "customCss": {
358
              "button": {
359
                "class": "",
360
                "style": ""
361
              },
362
              "container": {
363
                "class": "",
364
                "style": ""
365
              }
366
            },
367
            "recomputeIds": [],
368
            "configuration": {
369
              "size": {
370
                "type": "static",
371
                "value": "xs"
372
              },
373
              "color": {
374
                "type": "static",
375
                "value": "dark"
376
              },
377
              "label": {
378
                "type": "static",
379
                "value": "Send test"
380
              },
381
              "onError": {
382
                "type": "oneOf",
383
                "selected": "errorOverlay",
384
                "configuration": {
385
                  "open": {
386
                    "id": {
387
                      "type": "static",
388
                      "value": ""
389
                    }
390
                  },
391
                  "close": {
392
                    "id": {
393
                      "type": "static",
394
                      "value": ""
395
                    }
396
                  },
397
                  "setTab": {
398
                    "setTab": {
399
                      "type": "static",
400
                      "value": []
401
                    }
402
                  },
403
                  "gotoUrl": {
404
                    "url": {
405
                      "type": "static",
406
                      "value": ""
407
                    },
408
                    "newTab": {
409
                      "type": "static",
410
                      "value": true
411
                    }
412
                  },
413
                  "errorOverlay": {},
414
                  "sendErrorToast": {
415
                    "message": {
416
                      "type": "static",
417
                      "value": ""
418
                    },
419
                    "appendError": {
420
                      "type": "static",
421
                      "value": true
422
                    }
423
                  }
424
                }
425
              },
426
              "disabled": {
427
                "type": "static",
428
                "value": false
429
              },
430
              "afterIcon": {
431
                "type": "static",
432
                "value": ""
433
              },
434
              "onSuccess": {
435
                "type": "oneOf",
436
                "selected": "none",
437
                "configuration": {
438
                  "none": {},
439
                  "open": {
440
                    "id": {
441
                      "type": "static",
442
                      "value": ""
443
                    }
444
                  },
445
                  "close": {
446
                    "id": {
447
                      "type": "static",
448
                      "value": ""
449
                    }
450
                  },
451
                  "setTab": {
452
                    "setTab": {
453
                      "type": "static",
454
                      "value": []
455
                    }
456
                  },
457
                  "gotoUrl": {
458
                    "url": {
459
                      "type": "static",
460
                      "value": ""
461
                    },
462
                    "newTab": {
463
                      "type": "static",
464
                      "value": true
465
                    }
466
                  },
467
                  "openModal": {
468
                    "modalId": {
469
                      "type": "static",
470
                      "value": ""
471
                    }
472
                  },
473
                  "sendToast": {
474
                    "message": {
475
                      "type": "static",
476
                      "value": ""
477
                    }
478
                  },
479
                  "closeModal": {
480
                    "modalId": {
481
                      "type": "static",
482
                      "value": ""
483
                    }
484
                  }
485
                }
486
              },
487
              "beforeIcon": {
488
                "type": "static",
489
                "value": ""
490
              },
491
              "fillContainer": {
492
                "type": "static",
493
                "value": false
494
              },
495
              "triggerOnAppLoad": {
496
                "type": "static",
497
                "value": false
498
              }
499
            },
500
            "componentInput": {
501
              "type": "runnable",
502
              "fields": {
503
                "email": {
504
                  "expr": "c.values.Email",
505
                  "type": "evalv2",
506
                  "value": "",
507
                  "format": "",
508
                  "fieldType": "string",
509
                  "connections": [
510
                    {
511
                      "id": "values",
512
                      "componentId": "c"
513
                    }
514
                  ]
515
                },
516
                "method": {
517
                  "expr": "c.values.Contact",
518
                  "type": "evalv2",
519
                  "value": "",
520
                  "format": "",
521
                  "fieldType": "string",
522
                  "connections": [
523
                    {
524
                      "id": "values",
525
                      "componentId": "c"
526
                    }
527
                  ]
528
                }
529
              },
530
              "runnable": {
531
                "name": "u/henri/contact_method",
532
                "path": "u/henri/contact_method",
533
                "type": "runnableByPath",
534
                "schema": {
535
                  "type": "object",
536
                  "order": [
537
                    "email",
538
                    "method"
539
                  ],
540
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
541
                  "required": [],
542
                  "properties": {
543
                    "email": {
544
                      "type": "string",
545
                      "format": "",
546
                      "default": "",
547
                      "description": ""
548
                    },
549
                    "method": {
550
                      "type": "string",
551
                      "format": "",
552
                      "default": "",
553
                      "description": ""
554
                    }
555
                  }
556
                },
557
                "runType": "flow"
558
              },
559
              "fieldType": "any",
560
              "autoRefresh": false,
561
              "recomputeOnInputChanged": false
562
            },
563
            "verticalAlignment": "center",
564
            "horizontalAlignment": "center"
565
          }
566
        }
567
      ],
568
      "a-2": [
569
        {
570
          "3": {
571
            "h": 1,
572
            "w": 1,
573
            "x": 0,
574
            "y": 0,
575
            "fixed": false
576
          },
577
          "12": {
578
            "h": 2,
579
            "w": 8,
580
            "x": 2,
581
            "y": 1,
582
            "id": "e",
583
            "fixed": false
584
          },
585
          "id": "e",
586
          "data": {
587
            "id": "e",
588
            "type": "textcomponent",
589
            "customCss": {
590
              "text": {
591
                "class": "",
592
                "style": ""
593
              },
594
              "container": {
595
                "class": "",
596
                "style": ""
597
              }
598
            },
599
            "configuration": {
600
              "style": {
601
                "type": "static",
602
                "value": "Body"
603
              },
604
              "tooltip": {
605
                "type": "static",
606
                "value": ""
607
              },
608
              "copyButton": {
609
                "type": "static",
610
                "value": false
611
              }
612
            },
613
            "componentInput": {
614
              "eval": "How did you like the experience?",
615
              "type": "templatev2",
616
              "value": "Hello ${ctx.username}",
617
              "fieldType": "template",
618
              "connections": []
619
            },
620
            "verticalAlignment": "top",
621
            "horizontalAlignment": "center"
622
          }
623
        },
624
        {
625
          "3": {
626
            "h": 1,
627
            "w": 3,
628
            "x": 0,
629
            "y": 1,
630
            "fixed": false
631
          },
632
          "12": {
633
            "h": 2,
634
            "w": 8,
635
            "x": 2,
636
            "y": 4,
637
            "id": "f",
638
            "fixed": false
639
          },
640
          "id": "f",
641
          "data": {
642
            "id": "f",
643
            "type": "slidercomponent",
644
            "customCss": {
645
              "bar": {
646
                "class": "",
647
                "style": ""
648
              },
649
              "value": {
650
                "class": "",
651
                "style": ""
652
              },
653
              "handle": {
654
                "class": "",
655
                "style": ""
656
              },
657
              "limits": {
658
                "class": "",
659
                "style": ""
660
              }
661
            },
662
            "configuration": {
663
              "max": {
664
                "type": "static",
665
                "value": 10
666
              },
667
              "min": {
668
                "type": "static",
669
                "value": 0
670
              },
671
              "step": {
672
                "type": "static",
673
                "value": 1
674
              },
675
              "vertical": {
676
                "type": "static",
677
                "value": false
678
              },
679
              "defaultValue": {
680
                "type": "static",
681
                "value": 5
682
              }
683
            },
684
            "verticalAlignment": "center"
685
          }
686
        }
687
      ],
688
      "a-3": [
689
        {
690
          "3": {
691
            "h": 1,
692
            "w": 1,
693
            "x": 0,
694
            "y": 0,
695
            "fixed": false
696
          },
697
          "12": {
698
            "h": 1,
699
            "w": 8,
700
            "x": 2,
701
            "y": 1,
702
            "id": "i",
703
            "fixed": false
704
          },
705
          "id": "i",
706
          "data": {
707
            "id": "i",
708
            "type": "textcomponent",
709
            "customCss": {
710
              "text": {
711
                "class": "",
712
                "style": ""
713
              },
714
              "container": {
715
                "class": "",
716
                "style": ""
717
              }
718
            },
719
            "configuration": {
720
              "style": {
721
                "type": "static",
722
                "value": "Body"
723
              },
724
              "tooltip": {
725
                "type": "static",
726
                "value": ""
727
              },
728
              "copyButton": {
729
                "type": "static",
730
                "value": false
731
              }
732
            },
733
            "componentInput": {
734
              "eval": "Thanks for your time, do not forget to submit :)",
735
              "type": "templatev2",
736
              "value": "Hello ${ctx.username}",
737
              "fieldType": "template",
738
              "connections": []
739
            },
740
            "verticalAlignment": "top",
741
            "horizontalAlignment": "left"
742
          }
743
        },
744
        {
745
          "3": {
746
            "h": 1,
747
            "w": 1,
748
            "x": 1,
749
            "y": 0,
750
            "fixed": false
751
          },
752
          "12": {
753
            "h": 1,
754
            "w": 2,
755
            "x": 5,
756
            "y": 4,
757
            "id": "j",
758
            "fixed": false
759
          },
760
          "id": "j",
761
          "data": {
762
            "id": "j",
763
            "type": "buttoncomponent",
764
            "customCss": {
765
              "button": {
766
                "class": "",
767
                "style": ""
768
              },
769
              "container": {
770
                "class": "",
771
                "style": ""
772
              }
773
            },
774
            "recomputeIds": [],
775
            "configuration": {
776
              "size": {
777
                "type": "static",
778
                "value": "xs"
779
              },
780
              "color": {
781
                "type": "static",
782
                "value": "green"
783
              },
784
              "label": {
785
                "type": "static",
786
                "value": "Submit"
787
              },
788
              "onError": {
789
                "type": "oneOf",
790
                "selected": "errorOverlay",
791
                "configuration": {
792
                  "open": {
793
                    "id": {
794
                      "type": "static",
795
                      "value": ""
796
                    }
797
                  },
798
                  "close": {
799
                    "id": {
800
                      "type": "static",
801
                      "value": ""
802
                    }
803
                  },
804
                  "setTab": {
805
                    "setTab": {
806
                      "type": "static",
807
                      "value": []
808
                    }
809
                  },
810
                  "gotoUrl": {
811
                    "url": {
812
                      "type": "static",
813
                      "value": ""
814
                    },
815
                    "newTab": {
816
                      "type": "static",
817
                      "value": true
818
                    }
819
                  },
820
                  "errorOverlay": {},
821
                  "sendErrorToast": {
822
                    "message": {
823
                      "type": "static",
824
                      "value": ""
825
                    },
826
                    "appendError": {
827
                      "type": "static",
828
                      "value": true
829
                    }
830
                  }
831
                }
832
              },
833
              "disabled": {
834
                "type": "static",
835
                "value": false
836
              },
837
              "afterIcon": {
838
                "type": "static",
839
                "value": ""
840
              },
841
              "onSuccess": {
842
                "type": "oneOf",
843
                "selected": "none",
844
                "configuration": {
845
                  "none": {},
846
                  "open": {
847
                    "id": {
848
                      "type": "static",
849
                      "value": ""
850
                    }
851
                  },
852
                  "close": {
853
                    "id": {
854
                      "type": "static",
855
                      "value": ""
856
                    }
857
                  },
858
                  "setTab": {
859
                    "setTab": {
860
                      "type": "static",
861
                      "value": []
862
                    }
863
                  },
864
                  "gotoUrl": {
865
                    "url": {
866
                      "type": "static",
867
                      "value": ""
868
                    },
869
                    "newTab": {
870
                      "type": "static",
871
                      "value": true
872
                    }
873
                  },
874
                  "openModal": {
875
                    "modalId": {
876
                      "type": "static",
877
                      "value": ""
878
                    }
879
                  },
880
                  "sendToast": {
881
                    "message": {
882
                      "type": "static",
883
                      "value": ""
884
                    }
885
                  },
886
                  "closeModal": {
887
                    "modalId": {
888
                      "type": "static",
889
                      "value": ""
890
                    }
891
                  }
892
                }
893
              },
894
              "beforeIcon": {
895
                "type": "static",
896
                "value": ""
897
              },
898
              "fillContainer": {
899
                "type": "static",
900
                "value": false
901
              },
902
              "triggerOnAppLoad": {
903
                "type": "static",
904
                "value": false
905
              }
906
            },
907
            "componentInput": {
908
              "type": "runnable",
909
              "fields": {
910
                "rowData": {
911
                  "expr": "{\n  \"name\": b.values.first_name,\n  \"city\": b.values.City,\n  \"email\": c.values.Email,\n  \"contact\": c.values.Contact,\n  \"rating\": f.result,\n  \"feedback\": bg_0.result\n}",
912
                  "type": "evalv2",
913
                  "value": null,
914
                  "format": "resource-record",
915
                  "fieldType": "object",
916
                  "connections": []
917
                },
918
                "tableName": {
919
                  "type": "static",
920
                  "value": "user_form",
921
                  "fieldType": "string"
922
                },
923
                "supabaseResource": {
924
                  "type": "static",
925
                  "value": "$res:u/henri/wm_showcases_supabase",
926
                  "format": "resource-supabase",
927
                  "fieldType": "object"
928
                }
929
              },
930
              "runnable": {
931
                "name": "Inline Script 0",
932
                "type": "runnableByName",
933
                "inlineScript": {
934
                  "lock": "{\n  \"version\": \"3\",\n  \"packages\": {\n    \"specifiers\": {\n      \"npm:@supabase/supabase-js\": \"npm:@supabase/supabase-js@2.39.1\"\n    },\n    \"npm\": {\n      \"@supabase/functions-js@2.1.5\": {\n        \"integrity\": \"sha512-BNzC5XhCzzCaggJ8s53DP+WeHHGT/NfTsx2wUSSGKR2/ikLFQTBCDzMvGz/PxYMqRko/LwncQtKXGOYp1PkPaw==\",\n        \"dependencies\": {\n          \"@supabase/node-fetch\": \"@supabase/node-fetch@2.6.15\"\n        }\n      },\n      \"@supabase/gotrue-js@2.62.0\": {\n        \"integrity\": \"sha512-4eBuZNXGOk7ewqJuHPYMnk8clCtEx6Hfnu6yHLjZlx7w18TqcojcTRUBZagErtpgwwdfzUwKbquexhbrpH/ysw==\",\n        \"dependencies\": {\n          \"@supabase/node-fetch\": \"@supabase/node-fetch@2.6.15\"\n        }\n      },\n      \"@supabase/node-fetch@2.6.15\": {\n        \"integrity\": \"sha512-1ibVeYUacxWYi9i0cf5efil6adJ9WRyZBLivgjs+AUpewx1F3xPi7gLgaASI2SmIQxPoCEjAsLAzKPgMJVgOUQ==\",\n        \"dependencies\": {\n          \"whatwg-url\": \"whatwg-url@5.0.0\"\n        }\n      },\n      \"@supabase/postgrest-js@1.9.0\": {\n        \"integrity\": \"sha512-axP6cU69jDrLbfihJKQ6vU27tklD0gzb9idkMN363MtTXeJVt5DQNT3JnJ58JVNBdL74hgm26rAsFNvHk+tnSw==\",\n        \"dependencies\": {\n          \"@supabase/node-fetch\": \"@supabase/node-fetch@2.6.15\"\n        }\n      },\n      \"@supabase/realtime-js@2.9.1\": {\n        \"integrity\": \"sha512-OxmY2qj+y6+KI4ifTL92j5+WYP+u5/PdThlYxVb0GMcMiMHfA7yIku9yaQNC5/oRdIvhuRpTMG/8/R40eB+8pA==\",\n        \"dependencies\": {\n          \"@supabase/node-fetch\": \"@supabase/node-fetch@2.6.15\",\n          \"@types/phoenix\": \"@types/phoenix@1.6.4\",\n          \"ws\": \"ws@8.16.0\"\n        }\n      },\n      \"@supabase/storage-js@2.5.5\": {\n        \"integrity\": \"sha512-OpLoDRjFwClwc2cjTJZG8XviTiQH4Ik8sCiMK5v7et0MDu2QlXjCAW3ljxJB5+z/KazdMOTnySi+hysxWUPu3w==\",\n        \"dependencies\": {\n          \"@supabase/node-fetch\": \"@supabase/node-fetch@2.6.15\"\n        }\n      },\n      \"@supabase/supabase-js@2.39.1\": {\n        \"integrity\": \"sha512-nz0aQPButJWjChX+bLXqvhHutfiOuiJwzibyJs0uhFrQ6JRDZZsl9+nX2jgyox2v2V+e4PEwbn/eaEOFVUr8iA==\",\n        \"dependencies\": {\n          \"@supabase/functions-js\": \"@supabase/functions-js@2.1.5\",\n          \"@supabase/gotrue-js\": \"@supabase/gotrue-js@2.62.0\",\n          \"@supabase/node-fetch\": \"@supabase/node-fetch@2.6.15\",\n          \"@supabase/postgrest-js\": \"@supabase/postgrest-js@1.9.0\",\n          \"@supabase/realtime-js\": \"@supabase/realtime-js@2.9.1\",\n          \"@supabase/storage-js\": \"@supabase/storage-js@2.5.5\"\n        }\n      },\n      \"@types/phoenix@1.6.4\": {\n        \"integrity\": \"sha512-B34A7uot1Cv0XtaHRYDATltAdKx0BvVKNgYNqE4WjtPUa4VQJM7kxeXcVKaH+KS+kCmZ+6w+QaUdcljiheiBJA==\",\n        \"dependencies\": {}\n      },\n      \"tr46@0.0.3\": {\n        \"integrity\": \"sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==\",\n        \"dependencies\": {}\n      },\n      \"webidl-conversions@3.0.1\": {\n        \"integrity\": \"sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==\",\n        \"dependencies\": {}\n      },\n      \"whatwg-url@5.0.0\": {\n        \"integrity\": \"sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==\",\n        \"dependencies\": {\n          \"tr46\": \"tr46@0.0.3\",\n          \"webidl-conversions\": \"webidl-conversions@3.0.1\"\n        }\n      },\n      \"ws@8.16.0\": {\n        \"integrity\": \"sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==\",\n        \"dependencies\": {}\n      }\n    }\n  },\n  \"remote\": {}\n}\n",
935
                  "path": "u/henri/newapp/Inline_Script_0",
936
                  "schema": {
937
                    "type": "object",
938
                    "$schema": "https://json-schema.org/draft/2020-12/schema",
939
                    "required": [
940
                      "supabaseResource",
941
                      "tableName",
942
                      "rowData"
943
                    ],
944
                    "properties": {
945
                      "rowData": {
946
                        "type": "object",
947
                        "format": "resource-record",
948
                        "default": null,
949
                        "description": ""
950
                      },
951
                      "tableName": {
952
                        "type": "string",
953
                        "default": null,
954
                        "description": ""
955
                      },
956
                      "supabaseResource": {
957
                        "type": "object",
958
                        "format": "resource-supabase",
959
                        "default": null,
960
                        "description": ""
961
                      }
962
                    }
963
                  },
964
                  "content": "import { createClient } from \"npm:@supabase/supabase-js\";\n\n// Define the Supabase resource type as specified\ntype Supabase = {\n  key: string;\n  url: string;\n};\n\nexport async function main(\n  supabaseResource: Supabase,\n  tableName: string,\n  rowData: Record<string, any>,\n) {\n  // Initialize the Supabase client\n  const supabase = createClient(supabaseResource.url, supabaseResource.key);\n\n  // Insert a row into the specified table\n  const { data, error } = await supabase\n    .from(tableName)\n    .insert([rowData]);\n\n  // Return the result or throw an error if the operation failed\n  if (error) {\n    throw error;\n  }\n\n  return data;\n}\n",
965
                  "language": "deno"
966
                }
967
              },
968
              "fieldType": "any",
969
              "autoRefresh": false,
970
              "recomputeOnInputChanged": false
971
            },
972
            "verticalAlignment": "center",
973
            "horizontalAlignment": "center"
974
          }
975
        }
976
      ],
977
      "a-4": [
978
        {
979
          "3": {
980
            "h": 8,
981
            "w": 3,
982
            "x": 0,
983
            "y": 0,
984
            "fixed": false
985
          },
986
          "12": {
987
            "h": 8,
988
            "w": 12,
989
            "x": 0,
990
            "y": 0,
991
            "id": "g",
992
            "fixed": false
993
          },
994
          "id": "h",
995
          "data": {
996
            "id": "h",
997
            "type": "schemaformcomponent",
998
            "customCss": {
999
              "label": {
1000
                "class": "",
1001
                "style": ""
1002
              },
1003
              "container": {
1004
                "class": "",
1005
                "style": ""
1006
              },
1007
              "description": {
1008
                "class": "",
1009
                "style": ""
1010
              }
1011
            },
1012
            "configuration": {
1013
              "largeGap": {
1014
                "type": "static",
1015
                "value": false
1016
              },
1017
              "displayType": {
1018
                "type": "static",
1019
                "value": false
1020
              }
1021
            },
1022
            "componentInput": {
1023
              "type": "static",
1024
              "value": {
1025
                "order": [
1026
                  "Feedback"
1027
                ],
1028
                "required": [],
1029
                "properties": {
1030
                  "Feedback": {
1031
                    "type": "string",
1032
                    "default": "",
1033
                    "description": "Where could we improve?"
1034
                  }
1035
                }
1036
              },
1037
              "fieldType": "schema"
1038
            }
1039
          }
1040
        }
1041
      ],
1042
      "a-5": [
1043
        {
1044
          "3": {
1045
            "h": 8,
1046
            "w": 3,
1047
            "x": 0,
1048
            "y": 0,
1049
            "fixed": false
1050
          },
1051
          "12": {
1052
            "h": 8,
1053
            "w": 12,
1054
            "x": 0,
1055
            "y": 0,
1056
            "id": "g",
1057
            "fixed": false
1058
          },
1059
          "id": "g",
1060
          "data": {
1061
            "id": "g",
1062
            "type": "schemaformcomponent",
1063
            "customCss": {
1064
              "label": {
1065
                "class": "",
1066
                "style": ""
1067
              },
1068
              "container": {
1069
                "class": "",
1070
                "style": ""
1071
              },
1072
              "description": {
1073
                "class": "",
1074
                "style": ""
1075
              }
1076
            },
1077
            "configuration": {
1078
              "largeGap": {
1079
                "type": "static",
1080
                "value": false
1081
              },
1082
              "displayType": {
1083
                "type": "static",
1084
                "value": false
1085
              }
1086
            },
1087
            "componentInput": {
1088
              "type": "static",
1089
              "value": {
1090
                "order": [
1091
                  "Feedback"
1092
                ],
1093
                "required": [],
1094
                "properties": {
1095
                  "Feedback": {
1096
                    "type": "string",
1097
                    "default": "",
1098
                    "description": "What did you like the most?"
1099
                  }
1100
                }
1101
              },
1102
              "fieldType": "schema"
1103
            }
1104
          }
1105
        }
1106
      ]
1107
    },
1108
    "fullscreen": false,
1109
    "norefreshbar": false,
1110
    "hiddenInlineScripts": [
1111
      {
1112
        "name": "Background Runnable 0",
1113
        "type": "runnableByName",
1114
        "fields": {
1115
          "negative": {
1116
            "expr": "h.values.Feedback",
1117
            "type": "evalv2",
1118
            "value": null,
1119
            "fieldType": "object",
1120
            "connections": [
1121
              {
1122
                "id": "values",
1123
                "componentId": "h"
1124
              }
1125
            ]
1126
          },
1127
          "positive": {
1128
            "expr": "g.values.Feedback",
1129
            "type": "evalv2",
1130
            "value": null,
1131
            "fieldType": "object",
1132
            "connections": [
1133
              {
1134
                "id": "values",
1135
                "componentId": "g"
1136
              }
1137
            ]
1138
          }
1139
        },
1140
        "autoRefresh": true,
1141
        "inlineScript": {
1142
          "lock": "",
1143
          "path": "u/henri/newapp/Background_Runnable_0",
1144
          "schema": {
1145
            "type": "object",
1146
            "$schema": "https://json-schema.org/draft/2020-12/schema",
1147
            "required": [],
1148
            "properties": {
1149
              "negative": {
1150
                "type": "object",
1151
                "default": null,
1152
                "description": ""
1153
              },
1154
              "positive": {
1155
                "type": "object",
1156
                "default": null,
1157
                "description": ""
1158
              }
1159
            }
1160
          },
1161
          "content": "from typing import Optional, TypedDict\n\n\n# Define the main function with optional parameters 'positive' and 'negative'\ndef main(positive: Optional[str] = None, negative: Optional[str] = None) -> str:\n    # Check if both 'positive' and 'negative' are provided\n    if positive and negative:\n        return f\"{positive}.{negative}\"\n    # Return 'positive' if only 'positive' is provided\n    elif positive:\n        return positive\n    # Return 'negative' if only 'negative' is provided\n    elif negative:\n        return negative\n    # Return an empty string if neither is provided\n    else:\n        return \"\"\n",
1162
          "language": "python3"
1163
        },
1164
        "recomputeIds": [],
1165
        "noBackendValue": "",
1166
        "recomputeOnInputChanged": true
1167
      }
1168
    ],
1169
    "unusedInlineScripts": []
1170
  }
1171
}
Orvanta Hub — community scripts, flows, apps & resource types.