@qingflow-tech/qingflow-cli 1.1.61-beta.3 → 1.1.61-beta.5
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 +1 -1
- package/skills/qingflow-cli/SKILL.md +2 -0
- package/skills/qingflow-cli/reference/builder/30-schema-fields.md +13 -0
- package/skills/qingflow-cli/reference/builder/70-portal.md +37 -16
- package/skills/qingflow-cli/reference/data/README.md +38 -0
- 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 +164 -13
- 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/service.py +1104 -71
- package/src/qingflow_mcp/cli/commands/builder.py +114 -5
- package/src/qingflow_mcp/public_surface.py +2 -0
- package/src/qingflow_mcp/server_app_builder.py +32 -1
- 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 +110 -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,193 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://qingflow.com/schemas/builder/portals/v1alpha1/components/carousel.json",
|
|
4
|
+
"title": "Qingflow Builder Portals Section · carousel (v1alpha1)",
|
|
5
|
+
"portalCarouselSectionDescription": "门户轮播组件(carousel)的详细配置专项 Schema。获取命令:qingflow builder portal schema --schema-kind carousel(MCP: portal_schema(schema_kind=\"carousel\"))。本 Schema 校验 sections[] 中单个 carousel 区块(自包含,可直接交给 JSON Schema 校验器);后端 DashComponentInfo.type=3。整门户声明走 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_* 也接受,归一为本结构。标准行高:指标卡 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
|
+
"CarouselConfig": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"additionalProperties": false,
|
|
59
|
+
"required": [],
|
|
60
|
+
"carouselShapeDescription": "轮播组件配置:绑定一个应用的记录流,按标题/图片/链接字段轮播展示。",
|
|
61
|
+
"properties": {
|
|
62
|
+
"source_app_key": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"carouselSourceAppShapeDescription": "轮播数据源应用 key。 悬空轮播(源表已删,related_form_id NULL 存量形态)缺省合法:后端写链不写 relatedFormId,读面回空 sourceApp。",
|
|
65
|
+
"x-backend": "ComponentCarouselConfig.sourceApp(ComponentFormBaseInfo.appKey)"
|
|
66
|
+
},
|
|
67
|
+
"source_form_title": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"carouselSourceFormShapeDescription": "数据源应用名称(辅助校验,缺省按 app_key 解析)。",
|
|
70
|
+
"x-backend": "ComponentFormBaseInfo.formTitle"
|
|
71
|
+
},
|
|
72
|
+
"title_field": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"carouselTitleFieldShapeDescription": "标题字段(显示名)。",
|
|
75
|
+
"x-backend": "ComponentCarouselConfig.titleQue(ComponentQueBaseInfo)"
|
|
76
|
+
},
|
|
77
|
+
"image_field": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"carouselImageFieldShapeDescription": "图片字段(显示名,附件/图片类字段)。",
|
|
80
|
+
"x-backend": "ComponentCarouselConfig.imageQue"
|
|
81
|
+
},
|
|
82
|
+
"link_field": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"carouselLinkFieldShapeDescription": "链接字段(显示名,点击轮播项跳转)。",
|
|
85
|
+
"x-backend": "ComponentCarouselConfig.linkQue"
|
|
86
|
+
},
|
|
87
|
+
"jump_mode": {
|
|
88
|
+
"type": "integer",
|
|
89
|
+
"carouselJumpModeShapeDescription": "跳转方式。",
|
|
90
|
+
"x-backend": "ComponentCarouselConfig.jumpMode"
|
|
91
|
+
},
|
|
92
|
+
"scaling": {
|
|
93
|
+
"type": "boolean",
|
|
94
|
+
"carouselScalingShapeDescription": "图片是否缩放填充。别名 beingScaling。",
|
|
95
|
+
"x-backend": "ComponentCarouselConfig.beingScaling"
|
|
96
|
+
},
|
|
97
|
+
"show_latest_limit": {
|
|
98
|
+
"type": "integer",
|
|
99
|
+
"minimum": 1,
|
|
100
|
+
"carouselShowLatestShapeDescription": "只展示最新 N 条记录。",
|
|
101
|
+
"x-backend": "ComponentCarouselConfig.showLatestLimit"
|
|
102
|
+
},
|
|
103
|
+
"scroll_interval": {
|
|
104
|
+
"type": "integer",
|
|
105
|
+
"minimum": 1,
|
|
106
|
+
"carouselScrollIntervalShapeDescription": "轮播滚动间隔(秒)。",
|
|
107
|
+
"x-backend": "ComponentCarouselConfig.scrollInterval"
|
|
108
|
+
},
|
|
109
|
+
"filters": {
|
|
110
|
+
"type": "array",
|
|
111
|
+
"items": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"carouselFiltersShapeDescription": "数据源过滤条件(受控透传,MatchRule 组;规范键 dataset 校准后开放)。",
|
|
114
|
+
"x-backend": "ComponentCarouselConfig.filterConfig(List<List<MatchRule>>)"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"Section": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"additionalProperties": false,
|
|
122
|
+
"required": [
|
|
123
|
+
"title",
|
|
124
|
+
"source_type",
|
|
125
|
+
"carousel"
|
|
126
|
+
],
|
|
127
|
+
"properties": {
|
|
128
|
+
"title": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"minLength": 1,
|
|
131
|
+
"sectionTitleShapeDescription": "组件标题(渲染在组件头部)。",
|
|
132
|
+
"x-backend": "组件标题(DashChartInfo.title / gridConfig.gridTitle 等)"
|
|
133
|
+
},
|
|
134
|
+
"source_type": {
|
|
135
|
+
"const": "carousel",
|
|
136
|
+
"sourceTypeConstDescription": "组件类型固定为 carousel(轮播);后端 type 整数见 x-backend。",
|
|
137
|
+
"x-backend": "DashComponentInfo.type(carousel)"
|
|
138
|
+
},
|
|
139
|
+
"role": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"roleShapeDescription": "组件角色标注(编排辅助,如 metric=指标卡;影响布局预设的排布与行高)。别名 zone/section_role。"
|
|
142
|
+
},
|
|
143
|
+
"position": {
|
|
144
|
+
"$ref": "#/$defs/Position"
|
|
145
|
+
},
|
|
146
|
+
"style_config": {
|
|
147
|
+
"type": "object",
|
|
148
|
+
"styleConfigSectionDescription": "组件级样式(受控键集;键白名单以 ws40013 dataset 实测形态校准,未经校准的键会被拒绝)。别名 dash_style_config/dashStyleConfigBO。",
|
|
149
|
+
"x-backend": "DashComponentInfo.dashStyleConfigBO(DashStyleConfigBO)"
|
|
150
|
+
},
|
|
151
|
+
"carousel": {
|
|
152
|
+
"$ref": "#/$defs/CarouselConfig",
|
|
153
|
+
"carouselPropDescription": "轮播配置(必填)。"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"$ref": "#/$defs/Section",
|
|
159
|
+
"x-qingflow-detail-query": {
|
|
160
|
+
"currentKind": "carousel",
|
|
161
|
+
"tool": "portal_schema",
|
|
162
|
+
"cli": "qingflow builder portal schema --schema-kind carousel",
|
|
163
|
+
"argument": "schema_kind",
|
|
164
|
+
"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。",
|
|
165
|
+
"readSources": {
|
|
166
|
+
"chartIds": "已有图表 id 用 chart 面读取;内联创建直接在 chart 键声明。",
|
|
167
|
+
"viewKeys": "视图唯一键用 qingflow builder views get --app-key APP 回读。"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"examples": [
|
|
171
|
+
{
|
|
172
|
+
"title": "最新公告",
|
|
173
|
+
"source_type": "carousel",
|
|
174
|
+
"position": {
|
|
175
|
+
"pc": {
|
|
176
|
+
"x": 12,
|
|
177
|
+
"y": 4,
|
|
178
|
+
"cols": 12,
|
|
179
|
+
"rows": 7
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"carousel": {
|
|
183
|
+
"source_app_key": "APP_KEY_NOTICE",
|
|
184
|
+
"title_field": "公告标题",
|
|
185
|
+
"image_field": "封面图",
|
|
186
|
+
"link_field": "详情链接",
|
|
187
|
+
"show_latest_limit": 5,
|
|
188
|
+
"scroll_interval": 8,
|
|
189
|
+
"scaling": true
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
}
|