@modelform/react-native 0.7.0 → 0.9.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/dist/index.mjs CHANGED
@@ -61,6 +61,7 @@ import {
61
61
  describeRange,
62
62
  diffJson,
63
63
  documentIdFor,
64
+ documentKind,
64
65
  documentUses,
65
66
  dropTarget,
66
67
  duplicatePanel,
@@ -84,6 +85,7 @@ import {
84
85
  getPath,
85
86
  gridOffsetPx,
86
87
  gridUnitsToPx,
88
+ groupField,
87
89
  groupFields,
88
90
  groupProblems,
89
91
  groupToEntries,
@@ -220,7 +222,7 @@ import {
220
222
  variableWithType,
221
223
  visibleVariables,
222
224
  zoomRange
223
- } from "./chunk-BW6HKFAB.mjs";
225
+ } from "./chunk-KOCUG6GH.mjs";
224
226
 
225
227
  // src/ui/theme.tsx
226
228
  import { createContext, useContext } from "react";
@@ -4375,6 +4377,7 @@ export {
4375
4377
  describeRange,
4376
4378
  diffJson,
4377
4379
  documentIdFor,
4380
+ documentKind,
4378
4381
  documentUses,
4379
4382
  dropTarget,
4380
4383
  duplicatePanel,
@@ -4398,6 +4401,7 @@ export {
4398
4401
  getPath,
4399
4402
  gridOffsetPx,
4400
4403
  gridUnitsToPx,
4404
+ groupField,
4401
4405
  groupFields,
4402
4406
  groupKey,
4403
4407
  groupProblems,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modelform/react-native",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "Render Grafana-compatible dashboard JSON, and input forms in the same format, as native React Native panels.",
5
5
  "keywords": [
6
6
  "react-native",
@@ -7,6 +7,10 @@
7
7
  "Dashboard": {
8
8
  "type": "object",
9
9
  "properties": {
10
+ "kind": {
11
+ "$ref": "#/definitions/DocumentKind",
12
+ "description": "Whether this document is a form (for recording entries) or a dashboard (for showing them). Without it, a document with input-* panels counts as a form. See documentKind()."
13
+ },
10
14
  "uid": {
11
15
  "type": "string"
12
16
  },
@@ -98,8 +102,15 @@
98
102
  "required": [
99
103
  "title",
100
104
  "panels"
105
+ ]
106
+ },
107
+ "DocumentKind": {
108
+ "type": "string",
109
+ "enum": [
110
+ "form",
111
+ "dashboard"
101
112
  ],
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)"
113
+ "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 three extensions, all of which Grafana ignores: - `kind` to say whether the document is a form or a dashboard - `panel.mobile` to tune phone layout per panel - `input-*` panel types for data entry forms (see inputs.ts)"
103
114
  },
104
115
  "Panel": {
105
116
  "type": "object",