2022-10-18 16:48:16 +02:00
{
"$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"
}
} ,
2022-11-18 19:59:36 +01:00
"required" : [ ] ,
2022-10-18 16:48:16 +02:00
"properties" : {
"name" : {
"type" : "string" ,
"description" : "name of navigation"
} ,
"label" : {
2022-11-18 19:59:36 +01:00
"$ref" : "definitions.json#/definitions/i18nString"
} ,
"defaultImageFilter" : {
"type" : "string" ,
"description" : "image filter name used for image previews"
2022-10-18 16:48:16 +02:00
} ,
"muiIcon" : {
"type" : "string" ,
"description" : "material ui icon name"
} ,
2023-07-23 22:32:50 +02:00
"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" ]
} ,
2023-07-23 22:57:50 +02:00
2022-10-18 16:48:16 +02:00
"defaultSort" : {
"type" : "object" ,
"description" : "default sort in admin ui lists" ,
"additionalProperties" : false ,
"properties" : {
"field" : {
2022-11-18 19:59:36 +01:00
"$ref" : "definitions.json#/definitions/fieldSource"
2022-10-18 16:48:16 +02:00
} ,
"order" : {
"description" : "sort order" ,
"enum" : [ "ASC" , "DESC" ]
}
}
} ,
2022-11-18 19:59:36 +01:00
"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
}
]
} ,
2022-10-18 16:48:16 +02:00
"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"
2023-07-23 22:32:50 +02:00
} ,
"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"
}
}
2022-10-18 16:48:16 +02:00
}
} ,
"oneOf" : [
{
"properties" : {
"type" : {
"const" : "simpleList"
} ,
"primaryText" : {
"oneOf" : [
{
2022-11-18 19:59:36 +01:00
"$ref" : "definitions.json#/definitions/fieldSource"
2022-10-18 16:48:16 +02:00
} ,
{
2022-11-18 19:59:36 +01:00
"$ref" : "definitions.json#/definitions/evalExpressions"
2022-10-18 16:48:16 +02:00
}
]
} ,
"secondaryText" : {
"oneOf" : [
{
2022-11-18 19:59:36 +01:00
"$ref" : "definitions.json#/definitions/fieldSource"
2022-10-18 16:48:16 +02:00
} ,
{
2022-11-18 19:59:36 +01:00
"$ref" : "definitions.json#/definitions/evalExpressions"
2022-10-18 16:48:16 +02:00
}
]
} ,
"tertiaryText" : {
"oneOf" : [
{
2022-11-18 19:59:36 +01:00
"$ref" : "definitions.json#/definitions/fieldSource"
2022-10-18 16:48:16 +02:00
} ,
{
2022-11-18 19:59:36 +01:00
"$ref" : "definitions.json#/definitions/evalExpressions"
2022-10-18 16:48:16 +02:00
}
]
}
} ,
"required" : [ "type" , "primaryText" ]
} ,
{
"properties" : {
"type" : {
"const" : "table"
} ,
"columns" : {
"type" : "array" ,
"items" : {
"oneOf" : [
{
"anyOf" : [
{
2022-11-18 19:59:36 +01:00
"$ref" : "definitions.json#/definitions/fieldSource"
2022-10-18 16:48:16 +02:00
} ,
{
"type" : "object" ,
"properties" : {
"label" : {
2022-11-18 19:59:36 +01:00
"$ref" : "definitions.json#/definitions/i18nString"
2023-03-18 10:48:26 +01:00
} ,
"renderValue" : {
"description" : "render value based on entry ($ variable)" ,
"$ref" : "definitions.json#/definitions/evalObjectWithRaw"
2022-10-18 16:48:16 +02:00
}
}
}
]
} ,
{
"allOf" : [
{
2022-11-18 19:59:36 +01:00
"$ref" : "definitions.json#/definitions/evalExpressions"
2022-10-18 16:48:16 +02:00
} ,
{
"properties" : {
"label" : {
2022-11-18 19:59:36 +01:00
"$ref" : "definitions.json#/definitions/i18nString"
2022-10-18 16:48:16 +02:00
}
}
}
]
}
]
} ,
"minItems" : 1
}
} ,
"required" : [ "type" , "columns" ]
2023-07-23 22:32:50 +02:00
} ,
{
"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" ]
2022-10-18 16:48:16 +02:00
}
] ,
"required" : [ "type" ]
}
}
}
}