schemas updated
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robin Grenzdörfer 2023-07-23 20:32:50 +00:00
parent c0c3b2b593
commit 5d6fc43f44
3 changed files with 533 additions and 0 deletions

View File

@ -26,6 +26,54 @@
"type": "string",
"description": "material ui icon name"
},
"multiupload": {
"type": "object",
"description": "Configuration for multi-upload behavior.",
"properties": {
"fields": {
"type": "array",
"description": "Fields editable in the modal. If not set, all fields will be selected automatically.",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "Name of the field."
}
},
"required": ["source"]
}
},
"prefilledFields": {
"type": "array",
"description": "Fields that should have default values. They won't be visible to the user but just an informational text for which fields will receive a default value.",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "Name of the field."
},
"defaultValue": {
"type": "object",
"properties": {
"eval": {
"type": "string",
"description": "JavaScript evaluation string to determine the default value."
}
},
"required": ["eval"]
}
},
"required": ["source", "defaultValue"]
}
}
},
"required": ["fields"]
},
"dashboard": {
"$ref": "dashboard.json#/properties/dashboard"
},
"defaultSort": {
"type": "object",
"description": "default sort in admin ui lists",
@ -72,6 +120,28 @@
"mediaQuery": {
"type": "string",
"description": "css media query to select this view in ui"
},
"selectionPriority": {
"type": "number",
"description": "priority for selection based on media query"
},
"fileDropArea": {
"type": "object",
"properties": {
"label": {
"$ref": "definitions.json#/definitions/i18nString"
},
"helperText": {
"$ref": "definitions.json#/definitions/i18nString"
},
"targetField": {
"type": "string"
},
"pageAsDropArea": {
"type": "boolean"
}
}
}
},
"oneOf": [
@ -161,6 +231,35 @@
}
},
"required": ["type", "columns"]
},
{
"properties": {
"type": {
"const": "cardList"
},
"fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string"
},
"type": {
"type": "string"
},
"label": {
"type": "string"
},
"filter": {
"type": "boolean"
}
},
"required": ["source"]
}
}
},
"required": ["type", "fields"]
}
],
"required": ["type"]

View File

@ -0,0 +1,323 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"dashboard": {
"type": "object",
"properties": {
"majorItems": {
"type": "array",
"items": {
"oneOf": [
{ "$ref": "#/definitions/sectionTitle" },
{ "$ref": "#/definitions/swiper" },
{ "$ref": "#/definitions/graph" },
{ "$ref": "#/definitions/table" },
{ "$ref": "#/definitions/reference" }
]
}
},
"minorItems": {
"type": "array",
"items": { "$ref": "#/definitions/minorItem" }
}
},
"required": ["majorItems"]
}
},
"required": ["dashboard"],
"definitions": {
"sectionTitle": {
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["sectionTitle"] },
"title": { "type": "string" }
},
"required": ["type", "title"],
"additionalProperties": false
},
"swiper": {
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["swiper"] },
"css": {
"type": "object",
"properties": {
"graph": {
"type": "object",
"properties": {
"wrapper": {
"$ref": "#/definitions/cssWithEval"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"containerProps": { "$ref": "#/definitions/containerProps" },
"elements": {
"type": "array",
"items": { "$ref": "#/definitions/graph" }
}
},
"required": ["type", "elements"],
"additionalProperties": false
},
"graph": {
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["graph"] },
"title": {
"oneOf": [
{
"type": "object",
"properties": {
"value": { "type": "string" },
"contentAfter": { "type": "string" },
"contentBefore": { "type": "string" },
"eval": { "type": "string" }
},
"required": ["value"]
},
{ "type": "string" },
{
"type": "object",
"properties": {
"de": { "type": "string" },
"en": { "type": "string" }
},
"required": ["de", "en"]
}
]
},
"subTitle": {
"type": "object",
"properties": {
"de": { "type": "string" },
"en": { "type": "string" }
},
"required": ["de", "en"]
},
"xAxis": { "type": "string", "enum": ["timeline"] },
"timeInterval": {
"type": "string",
"enum": ["day", "month", "year"]
},
"filter": { "type": "boolean" },
"dateTimeField": { "type": "string" },
"until": {
"type": "string",
"enum": ["lastWeek", "lastMonth", "lastYear", "allTime"]
},
"graphType": {
"type": "string",
"enum": ["bar", "line", "pie", "donut", "area"]
},
"graphs": {
"type": "array",
"items": { "$ref": "#/definitions/graphDetail" }
},
"defaultUntil": {
"type": "string",
"enum": ["lastWeek", "lastMonth", "lastYear", "allTime"]
},
"newPageRef": { "type": "boolean" },
"limit": { "type": "number" },
"value": { "type": "string", "enum": ["total", "amount"] },
"valueType": {
"type": "string",
"enum": ["absolute", "relative"]
},
"field": { "type": "string" },
"path": { "type": "string" },
"style": {
"type": "object",
"properties": {
"upper": { "type": "string" },
"lower": { "type": "string" }
},
"required": ["upper", "lower"]
},
"collection": { "type": "string" },
"subNavigation": { "type": "number" },
"graphBaseColor": { "type": "string" },
"multipleYAxes": { "type": "boolean" },
"timespan": {
"type": "string",
"enum": ["YTD", "QTD", "MTD"]
},
"backgroundLines": { "type": "boolean" },
"opacity": { "type": "number" },
"elements": {
"type": "array",
"items": { "$ref": "#/definitions/graph" }
}
},
"additionalProperties": false
},
"graphDetail": {
"type": "object",
"properties": {
"graphName": {
"type": "object",
"properties": {
"de": { "type": "string" },
"en": { "type": "string" }
},
"required": ["de", "en"]
},
"graphType": {
"type": "string",
"enum": ["bar", "line", "pie", "donut", "area"]
},
"yAxisTitle": { "type": "string" },
"yAxis": {
"type": "string",
"enum": ["sum", "amount"]
},
"field": { "type": "string" }
},
"required": ["graphName", "graphType"]
},
"table": {
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["table"] },
"filter": { "type": "boolean" },
"collection": { "type": "string" },
"title": {
"oneOf": [
{
"type": "object",
"properties": {
"de": { "type": "string" },
"en": { "type": "string" }
},
"required": ["de", "en"]
},
{ "type": "string" }
]
},
"subTitle": {
"type": "object",
"properties": {
"de": { "type": "string" },
"en": { "type": "string" }
},
"required": ["de", "en"]
},
"columns": {
"type": "array",
"items": { "type": "string" }
},
"filterGroups": {
"type": "array",
"items": { "type": "string" }
},
"additionalApiParams": {
"type": "array",
"items": { "$ref": "#/definitions/apiParams" }
}
},
"required": ["type", "columns"],
"additionalProperties": false
},
"apiParams": {
"type": "object",
"properties": {
"name": { "type": "string" },
"value": { "type": "string" }
},
"required": ["name", "value"],
"additionalProperties": false
},
"reference": {
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["reference"] },
"title": {
"oneOf": [
{
"type": "object",
"properties": {
"de": { "type": "string" },
"en": { "type": "string" }
},
"required": ["de", "en"]
},
{ "type": "string" }
]
}
},
"required": ["type", "title"],
"additionalProperties": false
},
"minorItem": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["graph", "table", "reference"]
},
"title": { "type": "string" }
},
"required": ["type"],
"additionalProperties": false
},
"containerProps": {
"type": "object",
"properties": {
"class": { "type": "string" },
"style": { "type": "string" },
"layout": {
"type": "object",
"properties": {
"breakBefore": { "type": "boolean" },
"breakAfter": { "type": "boolean" },
"size": {
"type": "object",
"properties": {
"default": { "type": "string" },
"small": { "type": "string" },
"large": { "type": "string" }
},
"required": ["default", "small", "large"]
}
},
"required": ["breakBefore", "breakAfter", "size"]
}
},
"additionalProperties": false
},
"cssWithEval": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"eval": {
"type": "string"
}
},
"required": ["eval"],
"additionalProperties": false
},
{
"type": "object",
"patternProperties": {
"^[a-zA-Z_][a-zA-Z0-9_-]*$": {
"oneOf": [
{ "type": "string" },
{ "type": "number" }
]
}
},
"additionalProperties": false
}
]
}
}
}

View File

@ -231,6 +231,17 @@
{ "type": "string" },
{
"$ref": "definitions.json#/definitions/evalObjectWithRaw"
},
{
"type": "object",
"properties": {
"defaultCollectionViews": {
"type": "boolean"
}
},
"required": [
"defaultCollectionViews"
]
}
]
}
@ -475,6 +486,106 @@
}
]
},
"containerProps": {
"type": "object",
"properties": {
"class": {
"type": "string"
},
"layout": {
"type": "object",
"properties": {
"breakBefore": {
"type": "boolean"
},
"breakAfter": {
"type": "boolean"
},
"size": {
"type": "object",
"properties": {
"default": {
"type": "string"
},
"small": {
"type": "string"
},
"large": {
"type": "string"
}
}
}
}
}
}
},
"inputProps": {
"type": "object",
"additionalProperties": true
},
"metaElements": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
{
"type": "object",
"properties": {
"tablist": {
"type": "object",
"properties": {
"tabs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"subFields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string"
}
},
"required": [
"source"
]
}
}
},
"required": [
"name",
"label",
"subFields"
]
}
}
},
"required": ["tabs"]
}
}
}
]
},
"defaultValue": {
"description": "default value or code to get the value",
"oneOf": [