@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.
@@ -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: _nullishCoalesce(o.step, () => ( 1)) };
1826
1826
  break;
1827
1827
  case "input-rating":
1828
- field2 = { ...base, type: "number", min: Math.round(_nullishCoalesce(o.min, () => ( 1))), max: Math.round(_nullishCoalesce(o.max, () => ( 5))) };
1828
+ field2 = { ...base, type: "number", min: Math.round(_nullishCoalesce(o.min, () => ( 1))), max: Math.round(_nullishCoalesce(o.max, () => ( 5))), step: 1 };
1829
1829
  break;
1830
1830
  case "input-slider":
1831
- field2 = { ...base, type: "number", unit: o.unit, min: _nullishCoalesce(o.min, () => ( 0)), max: _nullishCoalesce(o.max, () => ( 10)), choices: _optionalChain([o, 'access', _156 => _156.labels, 'optionalAccess', _157 => _157.length]) ? o.labels : void 0 };
1831
+ field2 = { ...base, type: "number", unit: o.unit, min: _nullishCoalesce(o.min, () => ( 0)), max: _nullishCoalesce(o.max, () => ( 10)), step: _nullishCoalesce(o.step, () => ( 1)), choices: _optionalChain([o, 'access', _156 => _156.labels, 'optionalAccess', _157 => _157.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
- return `a number${f.unit ? ` in ${f.unit}` : ""}${range}${f.choices ? ` (${f.choices.join(" \u2026 ")} along the scale)` : ""}`;
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 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)"
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 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)" };
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.uid !== void 0) {
7832
- if (typeof data.uid !== "string") {
7833
- const err4 = { instancePath: instancePath + "/uid", schemaPath: "#/properties/uid/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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.title !== void 0) {
7843
- if (typeof data.title !== "string") {
7844
- const err5 = { instancePath: instancePath + "/title", schemaPath: "#/properties/title/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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.description !== void 0) {
7854
- if (typeof data.description !== "string") {
7855
- const err6 = { instancePath: instancePath + "/description", schemaPath: "#/properties/description/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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 data4 = data.tags;
7866
- if (Array.isArray(data4)) {
7867
- const len0 = data4.length;
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 data4[i0] !== "string") {
7870
- const err7 = { instancePath: instancePath + "/tags/" + i0, schemaPath: "#/properties/tags/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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 = [err7];
7891
+ vErrors = [err8];
7873
7892
  } else {
7874
- vErrors.push(err7);
7893
+ vErrors.push(err8);
7875
7894
  }
7876
7895
  errors++;
7877
7896
  }
7878
7897
  }
7879
7898
  } else {
7880
- const err8 = { instancePath: instancePath + "/tags", schemaPath: "#/properties/tags/type", keyword: "type", params: { type: "array" }, message: "must be array" };
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 = [err8];
7901
+ vErrors = [err9];
7883
7902
  } else {
7884
- vErrors.push(err8);
7903
+ vErrors.push(err9);
7885
7904
  }
7886
7905
  errors++;
7887
7906
  }
7888
7907
  }
7889
7908
  if (data.panels !== void 0) {
7890
- let data6 = data.panels;
7891
- if (Array.isArray(data6)) {
7892
- const len1 = data6.length;
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(data6[i1], { instancePath: instancePath + "/panels/" + i1, parentData: data6, parentDataProperty: i1, rootData })) {
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 err9 = { instancePath: instancePath + "/panels", schemaPath: "#/properties/panels/type", keyword: "type", params: { type: "array" }, message: "must be array" };
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 = [err9];
7921
+ vErrors = [err10];
7903
7922
  } else {
7904
- vErrors.push(err9);
7923
+ vErrors.push(err10);
7905
7924
  }
7906
7925
  errors++;
7907
7926
  }
7908
7927
  }
7909
7928
  if (data.templating !== void 0) {
7910
- let data8 = data.templating;
7911
- if (data8 && typeof data8 == "object" && !Array.isArray(data8)) {
7912
- if (data8.list === void 0) {
7913
- const err10 = { instancePath: instancePath + "/templating", schemaPath: "#/properties/templating/required", keyword: "required", params: { missingProperty: "list" }, message: "must have required property 'list'" };
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 = [err10];
7934
+ vErrors = [err11];
7916
7935
  } else {
7917
- vErrors.push(err10);
7936
+ vErrors.push(err11);
7918
7937
  }
7919
7938
  errors++;
7920
7939
  }
7921
- if (data8.list !== void 0) {
7922
- let data9 = data8.list;
7923
- if (Array.isArray(data9)) {
7924
- const len2 = data9.length;
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(data9[i2], { instancePath: instancePath + "/templating/list/" + i2, parentData: data9, parentDataProperty: i2, rootData })) {
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 err11 = { instancePath: instancePath + "/templating/list", schemaPath: "#/properties/templating/properties/list/type", keyword: "type", params: { type: "array" }, message: "must be array" };
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 = [err11];
7953
+ vErrors = [err12];
7935
7954
  } else {
7936
- vErrors.push(err11);
7955
+ vErrors.push(err12);
7937
7956
  }
7938
7957
  errors++;
7939
7958
  }
7940
7959
  }
7941
7960
  } else {
7942
- const err12 = { instancePath: instancePath + "/templating", schemaPath: "#/properties/templating/type", keyword: "type", params: { type: "object" }, message: "must be object" };
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 = [err12];
7963
+ vErrors = [err13];
7945
7964
  } else {
7946
- vErrors.push(err12);
7965
+ vErrors.push(err13);
7947
7966
  }
7948
7967
  errors++;
7949
7968
  }
7950
7969
  }
7951
7970
  if (data.time !== void 0) {
7952
- let data11 = data.time;
7953
- if (data11 && typeof data11 == "object" && !Array.isArray(data11)) {
7954
- if (data11.from === void 0) {
7955
- const err13 = { instancePath: instancePath + "/time", schemaPath: "#/properties/time/required", keyword: "required", params: { missingProperty: "from" }, message: "must have required property 'from'" };
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 = [err13];
7976
+ vErrors = [err14];
7958
7977
  } else {
7959
- vErrors.push(err13);
7978
+ vErrors.push(err14);
7960
7979
  }
7961
7980
  errors++;
7962
7981
  }
7963
- if (data11.to === void 0) {
7964
- const err14 = { instancePath: instancePath + "/time", schemaPath: "#/properties/time/required", keyword: "required", params: { missingProperty: "to" }, message: "must have required property 'to'" };
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 = [err14];
7985
+ vErrors = [err15];
7967
7986
  } else {
7968
- vErrors.push(err14);
7987
+ vErrors.push(err15);
7969
7988
  }
7970
7989
  errors++;
7971
7990
  }
7972
- if (data11.from !== void 0) {
7973
- if (typeof data11.from !== "string") {
7974
- const err15 = { instancePath: instancePath + "/time/from", schemaPath: "#/properties/time/properties/from/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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 = [err15];
7995
+ vErrors = [err16];
7977
7996
  } else {
7978
- vErrors.push(err15);
7997
+ vErrors.push(err16);
7979
7998
  }
7980
7999
  errors++;
7981
8000
  }
7982
8001
  }
7983
- if (data11.to !== void 0) {
7984
- if (typeof data11.to !== "string") {
7985
- const err16 = { instancePath: instancePath + "/time/to", schemaPath: "#/properties/time/properties/to/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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 = [err16];
8006
+ vErrors = [err17];
7988
8007
  } else {
7989
- vErrors.push(err16);
8008
+ vErrors.push(err17);
7990
8009
  }
7991
8010
  errors++;
7992
8011
  }
7993
8012
  }
7994
8013
  } else {
7995
- const err17 = { instancePath: instancePath + "/time", schemaPath: "#/properties/time/type", keyword: "type", params: { type: "object" }, message: "must be object" };
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 = [err17];
8016
+ vErrors = [err18];
7998
8017
  } else {
7999
- vErrors.push(err17);
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 err18 = { instancePath: instancePath + "/timezone", schemaPath: "#/properties/timezone/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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 = [err18];
8027
+ vErrors = [err19];
8009
8028
  } else {
8010
- vErrors.push(err18);
8029
+ vErrors.push(err19);
8011
8030
  }
8012
8031
  errors++;
8013
8032
  }
8014
8033
  }
8015
8034
  if (data.refresh !== void 0) {
8016
- let data15 = data.refresh;
8017
- const _errs31 = errors;
8035
+ let data16 = data.refresh;
8036
+ const _errs33 = errors;
8018
8037
  let valid10 = false;
8019
- const _errs32 = errors;
8020
- if (typeof data15 !== "string") {
8021
- const err19 = { instancePath: instancePath + "/refresh", schemaPath: "#/properties/refresh/anyOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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 = [err19];
8042
+ vErrors = [err20];
8024
8043
  } else {
8025
- vErrors.push(err19);
8044
+ vErrors.push(err20);
8026
8045
  }
8027
8046
  errors++;
8028
8047
  }
8029
- var _valid0 = _errs32 === errors;
8048
+ var _valid0 = _errs34 === errors;
8030
8049
  valid10 = valid10 || _valid0;
8031
8050
  if (!valid10) {
8032
- const _errs34 = errors;
8033
- if (typeof data15 !== "boolean") {
8034
- const err20 = { instancePath: instancePath + "/refresh", schemaPath: "#/properties/refresh/anyOf/1/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
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 = [err20];
8055
+ vErrors = [err21];
8037
8056
  } else {
8038
- vErrors.push(err20);
8057
+ vErrors.push(err21);
8039
8058
  }
8040
8059
  errors++;
8041
8060
  }
8042
- if (false !== data15) {
8043
- const err21 = { instancePath: instancePath + "/refresh", schemaPath: "#/properties/refresh/anyOf/1/const", keyword: "const", params: { allowedValue: false }, message: "must be equal to constant" };
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 = [err21];
8064
+ vErrors = [err22];
8046
8065
  } else {
8047
- vErrors.push(err21);
8066
+ vErrors.push(err22);
8048
8067
  }
8049
8068
  errors++;
8050
8069
  }
8051
- var _valid0 = _errs34 === errors;
8070
+ var _valid0 = _errs36 === errors;
8052
8071
  valid10 = valid10 || _valid0;
8053
8072
  }
8054
8073
  if (!valid10) {
8055
- const err22 = { instancePath: instancePath + "/refresh", schemaPath: "#/properties/refresh/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
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 = [err22];
8076
+ vErrors = [err23];
8058
8077
  } else {
8059
- vErrors.push(err22);
8078
+ vErrors.push(err23);
8060
8079
  }
8061
8080
  errors++;
8062
8081
  } else {
8063
- errors = _errs31;
8082
+ errors = _errs33;
8064
8083
  if (vErrors !== null) {
8065
- if (_errs31) {
8066
- vErrors.length = _errs31;
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 data16 = data.__inputs;
8075
- if (Array.isArray(data16)) {
8076
- const len3 = data16.length;
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 data17 = data16[i3];
8079
- if (data17 && typeof data17 == "object" && !Array.isArray(data17)) {
8080
- if (data17.name === void 0) {
8081
- const err23 = { instancePath: instancePath + "/__inputs/" + i3, schemaPath: "#/properties/__inputs/items/required", keyword: "required", params: { missingProperty: "name" }, message: "must have required property 'name'" };
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 = [err23];
8102
+ vErrors = [err24];
8084
8103
  } else {
8085
- vErrors.push(err23);
8104
+ vErrors.push(err24);
8086
8105
  }
8087
8106
  errors++;
8088
8107
  }
8089
- if (data17.type === void 0) {
8090
- const err24 = { instancePath: instancePath + "/__inputs/" + i3, schemaPath: "#/properties/__inputs/items/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property 'type'" };
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 = [err24];
8111
+ vErrors = [err25];
8093
8112
  } else {
8094
- vErrors.push(err24);
8113
+ vErrors.push(err25);
8095
8114
  }
8096
8115
  errors++;
8097
8116
  }
8098
- if (data17.name !== void 0) {
8099
- if (typeof data17.name !== "string") {
8100
- const err25 = { instancePath: instancePath + "/__inputs/" + i3 + "/name", schemaPath: "#/properties/__inputs/items/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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 = [err25];
8121
+ vErrors = [err26];
8103
8122
  } else {
8104
- vErrors.push(err25);
8123
+ vErrors.push(err26);
8105
8124
  }
8106
8125
  errors++;
8107
8126
  }
8108
8127
  }
8109
- if (data17.type !== void 0) {
8110
- if (typeof data17.type !== "string") {
8111
- const err26 = { instancePath: instancePath + "/__inputs/" + i3 + "/type", schemaPath: "#/properties/__inputs/items/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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 = [err26];
8132
+ vErrors = [err27];
8114
8133
  } else {
8115
- vErrors.push(err26);
8134
+ vErrors.push(err27);
8116
8135
  }
8117
8136
  errors++;
8118
8137
  }
8119
8138
  }
8120
- if (data17.pluginId !== void 0) {
8121
- if (typeof data17.pluginId !== "string") {
8122
- const err27 = { instancePath: instancePath + "/__inputs/" + i3 + "/pluginId", schemaPath: "#/properties/__inputs/items/properties/pluginId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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 = [err27];
8143
+ vErrors = [err28];
8125
8144
  } else {
8126
- vErrors.push(err27);
8145
+ vErrors.push(err28);
8127
8146
  }
8128
8147
  errors++;
8129
8148
  }
8130
8149
  }
8131
8150
  } else {
8132
- const err28 = { instancePath: instancePath + "/__inputs/" + i3, schemaPath: "#/properties/__inputs/items/type", keyword: "type", params: { type: "object" }, message: "must be object" };
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 = [err28];
8153
+ vErrors = [err29];
8135
8154
  } else {
8136
- vErrors.push(err28);
8155
+ vErrors.push(err29);
8137
8156
  }
8138
8157
  errors++;
8139
8158
  }
8140
8159
  }
8141
8160
  } else {
8142
- const err29 = { instancePath: instancePath + "/__inputs", schemaPath: "#/properties/__inputs/type", keyword: "type", params: { type: "array" }, message: "must be array" };
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 = [err29];
8163
+ vErrors = [err30];
8145
8164
  } else {
8146
- vErrors.push(err29);
8165
+ vErrors.push(err30);
8147
8166
  }
8148
8167
  errors++;
8149
8168
  }
8150
8169
  }
8151
8170
  } else {
8152
- const err30 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
8171
+ const err31 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
8153
8172
  if (vErrors === null) {
8154
- vErrors = [err30];
8173
+ vErrors = [err31];
8155
8174
  } else {
8156
- vErrors.push(err30);
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.uid !== void 0) {
8424
- if (typeof data.uid !== "string") {
8425
- const err4 = { instancePath: instancePath + "/uid", schemaPath: "#/properties/uid/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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.title !== void 0) {
8435
- if (typeof data.title !== "string") {
8436
- const err5 = { instancePath: instancePath + "/title", schemaPath: "#/properties/title/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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.description !== void 0) {
8446
- if (typeof data.description !== "string") {
8447
- const err6 = { instancePath: instancePath + "/description", schemaPath: "#/properties/description/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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 data4 = data.tags;
8458
- if (Array.isArray(data4)) {
8459
- const len0 = data4.length;
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 data4[i0] !== "string") {
8462
- const err7 = { instancePath: instancePath + "/tags/" + i0, schemaPath: "#/properties/tags/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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 = [err7];
8494
+ vErrors = [err8];
8465
8495
  } else {
8466
- vErrors.push(err7);
8496
+ vErrors.push(err8);
8467
8497
  }
8468
8498
  errors++;
8469
8499
  }
8470
8500
  }
8471
8501
  } else {
8472
- const err8 = { instancePath: instancePath + "/tags", schemaPath: "#/properties/tags/type", keyword: "type", params: { type: "array" }, message: "must be array" };
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 = [err8];
8504
+ vErrors = [err9];
8475
8505
  } else {
8476
- vErrors.push(err8);
8506
+ vErrors.push(err9);
8477
8507
  }
8478
8508
  errors++;
8479
8509
  }
8480
8510
  }
8481
8511
  if (data.panels !== void 0) {
8482
- let data6 = data.panels;
8483
- if (Array.isArray(data6)) {
8484
- const len1 = data6.length;
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(data6[i1], { instancePath: instancePath + "/panels/" + i1, parentData: data6, parentDataProperty: i1, rootData })) {
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 err9 = { instancePath: instancePath + "/panels", schemaPath: "#/properties/panels/type", keyword: "type", params: { type: "array" }, message: "must be array" };
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 = [err9];
8524
+ vErrors = [err10];
8495
8525
  } else {
8496
- vErrors.push(err9);
8526
+ vErrors.push(err10);
8497
8527
  }
8498
8528
  errors++;
8499
8529
  }
8500
8530
  }
8501
8531
  if (data.templating !== void 0) {
8502
- let data8 = data.templating;
8503
- if (data8 && typeof data8 == "object" && !Array.isArray(data8)) {
8504
- if (data8.list === void 0) {
8505
- const err10 = { instancePath: instancePath + "/templating", schemaPath: "#/properties/templating/required", keyword: "required", params: { missingProperty: "list" }, message: "must have required property 'list'" };
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 = [err10];
8537
+ vErrors = [err11];
8508
8538
  } else {
8509
- vErrors.push(err10);
8539
+ vErrors.push(err11);
8510
8540
  }
8511
8541
  errors++;
8512
8542
  }
8513
- if (data8.list !== void 0) {
8514
- let data9 = data8.list;
8515
- if (Array.isArray(data9)) {
8516
- const len2 = data9.length;
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(data9[i2], { instancePath: instancePath + "/templating/list/" + i2, parentData: data9, parentDataProperty: i2, rootData })) {
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 err11 = { instancePath: instancePath + "/templating/list", schemaPath: "#/properties/templating/properties/list/type", keyword: "type", params: { type: "array" }, message: "must be array" };
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 = [err11];
8556
+ vErrors = [err12];
8527
8557
  } else {
8528
- vErrors.push(err11);
8558
+ vErrors.push(err12);
8529
8559
  }
8530
8560
  errors++;
8531
8561
  }
8532
8562
  }
8533
8563
  } else {
8534
- const err12 = { instancePath: instancePath + "/templating", schemaPath: "#/properties/templating/type", keyword: "type", params: { type: "object" }, message: "must be object" };
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 = [err12];
8566
+ vErrors = [err13];
8537
8567
  } else {
8538
- vErrors.push(err12);
8568
+ vErrors.push(err13);
8539
8569
  }
8540
8570
  errors++;
8541
8571
  }
8542
8572
  }
8543
8573
  if (data.time !== void 0) {
8544
- let data11 = data.time;
8545
- if (data11 && typeof data11 == "object" && !Array.isArray(data11)) {
8546
- if (data11.from === void 0) {
8547
- const err13 = { instancePath: instancePath + "/time", schemaPath: "#/properties/time/required", keyword: "required", params: { missingProperty: "from" }, message: "must have required property 'from'" };
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 = [err13];
8579
+ vErrors = [err14];
8550
8580
  } else {
8551
- vErrors.push(err13);
8581
+ vErrors.push(err14);
8552
8582
  }
8553
8583
  errors++;
8554
8584
  }
8555
- if (data11.to === void 0) {
8556
- const err14 = { instancePath: instancePath + "/time", schemaPath: "#/properties/time/required", keyword: "required", params: { missingProperty: "to" }, message: "must have required property 'to'" };
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 = [err14];
8588
+ vErrors = [err15];
8559
8589
  } else {
8560
- vErrors.push(err14);
8590
+ vErrors.push(err15);
8561
8591
  }
8562
8592
  errors++;
8563
8593
  }
8564
- if (data11.from !== void 0) {
8565
- if (typeof data11.from !== "string") {
8566
- const err15 = { instancePath: instancePath + "/time/from", schemaPath: "#/properties/time/properties/from/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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 = [err15];
8598
+ vErrors = [err16];
8569
8599
  } else {
8570
- vErrors.push(err15);
8600
+ vErrors.push(err16);
8571
8601
  }
8572
8602
  errors++;
8573
8603
  }
8574
8604
  }
8575
- if (data11.to !== void 0) {
8576
- if (typeof data11.to !== "string") {
8577
- const err16 = { instancePath: instancePath + "/time/to", schemaPath: "#/properties/time/properties/to/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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 = [err16];
8609
+ vErrors = [err17];
8580
8610
  } else {
8581
- vErrors.push(err16);
8611
+ vErrors.push(err17);
8582
8612
  }
8583
8613
  errors++;
8584
8614
  }
8585
8615
  }
8586
8616
  } else {
8587
- const err17 = { instancePath: instancePath + "/time", schemaPath: "#/properties/time/type", keyword: "type", params: { type: "object" }, message: "must be object" };
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 = [err17];
8619
+ vErrors = [err18];
8590
8620
  } else {
8591
- vErrors.push(err17);
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 err18 = { instancePath: instancePath + "/timezone", schemaPath: "#/properties/timezone/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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 = [err18];
8630
+ vErrors = [err19];
8601
8631
  } else {
8602
- vErrors.push(err18);
8632
+ vErrors.push(err19);
8603
8633
  }
8604
8634
  errors++;
8605
8635
  }
8606
8636
  }
8607
8637
  if (data.refresh !== void 0) {
8608
- let data15 = data.refresh;
8609
- const _errs31 = errors;
8638
+ let data16 = data.refresh;
8639
+ const _errs33 = errors;
8610
8640
  let valid10 = false;
8611
- const _errs32 = errors;
8612
- if (typeof data15 !== "string") {
8613
- const err19 = { instancePath: instancePath + "/refresh", schemaPath: "#/properties/refresh/anyOf/0/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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 = [err19];
8645
+ vErrors = [err20];
8616
8646
  } else {
8617
- vErrors.push(err19);
8647
+ vErrors.push(err20);
8618
8648
  }
8619
8649
  errors++;
8620
8650
  }
8621
- var _valid0 = _errs32 === errors;
8651
+ var _valid0 = _errs34 === errors;
8622
8652
  valid10 = valid10 || _valid0;
8623
8653
  if (!valid10) {
8624
- const _errs34 = errors;
8625
- if (typeof data15 !== "boolean") {
8626
- const err20 = { instancePath: instancePath + "/refresh", schemaPath: "#/properties/refresh/anyOf/1/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" };
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 = [err20];
8658
+ vErrors = [err21];
8629
8659
  } else {
8630
- vErrors.push(err20);
8660
+ vErrors.push(err21);
8631
8661
  }
8632
8662
  errors++;
8633
8663
  }
8634
- if (false !== data15) {
8635
- const err21 = { instancePath: instancePath + "/refresh", schemaPath: "#/properties/refresh/anyOf/1/const", keyword: "const", params: { allowedValue: false }, message: "must be equal to constant" };
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 = [err21];
8667
+ vErrors = [err22];
8638
8668
  } else {
8639
- vErrors.push(err21);
8669
+ vErrors.push(err22);
8640
8670
  }
8641
8671
  errors++;
8642
8672
  }
8643
- var _valid0 = _errs34 === errors;
8673
+ var _valid0 = _errs36 === errors;
8644
8674
  valid10 = valid10 || _valid0;
8645
8675
  }
8646
8676
  if (!valid10) {
8647
- const err22 = { instancePath: instancePath + "/refresh", schemaPath: "#/properties/refresh/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
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 = [err22];
8679
+ vErrors = [err23];
8650
8680
  } else {
8651
- vErrors.push(err22);
8681
+ vErrors.push(err23);
8652
8682
  }
8653
8683
  errors++;
8654
8684
  } else {
8655
- errors = _errs31;
8685
+ errors = _errs33;
8656
8686
  if (vErrors !== null) {
8657
- if (_errs31) {
8658
- vErrors.length = _errs31;
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 data16 = data.__inputs;
8667
- if (Array.isArray(data16)) {
8668
- const len3 = data16.length;
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 data17 = data16[i3];
8671
- if (data17 && typeof data17 == "object" && !Array.isArray(data17)) {
8672
- if (data17.name === void 0) {
8673
- const err23 = { instancePath: instancePath + "/__inputs/" + i3, schemaPath: "#/properties/__inputs/items/required", keyword: "required", params: { missingProperty: "name" }, message: "must have required property 'name'" };
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 = [err23];
8705
+ vErrors = [err24];
8676
8706
  } else {
8677
- vErrors.push(err23);
8707
+ vErrors.push(err24);
8678
8708
  }
8679
8709
  errors++;
8680
8710
  }
8681
- if (data17.type === void 0) {
8682
- const err24 = { instancePath: instancePath + "/__inputs/" + i3, schemaPath: "#/properties/__inputs/items/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property 'type'" };
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 = [err24];
8714
+ vErrors = [err25];
8685
8715
  } else {
8686
- vErrors.push(err24);
8716
+ vErrors.push(err25);
8687
8717
  }
8688
8718
  errors++;
8689
8719
  }
8690
- if (data17.name !== void 0) {
8691
- if (typeof data17.name !== "string") {
8692
- const err25 = { instancePath: instancePath + "/__inputs/" + i3 + "/name", schemaPath: "#/properties/__inputs/items/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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 = [err25];
8724
+ vErrors = [err26];
8695
8725
  } else {
8696
- vErrors.push(err25);
8726
+ vErrors.push(err26);
8697
8727
  }
8698
8728
  errors++;
8699
8729
  }
8700
8730
  }
8701
- if (data17.type !== void 0) {
8702
- if (typeof data17.type !== "string") {
8703
- const err26 = { instancePath: instancePath + "/__inputs/" + i3 + "/type", schemaPath: "#/properties/__inputs/items/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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 = [err26];
8735
+ vErrors = [err27];
8706
8736
  } else {
8707
- vErrors.push(err26);
8737
+ vErrors.push(err27);
8708
8738
  }
8709
8739
  errors++;
8710
8740
  }
8711
8741
  }
8712
- if (data17.pluginId !== void 0) {
8713
- if (typeof data17.pluginId !== "string") {
8714
- const err27 = { instancePath: instancePath + "/__inputs/" + i3 + "/pluginId", schemaPath: "#/properties/__inputs/items/properties/pluginId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
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 = [err27];
8746
+ vErrors = [err28];
8717
8747
  } else {
8718
- vErrors.push(err27);
8748
+ vErrors.push(err28);
8719
8749
  }
8720
8750
  errors++;
8721
8751
  }
8722
8752
  }
8723
8753
  } else {
8724
- const err28 = { instancePath: instancePath + "/__inputs/" + i3, schemaPath: "#/properties/__inputs/items/type", keyword: "type", params: { type: "object" }, message: "must be object" };
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 = [err28];
8756
+ vErrors = [err29];
8727
8757
  } else {
8728
- vErrors.push(err28);
8758
+ vErrors.push(err29);
8729
8759
  }
8730
8760
  errors++;
8731
8761
  }
8732
8762
  }
8733
8763
  } else {
8734
- const err29 = { instancePath: instancePath + "/__inputs", schemaPath: "#/properties/__inputs/type", keyword: "type", params: { type: "array" }, message: "must be array" };
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 = [err29];
8766
+ vErrors = [err30];
8737
8767
  } else {
8738
- vErrors.push(err29);
8768
+ vErrors.push(err30);
8739
8769
  }
8740
8770
  errors++;
8741
8771
  }
8742
8772
  }
8743
8773
  } else {
8744
- const err30 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
8774
+ const err31 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
8745
8775
  if (vErrors === null) {
8746
- vErrors = [err30];
8776
+ vErrors = [err31];
8747
8777
  } else {
8748
- vErrors.push(err30);
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.