@modelform/react-native 0.8.0 → 0.10.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
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  ALL,
3
+ AUTHORING_GUIDE,
3
4
  BUNDLE_ACCEPT,
4
5
  BUNDLE_TYPE,
5
6
  CANVAS_GAP,
@@ -8,6 +9,7 @@ import {
8
9
  DASHBOARD_DS,
9
10
  DEFAULT_GAZETTEER,
10
11
  EDITABLE_VARIABLE_TYPES,
12
+ EXAMPLE_TEMPLATE,
11
13
  GRID_COLUMNS,
12
14
  GROUP_FIELD_TYPES,
13
15
  GrafanaClient,
@@ -61,6 +63,7 @@ import {
61
63
  describeRange,
62
64
  diffJson,
63
65
  documentIdFor,
66
+ documentKind,
64
67
  documentUses,
65
68
  dropTarget,
66
69
  duplicatePanel,
@@ -72,6 +75,7 @@ import {
72
75
  fetchJsonWithToken,
73
76
  fieldDisplayName,
74
77
  fieldMatches,
78
+ fixTemplatePrompt,
75
79
  formatClock,
76
80
  formatDisplay,
77
81
  formatDuration,
@@ -107,6 +111,7 @@ import {
107
111
  isReducer,
108
112
  isRow,
109
113
  isSqlDatasource,
114
+ jsonFromAnswer,
110
115
  layoutCanvas,
111
116
  layoutDashboard,
112
117
  lineColumn,
@@ -156,6 +161,7 @@ import {
156
161
  queryPanel,
157
162
  queryParam,
158
163
  readConfigFiles,
164
+ readTemplateAnswer,
159
165
  readingOrder,
160
166
  reduce,
161
167
  refineOptions,
@@ -194,6 +200,7 @@ import {
194
200
  stringifyCompact,
195
201
  tabIdFor,
196
202
  templateNeeds,
203
+ templatePrompt,
197
204
  textSuggestions,
198
205
  thresholdStep,
199
206
  timeExprError,
@@ -221,7 +228,7 @@ import {
221
228
  variableWithType,
222
229
  visibleVariables,
223
230
  zoomRange
224
- } from "./chunk-AQO56KS2.mjs";
231
+ } from "./chunk-QXUFH447.mjs";
225
232
 
226
233
  // src/ui/theme.tsx
227
234
  import { createContext, useContext } from "react";
@@ -4302,6 +4309,7 @@ var styles15 = StyleSheet15.create({
4302
4309
  });
4303
4310
  export {
4304
4311
  ALL,
4312
+ AUTHORING_GUIDE,
4305
4313
  BUNDLE_ACCEPT,
4306
4314
  BUNDLE_TYPE,
4307
4315
  CANVAS_GAP,
@@ -4316,6 +4324,7 @@ export {
4316
4324
  DashboardToolbar,
4317
4325
  DashboardView,
4318
4326
  EDITABLE_VARIABLE_TYPES,
4327
+ EXAMPLE_TEMPLATE,
4319
4328
  GRID_COLUMNS,
4320
4329
  GROUP_FIELD_TYPES,
4321
4330
  GrafanaClient,
@@ -4376,6 +4385,7 @@ export {
4376
4385
  describeRange,
4377
4386
  diffJson,
4378
4387
  documentIdFor,
4388
+ documentKind,
4379
4389
  documentUses,
4380
4390
  dropTarget,
4381
4391
  duplicatePanel,
@@ -4387,6 +4397,7 @@ export {
4387
4397
  fetchJsonWithToken,
4388
4398
  fieldDisplayName,
4389
4399
  fieldMatches,
4400
+ fixTemplatePrompt,
4390
4401
  formatClock,
4391
4402
  formatDisplay,
4392
4403
  formatDuration,
@@ -4423,6 +4434,7 @@ export {
4423
4434
  isReducer,
4424
4435
  isRow,
4425
4436
  isSqlDatasource,
4437
+ jsonFromAnswer,
4426
4438
  layoutCanvas,
4427
4439
  layoutDashboard,
4428
4440
  lightTheme,
@@ -4473,6 +4485,7 @@ export {
4473
4485
  queryPanel,
4474
4486
  queryParam,
4475
4487
  readConfigFiles,
4488
+ readTemplateAnswer,
4476
4489
  readingOrder,
4477
4490
  reduce,
4478
4491
  refineOptions,
@@ -4512,6 +4525,7 @@ export {
4512
4525
  stringifyCompact,
4513
4526
  tabIdFor,
4514
4527
  templateNeeds,
4528
+ templatePrompt,
4515
4529
  textSuggestions,
4516
4530
  thresholdStep,
4517
4531
  timeExprError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modelform/react-native",
3
- "version": "0.8.0",
3
+ "version": "0.10.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",