Open Source Web Application Framework for ASP.NET Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

92 lines
3.6 KiB

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "page-column-descriptor.schema.json",
"title": "PageColumnDescriptor",
"description": "Describes a property displayed by an entity page list, card, calendar event, or gallery item.",
"markdownDescription": "AI guidance: use page columns/card fields to control runtime page visibility. Each `propertyName` must match a property on the page entity or a dot-separated related path such as `CustomerId.Name`. Keep this separate from entity property definitions so the same entity can have different views on different pages. For boolean properties, `booleanPresentation` and `booleanValues` control how true/false/null render on this page.",
"type": "object",
"properties": {
"propertyName": {
"type": "string",
"description": "Property displayed by this column/card field. Must match a property on the page entityName or a related path such as 'CustomerId.CountryId.Name'.",
"minLength": 1
},
"label": {
"type": "string",
"description": "Optional page-specific label override. Omit to use the property displayName/name.",
"minLength": 1
},
"order": {
"type": "integer",
"description": "Display order. Lower values appear first.",
"default": 0
},
"exportOrder": {
"type": "integer",
"description": "Optional export order. Lower values appear first in Excel, CSV, download-link columns, and file bundles. Omit to reuse display order."
},
"width": {
"type": "string",
"description": "Optional CSS width for tabular columns, for example '160px', '12rem', or '20%'.",
"minLength": 1
},
"booleanPresentation": {
"oneOf": [
{ "$ref": "boolean-value-presentation.schema.json" },
{ "type": "null" }
],
"description": "How a boolean property is rendered on this page: text, checkbox, badge, or iconOnly. Only meaningful for boolean properties."
},
"booleanValues": {
"type": ["object", "null"],
"description": "Per-state display metadata for boolean properties. Keys are 'true', 'false', and 'null'.",
"properties": {
"true": {
"oneOf": [
{ "$ref": "boolean-value-display-descriptor.schema.json" },
{ "type": "null" }
]
},
"false": {
"oneOf": [
{ "$ref": "boolean-value-display-descriptor.schema.json" },
{ "type": "null" }
]
},
"null": {
"oneOf": [
{ "$ref": "boolean-value-display-descriptor.schema.json" },
{ "type": "null" }
]
}
},
"additionalProperties": false
},
"visible": {
"type": "boolean",
"description": "Whether the field is visible by default on this page.",
"default": true
},
"exportable": {
"type": "boolean",
"description": "Whether the field can be exported from this page.",
"default": true
}
},
"required": ["propertyName"],
"additionalProperties": false,
"examples": [
{ "propertyName": "Title", "label": "Title", "order": 0, "exportOrder": 0, "width": "240px", "visible": true },
{ "propertyName": "InternalNotes", "visible": false, "exportable": false },
{ "propertyName": "CustomerId.Name", "label": "Customer", "order": 1 },
{
"propertyName": "IsActive",
"booleanPresentation": "badge",
"booleanValues": {
"true": { "displayName": "Active", "color": "#16A34A" },
"false": { "displayName": "Inactive", "color": "#DC2626" },
"null": { "displayName": "Not set", "color": "#6B7280" }
}
}
]
}