@opsnow-mcp/opsnow-mcp-common-ui-server 1.0.28 → 1.0.30
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/build/components/all-component-tools.js +45 -0
- package/build/components/examples/opsnow-common-select-examples-data.js +21 -0
- package/build/components/opsnow-common-calendar.js +11 -12
- package/build/components/opsnow-common-chart.js +433 -17
- package/build/components/opsnow-common-coach-mark.js +9 -2
- package/build/components/opsnow-common-data-status.js +0 -5
- package/build/components/opsnow-common-examples.js +113 -29
- package/build/components/opsnow-common-file-upload.js +1 -0
- package/build/components/opsnow-common-forms.js +82 -3
- package/build/components/opsnow-common-icons.js +2 -5
- package/build/components/opsnow-common-notification.js +6 -4
- package/build/components/opsnow-common-pagination.js +9 -6
- package/build/components/opsnow-common-popup.js +30 -9
- package/build/components/opsnow-common-select.js +23 -7
- package/build/components/opsnow-common-spec-tools.js +166 -0
- package/build/components/opsnow-common-stepper.js +5 -8
- package/build/components/opsnow-common-toast-popup.js +29 -17
- package/build/components/opsnow-common-tooltip.js +0 -6
- package/build/components/opsnow-common-typography.js +6 -0
- package/build/components/opsnow-common-validate-props.js +0 -0
- package/build/index.js +33 -51
- package/build/validate-props-cli.js +71 -0
- package/package.json +5 -2
|
@@ -354,7 +354,45 @@ const XyMultiChartSchema = z.object({
|
|
|
354
354
|
langCd: z.string().optional().describe("언어 코드"),
|
|
355
355
|
onChartClick: z.string().optional().describe("차트 클릭 이벤트"),
|
|
356
356
|
onSeriesPointerOver: z.string().optional().describe("시리즈 포인터 오버 이벤트"),
|
|
357
|
-
|
|
357
|
+
onSeriesPointerOut: z.string().optional().describe("시리즈에서 포인터가 벗어날 때 호출되는 콜백 함수(stringified). onSeriesPointerOver와 짝으로 사용합니다."),
|
|
358
|
+
chartTooltipDetailText: z.string().optional().describe("툴팁에서 보여주는 상세 텍스트"),
|
|
359
|
+
// 샘플(스켈레톤) 차트 설정 — chartProps 없이 chartSample* 계열만 전달하면 실데이터 로딩 전 미리보기(스켈레톤) 차트가 렌더링됩니다.
|
|
360
|
+
chartSampleProps: z.object({}).optional().describe("샘플(스켈레톤) 차트 속성 (object, 기본값 없음). chartProps와 동일한 구조의 JSON입니다. chartProps 없이 chartSampleProps만 전달하면 차트가 샘플(미리보기/스켈레톤) 모드로 렌더링됩니다."),
|
|
361
|
+
chartSampleCategory: z.array(z.object({
|
|
362
|
+
name: z.string(),
|
|
363
|
+
categories: z.array(z.string())
|
|
364
|
+
})).optional().describe("샘플 차트 카테고리 설정 (object[], 기본값 없음). chartCategory와 동일한 구조({ name, categories[] })이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
365
|
+
chartSampleData: z.array(z.record(z.any())).optional().describe("샘플 차트에 표시할 데이터 배열 (object[], 기본값 없음). chartData와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
366
|
+
chartSampleCustomCategory: z.array(z.object({
|
|
367
|
+
name: z.string(),
|
|
368
|
+
color: z.string().optional(),
|
|
369
|
+
pattern: z.string().optional(),
|
|
370
|
+
strokeDasharray: z.array(z.number()).optional()
|
|
371
|
+
})).optional().describe("샘플 차트의 사용자 정의 카테고리 스타일 (object[], 기본값 없음). chartCustomCategory와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
372
|
+
chartSampleLocaleProps: z.array(z.object({
|
|
373
|
+
name: z.string(),
|
|
374
|
+
locale: z.string()
|
|
375
|
+
})).optional().describe("샘플 차트에 적용할 다국어 목록 (object[], 기본값 없음). chartLocaleProps와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
376
|
+
chartSampleCategoryLocaleMapping: z.array(z.object({
|
|
377
|
+
name: z.string(),
|
|
378
|
+
value: z.string()
|
|
379
|
+
})).optional().describe("샘플 차트 카테고리 다국어 매핑 (object[], 기본값 없음). chartCategoryLocaleMapping과 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
380
|
+
chartSampleLocaleData: z.array(z.object({
|
|
381
|
+
name: z.string(),
|
|
382
|
+
value: z.string(),
|
|
383
|
+
locale: z.string()
|
|
384
|
+
})).optional().describe("샘플 차트 데이터 다국어 적용 목록 (object[], 기본값 없음). chartLocaleData와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
385
|
+
chartCategoryColorByVendor: z.array(z.object({
|
|
386
|
+
vendor: z.string().describe("벤더명: 'aws' | 'azure' | 'gcp' | 'oci' | 'ncloud' | 'tencent' | 'basic' | 'mix'"),
|
|
387
|
+
categories: z.array(z.string()).describe("해당 벤더 색상 팔레트를 적용할 카테고리 이름 배열")
|
|
388
|
+
})).optional().describe(`벤더별 색상 팔레트를 카테고리에 적용합니다 (object[], 기본값 없음). 각 항목의 vendor 팔레트에서 categories 개수만큼 색상을 순서대로 할당합니다. 지정 시 useOpsnowUs보다 우선합니다.
|
|
389
|
+
예시)
|
|
390
|
+
[
|
|
391
|
+
{ "vendor": "aws", "categories": ["ec2_cost", "s3_cost"] },
|
|
392
|
+
{ "vendor": "azure", "categories": ["vm_cost"] }
|
|
393
|
+
]`),
|
|
394
|
+
useOpsnowUs: z.boolean().optional().describe("OpsNow US 기본(basic) 색상 팔레트 사용 여부 (boolean, 기본값 true). false면 mix 팔레트를 사용합니다. chartCategoryColorByVendor가 지정되면 그 설정이 우선합니다."),
|
|
395
|
+
chartNoRowsText: z.string().optional().describe("차트 데이터가 없을 때 표시할 텍스트 (string, 기본값 없음)")
|
|
358
396
|
});
|
|
359
397
|
// opsnow-common-stack-chart
|
|
360
398
|
export const StackChartSchema = z.object({
|
|
@@ -627,7 +665,70 @@ export const StackChartSchema = z.object({
|
|
|
627
665
|
.describe("언어 코드"),
|
|
628
666
|
onChartClick: z.string()
|
|
629
667
|
.optional()
|
|
630
|
-
.describe('차트 클릭 시 호출되는 콜백 함수(stringified)')
|
|
668
|
+
.describe('차트 클릭 시 호출되는 콜백 함수(stringified)'),
|
|
669
|
+
onSeriesPointerOver: z.string()
|
|
670
|
+
.optional()
|
|
671
|
+
.describe('시리즈에 포인터가 올라갈 때 호출되는 콜백 함수(stringified). onSeriesPointerOut과 짝으로 사용합니다.'),
|
|
672
|
+
onSeriesPointerOut: z.string()
|
|
673
|
+
.optional()
|
|
674
|
+
.describe('시리즈에서 포인터가 벗어날 때 호출되는 콜백 함수(stringified). onSeriesPointerOver와 짝으로 사용합니다.'),
|
|
675
|
+
onTopNPopupDetailClick: z.string()
|
|
676
|
+
.optional()
|
|
677
|
+
.describe("TopN(others) 상세 팝업에서 'View Details' 버튼 클릭 시 호출되는 콜백 함수(stringified). chartProps.series.topNOthers 설정과 함께 사용합니다."),
|
|
678
|
+
// 샘플(스켈레톤) 차트 설정 — chartProps 없이 chartSample* 계열만 전달하면 실데이터 로딩 전 미리보기(스켈레톤) 차트가 렌더링됩니다.
|
|
679
|
+
chartSampleProps: z.object({})
|
|
680
|
+
.optional()
|
|
681
|
+
.describe("샘플(스켈레톤) 차트 속성 (object, 기본값 없음). chartProps와 동일한 구조의 JSON입니다. chartProps 없이 chartSampleProps만 전달하면 차트가 샘플(미리보기/스켈레톤) 모드로 렌더링됩니다."),
|
|
682
|
+
chartSampleCategory: z.array(z.string())
|
|
683
|
+
.optional()
|
|
684
|
+
.describe("샘플 차트의 카테고리(시리즈 이름) 배열 (string[], 기본값 없음). chartCategory와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다. 예) ['sample_01', 'sample_02']"),
|
|
685
|
+
chartSampleData: z.array(z.record(z.any()))
|
|
686
|
+
.optional()
|
|
687
|
+
.describe("샘플 차트에 표시할 데이터 배열 (object[], 기본값 없음). chartData와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
688
|
+
chartSampleCustomCategory: z.array(z.object({
|
|
689
|
+
name: z.string(),
|
|
690
|
+
color: z.string().optional(),
|
|
691
|
+
pattern: z.string().optional(),
|
|
692
|
+
strokeDasharray: z.array(z.number()).optional()
|
|
693
|
+
}))
|
|
694
|
+
.optional()
|
|
695
|
+
.describe("샘플 차트의 사용자 정의 카테고리 스타일 (object[], 기본값 없음). chartCustomCategory와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
696
|
+
chartSampleLocaleProps: z.array(z.object({
|
|
697
|
+
name: z.string(),
|
|
698
|
+
locale: z.string()
|
|
699
|
+
}))
|
|
700
|
+
.optional()
|
|
701
|
+
.describe("샘플 차트에 적용할 다국어 목록 (object[], 기본값 없음). chartLocaleProps와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
702
|
+
chartSampleCategoryLocaleMapping: z.array(z.object({
|
|
703
|
+
name: z.string(),
|
|
704
|
+
value: z.string()
|
|
705
|
+
}))
|
|
706
|
+
.optional()
|
|
707
|
+
.describe("샘플 차트 카테고리 다국어 매핑 (object[], 기본값 없음). chartCategoryLocaleMapping과 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
708
|
+
chartSampleLocaleData: z.array(z.object({
|
|
709
|
+
name: z.string(),
|
|
710
|
+
value: z.string(),
|
|
711
|
+
locale: z.string()
|
|
712
|
+
}))
|
|
713
|
+
.optional()
|
|
714
|
+
.describe("샘플 차트 데이터 다국어 적용 목록 (object[], 기본값 없음). chartLocaleData와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
715
|
+
chartCategoryColorByVendor: z.array(z.object({
|
|
716
|
+
vendor: z.string().describe("벤더명: 'aws' | 'azure' | 'gcp' | 'oci' | 'ncloud' | 'tencent' | 'basic' | 'mix'"),
|
|
717
|
+
categories: z.array(z.string()).describe("해당 벤더 색상 팔레트를 적용할 카테고리 이름 배열")
|
|
718
|
+
}))
|
|
719
|
+
.optional()
|
|
720
|
+
.describe(`벤더별 색상 팔레트를 카테고리에 적용합니다 (object[], 기본값 없음). 각 항목의 vendor 팔레트에서 categories 개수만큼 색상을 순서대로 할당합니다. 지정 시 useOpsnowUs보다 우선합니다.
|
|
721
|
+
예시)
|
|
722
|
+
[
|
|
723
|
+
{ "vendor": "aws", "categories": ["ec2_cost", "s3_cost"] },
|
|
724
|
+
{ "vendor": "azure", "categories": ["vm_cost"] }
|
|
725
|
+
]`),
|
|
726
|
+
useOpsnowUs: z.boolean()
|
|
727
|
+
.optional()
|
|
728
|
+
.describe("OpsNow US 기본(basic) 색상 팔레트 사용 여부 (boolean, 기본값 true). false면 mix 팔레트를 사용합니다. chartCategoryColorByVendor가 지정되면 그 설정이 우선합니다."),
|
|
729
|
+
chartNoRowsText: z.string()
|
|
730
|
+
.optional()
|
|
731
|
+
.describe("차트 데이터가 없을 때 표시할 텍스트 (string, 기본값 없음)")
|
|
631
732
|
});
|
|
632
733
|
// opsnow-common-bar-chart
|
|
633
734
|
export const BarChartSchema = z.object({
|
|
@@ -898,7 +999,64 @@ export const BarChartSchema = z.object({
|
|
|
898
999
|
.describe("언어 코드"),
|
|
899
1000
|
onChartClick: z.string()
|
|
900
1001
|
.optional()
|
|
901
|
-
.describe('차트 클릭 시 호출되는 콜백 함수(stringified)')
|
|
1002
|
+
.describe('차트 클릭 시 호출되는 콜백 함수(stringified)'),
|
|
1003
|
+
onTopNPopupDetailClick: z.string()
|
|
1004
|
+
.optional()
|
|
1005
|
+
.describe("TopN(others) 상세 팝업에서 'View Details' 버튼 클릭 시 호출되는 콜백 함수(stringified). chartProps.series.topNOthers 설정과 함께 사용합니다."),
|
|
1006
|
+
// 샘플(스켈레톤) 차트 설정 — chartProps 없이 chartSample* 계열만 전달하면 실데이터 로딩 전 미리보기(스켈레톤) 차트가 렌더링됩니다.
|
|
1007
|
+
chartSampleProps: z.object({})
|
|
1008
|
+
.optional()
|
|
1009
|
+
.describe("샘플(스켈레톤) 차트 속성 (object, 기본값 없음). chartProps와 동일한 구조의 JSON입니다. chartProps 없이 chartSampleProps만 전달하면 차트가 샘플(미리보기/스켈레톤) 모드로 렌더링됩니다."),
|
|
1010
|
+
chartSampleCategory: z.array(z.string())
|
|
1011
|
+
.optional()
|
|
1012
|
+
.describe("샘플 차트의 카테고리(시리즈 이름) 배열 (string[], 기본값 없음). chartCategory와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다. 예) ['sample_01', 'sample_02']"),
|
|
1013
|
+
chartSampleData: z.array(z.record(z.any()))
|
|
1014
|
+
.optional()
|
|
1015
|
+
.describe("샘플 차트에 표시할 데이터 배열 (object[], 기본값 없음). chartData와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
1016
|
+
chartSampleCustomCategory: z.array(z.object({
|
|
1017
|
+
name: z.string(),
|
|
1018
|
+
color: z.string().optional(),
|
|
1019
|
+
pattern: z.string().optional(),
|
|
1020
|
+
strokeDasharray: z.array(z.number()).optional()
|
|
1021
|
+
}))
|
|
1022
|
+
.optional()
|
|
1023
|
+
.describe("샘플 차트의 사용자 정의 카테고리 스타일 (object[], 기본값 없음). chartCustomCategory와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
1024
|
+
chartSampleLocaleProps: z.array(z.object({
|
|
1025
|
+
name: z.string(),
|
|
1026
|
+
locale: z.string()
|
|
1027
|
+
}))
|
|
1028
|
+
.optional()
|
|
1029
|
+
.describe("샘플 차트에 적용할 다국어 목록 (object[], 기본값 없음). chartLocaleProps와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
1030
|
+
chartSampleCategoryLocaleMapping: z.array(z.object({
|
|
1031
|
+
name: z.string(),
|
|
1032
|
+
value: z.string()
|
|
1033
|
+
}))
|
|
1034
|
+
.optional()
|
|
1035
|
+
.describe("샘플 차트 카테고리 다국어 매핑 (object[], 기본값 없음). chartCategoryLocaleMapping과 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
1036
|
+
chartSampleLocaleData: z.array(z.object({
|
|
1037
|
+
name: z.string(),
|
|
1038
|
+
value: z.string(),
|
|
1039
|
+
locale: z.string()
|
|
1040
|
+
}))
|
|
1041
|
+
.optional()
|
|
1042
|
+
.describe("샘플 차트 데이터 다국어 적용 목록 (object[], 기본값 없음). chartLocaleData와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
1043
|
+
chartCategoryColorByVendor: z.array(z.object({
|
|
1044
|
+
vendor: z.string().describe("벤더명: 'aws' | 'azure' | 'gcp' | 'oci' | 'ncloud' | 'tencent' | 'basic' | 'mix'"),
|
|
1045
|
+
categories: z.array(z.string()).describe("해당 벤더 색상 팔레트를 적용할 카테고리 이름 배열")
|
|
1046
|
+
}))
|
|
1047
|
+
.optional()
|
|
1048
|
+
.describe(`벤더별 색상 팔레트를 카테고리에 적용합니다 (object[], 기본값 없음). 각 항목의 vendor 팔레트에서 categories 개수만큼 색상을 순서대로 할당합니다. 지정 시 useOpsnowUs보다 우선합니다.
|
|
1049
|
+
예시)
|
|
1050
|
+
[
|
|
1051
|
+
{ "vendor": "aws", "categories": ["ec2_cost", "s3_cost"] },
|
|
1052
|
+
{ "vendor": "azure", "categories": ["vm_cost"] }
|
|
1053
|
+
]`),
|
|
1054
|
+
useOpsnowUs: z.boolean()
|
|
1055
|
+
.optional()
|
|
1056
|
+
.describe("OpsNow US 기본(basic) 색상 팔레트 사용 여부 (boolean, 기본값 true). false면 mix 팔레트를 사용합니다. chartCategoryColorByVendor가 지정되면 그 설정이 우선합니다."),
|
|
1057
|
+
chartNoRowsText: z.string()
|
|
1058
|
+
.optional()
|
|
1059
|
+
.describe("차트 데이터가 없을 때 표시할 텍스트 (string, 기본값 없음)")
|
|
902
1060
|
});
|
|
903
1061
|
// opsnow-common-line-chart
|
|
904
1062
|
export const LineChartSchema = z.object({
|
|
@@ -1156,10 +1314,64 @@ export const LineChartSchema = z.object({
|
|
|
1156
1314
|
.describe('툴팁에서 사용하는 사용자 정의 함수(stringified)'),
|
|
1157
1315
|
langCd: z.enum(['ko', 'en', 'ja', 'zh', 'ar'])
|
|
1158
1316
|
.optional()
|
|
1159
|
-
.describe("언어 코드"),
|
|
1317
|
+
.describe("언어 코드 ('ar' 지정 시 RTL 레이아웃 적용)"),
|
|
1160
1318
|
onChartClick: z.string()
|
|
1161
1319
|
.optional()
|
|
1162
|
-
.describe('차트 클릭 시 호출되는 콜백 함수(stringified)')
|
|
1320
|
+
.describe('차트 클릭 시 호출되는 콜백 함수(stringified)'),
|
|
1321
|
+
onTopNPopupDetailClick: z.string()
|
|
1322
|
+
.optional()
|
|
1323
|
+
.describe("TopN(others) 상세 팝업에서 'View Details' 버튼 클릭 시 호출되는 콜백 함수(stringified). chartProps.series.topNOthers 설정과 함께 사용합니다."),
|
|
1324
|
+
// 샘플(스켈레톤) 차트 설정 — chartProps 없이 chartSample* 계열만 전달하면 실데이터 로딩 전 미리보기(스켈레톤) 차트가 렌더링됩니다.
|
|
1325
|
+
chartSampleProps: z.object({})
|
|
1326
|
+
.optional()
|
|
1327
|
+
.describe("샘플(스켈레톤) 차트 속성 (object, 기본값 없음). chartProps와 동일한 구조의 JSON입니다. chartProps 없이 chartSampleProps만 전달하면 차트가 샘플(미리보기/스켈레톤) 모드로 렌더링됩니다."),
|
|
1328
|
+
chartSampleCategory: z.array(z.string())
|
|
1329
|
+
.optional()
|
|
1330
|
+
.describe("샘플 차트의 카테고리(시리즈 이름) 배열 (string[], 기본값 없음). chartCategory와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다. 예) ['sample_01', 'sample_02']"),
|
|
1331
|
+
chartSampleData: z.array(z.record(z.any()))
|
|
1332
|
+
.optional()
|
|
1333
|
+
.describe("샘플 차트에 표시할 데이터 배열 (object[], 기본값 없음). chartData와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
1334
|
+
chartSampleCustomCategory: z.array(z.object({
|
|
1335
|
+
name: z.string(),
|
|
1336
|
+
color: z.string().optional(),
|
|
1337
|
+
pattern: z.string().optional(),
|
|
1338
|
+
strokeDasharray: z.array(z.number()).optional()
|
|
1339
|
+
}))
|
|
1340
|
+
.optional()
|
|
1341
|
+
.describe("샘플 차트의 사용자 정의 카테고리 스타일 (object[], 기본값 없음). chartCustomCategory와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
1342
|
+
chartSampleLocaleProps: z.array(z.object({
|
|
1343
|
+
name: z.string(),
|
|
1344
|
+
locale: z.string()
|
|
1345
|
+
}))
|
|
1346
|
+
.optional()
|
|
1347
|
+
.describe("샘플 차트에 적용할 다국어 목록 (object[], 기본값 없음). chartLocaleProps와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
1348
|
+
chartSampleCategoryLocaleMapping: z.array(z.object({
|
|
1349
|
+
name: z.string(),
|
|
1350
|
+
value: z.string()
|
|
1351
|
+
}))
|
|
1352
|
+
.optional()
|
|
1353
|
+
.describe("샘플 차트 카테고리 다국어 매핑 (object[], 기본값 없음). chartCategoryLocaleMapping과 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
1354
|
+
chartSampleLocaleData: z.array(z.object({
|
|
1355
|
+
name: z.string(),
|
|
1356
|
+
value: z.string(),
|
|
1357
|
+
locale: z.string()
|
|
1358
|
+
}))
|
|
1359
|
+
.optional()
|
|
1360
|
+
.describe("샘플 차트 데이터 다국어 적용 목록 (object[], 기본값 없음). chartLocaleData와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
1361
|
+
chartCategoryColorByVendor: z.array(z.object({
|
|
1362
|
+
vendor: z.string().describe("벤더명: 'aws' | 'azure' | 'gcp' | 'oci' | 'ncloud' | 'tencent' | 'basic' | 'mix'"),
|
|
1363
|
+
categories: z.array(z.string()).describe("해당 벤더 색상 팔레트를 적용할 카테고리 이름 배열")
|
|
1364
|
+
}))
|
|
1365
|
+
.optional()
|
|
1366
|
+
.describe(`벤더별 색상 팔레트를 카테고리에 적용합니다 (object[], 기본값 없음). 각 항목의 vendor 팔레트에서 categories 개수만큼 색상을 순서대로 할당합니다. 지정 시 useOpsnowUs보다 우선합니다.
|
|
1367
|
+
예시)
|
|
1368
|
+
[
|
|
1369
|
+
{ "vendor": "aws", "categories": ["ec2_cost", "s3_cost"] },
|
|
1370
|
+
{ "vendor": "azure", "categories": ["vm_cost"] }
|
|
1371
|
+
]`),
|
|
1372
|
+
useOpsnowUs: z.boolean()
|
|
1373
|
+
.optional()
|
|
1374
|
+
.describe("OpsNow US 기본(basic) 색상 팔레트 사용 여부 (boolean, 기본값 true). false면 mix 팔레트를 사용합니다. chartCategoryColorByVendor가 지정되면 그 설정이 우선합니다.")
|
|
1163
1375
|
});
|
|
1164
1376
|
// opsnow-common-pie-chart
|
|
1165
1377
|
export const PieChartSchema = z.object({
|
|
@@ -1265,9 +1477,36 @@ export const PieChartSchema = z.object({
|
|
|
1265
1477
|
tooltipText: z.string().optional().describe("툴팁 텍스트, 파이 차트에서 사용")
|
|
1266
1478
|
}).describe('사용자 정의 카테고리 스타일 및 설정')).optional().describe("사용자 정의 카테고리"),
|
|
1267
1479
|
chartUserDefinedFunc: z.record(z.string()).optional().describe('툴팁에서 사용하는 사용자 정의 함수(stringified)'),
|
|
1268
|
-
langCd: z.enum(['ko', 'en', 'ja', 'zh', 'ar']).optional().describe("언어 코드"),
|
|
1269
1480
|
onChartClick: z.string().optional().describe('차트 클릭 시 호출되는 콜백 함수(stringified)'),
|
|
1270
|
-
onLegendClick: z.string().optional().describe('범례 클릭 시 호출되는 콜백 함수(stringified)')
|
|
1481
|
+
onLegendClick: z.string().optional().describe('범례 클릭 시 호출되는 콜백 함수(stringified)'),
|
|
1482
|
+
// 샘플(스켈레톤) 차트 설정 — chartProps 없이 chartSample* 계열만 전달하면 실데이터 로딩 전 미리보기(스켈레톤) 차트가 렌더링됩니다.
|
|
1483
|
+
chartSampleProps: z.object({}).optional().describe("샘플(스켈레톤) 차트 속성 (object, 기본값 없음). chartProps와 동일한 구조의 JSON입니다. chartProps 없이 chartSampleProps만 전달하면 차트가 샘플(미리보기/스켈레톤) 모드로 렌더링됩니다."),
|
|
1484
|
+
chartSampleData: z.array(z.record(z.any())).optional().describe("샘플 차트에 표시할 데이터 배열 (object[], 기본값 없음). chartData와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
1485
|
+
chartSampleCustomCategory: z.array(z.object({
|
|
1486
|
+
name: z.string(),
|
|
1487
|
+
color: z.string().optional(),
|
|
1488
|
+
pattern: z.string().optional(),
|
|
1489
|
+
tooltipText: z.string().optional()
|
|
1490
|
+
})).optional().describe("샘플 차트의 사용자 정의 카테고리 스타일 (object[], 기본값 없음). chartCustomCategory와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
1491
|
+
chartSampleLocaleProps: z.array(z.object({
|
|
1492
|
+
name: z.string(),
|
|
1493
|
+
locale: z.string()
|
|
1494
|
+
})).optional().describe("샘플 차트에 적용할 다국어 목록 (object[], 기본값 없음). chartLocaleProps와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
1495
|
+
chartSampleLocaleData: z.array(z.object({
|
|
1496
|
+
name: z.string(),
|
|
1497
|
+
value: z.string(),
|
|
1498
|
+
locale: z.string()
|
|
1499
|
+
})).optional().describe("샘플 차트 데이터 다국어 적용 목록 (object[], 기본값 없음). chartLocaleData와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
1500
|
+
chartCategoryColorByVendor: z.array(z.object({
|
|
1501
|
+
vendor: z.string().describe("벤더명: 'aws' | 'azure' | 'gcp' | 'oci' | 'ncloud' | 'tencent' | 'basic' | 'mix'"),
|
|
1502
|
+
categories: z.array(z.string()).describe("해당 벤더 색상 팔레트를 적용할 카테고리 이름 배열")
|
|
1503
|
+
})).optional().describe(`벤더별 색상 팔레트를 카테고리에 적용합니다 (object[], 기본값 없음). 각 항목의 vendor 팔레트에서 categories 개수만큼 색상을 순서대로 할당합니다. 지정 시 useOpsnowUs보다 우선합니다.
|
|
1504
|
+
예시)
|
|
1505
|
+
[
|
|
1506
|
+
{ "vendor": "aws", "categories": ["ec2_cost", "s3_cost"] },
|
|
1507
|
+
{ "vendor": "azure", "categories": ["vm_cost"] }
|
|
1508
|
+
]`),
|
|
1509
|
+
useOpsnowUs: z.boolean().optional().describe("OpsNow US 기본(basic) 색상 팔레트 사용 여부 (boolean, 기본값 true). false면 mix 팔레트를 사용합니다. chartCategoryColorByVendor가 지정되면 그 설정이 우선합니다.")
|
|
1271
1510
|
});
|
|
1272
1511
|
// opsnow-common-gauge-chart
|
|
1273
1512
|
export const GaugeChartSchema = z.object({
|
|
@@ -1337,6 +1576,28 @@ export const GaugeChartSchema = z.object({
|
|
|
1337
1576
|
}
|
|
1338
1577
|
`),
|
|
1339
1578
|
chartValue: z.number().describe("차트 값"),
|
|
1579
|
+
// 샘플(스켈레톤) 차트 설정 — chartProps 없이 chartSample* 계열만 전달하면 실데이터 로딩 전 미리보기(스켈레톤) 차트가 렌더링됩니다.
|
|
1580
|
+
chartSampleProps: z.object({}).optional().describe("샘플(스켈레톤) 차트 속성 (object, 기본값 없음). chartProps와 동일한 구조의 JSON입니다. chartProps 없이 chartSampleProps만 전달하면 차트가 샘플(미리보기/스켈레톤) 모드로 렌더링됩니다."),
|
|
1581
|
+
chartSampleValue: z.number().optional().describe("샘플(스켈레톤) 차트에 표시할 게이지 값 (number, 기본값 없음). chartValue와 동일한 의미이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
1582
|
+
chartLocaleProps: z.array(z.object({
|
|
1583
|
+
name: z.string(),
|
|
1584
|
+
locale: z.string()
|
|
1585
|
+
})).optional().describe(`차트에 적용할 다국어 목록입니다 (object[], 기본값 없음). {l.xxx} 형태로 chartProps에서 참조합니다.
|
|
1586
|
+
예시)
|
|
1587
|
+
[
|
|
1588
|
+
{
|
|
1589
|
+
'name': 'l.cost.test',
|
|
1590
|
+
'locale': t('cost.test')
|
|
1591
|
+
}
|
|
1592
|
+
]`),
|
|
1593
|
+
chartLocaleMessage: z.array(z.object({
|
|
1594
|
+
name: z.string().describe("차트에서 사용하는 필드의 값 전체 또는 일부"),
|
|
1595
|
+
locale: z.string().describe("치환할 다국어 텍스트")
|
|
1596
|
+
})).optional().describe(`차트 특정 메시지(라벨 등)에 다국어를 적용합니다 (object[], 기본값 없음).
|
|
1597
|
+
예시)
|
|
1598
|
+
[
|
|
1599
|
+
{ name: '사용량', locale: $t('usage') }
|
|
1600
|
+
]`),
|
|
1340
1601
|
});
|
|
1341
1602
|
// opsnow-common-heatmap-chart
|
|
1342
1603
|
export const HeatmapChartSchema = z.object({
|
|
@@ -1498,11 +1759,21 @@ export const HeatmapChartSchema = z.object({
|
|
|
1498
1759
|
{ "name": "day_0", "locale": "월요일 4/14" },
|
|
1499
1760
|
{ "name": "day_1", "locale": "화요일 4/15" }
|
|
1500
1761
|
]`),
|
|
1501
|
-
chartTooltipDetailText: z.string().optional().describe("툴팁 하단에 표시할 상세 안내 텍스트"),
|
|
1502
|
-
chartNoRowsText: z.string().optional().describe("데이터 없을 때 표시할 텍스트"),
|
|
1503
1762
|
langCd: z.enum(['ko', 'en', 'ja', 'zh', 'ar']).optional().describe("언어 코드"),
|
|
1504
1763
|
isDarkMode: z.boolean().optional().describe("다크 모드 활성화 여부"),
|
|
1505
|
-
onChartClick: z.string().optional().describe('셀 클릭 시 호출되는 콜백 함수(stringified). 클릭 시 { xField, yField, valueField, from: "heatmap" } 객체를 전달합니다.')
|
|
1764
|
+
onChartClick: z.string().optional().describe('셀 클릭 시 호출되는 콜백 함수(stringified). 클릭 시 { xField, yField, valueField, from: "heatmap" } 객체를 전달합니다.'),
|
|
1765
|
+
// 샘플(스켈레톤) 차트 설정 — chartProps 없이 chartSample* 계열만 전달하면 실데이터 로딩 전 미리보기(스켈레톤) 차트가 렌더링됩니다.
|
|
1766
|
+
chartSampleProps: z.object({}).optional().describe("샘플(스켈레톤) 차트 속성 (object, 기본값 없음). chartProps와 동일한 구조의 JSON입니다. chartProps 없이 chartSampleProps만 전달하면 차트가 샘플(미리보기/스켈레톤) 모드로 렌더링됩니다."),
|
|
1767
|
+
chartSampleData: z.array(z.record(z.any())).optional().describe("샘플 차트에 표시할 데이터 배열 (object[], 기본값 없음). chartData와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
1768
|
+
chartSampleLocaleProps: z.array(z.object({
|
|
1769
|
+
name: z.string(),
|
|
1770
|
+
locale: z.string()
|
|
1771
|
+
})).optional().describe("샘플 차트에 적용할 다국어 플레이스홀더 목록 (object[], 기본값 없음). chartLocaleProps와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
1772
|
+
chartSampleLocaleData: z.array(z.object({
|
|
1773
|
+
name: z.string(),
|
|
1774
|
+
value: z.string(),
|
|
1775
|
+
locale: z.string()
|
|
1776
|
+
})).optional().describe("샘플 차트 데이터 다국어 적용 목록 (object[], 기본값 없음). chartLocaleData와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다.")
|
|
1506
1777
|
});
|
|
1507
1778
|
// opsnow-common-bubble-chart
|
|
1508
1779
|
export const BubbleChartSchema = z.object({
|
|
@@ -1590,7 +1861,20 @@ export const BubbleChartSchema = z.object({
|
|
|
1590
1861
|
]`),
|
|
1591
1862
|
langCd: z.enum(['ko', 'en', 'ja', 'zh', 'ar']).optional().describe("언어 코드"),
|
|
1592
1863
|
onChartClick: z.string().optional().describe(`버블 클릭 시 호출되는 콜백 함수(stringified). 클릭한 데이터 항목 객체를 인자로 전달합니다.
|
|
1593
|
-
예시) "(data) => { console.log(data) }"`)
|
|
1864
|
+
예시) "(data) => { console.log(data) }"`),
|
|
1865
|
+
// 샘플(스켈레톤) 차트 설정 — chartProps 없이 chartSample* 계열만 전달하면 실데이터 로딩 전 미리보기(스켈레톤) 차트가 렌더링됩니다.
|
|
1866
|
+
chartSampleProps: z.object({}).optional().describe("샘플(스켈레톤) 차트 속성 (object, 기본값 없음). chartProps와 동일한 구조의 JSON입니다. chartProps 없이 chartSampleProps만 전달하면 차트가 샘플(미리보기/스켈레톤) 모드로 렌더링됩니다."),
|
|
1867
|
+
chartSampleData: z.array(z.record(z.any())).optional().describe("샘플 차트에 표시할 데이터 배열 (object[], 기본값 없음). chartData와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
1868
|
+
chartSampleLocaleProps: z.array(z.object({
|
|
1869
|
+
name: z.string(),
|
|
1870
|
+
locale: z.string()
|
|
1871
|
+
})).optional().describe("샘플 차트에 적용할 다국어 플레이스홀더 목록 (object[], 기본값 없음). chartLocaleProps와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
1872
|
+
chartSampleLocaleData: z.array(z.object({
|
|
1873
|
+
name: z.string(),
|
|
1874
|
+
value: z.string(),
|
|
1875
|
+
locale: z.string()
|
|
1876
|
+
})).optional().describe("샘플 차트 데이터 다국어 적용 목록 (object[], 기본값 없음). chartLocaleData와 동일한 구조이며 샘플(스켈레톤) 모드에서 사용됩니다."),
|
|
1877
|
+
isDarkMode: z.boolean().optional().describe("다크 모드 활성화 여부 (boolean, 기본값 없음 — 미지정 시 MUI 테마의 palette.mode를 따릅니다)")
|
|
1594
1878
|
});
|
|
1595
1879
|
// Chart 컴포넌트 함수 - 배열 반환
|
|
1596
1880
|
export function createChartComponent() {
|
|
@@ -1615,6 +1899,14 @@ export function createChartComponent() {
|
|
|
1615
1899
|
props.push(`chartProps={${args.chartProps}}`);
|
|
1616
1900
|
if (args.chartValue)
|
|
1617
1901
|
props.push(`chartValue={${args.chartValue}}`);
|
|
1902
|
+
if (args.chartSampleProps)
|
|
1903
|
+
props.push(`chartSampleProps={${args.chartSampleProps}}`);
|
|
1904
|
+
if (args.chartSampleValue !== undefined)
|
|
1905
|
+
props.push(`chartSampleValue={${args.chartSampleValue}}`);
|
|
1906
|
+
if (args.chartLocaleProps)
|
|
1907
|
+
props.push(`chartLocaleProps={${args.chartLocaleProps}}`);
|
|
1908
|
+
if (args.chartLocaleMessage)
|
|
1909
|
+
props.push(`chartLocaleMessage={${args.chartLocaleMessage}}`);
|
|
1618
1910
|
const code = `<OpsnowCommonGaugeChart ${props.join(' ')} />`;
|
|
1619
1911
|
return {
|
|
1620
1912
|
content: [
|
|
@@ -1655,6 +1947,22 @@ export function createChartComponent() {
|
|
|
1655
1947
|
props.push(`chartLocaleData={${args.chartLocaleData}}`);
|
|
1656
1948
|
if (args.chartCustomCategory)
|
|
1657
1949
|
props.push(`chartCustomCategory={${args.chartCustomCategory}}`);
|
|
1950
|
+
if (args.chartSampleProps)
|
|
1951
|
+
props.push(`chartSampleProps={${args.chartSampleProps}}`);
|
|
1952
|
+
if (args.chartSampleData)
|
|
1953
|
+
props.push(`chartSampleData={${args.chartSampleData}}`);
|
|
1954
|
+
if (args.chartSampleCustomCategory)
|
|
1955
|
+
props.push(`chartSampleCustomCategory={${args.chartSampleCustomCategory}}`);
|
|
1956
|
+
if (args.chartSampleLocaleProps)
|
|
1957
|
+
props.push(`chartSampleLocaleProps={${args.chartSampleLocaleProps}}`);
|
|
1958
|
+
if (args.chartSampleLocaleData)
|
|
1959
|
+
props.push(`chartSampleLocaleData={${args.chartSampleLocaleData}}`);
|
|
1960
|
+
if (args.chartCategoryColorByVendor)
|
|
1961
|
+
props.push(`chartCategoryColorByVendor={${args.chartCategoryColorByVendor}}`);
|
|
1962
|
+
if (args.useOpsnowUs !== undefined)
|
|
1963
|
+
props.push(`useOpsnowUs={${args.useOpsnowUs}}`);
|
|
1964
|
+
if (args.chartUserDefinedFunc)
|
|
1965
|
+
props.push(`chartUserDefinedFunc={${args.chartUserDefinedFunc}}`);
|
|
1658
1966
|
const code = `<OpsnowCommonPieChart ${props.join(' ')} />`;
|
|
1659
1967
|
return {
|
|
1660
1968
|
content: [
|
|
@@ -1698,8 +2006,6 @@ export function createChartComponent() {
|
|
|
1698
2006
|
props.push(`chartLocaleData={${args.chartLocaleData}}`);
|
|
1699
2007
|
if (args.chartCustomCategory)
|
|
1700
2008
|
props.push(`chartCustomCategory={${args.chartCustomCategory}}`);
|
|
1701
|
-
if (args.langCd)
|
|
1702
|
-
props.push(`langCd="${args.langCd}"`);
|
|
1703
2009
|
if (args.onChartClick)
|
|
1704
2010
|
props.push(`onChartClick={${args.onChartClick}}`);
|
|
1705
2011
|
if (args.chartTooltipDetailText)
|
|
@@ -1710,6 +2016,30 @@ export function createChartComponent() {
|
|
|
1710
2016
|
props.push(`chartUnfoldLegend="${args.chartUnfoldLegend}"`);
|
|
1711
2017
|
if (args.chartFoldLegend)
|
|
1712
2018
|
props.push(`chartFoldLegend="${args.chartFoldLegend}"`);
|
|
2019
|
+
if (args.chartSampleProps)
|
|
2020
|
+
props.push(`chartSampleProps={${args.chartSampleProps}}`);
|
|
2021
|
+
if (args.chartSampleCategory)
|
|
2022
|
+
props.push(`chartSampleCategory={${args.chartSampleCategory}}`);
|
|
2023
|
+
if (args.chartSampleData)
|
|
2024
|
+
props.push(`chartSampleData={${args.chartSampleData}}`);
|
|
2025
|
+
if (args.chartSampleCustomCategory)
|
|
2026
|
+
props.push(`chartSampleCustomCategory={${args.chartSampleCustomCategory}}`);
|
|
2027
|
+
if (args.chartSampleLocaleProps)
|
|
2028
|
+
props.push(`chartSampleLocaleProps={${args.chartSampleLocaleProps}}`);
|
|
2029
|
+
if (args.chartSampleCategoryLocaleMapping)
|
|
2030
|
+
props.push(`chartSampleCategoryLocaleMapping={${args.chartSampleCategoryLocaleMapping}}`);
|
|
2031
|
+
if (args.chartSampleLocaleData)
|
|
2032
|
+
props.push(`chartSampleLocaleData={${args.chartSampleLocaleData}}`);
|
|
2033
|
+
if (args.chartCategoryColorByVendor)
|
|
2034
|
+
props.push(`chartCategoryColorByVendor={${args.chartCategoryColorByVendor}}`);
|
|
2035
|
+
if (args.useOpsnowUs !== undefined)
|
|
2036
|
+
props.push(`useOpsnowUs={${args.useOpsnowUs}}`);
|
|
2037
|
+
if (args.onTopNPopupDetailClick)
|
|
2038
|
+
props.push(`onTopNPopupDetailClick={${args.onTopNPopupDetailClick}}`);
|
|
2039
|
+
if (args.chartUserDefinedFunc)
|
|
2040
|
+
props.push(`chartUserDefinedFunc={${args.chartUserDefinedFunc}}`);
|
|
2041
|
+
if (args.langCd)
|
|
2042
|
+
props.push(`langCd="${args.langCd}"`);
|
|
1713
2043
|
const code = `<OpsnowCommonLineChart ${props.join(' ')} />`;
|
|
1714
2044
|
return {
|
|
1715
2045
|
content: [
|
|
@@ -1770,6 +2100,28 @@ export function createChartComponent() {
|
|
|
1770
2100
|
props.push(`chartUnfoldLegend="${args.chartUnfoldLegend}"`);
|
|
1771
2101
|
if (args.chartFoldLegend)
|
|
1772
2102
|
props.push(`chartFoldLegend="${args.chartFoldLegend}"`);
|
|
2103
|
+
if (args.chartSampleProps)
|
|
2104
|
+
props.push(`chartSampleProps={${args.chartSampleProps}}`);
|
|
2105
|
+
if (args.chartSampleCategory)
|
|
2106
|
+
props.push(`chartSampleCategory={${args.chartSampleCategory}}`);
|
|
2107
|
+
if (args.chartSampleData)
|
|
2108
|
+
props.push(`chartSampleData={${args.chartSampleData}}`);
|
|
2109
|
+
if (args.chartSampleCustomCategory)
|
|
2110
|
+
props.push(`chartSampleCustomCategory={${args.chartSampleCustomCategory}}`);
|
|
2111
|
+
if (args.chartSampleLocaleProps)
|
|
2112
|
+
props.push(`chartSampleLocaleProps={${args.chartSampleLocaleProps}}`);
|
|
2113
|
+
if (args.chartSampleCategoryLocaleMapping)
|
|
2114
|
+
props.push(`chartSampleCategoryLocaleMapping={${args.chartSampleCategoryLocaleMapping}}`);
|
|
2115
|
+
if (args.chartSampleLocaleData)
|
|
2116
|
+
props.push(`chartSampleLocaleData={${args.chartSampleLocaleData}}`);
|
|
2117
|
+
if (args.chartCategoryColorByVendor)
|
|
2118
|
+
props.push(`chartCategoryColorByVendor={${args.chartCategoryColorByVendor}}`);
|
|
2119
|
+
if (args.useOpsnowUs !== undefined)
|
|
2120
|
+
props.push(`useOpsnowUs={${args.useOpsnowUs}}`);
|
|
2121
|
+
if (args.chartNoRowsText)
|
|
2122
|
+
props.push(`chartNoRowsText="${args.chartNoRowsText}"`);
|
|
2123
|
+
if (args.onTopNPopupDetailClick)
|
|
2124
|
+
props.push(`onTopNPopupDetailClick={${args.onTopNPopupDetailClick}}`);
|
|
1773
2125
|
const code = `<OpsnowCommonBarChart ${props.join(' ')} />`;
|
|
1774
2126
|
return {
|
|
1775
2127
|
content: [
|
|
@@ -1827,6 +2179,32 @@ export function createChartComponent() {
|
|
|
1827
2179
|
props.push(`chartUnfoldLegend="${args.chartUnfoldLegend}"`);
|
|
1828
2180
|
if (args.chartFoldLegend)
|
|
1829
2181
|
props.push(`chartFoldLegend="${args.chartFoldLegend}"`);
|
|
2182
|
+
if (args.onSeriesPointerOver)
|
|
2183
|
+
props.push(`onSeriesPointerOver={${args.onSeriesPointerOver}}`);
|
|
2184
|
+
if (args.onSeriesPointerOut)
|
|
2185
|
+
props.push(`onSeriesPointerOut={${args.onSeriesPointerOut}}`);
|
|
2186
|
+
if (args.chartSampleProps)
|
|
2187
|
+
props.push(`chartSampleProps={${args.chartSampleProps}}`);
|
|
2188
|
+
if (args.chartSampleCategory)
|
|
2189
|
+
props.push(`chartSampleCategory={${args.chartSampleCategory}}`);
|
|
2190
|
+
if (args.chartSampleData)
|
|
2191
|
+
props.push(`chartSampleData={${args.chartSampleData}}`);
|
|
2192
|
+
if (args.chartSampleCustomCategory)
|
|
2193
|
+
props.push(`chartSampleCustomCategory={${args.chartSampleCustomCategory}}`);
|
|
2194
|
+
if (args.chartSampleLocaleProps)
|
|
2195
|
+
props.push(`chartSampleLocaleProps={${args.chartSampleLocaleProps}}`);
|
|
2196
|
+
if (args.chartSampleCategoryLocaleMapping)
|
|
2197
|
+
props.push(`chartSampleCategoryLocaleMapping={${args.chartSampleCategoryLocaleMapping}}`);
|
|
2198
|
+
if (args.chartSampleLocaleData)
|
|
2199
|
+
props.push(`chartSampleLocaleData={${args.chartSampleLocaleData}}`);
|
|
2200
|
+
if (args.chartCategoryColorByVendor)
|
|
2201
|
+
props.push(`chartCategoryColorByVendor={${args.chartCategoryColorByVendor}}`);
|
|
2202
|
+
if (args.useOpsnowUs !== undefined)
|
|
2203
|
+
props.push(`useOpsnowUs={${args.useOpsnowUs}}`);
|
|
2204
|
+
if (args.chartNoRowsText)
|
|
2205
|
+
props.push(`chartNoRowsText="${args.chartNoRowsText}"`);
|
|
2206
|
+
if (args.onTopNPopupDetailClick)
|
|
2207
|
+
props.push(`onTopNPopupDetailClick={${args.onTopNPopupDetailClick}}`);
|
|
1830
2208
|
const code = `<OpsnowCommonStackChart ${props.join(' ')} />`;
|
|
1831
2209
|
return {
|
|
1832
2210
|
content: [
|
|
@@ -1883,6 +2261,30 @@ export function createChartComponent() {
|
|
|
1883
2261
|
props.push(`onChartClick={${args.onChartClick}}`);
|
|
1884
2262
|
if (args.onSeriesPointerOver)
|
|
1885
2263
|
props.push(`onSeriesPointerOver={${args.onSeriesPointerOver}}`);
|
|
2264
|
+
if (args.onSeriesPointerOut)
|
|
2265
|
+
props.push(`onSeriesPointerOut={${args.onSeriesPointerOut}}`);
|
|
2266
|
+
if (args.chartSampleProps)
|
|
2267
|
+
props.push(`chartSampleProps={${args.chartSampleProps}}`);
|
|
2268
|
+
if (args.chartSampleCategory)
|
|
2269
|
+
props.push(`chartSampleCategory={${args.chartSampleCategory}}`);
|
|
2270
|
+
if (args.chartSampleData)
|
|
2271
|
+
props.push(`chartSampleData={${args.chartSampleData}}`);
|
|
2272
|
+
if (args.chartSampleCustomCategory)
|
|
2273
|
+
props.push(`chartSampleCustomCategory={${args.chartSampleCustomCategory}}`);
|
|
2274
|
+
if (args.chartSampleLocaleProps)
|
|
2275
|
+
props.push(`chartSampleLocaleProps={${args.chartSampleLocaleProps}}`);
|
|
2276
|
+
if (args.chartSampleCategoryLocaleMapping)
|
|
2277
|
+
props.push(`chartSampleCategoryLocaleMapping={${args.chartSampleCategoryLocaleMapping}}`);
|
|
2278
|
+
if (args.chartSampleLocaleData)
|
|
2279
|
+
props.push(`chartSampleLocaleData={${args.chartSampleLocaleData}}`);
|
|
2280
|
+
if (args.chartCategoryColorByVendor)
|
|
2281
|
+
props.push(`chartCategoryColorByVendor={${args.chartCategoryColorByVendor}}`);
|
|
2282
|
+
if (args.useOpsnowUs !== undefined)
|
|
2283
|
+
props.push(`useOpsnowUs={${args.useOpsnowUs}}`);
|
|
2284
|
+
if (args.chartNoRowsText)
|
|
2285
|
+
props.push(`chartNoRowsText="${args.chartNoRowsText}"`);
|
|
2286
|
+
if (args.chartTooltipDetailText)
|
|
2287
|
+
props.push(`chartTooltipDetailText="${args.chartTooltipDetailText}"`);
|
|
1886
2288
|
const code = `<OpsnowCommonXyMultiChart ${props.join(' ')} />`;
|
|
1887
2289
|
return {
|
|
1888
2290
|
content: [
|
|
@@ -1926,16 +2328,20 @@ export function createChartComponent() {
|
|
|
1926
2328
|
props.push(`chartLocaleData={${args.chartLocaleData}}`);
|
|
1927
2329
|
if (args.chartLocaleMessage)
|
|
1928
2330
|
props.push(`chartLocaleMessage={${args.chartLocaleMessage}}`);
|
|
1929
|
-
if (args.chartTooltipDetailText)
|
|
1930
|
-
props.push(`chartTooltipDetailText="${args.chartTooltipDetailText}"`);
|
|
1931
|
-
if (args.chartNoRowsText)
|
|
1932
|
-
props.push(`chartNoRowsText="${args.chartNoRowsText}"`);
|
|
1933
2331
|
if (args.langCd)
|
|
1934
2332
|
props.push(`langCd="${args.langCd}"`);
|
|
1935
2333
|
if (args.isDarkMode !== undefined)
|
|
1936
2334
|
props.push(`isDarkMode={${args.isDarkMode}}`);
|
|
1937
2335
|
if (args.onChartClick)
|
|
1938
2336
|
props.push(`onChartClick={${args.onChartClick}}`);
|
|
2337
|
+
if (args.chartSampleProps)
|
|
2338
|
+
props.push(`chartSampleProps={${args.chartSampleProps}}`);
|
|
2339
|
+
if (args.chartSampleData)
|
|
2340
|
+
props.push(`chartSampleData={${args.chartSampleData}}`);
|
|
2341
|
+
if (args.chartSampleLocaleProps)
|
|
2342
|
+
props.push(`chartSampleLocaleProps={${args.chartSampleLocaleProps}}`);
|
|
2343
|
+
if (args.chartSampleLocaleData)
|
|
2344
|
+
props.push(`chartSampleLocaleData={${args.chartSampleLocaleData}}`);
|
|
1939
2345
|
const code = `<OpsnowCommonHeatmapChart ${props.join(' ')} />`;
|
|
1940
2346
|
return {
|
|
1941
2347
|
content: [
|
|
@@ -1983,6 +2389,16 @@ export function createChartComponent() {
|
|
|
1983
2389
|
props.push(`langCd="${args.langCd}"`);
|
|
1984
2390
|
if (args.onChartClick)
|
|
1985
2391
|
props.push(`onChartClick={${args.onChartClick}}`);
|
|
2392
|
+
if (args.chartSampleProps)
|
|
2393
|
+
props.push(`chartSampleProps={${args.chartSampleProps}}`);
|
|
2394
|
+
if (args.chartSampleData)
|
|
2395
|
+
props.push(`chartSampleData={${args.chartSampleData}}`);
|
|
2396
|
+
if (args.chartSampleLocaleProps)
|
|
2397
|
+
props.push(`chartSampleLocaleProps={${args.chartSampleLocaleProps}}`);
|
|
2398
|
+
if (args.chartSampleLocaleData)
|
|
2399
|
+
props.push(`chartSampleLocaleData={${args.chartSampleLocaleData}}`);
|
|
2400
|
+
if (args.isDarkMode !== undefined)
|
|
2401
|
+
props.push(`isDarkMode={${args.isDarkMode}}`);
|
|
1986
2402
|
const code = `<OpsnowCommonBubbleChart ${props.join(' ')} />`;
|
|
1987
2403
|
return {
|
|
1988
2404
|
content: [
|
|
@@ -6,8 +6,10 @@ export const CoachMarkSchema = z.object({
|
|
|
6
6
|
content: z.string().describe("가이드 말풍선 본문 - 문자열 또는 JSX 사용 가능 (여러 줄/굵은 글씨/링크 등 표현 시 JSX)"),
|
|
7
7
|
isJsxContent: z.boolean().optional().describe("content를 JSX로 렌더링할지 여부 - true면 content를 JSX 표현식으로 출력"),
|
|
8
8
|
placement: z.enum(["top", "bottom", "left", "right"]).optional().describe("말풍선 표시 위치 (top/bottom/left/right) - 공간이 부족하면 MUI가 자동으로 반대쪽으로 flip"),
|
|
9
|
-
|
|
9
|
+
defaultOpen: z.boolean().optional().describe("닫힌 기록이 없을 때 첫 노출 여부 (기본 true) - false면 처음부터 표시되지 않음"),
|
|
10
|
+
onClose: z.string().optional().describe("말풍선이 닫힐 때(X 또는 close 액션) 실행할 콜백 함수명"),
|
|
10
11
|
actionLabel: z.string().optional().describe("하단 우측 액션 버튼 라벨 - 지정 시 actions={(close) => <Button onClick={close}>라벨</Button>} 형태로 렌더링 (close는 '닫기+영구저장' 핸들러)"),
|
|
12
|
+
actions: z.string().optional().describe("말풍선 하단 우측에 표시할 액션 영역 JSX 코드 문자열 - ReactNode 또는 (close) => ReactNode 함수 표현식을 그대로 출력. actionLabel과 동시 지정 시 actions가 우선"),
|
|
11
13
|
});
|
|
12
14
|
// CoachMark 컴포넌트 함수 - 배열 반환
|
|
13
15
|
export function createCoachMarkComponent() {
|
|
@@ -36,9 +38,14 @@ export function createCoachMarkComponent() {
|
|
|
36
38
|
}
|
|
37
39
|
if (args.placement)
|
|
38
40
|
props.push(`placement="${args.placement}"`);
|
|
41
|
+
if (args.defaultOpen !== undefined)
|
|
42
|
+
props.push(`defaultOpen={${args.defaultOpen}}`);
|
|
39
43
|
if (args.onClose)
|
|
40
44
|
props.push(`onClose={${args.onClose}}`);
|
|
41
|
-
if (args.
|
|
45
|
+
if (args.actions) {
|
|
46
|
+
props.push(`actions={${args.actions}}`);
|
|
47
|
+
}
|
|
48
|
+
else if (args.actionLabel) {
|
|
42
49
|
props.push(`actions={(close) => (<Button size="small" variant="contained" onClick={close}>${args.actionLabel}</Button>)}`);
|
|
43
50
|
}
|
|
44
51
|
const code = `
|
|
@@ -2,10 +2,6 @@ import { z } from "zod";
|
|
|
2
2
|
import { IconNamesMap, generateIconDescription } from "./data/icon-names.js";
|
|
3
3
|
// DataStatus 컴포넌트 관련 스키마 정의
|
|
4
4
|
export const DataStatusSchema = z.object({
|
|
5
|
-
headline: z
|
|
6
|
-
.string()
|
|
7
|
-
.optional()
|
|
8
|
-
.describe("데이터 상태 아이콘 위에 크게 보이는 헤드라인 메시지"),
|
|
9
5
|
type: z
|
|
10
6
|
.enum(["loading", "noData", "noSearchResults", "withAction", "error"])
|
|
11
7
|
.describe("데이터 상태 및 화면에 노출 되어야하는 데이터 상태 타입"),
|
|
@@ -13,7 +9,6 @@ export const DataStatusSchema = z.object({
|
|
|
13
9
|
.string()
|
|
14
10
|
.optional()
|
|
15
11
|
.describe("데이터 상태 아이콘 아래에서 크게 보이는 제목 메시지"),
|
|
16
|
-
useMuiIcon: z.boolean().default(false).describe("MUI 아이콘 사용 여부"),
|
|
17
12
|
description: z
|
|
18
13
|
.string()
|
|
19
14
|
.optional()
|