@modelform/react-native 0.0.0-stage → 0.1.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.
Files changed (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +103 -2
  3. package/dist/chunk-L4SQVIJV.js +10630 -0
  4. package/dist/chunk-PIHXMZ4G.mjs +10630 -0
  5. package/dist/core/configSchema.d.ts +29 -0
  6. package/dist/core/dashboardSettings.d.ts +34 -0
  7. package/dist/core/datasource.d.ts +61 -0
  8. package/dist/core/documents.d.ts +35 -0
  9. package/dist/core/editing.d.ts +129 -0
  10. package/dist/core/fieldconfig.d.ts +12 -0
  11. package/dist/core/format.d.ts +29 -0
  12. package/dist/core/frame.d.ts +51 -0
  13. package/dist/core/gazetteer.d.ts +25 -0
  14. package/dist/core/grafana.d.ts +85 -0
  15. package/dist/core/index.d.ts +27 -0
  16. package/dist/core/index.js +380 -0
  17. package/dist/core/index.mjs +380 -0
  18. package/dist/core/inputs.d.ts +99 -0
  19. package/dist/core/jsonEdit.d.ts +30 -0
  20. package/dist/core/layout.d.ts +49 -0
  21. package/dist/core/layoutEdit.d.ts +87 -0
  22. package/dist/core/links.d.ts +56 -0
  23. package/dist/core/local.d.ts +95 -0
  24. package/dist/core/manifest.d.ts +201 -0
  25. package/dist/core/mappings.d.ts +46 -0
  26. package/dist/core/navigation.d.ts +19 -0
  27. package/dist/core/panelOptions.d.ts +109 -0
  28. package/dist/core/reduce.d.ts +6 -0
  29. package/dist/core/resolveVariables.d.ts +38 -0
  30. package/dist/core/sample.d.ts +13 -0
  31. package/dist/core/schema.d.ts +202 -0
  32. package/dist/core/time.d.ts +66 -0
  33. package/dist/core/transform.d.ts +12 -0
  34. package/dist/core/variables.d.ts +76 -0
  35. package/dist/index.d.ts +11 -0
  36. package/dist/index.js +4156 -0
  37. package/dist/index.mjs +4156 -0
  38. package/dist/ui/Chip.d.ts +5 -0
  39. package/dist/ui/DashboardView.d.ts +22 -0
  40. package/dist/ui/RenderBoundary.d.ts +25 -0
  41. package/dist/ui/TimeRangeSheet.d.ts +24 -0
  42. package/dist/ui/Toolbar.d.ts +6 -0
  43. package/dist/ui/chart.d.ts +69 -0
  44. package/dist/ui/context.d.ts +68 -0
  45. package/dist/ui/geomap.d.ts +157 -0
  46. package/dist/ui/inputs/InputForm.d.ts +36 -0
  47. package/dist/ui/inputs/InputPanels.d.ts +4 -0
  48. package/dist/ui/inputs/formContext.d.ts +14 -0
  49. package/dist/ui/links.d.ts +28 -0
  50. package/dist/ui/panels/GaugePanels.d.ts +5 -0
  51. package/dist/ui/panels/GeomapPanel.d.ts +6 -0
  52. package/dist/ui/panels/OtherPanels.d.ts +18 -0
  53. package/dist/ui/panels/StatPanel.d.ts +14 -0
  54. package/dist/ui/panels/TimeSeriesPanel.d.ts +8 -0
  55. package/dist/ui/panels/XYChartPanel.d.ts +6 -0
  56. package/dist/ui/panels/common.d.ts +78 -0
  57. package/dist/ui/panels/registry.d.ts +5 -0
  58. package/dist/ui/table.d.ts +62 -0
  59. package/dist/ui/theme.d.ts +21 -0
  60. package/dist/ui/xychart.d.ts +27 -0
  61. package/package.json +89 -3
  62. package/schema/app.schema.json +184 -0
  63. package/schema/dashboard.schema.json +940 -0
  64. package/tools/dashboards.js +90 -0
  65. package/tools/metro.js +21 -0
@@ -0,0 +1,940 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "urn:modelform:dashboard",
4
+ "title": "modelform dashboard or form",
5
+ "$ref": "#/definitions/Dashboard",
6
+ "definitions": {
7
+ "Dashboard": {
8
+ "type": "object",
9
+ "properties": {
10
+ "uid": {
11
+ "type": "string"
12
+ },
13
+ "title": {
14
+ "type": "string"
15
+ },
16
+ "description": {
17
+ "type": "string"
18
+ },
19
+ "tags": {
20
+ "type": "array",
21
+ "items": {
22
+ "type": "string"
23
+ }
24
+ },
25
+ "panels": {
26
+ "type": "array",
27
+ "items": {
28
+ "$ref": "#/definitions/Panel"
29
+ }
30
+ },
31
+ "templating": {
32
+ "type": "object",
33
+ "properties": {
34
+ "list": {
35
+ "type": "array",
36
+ "items": {
37
+ "$ref": "#/definitions/TemplateVariable"
38
+ }
39
+ }
40
+ },
41
+ "required": [
42
+ "list"
43
+ ]
44
+ },
45
+ "time": {
46
+ "type": "object",
47
+ "properties": {
48
+ "from": {
49
+ "type": "string"
50
+ },
51
+ "to": {
52
+ "type": "string"
53
+ }
54
+ },
55
+ "required": [
56
+ "from",
57
+ "to"
58
+ ]
59
+ },
60
+ "timezone": {
61
+ "type": "string",
62
+ "description": "\"browser\" (the default), \"utc\", or an IANA zone such as \"Europe/London\"."
63
+ },
64
+ "refresh": {
65
+ "anyOf": [
66
+ {
67
+ "type": "string"
68
+ },
69
+ {
70
+ "type": "boolean",
71
+ "const": false
72
+ }
73
+ ]
74
+ },
75
+ "__inputs": {
76
+ "type": "array",
77
+ "items": {
78
+ "type": "object",
79
+ "properties": {
80
+ "name": {
81
+ "type": "string"
82
+ },
83
+ "type": {
84
+ "type": "string"
85
+ },
86
+ "pluginId": {
87
+ "type": "string"
88
+ }
89
+ },
90
+ "required": [
91
+ "name",
92
+ "type"
93
+ ]
94
+ },
95
+ "description": "Present on dashboards exported \"for sharing externally\"."
96
+ }
97
+ },
98
+ "required": [
99
+ "title",
100
+ "panels"
101
+ ],
102
+ "description": "The subset of the Grafana dashboard JSON model that modelform understands. Unknown keys are tolerated and ignored, so dashboards exported from Grafana load as-is. See https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/view-dashboard-json-model/\n\nmodelform adds two extensions, both of which Grafana ignores: - `panel.mobile` to tune phone layout per panel - `input-*` panel types for data entry forms (see inputs.ts)"
103
+ },
104
+ "Panel": {
105
+ "type": "object",
106
+ "properties": {
107
+ "id": {
108
+ "type": "number"
109
+ },
110
+ "type": {
111
+ "type": "string",
112
+ "examples": [
113
+ "row",
114
+ "timeseries",
115
+ "trend",
116
+ "xychart",
117
+ "stat",
118
+ "gauge",
119
+ "bargauge",
120
+ "piechart",
121
+ "barchart",
122
+ "table",
123
+ "text",
124
+ "geomap",
125
+ "input-number",
126
+ "input-slider",
127
+ "input-select",
128
+ "input-toggle",
129
+ "input-rating",
130
+ "input-text",
131
+ "input-counter",
132
+ "input-duration"
133
+ ]
134
+ },
135
+ "title": {
136
+ "type": "string"
137
+ },
138
+ "description": {
139
+ "type": "string"
140
+ },
141
+ "gridPos": {
142
+ "$ref": "#/definitions/GridPos"
143
+ },
144
+ "datasource": {
145
+ "anyOf": [
146
+ {
147
+ "$ref": "#/definitions/DataSourceRef"
148
+ },
149
+ {
150
+ "type": "string"
151
+ },
152
+ {
153
+ "type": "null"
154
+ }
155
+ ]
156
+ },
157
+ "targets": {
158
+ "type": "array",
159
+ "items": {
160
+ "$ref": "#/definitions/Target"
161
+ }
162
+ },
163
+ "fieldConfig": {
164
+ "type": "object",
165
+ "properties": {
166
+ "defaults": {
167
+ "$ref": "#/definitions/FieldConfig"
168
+ },
169
+ "overrides": {
170
+ "type": "array",
171
+ "items": {
172
+ "$ref": "#/definitions/FieldOverride"
173
+ }
174
+ }
175
+ }
176
+ },
177
+ "options": {
178
+ "type": "object"
179
+ },
180
+ "transformations": {
181
+ "type": "array",
182
+ "items": {
183
+ "type": "object",
184
+ "properties": {
185
+ "id": {
186
+ "type": "string"
187
+ },
188
+ "options": {
189
+ "type": "object"
190
+ },
191
+ "disabled": {
192
+ "type": "boolean"
193
+ }
194
+ },
195
+ "required": [
196
+ "id"
197
+ ]
198
+ },
199
+ "description": "Applied in order to the query results. See transform.ts for the ones modelform implements."
200
+ },
201
+ "collapsed": {
202
+ "type": "boolean",
203
+ "description": "Rows only."
204
+ },
205
+ "panels": {
206
+ "type": "array",
207
+ "items": {
208
+ "$ref": "#/definitions/Panel"
209
+ },
210
+ "description": "Rows only: children of a collapsed row live here instead of at the top level."
211
+ },
212
+ "repeat": {
213
+ "type": "string",
214
+ "description": "Repeat this row (or panel) once per selected value of the named variable."
215
+ },
216
+ "repeatDirection": {
217
+ "type": "string",
218
+ "enum": [
219
+ "h",
220
+ "v"
221
+ ],
222
+ "description": "Panel repeats: side by side (`h`, wrapping at maxPerRow) or stacked (`v`)."
223
+ },
224
+ "maxPerRow": {
225
+ "type": "number"
226
+ },
227
+ "scopedVars": {
228
+ "type": "object",
229
+ "additionalProperties": {
230
+ "type": "object",
231
+ "properties": {
232
+ "text": {
233
+ "type": "string"
234
+ },
235
+ "value": {
236
+ "type": "string"
237
+ }
238
+ },
239
+ "required": [
240
+ "text",
241
+ "value"
242
+ ]
243
+ },
244
+ "description": "Set on each copy of a repeated row or panel: the single value it was repeated for."
245
+ },
246
+ "mobile": {
247
+ "$ref": "#/definitions/MobileOptions"
248
+ },
249
+ "links": {
250
+ "type": "array",
251
+ "items": {
252
+ "$ref": "#/definitions/DataLink"
253
+ },
254
+ "description": "Panel links, from the panel header menu in Grafana."
255
+ }
256
+ },
257
+ "required": [
258
+ "type",
259
+ "gridPos"
260
+ ],
261
+ "additionalProperties": {},
262
+ "allOf": [
263
+ {
264
+ "if": {
265
+ "properties": {
266
+ "type": {
267
+ "pattern": "^input-"
268
+ }
269
+ },
270
+ "required": [
271
+ "type"
272
+ ]
273
+ },
274
+ "then": {
275
+ "required": [
276
+ "options"
277
+ ],
278
+ "properties": {
279
+ "options": {
280
+ "$ref": "#/definitions/InputOptions"
281
+ }
282
+ }
283
+ }
284
+ }
285
+ ]
286
+ },
287
+ "GridPos": {
288
+ "type": "object",
289
+ "properties": {
290
+ "x": {
291
+ "type": "number"
292
+ },
293
+ "y": {
294
+ "type": "number"
295
+ },
296
+ "w": {
297
+ "type": "number"
298
+ },
299
+ "h": {
300
+ "type": "number"
301
+ }
302
+ },
303
+ "required": [
304
+ "x",
305
+ "y",
306
+ "w",
307
+ "h"
308
+ ]
309
+ },
310
+ "DataSourceRef": {
311
+ "type": "object",
312
+ "properties": {
313
+ "type": {
314
+ "type": "string"
315
+ },
316
+ "uid": {
317
+ "type": "string"
318
+ }
319
+ }
320
+ },
321
+ "Target": {
322
+ "type": "object",
323
+ "properties": {
324
+ "refId": {
325
+ "type": "string"
326
+ },
327
+ "datasource": {
328
+ "anyOf": [
329
+ {
330
+ "$ref": "#/definitions/DataSourceRef"
331
+ },
332
+ {
333
+ "type": "string"
334
+ },
335
+ {
336
+ "type": "null"
337
+ }
338
+ ]
339
+ },
340
+ "hide": {
341
+ "type": "boolean"
342
+ },
343
+ "metric": {
344
+ "type": "string",
345
+ "description": "The local datasource's metric (see LocalTarget). Typed here so a config can't give it something else."
346
+ },
347
+ "alias": {
348
+ "type": "string",
349
+ "description": "Display name for the series."
350
+ }
351
+ },
352
+ "required": [
353
+ "refId"
354
+ ],
355
+ "additionalProperties": {},
356
+ "description": "A panel query. Everything besides refId/datasource is datasource-specific and passed through untouched."
357
+ },
358
+ "FieldConfig": {
359
+ "type": "object",
360
+ "properties": {
361
+ "unit": {
362
+ "type": "string"
363
+ },
364
+ "min": {
365
+ "type": "number"
366
+ },
367
+ "max": {
368
+ "type": "number"
369
+ },
370
+ "decimals": {
371
+ "type": "number"
372
+ },
373
+ "displayName": {
374
+ "type": "string"
375
+ },
376
+ "color": {
377
+ "type": "object",
378
+ "properties": {
379
+ "mode": {
380
+ "type": "string"
381
+ },
382
+ "fixedColor": {
383
+ "type": "string"
384
+ }
385
+ }
386
+ },
387
+ "thresholds": {
388
+ "type": "object",
389
+ "properties": {
390
+ "mode": {
391
+ "type": "string",
392
+ "enum": [
393
+ "absolute",
394
+ "percentage"
395
+ ]
396
+ },
397
+ "steps": {
398
+ "type": "array",
399
+ "items": {
400
+ "$ref": "#/definitions/ThresholdStep"
401
+ }
402
+ }
403
+ },
404
+ "required": [
405
+ "steps"
406
+ ]
407
+ },
408
+ "mappings": {
409
+ "type": "array",
410
+ "items": {
411
+ "$ref": "#/definitions/ValueMapping"
412
+ }
413
+ },
414
+ "links": {
415
+ "type": "array",
416
+ "items": {
417
+ "$ref": "#/definitions/DataLink"
418
+ },
419
+ "description": "Data links: opened from a point, cell or value of this field."
420
+ },
421
+ "custom": {
422
+ "type": "object",
423
+ "properties": {
424
+ "drawStyle": {
425
+ "type": "string",
426
+ "enum": [
427
+ "line",
428
+ "bars",
429
+ "points"
430
+ ]
431
+ },
432
+ "lineWidth": {
433
+ "type": "number"
434
+ },
435
+ "fillOpacity": {
436
+ "type": "number"
437
+ },
438
+ "showPoints": {
439
+ "type": "string",
440
+ "enum": [
441
+ "auto",
442
+ "always",
443
+ "never"
444
+ ]
445
+ }
446
+ },
447
+ "additionalProperties": {}
448
+ }
449
+ },
450
+ "additionalProperties": {}
451
+ },
452
+ "ThresholdStep": {
453
+ "type": "object",
454
+ "properties": {
455
+ "value": {
456
+ "type": [
457
+ "number",
458
+ "null"
459
+ ]
460
+ },
461
+ "color": {
462
+ "type": "string"
463
+ }
464
+ },
465
+ "required": [
466
+ "value",
467
+ "color"
468
+ ]
469
+ },
470
+ "ValueMapping": {
471
+ "anyOf": [
472
+ {
473
+ "type": "object",
474
+ "properties": {
475
+ "type": {
476
+ "type": "string",
477
+ "const": "value"
478
+ },
479
+ "options": {
480
+ "type": "object",
481
+ "additionalProperties": {
482
+ "$ref": "#/definitions/MappingResult"
483
+ }
484
+ }
485
+ },
486
+ "required": [
487
+ "type",
488
+ "options"
489
+ ]
490
+ },
491
+ {
492
+ "type": "object",
493
+ "properties": {
494
+ "type": {
495
+ "type": "string",
496
+ "const": "range"
497
+ },
498
+ "options": {
499
+ "type": "object",
500
+ "properties": {
501
+ "from": {
502
+ "type": [
503
+ "number",
504
+ "null"
505
+ ]
506
+ },
507
+ "to": {
508
+ "type": [
509
+ "number",
510
+ "null"
511
+ ]
512
+ },
513
+ "result": {
514
+ "$ref": "#/definitions/MappingResult"
515
+ }
516
+ },
517
+ "required": [
518
+ "result"
519
+ ]
520
+ }
521
+ },
522
+ "required": [
523
+ "type",
524
+ "options"
525
+ ]
526
+ },
527
+ {
528
+ "type": "object",
529
+ "properties": {
530
+ "type": {
531
+ "type": "string",
532
+ "const": "regex"
533
+ },
534
+ "options": {
535
+ "type": "object",
536
+ "properties": {
537
+ "pattern": {
538
+ "type": "string"
539
+ },
540
+ "result": {
541
+ "$ref": "#/definitions/MappingResult"
542
+ }
543
+ },
544
+ "required": [
545
+ "pattern",
546
+ "result"
547
+ ]
548
+ }
549
+ },
550
+ "required": [
551
+ "type",
552
+ "options"
553
+ ]
554
+ },
555
+ {
556
+ "type": "object",
557
+ "properties": {
558
+ "type": {
559
+ "type": "string",
560
+ "const": "special"
561
+ },
562
+ "options": {
563
+ "type": "object",
564
+ "properties": {
565
+ "match": {
566
+ "type": "string",
567
+ "enum": [
568
+ "null",
569
+ "nan",
570
+ "null+nan",
571
+ "true",
572
+ "false",
573
+ "empty"
574
+ ]
575
+ },
576
+ "result": {
577
+ "$ref": "#/definitions/MappingResult"
578
+ }
579
+ },
580
+ "required": [
581
+ "match",
582
+ "result"
583
+ ]
584
+ }
585
+ },
586
+ "required": [
587
+ "type",
588
+ "options"
589
+ ]
590
+ },
591
+ {
592
+ "type": "object",
593
+ "properties": {
594
+ "type": {
595
+ "type": "string"
596
+ },
597
+ "options": {}
598
+ },
599
+ "required": [
600
+ "type"
601
+ ]
602
+ }
603
+ ],
604
+ "description": "Grafana value mappings: display text (and optionally a color) in place of a value."
605
+ },
606
+ "MappingResult": {
607
+ "type": "object",
608
+ "properties": {
609
+ "text": {
610
+ "type": "string"
611
+ },
612
+ "color": {
613
+ "type": "string"
614
+ },
615
+ "index": {
616
+ "type": "number"
617
+ }
618
+ }
619
+ },
620
+ "DataLink": {
621
+ "type": "object",
622
+ "properties": {
623
+ "title": {
624
+ "type": "string"
625
+ },
626
+ "url": {
627
+ "type": "string"
628
+ },
629
+ "targetBlank": {
630
+ "type": "boolean"
631
+ }
632
+ },
633
+ "required": [
634
+ "title",
635
+ "url"
636
+ ],
637
+ "description": "A Grafana data link or panel link. `url` may use variables and, for data links, `${__value.raw}`-style macros."
638
+ },
639
+ "FieldOverride": {
640
+ "type": "object",
641
+ "properties": {
642
+ "matcher": {
643
+ "type": "object",
644
+ "properties": {
645
+ "id": {
646
+ "type": "string"
647
+ },
648
+ "options": {}
649
+ },
650
+ "required": [
651
+ "id"
652
+ ]
653
+ },
654
+ "properties": {
655
+ "type": "array",
656
+ "items": {
657
+ "type": "object",
658
+ "properties": {
659
+ "id": {
660
+ "type": "string"
661
+ },
662
+ "value": {}
663
+ },
664
+ "required": [
665
+ "id"
666
+ ]
667
+ }
668
+ }
669
+ },
670
+ "required": [
671
+ "matcher",
672
+ "properties"
673
+ ]
674
+ },
675
+ "MobileOptions": {
676
+ "type": "object",
677
+ "properties": {
678
+ "span": {
679
+ "type": "number",
680
+ "description": "Columns out of 24 on a phone. Defaults: w <= 6 → 12 (two-up), otherwise 24."
681
+ },
682
+ "h": {
683
+ "type": "number",
684
+ "description": "Height in grid units (Grafana units are 30px). Defaults to gridPos.h."
685
+ },
686
+ "hidden": {
687
+ "type": "boolean"
688
+ }
689
+ },
690
+ "description": "modelform extension: how a panel behaves on a narrow screen."
691
+ },
692
+ "TemplateVariable": {
693
+ "type": "object",
694
+ "properties": {
695
+ "name": {
696
+ "type": "string"
697
+ },
698
+ "type": {
699
+ "type": "string"
700
+ },
701
+ "label": {
702
+ "type": "string"
703
+ },
704
+ "hide": {
705
+ "type": "number"
706
+ },
707
+ "query": {},
708
+ "current": {
709
+ "type": "object",
710
+ "properties": {
711
+ "text": {
712
+ "anyOf": [
713
+ {
714
+ "type": "string"
715
+ },
716
+ {
717
+ "type": "array",
718
+ "items": {
719
+ "type": "string"
720
+ }
721
+ }
722
+ ]
723
+ },
724
+ "value": {
725
+ "anyOf": [
726
+ {
727
+ "type": "string"
728
+ },
729
+ {
730
+ "type": "array",
731
+ "items": {
732
+ "type": "string"
733
+ }
734
+ }
735
+ ]
736
+ },
737
+ "selected": {
738
+ "type": "boolean"
739
+ }
740
+ }
741
+ },
742
+ "options": {
743
+ "type": "array",
744
+ "items": {
745
+ "$ref": "#/definitions/VariableOption"
746
+ }
747
+ },
748
+ "multi": {
749
+ "type": "boolean"
750
+ },
751
+ "includeAll": {
752
+ "type": "boolean"
753
+ },
754
+ "allValue": {
755
+ "type": [
756
+ "string",
757
+ "null"
758
+ ]
759
+ },
760
+ "datasource": {
761
+ "anyOf": [
762
+ {
763
+ "$ref": "#/definitions/DataSourceRef"
764
+ },
765
+ {
766
+ "type": "string"
767
+ },
768
+ {
769
+ "type": "null"
770
+ }
771
+ ],
772
+ "description": "Query variables: where the options come from."
773
+ },
774
+ "refresh": {
775
+ "type": "number",
776
+ "description": "Query variables: 0/missing = never, 1 = on dashboard load, 2 = on time range change."
777
+ },
778
+ "regex": {
779
+ "type": "string",
780
+ "description": "Query variables: `/pattern/flags` applied to each option's text."
781
+ },
782
+ "sort": {
783
+ "type": "number",
784
+ "description": "Query variables: 0 = query order, 1/2 = alpha, 3/4 = numeric, 5/6 = alpha ignoring case, 7/8 = natural. Odd ascending."
785
+ }
786
+ },
787
+ "required": [
788
+ "name",
789
+ "type"
790
+ ]
791
+ },
792
+ "VariableOption": {
793
+ "type": "object",
794
+ "properties": {
795
+ "text": {
796
+ "anyOf": [
797
+ {
798
+ "type": "string"
799
+ },
800
+ {
801
+ "type": "array",
802
+ "items": {
803
+ "type": "string"
804
+ }
805
+ }
806
+ ]
807
+ },
808
+ "value": {
809
+ "anyOf": [
810
+ {
811
+ "type": "string"
812
+ },
813
+ {
814
+ "type": "array",
815
+ "items": {
816
+ "type": "string"
817
+ }
818
+ }
819
+ ]
820
+ },
821
+ "selected": {
822
+ "type": "boolean"
823
+ }
824
+ },
825
+ "required": [
826
+ "text",
827
+ "value"
828
+ ]
829
+ },
830
+ "InputOptions": {
831
+ "type": "object",
832
+ "properties": {
833
+ "metric": {
834
+ "type": "string",
835
+ "description": "The metric this input records to. Visualization queries select data by this name."
836
+ },
837
+ "unit": {
838
+ "type": "string"
839
+ },
840
+ "min": {
841
+ "type": "number"
842
+ },
843
+ "max": {
844
+ "type": "number"
845
+ },
846
+ "step": {
847
+ "type": "number"
848
+ },
849
+ "placeholder": {
850
+ "type": "string"
851
+ },
852
+ "labels": {
853
+ "type": "array",
854
+ "items": {
855
+ "type": "string"
856
+ },
857
+ "description": "input-slider only: text spaced evenly along the track, first at min and last at max, e.g. [\"Understeer\", \"Neutral\", \"Oversteer\"]. Replaces the numeric min/max labels."
858
+ },
859
+ "default": {
860
+ "anyOf": [
861
+ {
862
+ "type": "number"
863
+ },
864
+ {
865
+ "type": "string"
866
+ },
867
+ {
868
+ "type": "boolean"
869
+ },
870
+ {
871
+ "type": "string",
872
+ "const": "last"
873
+ }
874
+ ],
875
+ "description": "Initial value: a literal, or \"last\" to start from the most recent entry."
876
+ },
877
+ "record": {
878
+ "type": "string",
879
+ "enum": [
880
+ "changed",
881
+ "always"
882
+ ],
883
+ "description": "\"changed\" (the default) records the value only when it was edited before Save; \"always\" records it on every Save, so a default like \"last\" is kept with each save."
884
+ },
885
+ "required": {
886
+ "type": "boolean",
887
+ "description": "Save waits until this has a value."
888
+ },
889
+ "choices": {
890
+ "type": "array",
891
+ "items": {
892
+ "$ref": "#/definitions/InputChoice"
893
+ },
894
+ "description": "input-select only."
895
+ },
896
+ "choicesFrom": {
897
+ "type": "string",
898
+ "description": "input-select only: take the choices from the app at runtime instead of `choices`, for lists that live in app data (e.g. wheel sets). Names a key of InputForm's `choices` prop."
899
+ },
900
+ "multi": {
901
+ "type": "boolean",
902
+ "description": "input-select only: allow selecting several. Each selection is recorded as its own entry."
903
+ },
904
+ "increment": {
905
+ "type": "number",
906
+ "description": "input-counter only: the amount each tap records (default 1)."
907
+ },
908
+ "suggest": {
909
+ "type": "boolean",
910
+ "description": "input-text only: a single-line field that suggests values recorded earlier, matching what's typed."
911
+ },
912
+ "suggestWith": {
913
+ "type": "string",
914
+ "description": "input-text with `suggest` only: another input's metric whose current value narrows the suggestions to values saved alongside it (e.g. configurations of the chosen track). Falls back to every earlier value when none were."
915
+ }
916
+ },
917
+ "required": [
918
+ "metric"
919
+ ]
920
+ },
921
+ "InputChoice": {
922
+ "type": "object",
923
+ "properties": {
924
+ "label": {
925
+ "type": "string"
926
+ },
927
+ "value": {
928
+ "type": [
929
+ "number",
930
+ "string"
931
+ ]
932
+ }
933
+ },
934
+ "required": [
935
+ "label",
936
+ "value"
937
+ ]
938
+ }
939
+ }
940
+ }