UNPKG

@antv/t8

Version:

T8 is a text visualization solution for unstructured data within the AntV technology stack, and it is a declarative JSON Schema syntax that can be used to describe the content of data interpretation reports.

444 lines (442 loc) 9.47 kB
{ "$ref": "#/definitions/NarrativeTextSpec", "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "BulletItemSpec": { "additionalProperties": false, "properties": { "className": { "type": "string" }, "key": { "type": "string" }, "phrases": { "items": { "$ref": "#/definitions/PhraseSpec" }, "type": "array" }, "styles": { "type": "object" }, "subBullet": { "$ref": "#/definitions/BulletsParagraphSpec" }, "type": { "const": "bullet-item", "type": "string" } }, "required": [ "phrases", "type" ], "type": "object" }, "BulletsParagraphSpec": { "additionalProperties": false, "properties": { "bullets": { "items": { "$ref": "#/definitions/BulletItemSpec" }, "type": "array" }, "className": { "type": "string" }, "isOrder": { "type": "boolean" }, "key": { "type": "string" }, "styles": { "type": "object" }, "type": { "const": "bullets", "type": "string" } }, "required": [ "bullets", "isOrder", "type" ], "type": "object" }, "CustomBlockElement": { "description": "basic block element structure, used for extends", "properties": { "className": { "type": "string" }, "customType": { "type": "string" }, "key": { "type": "string" }, "styles": { "type": "object" } }, "required": [ "customType" ], "type": "object" }, "CustomMetaData": { "additionalProperties": {}, "description": "custom phrase metadata", "properties": { "customType": { "type": "string" } }, "required": [ "customType" ], "type": "object" }, "CustomPhraseSpec<CustomMetaData>": { "additionalProperties": false, "properties": { "className": { "type": "string" }, "key": { "type": "string" }, "metadata": { "$ref": "#/definitions/CustomMetaData" }, "styles": { "type": "object" }, "type": { "const": "custom", "type": "string" }, "value": { "type": "string" } }, "required": [ "type" ], "type": "object" }, "EntityMetaData": { "additionalProperties": false, "properties": { "assessment": { "$ref": "#/definitions/ValueAssessment", "description": "assessment up or down, used for derived value 衍生指标评估参数,指定上涨或者下跌" }, "detail": { "description": "detail data, 明细数据,用于弹框展示" }, "entityType": { "$ref": "#/definitions/EntityType", "description": "entity type, 实体类型标记" }, "origin": { "description": "original data, 原始数据", "type": "number" }, "sourceId": { "description": "source id of the variable, to access the variable info from variableSourceMap", "type": "string" } }, "required": [ "entityType" ], "type": "object" }, "EntityPhraseSpec": { "additionalProperties": false, "properties": { "className": { "type": "string" }, "key": { "type": "string" }, "metadata": { "$ref": "#/definitions/EntityMetaData" }, "styles": { "type": "object" }, "type": { "const": "entity", "type": "string" }, "value": { "type": "string" } }, "required": [ "type" ], "type": "object" }, "EntityType": { "enum": [ "metric_name", "metric_value", "other_metric_value", "contribute_ratio", "delta_value", "ratio_value", "trend_desc", "dim_value", "time_desc", "proportion" ], "type": "string" }, "HeadingParagraphSpec": { "additionalProperties": false, "properties": { "className": { "type": "string" }, "key": { "type": "string" }, "phrases": { "items": { "$ref": "#/definitions/PhraseSpec" }, "type": "array" }, "styles": { "type": "object" }, "type": { "enum": [ "heading1", "heading2", "heading3", "heading4", "heading5", "heading6" ], "type": "string" } }, "required": [ "phrases", "type" ], "type": "object" }, "HeadlineSpec": { "additionalProperties": false, "properties": { "className": { "type": "string" }, "key": { "type": "string" }, "phrases": { "items": { "$ref": "#/definitions/PhraseSpec" }, "type": "array" }, "styles": { "type": "object" }, "type": { "const": "headline", "type": "string" } }, "required": [ "phrases", "type" ], "type": "object" }, "NarrativeTextSpec": { "additionalProperties": false, "properties": { "className": { "type": "string" }, "headline": { "$ref": "#/definitions/HeadlineSpec" }, "key": { "type": "string" }, "sections": { "items": { "$ref": "#/definitions/SectionSpec" }, "type": "array" }, "styles": { "type": "object" } }, "type": "object" }, "ParagraphSpec": { "anyOf": [ { "$ref": "#/definitions/HeadingParagraphSpec" }, { "$ref": "#/definitions/TextParagraphSpec" }, { "$ref": "#/definitions/BulletsParagraphSpec" }, { "$ref": "#/definitions/CustomBlockElement" } ] }, "PhraseSpec": { "anyOf": [ { "$ref": "#/definitions/TextPhraseSpec" }, { "$ref": "#/definitions/EntityPhraseSpec" }, { "$ref": "#/definitions/CustomPhraseSpec<CustomMetaData>" } ] }, "SectionSpec": { "anyOf": [ { "additionalProperties": false, "properties": { "className": { "type": "string" }, "key": { "type": "string" }, "paragraphs": { "items": { "$ref": "#/definitions/ParagraphSpec" }, "type": "array" }, "styles": { "type": "object" } }, "type": "object" }, { "properties": { "className": { "type": "string" }, "customType": { "type": "string" }, "key": { "type": "string" }, "styles": { "type": "object" } }, "required": [ "customType" ], "type": "object" } ] }, "TextParagraphSpec": { "additionalProperties": false, "properties": { "className": { "type": "string" }, "key": { "type": "string" }, "phrases": { "items": { "$ref": "#/definitions/PhraseSpec" }, "type": "array" }, "styles": { "type": "object" }, "type": { "const": "normal", "type": "string" } }, "required": [ "phrases", "type" ], "type": "object" }, "TextPhraseSpec": { "additionalProperties": false, "properties": { "bold": { "type": "boolean" }, "className": { "type": "string" }, "italic": { "type": "boolean" }, "key": { "type": "string" }, "styles": { "type": "object" }, "type": { "const": "text", "type": "string" }, "underline": { "type": "boolean" }, "url": { "type": "string" }, "value": { "type": "string" } }, "required": [ "type", "value" ], "type": "object" }, "ValueAssessment": { "enum": [ "positive", "negative", "equal" ], "type": "string" } } }