robin
791ef2639c
All checks were successful
continuous-integration/drone/push Build is passing
🔀 Merge branch 'feature/schema-update' into 'master'
The collectionNavigation.json schema was updated to include a new enum value "MANUALLY" for the "order" property in the "defaultSort" object. This allows for manual sorting of items in the admin UI lists. The fieldMeta.json schema was updated to include new properties and definitions related to folding configuration for array fields, hiding field widgets, direction of fields, path steps, and meta elements. These updates enhance the flexibility and customization options for the field widgets in the application.
269 lines
11 KiB
JSON
269 lines
11 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "JSON Schema tibi-server collection meta navigation configuration",
|
|
"description": "tibi-server collection navigation linter",
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"patternProperties": {
|
|
"^x\\-": {
|
|
"description": "template property"
|
|
}
|
|
},
|
|
"required": [],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "name of navigation"
|
|
},
|
|
"label": {
|
|
"$ref": "definitions.json#/definitions/i18nString"
|
|
},
|
|
"defaultImageFilter": {
|
|
"type": "string",
|
|
"description": "image filter name used for image previews"
|
|
},
|
|
"muiIcon": {
|
|
"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"]
|
|
},
|
|
|
|
"defaultSort": {
|
|
"type": "object",
|
|
"description": "default sort in admin ui lists",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"field": {
|
|
"$ref": "definitions.json#/definitions/fieldSource"
|
|
},
|
|
"order": {
|
|
"description": "sort order",
|
|
"enum": ["ASC", "DESC", "MANUALLY"]
|
|
}
|
|
}
|
|
},
|
|
"defaultCallback": {
|
|
"description": "default action on entry, defaults to edit - can be one of: edit, view, Object with js eval",
|
|
"oneOf": [
|
|
{
|
|
"type": "string",
|
|
"enum": ["edit", "view"]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"eval": {
|
|
"type": "string",
|
|
"description": "js eval string of (entry) => {}"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"filter": {
|
|
"type": "object",
|
|
"description": "filter for prefiltering collection view"
|
|
},
|
|
"views": {
|
|
"type": "array",
|
|
"description": "list views",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"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": [
|
|
{
|
|
"properties": {
|
|
"type": {
|
|
"enum": ["simpleList", "dashboardSimpleList"]
|
|
},
|
|
|
|
"primaryText": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "definitions.json#/definitions/fieldSource"
|
|
},
|
|
{
|
|
"$ref": "definitions.json#/definitions/evalExpressions"
|
|
}
|
|
]
|
|
},
|
|
"secondaryText": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "definitions.json#/definitions/fieldSource"
|
|
},
|
|
{
|
|
"$ref": "definitions.json#/definitions/evalExpressions"
|
|
}
|
|
]
|
|
},
|
|
"tertiaryText": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "definitions.json#/definitions/fieldSource"
|
|
},
|
|
{
|
|
"$ref": "definitions.json#/definitions/evalExpressions"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": ["type", "primaryText"]
|
|
},
|
|
{
|
|
"properties": {
|
|
"type": {
|
|
"enum": ["table", "dashboardTable"]
|
|
},
|
|
"columns": {
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"anyOf": [
|
|
{
|
|
"$ref": "definitions.json#/definitions/fieldSource"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"label": {
|
|
"$ref": "definitions.json#/definitions/i18nString"
|
|
},
|
|
"renderValue": {
|
|
"description": "render value based on entry ($ variable)",
|
|
"$ref": "definitions.json#/definitions/evalObjectWithRaw"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"allOf": [
|
|
{
|
|
"$ref": "definitions.json#/definitions/evalExpressions"
|
|
},
|
|
{
|
|
"properties": {
|
|
"label": {
|
|
"$ref": "definitions.json#/definitions/i18nString"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"minItems": 1
|
|
}
|
|
},
|
|
"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"]
|
|
}
|
|
}
|
|
}
|
|
}
|