@modelform/react-native 0.15.0 → 0.17.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/{chunk-P4NMZ77W.js → chunk-24ABPZKO.js} +303 -271
- package/dist/{chunk-GWGDDKJE.mjs → chunk-IMXL2SZA.mjs} +303 -271
- package/dist/core/authoring.d.ts +2 -2
- package/dist/core/formFill.d.ts +2 -0
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +1 -1
- package/dist/core/inputs.d.ts +5 -0
- package/dist/core/schema.d.ts +7 -1
- package/dist/index.js +162 -162
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/schema/dashboard.schema.json +7 -2
|
@@ -1822,13 +1822,13 @@ function fillForm(dashboard, choices2 = {}) {
|
|
|
1822
1822
|
let field2;
|
|
1823
1823
|
switch (p.type) {
|
|
1824
1824
|
case "input-number":
|
|
1825
|
-
field2 = { ...base, type: "number", unit: o.unit, min: o.min, max: o.max };
|
|
1825
|
+
field2 = { ...base, type: "number", unit: o.unit, min: o.min, max: o.max, step: o.step ?? 1 };
|
|
1826
1826
|
break;
|
|
1827
1827
|
case "input-rating":
|
|
1828
|
-
field2 = { ...base, type: "number", min: Math.round(o.min ?? 1), max: Math.round(o.max ?? 5) };
|
|
1828
|
+
field2 = { ...base, type: "number", min: Math.round(o.min ?? 1), max: Math.round(o.max ?? 5), step: 1 };
|
|
1829
1829
|
break;
|
|
1830
1830
|
case "input-slider":
|
|
1831
|
-
field2 = { ...base, type: "number", unit: o.unit, min: o.min ?? 0, max: o.max ?? 10, choices: o.labels?.length ? o.labels : void 0 };
|
|
1831
|
+
field2 = { ...base, type: "number", unit: o.unit, min: o.min ?? 0, max: o.max ?? 10, step: o.step ?? 1, choices: o.labels?.length ? o.labels : void 0 };
|
|
1832
1832
|
break;
|
|
1833
1833
|
case "input-duration":
|
|
1834
1834
|
field2 = { ...base, type: "duration" };
|
|
@@ -1856,8 +1856,11 @@ function fillForm(dashboard, choices2 = {}) {
|
|
|
1856
1856
|
function describe(f) {
|
|
1857
1857
|
const range = f.min != null && f.max != null ? `, from ${f.min} to ${f.max}` : f.min != null ? `, ${f.min} or more` : f.max != null ? `, at most ${f.max}` : "";
|
|
1858
1858
|
switch (f.type) {
|
|
1859
|
-
case "number":
|
|
1860
|
-
|
|
1859
|
+
case "number": {
|
|
1860
|
+
const whole = f.step === void 0 || Number.isInteger(f.step);
|
|
1861
|
+
const precision = whole ? "" : ` (to ${f.step})`;
|
|
1862
|
+
return `a ${whole ? "whole number" : "number"}${f.unit ? ` in ${f.unit}` : ""}${precision}${range}${f.choices ? ` (${f.choices.join(" \u2026 ")} along the scale)` : ""}`;
|
|
1863
|
+
}
|
|
1861
1864
|
case "duration":
|
|
1862
1865
|
return "a duration in seconds";
|
|
1863
1866
|
case "choice":
|
|
@@ -1877,7 +1880,7 @@ function fillSchema(form) {
|
|
|
1877
1880
|
switch (f.type) {
|
|
1878
1881
|
case "number":
|
|
1879
1882
|
case "duration":
|
|
1880
|
-
properties[f.key] = { type: "number", description, ...f.min != null && { minimum: f.min }, ...f.max != null && { maximum: f.max } };
|
|
1883
|
+
properties[f.key] = { type: f.type === "number" && (f.step === void 0 || Number.isInteger(f.step)) ? "integer" : "number", description, ...f.min != null && { minimum: f.min }, ...f.max != null && { maximum: f.max } };
|
|
1881
1884
|
break;
|
|
1882
1885
|
case "choice":
|
|
1883
1886
|
properties[f.key] = { type: "string", enum: f.choices, description };
|
|
@@ -2941,6 +2944,10 @@ var dashboard_schema_default = {
|
|
|
2941
2944
|
$ref: "#/definitions/DocumentKind",
|
|
2942
2945
|
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()."
|
|
2943
2946
|
},
|
|
2947
|
+
localOnly: {
|
|
2948
|
+
type: "boolean",
|
|
2949
|
+
description: "Forms: keep what this form records on the device where it's recorded. Apps that sync entries (to an account, other devices, a server) must leave these out. Off by default."
|
|
2950
|
+
},
|
|
2944
2951
|
uid: {
|
|
2945
2952
|
type: "string"
|
|
2946
2953
|
},
|
|
@@ -3040,7 +3047,7 @@ var dashboard_schema_default = {
|
|
|
3040
3047
|
"form",
|
|
3041
3048
|
"dashboard"
|
|
3042
3049
|
],
|
|
3043
|
-
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
|
|
3050
|
+
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 four extensions, all of which Grafana ignores: - `kind` to say whether the document is a form or a dashboard - `localOnly` to keep a form's entries on the device that records them - `panel.mobile` to tune phone layout per panel - `input-*` panel types for data entry forms (see inputs.ts)"
|
|
3044
3051
|
},
|
|
3045
3052
|
Panel: {
|
|
3046
3053
|
type: "object",
|
|
@@ -3808,7 +3815,8 @@ var dashboard_schema_default = {
|
|
|
3808
3815
|
type: "number"
|
|
3809
3816
|
},
|
|
3810
3817
|
step: {
|
|
3811
|
-
type: "number"
|
|
3818
|
+
type: "number",
|
|
3819
|
+
description: "input-number and input-slider: what + and \u2212 (or a slider notch) move by, which also sets the precision. 1, the default, takes whole numbers only; a step with decimals takes decimals, e.g. 0.1 for a weight like 72.5."
|
|
3812
3820
|
},
|
|
3813
3821
|
placeholder: {
|
|
3814
3822
|
type: "string"
|
|
@@ -4543,10 +4551,10 @@ function validate12(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4543
4551
|
validate12.errors = vErrors;
|
|
4544
4552
|
return errors === 0;
|
|
4545
4553
|
}
|
|
4546
|
-
var schema18 = { "type": "string", "enum": ["form", "dashboard"], "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
|
|
4554
|
+
var schema18 = { "type": "string", "enum": ["form", "dashboard"], "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 four extensions, all of which Grafana ignores: - `kind` to say whether the document is a form or a dashboard - `localOnly` to keep a form's entries on the device that records them - `panel.mobile` to tune phone layout per panel - `input-*` panel types for data entry forms (see inputs.ts)" };
|
|
4547
4555
|
var schema19 = { "type": "object", "properties": { "id": { "type": "number" }, "type": { "type": "string", "examples": ["row", "timeseries", "trend", "xychart", "stat", "gauge", "bargauge", "piechart", "barchart", "table", "text", "geomap", "input-number", "input-slider", "input-select", "input-toggle", "input-rating", "input-text", "input-counter", "input-duration", "input-group"] }, "title": { "type": "string" }, "description": { "type": "string" }, "gridPos": { "$ref": "#/definitions/GridPos" }, "datasource": { "anyOf": [{ "$ref": "#/definitions/DataSourceRef" }, { "type": "string" }, { "type": "null" }] }, "targets": { "type": "array", "items": { "$ref": "#/definitions/Target" } }, "fieldConfig": { "type": "object", "properties": { "defaults": { "$ref": "#/definitions/FieldConfig" }, "overrides": { "type": "array", "items": { "$ref": "#/definitions/FieldOverride" } } } }, "options": { "type": "object" }, "transformations": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "options": { "type": "object" }, "disabled": { "type": "boolean" } }, "required": ["id"] }, "description": "Applied in order to the query results. See transform.ts for the ones modelform implements." }, "collapsed": { "type": "boolean", "description": "Rows only." }, "panels": { "type": "array", "items": { "$ref": "#/definitions/Panel" }, "description": "Rows only: children of a collapsed row live here instead of at the top level." }, "repeat": { "type": "string", "description": "Repeat this row (or panel) once per selected value of the named variable." }, "repeatDirection": { "type": "string", "enum": ["h", "v"], "description": "Panel repeats: side by side (`h`, wrapping at maxPerRow) or stacked (`v`)." }, "maxPerRow": { "type": "number" }, "scopedVars": { "type": "object", "additionalProperties": { "type": "object", "properties": { "text": { "type": "string" }, "value": { "type": "string" } }, "required": ["text", "value"] }, "description": "Set on each copy of a repeated row or panel: the single value it was repeated for." }, "mobile": { "$ref": "#/definitions/MobileOptions" }, "links": { "type": "array", "items": { "$ref": "#/definitions/DataLink" }, "description": "Panel links, from the panel header menu in Grafana." } }, "required": ["type", "gridPos"], "additionalProperties": {}, "allOf": [{ "if": { "properties": { "type": { "pattern": "^input-(?!group$)" } }, "required": ["type"] }, "then": { "required": ["options"], "properties": { "options": { "$ref": "#/definitions/InputOptions" } } } }, { "if": { "properties": { "type": { "const": "input-group" } }, "required": ["type"] }, "then": { "required": ["options"], "properties": { "options": { "$ref": "#/definitions/InputGroupOptions" } } } }] };
|
|
4548
4556
|
var pattern1 = new RegExp("^input-(?!group$)", "u");
|
|
4549
|
-
var schema20 = { "type": "object", "properties": { "metric": { "type": "string", "description": "The metric this input records to. Visualization queries select data by this name." }, "unit": { "type": "string" }, "min": { "type": "number" }, "max": { "type": "number" }, "step": { "type": "number" }, "placeholder": { "type": "string" }, "labels": { "type": "array", "items": { "type": "string" }, "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.' }, "default": { "anyOf": [{ "type": "number" }, { "type": "string" }, { "type": "boolean" }, { "type": "string", "const": "last" }], "description": 'Initial value: a literal, or "last" to start from the most recent entry.' }, "record": { "type": "string", "enum": ["changed", "always"], "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.' }, "required": { "type": "boolean", "description": "Save waits until this has a value." }, "choices": { "type": "array", "items": { "$ref": "#/definitions/InputChoice" }, "description": "input-select only." }, "choicesFrom": { "type": "string", "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." }, "multi": { "type": "boolean", "description": "input-select only: allow selecting several. Each selection is recorded as its own entry." }, "increment": { "type": "number", "description": "input-counter only: the amount each tap records (default 1)." }, "suggest": { "type": "boolean", "description": "input-text only: a single-line field that suggests values recorded earlier, matching what's typed." }, "suggestWith": { "type": "string", "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." } }, "required": ["metric"] };
|
|
4557
|
+
var schema20 = { "type": "object", "properties": { "metric": { "type": "string", "description": "The metric this input records to. Visualization queries select data by this name." }, "unit": { "type": "string" }, "min": { "type": "number" }, "max": { "type": "number" }, "step": { "type": "number", "description": "input-number and input-slider: what + and \u2212 (or a slider notch) move by, which also sets the precision. 1, the default, takes whole numbers only; a step with decimals takes decimals, e.g. 0.1 for a weight like 72.5." }, "placeholder": { "type": "string" }, "labels": { "type": "array", "items": { "type": "string" }, "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.' }, "default": { "anyOf": [{ "type": "number" }, { "type": "string" }, { "type": "boolean" }, { "type": "string", "const": "last" }], "description": 'Initial value: a literal, or "last" to start from the most recent entry.' }, "record": { "type": "string", "enum": ["changed", "always"], "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.' }, "required": { "type": "boolean", "description": "Save waits until this has a value." }, "choices": { "type": "array", "items": { "$ref": "#/definitions/InputChoice" }, "description": "input-select only." }, "choicesFrom": { "type": "string", "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." }, "multi": { "type": "boolean", "description": "input-select only: allow selecting several. Each selection is recorded as its own entry." }, "increment": { "type": "number", "description": "input-counter only: the amount each tap records (default 1)." }, "suggest": { "type": "boolean", "description": "input-text only: a single-line field that suggests values recorded earlier, matching what's typed." }, "suggestWith": { "type": "string", "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." } }, "required": ["metric"] };
|
|
4550
4558
|
var schema21 = { "type": "object", "properties": { "label": { "type": "string" }, "value": { "type": ["number", "string"] } }, "required": ["label", "value"] };
|
|
4551
4559
|
function validate19(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
4552
4560
|
let vErrors = null;
|
|
@@ -7828,9 +7836,9 @@ function validate37(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7828
7836
|
errors++;
|
|
7829
7837
|
}
|
|
7830
7838
|
}
|
|
7831
|
-
if (data.
|
|
7832
|
-
if (typeof data.
|
|
7833
|
-
const err4 = { instancePath: instancePath + "/
|
|
7839
|
+
if (data.localOnly !== void 0) {
|
|
7840
|
+
if (typeof data.localOnly !== "boolean") {
|
|
7841
|
+
const err4 = { instancePath: instancePath + "/localOnly", schemaPath: "#/properties/localOnly/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
|
|
7834
7842
|
if (vErrors === null) {
|
|
7835
7843
|
vErrors = [err4];
|
|
7836
7844
|
} else {
|
|
@@ -7839,9 +7847,9 @@ function validate37(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7839
7847
|
errors++;
|
|
7840
7848
|
}
|
|
7841
7849
|
}
|
|
7842
|
-
if (data.
|
|
7843
|
-
if (typeof data.
|
|
7844
|
-
const err5 = { instancePath: instancePath + "/
|
|
7850
|
+
if (data.uid !== void 0) {
|
|
7851
|
+
if (typeof data.uid !== "string") {
|
|
7852
|
+
const err5 = { instancePath: instancePath + "/uid", schemaPath: "#/properties/uid/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
7845
7853
|
if (vErrors === null) {
|
|
7846
7854
|
vErrors = [err5];
|
|
7847
7855
|
} else {
|
|
@@ -7850,9 +7858,9 @@ function validate37(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7850
7858
|
errors++;
|
|
7851
7859
|
}
|
|
7852
7860
|
}
|
|
7853
|
-
if (data.
|
|
7854
|
-
if (typeof data.
|
|
7855
|
-
const err6 = { instancePath: instancePath + "/
|
|
7861
|
+
if (data.title !== void 0) {
|
|
7862
|
+
if (typeof data.title !== "string") {
|
|
7863
|
+
const err6 = { instancePath: instancePath + "/title", schemaPath: "#/properties/title/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
7856
7864
|
if (vErrors === null) {
|
|
7857
7865
|
vErrors = [err6];
|
|
7858
7866
|
} else {
|
|
@@ -7861,209 +7869,220 @@ function validate37(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
7861
7869
|
errors++;
|
|
7862
7870
|
}
|
|
7863
7871
|
}
|
|
7872
|
+
if (data.description !== void 0) {
|
|
7873
|
+
if (typeof data.description !== "string") {
|
|
7874
|
+
const err7 = { instancePath: instancePath + "/description", schemaPath: "#/properties/description/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
7875
|
+
if (vErrors === null) {
|
|
7876
|
+
vErrors = [err7];
|
|
7877
|
+
} else {
|
|
7878
|
+
vErrors.push(err7);
|
|
7879
|
+
}
|
|
7880
|
+
errors++;
|
|
7881
|
+
}
|
|
7882
|
+
}
|
|
7864
7883
|
if (data.tags !== void 0) {
|
|
7865
|
-
let
|
|
7866
|
-
if (Array.isArray(
|
|
7867
|
-
const len0 =
|
|
7884
|
+
let data5 = data.tags;
|
|
7885
|
+
if (Array.isArray(data5)) {
|
|
7886
|
+
const len0 = data5.length;
|
|
7868
7887
|
for (let i0 = 0; i0 < len0; i0++) {
|
|
7869
|
-
if (typeof
|
|
7870
|
-
const
|
|
7888
|
+
if (typeof data5[i0] !== "string") {
|
|
7889
|
+
const err8 = { instancePath: instancePath + "/tags/" + i0, schemaPath: "#/properties/tags/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
7871
7890
|
if (vErrors === null) {
|
|
7872
|
-
vErrors = [
|
|
7891
|
+
vErrors = [err8];
|
|
7873
7892
|
} else {
|
|
7874
|
-
vErrors.push(
|
|
7893
|
+
vErrors.push(err8);
|
|
7875
7894
|
}
|
|
7876
7895
|
errors++;
|
|
7877
7896
|
}
|
|
7878
7897
|
}
|
|
7879
7898
|
} else {
|
|
7880
|
-
const
|
|
7899
|
+
const err9 = { instancePath: instancePath + "/tags", schemaPath: "#/properties/tags/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
7881
7900
|
if (vErrors === null) {
|
|
7882
|
-
vErrors = [
|
|
7901
|
+
vErrors = [err9];
|
|
7883
7902
|
} else {
|
|
7884
|
-
vErrors.push(
|
|
7903
|
+
vErrors.push(err9);
|
|
7885
7904
|
}
|
|
7886
7905
|
errors++;
|
|
7887
7906
|
}
|
|
7888
7907
|
}
|
|
7889
7908
|
if (data.panels !== void 0) {
|
|
7890
|
-
let
|
|
7891
|
-
if (Array.isArray(
|
|
7892
|
-
const len1 =
|
|
7909
|
+
let data7 = data.panels;
|
|
7910
|
+
if (Array.isArray(data7)) {
|
|
7911
|
+
const len1 = data7.length;
|
|
7893
7912
|
for (let i1 = 0; i1 < len1; i1++) {
|
|
7894
|
-
if (!validate18(
|
|
7913
|
+
if (!validate18(data7[i1], { instancePath: instancePath + "/panels/" + i1, parentData: data7, parentDataProperty: i1, rootData })) {
|
|
7895
7914
|
vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);
|
|
7896
7915
|
errors = vErrors.length;
|
|
7897
7916
|
}
|
|
7898
7917
|
}
|
|
7899
7918
|
} else {
|
|
7900
|
-
const
|
|
7919
|
+
const err10 = { instancePath: instancePath + "/panels", schemaPath: "#/properties/panels/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
7901
7920
|
if (vErrors === null) {
|
|
7902
|
-
vErrors = [
|
|
7921
|
+
vErrors = [err10];
|
|
7903
7922
|
} else {
|
|
7904
|
-
vErrors.push(
|
|
7923
|
+
vErrors.push(err10);
|
|
7905
7924
|
}
|
|
7906
7925
|
errors++;
|
|
7907
7926
|
}
|
|
7908
7927
|
}
|
|
7909
7928
|
if (data.templating !== void 0) {
|
|
7910
|
-
let
|
|
7911
|
-
if (
|
|
7912
|
-
if (
|
|
7913
|
-
const
|
|
7929
|
+
let data9 = data.templating;
|
|
7930
|
+
if (data9 && typeof data9 == "object" && !Array.isArray(data9)) {
|
|
7931
|
+
if (data9.list === void 0) {
|
|
7932
|
+
const err11 = { instancePath: instancePath + "/templating", schemaPath: "#/properties/templating/required", keyword: "required", params: { missingProperty: "list" }, message: "must have required property 'list'" };
|
|
7914
7933
|
if (vErrors === null) {
|
|
7915
|
-
vErrors = [
|
|
7934
|
+
vErrors = [err11];
|
|
7916
7935
|
} else {
|
|
7917
|
-
vErrors.push(
|
|
7936
|
+
vErrors.push(err11);
|
|
7918
7937
|
}
|
|
7919
7938
|
errors++;
|
|
7920
7939
|
}
|
|
7921
|
-
if (
|
|
7922
|
-
let
|
|
7923
|
-
if (Array.isArray(
|
|
7924
|
-
const len2 =
|
|
7940
|
+
if (data9.list !== void 0) {
|
|
7941
|
+
let data10 = data9.list;
|
|
7942
|
+
if (Array.isArray(data10)) {
|
|
7943
|
+
const len2 = data10.length;
|
|
7925
7944
|
for (let i2 = 0; i2 < len2; i2++) {
|
|
7926
|
-
if (!validate33(
|
|
7945
|
+
if (!validate33(data10[i2], { instancePath: instancePath + "/templating/list/" + i2, parentData: data10, parentDataProperty: i2, rootData })) {
|
|
7927
7946
|
vErrors = vErrors === null ? validate33.errors : vErrors.concat(validate33.errors);
|
|
7928
7947
|
errors = vErrors.length;
|
|
7929
7948
|
}
|
|
7930
7949
|
}
|
|
7931
7950
|
} else {
|
|
7932
|
-
const
|
|
7951
|
+
const err12 = { instancePath: instancePath + "/templating/list", schemaPath: "#/properties/templating/properties/list/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
7933
7952
|
if (vErrors === null) {
|
|
7934
|
-
vErrors = [
|
|
7953
|
+
vErrors = [err12];
|
|
7935
7954
|
} else {
|
|
7936
|
-
vErrors.push(
|
|
7955
|
+
vErrors.push(err12);
|
|
7937
7956
|
}
|
|
7938
7957
|
errors++;
|
|
7939
7958
|
}
|
|
7940
7959
|
}
|
|
7941
7960
|
} else {
|
|
7942
|
-
const
|
|
7961
|
+
const err13 = { instancePath: instancePath + "/templating", schemaPath: "#/properties/templating/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
7943
7962
|
if (vErrors === null) {
|
|
7944
|
-
vErrors = [
|
|
7963
|
+
vErrors = [err13];
|
|
7945
7964
|
} else {
|
|
7946
|
-
vErrors.push(
|
|
7965
|
+
vErrors.push(err13);
|
|
7947
7966
|
}
|
|
7948
7967
|
errors++;
|
|
7949
7968
|
}
|
|
7950
7969
|
}
|
|
7951
7970
|
if (data.time !== void 0) {
|
|
7952
|
-
let
|
|
7953
|
-
if (
|
|
7954
|
-
if (
|
|
7955
|
-
const
|
|
7971
|
+
let data12 = data.time;
|
|
7972
|
+
if (data12 && typeof data12 == "object" && !Array.isArray(data12)) {
|
|
7973
|
+
if (data12.from === void 0) {
|
|
7974
|
+
const err14 = { instancePath: instancePath + "/time", schemaPath: "#/properties/time/required", keyword: "required", params: { missingProperty: "from" }, message: "must have required property 'from'" };
|
|
7956
7975
|
if (vErrors === null) {
|
|
7957
|
-
vErrors = [
|
|
7976
|
+
vErrors = [err14];
|
|
7958
7977
|
} else {
|
|
7959
|
-
vErrors.push(
|
|
7978
|
+
vErrors.push(err14);
|
|
7960
7979
|
}
|
|
7961
7980
|
errors++;
|
|
7962
7981
|
}
|
|
7963
|
-
if (
|
|
7964
|
-
const
|
|
7982
|
+
if (data12.to === void 0) {
|
|
7983
|
+
const err15 = { instancePath: instancePath + "/time", schemaPath: "#/properties/time/required", keyword: "required", params: { missingProperty: "to" }, message: "must have required property 'to'" };
|
|
7965
7984
|
if (vErrors === null) {
|
|
7966
|
-
vErrors = [
|
|
7985
|
+
vErrors = [err15];
|
|
7967
7986
|
} else {
|
|
7968
|
-
vErrors.push(
|
|
7987
|
+
vErrors.push(err15);
|
|
7969
7988
|
}
|
|
7970
7989
|
errors++;
|
|
7971
7990
|
}
|
|
7972
|
-
if (
|
|
7973
|
-
if (typeof
|
|
7974
|
-
const
|
|
7991
|
+
if (data12.from !== void 0) {
|
|
7992
|
+
if (typeof data12.from !== "string") {
|
|
7993
|
+
const err16 = { instancePath: instancePath + "/time/from", schemaPath: "#/properties/time/properties/from/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
7975
7994
|
if (vErrors === null) {
|
|
7976
|
-
vErrors = [
|
|
7995
|
+
vErrors = [err16];
|
|
7977
7996
|
} else {
|
|
7978
|
-
vErrors.push(
|
|
7997
|
+
vErrors.push(err16);
|
|
7979
7998
|
}
|
|
7980
7999
|
errors++;
|
|
7981
8000
|
}
|
|
7982
8001
|
}
|
|
7983
|
-
if (
|
|
7984
|
-
if (typeof
|
|
7985
|
-
const
|
|
8002
|
+
if (data12.to !== void 0) {
|
|
8003
|
+
if (typeof data12.to !== "string") {
|
|
8004
|
+
const err17 = { instancePath: instancePath + "/time/to", schemaPath: "#/properties/time/properties/to/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
7986
8005
|
if (vErrors === null) {
|
|
7987
|
-
vErrors = [
|
|
8006
|
+
vErrors = [err17];
|
|
7988
8007
|
} else {
|
|
7989
|
-
vErrors.push(
|
|
8008
|
+
vErrors.push(err17);
|
|
7990
8009
|
}
|
|
7991
8010
|
errors++;
|
|
7992
8011
|
}
|
|
7993
8012
|
}
|
|
7994
8013
|
} else {
|
|
7995
|
-
const
|
|
8014
|
+
const err18 = { instancePath: instancePath + "/time", schemaPath: "#/properties/time/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
7996
8015
|
if (vErrors === null) {
|
|
7997
|
-
vErrors = [
|
|
8016
|
+
vErrors = [err18];
|
|
7998
8017
|
} else {
|
|
7999
|
-
vErrors.push(
|
|
8018
|
+
vErrors.push(err18);
|
|
8000
8019
|
}
|
|
8001
8020
|
errors++;
|
|
8002
8021
|
}
|
|
8003
8022
|
}
|
|
8004
8023
|
if (data.timezone !== void 0) {
|
|
8005
8024
|
if (typeof data.timezone !== "string") {
|
|
8006
|
-
const
|
|
8025
|
+
const err19 = { instancePath: instancePath + "/timezone", schemaPath: "#/properties/timezone/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
8007
8026
|
if (vErrors === null) {
|
|
8008
|
-
vErrors = [
|
|
8027
|
+
vErrors = [err19];
|
|
8009
8028
|
} else {
|
|
8010
|
-
vErrors.push(
|
|
8029
|
+
vErrors.push(err19);
|
|
8011
8030
|
}
|
|
8012
8031
|
errors++;
|
|
8013
8032
|
}
|
|
8014
8033
|
}
|
|
8015
8034
|
if (data.refresh !== void 0) {
|
|
8016
|
-
let
|
|
8017
|
-
const
|
|
8035
|
+
let data16 = data.refresh;
|
|
8036
|
+
const _errs33 = errors;
|
|
8018
8037
|
let valid10 = false;
|
|
8019
|
-
const
|
|
8020
|
-
if (typeof
|
|
8021
|
-
const
|
|
8038
|
+
const _errs34 = errors;
|
|
8039
|
+
if (typeof data16 !== "string") {
|
|
8040
|
+
const err20 = { instancePath: instancePath + "/refresh", schemaPath: "#/properties/refresh/anyOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
8022
8041
|
if (vErrors === null) {
|
|
8023
|
-
vErrors = [
|
|
8042
|
+
vErrors = [err20];
|
|
8024
8043
|
} else {
|
|
8025
|
-
vErrors.push(
|
|
8044
|
+
vErrors.push(err20);
|
|
8026
8045
|
}
|
|
8027
8046
|
errors++;
|
|
8028
8047
|
}
|
|
8029
|
-
var _valid0 =
|
|
8048
|
+
var _valid0 = _errs34 === errors;
|
|
8030
8049
|
valid10 = valid10 || _valid0;
|
|
8031
8050
|
if (!valid10) {
|
|
8032
|
-
const
|
|
8033
|
-
if (typeof
|
|
8034
|
-
const
|
|
8051
|
+
const _errs36 = errors;
|
|
8052
|
+
if (typeof data16 !== "boolean") {
|
|
8053
|
+
const err21 = { instancePath: instancePath + "/refresh", schemaPath: "#/properties/refresh/anyOf/1/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
|
|
8035
8054
|
if (vErrors === null) {
|
|
8036
|
-
vErrors = [
|
|
8055
|
+
vErrors = [err21];
|
|
8037
8056
|
} else {
|
|
8038
|
-
vErrors.push(
|
|
8057
|
+
vErrors.push(err21);
|
|
8039
8058
|
}
|
|
8040
8059
|
errors++;
|
|
8041
8060
|
}
|
|
8042
|
-
if (false !==
|
|
8043
|
-
const
|
|
8061
|
+
if (false !== data16) {
|
|
8062
|
+
const err22 = { instancePath: instancePath + "/refresh", schemaPath: "#/properties/refresh/anyOf/1/const", keyword: "const", params: { allowedValue: false }, message: "must be equal to constant" };
|
|
8044
8063
|
if (vErrors === null) {
|
|
8045
|
-
vErrors = [
|
|
8064
|
+
vErrors = [err22];
|
|
8046
8065
|
} else {
|
|
8047
|
-
vErrors.push(
|
|
8066
|
+
vErrors.push(err22);
|
|
8048
8067
|
}
|
|
8049
8068
|
errors++;
|
|
8050
8069
|
}
|
|
8051
|
-
var _valid0 =
|
|
8070
|
+
var _valid0 = _errs36 === errors;
|
|
8052
8071
|
valid10 = valid10 || _valid0;
|
|
8053
8072
|
}
|
|
8054
8073
|
if (!valid10) {
|
|
8055
|
-
const
|
|
8074
|
+
const err23 = { instancePath: instancePath + "/refresh", schemaPath: "#/properties/refresh/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
|
|
8056
8075
|
if (vErrors === null) {
|
|
8057
|
-
vErrors = [
|
|
8076
|
+
vErrors = [err23];
|
|
8058
8077
|
} else {
|
|
8059
|
-
vErrors.push(
|
|
8078
|
+
vErrors.push(err23);
|
|
8060
8079
|
}
|
|
8061
8080
|
errors++;
|
|
8062
8081
|
} else {
|
|
8063
|
-
errors =
|
|
8082
|
+
errors = _errs33;
|
|
8064
8083
|
if (vErrors !== null) {
|
|
8065
|
-
if (
|
|
8066
|
-
vErrors.length =
|
|
8084
|
+
if (_errs33) {
|
|
8085
|
+
vErrors.length = _errs33;
|
|
8067
8086
|
} else {
|
|
8068
8087
|
vErrors = null;
|
|
8069
8088
|
}
|
|
@@ -8071,89 +8090,89 @@ function validate37(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8071
8090
|
}
|
|
8072
8091
|
}
|
|
8073
8092
|
if (data.__inputs !== void 0) {
|
|
8074
|
-
let
|
|
8075
|
-
if (Array.isArray(
|
|
8076
|
-
const len3 =
|
|
8093
|
+
let data17 = data.__inputs;
|
|
8094
|
+
if (Array.isArray(data17)) {
|
|
8095
|
+
const len3 = data17.length;
|
|
8077
8096
|
for (let i3 = 0; i3 < len3; i3++) {
|
|
8078
|
-
let
|
|
8079
|
-
if (
|
|
8080
|
-
if (
|
|
8081
|
-
const
|
|
8097
|
+
let data18 = data17[i3];
|
|
8098
|
+
if (data18 && typeof data18 == "object" && !Array.isArray(data18)) {
|
|
8099
|
+
if (data18.name === void 0) {
|
|
8100
|
+
const err24 = { instancePath: instancePath + "/__inputs/" + i3, schemaPath: "#/properties/__inputs/items/required", keyword: "required", params: { missingProperty: "name" }, message: "must have required property 'name'" };
|
|
8082
8101
|
if (vErrors === null) {
|
|
8083
|
-
vErrors = [
|
|
8102
|
+
vErrors = [err24];
|
|
8084
8103
|
} else {
|
|
8085
|
-
vErrors.push(
|
|
8104
|
+
vErrors.push(err24);
|
|
8086
8105
|
}
|
|
8087
8106
|
errors++;
|
|
8088
8107
|
}
|
|
8089
|
-
if (
|
|
8090
|
-
const
|
|
8108
|
+
if (data18.type === void 0) {
|
|
8109
|
+
const err25 = { instancePath: instancePath + "/__inputs/" + i3, schemaPath: "#/properties/__inputs/items/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property 'type'" };
|
|
8091
8110
|
if (vErrors === null) {
|
|
8092
|
-
vErrors = [
|
|
8111
|
+
vErrors = [err25];
|
|
8093
8112
|
} else {
|
|
8094
|
-
vErrors.push(
|
|
8113
|
+
vErrors.push(err25);
|
|
8095
8114
|
}
|
|
8096
8115
|
errors++;
|
|
8097
8116
|
}
|
|
8098
|
-
if (
|
|
8099
|
-
if (typeof
|
|
8100
|
-
const
|
|
8117
|
+
if (data18.name !== void 0) {
|
|
8118
|
+
if (typeof data18.name !== "string") {
|
|
8119
|
+
const err26 = { instancePath: instancePath + "/__inputs/" + i3 + "/name", schemaPath: "#/properties/__inputs/items/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
8101
8120
|
if (vErrors === null) {
|
|
8102
|
-
vErrors = [
|
|
8121
|
+
vErrors = [err26];
|
|
8103
8122
|
} else {
|
|
8104
|
-
vErrors.push(
|
|
8123
|
+
vErrors.push(err26);
|
|
8105
8124
|
}
|
|
8106
8125
|
errors++;
|
|
8107
8126
|
}
|
|
8108
8127
|
}
|
|
8109
|
-
if (
|
|
8110
|
-
if (typeof
|
|
8111
|
-
const
|
|
8128
|
+
if (data18.type !== void 0) {
|
|
8129
|
+
if (typeof data18.type !== "string") {
|
|
8130
|
+
const err27 = { instancePath: instancePath + "/__inputs/" + i3 + "/type", schemaPath: "#/properties/__inputs/items/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
8112
8131
|
if (vErrors === null) {
|
|
8113
|
-
vErrors = [
|
|
8132
|
+
vErrors = [err27];
|
|
8114
8133
|
} else {
|
|
8115
|
-
vErrors.push(
|
|
8134
|
+
vErrors.push(err27);
|
|
8116
8135
|
}
|
|
8117
8136
|
errors++;
|
|
8118
8137
|
}
|
|
8119
8138
|
}
|
|
8120
|
-
if (
|
|
8121
|
-
if (typeof
|
|
8122
|
-
const
|
|
8139
|
+
if (data18.pluginId !== void 0) {
|
|
8140
|
+
if (typeof data18.pluginId !== "string") {
|
|
8141
|
+
const err28 = { instancePath: instancePath + "/__inputs/" + i3 + "/pluginId", schemaPath: "#/properties/__inputs/items/properties/pluginId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
8123
8142
|
if (vErrors === null) {
|
|
8124
|
-
vErrors = [
|
|
8143
|
+
vErrors = [err28];
|
|
8125
8144
|
} else {
|
|
8126
|
-
vErrors.push(
|
|
8145
|
+
vErrors.push(err28);
|
|
8127
8146
|
}
|
|
8128
8147
|
errors++;
|
|
8129
8148
|
}
|
|
8130
8149
|
}
|
|
8131
8150
|
} else {
|
|
8132
|
-
const
|
|
8151
|
+
const err29 = { instancePath: instancePath + "/__inputs/" + i3, schemaPath: "#/properties/__inputs/items/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
8133
8152
|
if (vErrors === null) {
|
|
8134
|
-
vErrors = [
|
|
8153
|
+
vErrors = [err29];
|
|
8135
8154
|
} else {
|
|
8136
|
-
vErrors.push(
|
|
8155
|
+
vErrors.push(err29);
|
|
8137
8156
|
}
|
|
8138
8157
|
errors++;
|
|
8139
8158
|
}
|
|
8140
8159
|
}
|
|
8141
8160
|
} else {
|
|
8142
|
-
const
|
|
8161
|
+
const err30 = { instancePath: instancePath + "/__inputs", schemaPath: "#/properties/__inputs/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
8143
8162
|
if (vErrors === null) {
|
|
8144
|
-
vErrors = [
|
|
8163
|
+
vErrors = [err30];
|
|
8145
8164
|
} else {
|
|
8146
|
-
vErrors.push(
|
|
8165
|
+
vErrors.push(err30);
|
|
8147
8166
|
}
|
|
8148
8167
|
errors++;
|
|
8149
8168
|
}
|
|
8150
8169
|
}
|
|
8151
8170
|
} else {
|
|
8152
|
-
const
|
|
8171
|
+
const err31 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
8153
8172
|
if (vErrors === null) {
|
|
8154
|
-
vErrors = [
|
|
8173
|
+
vErrors = [err31];
|
|
8155
8174
|
} else {
|
|
8156
|
-
vErrors.push(
|
|
8175
|
+
vErrors.push(err31);
|
|
8157
8176
|
}
|
|
8158
8177
|
errors++;
|
|
8159
8178
|
}
|
|
@@ -8420,9 +8439,9 @@ function validate17(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8420
8439
|
errors++;
|
|
8421
8440
|
}
|
|
8422
8441
|
}
|
|
8423
|
-
if (data.
|
|
8424
|
-
if (typeof data.
|
|
8425
|
-
const err4 = { instancePath: instancePath + "/
|
|
8442
|
+
if (data.localOnly !== void 0) {
|
|
8443
|
+
if (typeof data.localOnly !== "boolean") {
|
|
8444
|
+
const err4 = { instancePath: instancePath + "/localOnly", schemaPath: "#/properties/localOnly/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
|
|
8426
8445
|
if (vErrors === null) {
|
|
8427
8446
|
vErrors = [err4];
|
|
8428
8447
|
} else {
|
|
@@ -8431,9 +8450,9 @@ function validate17(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8431
8450
|
errors++;
|
|
8432
8451
|
}
|
|
8433
8452
|
}
|
|
8434
|
-
if (data.
|
|
8435
|
-
if (typeof data.
|
|
8436
|
-
const err5 = { instancePath: instancePath + "/
|
|
8453
|
+
if (data.uid !== void 0) {
|
|
8454
|
+
if (typeof data.uid !== "string") {
|
|
8455
|
+
const err5 = { instancePath: instancePath + "/uid", schemaPath: "#/properties/uid/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
8437
8456
|
if (vErrors === null) {
|
|
8438
8457
|
vErrors = [err5];
|
|
8439
8458
|
} else {
|
|
@@ -8442,9 +8461,9 @@ function validate17(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8442
8461
|
errors++;
|
|
8443
8462
|
}
|
|
8444
8463
|
}
|
|
8445
|
-
if (data.
|
|
8446
|
-
if (typeof data.
|
|
8447
|
-
const err6 = { instancePath: instancePath + "/
|
|
8464
|
+
if (data.title !== void 0) {
|
|
8465
|
+
if (typeof data.title !== "string") {
|
|
8466
|
+
const err6 = { instancePath: instancePath + "/title", schemaPath: "#/properties/title/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
8448
8467
|
if (vErrors === null) {
|
|
8449
8468
|
vErrors = [err6];
|
|
8450
8469
|
} else {
|
|
@@ -8453,209 +8472,220 @@ function validate17(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8453
8472
|
errors++;
|
|
8454
8473
|
}
|
|
8455
8474
|
}
|
|
8475
|
+
if (data.description !== void 0) {
|
|
8476
|
+
if (typeof data.description !== "string") {
|
|
8477
|
+
const err7 = { instancePath: instancePath + "/description", schemaPath: "#/properties/description/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
8478
|
+
if (vErrors === null) {
|
|
8479
|
+
vErrors = [err7];
|
|
8480
|
+
} else {
|
|
8481
|
+
vErrors.push(err7);
|
|
8482
|
+
}
|
|
8483
|
+
errors++;
|
|
8484
|
+
}
|
|
8485
|
+
}
|
|
8456
8486
|
if (data.tags !== void 0) {
|
|
8457
|
-
let
|
|
8458
|
-
if (Array.isArray(
|
|
8459
|
-
const len0 =
|
|
8487
|
+
let data5 = data.tags;
|
|
8488
|
+
if (Array.isArray(data5)) {
|
|
8489
|
+
const len0 = data5.length;
|
|
8460
8490
|
for (let i0 = 0; i0 < len0; i0++) {
|
|
8461
|
-
if (typeof
|
|
8462
|
-
const
|
|
8491
|
+
if (typeof data5[i0] !== "string") {
|
|
8492
|
+
const err8 = { instancePath: instancePath + "/tags/" + i0, schemaPath: "#/properties/tags/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
8463
8493
|
if (vErrors === null) {
|
|
8464
|
-
vErrors = [
|
|
8494
|
+
vErrors = [err8];
|
|
8465
8495
|
} else {
|
|
8466
|
-
vErrors.push(
|
|
8496
|
+
vErrors.push(err8);
|
|
8467
8497
|
}
|
|
8468
8498
|
errors++;
|
|
8469
8499
|
}
|
|
8470
8500
|
}
|
|
8471
8501
|
} else {
|
|
8472
|
-
const
|
|
8502
|
+
const err9 = { instancePath: instancePath + "/tags", schemaPath: "#/properties/tags/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
8473
8503
|
if (vErrors === null) {
|
|
8474
|
-
vErrors = [
|
|
8504
|
+
vErrors = [err9];
|
|
8475
8505
|
} else {
|
|
8476
|
-
vErrors.push(
|
|
8506
|
+
vErrors.push(err9);
|
|
8477
8507
|
}
|
|
8478
8508
|
errors++;
|
|
8479
8509
|
}
|
|
8480
8510
|
}
|
|
8481
8511
|
if (data.panels !== void 0) {
|
|
8482
|
-
let
|
|
8483
|
-
if (Array.isArray(
|
|
8484
|
-
const len1 =
|
|
8512
|
+
let data7 = data.panels;
|
|
8513
|
+
if (Array.isArray(data7)) {
|
|
8514
|
+
const len1 = data7.length;
|
|
8485
8515
|
for (let i1 = 0; i1 < len1; i1++) {
|
|
8486
|
-
if (!validate18(
|
|
8516
|
+
if (!validate18(data7[i1], { instancePath: instancePath + "/panels/" + i1, parentData: data7, parentDataProperty: i1, rootData })) {
|
|
8487
8517
|
vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);
|
|
8488
8518
|
errors = vErrors.length;
|
|
8489
8519
|
}
|
|
8490
8520
|
}
|
|
8491
8521
|
} else {
|
|
8492
|
-
const
|
|
8522
|
+
const err10 = { instancePath: instancePath + "/panels", schemaPath: "#/properties/panels/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
8493
8523
|
if (vErrors === null) {
|
|
8494
|
-
vErrors = [
|
|
8524
|
+
vErrors = [err10];
|
|
8495
8525
|
} else {
|
|
8496
|
-
vErrors.push(
|
|
8526
|
+
vErrors.push(err10);
|
|
8497
8527
|
}
|
|
8498
8528
|
errors++;
|
|
8499
8529
|
}
|
|
8500
8530
|
}
|
|
8501
8531
|
if (data.templating !== void 0) {
|
|
8502
|
-
let
|
|
8503
|
-
if (
|
|
8504
|
-
if (
|
|
8505
|
-
const
|
|
8532
|
+
let data9 = data.templating;
|
|
8533
|
+
if (data9 && typeof data9 == "object" && !Array.isArray(data9)) {
|
|
8534
|
+
if (data9.list === void 0) {
|
|
8535
|
+
const err11 = { instancePath: instancePath + "/templating", schemaPath: "#/properties/templating/required", keyword: "required", params: { missingProperty: "list" }, message: "must have required property 'list'" };
|
|
8506
8536
|
if (vErrors === null) {
|
|
8507
|
-
vErrors = [
|
|
8537
|
+
vErrors = [err11];
|
|
8508
8538
|
} else {
|
|
8509
|
-
vErrors.push(
|
|
8539
|
+
vErrors.push(err11);
|
|
8510
8540
|
}
|
|
8511
8541
|
errors++;
|
|
8512
8542
|
}
|
|
8513
|
-
if (
|
|
8514
|
-
let
|
|
8515
|
-
if (Array.isArray(
|
|
8516
|
-
const len2 =
|
|
8543
|
+
if (data9.list !== void 0) {
|
|
8544
|
+
let data10 = data9.list;
|
|
8545
|
+
if (Array.isArray(data10)) {
|
|
8546
|
+
const len2 = data10.length;
|
|
8517
8547
|
for (let i2 = 0; i2 < len2; i2++) {
|
|
8518
|
-
if (!validate33(
|
|
8548
|
+
if (!validate33(data10[i2], { instancePath: instancePath + "/templating/list/" + i2, parentData: data10, parentDataProperty: i2, rootData })) {
|
|
8519
8549
|
vErrors = vErrors === null ? validate33.errors : vErrors.concat(validate33.errors);
|
|
8520
8550
|
errors = vErrors.length;
|
|
8521
8551
|
}
|
|
8522
8552
|
}
|
|
8523
8553
|
} else {
|
|
8524
|
-
const
|
|
8554
|
+
const err12 = { instancePath: instancePath + "/templating/list", schemaPath: "#/properties/templating/properties/list/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
8525
8555
|
if (vErrors === null) {
|
|
8526
|
-
vErrors = [
|
|
8556
|
+
vErrors = [err12];
|
|
8527
8557
|
} else {
|
|
8528
|
-
vErrors.push(
|
|
8558
|
+
vErrors.push(err12);
|
|
8529
8559
|
}
|
|
8530
8560
|
errors++;
|
|
8531
8561
|
}
|
|
8532
8562
|
}
|
|
8533
8563
|
} else {
|
|
8534
|
-
const
|
|
8564
|
+
const err13 = { instancePath: instancePath + "/templating", schemaPath: "#/properties/templating/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
8535
8565
|
if (vErrors === null) {
|
|
8536
|
-
vErrors = [
|
|
8566
|
+
vErrors = [err13];
|
|
8537
8567
|
} else {
|
|
8538
|
-
vErrors.push(
|
|
8568
|
+
vErrors.push(err13);
|
|
8539
8569
|
}
|
|
8540
8570
|
errors++;
|
|
8541
8571
|
}
|
|
8542
8572
|
}
|
|
8543
8573
|
if (data.time !== void 0) {
|
|
8544
|
-
let
|
|
8545
|
-
if (
|
|
8546
|
-
if (
|
|
8547
|
-
const
|
|
8574
|
+
let data12 = data.time;
|
|
8575
|
+
if (data12 && typeof data12 == "object" && !Array.isArray(data12)) {
|
|
8576
|
+
if (data12.from === void 0) {
|
|
8577
|
+
const err14 = { instancePath: instancePath + "/time", schemaPath: "#/properties/time/required", keyword: "required", params: { missingProperty: "from" }, message: "must have required property 'from'" };
|
|
8548
8578
|
if (vErrors === null) {
|
|
8549
|
-
vErrors = [
|
|
8579
|
+
vErrors = [err14];
|
|
8550
8580
|
} else {
|
|
8551
|
-
vErrors.push(
|
|
8581
|
+
vErrors.push(err14);
|
|
8552
8582
|
}
|
|
8553
8583
|
errors++;
|
|
8554
8584
|
}
|
|
8555
|
-
if (
|
|
8556
|
-
const
|
|
8585
|
+
if (data12.to === void 0) {
|
|
8586
|
+
const err15 = { instancePath: instancePath + "/time", schemaPath: "#/properties/time/required", keyword: "required", params: { missingProperty: "to" }, message: "must have required property 'to'" };
|
|
8557
8587
|
if (vErrors === null) {
|
|
8558
|
-
vErrors = [
|
|
8588
|
+
vErrors = [err15];
|
|
8559
8589
|
} else {
|
|
8560
|
-
vErrors.push(
|
|
8590
|
+
vErrors.push(err15);
|
|
8561
8591
|
}
|
|
8562
8592
|
errors++;
|
|
8563
8593
|
}
|
|
8564
|
-
if (
|
|
8565
|
-
if (typeof
|
|
8566
|
-
const
|
|
8594
|
+
if (data12.from !== void 0) {
|
|
8595
|
+
if (typeof data12.from !== "string") {
|
|
8596
|
+
const err16 = { instancePath: instancePath + "/time/from", schemaPath: "#/properties/time/properties/from/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
8567
8597
|
if (vErrors === null) {
|
|
8568
|
-
vErrors = [
|
|
8598
|
+
vErrors = [err16];
|
|
8569
8599
|
} else {
|
|
8570
|
-
vErrors.push(
|
|
8600
|
+
vErrors.push(err16);
|
|
8571
8601
|
}
|
|
8572
8602
|
errors++;
|
|
8573
8603
|
}
|
|
8574
8604
|
}
|
|
8575
|
-
if (
|
|
8576
|
-
if (typeof
|
|
8577
|
-
const
|
|
8605
|
+
if (data12.to !== void 0) {
|
|
8606
|
+
if (typeof data12.to !== "string") {
|
|
8607
|
+
const err17 = { instancePath: instancePath + "/time/to", schemaPath: "#/properties/time/properties/to/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
8578
8608
|
if (vErrors === null) {
|
|
8579
|
-
vErrors = [
|
|
8609
|
+
vErrors = [err17];
|
|
8580
8610
|
} else {
|
|
8581
|
-
vErrors.push(
|
|
8611
|
+
vErrors.push(err17);
|
|
8582
8612
|
}
|
|
8583
8613
|
errors++;
|
|
8584
8614
|
}
|
|
8585
8615
|
}
|
|
8586
8616
|
} else {
|
|
8587
|
-
const
|
|
8617
|
+
const err18 = { instancePath: instancePath + "/time", schemaPath: "#/properties/time/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
8588
8618
|
if (vErrors === null) {
|
|
8589
|
-
vErrors = [
|
|
8619
|
+
vErrors = [err18];
|
|
8590
8620
|
} else {
|
|
8591
|
-
vErrors.push(
|
|
8621
|
+
vErrors.push(err18);
|
|
8592
8622
|
}
|
|
8593
8623
|
errors++;
|
|
8594
8624
|
}
|
|
8595
8625
|
}
|
|
8596
8626
|
if (data.timezone !== void 0) {
|
|
8597
8627
|
if (typeof data.timezone !== "string") {
|
|
8598
|
-
const
|
|
8628
|
+
const err19 = { instancePath: instancePath + "/timezone", schemaPath: "#/properties/timezone/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
8599
8629
|
if (vErrors === null) {
|
|
8600
|
-
vErrors = [
|
|
8630
|
+
vErrors = [err19];
|
|
8601
8631
|
} else {
|
|
8602
|
-
vErrors.push(
|
|
8632
|
+
vErrors.push(err19);
|
|
8603
8633
|
}
|
|
8604
8634
|
errors++;
|
|
8605
8635
|
}
|
|
8606
8636
|
}
|
|
8607
8637
|
if (data.refresh !== void 0) {
|
|
8608
|
-
let
|
|
8609
|
-
const
|
|
8638
|
+
let data16 = data.refresh;
|
|
8639
|
+
const _errs33 = errors;
|
|
8610
8640
|
let valid10 = false;
|
|
8611
|
-
const
|
|
8612
|
-
if (typeof
|
|
8613
|
-
const
|
|
8641
|
+
const _errs34 = errors;
|
|
8642
|
+
if (typeof data16 !== "string") {
|
|
8643
|
+
const err20 = { instancePath: instancePath + "/refresh", schemaPath: "#/properties/refresh/anyOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
8614
8644
|
if (vErrors === null) {
|
|
8615
|
-
vErrors = [
|
|
8645
|
+
vErrors = [err20];
|
|
8616
8646
|
} else {
|
|
8617
|
-
vErrors.push(
|
|
8647
|
+
vErrors.push(err20);
|
|
8618
8648
|
}
|
|
8619
8649
|
errors++;
|
|
8620
8650
|
}
|
|
8621
|
-
var _valid0 =
|
|
8651
|
+
var _valid0 = _errs34 === errors;
|
|
8622
8652
|
valid10 = valid10 || _valid0;
|
|
8623
8653
|
if (!valid10) {
|
|
8624
|
-
const
|
|
8625
|
-
if (typeof
|
|
8626
|
-
const
|
|
8654
|
+
const _errs36 = errors;
|
|
8655
|
+
if (typeof data16 !== "boolean") {
|
|
8656
|
+
const err21 = { instancePath: instancePath + "/refresh", schemaPath: "#/properties/refresh/anyOf/1/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
|
|
8627
8657
|
if (vErrors === null) {
|
|
8628
|
-
vErrors = [
|
|
8658
|
+
vErrors = [err21];
|
|
8629
8659
|
} else {
|
|
8630
|
-
vErrors.push(
|
|
8660
|
+
vErrors.push(err21);
|
|
8631
8661
|
}
|
|
8632
8662
|
errors++;
|
|
8633
8663
|
}
|
|
8634
|
-
if (false !==
|
|
8635
|
-
const
|
|
8664
|
+
if (false !== data16) {
|
|
8665
|
+
const err22 = { instancePath: instancePath + "/refresh", schemaPath: "#/properties/refresh/anyOf/1/const", keyword: "const", params: { allowedValue: false }, message: "must be equal to constant" };
|
|
8636
8666
|
if (vErrors === null) {
|
|
8637
|
-
vErrors = [
|
|
8667
|
+
vErrors = [err22];
|
|
8638
8668
|
} else {
|
|
8639
|
-
vErrors.push(
|
|
8669
|
+
vErrors.push(err22);
|
|
8640
8670
|
}
|
|
8641
8671
|
errors++;
|
|
8642
8672
|
}
|
|
8643
|
-
var _valid0 =
|
|
8673
|
+
var _valid0 = _errs36 === errors;
|
|
8644
8674
|
valid10 = valid10 || _valid0;
|
|
8645
8675
|
}
|
|
8646
8676
|
if (!valid10) {
|
|
8647
|
-
const
|
|
8677
|
+
const err23 = { instancePath: instancePath + "/refresh", schemaPath: "#/properties/refresh/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
|
|
8648
8678
|
if (vErrors === null) {
|
|
8649
|
-
vErrors = [
|
|
8679
|
+
vErrors = [err23];
|
|
8650
8680
|
} else {
|
|
8651
|
-
vErrors.push(
|
|
8681
|
+
vErrors.push(err23);
|
|
8652
8682
|
}
|
|
8653
8683
|
errors++;
|
|
8654
8684
|
} else {
|
|
8655
|
-
errors =
|
|
8685
|
+
errors = _errs33;
|
|
8656
8686
|
if (vErrors !== null) {
|
|
8657
|
-
if (
|
|
8658
|
-
vErrors.length =
|
|
8687
|
+
if (_errs33) {
|
|
8688
|
+
vErrors.length = _errs33;
|
|
8659
8689
|
} else {
|
|
8660
8690
|
vErrors = null;
|
|
8661
8691
|
}
|
|
@@ -8663,89 +8693,89 @@ function validate17(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8663
8693
|
}
|
|
8664
8694
|
}
|
|
8665
8695
|
if (data.__inputs !== void 0) {
|
|
8666
|
-
let
|
|
8667
|
-
if (Array.isArray(
|
|
8668
|
-
const len3 =
|
|
8696
|
+
let data17 = data.__inputs;
|
|
8697
|
+
if (Array.isArray(data17)) {
|
|
8698
|
+
const len3 = data17.length;
|
|
8669
8699
|
for (let i3 = 0; i3 < len3; i3++) {
|
|
8670
|
-
let
|
|
8671
|
-
if (
|
|
8672
|
-
if (
|
|
8673
|
-
const
|
|
8700
|
+
let data18 = data17[i3];
|
|
8701
|
+
if (data18 && typeof data18 == "object" && !Array.isArray(data18)) {
|
|
8702
|
+
if (data18.name === void 0) {
|
|
8703
|
+
const err24 = { instancePath: instancePath + "/__inputs/" + i3, schemaPath: "#/properties/__inputs/items/required", keyword: "required", params: { missingProperty: "name" }, message: "must have required property 'name'" };
|
|
8674
8704
|
if (vErrors === null) {
|
|
8675
|
-
vErrors = [
|
|
8705
|
+
vErrors = [err24];
|
|
8676
8706
|
} else {
|
|
8677
|
-
vErrors.push(
|
|
8707
|
+
vErrors.push(err24);
|
|
8678
8708
|
}
|
|
8679
8709
|
errors++;
|
|
8680
8710
|
}
|
|
8681
|
-
if (
|
|
8682
|
-
const
|
|
8711
|
+
if (data18.type === void 0) {
|
|
8712
|
+
const err25 = { instancePath: instancePath + "/__inputs/" + i3, schemaPath: "#/properties/__inputs/items/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property 'type'" };
|
|
8683
8713
|
if (vErrors === null) {
|
|
8684
|
-
vErrors = [
|
|
8714
|
+
vErrors = [err25];
|
|
8685
8715
|
} else {
|
|
8686
|
-
vErrors.push(
|
|
8716
|
+
vErrors.push(err25);
|
|
8687
8717
|
}
|
|
8688
8718
|
errors++;
|
|
8689
8719
|
}
|
|
8690
|
-
if (
|
|
8691
|
-
if (typeof
|
|
8692
|
-
const
|
|
8720
|
+
if (data18.name !== void 0) {
|
|
8721
|
+
if (typeof data18.name !== "string") {
|
|
8722
|
+
const err26 = { instancePath: instancePath + "/__inputs/" + i3 + "/name", schemaPath: "#/properties/__inputs/items/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
8693
8723
|
if (vErrors === null) {
|
|
8694
|
-
vErrors = [
|
|
8724
|
+
vErrors = [err26];
|
|
8695
8725
|
} else {
|
|
8696
|
-
vErrors.push(
|
|
8726
|
+
vErrors.push(err26);
|
|
8697
8727
|
}
|
|
8698
8728
|
errors++;
|
|
8699
8729
|
}
|
|
8700
8730
|
}
|
|
8701
|
-
if (
|
|
8702
|
-
if (typeof
|
|
8703
|
-
const
|
|
8731
|
+
if (data18.type !== void 0) {
|
|
8732
|
+
if (typeof data18.type !== "string") {
|
|
8733
|
+
const err27 = { instancePath: instancePath + "/__inputs/" + i3 + "/type", schemaPath: "#/properties/__inputs/items/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
8704
8734
|
if (vErrors === null) {
|
|
8705
|
-
vErrors = [
|
|
8735
|
+
vErrors = [err27];
|
|
8706
8736
|
} else {
|
|
8707
|
-
vErrors.push(
|
|
8737
|
+
vErrors.push(err27);
|
|
8708
8738
|
}
|
|
8709
8739
|
errors++;
|
|
8710
8740
|
}
|
|
8711
8741
|
}
|
|
8712
|
-
if (
|
|
8713
|
-
if (typeof
|
|
8714
|
-
const
|
|
8742
|
+
if (data18.pluginId !== void 0) {
|
|
8743
|
+
if (typeof data18.pluginId !== "string") {
|
|
8744
|
+
const err28 = { instancePath: instancePath + "/__inputs/" + i3 + "/pluginId", schemaPath: "#/properties/__inputs/items/properties/pluginId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
8715
8745
|
if (vErrors === null) {
|
|
8716
|
-
vErrors = [
|
|
8746
|
+
vErrors = [err28];
|
|
8717
8747
|
} else {
|
|
8718
|
-
vErrors.push(
|
|
8748
|
+
vErrors.push(err28);
|
|
8719
8749
|
}
|
|
8720
8750
|
errors++;
|
|
8721
8751
|
}
|
|
8722
8752
|
}
|
|
8723
8753
|
} else {
|
|
8724
|
-
const
|
|
8754
|
+
const err29 = { instancePath: instancePath + "/__inputs/" + i3, schemaPath: "#/properties/__inputs/items/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
8725
8755
|
if (vErrors === null) {
|
|
8726
|
-
vErrors = [
|
|
8756
|
+
vErrors = [err29];
|
|
8727
8757
|
} else {
|
|
8728
|
-
vErrors.push(
|
|
8758
|
+
vErrors.push(err29);
|
|
8729
8759
|
}
|
|
8730
8760
|
errors++;
|
|
8731
8761
|
}
|
|
8732
8762
|
}
|
|
8733
8763
|
} else {
|
|
8734
|
-
const
|
|
8764
|
+
const err30 = { instancePath: instancePath + "/__inputs", schemaPath: "#/properties/__inputs/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
8735
8765
|
if (vErrors === null) {
|
|
8736
|
-
vErrors = [
|
|
8766
|
+
vErrors = [err30];
|
|
8737
8767
|
} else {
|
|
8738
|
-
vErrors.push(
|
|
8768
|
+
vErrors.push(err30);
|
|
8739
8769
|
}
|
|
8740
8770
|
errors++;
|
|
8741
8771
|
}
|
|
8742
8772
|
}
|
|
8743
8773
|
} else {
|
|
8744
|
-
const
|
|
8774
|
+
const err31 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
8745
8775
|
if (vErrors === null) {
|
|
8746
|
-
vErrors = [
|
|
8776
|
+
vErrors = [err31];
|
|
8747
8777
|
} else {
|
|
8748
|
-
vErrors.push(
|
|
8778
|
+
vErrors.push(err31);
|
|
8749
8779
|
}
|
|
8750
8780
|
errors++;
|
|
8751
8781
|
}
|
|
@@ -12372,7 +12402,7 @@ Forms hold input panels. Each records to a \`metric\` (lowercase words joined wi
|
|
|
12372
12402
|
|
|
12373
12403
|
| type | what | options besides metric |
|
|
12374
12404
|
|---|---|---|
|
|
12375
|
-
| input-number | a number typed or stepped with + and \u2212 | unit, step, min, max |
|
|
12405
|
+
| input-number | a number typed or stepped with + and \u2212 | unit, step (1 by default: whole numbers only; give 0.1 for decimals, e.g. a weight), min, max |
|
|
12376
12406
|
| input-slider | a value dragged along a range | min, max, step, unit, labels (text spread along the track) |
|
|
12377
12407
|
| input-select | one of a set of choices | choices: [{ "label", "value" }], multi (allow several) |
|
|
12378
12408
|
| input-toggle | yes or no (records 1 or 0) | |
|
|
@@ -12381,6 +12411,8 @@ Forms hold input panels. Each records to a \`metric\` (lowercase words joined wi
|
|
|
12381
12411
|
| input-counter | taps that add up, e.g. glasses of water | increment, unit |
|
|
12382
12412
|
| input-duration | a length of time, recorded in seconds | placeholder |
|
|
12383
12413
|
|
|
12414
|
+
A form can set \`"localOnly": true\` (beside \`"kind"\`) to keep what it records on the device where it's recorded: it's never synced to an account, other devices or assistants. Use it only when asked, e.g. for a private journal.
|
|
12415
|
+
|
|
12384
12416
|
Any input (not counter) can also take \`required: true\`, \`default\` (a value, or \`"last"\` for the last one saved), and \`record: "always"\` to record its value on every save even when it wasn't changed.
|
|
12385
12417
|
|
|
12386
12418
|
\`input-group\` repeats fields once per item, for things like the sets of a workout or the dishes of a meal. Give it \`h: 12\` and options \`{ "itemTitle": "Set", "titleFrom": "<a field's metric>", "start": 1 | "last", "min", "max", "fields": [ { "type": "input-\u2026", "title", "span": 1\u201324, "options": { "metric", \u2026 } } ] }\`. Fields can be any input but input-counter.
|