@modelform/react-native 0.5.0 → 0.7.0
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 +21 -1
- package/dist/{chunk-5SGVTAFJ.mjs → chunk-BW6HKFAB.mjs} +932 -371
- package/dist/{chunk-5UE6Q6CQ.js → chunk-YUXA7I4J.js} +1036 -475
- package/dist/core/index.js +28 -2
- package/dist/core/index.mjs +27 -1
- package/dist/core/inputs.d.ts +71 -1
- package/dist/core/local.d.ts +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +658 -318
- package/dist/index.mjs +645 -305
- package/dist/ui/inputs/InputGroup.d.ts +13 -0
- package/dist/ui/inputs/formContext.d.ts +24 -1
- package/package.json +1 -1
- package/schema/dashboard.schema.json +113 -2
package/README.md
CHANGED
|
@@ -77,7 +77,27 @@ import form from './forms/daily.json';
|
|
|
77
77
|
}
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
Fields that repeat once per item, like the sets of a workout, go in an `input-group`. Each field records under its own
|
|
81
|
+
metric, and entries of one item share `save` and `item`:
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"type": "input-group",
|
|
86
|
+
"title": "Sets",
|
|
87
|
+
"gridPos": { "x": 0, "y": 3, "w": 24, "h": 12 },
|
|
88
|
+
"options": {
|
|
89
|
+
"itemTitle": "Set", "titleFrom": "sets-exercise", "start": "last",
|
|
90
|
+
"fields": [
|
|
91
|
+
{ "type": "input-text", "title": "Exercise", "options": { "metric": "sets-exercise", "suggest": true, "required": true } },
|
|
92
|
+
{ "type": "input-number", "title": "Weight", "span": 12, "options": { "metric": "sets-weight", "unit": "kg", "step": 2.5 } },
|
|
93
|
+
{ "type": "input-number", "title": "Reps", "span": 12, "options": { "metric": "sets-reps" } }
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
For anything beyond a demo, implement `EntryStore` over your own storage, such as SQLite. Keep each entry's `save` and
|
|
100
|
+
`item` so groups can be read back.
|
|
81
101
|
|
|
82
102
|
## Bundled dashboards
|
|
83
103
|
|