@json-layout/vocabulary 0.2.0 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@json-layout/vocabulary",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Main JSON Layout vocabulary as JSON schemas and Typescript types. Also contains some small utility functions to validate and normalize annotations.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -120,6 +120,15 @@ export default {
120
120
  },
121
121
  "messages": {
122
122
  "type": "object"
123
+ },
124
+ "defaultData": {
125
+ "$ref": "#/$defs/partial-expression"
126
+ },
127
+ "constData": {
128
+ "$ref": "#/$defs/partial-expression"
129
+ },
130
+ "autofocus": {
131
+ "type": "boolean"
123
132
  }
124
133
  }
125
134
  },
@@ -151,6 +160,7 @@ export default {
151
160
  "tabs",
152
161
  "vertical-tabs",
153
162
  "expansion-panels",
163
+ "stepper",
154
164
  "one-of-select"
155
165
  ]
156
166
  },
@@ -47,7 +47,10 @@
47
47
  }
48
48
  },
49
49
  "options": {"type": "object"},
50
- "messages": {"type": "object"}
50
+ "messages": {"type": "object"},
51
+ "defaultData": {"$ref": "#/$defs/partial-expression"},
52
+ "constData": {"$ref": "#/$defs/partial-expression"},
53
+ "autofocus": {"type": "boolean"}
51
54
  }
52
55
  },
53
56
  "comp-name": {
@@ -78,6 +81,7 @@
78
81
  "tabs",
79
82
  "vertical-tabs",
80
83
  "expansion-panels",
84
+ "stepper",
81
85
  "one-of-select"
82
86
  ]
83
87
  },
@@ -21,6 +21,7 @@ export type ComponentName =
21
21
  | "tabs"
22
22
  | "vertical-tabs"
23
23
  | "expansion-panels"
24
+ | "stepper"
24
25
  | "one-of-select";
25
26
  export type PartialChild = PartialChild1 & {
26
27
  key?: string | number;
@@ -87,6 +88,9 @@ export interface PartialCompObject {
87
88
  messages?: {
88
89
  [k: string]: unknown;
89
90
  };
91
+ defaultData?: PartialExpression;
92
+ constData?: PartialExpression;
93
+ autofocus?: boolean;
90
94
  [k: string]: unknown;
91
95
  }
92
96
  export interface PartialExpressionObj {
@@ -1,2 +1,2 @@
1
1
  // @ts-ignore
2
- export const validate = validate22;export default validate22;const schema26 = {"$id":"https://json-layout.github.io/layout-keyword","title":"layout keyword","errorMessage":{"anyOf":"layout keyword must be a string with a valid component name, or a more complete object definition, or an array of children, or a switch structure"},"anyOf":[{"$ref":"#/$defs/comp-name"},{"$ref":"#/$defs/partial-children"},{"$ref":"#/$defs/partial-comp-object"},{"$ref":"#/$defs/partial-switch"}],"$defs":{"partial-switch":{"type":"object","required":["switch"],"additionalProperties":false,"properties":{"switch":{"type":"array","items":{"$ref":"#/$defs/partial-comp-object"}}}},"partial-comp-object":{"title":"partial comp object","type":"object","properties":{"comp":{"$ref":"#/$defs/comp-name"},"help":{"type":"string"},"children":{"$ref":"#/$defs/partial-children"},"label":{"type":"string"},"title":{"type":["string","null"]},"subtitle":{"type":["string","null"]},"step":{"type":"number"},"if":{"$ref":"#/$defs/partial-expression"},"items":{"type":"array","items":{"$ref":"#/$defs/partial-select-item"}},"getItems":{"$ref":"#/$defs/partial-get-items"},"listEditMode":{"type":"string","enum":["inline","inline-single","menu","dialog"]},"listActions":{"type":"array","items":{"type":"string","enum":["add","edit","delete","sort","duplicate"]}},"cols":{"$ref":"#/$defs/partial-cols"},"props":{"type":"object"},"slots":{"type":"object","patternProperties":{".*":{"$ref":"#/$defs/partial-slot"}}},"options":{"type":"object"},"messages":{"type":"object"}}},"comp-name":{"title":"component name","type":"string","errorMessage":{"enum":"component name is unknown"},"enum":["none","text-field","number-field","textarea","markdown","checkbox","switch","slider","date-picker","date-time-picker","time-picker","color-picker","combobox","number-combobox","section","list","select","autocomplete","tabs","vertical-tabs","expansion-panels","one-of-select"]},"partial-child":{"type":"object","unevaluatedProperties":false,"properties":{"key":{"type":["string","integer"]},"cols":{"$ref":"#/$defs/partial-cols"}},"allOf":[{"$ref":"#/$defs/partial-comp-object"},{}]},"partial-children":{"type":"array","items":{"oneOf":[{"type":"string"},{"$ref":"#/$defs/partial-child"}]}},"partial-expression":{"oneOf":[{"type":"string"},{"$ref":"#/$defs/partial-expression-obj"}]},"partial-expression-obj":{"type":"object","required":["expr"],"properties":{"type":{"type":"string","enum":["js-fn","js-eval","js-tpl"]},"expr":{"type":"string"}}},"partial-select-item":{"oneOf":[{"type":"string"},{"type":"object","properties":{"key":{"type":"string"},"title":{"type":"string"},"value":{}}}]},"partial-get-items":{"oneOf":[{"type":"string"},{"$ref":"#/$defs/partial-get-items-obj"}]},"partial-get-items-obj":{"type":"object","allOf":[{"properties":{"itemTitle":{"$ref":"#/$defs/partial-expression"},"itemKey":{"$ref":"#/$defs/partial-expression"},"itemValue":{"$ref":"#/$defs/partial-expression"},"itemIcon":{"$ref":"#/$defs/partial-expression"},"itemsResults":{"$ref":"#/$defs/partial-expression"}}},{"anyOf":[{"type":"object"},{"$ref":"#/$defs/partial-expression-obj"},{"$ref":"#/$defs/partial-get-items-fetch"}]}]},"partial-get-items-fetch":{"type":"object","required":["url"],"properties":{"url":{"$ref":"#/$defs/partial-expression"}}},"partial-cols":{"oneOf":[{"$ref":"#/$defs/partial-cols-number"},{"$ref":"#/$defs/partial-cols-obj"}]},"partial-cols-obj":{"type":"object","additionalProperties":false,"properties":{"xs":{"$ref":"#/$defs/partial-cols-number"},"sm":{"$ref":"#/$defs/partial-cols-number"},"md":{"$ref":"#/$defs/partial-cols-number"},"lg":{"$ref":"#/$defs/partial-cols-number"},"xl":{"$ref":"#/$defs/partial-cols-number"},"xxl":{"$ref":"#/$defs/partial-cols-number"}}},"partial-cols-number":{"type":"integer","minimum":0,"maximum":12},"partial-slot":{"oneOf":[{"type":"string"},{"$ref":"#/$defs/partial-slot-text"},{"$ref":"#/$defs/partial-slot-markdown"},{"$ref":"#/$defs/partial-slot-name"}]},"partial-slot-text":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string"}}},"partial-slot-markdown":{"type":"object","additionalProperties":false,"required":["markdown"],"properties":{"markdown":{"type":"string"}}},"partial-slot-name":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"}}}}};const schema27 = {"title":"component name","type":"string","errorMessage":{"enum":"component name is unknown"},"enum":["none","text-field","number-field","textarea","markdown","checkbox","switch","slider","date-picker","date-time-picker","time-picker","color-picker","combobox","number-combobox","section","list","select","autocomplete","tabs","vertical-tabs","expansion-panels","one-of-select"]};const schema28 = {"type":"array","items":{"oneOf":[{"type":"string"},{"$ref":"#/$defs/partial-child"}]}};const schema29 = {"type":"object","unevaluatedProperties":false,"properties":{"key":{"type":["string","integer"]},"cols":{"$ref":"#/$defs/partial-cols"}},"allOf":[{"$ref":"#/$defs/partial-comp-object"},{}]};const schema30 = {"title":"partial comp object","type":"object","properties":{"comp":{"$ref":"#/$defs/comp-name"},"help":{"type":"string"},"children":{"$ref":"#/$defs/partial-children"},"label":{"type":"string"},"title":{"type":["string","null"]},"subtitle":{"type":["string","null"]},"step":{"type":"number"},"if":{"$ref":"#/$defs/partial-expression"},"items":{"type":"array","items":{"$ref":"#/$defs/partial-select-item"}},"getItems":{"$ref":"#/$defs/partial-get-items"},"listEditMode":{"type":"string","enum":["inline","inline-single","menu","dialog"]},"listActions":{"type":"array","items":{"type":"string","enum":["add","edit","delete","sort","duplicate"]}},"cols":{"$ref":"#/$defs/partial-cols"},"props":{"type":"object"},"slots":{"type":"object","patternProperties":{".*":{"$ref":"#/$defs/partial-slot"}}},"options":{"type":"object"},"messages":{"type":"object"}}};const schema34 = {"oneOf":[{"type":"string"},{"type":"object","properties":{"key":{"type":"string"},"title":{"type":"string"},"value":{}}}]};const wrapper0 = {validate: validate23};const schema32 = {"oneOf":[{"type":"string"},{"$ref":"#/$defs/partial-expression-obj"}]};const schema33 = {"type":"object","required":["expr"],"properties":{"type":{"type":"string","enum":["js-fn","js-eval","js-tpl"]},"expr":{"type":"string"}}};function validate26(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate26.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs0 = errors;let valid0 = false;let passing0 = null;const _errs1 = errors;if(typeof data !== "string"){const err0 = {instancePath,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs1 === errors;if(_valid0){valid0 = true;passing0 = 0;}const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.expr === undefined){const err1 = {instancePath,schemaPath:"#/$defs/partial-expression-obj/required",keyword:"required",params:{missingProperty: "expr"},message:"must have required property '"+"expr"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.type !== undefined){let data0 = data.type;if(typeof data0 !== "string"){const err2 = {instancePath:instancePath+"/type",schemaPath:"#/$defs/partial-expression-obj/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(!(((data0 === "js-fn") || (data0 === "js-eval")) || (data0 === "js-tpl"))){const err3 = {instancePath:instancePath+"/type",schemaPath:"#/$defs/partial-expression-obj/properties/type/enum",keyword:"enum",params:{allowedValues: schema33.properties.type.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.expr !== undefined){if(typeof data.expr !== "string"){const err4 = {instancePath:instancePath+"/expr",schemaPath:"#/$defs/partial-expression-obj/properties/expr/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}else {const err5 = {instancePath,schemaPath:"#/$defs/partial-expression-obj/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid0 = _errs3 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 1];}else {if(_valid0){valid0 = true;passing0 = 1;var props0 = {};props0.type = true;props0.expr = true;}}if(!valid0){const err6 = {instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate26.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate26.evaluated = {"dynamicProps":true,"dynamicItems":false};const schema35 = {"oneOf":[{"type":"string"},{"$ref":"#/$defs/partial-get-items-obj"}]};const schema36 = {"type":"object","allOf":[{"properties":{"itemTitle":{"$ref":"#/$defs/partial-expression"},"itemKey":{"$ref":"#/$defs/partial-expression"},"itemValue":{"$ref":"#/$defs/partial-expression"},"itemIcon":{"$ref":"#/$defs/partial-expression"},"itemsResults":{"$ref":"#/$defs/partial-expression"}}},{"anyOf":[{"type":"object"},{"$ref":"#/$defs/partial-expression-obj"},{"$ref":"#/$defs/partial-get-items-fetch"}]}]};const schema38 = {"type":"object","required":["url"],"properties":{"url":{"$ref":"#/$defs/partial-expression"}}};function validate35(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate35.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.url === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "url"},message:"must have required property '"+"url"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.url !== undefined){if(!(validate26(data.url, {instancePath:instancePath+"/url",parentData:data,parentDataProperty:"url",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}}else {const err1 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}validate35.errors = vErrors;return errors === 0;}validate35.evaluated = {"props":{"url":true},"dynamicProps":false,"dynamicItems":false};function validate29(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate29.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(!(data && typeof data == "object" && !Array.isArray(data))){const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.itemTitle !== undefined){if(!(validate26(data.itemTitle, {instancePath:instancePath+"/itemTitle",parentData:data,parentDataProperty:"itemTitle",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}if(data.itemKey !== undefined){if(!(validate26(data.itemKey, {instancePath:instancePath+"/itemKey",parentData:data,parentDataProperty:"itemKey",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}if(data.itemValue !== undefined){if(!(validate26(data.itemValue, {instancePath:instancePath+"/itemValue",parentData:data,parentDataProperty:"itemValue",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}if(data.itemIcon !== undefined){if(!(validate26(data.itemIcon, {instancePath:instancePath+"/itemIcon",parentData:data,parentDataProperty:"itemIcon",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}if(data.itemsResults !== undefined){if(!(validate26(data.itemsResults, {instancePath:instancePath+"/itemsResults",parentData:data,parentDataProperty:"itemsResults",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}}const _errs8 = errors;let valid2 = false;const _errs9 = errors;if(!(data && typeof data == "object" && !Array.isArray(data))){const err1 = {instancePath,schemaPath:"#/allOf/1/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs9 === errors;valid2 = valid2 || _valid0;const _errs11 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.expr === undefined){const err2 = {instancePath,schemaPath:"#/$defs/partial-expression-obj/required",keyword:"required",params:{missingProperty: "expr"},message:"must have required property '"+"expr"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.type !== undefined){let data5 = data.type;if(typeof data5 !== "string"){const err3 = {instancePath:instancePath+"/type",schemaPath:"#/$defs/partial-expression-obj/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(!(((data5 === "js-fn") || (data5 === "js-eval")) || (data5 === "js-tpl"))){const err4 = {instancePath:instancePath+"/type",schemaPath:"#/$defs/partial-expression-obj/properties/type/enum",keyword:"enum",params:{allowedValues: schema33.properties.type.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.expr !== undefined){if(typeof data.expr !== "string"){const err5 = {instancePath:instancePath+"/expr",schemaPath:"#/$defs/partial-expression-obj/properties/expr/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}else {const err6 = {instancePath,schemaPath:"#/$defs/partial-expression-obj/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid0 = _errs11 === errors;valid2 = valid2 || _valid0;if(_valid0){var props5 = {};props5.type = true;props5.expr = true;}const _errs18 = errors;if(!(validate35(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate35.errors : vErrors.concat(validate35.errors);errors = vErrors.length;}var _valid0 = _errs18 === errors;valid2 = valid2 || _valid0;if(_valid0){if(props5 !== true){props5 = props5 || {};props5.url = true;}}if(!valid2){const err7 = {instancePath,schemaPath:"#/allOf/1/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}else {errors = _errs8;if(vErrors !== null){if(_errs8){vErrors.length = _errs8;}else {vErrors = null;}}}if(props5 !== true){props5 = props5 || {};props5.itemTitle = true;props5.itemKey = true;props5.itemValue = true;props5.itemIcon = true;props5.itemsResults = true;}validate29.errors = vErrors;evaluated0.props = props5;return errors === 0;}validate29.evaluated = {"dynamicProps":true,"dynamicItems":false};function validate28(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate28.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs0 = errors;let valid0 = false;let passing0 = null;const _errs1 = errors;if(typeof data !== "string"){const err0 = {instancePath,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs1 === errors;if(_valid0){valid0 = true;passing0 = 0;}const _errs3 = errors;if(!(validate29(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate29.errors : vErrors.concat(validate29.errors);errors = vErrors.length;}else {var props0 = validate29.evaluated.props;}var _valid0 = _errs3 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 1];}else {if(_valid0){valid0 = true;passing0 = 1;}}if(!valid0){const err1 = {instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate28.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate28.evaluated = {"dynamicProps":true,"dynamicItems":false};const schema39 = {"oneOf":[{"$ref":"#/$defs/partial-cols-number"},{"$ref":"#/$defs/partial-cols-obj"}]};const schema40 = {"type":"integer","minimum":0,"maximum":12};const schema41 = {"type":"object","additionalProperties":false,"properties":{"xs":{"$ref":"#/$defs/partial-cols-number"},"sm":{"$ref":"#/$defs/partial-cols-number"},"md":{"$ref":"#/$defs/partial-cols-number"},"lg":{"$ref":"#/$defs/partial-cols-number"},"xl":{"$ref":"#/$defs/partial-cols-number"},"xxl":{"$ref":"#/$defs/partial-cols-number"}}};function validate41(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate41.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!((((((key0 === "xs") || (key0 === "sm")) || (key0 === "md")) || (key0 === "lg")) || (key0 === "xl")) || (key0 === "xxl"))){const err0 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}if(data.xs !== undefined){let data0 = data.xs;if(!(((typeof data0 == "number") && (!(data0 % 1) && !isNaN(data0))) && (isFinite(data0)))){const err1 = {instancePath:instancePath+"/xs",schemaPath:"#/$defs/partial-cols-number/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if((typeof data0 == "number") && (isFinite(data0))){if(data0 > 12 || isNaN(data0)){const err2 = {instancePath:instancePath+"/xs",schemaPath:"#/$defs/partial-cols-number/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0 < 0 || isNaN(data0)){const err3 = {instancePath:instancePath+"/xs",schemaPath:"#/$defs/partial-cols-number/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}}if(data.sm !== undefined){let data1 = data.sm;if(!(((typeof data1 == "number") && (!(data1 % 1) && !isNaN(data1))) && (isFinite(data1)))){const err4 = {instancePath:instancePath+"/sm",schemaPath:"#/$defs/partial-cols-number/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if((typeof data1 == "number") && (isFinite(data1))){if(data1 > 12 || isNaN(data1)){const err5 = {instancePath:instancePath+"/sm",schemaPath:"#/$defs/partial-cols-number/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data1 < 0 || isNaN(data1)){const err6 = {instancePath:instancePath+"/sm",schemaPath:"#/$defs/partial-cols-number/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}if(data.md !== undefined){let data2 = data.md;if(!(((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))){const err7 = {instancePath:instancePath+"/md",schemaPath:"#/$defs/partial-cols-number/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if((typeof data2 == "number") && (isFinite(data2))){if(data2 > 12 || isNaN(data2)){const err8 = {instancePath:instancePath+"/md",schemaPath:"#/$defs/partial-cols-number/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data2 < 0 || isNaN(data2)){const err9 = {instancePath:instancePath+"/md",schemaPath:"#/$defs/partial-cols-number/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}if(data.lg !== undefined){let data3 = data.lg;if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){const err10 = {instancePath:instancePath+"/lg",schemaPath:"#/$defs/partial-cols-number/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if((typeof data3 == "number") && (isFinite(data3))){if(data3 > 12 || isNaN(data3)){const err11 = {instancePath:instancePath+"/lg",schemaPath:"#/$defs/partial-cols-number/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data3 < 0 || isNaN(data3)){const err12 = {instancePath:instancePath+"/lg",schemaPath:"#/$defs/partial-cols-number/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}if(data.xl !== undefined){let data4 = data.xl;if(!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){const err13 = {instancePath:instancePath+"/xl",schemaPath:"#/$defs/partial-cols-number/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}if((typeof data4 == "number") && (isFinite(data4))){if(data4 > 12 || isNaN(data4)){const err14 = {instancePath:instancePath+"/xl",schemaPath:"#/$defs/partial-cols-number/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}if(data4 < 0 || isNaN(data4)){const err15 = {instancePath:instancePath+"/xl",schemaPath:"#/$defs/partial-cols-number/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}if(data.xxl !== undefined){let data5 = data.xxl;if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){const err16 = {instancePath:instancePath+"/xxl",schemaPath:"#/$defs/partial-cols-number/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}if((typeof data5 == "number") && (isFinite(data5))){if(data5 > 12 || isNaN(data5)){const err17 = {instancePath:instancePath+"/xxl",schemaPath:"#/$defs/partial-cols-number/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}if(data5 < 0 || isNaN(data5)){const err18 = {instancePath:instancePath+"/xxl",schemaPath:"#/$defs/partial-cols-number/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}}}else {const err19 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}validate41.errors = vErrors;return errors === 0;}validate41.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};function validate40(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate40.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs0 = errors;let valid0 = false;let passing0 = null;const _errs1 = errors;if(!(((typeof data == "number") && (!(data % 1) && !isNaN(data))) && (isFinite(data)))){const err0 = {instancePath,schemaPath:"#/$defs/partial-cols-number/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if((typeof data == "number") && (isFinite(data))){if(data > 12 || isNaN(data)){const err1 = {instancePath,schemaPath:"#/$defs/partial-cols-number/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data < 0 || isNaN(data)){const err2 = {instancePath,schemaPath:"#/$defs/partial-cols-number/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var _valid0 = _errs1 === errors;if(_valid0){valid0 = true;passing0 = 0;}const _errs4 = errors;if(!(validate41(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate41.errors : vErrors.concat(validate41.errors);errors = vErrors.length;}var _valid0 = _errs4 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 1];}else {if(_valid0){valid0 = true;passing0 = 1;var props0 = true;}}if(!valid0){const err3 = {instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate40.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate40.evaluated = {"dynamicProps":true,"dynamicItems":false};const schema48 = {"oneOf":[{"type":"string"},{"$ref":"#/$defs/partial-slot-text"},{"$ref":"#/$defs/partial-slot-markdown"},{"$ref":"#/$defs/partial-slot-name"}]};const schema49 = {"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string"}}};const schema50 = {"type":"object","additionalProperties":false,"required":["markdown"],"properties":{"markdown":{"type":"string"}}};const schema51 = {"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"}}};function validate44(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate44.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs0 = errors;let valid0 = false;let passing0 = null;const _errs1 = errors;if(typeof data !== "string"){const err0 = {instancePath,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs1 === errors;if(_valid0){valid0 = true;passing0 = 0;}const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.text === undefined){const err1 = {instancePath,schemaPath:"#/$defs/partial-slot-text/required",keyword:"required",params:{missingProperty: "text"},message:"must have required property '"+"text"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!(key0 === "text")){const err2 = {instancePath,schemaPath:"#/$defs/partial-slot-text/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.text !== undefined){if(typeof data.text !== "string"){const err3 = {instancePath:instancePath+"/text",schemaPath:"#/$defs/partial-slot-text/properties/text/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}}else {const err4 = {instancePath,schemaPath:"#/$defs/partial-slot-text/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid0 = _errs3 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 1];}else {if(_valid0){valid0 = true;passing0 = 1;var props0 = true;}const _errs9 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.markdown === undefined){const err5 = {instancePath,schemaPath:"#/$defs/partial-slot-markdown/required",keyword:"required",params:{missingProperty: "markdown"},message:"must have required property '"+"markdown"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key1 in data){if(!(key1 === "markdown")){const err6 = {instancePath,schemaPath:"#/$defs/partial-slot-markdown/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.markdown !== undefined){if(typeof data.markdown !== "string"){const err7 = {instancePath:instancePath+"/markdown",schemaPath:"#/$defs/partial-slot-markdown/properties/markdown/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}else {const err8 = {instancePath,schemaPath:"#/$defs/partial-slot-markdown/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var _valid0 = _errs9 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 2];}else {if(_valid0){valid0 = true;passing0 = 2;if(props0 !== true){props0 = true;}}const _errs15 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.name === undefined){const err9 = {instancePath,schemaPath:"#/$defs/partial-slot-name/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key2 in data){if(!(key2 === "name")){const err10 = {instancePath,schemaPath:"#/$defs/partial-slot-name/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.name !== undefined){if(typeof data.name !== "string"){const err11 = {instancePath:instancePath+"/name",schemaPath:"#/$defs/partial-slot-name/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}}else {const err12 = {instancePath,schemaPath:"#/$defs/partial-slot-name/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var _valid0 = _errs15 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 3];}else {if(_valid0){valid0 = true;passing0 = 3;if(props0 !== true){props0 = true;}}}}}if(!valid0){const err13 = {instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate44.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate44.evaluated = {"dynamicProps":true,"dynamicItems":false};const pattern2 = new RegExp(".*", "u");function validate25(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate25.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.comp !== undefined){let data0 = data.comp;if(typeof data0 !== "string"){const err0 = {instancePath:instancePath+"/comp",schemaPath:"#/$defs/comp-name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(!((((((((((((((((((((((data0 === "none") || (data0 === "text-field")) || (data0 === "number-field")) || (data0 === "textarea")) || (data0 === "markdown")) || (data0 === "checkbox")) || (data0 === "switch")) || (data0 === "slider")) || (data0 === "date-picker")) || (data0 === "date-time-picker")) || (data0 === "time-picker")) || (data0 === "color-picker")) || (data0 === "combobox")) || (data0 === "number-combobox")) || (data0 === "section")) || (data0 === "list")) || (data0 === "select")) || (data0 === "autocomplete")) || (data0 === "tabs")) || (data0 === "vertical-tabs")) || (data0 === "expansion-panels")) || (data0 === "one-of-select"))){const err1 = {instancePath:instancePath+"/comp",schemaPath:"#/$defs/comp-name/enum",keyword:"enum",params:{allowedValues: schema27.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(errors > 0){const emErrors0 = {"enum":[]};const templates0 = {};for(const err2 of vErrors){if((((((err2.keyword !== "errorMessage") && (!err2.emUsed)) && (err2.instancePath === instancePath+"/comp")) && (err2.keyword in emErrors0)) && (err2.schemaPath.indexOf("#/$defs/comp-name") === 0)) && (/^\/[^\/]*$/.test(err2.schemaPath.slice(17)))){emErrors0[err2.keyword].push(err2);err2.emUsed = true;}}for(const key0 in emErrors0){if(emErrors0[key0].length){const err3 = {instancePath:instancePath+"/comp",schemaPath:"#/$defs/comp-name/errorMessage",keyword:"errorMessage",params:{errors: emErrors0[key0]},message:key0 in templates0 ? templates0[key0]() : schema27.errorMessage[key0]};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}const emErrs0 = [];for(const err4 of vErrors){if(!err4.emUsed){emErrs0.push(err4);}}vErrors = emErrs0;errors = emErrs0.length;}}if(data.help !== undefined){if(typeof data.help !== "string"){const err5 = {instancePath:instancePath+"/help",schemaPath:"#/properties/help/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.children !== undefined){if(!(wrapper0.validate(data.children, {instancePath:instancePath+"/children",parentData:data,parentDataProperty:"children",rootData,dynamicAnchors}))){vErrors = vErrors === null ? wrapper0.validate.errors : vErrors.concat(wrapper0.validate.errors);errors = vErrors.length;}}if(data.label !== undefined){if(typeof data.label !== "string"){const err6 = {instancePath:instancePath+"/label",schemaPath:"#/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.title !== undefined){let data4 = data.title;if((typeof data4 !== "string") && (data4 !== null)){const err7 = {instancePath:instancePath+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type: schema30.properties.title.type},message:"must be string,null"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.subtitle !== undefined){let data5 = data.subtitle;if((typeof data5 !== "string") && (data5 !== null)){const err8 = {instancePath:instancePath+"/subtitle",schemaPath:"#/properties/subtitle/type",keyword:"type",params:{type: schema30.properties.subtitle.type},message:"must be string,null"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.step !== undefined){let data6 = data.step;if(!((typeof data6 == "number") && (isFinite(data6)))){const err9 = {instancePath:instancePath+"/step",schemaPath:"#/properties/step/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.if !== undefined){if(!(validate26(data.if, {instancePath:instancePath+"/if",parentData:data,parentDataProperty:"if",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}if(data.items !== undefined){let data8 = data.items;if(Array.isArray(data8)){const len0 = data8.length;for(let i0=0; i0<len0; i0++){let data9 = data8[i0];const _errs20 = errors;let valid5 = false;let passing0 = null;const _errs21 = errors;if(typeof data9 !== "string"){const err10 = {instancePath:instancePath+"/items/" + i0,schemaPath:"#/$defs/partial-select-item/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var _valid0 = _errs21 === errors;if(_valid0){valid5 = true;passing0 = 0;}const _errs23 = errors;if(data9 && typeof data9 == "object" && !Array.isArray(data9)){if(data9.key !== undefined){if(typeof data9.key !== "string"){const err11 = {instancePath:instancePath+"/items/" + i0+"/key",schemaPath:"#/$defs/partial-select-item/oneOf/1/properties/key/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data9.title !== undefined){if(typeof data9.title !== "string"){const err12 = {instancePath:instancePath+"/items/" + i0+"/title",schemaPath:"#/$defs/partial-select-item/oneOf/1/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/items/" + i0,schemaPath:"#/$defs/partial-select-item/oneOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid0 = _errs23 === errors;if(_valid0 && valid5){valid5 = false;passing0 = [passing0, 1];}else {if(_valid0){valid5 = true;passing0 = 1;var props2 = {};props2.key = true;props2.title = true;props2.value = true;}}if(!valid5){const err14 = {instancePath:instancePath+"/items/" + i0,schemaPath:"#/$defs/partial-select-item/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}else {errors = _errs20;if(vErrors !== null){if(_errs20){vErrors.length = _errs20;}else {vErrors = null;}}}}}else {const err15 = {instancePath:instancePath+"/items",schemaPath:"#/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.getItems !== undefined){if(!(validate28(data.getItems, {instancePath:instancePath+"/getItems",parentData:data,parentDataProperty:"getItems",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors);errors = vErrors.length;}}if(data.listEditMode !== undefined){let data13 = data.listEditMode;if(typeof data13 !== "string"){const err16 = {instancePath:instancePath+"/listEditMode",schemaPath:"#/properties/listEditMode/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}if(!((((data13 === "inline") || (data13 === "inline-single")) || (data13 === "menu")) || (data13 === "dialog"))){const err17 = {instancePath:instancePath+"/listEditMode",schemaPath:"#/properties/listEditMode/enum",keyword:"enum",params:{allowedValues: schema30.properties.listEditMode.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.listActions !== undefined){let data14 = data.listActions;if(Array.isArray(data14)){const len1 = data14.length;for(let i1=0; i1<len1; i1++){let data15 = data14[i1];if(typeof data15 !== "string"){const err18 = {instancePath:instancePath+"/listActions/" + i1,schemaPath:"#/properties/listActions/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(!(((((data15 === "add") || (data15 === "edit")) || (data15 === "delete")) || (data15 === "sort")) || (data15 === "duplicate"))){const err19 = {instancePath:instancePath+"/listActions/" + i1,schemaPath:"#/properties/listActions/items/enum",keyword:"enum",params:{allowedValues: schema30.properties.listActions.items.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}else {const err20 = {instancePath:instancePath+"/listActions",schemaPath:"#/properties/listActions/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data.cols !== undefined){if(!(validate40(data.cols, {instancePath:instancePath+"/cols",parentData:data,parentDataProperty:"cols",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate40.errors : vErrors.concat(validate40.errors);errors = vErrors.length;}}if(data.props !== undefined){let data17 = data.props;if(!(data17 && typeof data17 == "object" && !Array.isArray(data17))){const err21 = {instancePath:instancePath+"/props",schemaPath:"#/properties/props/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data.slots !== undefined){let data18 = data.slots;if(data18 && typeof data18 == "object" && !Array.isArray(data18)){var props5 = {};for(const key1 in data18){if(pattern2.test(key1)){if(!(validate44(data18[key1], {instancePath:instancePath+"/slots/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),parentData:data18,parentDataProperty:key1,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate44.errors : vErrors.concat(validate44.errors);errors = vErrors.length;}props5[key1] = true;}}}else {const err22 = {instancePath:instancePath+"/slots",schemaPath:"#/properties/slots/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}if(data.options !== undefined){let data20 = data.options;if(!(data20 && typeof data20 == "object" && !Array.isArray(data20))){const err23 = {instancePath:instancePath+"/options",schemaPath:"#/properties/options/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data.messages !== undefined){let data21 = data.messages;if(!(data21 && typeof data21 == "object" && !Array.isArray(data21))){const err24 = {instancePath:instancePath+"/messages",schemaPath:"#/properties/messages/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}}else {const err25 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}validate25.errors = vErrors;return errors === 0;}validate25.evaluated = {"props":{"comp":true,"help":true,"children":true,"label":true,"title":true,"subtitle":true,"step":true,"if":true,"items":true,"getItems":true,"listEditMode":true,"listActions":true,"cols":true,"props":true,"slots":true,"options":true,"messages":true},"dynamicProps":false,"dynamicItems":false};function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate24.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(!(validate25(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.key !== undefined){let data0 = data.key;if((typeof data0 !== "string") && (!(((typeof data0 == "number") && (!(data0 % 1) && !isNaN(data0))) && (isFinite(data0))))){const err0 = {instancePath:instancePath+"/key",schemaPath:"#/properties/key/type",keyword:"type",params:{type: schema29.properties.key.type},message:"must be string,integer"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}if(data.cols !== undefined){if(!(validate40(data.cols, {instancePath:instancePath+"/cols",parentData:data,parentDataProperty:"cols",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate40.errors : vErrors.concat(validate40.errors);errors = vErrors.length;}}for(const key0 in data){if((((((((((((((((((key0 !== "key") && (key0 !== "cols")) && (key0 !== "comp")) && (key0 !== "help")) && (key0 !== "children")) && (key0 !== "label")) && (key0 !== "title")) && (key0 !== "subtitle")) && (key0 !== "step")) && (key0 !== "if")) && (key0 !== "items")) && (key0 !== "getItems")) && (key0 !== "listEditMode")) && (key0 !== "listActions")) && (key0 !== "props")) && (key0 !== "slots")) && (key0 !== "options")) && (key0 !== "messages")){const err1 = {instancePath,schemaPath:"#/unevaluatedProperties",keyword:"unevaluatedProperties",params:{unevaluatedProperty: key0},message:"must NOT have unevaluated properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}else {const err2 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}validate24.errors = vErrors;return errors === 0;}validate24.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};function validate23(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate23.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];const _errs2 = errors;let valid2 = false;let passing0 = null;const _errs3 = errors;if(typeof data0 !== "string"){const err0 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs3 === errors;if(_valid0){valid2 = true;passing0 = 0;}const _errs5 = errors;if(!(validate24(data0, {instancePath:instancePath+"/" + i0,parentData:data,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate24.errors : vErrors.concat(validate24.errors);errors = vErrors.length;}var _valid0 = _errs5 === errors;if(_valid0 && valid2){valid2 = false;passing0 = [passing0, 1];}else {if(_valid0){valid2 = true;passing0 = 1;}}if(!valid2){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}else {errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}}}}else {const err2 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}validate23.errors = vErrors;return errors === 0;}validate23.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};const schema52 = {"type":"object","required":["switch"],"additionalProperties":false,"properties":{"switch":{"type":"array","items":{"$ref":"#/$defs/partial-comp-object"}}}};function validate51(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate51.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.switch === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "switch"},message:"must have required property '"+"switch"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!(key0 === "switch")){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.switch !== undefined){let data0 = data.switch;if(Array.isArray(data0)){const len0 = data0.length;for(let i0=0; i0<len0; i0++){if(!(validate25(data0[i0], {instancePath:instancePath+"/switch/" + i0,parentData:data0,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}}}else {const err2 = {instancePath:instancePath+"/switch",schemaPath:"#/properties/switch/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}}else {const err3 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}validate51.errors = vErrors;return errors === 0;}validate51.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://json-layout.github.io/layout-keyword" */;let vErrors = null;let errors = 0;const evaluated0 = validate22.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(typeof data !== "string"){const err0 = {instancePath,schemaPath:"#/$defs/comp-name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(!((((((((((((((((((((((data === "none") || (data === "text-field")) || (data === "number-field")) || (data === "textarea")) || (data === "markdown")) || (data === "checkbox")) || (data === "switch")) || (data === "slider")) || (data === "date-picker")) || (data === "date-time-picker")) || (data === "time-picker")) || (data === "color-picker")) || (data === "combobox")) || (data === "number-combobox")) || (data === "section")) || (data === "list")) || (data === "select")) || (data === "autocomplete")) || (data === "tabs")) || (data === "vertical-tabs")) || (data === "expansion-panels")) || (data === "one-of-select"))){const err1 = {instancePath,schemaPath:"#/$defs/comp-name/enum",keyword:"enum",params:{allowedValues: schema27.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(errors > 0){const emErrors0 = {"enum":[]};const templates0 = {};for(const err2 of vErrors){if((((((err2.keyword !== "errorMessage") && (!err2.emUsed)) && (err2.instancePath === instancePath)) && (err2.keyword in emErrors0)) && (err2.schemaPath.indexOf("#/$defs/comp-name") === 0)) && (/^\/[^\/]*$/.test(err2.schemaPath.slice(17)))){emErrors0[err2.keyword].push(err2);err2.emUsed = true;}}for(const key0 in emErrors0){if(emErrors0[key0].length){const err3 = {instancePath,schemaPath:"#/$defs/comp-name/errorMessage",keyword:"errorMessage",params:{errors: emErrors0[key0]},message:key0 in templates0 ? templates0[key0]() : schema27.errorMessage[key0]};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}const emErrs0 = [];for(const err4 of vErrors){if(!err4.emUsed){emErrs0.push(err4);}}vErrors = emErrs0;errors = emErrs0.length;}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;const _errs4 = errors;if(!(validate23(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);errors = vErrors.length;}var _valid0 = _errs4 === errors;valid0 = valid0 || _valid0;if(_valid0){var items0 = true;}const _errs5 = errors;if(!(validate25(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}var _valid0 = _errs5 === errors;valid0 = valid0 || _valid0;if(_valid0){var props0 = {};props0.comp = true;props0.help = true;props0.children = true;props0.label = true;props0.title = true;props0.subtitle = true;props0.step = true;props0.if = true;props0.items = true;props0.getItems = true;props0.listEditMode = true;props0.listActions = true;props0.cols = true;props0.props = true;props0.slots = true;props0.options = true;props0.messages = true;}const _errs6 = errors;if(!(validate51(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate51.errors : vErrors.concat(validate51.errors);errors = vErrors.length;}var _valid0 = _errs6 === errors;valid0 = valid0 || _valid0;if(_valid0){if(props0 !== true){props0 = true;}}if(!valid0){const err5 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}if(errors > 0){const emErrors1 = {"anyOf":[]};const templates1 = {};for(const err6 of vErrors){if((((((err6.keyword !== "errorMessage") && (!err6.emUsed)) && (err6.instancePath === instancePath)) && (err6.keyword in emErrors1)) && (err6.schemaPath.indexOf("#") === 0)) && (/^\/[^\/]*$/.test(err6.schemaPath.slice(1)))){emErrors1[err6.keyword].push(err6);err6.emUsed = true;}}for(const key1 in emErrors1){if(emErrors1[key1].length){const err7 = {instancePath,schemaPath:"#/errorMessage",keyword:"errorMessage",params:{errors: emErrors1[key1]},message:key1 in templates1 ? templates1[key1]() : schema26.errorMessage[key1]};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}const emErrs1 = [];for(const err8 of vErrors){if(!err8.emUsed){emErrs1.push(err8);}}vErrors = emErrs1;errors = emErrs1.length;}validate22.errors = vErrors;evaluated0.props = props0;evaluated0.items = items0;return errors === 0;}validate22.evaluated = {"dynamicProps":true,"dynamicItems":true};
2
+ export const validate = validate22;export default validate22;const schema26 = {"$id":"https://json-layout.github.io/layout-keyword","title":"layout keyword","errorMessage":{"anyOf":"layout keyword must be a string with a valid component name, or a more complete object definition, or an array of children, or a switch structure"},"anyOf":[{"$ref":"#/$defs/comp-name"},{"$ref":"#/$defs/partial-children"},{"$ref":"#/$defs/partial-comp-object"},{"$ref":"#/$defs/partial-switch"}],"$defs":{"partial-switch":{"type":"object","required":["switch"],"additionalProperties":false,"properties":{"switch":{"type":"array","items":{"$ref":"#/$defs/partial-comp-object"}}}},"partial-comp-object":{"title":"partial comp object","type":"object","properties":{"comp":{"$ref":"#/$defs/comp-name"},"help":{"type":"string"},"children":{"$ref":"#/$defs/partial-children"},"label":{"type":"string"},"title":{"type":["string","null"]},"subtitle":{"type":["string","null"]},"step":{"type":"number"},"if":{"$ref":"#/$defs/partial-expression"},"items":{"type":"array","items":{"$ref":"#/$defs/partial-select-item"}},"getItems":{"$ref":"#/$defs/partial-get-items"},"listEditMode":{"type":"string","enum":["inline","inline-single","menu","dialog"]},"listActions":{"type":"array","items":{"type":"string","enum":["add","edit","delete","sort","duplicate"]}},"cols":{"$ref":"#/$defs/partial-cols"},"props":{"type":"object"},"slots":{"type":"object","patternProperties":{".*":{"$ref":"#/$defs/partial-slot"}}},"options":{"type":"object"},"messages":{"type":"object"},"defaultData":{"$ref":"#/$defs/partial-expression"},"constData":{"$ref":"#/$defs/partial-expression"},"autofocus":{"type":"boolean"}}},"comp-name":{"title":"component name","type":"string","errorMessage":{"enum":"component name is unknown"},"enum":["none","text-field","number-field","textarea","markdown","checkbox","switch","slider","date-picker","date-time-picker","time-picker","color-picker","combobox","number-combobox","section","list","select","autocomplete","tabs","vertical-tabs","expansion-panels","stepper","one-of-select"]},"partial-child":{"type":"object","unevaluatedProperties":false,"properties":{"key":{"type":["string","integer"]},"cols":{"$ref":"#/$defs/partial-cols"}},"allOf":[{"$ref":"#/$defs/partial-comp-object"},{}]},"partial-children":{"type":"array","items":{"oneOf":[{"type":"string"},{"$ref":"#/$defs/partial-child"}]}},"partial-expression":{"oneOf":[{"type":"string"},{"$ref":"#/$defs/partial-expression-obj"}]},"partial-expression-obj":{"type":"object","required":["expr"],"properties":{"type":{"type":"string","enum":["js-fn","js-eval","js-tpl"]},"expr":{"type":"string"}}},"partial-select-item":{"oneOf":[{"type":"string"},{"type":"object","properties":{"key":{"type":"string"},"title":{"type":"string"},"value":{}}}]},"partial-get-items":{"oneOf":[{"type":"string"},{"$ref":"#/$defs/partial-get-items-obj"}]},"partial-get-items-obj":{"type":"object","allOf":[{"properties":{"itemTitle":{"$ref":"#/$defs/partial-expression"},"itemKey":{"$ref":"#/$defs/partial-expression"},"itemValue":{"$ref":"#/$defs/partial-expression"},"itemIcon":{"$ref":"#/$defs/partial-expression"},"itemsResults":{"$ref":"#/$defs/partial-expression"}}},{"anyOf":[{"type":"object"},{"$ref":"#/$defs/partial-expression-obj"},{"$ref":"#/$defs/partial-get-items-fetch"}]}]},"partial-get-items-fetch":{"type":"object","required":["url"],"properties":{"url":{"$ref":"#/$defs/partial-expression"}}},"partial-cols":{"oneOf":[{"$ref":"#/$defs/partial-cols-number"},{"$ref":"#/$defs/partial-cols-obj"}]},"partial-cols-obj":{"type":"object","additionalProperties":false,"properties":{"xs":{"$ref":"#/$defs/partial-cols-number"},"sm":{"$ref":"#/$defs/partial-cols-number"},"md":{"$ref":"#/$defs/partial-cols-number"},"lg":{"$ref":"#/$defs/partial-cols-number"},"xl":{"$ref":"#/$defs/partial-cols-number"},"xxl":{"$ref":"#/$defs/partial-cols-number"}}},"partial-cols-number":{"type":"integer","minimum":0,"maximum":12},"partial-slot":{"oneOf":[{"type":"string"},{"$ref":"#/$defs/partial-slot-text"},{"$ref":"#/$defs/partial-slot-markdown"},{"$ref":"#/$defs/partial-slot-name"}]},"partial-slot-text":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string"}}},"partial-slot-markdown":{"type":"object","additionalProperties":false,"required":["markdown"],"properties":{"markdown":{"type":"string"}}},"partial-slot-name":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"}}}}};const schema27 = {"title":"component name","type":"string","errorMessage":{"enum":"component name is unknown"},"enum":["none","text-field","number-field","textarea","markdown","checkbox","switch","slider","date-picker","date-time-picker","time-picker","color-picker","combobox","number-combobox","section","list","select","autocomplete","tabs","vertical-tabs","expansion-panels","stepper","one-of-select"]};const schema28 = {"type":"array","items":{"oneOf":[{"type":"string"},{"$ref":"#/$defs/partial-child"}]}};const schema29 = {"type":"object","unevaluatedProperties":false,"properties":{"key":{"type":["string","integer"]},"cols":{"$ref":"#/$defs/partial-cols"}},"allOf":[{"$ref":"#/$defs/partial-comp-object"},{}]};const schema30 = {"title":"partial comp object","type":"object","properties":{"comp":{"$ref":"#/$defs/comp-name"},"help":{"type":"string"},"children":{"$ref":"#/$defs/partial-children"},"label":{"type":"string"},"title":{"type":["string","null"]},"subtitle":{"type":["string","null"]},"step":{"type":"number"},"if":{"$ref":"#/$defs/partial-expression"},"items":{"type":"array","items":{"$ref":"#/$defs/partial-select-item"}},"getItems":{"$ref":"#/$defs/partial-get-items"},"listEditMode":{"type":"string","enum":["inline","inline-single","menu","dialog"]},"listActions":{"type":"array","items":{"type":"string","enum":["add","edit","delete","sort","duplicate"]}},"cols":{"$ref":"#/$defs/partial-cols"},"props":{"type":"object"},"slots":{"type":"object","patternProperties":{".*":{"$ref":"#/$defs/partial-slot"}}},"options":{"type":"object"},"messages":{"type":"object"},"defaultData":{"$ref":"#/$defs/partial-expression"},"constData":{"$ref":"#/$defs/partial-expression"},"autofocus":{"type":"boolean"}}};const schema34 = {"oneOf":[{"type":"string"},{"type":"object","properties":{"key":{"type":"string"},"title":{"type":"string"},"value":{}}}]};const wrapper0 = {validate: validate23};const schema32 = {"oneOf":[{"type":"string"},{"$ref":"#/$defs/partial-expression-obj"}]};const schema33 = {"type":"object","required":["expr"],"properties":{"type":{"type":"string","enum":["js-fn","js-eval","js-tpl"]},"expr":{"type":"string"}}};function validate26(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate26.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs0 = errors;let valid0 = false;let passing0 = null;const _errs1 = errors;if(typeof data !== "string"){const err0 = {instancePath,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs1 === errors;if(_valid0){valid0 = true;passing0 = 0;}const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.expr === undefined){const err1 = {instancePath,schemaPath:"#/$defs/partial-expression-obj/required",keyword:"required",params:{missingProperty: "expr"},message:"must have required property '"+"expr"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.type !== undefined){let data0 = data.type;if(typeof data0 !== "string"){const err2 = {instancePath:instancePath+"/type",schemaPath:"#/$defs/partial-expression-obj/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(!(((data0 === "js-fn") || (data0 === "js-eval")) || (data0 === "js-tpl"))){const err3 = {instancePath:instancePath+"/type",schemaPath:"#/$defs/partial-expression-obj/properties/type/enum",keyword:"enum",params:{allowedValues: schema33.properties.type.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.expr !== undefined){if(typeof data.expr !== "string"){const err4 = {instancePath:instancePath+"/expr",schemaPath:"#/$defs/partial-expression-obj/properties/expr/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}else {const err5 = {instancePath,schemaPath:"#/$defs/partial-expression-obj/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid0 = _errs3 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 1];}else {if(_valid0){valid0 = true;passing0 = 1;var props0 = {};props0.type = true;props0.expr = true;}}if(!valid0){const err6 = {instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate26.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate26.evaluated = {"dynamicProps":true,"dynamicItems":false};const schema35 = {"oneOf":[{"type":"string"},{"$ref":"#/$defs/partial-get-items-obj"}]};const schema36 = {"type":"object","allOf":[{"properties":{"itemTitle":{"$ref":"#/$defs/partial-expression"},"itemKey":{"$ref":"#/$defs/partial-expression"},"itemValue":{"$ref":"#/$defs/partial-expression"},"itemIcon":{"$ref":"#/$defs/partial-expression"},"itemsResults":{"$ref":"#/$defs/partial-expression"}}},{"anyOf":[{"type":"object"},{"$ref":"#/$defs/partial-expression-obj"},{"$ref":"#/$defs/partial-get-items-fetch"}]}]};const schema38 = {"type":"object","required":["url"],"properties":{"url":{"$ref":"#/$defs/partial-expression"}}};function validate35(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate35.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.url === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "url"},message:"must have required property '"+"url"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.url !== undefined){if(!(validate26(data.url, {instancePath:instancePath+"/url",parentData:data,parentDataProperty:"url",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}}else {const err1 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}validate35.errors = vErrors;return errors === 0;}validate35.evaluated = {"props":{"url":true},"dynamicProps":false,"dynamicItems":false};function validate29(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate29.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(!(data && typeof data == "object" && !Array.isArray(data))){const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.itemTitle !== undefined){if(!(validate26(data.itemTitle, {instancePath:instancePath+"/itemTitle",parentData:data,parentDataProperty:"itemTitle",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}if(data.itemKey !== undefined){if(!(validate26(data.itemKey, {instancePath:instancePath+"/itemKey",parentData:data,parentDataProperty:"itemKey",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}if(data.itemValue !== undefined){if(!(validate26(data.itemValue, {instancePath:instancePath+"/itemValue",parentData:data,parentDataProperty:"itemValue",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}if(data.itemIcon !== undefined){if(!(validate26(data.itemIcon, {instancePath:instancePath+"/itemIcon",parentData:data,parentDataProperty:"itemIcon",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}if(data.itemsResults !== undefined){if(!(validate26(data.itemsResults, {instancePath:instancePath+"/itemsResults",parentData:data,parentDataProperty:"itemsResults",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}}const _errs8 = errors;let valid2 = false;const _errs9 = errors;if(!(data && typeof data == "object" && !Array.isArray(data))){const err1 = {instancePath,schemaPath:"#/allOf/1/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs9 === errors;valid2 = valid2 || _valid0;const _errs11 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.expr === undefined){const err2 = {instancePath,schemaPath:"#/$defs/partial-expression-obj/required",keyword:"required",params:{missingProperty: "expr"},message:"must have required property '"+"expr"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.type !== undefined){let data5 = data.type;if(typeof data5 !== "string"){const err3 = {instancePath:instancePath+"/type",schemaPath:"#/$defs/partial-expression-obj/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(!(((data5 === "js-fn") || (data5 === "js-eval")) || (data5 === "js-tpl"))){const err4 = {instancePath:instancePath+"/type",schemaPath:"#/$defs/partial-expression-obj/properties/type/enum",keyword:"enum",params:{allowedValues: schema33.properties.type.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.expr !== undefined){if(typeof data.expr !== "string"){const err5 = {instancePath:instancePath+"/expr",schemaPath:"#/$defs/partial-expression-obj/properties/expr/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}else {const err6 = {instancePath,schemaPath:"#/$defs/partial-expression-obj/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid0 = _errs11 === errors;valid2 = valid2 || _valid0;if(_valid0){var props5 = {};props5.type = true;props5.expr = true;}const _errs18 = errors;if(!(validate35(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate35.errors : vErrors.concat(validate35.errors);errors = vErrors.length;}var _valid0 = _errs18 === errors;valid2 = valid2 || _valid0;if(_valid0){if(props5 !== true){props5 = props5 || {};props5.url = true;}}if(!valid2){const err7 = {instancePath,schemaPath:"#/allOf/1/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}else {errors = _errs8;if(vErrors !== null){if(_errs8){vErrors.length = _errs8;}else {vErrors = null;}}}if(props5 !== true){props5 = props5 || {};props5.itemTitle = true;props5.itemKey = true;props5.itemValue = true;props5.itemIcon = true;props5.itemsResults = true;}validate29.errors = vErrors;evaluated0.props = props5;return errors === 0;}validate29.evaluated = {"dynamicProps":true,"dynamicItems":false};function validate28(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate28.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs0 = errors;let valid0 = false;let passing0 = null;const _errs1 = errors;if(typeof data !== "string"){const err0 = {instancePath,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs1 === errors;if(_valid0){valid0 = true;passing0 = 0;}const _errs3 = errors;if(!(validate29(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate29.errors : vErrors.concat(validate29.errors);errors = vErrors.length;}else {var props0 = validate29.evaluated.props;}var _valid0 = _errs3 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 1];}else {if(_valid0){valid0 = true;passing0 = 1;}}if(!valid0){const err1 = {instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate28.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate28.evaluated = {"dynamicProps":true,"dynamicItems":false};const schema39 = {"oneOf":[{"$ref":"#/$defs/partial-cols-number"},{"$ref":"#/$defs/partial-cols-obj"}]};const schema40 = {"type":"integer","minimum":0,"maximum":12};const schema41 = {"type":"object","additionalProperties":false,"properties":{"xs":{"$ref":"#/$defs/partial-cols-number"},"sm":{"$ref":"#/$defs/partial-cols-number"},"md":{"$ref":"#/$defs/partial-cols-number"},"lg":{"$ref":"#/$defs/partial-cols-number"},"xl":{"$ref":"#/$defs/partial-cols-number"},"xxl":{"$ref":"#/$defs/partial-cols-number"}}};function validate41(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate41.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!((((((key0 === "xs") || (key0 === "sm")) || (key0 === "md")) || (key0 === "lg")) || (key0 === "xl")) || (key0 === "xxl"))){const err0 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}if(data.xs !== undefined){let data0 = data.xs;if(!(((typeof data0 == "number") && (!(data0 % 1) && !isNaN(data0))) && (isFinite(data0)))){const err1 = {instancePath:instancePath+"/xs",schemaPath:"#/$defs/partial-cols-number/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if((typeof data0 == "number") && (isFinite(data0))){if(data0 > 12 || isNaN(data0)){const err2 = {instancePath:instancePath+"/xs",schemaPath:"#/$defs/partial-cols-number/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0 < 0 || isNaN(data0)){const err3 = {instancePath:instancePath+"/xs",schemaPath:"#/$defs/partial-cols-number/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}}if(data.sm !== undefined){let data1 = data.sm;if(!(((typeof data1 == "number") && (!(data1 % 1) && !isNaN(data1))) && (isFinite(data1)))){const err4 = {instancePath:instancePath+"/sm",schemaPath:"#/$defs/partial-cols-number/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if((typeof data1 == "number") && (isFinite(data1))){if(data1 > 12 || isNaN(data1)){const err5 = {instancePath:instancePath+"/sm",schemaPath:"#/$defs/partial-cols-number/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data1 < 0 || isNaN(data1)){const err6 = {instancePath:instancePath+"/sm",schemaPath:"#/$defs/partial-cols-number/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}if(data.md !== undefined){let data2 = data.md;if(!(((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))){const err7 = {instancePath:instancePath+"/md",schemaPath:"#/$defs/partial-cols-number/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if((typeof data2 == "number") && (isFinite(data2))){if(data2 > 12 || isNaN(data2)){const err8 = {instancePath:instancePath+"/md",schemaPath:"#/$defs/partial-cols-number/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data2 < 0 || isNaN(data2)){const err9 = {instancePath:instancePath+"/md",schemaPath:"#/$defs/partial-cols-number/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}if(data.lg !== undefined){let data3 = data.lg;if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){const err10 = {instancePath:instancePath+"/lg",schemaPath:"#/$defs/partial-cols-number/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if((typeof data3 == "number") && (isFinite(data3))){if(data3 > 12 || isNaN(data3)){const err11 = {instancePath:instancePath+"/lg",schemaPath:"#/$defs/partial-cols-number/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data3 < 0 || isNaN(data3)){const err12 = {instancePath:instancePath+"/lg",schemaPath:"#/$defs/partial-cols-number/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}if(data.xl !== undefined){let data4 = data.xl;if(!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){const err13 = {instancePath:instancePath+"/xl",schemaPath:"#/$defs/partial-cols-number/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}if((typeof data4 == "number") && (isFinite(data4))){if(data4 > 12 || isNaN(data4)){const err14 = {instancePath:instancePath+"/xl",schemaPath:"#/$defs/partial-cols-number/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}if(data4 < 0 || isNaN(data4)){const err15 = {instancePath:instancePath+"/xl",schemaPath:"#/$defs/partial-cols-number/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}if(data.xxl !== undefined){let data5 = data.xxl;if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){const err16 = {instancePath:instancePath+"/xxl",schemaPath:"#/$defs/partial-cols-number/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}if((typeof data5 == "number") && (isFinite(data5))){if(data5 > 12 || isNaN(data5)){const err17 = {instancePath:instancePath+"/xxl",schemaPath:"#/$defs/partial-cols-number/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}if(data5 < 0 || isNaN(data5)){const err18 = {instancePath:instancePath+"/xxl",schemaPath:"#/$defs/partial-cols-number/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}}}else {const err19 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}validate41.errors = vErrors;return errors === 0;}validate41.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};function validate40(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate40.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs0 = errors;let valid0 = false;let passing0 = null;const _errs1 = errors;if(!(((typeof data == "number") && (!(data % 1) && !isNaN(data))) && (isFinite(data)))){const err0 = {instancePath,schemaPath:"#/$defs/partial-cols-number/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if((typeof data == "number") && (isFinite(data))){if(data > 12 || isNaN(data)){const err1 = {instancePath,schemaPath:"#/$defs/partial-cols-number/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data < 0 || isNaN(data)){const err2 = {instancePath,schemaPath:"#/$defs/partial-cols-number/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var _valid0 = _errs1 === errors;if(_valid0){valid0 = true;passing0 = 0;}const _errs4 = errors;if(!(validate41(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate41.errors : vErrors.concat(validate41.errors);errors = vErrors.length;}var _valid0 = _errs4 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 1];}else {if(_valid0){valid0 = true;passing0 = 1;var props0 = true;}}if(!valid0){const err3 = {instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate40.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate40.evaluated = {"dynamicProps":true,"dynamicItems":false};const schema48 = {"oneOf":[{"type":"string"},{"$ref":"#/$defs/partial-slot-text"},{"$ref":"#/$defs/partial-slot-markdown"},{"$ref":"#/$defs/partial-slot-name"}]};const schema49 = {"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string"}}};const schema50 = {"type":"object","additionalProperties":false,"required":["markdown"],"properties":{"markdown":{"type":"string"}}};const schema51 = {"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"}}};function validate44(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate44.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs0 = errors;let valid0 = false;let passing0 = null;const _errs1 = errors;if(typeof data !== "string"){const err0 = {instancePath,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs1 === errors;if(_valid0){valid0 = true;passing0 = 0;}const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.text === undefined){const err1 = {instancePath,schemaPath:"#/$defs/partial-slot-text/required",keyword:"required",params:{missingProperty: "text"},message:"must have required property '"+"text"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!(key0 === "text")){const err2 = {instancePath,schemaPath:"#/$defs/partial-slot-text/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.text !== undefined){if(typeof data.text !== "string"){const err3 = {instancePath:instancePath+"/text",schemaPath:"#/$defs/partial-slot-text/properties/text/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}}else {const err4 = {instancePath,schemaPath:"#/$defs/partial-slot-text/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid0 = _errs3 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 1];}else {if(_valid0){valid0 = true;passing0 = 1;var props0 = true;}const _errs9 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.markdown === undefined){const err5 = {instancePath,schemaPath:"#/$defs/partial-slot-markdown/required",keyword:"required",params:{missingProperty: "markdown"},message:"must have required property '"+"markdown"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key1 in data){if(!(key1 === "markdown")){const err6 = {instancePath,schemaPath:"#/$defs/partial-slot-markdown/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.markdown !== undefined){if(typeof data.markdown !== "string"){const err7 = {instancePath:instancePath+"/markdown",schemaPath:"#/$defs/partial-slot-markdown/properties/markdown/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}else {const err8 = {instancePath,schemaPath:"#/$defs/partial-slot-markdown/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var _valid0 = _errs9 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 2];}else {if(_valid0){valid0 = true;passing0 = 2;if(props0 !== true){props0 = true;}}const _errs15 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.name === undefined){const err9 = {instancePath,schemaPath:"#/$defs/partial-slot-name/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key2 in data){if(!(key2 === "name")){const err10 = {instancePath,schemaPath:"#/$defs/partial-slot-name/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.name !== undefined){if(typeof data.name !== "string"){const err11 = {instancePath:instancePath+"/name",schemaPath:"#/$defs/partial-slot-name/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}}else {const err12 = {instancePath,schemaPath:"#/$defs/partial-slot-name/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var _valid0 = _errs15 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 3];}else {if(_valid0){valid0 = true;passing0 = 3;if(props0 !== true){props0 = true;}}}}}if(!valid0){const err13 = {instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate44.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate44.evaluated = {"dynamicProps":true,"dynamicItems":false};const pattern2 = new RegExp(".*", "u");function validate25(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate25.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.comp !== undefined){let data0 = data.comp;if(typeof data0 !== "string"){const err0 = {instancePath:instancePath+"/comp",schemaPath:"#/$defs/comp-name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(!(((((((((((((((((((((((data0 === "none") || (data0 === "text-field")) || (data0 === "number-field")) || (data0 === "textarea")) || (data0 === "markdown")) || (data0 === "checkbox")) || (data0 === "switch")) || (data0 === "slider")) || (data0 === "date-picker")) || (data0 === "date-time-picker")) || (data0 === "time-picker")) || (data0 === "color-picker")) || (data0 === "combobox")) || (data0 === "number-combobox")) || (data0 === "section")) || (data0 === "list")) || (data0 === "select")) || (data0 === "autocomplete")) || (data0 === "tabs")) || (data0 === "vertical-tabs")) || (data0 === "expansion-panels")) || (data0 === "stepper")) || (data0 === "one-of-select"))){const err1 = {instancePath:instancePath+"/comp",schemaPath:"#/$defs/comp-name/enum",keyword:"enum",params:{allowedValues: schema27.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(errors > 0){const emErrors0 = {"enum":[]};const templates0 = {};for(const err2 of vErrors){if((((((err2.keyword !== "errorMessage") && (!err2.emUsed)) && (err2.instancePath === instancePath+"/comp")) && (err2.keyword in emErrors0)) && (err2.schemaPath.indexOf("#/$defs/comp-name") === 0)) && (/^\/[^\/]*$/.test(err2.schemaPath.slice(17)))){emErrors0[err2.keyword].push(err2);err2.emUsed = true;}}for(const key0 in emErrors0){if(emErrors0[key0].length){const err3 = {instancePath:instancePath+"/comp",schemaPath:"#/$defs/comp-name/errorMessage",keyword:"errorMessage",params:{errors: emErrors0[key0]},message:key0 in templates0 ? templates0[key0]() : schema27.errorMessage[key0]};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}const emErrs0 = [];for(const err4 of vErrors){if(!err4.emUsed){emErrs0.push(err4);}}vErrors = emErrs0;errors = emErrs0.length;}}if(data.help !== undefined){if(typeof data.help !== "string"){const err5 = {instancePath:instancePath+"/help",schemaPath:"#/properties/help/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.children !== undefined){if(!(wrapper0.validate(data.children, {instancePath:instancePath+"/children",parentData:data,parentDataProperty:"children",rootData,dynamicAnchors}))){vErrors = vErrors === null ? wrapper0.validate.errors : vErrors.concat(wrapper0.validate.errors);errors = vErrors.length;}}if(data.label !== undefined){if(typeof data.label !== "string"){const err6 = {instancePath:instancePath+"/label",schemaPath:"#/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.title !== undefined){let data4 = data.title;if((typeof data4 !== "string") && (data4 !== null)){const err7 = {instancePath:instancePath+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type: schema30.properties.title.type},message:"must be string,null"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.subtitle !== undefined){let data5 = data.subtitle;if((typeof data5 !== "string") && (data5 !== null)){const err8 = {instancePath:instancePath+"/subtitle",schemaPath:"#/properties/subtitle/type",keyword:"type",params:{type: schema30.properties.subtitle.type},message:"must be string,null"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.step !== undefined){let data6 = data.step;if(!((typeof data6 == "number") && (isFinite(data6)))){const err9 = {instancePath:instancePath+"/step",schemaPath:"#/properties/step/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.if !== undefined){if(!(validate26(data.if, {instancePath:instancePath+"/if",parentData:data,parentDataProperty:"if",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}if(data.items !== undefined){let data8 = data.items;if(Array.isArray(data8)){const len0 = data8.length;for(let i0=0; i0<len0; i0++){let data9 = data8[i0];const _errs20 = errors;let valid5 = false;let passing0 = null;const _errs21 = errors;if(typeof data9 !== "string"){const err10 = {instancePath:instancePath+"/items/" + i0,schemaPath:"#/$defs/partial-select-item/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var _valid0 = _errs21 === errors;if(_valid0){valid5 = true;passing0 = 0;}const _errs23 = errors;if(data9 && typeof data9 == "object" && !Array.isArray(data9)){if(data9.key !== undefined){if(typeof data9.key !== "string"){const err11 = {instancePath:instancePath+"/items/" + i0+"/key",schemaPath:"#/$defs/partial-select-item/oneOf/1/properties/key/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data9.title !== undefined){if(typeof data9.title !== "string"){const err12 = {instancePath:instancePath+"/items/" + i0+"/title",schemaPath:"#/$defs/partial-select-item/oneOf/1/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/items/" + i0,schemaPath:"#/$defs/partial-select-item/oneOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid0 = _errs23 === errors;if(_valid0 && valid5){valid5 = false;passing0 = [passing0, 1];}else {if(_valid0){valid5 = true;passing0 = 1;var props2 = {};props2.key = true;props2.title = true;props2.value = true;}}if(!valid5){const err14 = {instancePath:instancePath+"/items/" + i0,schemaPath:"#/$defs/partial-select-item/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}else {errors = _errs20;if(vErrors !== null){if(_errs20){vErrors.length = _errs20;}else {vErrors = null;}}}}}else {const err15 = {instancePath:instancePath+"/items",schemaPath:"#/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.getItems !== undefined){if(!(validate28(data.getItems, {instancePath:instancePath+"/getItems",parentData:data,parentDataProperty:"getItems",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors);errors = vErrors.length;}}if(data.listEditMode !== undefined){let data13 = data.listEditMode;if(typeof data13 !== "string"){const err16 = {instancePath:instancePath+"/listEditMode",schemaPath:"#/properties/listEditMode/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}if(!((((data13 === "inline") || (data13 === "inline-single")) || (data13 === "menu")) || (data13 === "dialog"))){const err17 = {instancePath:instancePath+"/listEditMode",schemaPath:"#/properties/listEditMode/enum",keyword:"enum",params:{allowedValues: schema30.properties.listEditMode.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.listActions !== undefined){let data14 = data.listActions;if(Array.isArray(data14)){const len1 = data14.length;for(let i1=0; i1<len1; i1++){let data15 = data14[i1];if(typeof data15 !== "string"){const err18 = {instancePath:instancePath+"/listActions/" + i1,schemaPath:"#/properties/listActions/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(!(((((data15 === "add") || (data15 === "edit")) || (data15 === "delete")) || (data15 === "sort")) || (data15 === "duplicate"))){const err19 = {instancePath:instancePath+"/listActions/" + i1,schemaPath:"#/properties/listActions/items/enum",keyword:"enum",params:{allowedValues: schema30.properties.listActions.items.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}else {const err20 = {instancePath:instancePath+"/listActions",schemaPath:"#/properties/listActions/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data.cols !== undefined){if(!(validate40(data.cols, {instancePath:instancePath+"/cols",parentData:data,parentDataProperty:"cols",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate40.errors : vErrors.concat(validate40.errors);errors = vErrors.length;}}if(data.props !== undefined){let data17 = data.props;if(!(data17 && typeof data17 == "object" && !Array.isArray(data17))){const err21 = {instancePath:instancePath+"/props",schemaPath:"#/properties/props/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data.slots !== undefined){let data18 = data.slots;if(data18 && typeof data18 == "object" && !Array.isArray(data18)){var props5 = {};for(const key1 in data18){if(pattern2.test(key1)){if(!(validate44(data18[key1], {instancePath:instancePath+"/slots/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),parentData:data18,parentDataProperty:key1,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate44.errors : vErrors.concat(validate44.errors);errors = vErrors.length;}props5[key1] = true;}}}else {const err22 = {instancePath:instancePath+"/slots",schemaPath:"#/properties/slots/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}if(data.options !== undefined){let data20 = data.options;if(!(data20 && typeof data20 == "object" && !Array.isArray(data20))){const err23 = {instancePath:instancePath+"/options",schemaPath:"#/properties/options/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data.messages !== undefined){let data21 = data.messages;if(!(data21 && typeof data21 == "object" && !Array.isArray(data21))){const err24 = {instancePath:instancePath+"/messages",schemaPath:"#/properties/messages/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data.defaultData !== undefined){if(!(validate26(data.defaultData, {instancePath:instancePath+"/defaultData",parentData:data,parentDataProperty:"defaultData",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}if(data.constData !== undefined){if(!(validate26(data.constData, {instancePath:instancePath+"/constData",parentData:data,parentDataProperty:"constData",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}if(data.autofocus !== undefined){if(typeof data.autofocus !== "boolean"){const err25 = {instancePath:instancePath+"/autofocus",schemaPath:"#/properties/autofocus/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}else {const err26 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}validate25.errors = vErrors;return errors === 0;}validate25.evaluated = {"props":{"comp":true,"help":true,"children":true,"label":true,"title":true,"subtitle":true,"step":true,"if":true,"items":true,"getItems":true,"listEditMode":true,"listActions":true,"cols":true,"props":true,"slots":true,"options":true,"messages":true,"defaultData":true,"constData":true,"autofocus":true},"dynamicProps":false,"dynamicItems":false};function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate24.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(!(validate25(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.key !== undefined){let data0 = data.key;if((typeof data0 !== "string") && (!(((typeof data0 == "number") && (!(data0 % 1) && !isNaN(data0))) && (isFinite(data0))))){const err0 = {instancePath:instancePath+"/key",schemaPath:"#/properties/key/type",keyword:"type",params:{type: schema29.properties.key.type},message:"must be string,integer"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}if(data.cols !== undefined){if(!(validate40(data.cols, {instancePath:instancePath+"/cols",parentData:data,parentDataProperty:"cols",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate40.errors : vErrors.concat(validate40.errors);errors = vErrors.length;}}for(const key0 in data){if(((((((((((((((((((((key0 !== "key") && (key0 !== "cols")) && (key0 !== "comp")) && (key0 !== "help")) && (key0 !== "children")) && (key0 !== "label")) && (key0 !== "title")) && (key0 !== "subtitle")) && (key0 !== "step")) && (key0 !== "if")) && (key0 !== "items")) && (key0 !== "getItems")) && (key0 !== "listEditMode")) && (key0 !== "listActions")) && (key0 !== "props")) && (key0 !== "slots")) && (key0 !== "options")) && (key0 !== "messages")) && (key0 !== "defaultData")) && (key0 !== "constData")) && (key0 !== "autofocus")){const err1 = {instancePath,schemaPath:"#/unevaluatedProperties",keyword:"unevaluatedProperties",params:{unevaluatedProperty: key0},message:"must NOT have unevaluated properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}else {const err2 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}validate24.errors = vErrors;return errors === 0;}validate24.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};function validate23(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate23.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];const _errs2 = errors;let valid2 = false;let passing0 = null;const _errs3 = errors;if(typeof data0 !== "string"){const err0 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs3 === errors;if(_valid0){valid2 = true;passing0 = 0;}const _errs5 = errors;if(!(validate24(data0, {instancePath:instancePath+"/" + i0,parentData:data,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate24.errors : vErrors.concat(validate24.errors);errors = vErrors.length;}var _valid0 = _errs5 === errors;if(_valid0 && valid2){valid2 = false;passing0 = [passing0, 1];}else {if(_valid0){valid2 = true;passing0 = 1;}}if(!valid2){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}else {errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}}}}else {const err2 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}validate23.errors = vErrors;return errors === 0;}validate23.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};const schema52 = {"type":"object","required":["switch"],"additionalProperties":false,"properties":{"switch":{"type":"array","items":{"$ref":"#/$defs/partial-comp-object"}}}};function validate53(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate53.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.switch === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "switch"},message:"must have required property '"+"switch"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!(key0 === "switch")){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.switch !== undefined){let data0 = data.switch;if(Array.isArray(data0)){const len0 = data0.length;for(let i0=0; i0<len0; i0++){if(!(validate25(data0[i0], {instancePath:instancePath+"/switch/" + i0,parentData:data0,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}}}else {const err2 = {instancePath:instancePath+"/switch",schemaPath:"#/properties/switch/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}}else {const err3 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}validate53.errors = vErrors;return errors === 0;}validate53.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://json-layout.github.io/layout-keyword" */;let vErrors = null;let errors = 0;const evaluated0 = validate22.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(typeof data !== "string"){const err0 = {instancePath,schemaPath:"#/$defs/comp-name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(!(((((((((((((((((((((((data === "none") || (data === "text-field")) || (data === "number-field")) || (data === "textarea")) || (data === "markdown")) || (data === "checkbox")) || (data === "switch")) || (data === "slider")) || (data === "date-picker")) || (data === "date-time-picker")) || (data === "time-picker")) || (data === "color-picker")) || (data === "combobox")) || (data === "number-combobox")) || (data === "section")) || (data === "list")) || (data === "select")) || (data === "autocomplete")) || (data === "tabs")) || (data === "vertical-tabs")) || (data === "expansion-panels")) || (data === "stepper")) || (data === "one-of-select"))){const err1 = {instancePath,schemaPath:"#/$defs/comp-name/enum",keyword:"enum",params:{allowedValues: schema27.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(errors > 0){const emErrors0 = {"enum":[]};const templates0 = {};for(const err2 of vErrors){if((((((err2.keyword !== "errorMessage") && (!err2.emUsed)) && (err2.instancePath === instancePath)) && (err2.keyword in emErrors0)) && (err2.schemaPath.indexOf("#/$defs/comp-name") === 0)) && (/^\/[^\/]*$/.test(err2.schemaPath.slice(17)))){emErrors0[err2.keyword].push(err2);err2.emUsed = true;}}for(const key0 in emErrors0){if(emErrors0[key0].length){const err3 = {instancePath,schemaPath:"#/$defs/comp-name/errorMessage",keyword:"errorMessage",params:{errors: emErrors0[key0]},message:key0 in templates0 ? templates0[key0]() : schema27.errorMessage[key0]};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}const emErrs0 = [];for(const err4 of vErrors){if(!err4.emUsed){emErrs0.push(err4);}}vErrors = emErrs0;errors = emErrs0.length;}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;const _errs4 = errors;if(!(validate23(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);errors = vErrors.length;}var _valid0 = _errs4 === errors;valid0 = valid0 || _valid0;if(_valid0){var items0 = true;}const _errs5 = errors;if(!(validate25(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}var _valid0 = _errs5 === errors;valid0 = valid0 || _valid0;if(_valid0){var props0 = {};props0.comp = true;props0.help = true;props0.children = true;props0.label = true;props0.title = true;props0.subtitle = true;props0.step = true;props0.if = true;props0.items = true;props0.getItems = true;props0.listEditMode = true;props0.listActions = true;props0.cols = true;props0.props = true;props0.slots = true;props0.options = true;props0.messages = true;props0.defaultData = true;props0.constData = true;props0.autofocus = true;}const _errs6 = errors;if(!(validate53(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate53.errors : vErrors.concat(validate53.errors);errors = vErrors.length;}var _valid0 = _errs6 === errors;valid0 = valid0 || _valid0;if(_valid0){if(props0 !== true){props0 = true;}}if(!valid0){const err5 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}if(errors > 0){const emErrors1 = {"anyOf":[]};const templates1 = {};for(const err6 of vErrors){if((((((err6.keyword !== "errorMessage") && (!err6.emUsed)) && (err6.instancePath === instancePath)) && (err6.keyword in emErrors1)) && (err6.schemaPath.indexOf("#") === 0)) && (/^\/[^\/]*$/.test(err6.schemaPath.slice(1)))){emErrors1[err6.keyword].push(err6);err6.emUsed = true;}}for(const key1 in emErrors1){if(emErrors1[key1].length){const err7 = {instancePath,schemaPath:"#/errorMessage",keyword:"errorMessage",params:{errors: emErrors1[key1]},message:key1 in templates1 ? templates1[key1]() : schema26.errorMessage[key1]};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}const emErrs1 = [];for(const err8 of vErrors){if(!err8.emUsed){emErrs1.push(err8);}}vErrors = emErrs1;errors = emErrs1.length;}validate22.errors = vErrors;evaluated0.props = props0;evaluated0.items = items0;return errors === 0;}validate22.evaluated = {"dynamicProps":true,"dynamicItems":true};
package/src/normalize.js CHANGED
@@ -18,9 +18,10 @@ import { validateNormalizedLayout, compositeCompNames } from './normalized-layou
18
18
  * @returns {Children}
19
19
  */
20
20
  function getDefaultChildren (schemaFragment) {
21
+ const { type } = getType(schemaFragment)
21
22
  /** @type {Children} */
22
23
  const children = []
23
- if (schemaFragment.type === 'object') {
24
+ if (type === 'object') {
24
25
  if (schemaFragment.properties) {
25
26
  for (const key of Object.keys(schemaFragment.properties)) {
26
27
  children.push({ key })
@@ -35,7 +36,7 @@ function getDefaultChildren (schemaFragment) {
35
36
  children.push({ key: '$oneOf' })
36
37
  }
37
38
  }
38
- if (schemaFragment.type === 'array' && Array.isArray(schemaFragment.items)) {
39
+ if (type === 'array' && Array.isArray(schemaFragment.items)) {
39
40
  for (let i = 0; i < schemaFragment.items.length; i++) {
40
41
  children.push({ key: i })
41
42
  }
@@ -86,13 +87,14 @@ function getChildren (defaultChildren, partialChildren) {
86
87
  * @returns {import('./index.js').ComponentName}
87
88
  */
88
89
  function getDefaultComp (partial, schemaFragment, arrayChild) {
89
- const hasSimpleType = ['string', 'integer', 'number'].includes(schemaFragment.type)
90
+ const { type } = getType(schemaFragment)
91
+ const hasSimpleType = ['string', 'integer', 'number'].includes(type)
90
92
  if (arrayChild === 'oneOf') return 'one-of-select'
91
93
  if (hasSimpleType && schemaFragment.enum) return schemaFragment.enum.length > 20 ? 'autocomplete' : 'select'
92
94
  if (hasSimpleType && schemaFragment.oneOf) return schemaFragment.oneOf.length > 20 ? 'autocomplete' : 'select'
93
- if (hasSimpleType && schemaFragment.examples) return schemaFragment.type === 'string' ? 'combobox' : 'number-combobox'
95
+ if (hasSimpleType && schemaFragment.examples) return type === 'string' ? 'combobox' : 'number-combobox'
94
96
  if (hasSimpleType && schemaFragment.anyOf && schemaFragment.anyOf.length && Object.keys(schemaFragment.anyOf[schemaFragment.anyOf.length - 1]).length === 0) {
95
- return schemaFragment.type === 'string' ? 'combobox' : 'number-combobox'
97
+ return type === 'string' ? 'combobox' : 'number-combobox'
96
98
  }
97
99
  if (partial.items) return partial.items.length > 20 ? 'autocomplete' : 'select'
98
100
  if (partial.getItems) {
@@ -102,7 +104,7 @@ function getDefaultComp (partial, schemaFragment, arrayChild) {
102
104
  }
103
105
  return 'select'
104
106
  }
105
- if (schemaFragment.type === 'array' && schemaFragment.items) {
107
+ if (type === 'array' && schemaFragment.items) {
106
108
  const hasSimpleTypeItems = ['string', 'integer', 'number'].includes(schemaFragment.items.type)
107
109
  if (hasSimpleTypeItems && (schemaFragment.items.enum || schemaFragment.items.oneOf)) {
108
110
  return (schemaFragment.items.enum || schemaFragment.items.oneOf).length > 20 ? 'autocomplete' : 'select'
@@ -117,19 +119,19 @@ function getDefaultComp (partial, schemaFragment, arrayChild) {
117
119
  return schemaFragment.items.type === 'string' ? 'combobox' : 'number-combobox'
118
120
  }
119
121
  }
120
- if (schemaFragment.type === 'object') return 'section'
121
- if (schemaFragment.type === 'array') {
122
+ if (type === 'object') return 'section'
123
+ if (type === 'array') {
122
124
  if (Array.isArray(schemaFragment.items)) return 'section'
123
125
  else return 'list'
124
126
  }
125
- if (schemaFragment.type === 'string') {
127
+ if (type === 'string') {
126
128
  if (schemaFragment.format === 'date') return 'date-picker'
127
129
  if (schemaFragment.format === 'date-time') return 'date-time-picker'
128
130
  if (schemaFragment.format === 'time') return 'time-picker'
129
131
  return 'text-field'
130
132
  }
131
- if (schemaFragment.type === 'integer' || schemaFragment.type === 'number') return 'number-field'
132
- if (schemaFragment.type === 'boolean') return 'checkbox'
133
+ if (type === 'integer' || type === 'number') return 'number-field'
134
+ if (type === 'boolean') return 'checkbox'
133
135
  throw new Error('failed to calculate default component for schema fragment')
134
136
  }
135
137
 
@@ -160,7 +162,8 @@ function normalizeExpression (expression, defaultType = 'js-eval') {
160
162
  */
161
163
  function getItemsFromSchema (schemaFragment) {
162
164
  if (!schemaFragment) return null
163
- const hasSimpleType = ['string', 'integer', 'number'].includes(schemaFragment.type)
165
+ const { type } = getType(schemaFragment)
166
+ const hasSimpleType = ['string', 'integer', 'number'].includes(type)
164
167
  if (schemaFragment.enum && hasSimpleType) {
165
168
  return schemaFragment.enum.map((/** @type {string} */ value) => ({ key: value + '', title: value + '', value }))
166
169
  }
@@ -189,6 +192,18 @@ function getItemsFromSchema (schemaFragment) {
189
192
  return null
190
193
  }
191
194
 
195
+ /**
196
+ * @param {SchemaFragment} schemaFragment
197
+ * @returns {{type: string, nullable: boolean}}
198
+ */
199
+ const getType = (schemaFragment) => {
200
+ if (Array.isArray(schemaFragment.type) && schemaFragment.type.length === 2 && schemaFragment.type.includes('null')) {
201
+ const type = schemaFragment.type.find(t => t !== 'null')
202
+ return { type, nullable: true }
203
+ }
204
+ return { type: schemaFragment.type, nullable: false }
205
+ }
206
+
192
207
  /**
193
208
  * @param {LayoutKeyword} layoutKeyword
194
209
  * @param {SchemaFragment} schemaFragment
@@ -202,9 +217,11 @@ function getCompObject (layoutKeyword, schemaFragment, schemaPath, markdown, arr
202
217
  const errors = []
203
218
  const key = schemaPath.slice(schemaPath.lastIndexOf('/') + 1)
204
219
 
220
+ const { type, nullable } = getType(schemaFragment)
221
+
205
222
  if ('const' in schemaFragment) return { normalized: { comp: 'none' }, errors }
206
- if (!schemaFragment.type) return { normalized: { comp: 'none' }, errors }
207
- if (schemaFragment.type === 'array' && !schemaFragment.items) return { normalized: { comp: 'none' }, errors }
223
+ if (!type) return { normalized: { comp: 'none' }, errors }
224
+ if (type === 'array' && !schemaFragment.items) return { normalized: { comp: 'none' }, errors }
208
225
 
209
226
  const partial = getPartialCompObject(layoutKeyword)
210
227
 
@@ -219,6 +236,8 @@ function getCompObject (layoutKeyword, schemaFragment, schemaPath, markdown, arr
219
236
  }
220
237
  if (partial.comp === 'none') return { normalized: { comp: 'none' }, errors }
221
238
 
239
+ if (nullable) partial.nullable = nullable
240
+
222
241
  // @ts-ignore
223
242
  if (compositeCompNames.includes(partial.comp)) {
224
243
  partial.title = partial.title ?? schemaFragment.title ?? null
@@ -233,7 +252,7 @@ function getCompObject (layoutKeyword, schemaFragment, schemaPath, markdown, arr
233
252
 
234
253
  if (['select', 'autocomplete', 'combobox'].includes(partial.comp) && !partial.items) {
235
254
  let items
236
- if (schemaFragment.type === 'array') {
255
+ if (type === 'array') {
237
256
  items = getItemsFromSchema(schemaFragment.items)
238
257
  partial.multiple = true
239
258
  } else {
@@ -249,7 +268,7 @@ function getCompObject (layoutKeyword, schemaFragment, schemaPath, markdown, arr
249
268
  }
250
269
 
251
270
  if (['combobox', 'number-combobox'].includes(partial.comp)) {
252
- if (schemaFragment.type === 'array') {
271
+ if (type === 'array') {
253
272
  partial.multiple = true
254
273
  }
255
274
  }
@@ -265,15 +284,19 @@ function getCompObject (layoutKeyword, schemaFragment, schemaPath, markdown, arr
265
284
  }
266
285
 
267
286
  if (['number-field', 'slider'].includes(partial.comp)) {
268
- if (schemaFragment.type === 'integer') partial.step = partial.step ?? 1
287
+ if (type === 'integer') partial.step = partial.step ?? 1
269
288
  if ('minimum' in schemaFragment) partial.min = partial.min ?? schemaFragment.minimum
270
289
  if ('maximum' in schemaFragment) partial.max = partial.max ?? schemaFragment.maximum
271
290
  }
272
291
 
273
292
  if (partial.if) partial.if = normalizeExpression(partial.if)
293
+
294
+ if (partial.defaultData) partial.defaultData = normalizeExpression(partial.defaultData)
295
+ if (partial.constData) partial.constData = normalizeExpression(partial.constData)
296
+
274
297
  if (partial.getItems && isPartialGetItemsExpr(partial.getItems)) partial.getItems = normalizeExpression(partial.getItems)
275
298
  if (partial.getItems && isPartialGetItemsObj(partial.getItems)) {
276
- if (schemaFragment.type === 'object') partial.getItems.returnObjects = true
299
+ if (type === 'object') partial.getItems.returnObjects = true
277
300
  if (partial.getItems.itemTitle) partial.getItems.itemTitle = normalizeExpression(partial.getItems.itemTitle)
278
301
  if (partial.getItems.itemKey) partial.getItems.itemKey = normalizeExpression(partial.getItems.itemKey)
279
302
  if (partial.getItems.itemValue) partial.getItems.itemValue = normalizeExpression(partial.getItems.itemValue)
@@ -30,6 +30,7 @@ import schema from './schema.js'
30
30
  * @typedef {import('./types.js').Tabs} Tabs
31
31
  * @typedef {import('./types.js').VerticalTabs} VerticalTabs
32
32
  * @typedef {import('./types.js').ExpansionPanels} ExpansionPanels
33
+ * @typedef {import('./types.js').Stepper} Stepper
33
34
  * @typedef {import('./types.js').List} List
34
35
  * @typedef {import('./types.js').Combobox} Combobox
35
36
  * @typedef {import('./types.js').Cols} Cols
@@ -63,7 +64,7 @@ export function isSectionLayout (layout) {
63
64
  return layout.comp === 'section'
64
65
  }
65
66
 
66
- export const compositeCompNames = ['section', 'tabs', 'vertical-tabs', 'expansion-panels']
67
+ export const compositeCompNames = ['section', 'tabs', 'vertical-tabs', 'expansion-panels', 'stepper']
67
68
 
68
69
  /** @type {(layout: CompObject) => layout is CompositeCompObject} */
69
70
  export function isCompositeLayout (layout) {
@@ -80,6 +81,11 @@ export function isSelectLayout (layout) {
80
81
  return layout.comp === 'select'
81
82
  }
82
83
 
84
+ /** @type {(layout: CompObject) => layout is CompObject & {autofocus: boolean}} */
85
+ export function isFocusableLayout (layout) {
86
+ return ['text-field', 'number-field', 'textarea', 'select', 'combobox', 'number-combobox', 'autocomplete', 'markdown'].includes(layout.comp)
87
+ }
88
+
83
89
  /** @type {(layout: CompObject) => layout is Select | Combobox | Autocomplete} */
84
90
  export function isItemsLayout (layout) {
85
91
  return layout.comp === 'select' || layout.comp === 'combobox' || layout.comp === 'autocomplete'