feat(form-decompile,form-compile): GanttChart design-time Settings из ring-3 (Фаза 3 кластера Chart-Settings)

GanttChart Settings (<Settings xsi:type="d4p1:GanttChart">) = вложенный
<d4p1:chart> (полный Chart-блок) + gantt-специфика (points/series/timeScale/
drawEmpty/…) — ТОТ ЖЕ d4p1-неймспейс, что и Chart. Переиспользован генерик-движок
Chart как есть (рекурсивный захват/эмит).

Изменения: параметризован xsi:type Settings (выводится из типа реквизита:
d5p1:GanttChart → d4p1:GanttChart); elseif декомпилятора и guard точек/осей
расширены на d4p1:(Gantt)?Chart. Зеркало py (ctype-параметр).

Все 16 форм Ганта корпуса 8.3.24 — раундтрип БАЙТ-В-БАЙТ (0 diff, 0 ring3).
Кейс chart-gantt-settings (полная диаграмма Ганта из эталона) сертифицирован
загрузкой в 1С. Регресс 43/43 (ps1+py).

Кластер Chart-Settings закрыт (Planner + Chart + GanttChart). Остаток —
только редкие диаграммы с точками/осями (типизир. значения/d4p1-ML) → честный
fail-ring3.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-06-10 17:42:54 +03:00
co-authored by Claude Opus 4.8
parent 1333e09ff8
commit dd226697bf
14 changed files with 1076 additions and 20 deletions
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# form-compile v1.106 — Compile 1C managed form from JSON or object metadata
# form-compile v1.107 — Compile 1C managed form from JSON or object metadata
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
import argparse
import copy
@@ -2997,8 +2997,8 @@ def emit_chart_node(lines, name, val, ind):
lines.append(f'{ind}<d4p1:{name}>{esc_xml(str(val))}</d4p1:{name}>')
def emit_chart_settings(lines, chart, ind):
lines.append(f'{ind}<Settings xmlns:d4p1="{CHART_NS}" xsi:type="d4p1:Chart">')
def emit_chart_settings(lines, chart, ind, ctype='d4p1:Chart'):
lines.append(f'{ind}<Settings xmlns:d4p1="{CHART_NS}" xsi:type="{ctype}">')
for k in list(chart.keys()):
emit_chart_node(lines, k, chart[k], f'{ind}\t')
lines.append(f'{ind}</Settings>')
@@ -4774,9 +4774,10 @@ def emit_attributes(lines, attrs, indent, conditional_appearance=None):
# Planner design-time <Settings xsi:type="pl:Planner"> (встроенный конфиг планировщика).
if attr.get('planner') is not None:
emit_planner_settings(lines, attr['planner'], inner)
# Chart design-time <Settings xsi:type="d4p1:Chart"> (встроенный конфиг диаграммы).
# Chart/GanttChart design-time <Settings> (тип выводится из типа реквизита).
if attr.get('chart') is not None:
emit_chart_settings(lines, attr['chart'], inner)
ctype = 'd4p1:GanttChart' if 'GanttChart' in str(attr.get('type', '')) else 'd4p1:Chart'
emit_chart_settings(lines, attr['chart'], inner, ctype)
if attr.get('main') is True:
lines.append(f'{inner}<MainAttribute>true</MainAttribute>')