@josephyan/qingflow-cli 1.1.6 → 1.1.7
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 +2 -2
- package/package.json +1 -1
- package/pyproject.toml +1 -1
- package/src/qingflow_mcp/builder_facade/service.py +47 -1
package/README.md
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Install:
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npm install @josephyan/qingflow-cli@1.1.
|
|
6
|
+
npm install @josephyan/qingflow-cli@1.1.7
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
Run:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
npx -y -p @josephyan/qingflow-cli@1.1.
|
|
12
|
+
npx -y -p @josephyan/qingflow-cli@1.1.7 qingflow
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
Environment:
|
package/package.json
CHANGED
package/pyproject.toml
CHANGED
|
@@ -23264,6 +23264,15 @@ def _merge_view_summary_with_config(
|
|
|
23264
23264
|
question_entries_by_id=query_question_entries_by_id,
|
|
23265
23265
|
)
|
|
23266
23266
|
config_enriched = True
|
|
23267
|
+
if "viewgraphLimit" in config:
|
|
23268
|
+
field_lookup = _view_field_lookup_from_question_entries(
|
|
23269
|
+
[*question_entries, *canonical_question_entries]
|
|
23270
|
+
)
|
|
23271
|
+
summary["filters"] = _public_view_filter_groups_from_match_rules(
|
|
23272
|
+
config.get("viewgraphLimit"),
|
|
23273
|
+
current_fields_by_name=field_lookup,
|
|
23274
|
+
)
|
|
23275
|
+
config_enriched = True
|
|
23267
23276
|
if any(key in config for key in ("asosChartVisible", "asosChartConfig", "asosChartIdList", "limitType")):
|
|
23268
23277
|
summary["associated_resources_config"] = _extract_view_associated_resources_config(config)
|
|
23269
23278
|
config_enriched = True
|
|
@@ -23330,6 +23339,36 @@ def _extract_view_question_entries(questions: Any) -> list[dict[str, Any]]:
|
|
|
23330
23339
|
return entries
|
|
23331
23340
|
|
|
23332
23341
|
|
|
23342
|
+
def _view_field_lookup_from_question_entries(entries: list[dict[str, Any]]) -> dict[str, dict[str, Any]]:
|
|
23343
|
+
fields_by_name: dict[str, dict[str, Any]] = {}
|
|
23344
|
+
for entry in entries:
|
|
23345
|
+
if not isinstance(entry, dict):
|
|
23346
|
+
continue
|
|
23347
|
+
name = str(entry.get("name") or entry.get("title") or "").strip()
|
|
23348
|
+
que_id = _coerce_positive_int(entry.get("field_id") or entry.get("que_id") or entry.get("queId"))
|
|
23349
|
+
if not name or que_id is None:
|
|
23350
|
+
continue
|
|
23351
|
+
fields_by_name.setdefault(name, {"name": name, "que_id": que_id})
|
|
23352
|
+
return fields_by_name
|
|
23353
|
+
|
|
23354
|
+
|
|
23355
|
+
def _view_field_lookup_from_summary(view: dict[str, Any]) -> dict[str, dict[str, Any]]:
|
|
23356
|
+
entries = view.get("column_details")
|
|
23357
|
+
if isinstance(entries, list):
|
|
23358
|
+
return _view_field_lookup_from_question_entries([entry for entry in entries if isinstance(entry, dict)])
|
|
23359
|
+
fields_by_name: dict[str, dict[str, Any]] = {}
|
|
23360
|
+
names = view.get("columns")
|
|
23361
|
+
ids = view.get("display_column_ids") or view.get("configured_column_ids") or []
|
|
23362
|
+
if isinstance(names, list):
|
|
23363
|
+
for index, raw_name in enumerate(names):
|
|
23364
|
+
name = str(raw_name or "").strip()
|
|
23365
|
+
if not name:
|
|
23366
|
+
continue
|
|
23367
|
+
que_id = _coerce_positive_int(ids[index] if isinstance(ids, list) and index < len(ids) else None)
|
|
23368
|
+
fields_by_name.setdefault(name, {"name": name, "que_id": que_id})
|
|
23369
|
+
return fields_by_name
|
|
23370
|
+
|
|
23371
|
+
|
|
23333
23372
|
def _filter_public_view_display_entries(
|
|
23334
23373
|
entries: list[dict[str, Any]],
|
|
23335
23374
|
*,
|
|
@@ -24146,6 +24185,7 @@ def _custom_button_view_configs_from_view_summaries(views: list[dict[str, Any]])
|
|
|
24146
24185
|
raw_buttons = view.get("buttons")
|
|
24147
24186
|
if not isinstance(raw_buttons, list):
|
|
24148
24187
|
continue
|
|
24188
|
+
field_lookup = _view_field_lookup_from_summary(view)
|
|
24149
24189
|
buttons: list[dict[str, Any]] = []
|
|
24150
24190
|
for entry in raw_buttons:
|
|
24151
24191
|
if not isinstance(entry, dict):
|
|
@@ -24153,6 +24193,12 @@ def _custom_button_view_configs_from_view_summaries(views: list[dict[str, Any]])
|
|
|
24153
24193
|
if _normalize_view_button_type(entry.get("button_type")) != PublicViewButtonType.custom.value:
|
|
24154
24194
|
continue
|
|
24155
24195
|
placement = _public_view_button_placement(entry.get("config_type")) or entry.get("placement")
|
|
24196
|
+
raw_button_limit = deepcopy(entry.get("button_limit") or [])
|
|
24197
|
+
public_button_limit = (
|
|
24198
|
+
_public_view_filter_groups_from_match_rules(raw_button_limit, current_fields_by_name=field_lookup)
|
|
24199
|
+
if raw_button_limit
|
|
24200
|
+
else []
|
|
24201
|
+
)
|
|
24156
24202
|
button = _compact_dict(
|
|
24157
24203
|
{
|
|
24158
24204
|
"button_ref": _coerce_positive_int(entry.get("button_id")),
|
|
@@ -24160,7 +24206,7 @@ def _custom_button_view_configs_from_view_summaries(views: list[dict[str, Any]])
|
|
|
24160
24206
|
"button_text": entry.get("button_text"),
|
|
24161
24207
|
"placement": placement,
|
|
24162
24208
|
"primary": bool(entry.get("being_main", False)),
|
|
24163
|
-
"button_limit":
|
|
24209
|
+
"button_limit": public_button_limit,
|
|
24164
24210
|
"button_formula": entry.get("button_formula"),
|
|
24165
24211
|
"button_formula_type": _coerce_positive_int(entry.get("button_formula_type")),
|
|
24166
24212
|
"print_tpls": deepcopy(entry.get("print_tpls") or []),
|