@bimatrix-aud-platform/aud_mcp_server 1.1.23 → 1.1.24

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.
@@ -52,10 +52,19 @@ export function getControlInfo(filePath, filterName) {
52
52
  typeSet.add(type);
53
53
  }
54
54
  }
55
- // ChildElements 재귀 순회
56
- if (el.ChildElements && Array.isArray(el.ChildElements)) {
55
+ // ChildElements 재귀 순회 (Group)
56
+ if (type !== "Tab" && el.ChildElements && Array.isArray(el.ChildElements)) {
57
57
  walkElements(el.ChildElements, type === "Group" ? name : parentGroup);
58
58
  }
59
+ // Tab > TabItems > Controls 또는 ChildElements 재귀 순회
60
+ if (type === "Tab" && el.TabItems && Array.isArray(el.TabItems)) {
61
+ for (const tabPage of el.TabItems) {
62
+ const children = tabPage.Controls || tabPage.ChildElements;
63
+ if (children && Array.isArray(children)) {
64
+ walkElements(children, name);
65
+ }
66
+ }
67
+ }
59
68
  }
60
69
  }
61
70
  // Forms > Elements 순회
@@ -58,6 +58,8 @@ export function fixMtsd(filePath) {
58
58
  fixOlapMeasuresField(doc, fixes);
59
59
  // Rule 3: Enum/Range 값 범위 초과 보정
60
60
  fixEnumAndRangeValues(doc, datas, fixes);
61
+ // Rule 4: Tab > TabItems 내 ChildElements → Controls 노드 이름 보정
62
+ fixTabItemChildElements(doc, fixes);
61
63
  // Rule (disabled): DataSource Params에 Value 누락 보정
62
64
  //fixParamsMissingValue(datas, fixes);
63
65
  // Rule 4: DataSource Columns에 Type 누락 보정
@@ -460,6 +462,82 @@ function fixEnumAndRangeValues(doc, datas, fixes) {
460
462
  });
461
463
  }
462
464
  }
465
+ // ---- Rule 4: Tab > TabItems 내 ChildElements → Controls 보정 ----
466
+ function fixTabItemChildElements(doc, fixes) {
467
+ const forms = doc.Forms || [];
468
+ for (const form of forms) {
469
+ const elements = form?.Elements;
470
+ if (!elements || !Array.isArray(elements))
471
+ continue;
472
+ function walk(els, parentPath) {
473
+ for (const el of els) {
474
+ const path = parentPath
475
+ ? `${parentPath} > ${el.Type || "?"}(${el.Name || el.Id || "?"})`
476
+ : `${el.Type || "?"}(${el.Name || el.Id || "?"})`;
477
+ if (el.Type === "Tab") {
478
+ // Property 누락 시 기본값 생성
479
+ if (!el.Property) {
480
+ el.Property = {};
481
+ fixes.push(`[Rule4] ${path}.Property: 누락 → 기본값 생성`);
482
+ }
483
+ const prop = el.Property;
484
+ // TabButtonPosition 필수 — 누락 시 기본값, 범위 검증 (0:Top, 1:Bottom)
485
+ if (!("TabButtonPosition" in prop)) {
486
+ prop.TabButtonPosition = 0;
487
+ fixes.push(`[Rule4] ${path}.Property.TabButtonPosition: 누락 → 0`);
488
+ }
489
+ fixIntRange(prop, "TabButtonPosition", 0, 1, 0, `${path}.Property`, fixes);
490
+ if (!el.TabItems || !Array.isArray(el.TabItems)) {
491
+ el.TabItems = [];
492
+ fixes.push(`[Rule4] ${path}.TabItems: 누락 → 빈 배열 생성`);
493
+ }
494
+ for (let i = 0; i < el.TabItems.length; i++) {
495
+ const tabPage = el.TabItems[i];
496
+ const tiPath = `${path} > TabItem[${i}](${tabPage.Name || "?"})`;
497
+ // BaseProperties.Width 누락 시 기본값 생성
498
+ if (tabPage.BaseProperties) {
499
+ if (!tabPage.BaseProperties.Width) {
500
+ tabPage.BaseProperties.Width = { WidthSettingType: 0, WidthValue: 100 };
501
+ fixes.push(`[Rule4] ${tiPath}.BaseProperties.Width: 누락 → 기본값 {WidthSettingType:0(FitToLength), WidthValue:100}`);
502
+ }
503
+ else {
504
+ const w = tabPage.BaseProperties.Width;
505
+ if (!("WidthSettingType" in w)) {
506
+ w.WidthSettingType = 0;
507
+ fixes.push(`[Rule4] ${tiPath}.BaseProperties.Width.WidthSettingType: 누락 → 0(FitToLength)`);
508
+ }
509
+ if (!("WidthValue" in w)) {
510
+ w.WidthValue = 100;
511
+ fixes.push(`[Rule4] ${tiPath}.BaseProperties.Width.WidthValue: 누락 → 100`);
512
+ }
513
+ fixIntRange(w, "WidthSettingType", 0, 1, 0, `${tiPath}.BaseProperties.Width`, fixes);
514
+ }
515
+ // Visible 누락 시 기본값 true
516
+ if (!("Visible" in tabPage.BaseProperties)) {
517
+ tabPage.BaseProperties.Visible = true;
518
+ fixes.push(`[Rule4] ${tiPath}.BaseProperties.Visible: 누락 → true`);
519
+ }
520
+ }
521
+ if (tabPage.ChildElements && !tabPage.Controls) {
522
+ tabPage.Controls = tabPage.ChildElements;
523
+ delete tabPage.ChildElements;
524
+ fixes.push(`[Rule4] ${path} > TabItem[${i}](${tabPage.Name || "?"}): ChildElements → Controls 노드 이름 변경`);
525
+ }
526
+ // TabItem 내 자식 요소도 재귀 순회
527
+ if (tabPage.Controls && Array.isArray(tabPage.Controls)) {
528
+ walk(tabPage.Controls, `${path} > TabItem[${i}](${tabPage.Name || "?"})`);
529
+ }
530
+ }
531
+ }
532
+ // Group 등 ChildElements 재귀 순회
533
+ if (el.Type !== "Tab" && el.ChildElements && Array.isArray(el.ChildElements)) {
534
+ walk(el.ChildElements, path);
535
+ }
536
+ }
537
+ }
538
+ walk(elements, "");
539
+ }
540
+ }
463
541
  // ---- 유틸: Element 트리 순회 ----
464
542
  function walkElements(elements, callback, parentPath = "") {
465
543
  for (const el of elements) {
@@ -468,16 +546,17 @@ function walkElements(elements, callback, parentPath = "") {
468
546
  : `${el.Type || "?"}(${el.Name || el.Id || "?"})`;
469
547
  callback(el, path);
470
548
  // Group의 ChildElements 재귀 순회
471
- if (el.ChildElements && Array.isArray(el.ChildElements)) {
549
+ if (el.Type !== "Tab" && el.ChildElements && Array.isArray(el.ChildElements)) {
472
550
  walkElements(el.ChildElements, callback, path);
473
551
  }
474
- else if (el.Type === "Tab" && el.TabItems && Array.isArray(el.TabItems)) {
475
- // 탭이면 TabItems(탭 페이지) > Controls(자식 컨트롤) 재귀 순회
552
+ // Tab > TabItems > Controls 또는 ChildElements 재귀 순회
553
+ if (el.Type === "Tab" && el.TabItems && Array.isArray(el.TabItems)) {
476
554
  for (let i = 0; i < el.TabItems.length; i++) {
477
555
  const tabPage = el.TabItems[i];
478
556
  const tabPagePath = `${path} > TabItem[${i}](${tabPage.Name || "?"})`;
479
- if (tabPage.Controls && Array.isArray(tabPage.Controls)) {
480
- walkElements(tabPage.Controls, callback, tabPagePath);
557
+ const children = tabPage.Controls || tabPage.ChildElements;
558
+ if (children && Array.isArray(children)) {
559
+ walkElements(children, callback, tabPagePath);
481
560
  }
482
561
  }
483
562
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bimatrix-aud-platform/aud_mcp_server",
3
- "version": "1.1.23",
3
+ "version": "1.1.24",
4
4
  "description": "MCP Server for i-AUD MTSD document validation, generation, schema querying, control info extraction, and database operations",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -2692,9 +2692,9 @@ export interface ITabItemBaseProperties {
2692
2692
  /** 너비 값 (px) */
2693
2693
  WidthValue: number;
2694
2694
  };
2695
- /** 표시 여부 */
2695
+ /** 표시 여부 : 기본값 true */
2696
2696
  Visible: boolean;
2697
- /** 커서 타입 */
2697
+ /** 커서 타입 */
2698
2698
  Cursor: string;
2699
2699
  }
2700
2700
 
@@ -2747,31 +2747,54 @@ export interface ITabItem {
2747
2747
  }
2748
2748
 
2749
2749
  // ============================================
2750
- // Tab Element
2750
+ // Tab Property
2751
2751
  // ============================================
2752
2752
 
2753
2753
  /**
2754
- * 탭 컨테이너 컨트롤 인터페이스
2755
- * 여러 페이지로 컨트롤을 구분하여 표시하는 컨테이너입니다.
2754
+ * 탭 컨트롤 속성 인터페이스
2755
+ * @see 2.Sources/src/control/group/Tab/Tab.ts - ITabProperty, Serialize()
2756
2756
  */
2757
- export interface ITabElement extends IBaseElement {
2758
- Type: 'Tab';
2759
- /** 탭 버튼 위치 (enTabPositionType) */
2760
- TabButtonPosition?: number;
2757
+ export interface ITabProperty {
2758
+ /** 탭 버튼 위치 enTabPositionType (0:Top, 1:Bottom) */
2759
+ TabButtonPosition: number;
2761
2760
  /** 탭 버튼 높이 (px) */
2762
2761
  TabButtonHeight?: number;
2763
2762
  /** 활성 탭 스타일 */
2764
- ActiveStyle?: object;
2763
+ ActiveStyle?: ITabItemStyle;
2765
2764
  /** 비활성 탭 스타일 */
2766
- InactiveStyle?: object;
2765
+ InactiveStyle?: ITabItemStyle;
2767
2766
  /** 마우스 오버 시 스타일 */
2768
- MouseOverStyle?: object;
2767
+ MouseOverStyle?: ITabItemStyle;
2769
2768
  /** 마우스 다운 시 스타일 */
2770
- MouseDownStyle?: object;
2769
+ MouseDownStyle?: ITabItemStyle;
2770
+ /** 엑셀 내보내기 사용 여부 (기본값: true) */
2771
+ UseExcelExport?: boolean;
2772
+ /** HML 내보내기 사용 여부 (기본값: true) */
2773
+ UseHMLExport?: boolean;
2774
+ /** PPT 내보내기 사용 여부 (기본값: true) */
2775
+ UsePPTExport?: boolean;
2776
+ /** DOC 내보내기 사용 여부 (기본값: true) */
2777
+ UseDOCExport?: boolean;
2778
+ /** 디자인 메뉴 사용 여부 (기본값: true) */
2779
+ UseDesignMenu?: boolean;
2780
+ }
2781
+
2782
+ // ============================================
2783
+ // Tab Element
2784
+ // ============================================
2785
+
2786
+ /**
2787
+ * 탭 컨테이너 컨트롤 인터페이스
2788
+ * 여러 탭 페이지로 컨트롤을 구분하여 표시하는 컨테이너입니다.
2789
+ */
2790
+ export interface ITabElement extends IBaseElement {
2791
+ Type: 'Tab';
2792
+ /** 탭 속성 (버튼 위치, 스타일, 내보내기 설정 등) */
2793
+ Property: ITabProperty;
2771
2794
  /** 파일 내보내기(다운로드) 가능 여부 */
2772
2795
  DoExport?: boolean;
2773
2796
  /** 탭 아이템 배열 (각 탭 페이지와 자식 컨트롤) */
2774
- TabItems?: ITabItem[];
2797
+ TabItems: ITabItem[];
2775
2798
  }
2776
2799
 
2777
2800
  // ============================================
@@ -676,7 +676,7 @@
676
676
  "TabItemBaseProperties": {
677
677
  "type": "object",
678
678
  "description": "탭 아이템 기본 속성",
679
- "required": ["Name", "Text"],
679
+ "required": ["Name", "Text", "Width", "Visible"],
680
680
  "properties": {
681
681
  "Name": { "type": "string", "description": "탭 아이템 이름" },
682
682
  "Text": { "type": "string", "description": "탭 버튼에 표시되는 텍스트" },
@@ -684,6 +684,7 @@
684
684
  "Width": {
685
685
  "type": "object",
686
686
  "description": "탭 너비 설정",
687
+ "required": ["WidthSettingType", "WidthValue"],
687
688
  "properties": {
688
689
  "WidthSettingType": { "type": "integer", "description": "너비 설정 타입 (0: FitToLength, 1: Pixel)" },
689
690
  "WidthValue": { "type": "number", "description": "너비 값 (px)" }
@@ -729,16 +730,30 @@
729
730
  "EtcProperties": { "$ref": "#/$defs/TabItemEtcProperties", "description": "기타 속성 (다국어 코드)" }
730
731
  }
731
732
  },
733
+ "TabProperty": {
734
+ "type": "object",
735
+ "description": "탭 컨트롤 속성",
736
+ "required": ["TabButtonPosition"],
737
+ "properties": {
738
+ "TabButtonPosition": { "type": "integer", "description": "탭 버튼 위치 enTabPositionType (0:Top, 1:Bottom)" },
739
+ "TabButtonHeight": { "type": "number", "description": "탭 버튼 높이 (px)" },
740
+ "ActiveStyle": { "$ref": "#/$defs/TabItemStyle", "description": "활성 탭 스타일" },
741
+ "InactiveStyle": { "$ref": "#/$defs/TabItemStyle", "description": "비활성 탭 스타일" },
742
+ "MouseOverStyle": { "$ref": "#/$defs/TabItemStyle", "description": "마우스 오버 스타일" },
743
+ "MouseDownStyle": { "$ref": "#/$defs/TabItemStyle", "description": "마우스 다운 스타일" },
744
+ "UseExcelExport": { "type": "boolean", "description": "엑셀 내보내기 사용 여부" },
745
+ "UseHMLExport": { "type": "boolean", "description": "HML 내보내기 사용 여부" },
746
+ "UsePPTExport": { "type": "boolean", "description": "PPT 내보내기 사용 여부" },
747
+ "UseDOCExport": { "type": "boolean", "description": "DOC 내보내기 사용 여부" },
748
+ "UseDesignMenu": { "type": "boolean", "description": "디자인 메뉴 사용 여부" }
749
+ }
750
+ },
732
751
  "TabElement": {
733
752
  "type": "object",
734
753
  "description": "탭 컨테이너 컨트롤",
754
+ "required": ["Property", "TabItems"],
735
755
  "properties": {
736
- "TabButtonPosition": { "type": "integer", "description": "탭 버튼 위치 (enTabPositionType)" },
737
- "TabButtonHeight": { "type": "number", "description": "탭 버튼 높이" },
738
- "ActiveStyle": { "type": "object", "description": "활성 탭 스타일" },
739
- "InactiveStyle": { "type": "object", "description": "비활성 탭 스타일" },
740
- "MouseOverStyle": { "type": "object", "description": "마우스 오버 스타일" },
741
- "MouseDownStyle": { "type": "object", "description": "마우스 다운 스타일" },
756
+ "Property": { "$ref": "#/$defs/TabProperty", "description": "탭 속성 (버튼 위치, 스타일, 내보내기 설정 등)" },
742
757
  "DoExport": { "type": "boolean", "description": "내보내기 버튼 표시" },
743
758
  "TabItems": {
744
759
  "type": "array",
@@ -1098,7 +1113,7 @@
1098
1113
  "Formula2": { "type": "string", "description": "수식 2" },
1099
1114
  "RefFormula": { "type": "string", "description": "참조 수식" },
1100
1115
  "Width": { "type": "number", "description": "필드 너비" },
1101
- "Unit": { "type": "string", "description": "단위" },
1116
+ "Unit": { "type": ["string", "number"], "description": "단위" },
1102
1117
  "CreateType": { "type": "number", "description": "생성 유형 (0:Default, 1:Measures(특수필드로 다른 Measure필드의 집합, Files내 1개만 자동 생성됨), 2:DimensionGroup, 3:HierarchyGroup)" },
1103
1118
  "SortType": { "type": "number", "description": "정렬 유형 (0:None, 1:Asc, 2:Desc, 3:Custom, 4:MeasureAsc, 5:MeasureDesc)" },
1104
1119
  "MeasureSortField": { "type": "string", "description": "측정값 정렬 기준 필드" },
@@ -1119,13 +1134,13 @@
1119
1134
  "SummaryBaseFieldKey": { "type": "string", "description": "요약 기준 필드 키" },
1120
1135
  "TextAlignment": { "type": "number", "description": "텍스트 정렬" },
1121
1136
  "HeaderAlignment": { "type": "number", "description": "헤더 정렬" },
1122
- "InDimensions": { "type": "boolean", "description": "차원 내 포함" },
1137
+ "InDimensions": { "type": ["string", "boolean"], "description": "차원 내 포함" },
1123
1138
  "Visible": { "type": "boolean", "description": "표시 여부" },
1124
1139
  "Expanded": { "type": "boolean", "description": "확장 여부" },
1125
1140
  "MetaItemCode": { "type": "string", "description": "메타 항목 코드" },
1126
1141
  "MetaItemName": { "type": "string", "description": "메타 항목 이름" },
1127
- "MetaRollupType": { "type": "string", "description": "메타 롤업 유형" },
1128
- "MetaCalculatorField": { "type": "string", "description": "메타 계산 필드" },
1142
+ "MetaRollupType": { "type": ["string", "number"], "description": "메타 롤업 유형" },
1143
+ "MetaCalculatorField": { "type": ["string", "boolean"], "description": "메타 계산 필드" },
1129
1144
  "MetaSummaryTypeIsDistinct": { "type": "boolean", "description": "메타 Distinct 여부" },
1130
1145
  "EditMethod": { "type": "string", "description": "편집 방법" },
1131
1146
  "EditMethodRef": { "type": "string", "description": "편집 방법 참조" },
@@ -1277,7 +1292,7 @@
1277
1292
  "Style": {
1278
1293
  "type": "object",
1279
1294
  "description": "컨트롤 스타일",
1280
- "required": ["Type", "BoxStyle", "Background", "Border"],
1295
+ "required": ["Type"],
1281
1296
  "properties": {
1282
1297
  "Type": { "type": "integer", "description": "스타일 타입" },
1283
1298
  "BoxStyle": { "type": "string", "description": "박스 스타일 이름" },
@@ -1302,7 +1317,7 @@
1302
1317
  "Border": {
1303
1318
  "type": "object",
1304
1319
  "description": "테두리 스타일",
1305
- "required": ["CornerRadius", "LineType", "Thickness"],
1320
+ "required": [],
1306
1321
  "properties": {
1307
1322
  "Color": { "$ref": "#/$defs/Color" },
1308
1323
  "ColorR": { "type": "number", "minimum": 0, "maximum": 255 },
@@ -1380,7 +1395,7 @@
1380
1395
  "GridColumn": {
1381
1396
  "type": "object",
1382
1397
  "description": "그리드 컬럼",
1383
- "required": ["Name", "Caption", "Width", "Validator", "KeyType", "HeaderPosition"],
1398
+ "required": ["Name", "Caption", "Width"],
1384
1399
  "properties": {
1385
1400
  "Name": { "type": "string", "description": "컬럼명" },
1386
1401
  "Caption": { "type": "string", "description": "컬럼 표시명" },