@qingflow-tech/qingflow-cli 1.1.61-beta.4 → 1.1.61-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +1 -1
- package/pyproject.toml +2 -1
- package/skills/qingflow-cli/reference/QINGFLOW_CLI_BUILDER_CHARTS_WORKFLOW.md +1 -1
- package/skills/qingflow-cli/reference/QINGFLOW_CLI_BUILDER_PORTAL_WORKFLOW.md +6 -258
- package/skills/qingflow-cli/reference/builder/30-schema-fields.md +13 -0
- package/skills/qingflow-cli/reference/builder/70-portal.md +38 -17
- package/skills/qingflow-cli/reference/examples/portal/portal_apply_v1alpha1.example.json +100 -0
- package/skills/qingflow-cli/reference/examples/portal/portal_sections_all_types.example.json +6 -7
- package/src/qingflow_mcp/app_form_validator.py +20 -3
- package/src/qingflow_mcp/builder_facade/app_form.py +137 -17
- package/src/qingflow_mcp/builder_facade/models.py +177 -15
- package/src/qingflow_mcp/builder_facade/portals_schema.py +397 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/manifest.json +14 -1
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/complete.json +49 -9
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/address.json +27 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_content_classification.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_content_extraction.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_content_generation.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_document_parsing.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_image_generation.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_image_recognition.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_machine_translation.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_text_summary.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/amount.json +2 -2
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/attachment.json +27 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/date_duration.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/embed_field.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/image_select.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/location.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/number.json +2 -2
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ocr.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/q_linker.json +2 -2
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/relation.json +27 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/subtable.json +29 -2
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/summary.json +20 -7
- package/src/qingflow_mcp/builder_facade/schemas/portals/manifest.json +59 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/complete.json +1397 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/carousel.json +193 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/chart.json +643 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/favourite.json +203 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/filter.json +268 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/grid.json +265 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/link.json +131 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/task.json +199 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/text.json +123 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/view.json +196 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/summary.json +800 -0
- package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/complete.json +1 -1
- package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/details/display.json +1 -1
- package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/summary.json +1 -1
- package/src/qingflow_mcp/builder_facade/service.py +1251 -88
- package/src/qingflow_mcp/cli/commands/builder.py +132 -5
- package/src/qingflow_mcp/public_surface.py +2 -0
- package/src/qingflow_mcp/server_app_builder.py +34 -3
- package/src/qingflow_mcp/solution/compiler/icon_utils.py +73 -0
- package/src/qingflow_mcp/solution/executor.py +5 -2
- package/src/qingflow_mcp/tools/ai_builder_tools.py +118 -12
- package/src/qingflow_mcp/tools/portal_tools.py +4 -54
- package/src/qingflow_mcp/tools/portal_writer.py +59 -0
- package/src/qingflow_mcp/tools/solution_tools.py +2 -0
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://qingflow.com/schemas/builder/portals/v1alpha1/components/grid.json",
|
|
4
|
+
"title": "Qingflow Builder Portals Section · grid (v1alpha1)",
|
|
5
|
+
"portalGridSectionDescription": "门户业务入口宫格组件(grid)的详细配置专项 Schema。获取命令:qingflow builder portal schema --schema-kind grid(MCP: portal_schema(schema_kind=\"grid\"))。本 Schema 校验 sections[] 中单个 grid 区块(自包含,可直接交给 JSON Schema 校验器);后端 DashComponentInfo.type=2。整门户声明走 summary/complete 档。",
|
|
6
|
+
"$defs": {
|
|
7
|
+
"Position": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"positionShapeDescription": "网格位置。PC 是 24 列网格(cols≤24),mobile 是 6 列网格(cols≤6);同行组件共享同一 y 与 rows,一行 cols 合计 24。mobile 可省略(缺省与 pc 同布局)。平铺别名 pc_x/pc_y/pc_w/pc_h、mobile_* 也接受(x/y 与 w/h/cols/rows 混写均认),归一为本结构。标准行高:指标卡 rows=5、BI 图表 rows=7、数据视图 rows=11、业务入口 rows=4。",
|
|
11
|
+
"properties": {
|
|
12
|
+
"pc": {
|
|
13
|
+
"$ref": "#/$defs/PositionDetail"
|
|
14
|
+
},
|
|
15
|
+
"mobile": {
|
|
16
|
+
"$ref": "#/$defs/PositionDetail"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"PositionDetail": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"positionDetailShapeDescription": "单端位置:x=列偏移、y=行偏移、cols=占宽、rows=占高。",
|
|
24
|
+
"properties": {
|
|
25
|
+
"x": {
|
|
26
|
+
"type": [
|
|
27
|
+
"integer",
|
|
28
|
+
"null"
|
|
29
|
+
],
|
|
30
|
+
"minimum": 0
|
|
31
|
+
},
|
|
32
|
+
"y": {
|
|
33
|
+
"type": [
|
|
34
|
+
"integer",
|
|
35
|
+
"null"
|
|
36
|
+
],
|
|
37
|
+
"minimum": 0
|
|
38
|
+
},
|
|
39
|
+
"cols": {
|
|
40
|
+
"type": [
|
|
41
|
+
"integer",
|
|
42
|
+
"null"
|
|
43
|
+
],
|
|
44
|
+
"minimum": 1
|
|
45
|
+
},
|
|
46
|
+
"rows": {
|
|
47
|
+
"type": [
|
|
48
|
+
"integer",
|
|
49
|
+
"null"
|
|
50
|
+
],
|
|
51
|
+
"minimum": 1
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"x-backend": "DashPosition.pc / DashPosition.mobile"
|
|
55
|
+
},
|
|
56
|
+
"GridConfig": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"additionalProperties": false,
|
|
59
|
+
"required": [
|
|
60
|
+
"items"
|
|
61
|
+
],
|
|
62
|
+
"gridConfigShapeDescription": "业务入口宫格配置;items 必须含真实条目,不接受空宫格。声明键与后端 ComponentGridInfo 键一致(camelCase):gridTitle/beingShowTitle/items。",
|
|
63
|
+
"properties": {
|
|
64
|
+
"gridTitle": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"gridTitleShapeDescription": "宫格标题(缺省用 section.title)。",
|
|
67
|
+
"x-backend": "ComponentGridInfo.gridTitle"
|
|
68
|
+
},
|
|
69
|
+
"beingShowTitle": {
|
|
70
|
+
"type": "boolean",
|
|
71
|
+
"default": true,
|
|
72
|
+
"gridShowTitleShapeDescription": "是否显示宫格标题。",
|
|
73
|
+
"x-backend": "ComponentGridInfo.beingShowTitle"
|
|
74
|
+
},
|
|
75
|
+
"items": {
|
|
76
|
+
"type": "array",
|
|
77
|
+
"gridItemsShapeDescription": "入口条目列表(ordinal 缺省按数组顺序)。",
|
|
78
|
+
"items": {
|
|
79
|
+
"$ref": "#/$defs/GridItem"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"x-backend": "ComponentGridInfo"
|
|
84
|
+
},
|
|
85
|
+
"GridItem": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"additionalProperties": false,
|
|
88
|
+
"required": [
|
|
89
|
+
"type",
|
|
90
|
+
"jumpMode",
|
|
91
|
+
"title"
|
|
92
|
+
],
|
|
93
|
+
"gridItemShapeDescription": "单个入口条目。grid 的 config 声明键与后端 ComponentGridItemInfo 键一致(camelCase);Python 端 section.config 直接透传。",
|
|
94
|
+
"properties": {
|
|
95
|
+
"type": {
|
|
96
|
+
"type": "integer",
|
|
97
|
+
"gridItemTypeDescription": "入口类型:1=应用,2=门户,3=应用包,4=外链。",
|
|
98
|
+
"x-backend": "ComponentGridItemInfo.type"
|
|
99
|
+
},
|
|
100
|
+
"jumpMode": {
|
|
101
|
+
"type": "integer",
|
|
102
|
+
"gridJumpModeDescription": "跳转方式:1=应用内页,2=新页面。",
|
|
103
|
+
"x-backend": "ComponentGridItemInfo.jumpMode"
|
|
104
|
+
},
|
|
105
|
+
"linkAppKey": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"gridItemAppKeyDescription": "目标应用 key(type=1 时使用)。",
|
|
108
|
+
"x-backend": "ComponentGridItemInfo.linkAppKey"
|
|
109
|
+
},
|
|
110
|
+
"linkFormType": {
|
|
111
|
+
"type": [
|
|
112
|
+
"integer",
|
|
113
|
+
"null"
|
|
114
|
+
],
|
|
115
|
+
"gridItemFormTypeDescription": "目标应用页面形态(type=1 时使用)。",
|
|
116
|
+
"x-backend": "ComponentGridItemInfo.linkFormType"
|
|
117
|
+
},
|
|
118
|
+
"linkDashKey": {
|
|
119
|
+
"type": [
|
|
120
|
+
"string",
|
|
121
|
+
"null"
|
|
122
|
+
],
|
|
123
|
+
"gridItemDashKeyDescription": "目标门户 key(type=2 时使用)。",
|
|
124
|
+
"x-backend": "ComponentGridItemInfo.linkDashKey"
|
|
125
|
+
},
|
|
126
|
+
"linkTagId": {
|
|
127
|
+
"type": [
|
|
128
|
+
"integer",
|
|
129
|
+
"null"
|
|
130
|
+
],
|
|
131
|
+
"gridItemTagIdDescription": "目标应用包 tagId(type=3 时使用)。",
|
|
132
|
+
"x-backend": "ComponentGridItemInfo.linkTagId"
|
|
133
|
+
},
|
|
134
|
+
"linkUrl": {
|
|
135
|
+
"type": [
|
|
136
|
+
"string",
|
|
137
|
+
"null"
|
|
138
|
+
],
|
|
139
|
+
"maxLength": 500,
|
|
140
|
+
"gridItemUrlDescription": "外链地址(type=4 时使用)。",
|
|
141
|
+
"x-backend": "ComponentGridItemInfo.linkUrl"
|
|
142
|
+
},
|
|
143
|
+
"title": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"gridItemTitleDescription": "入口标题。",
|
|
146
|
+
"x-backend": "ComponentGridItemInfo.title"
|
|
147
|
+
},
|
|
148
|
+
"customTitle": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"gridItemCustomTitleDescription": "自定义标题(beingCustomTitle=true 时生效)。",
|
|
151
|
+
"x-backend": "ComponentGridItemInfo.customTitle"
|
|
152
|
+
},
|
|
153
|
+
"beingCustomTitle": {
|
|
154
|
+
"type": "boolean",
|
|
155
|
+
"default": false,
|
|
156
|
+
"gridItemCustomTitleSwitchDescription": "是否启用自定义标题。",
|
|
157
|
+
"x-backend": "ComponentGridItemInfo.beingCustomTitle"
|
|
158
|
+
},
|
|
159
|
+
"iconUrl": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"gridItemIconDescription": "入口图标 URL(可选,缺省按目标解析)。",
|
|
162
|
+
"x-backend": "ComponentGridItemInfo.iconUrl"
|
|
163
|
+
},
|
|
164
|
+
"ordinal": {
|
|
165
|
+
"type": [
|
|
166
|
+
"integer",
|
|
167
|
+
"null"
|
|
168
|
+
],
|
|
169
|
+
"gridItemOrdinalDescription": "排序(缺省按数组顺序)。",
|
|
170
|
+
"x-backend": "ComponentGridItemInfo.ordinal"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"Section": {
|
|
175
|
+
"type": "object",
|
|
176
|
+
"additionalProperties": false,
|
|
177
|
+
"required": [
|
|
178
|
+
"source_type",
|
|
179
|
+
"config"
|
|
180
|
+
],
|
|
181
|
+
"properties": {
|
|
182
|
+
"title": {
|
|
183
|
+
"anyOf": [
|
|
184
|
+
{
|
|
185
|
+
"type": "string"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"type": "null"
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"sectionTitleDescription": "组件显示标题。空标题(null)是合法存量形态(显示标题开但标题空,读链渲染时回退图表名/视图名);创建语义缺省建议显式命名。",
|
|
192
|
+
"x-backend": "组件标题(DashChartInfo.title / DashChartInfo.chartComponentTitle / gridConfig.gridTitle / componentTaskTitle 等;null 落库 NULL)"
|
|
193
|
+
},
|
|
194
|
+
"source_type": {
|
|
195
|
+
"const": "grid",
|
|
196
|
+
"sourceTypeConstDescription": "组件类型固定为 grid(业务入口宫格);后端 type 整数见 x-backend。",
|
|
197
|
+
"x-backend": "DashComponentInfo.type(grid)"
|
|
198
|
+
},
|
|
199
|
+
"role": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"roleShapeDescription": "组件角色标注(编排辅助,如 metric=指标卡;影响布局预设的排布与行高)。别名 zone/section_role。"
|
|
202
|
+
},
|
|
203
|
+
"position": {
|
|
204
|
+
"$ref": "#/$defs/Position"
|
|
205
|
+
},
|
|
206
|
+
"style_config": {
|
|
207
|
+
"type": "object",
|
|
208
|
+
"styleConfigSectionDescription": "组件级样式(受控键集;键白名单以 ws40013 dataset 实测形态校准,未经校准的键会被拒绝)。别名 dash_style_config/dashStyleConfigBO。",
|
|
209
|
+
"x-backend": "DashComponentInfo.dashStyleConfigBO(DashStyleConfigBO)"
|
|
210
|
+
},
|
|
211
|
+
"config": {
|
|
212
|
+
"$ref": "#/$defs/GridConfig",
|
|
213
|
+
"gridConfigPropDescription": "宫格配置(必填,items 非空)。"
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"$ref": "#/$defs/Section",
|
|
219
|
+
"x-qingflow-detail-query": {
|
|
220
|
+
"currentKind": "grid",
|
|
221
|
+
"tool": "portal_schema",
|
|
222
|
+
"cli": "qingflow builder portal schema --schema-kind grid",
|
|
223
|
+
"argument": "schema_kind",
|
|
224
|
+
"detailQueryDescription": "本文件是 业务入口宫格组件的自包含专项 Schema(内联全部引用定义,可独立交给 JSON Schema 校验器)。chart/view/grid/filter/text/link/carousel/task/favourite 各组件专项 Schema分别经 qingflow builder portal schema --schema-kind <类型> 获取。整门户声明用 qingflow builder portal schema --schema-kind summary|complete 获取;回读既有门户用 qingflow builder portal get --dash-key K --schema-kind complete。",
|
|
225
|
+
"readSources": {
|
|
226
|
+
"chartIds": "已有图表 id 用 chart 面读取;内联创建直接在 chart 键声明。",
|
|
227
|
+
"viewKeys": "视图唯一键用 qingflow builder views get --app-key APP 回读。"
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"examples": [
|
|
231
|
+
{
|
|
232
|
+
"title": "业务入口",
|
|
233
|
+
"source_type": "grid",
|
|
234
|
+
"position": {
|
|
235
|
+
"pc": {
|
|
236
|
+
"x": 0,
|
|
237
|
+
"y": 0,
|
|
238
|
+
"cols": 24,
|
|
239
|
+
"rows": 4
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"config": {
|
|
243
|
+
"gridTitle": "业务入口",
|
|
244
|
+
"beingShowTitle": true,
|
|
245
|
+
"items": [
|
|
246
|
+
{
|
|
247
|
+
"type": 1,
|
|
248
|
+
"title": "设备台账",
|
|
249
|
+
"jumpMode": 1,
|
|
250
|
+
"linkAppKey": "APP_KEY_DEVICE",
|
|
251
|
+
"linkFormType": 1
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"type": 1,
|
|
255
|
+
"title": "故障报修",
|
|
256
|
+
"jumpMode": 1,
|
|
257
|
+
"linkAppKey": "APP_KEY_REPAIR",
|
|
258
|
+
"linkFormType": 1,
|
|
259
|
+
"iconUrl": "https://cdn.example.com/repair.png"
|
|
260
|
+
}
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
]
|
|
265
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://qingflow.com/schemas/builder/portals/v1alpha1/components/link.json",
|
|
4
|
+
"title": "Qingflow Builder Portals Section · link (v1alpha1)",
|
|
5
|
+
"portalLinkSectionDescription": "门户链接组件(link)的详细配置专项 Schema。获取命令:qingflow builder portal schema --schema-kind link(MCP: portal_schema(schema_kind=\"link\"))。本 Schema 校验 sections[] 中单个 link 区块(自包含,可直接交给 JSON Schema 校验器);后端 DashComponentInfo.type=4。整门户声明走 summary/complete 档。",
|
|
6
|
+
"$defs": {
|
|
7
|
+
"Position": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"positionShapeDescription": "网格位置。PC 是 24 列网格(cols≤24),mobile 是 6 列网格(cols≤6);同行组件共享同一 y 与 rows,一行 cols 合计 24。mobile 可省略(缺省与 pc 同布局)。平铺别名 pc_x/pc_y/pc_w/pc_h、mobile_* 也接受(x/y 与 w/h/cols/rows 混写均认),归一为本结构。标准行高:指标卡 rows=5、BI 图表 rows=7、数据视图 rows=11、业务入口 rows=4。",
|
|
11
|
+
"properties": {
|
|
12
|
+
"pc": {
|
|
13
|
+
"$ref": "#/$defs/PositionDetail"
|
|
14
|
+
},
|
|
15
|
+
"mobile": {
|
|
16
|
+
"$ref": "#/$defs/PositionDetail"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"PositionDetail": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"positionDetailShapeDescription": "单端位置:x=列偏移、y=行偏移、cols=占宽、rows=占高。",
|
|
24
|
+
"properties": {
|
|
25
|
+
"x": {
|
|
26
|
+
"type": [
|
|
27
|
+
"integer",
|
|
28
|
+
"null"
|
|
29
|
+
],
|
|
30
|
+
"minimum": 0
|
|
31
|
+
},
|
|
32
|
+
"y": {
|
|
33
|
+
"type": [
|
|
34
|
+
"integer",
|
|
35
|
+
"null"
|
|
36
|
+
],
|
|
37
|
+
"minimum": 0
|
|
38
|
+
},
|
|
39
|
+
"cols": {
|
|
40
|
+
"type": [
|
|
41
|
+
"integer",
|
|
42
|
+
"null"
|
|
43
|
+
],
|
|
44
|
+
"minimum": 1
|
|
45
|
+
},
|
|
46
|
+
"rows": {
|
|
47
|
+
"type": [
|
|
48
|
+
"integer",
|
|
49
|
+
"null"
|
|
50
|
+
],
|
|
51
|
+
"minimum": 1
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"x-backend": "DashPosition.pc / DashPosition.mobile"
|
|
55
|
+
},
|
|
56
|
+
"Section": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"additionalProperties": false,
|
|
59
|
+
"required": [
|
|
60
|
+
"title",
|
|
61
|
+
"source_type",
|
|
62
|
+
"url"
|
|
63
|
+
],
|
|
64
|
+
"properties": {
|
|
65
|
+
"title": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"minLength": 1,
|
|
68
|
+
"sectionTitleShapeDescription": "组件标题(渲染在组件头部)。",
|
|
69
|
+
"x-backend": "组件标题(DashChartInfo.title / gridConfig.gridTitle 等)"
|
|
70
|
+
},
|
|
71
|
+
"source_type": {
|
|
72
|
+
"const": "link",
|
|
73
|
+
"sourceTypeConstDescription": "组件类型固定为 link(链接);后端 type 整数见 x-backend。",
|
|
74
|
+
"x-backend": "DashComponentInfo.type(link)"
|
|
75
|
+
},
|
|
76
|
+
"role": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"roleShapeDescription": "组件角色标注(编排辅助,如 metric=指标卡;影响布局预设的排布与行高)。别名 zone/section_role。"
|
|
79
|
+
},
|
|
80
|
+
"position": {
|
|
81
|
+
"$ref": "#/$defs/Position"
|
|
82
|
+
},
|
|
83
|
+
"style_config": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"styleConfigSectionDescription": "组件级样式(受控键集;键白名单以 ws40013 dataset 实测形态校准,未经校准的键会被拒绝)。别名 dash_style_config/dashStyleConfigBO。",
|
|
86
|
+
"x-backend": "DashComponentInfo.dashStyleConfigBO(DashStyleConfigBO)"
|
|
87
|
+
},
|
|
88
|
+
"url": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"maxLength": 500,
|
|
91
|
+
"urlPropShapeDescription": "链接地址(上限 500)。",
|
|
92
|
+
"x-backend": "ComponentLinkConfig.linkUrl"
|
|
93
|
+
},
|
|
94
|
+
"login_auth": {
|
|
95
|
+
"type": "boolean",
|
|
96
|
+
"default": false,
|
|
97
|
+
"loginAuthPropShapeDescription": "链接是否需要登录鉴权。别名 beingLoginAuth。",
|
|
98
|
+
"x-backend": "ComponentLinkConfig.beingLoginAuth"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"$ref": "#/$defs/Section",
|
|
104
|
+
"x-qingflow-detail-query": {
|
|
105
|
+
"currentKind": "link",
|
|
106
|
+
"tool": "portal_schema",
|
|
107
|
+
"cli": "qingflow builder portal schema --schema-kind link",
|
|
108
|
+
"argument": "schema_kind",
|
|
109
|
+
"detailQueryDescription": "本文件是 链接组件的自包含专项 Schema(内联全部引用定义,可独立交给 JSON Schema 校验器)。chart/view/grid/filter/text/link/carousel/task/favourite 各组件专项 Schema分别经 qingflow builder portal schema --schema-kind <类型> 获取。整门户声明用 qingflow builder portal schema --schema-kind summary|complete 获取;回读既有门户用 qingflow builder portal get --dash-key K --schema-kind complete。",
|
|
110
|
+
"readSources": {
|
|
111
|
+
"chartIds": "已有图表 id 用 chart 面读取;内联创建直接在 chart 键声明。",
|
|
112
|
+
"viewKeys": "视图唯一键用 qingflow builder views get --app-key APP 回读。"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"examples": [
|
|
116
|
+
{
|
|
117
|
+
"title": "帮助中心",
|
|
118
|
+
"source_type": "link",
|
|
119
|
+
"position": {
|
|
120
|
+
"pc": {
|
|
121
|
+
"x": 0,
|
|
122
|
+
"y": 30,
|
|
123
|
+
"cols": 24,
|
|
124
|
+
"rows": 4
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"url": "https://help.example.com",
|
|
128
|
+
"login_auth": false
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://qingflow.com/schemas/builder/portals/v1alpha1/components/task.json",
|
|
4
|
+
"title": "Qingflow Builder Portals Section · task (v1alpha1)",
|
|
5
|
+
"portalTaskSectionDescription": "门户待办组件(task)的详细配置专项 Schema。获取命令:qingflow builder portal schema --schema-kind task(MCP: portal_schema(schema_kind=\"task\"))。本 Schema 校验 sections[] 中单个 task 区块(自包含,可直接交给 JSON Schema 校验器);后端 DashComponentInfo.type=8。整门户声明走 summary/complete 档。",
|
|
6
|
+
"$defs": {
|
|
7
|
+
"Position": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"positionShapeDescription": "网格位置。PC 是 24 列网格(cols≤24),mobile 是 6 列网格(cols≤6);同行组件共享同一 y 与 rows,一行 cols 合计 24。mobile 可省略(缺省与 pc 同布局)。平铺别名 pc_x/pc_y/pc_w/pc_h、mobile_* 也接受(x/y 与 w/h/cols/rows 混写均认),归一为本结构。标准行高:指标卡 rows=5、BI 图表 rows=7、数据视图 rows=11、业务入口 rows=4。",
|
|
11
|
+
"properties": {
|
|
12
|
+
"pc": {
|
|
13
|
+
"$ref": "#/$defs/PositionDetail"
|
|
14
|
+
},
|
|
15
|
+
"mobile": {
|
|
16
|
+
"$ref": "#/$defs/PositionDetail"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"PositionDetail": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"positionDetailShapeDescription": "单端位置:x=列偏移、y=行偏移、cols=占宽、rows=占高。",
|
|
24
|
+
"properties": {
|
|
25
|
+
"x": {
|
|
26
|
+
"type": [
|
|
27
|
+
"integer",
|
|
28
|
+
"null"
|
|
29
|
+
],
|
|
30
|
+
"minimum": 0
|
|
31
|
+
},
|
|
32
|
+
"y": {
|
|
33
|
+
"type": [
|
|
34
|
+
"integer",
|
|
35
|
+
"null"
|
|
36
|
+
],
|
|
37
|
+
"minimum": 0
|
|
38
|
+
},
|
|
39
|
+
"cols": {
|
|
40
|
+
"type": [
|
|
41
|
+
"integer",
|
|
42
|
+
"null"
|
|
43
|
+
],
|
|
44
|
+
"minimum": 1
|
|
45
|
+
},
|
|
46
|
+
"rows": {
|
|
47
|
+
"type": [
|
|
48
|
+
"integer",
|
|
49
|
+
"null"
|
|
50
|
+
],
|
|
51
|
+
"minimum": 1
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"x-backend": "DashPosition.pc / DashPosition.mobile"
|
|
55
|
+
},
|
|
56
|
+
"TaskConfig": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"additionalProperties": false,
|
|
59
|
+
"taskConfigShapeDescription": "待办组件配置。",
|
|
60
|
+
"properties": {
|
|
61
|
+
"show_title": {
|
|
62
|
+
"type": "boolean",
|
|
63
|
+
"default": true,
|
|
64
|
+
"taskShowTitleShapeDescription": "是否显示待办标题。别名 beingShowTitle。",
|
|
65
|
+
"x-backend": "ComponentTaskConfig.beingShowTitle"
|
|
66
|
+
},
|
|
67
|
+
"hint": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"taskHintShapeDescription": "待办提示文案。别名 componentTaskHint。",
|
|
70
|
+
"x-backend": "ComponentTaskConfig.componentTaskHint"
|
|
71
|
+
},
|
|
72
|
+
"show_hint": {
|
|
73
|
+
"type": "boolean",
|
|
74
|
+
"taskShowHintShapeDescription": "是否显示提示。别名 beingShowHint。",
|
|
75
|
+
"x-backend": "ComponentTaskConfig.beingShowHint"
|
|
76
|
+
},
|
|
77
|
+
"enabled": {
|
|
78
|
+
"type": "boolean",
|
|
79
|
+
"taskEnabledShapeDescription": "待办组件是否启用。别名 beingUsing。",
|
|
80
|
+
"x-backend": "ComponentTaskConfig.beingUsing"
|
|
81
|
+
},
|
|
82
|
+
"tasks": {
|
|
83
|
+
"type": "array",
|
|
84
|
+
"taskItemsShapeDescription": "待办任务条目(ordinal 缺省按数组顺序)。省略或空列表时编译器按前端新建缺省补 4 类标准任务(待办/已超时/即将超时/催办,全部勾选)——后端写链要求 dashTaskConfigList 非空键。",
|
|
85
|
+
"items": {
|
|
86
|
+
"$ref": "#/$defs/TaskItem"
|
|
87
|
+
},
|
|
88
|
+
"x-backend": "ComponentTaskConfig.dashTaskConfigList(DashTaskConfig)"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"TaskItem": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"additionalProperties": false,
|
|
95
|
+
"required": [
|
|
96
|
+
"title"
|
|
97
|
+
],
|
|
98
|
+
"taskItemShapeDescription": "单个待办任务条目。",
|
|
99
|
+
"properties": {
|
|
100
|
+
"title": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"taskItemTitleShapeDescription": "任务标题。",
|
|
103
|
+
"x-backend": "DashTaskConfig.title"
|
|
104
|
+
},
|
|
105
|
+
"task_type": {
|
|
106
|
+
"type": "integer",
|
|
107
|
+
"taskItemTypeShapeDescription": "任务类型。别名 type。",
|
|
108
|
+
"x-backend": "DashTaskConfig.type"
|
|
109
|
+
},
|
|
110
|
+
"ordinal": {
|
|
111
|
+
"type": "integer",
|
|
112
|
+
"taskItemOrdinalShapeDescription": "排序序号。",
|
|
113
|
+
"x-backend": "DashTaskConfig.ordinal"
|
|
114
|
+
},
|
|
115
|
+
"checked": {
|
|
116
|
+
"type": "boolean",
|
|
117
|
+
"default": false,
|
|
118
|
+
"taskItemCheckedShapeDescription": "是否默认勾选。别名 beingCheck。",
|
|
119
|
+
"x-backend": "DashTaskConfig.beingCheck"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"Section": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"additionalProperties": false,
|
|
126
|
+
"required": [
|
|
127
|
+
"title",
|
|
128
|
+
"source_type",
|
|
129
|
+
"task"
|
|
130
|
+
],
|
|
131
|
+
"properties": {
|
|
132
|
+
"title": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"minLength": 1,
|
|
135
|
+
"sectionTitleShapeDescription": "组件标题(渲染在组件头部)。",
|
|
136
|
+
"x-backend": "组件标题(DashChartInfo.title / gridConfig.gridTitle 等)"
|
|
137
|
+
},
|
|
138
|
+
"source_type": {
|
|
139
|
+
"const": "task",
|
|
140
|
+
"sourceTypeConstDescription": "组件类型固定为 task(待办);后端 type 整数见 x-backend。",
|
|
141
|
+
"x-backend": "DashComponentInfo.type(task)"
|
|
142
|
+
},
|
|
143
|
+
"role": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"roleShapeDescription": "组件角色标注(编排辅助,如 metric=指标卡;影响布局预设的排布与行高)。别名 zone/section_role。"
|
|
146
|
+
},
|
|
147
|
+
"position": {
|
|
148
|
+
"$ref": "#/$defs/Position"
|
|
149
|
+
},
|
|
150
|
+
"style_config": {
|
|
151
|
+
"type": "object",
|
|
152
|
+
"styleConfigSectionDescription": "组件级样式(受控键集;键白名单以 ws40013 dataset 实测形态校准,未经校准的键会被拒绝)。别名 dash_style_config/dashStyleConfigBO。",
|
|
153
|
+
"x-backend": "DashComponentInfo.dashStyleConfigBO(DashStyleConfigBO)"
|
|
154
|
+
},
|
|
155
|
+
"task": {
|
|
156
|
+
"$ref": "#/$defs/TaskConfig",
|
|
157
|
+
"taskPropDescription": "待办配置(必填)。"
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"$ref": "#/$defs/Section",
|
|
163
|
+
"x-qingflow-detail-query": {
|
|
164
|
+
"currentKind": "task",
|
|
165
|
+
"tool": "portal_schema",
|
|
166
|
+
"cli": "qingflow builder portal schema --schema-kind task",
|
|
167
|
+
"argument": "schema_kind",
|
|
168
|
+
"detailQueryDescription": "本文件是 待办组件的自包含专项 Schema(内联全部引用定义,可独立交给 JSON Schema 校验器)。chart/view/grid/filter/text/link/carousel/task/favourite 各组件专项 Schema分别经 qingflow builder portal schema --schema-kind <类型> 获取。整门户声明用 qingflow builder portal schema --schema-kind summary|complete 获取;回读既有门户用 qingflow builder portal get --dash-key K --schema-kind complete。",
|
|
169
|
+
"readSources": {
|
|
170
|
+
"chartIds": "已有图表 id 用 chart 面读取;内联创建直接在 chart 键声明。",
|
|
171
|
+
"viewKeys": "视图唯一键用 qingflow builder views get --app-key APP 回读。"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"examples": [
|
|
175
|
+
{
|
|
176
|
+
"title": "我的待办",
|
|
177
|
+
"source_type": "task",
|
|
178
|
+
"position": {
|
|
179
|
+
"pc": {
|
|
180
|
+
"x": 0,
|
|
181
|
+
"y": 11,
|
|
182
|
+
"cols": 12,
|
|
183
|
+
"rows": 8
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"task": {
|
|
187
|
+
"show_title": true,
|
|
188
|
+
"enabled": true,
|
|
189
|
+
"tasks": [
|
|
190
|
+
{
|
|
191
|
+
"title": "待处理工单",
|
|
192
|
+
"task_type": 1,
|
|
193
|
+
"checked": true
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
}
|