@gadmin2n/schematics 0.0.72 → 0.0.74

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.
Files changed (173) hide show
  1. package/dist/index.d.ts +2 -0
  2. package/dist/index.js +2 -0
  3. package/dist/lib/application/files/gadmin2-game-angle-demo/config/prisma/job.prisma +62 -0
  4. package/dist/lib/application/files/gadmin2-game-angle-demo/config/prisma/system.prisma +0 -21
  5. package/dist/lib/application/files/gadmin2-game-angle-demo/config/prisma/workflow.prisma +171 -0
  6. package/dist/lib/application/files/gadmin2-game-angle-demo/config/ui/AgendaJob.ts +60 -0
  7. package/dist/lib/application/files/gadmin2-game-angle-demo/config/ui/Event.ts +1 -1
  8. package/dist/lib/application/files/gadmin2-game-angle-demo/config/ui/WorkflowEventOutbox.ts +62 -0
  9. package/dist/lib/application/files/gadmin2-game-angle-demo/config/ui/WorkflowNodeInstance.ts +62 -0
  10. package/dist/lib/application/files/gadmin2-game-angle-demo/config/ui/WorkflowNodeType.ts +62 -0
  11. package/dist/lib/application/files/gadmin2-game-angle-demo/server/.env +5 -0
  12. package/dist/lib/application/files/gadmin2-game-angle-demo/server/package.json +5 -4
  13. package/dist/lib/application/files/gadmin2-game-angle-demo/server/prisma.config.ts +14 -7
  14. package/dist/lib/application/files/gadmin2-game-angle-demo/server/seed/index.ts +4 -0
  15. package/dist/lib/application/files/gadmin2-game-angle-demo/server/seed/permissions.ts +49 -3
  16. package/dist/lib/application/files/gadmin2-game-angle-demo/server/seed/workflow-node-types.ts +746 -0
  17. package/dist/lib/application/files/gadmin2-game-angle-demo/server/seed/workflows.ts +786 -0
  18. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/agenda/agenda.controller.ts +6 -0
  19. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/agenda/agenda.service.ts +79 -0
  20. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/agendaJob/agendaJob.controller.spec.ts +20 -0
  21. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/agendaJob/agendaJob.controller.ts +145 -0
  22. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/agendaJob/agendaJob.module.ts +10 -0
  23. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/{canvas/canvas.service.spec.ts → agendaJob/agendaJob.service.spec.ts} +71 -65
  24. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/agendaJob/agendaJob.service.ts +83 -0
  25. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/index.ts +2 -1
  26. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/temporal.module.ts +9 -0
  27. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/temporal.service.ts +100 -0
  28. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-execution.dto.ts +19 -0
  29. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-export.dto.ts +43 -0
  30. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-export.service.ts +317 -0
  31. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-node-type.controller.ts +16 -0
  32. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-node-type.service.ts +13 -0
  33. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow.controller.ts +220 -0
  34. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow.dto.ts +82 -0
  35. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow.module.ts +16 -0
  36. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow.service.ts +505 -0
  37. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowEventOutbox/workflowEventOutbox.controller.spec.ts +22 -0
  38. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowEventOutbox/workflowEventOutbox.controller.ts +147 -0
  39. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowEventOutbox/workflowEventOutbox.module.ts +10 -0
  40. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowEventOutbox/workflowEventOutbox.service.spec.ts +356 -0
  41. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowEventOutbox/workflowEventOutbox.service.ts +110 -0
  42. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowNodeInstance/workflowNodeInstance.controller.spec.ts +22 -0
  43. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowNodeInstance/workflowNodeInstance.controller.ts +216 -0
  44. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowNodeInstance/workflowNodeInstance.module.ts +10 -0
  45. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowNodeInstance/workflowNodeInstance.service.spec.ts +356 -0
  46. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowNodeInstance/workflowNodeInstance.service.ts +168 -0
  47. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowNodeType/workflowNodeType.controller.spec.ts +22 -0
  48. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowNodeType/workflowNodeType.controller.ts +199 -0
  49. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowNodeType/workflowNodeType.module.ts +10 -0
  50. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowNodeType/workflowNodeType.service.spec.ts +348 -0
  51. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowNodeType/workflowNodeType.service.ts +106 -0
  52. package/dist/lib/application/files/gadmin2-game-angle-demo/server/yarn.lock +579 -1082
  53. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/README.md +278 -0
  54. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/config/development-sql.yaml +5 -0
  55. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/docker-compose.yml +25 -0
  56. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/package.json +13 -0
  57. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/sql/create-event-trigger.sql +87 -0
  58. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/.env +7 -0
  59. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/SANDBOX.md +122 -0
  60. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/package-lock.json +4285 -0
  61. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/package.json +28 -0
  62. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/src/__tests__/activities/code-execute.test.ts +44 -0
  63. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/src/__tests__/activities/http-request.test.ts +87 -0
  64. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/src/__tests__/helpers.test.ts +225 -0
  65. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/src/__tests__/node-type-consistency.test.ts +101 -0
  66. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/src/activities/code-execute.ts +51 -0
  67. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/src/activities/db-execute.ts +85 -0
  68. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/src/activities/db-query.ts +35 -0
  69. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/src/activities/http-request.ts +54 -0
  70. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/src/activities/index.ts +6 -0
  71. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/src/activities/reporting.ts +62 -0
  72. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/src/activities/send-notification.ts +47 -0
  73. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/src/config.ts +13 -0
  74. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/src/dsl/condition.ts +101 -0
  75. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/src/dsl/context.ts +58 -0
  76. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/src/dsl/graph.ts +184 -0
  77. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/src/dsl/helpers.ts +133 -0
  78. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/src/dsl/node-types.ts +57 -0
  79. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/src/dsl/types.ts +77 -0
  80. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/src/index.ts +36 -0
  81. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/src/outbox-poller.ts +226 -0
  82. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/src/workflows/dsl-workflow.ts +411 -0
  83. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/tsconfig.json +19 -0
  84. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/vitest.config.ts +8 -0
  85. package/dist/lib/application/files/gadmin2-game-angle-demo/temporal/worker/yarn.lock +1905 -0
  86. package/dist/lib/application/files/gadmin2-game-angle-demo/web/package-lock.json +17555 -0
  87. package/dist/lib/application/files/gadmin2-game-angle-demo/web/package.json +5 -2
  88. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/App.tsx +1 -0
  89. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/layout/sider.tsx +5 -1
  90. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/layout/title.tsx +1 -1
  91. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/config/routeRegistry.tsx +63 -0
  92. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/dev-shell/DevShell.tsx +91 -2
  93. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/helpers/list.tsx +48 -2
  94. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/helpers/show.tsx +43 -2
  95. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/locales/en/common.json +14 -9
  96. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/locales/zh_CN/common.json +14 -9
  97. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/agenda/index.tsx +309 -56
  98. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/agenda/show.tsx +1 -3
  99. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/agendaJob/create.tsx +108 -0
  100. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/agendaJob/edit.tsx +124 -0
  101. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/agendaJob/index.tsx +4 -0
  102. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/agendaJob/list.tsx +245 -0
  103. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/agendaJob/show.tsx +70 -0
  104. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/CanvasListPage.tsx +0 -1
  105. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/CanvasPage.tsx +160 -2
  106. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/CanvasToolbar.tsx +120 -148
  107. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/CodeFloatWindow.tsx +74 -181
  108. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/LivePreview.tsx +15 -13
  109. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/canvasConfigRegistry.tsx +2 -2
  110. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/canvasContextMenuRegistry.tsx +338 -3
  111. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/canvasDefaults.ts +18 -17
  112. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/components/BarChartDataSourceModal.tsx +10 -4
  113. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/components/LineChartDataSourceModal.tsx +10 -4
  114. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/components/{ChartViewerConfigModal.tsx → MultiChartConfigModal.tsx} +30 -18
  115. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/components/MultiChartDataSourceModal.tsx +427 -0
  116. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/components/NumCardDataSourceModal.tsx +10 -4
  117. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/components/PromptModal.tsx +6 -14
  118. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/components/RadarChartDataSourceModal.tsx +10 -4
  119. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/components/TableDataSourceModal.tsx +10 -4
  120. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/components/canvasModalProps.ts +24 -0
  121. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/demos.ts +45 -63
  122. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/CustomNode.tsx +99 -0
  123. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/ExportModal.tsx +87 -0
  124. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/FlowRenderer.tsx +322 -0
  125. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/ImportModal.tsx +175 -0
  126. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/NodeEditModal.tsx +60 -0
  127. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/NodePropertyPanel.tsx +1150 -0
  128. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/RunWorkflowModal.tsx +101 -0
  129. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/StatusCards.tsx +198 -0
  130. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/VersionPanel.tsx +81 -0
  131. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/editor.tsx +566 -0
  132. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/hooks/useWorkflowAgent.ts +224 -0
  133. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/index.tsx +524 -0
  134. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/instance-detail.tsx +343 -0
  135. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/instances.tsx +243 -0
  136. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/components/CreateNodeInstanceModal.tsx +363 -0
  137. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/components/DynamicConfigForm.tsx +154 -0
  138. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/components/NodeInstanceForm.tsx +176 -0
  139. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/create.tsx +77 -0
  140. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/edit.tsx +112 -0
  141. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/index.tsx +305 -0
  142. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/show.tsx +282 -0
  143. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/show.tsx +469 -0
  144. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/types.ts +92 -0
  145. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflowEventOutbox/create.tsx +111 -0
  146. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflowEventOutbox/edit.tsx +127 -0
  147. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflowEventOutbox/index.tsx +4 -0
  148. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflowEventOutbox/list.tsx +254 -0
  149. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflowEventOutbox/show.tsx +74 -0
  150. package/dist/lib/application/files/gadmin2-game-angle-demo/web/yarn.lock +1501 -1199
  151. package/package.json +1 -1
  152. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/app.controller.spec.ts +0 -22
  153. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/canvas/BarChart/index.tsx +0 -896
  154. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/canvas/ChartSwitcher/index.tsx +0 -219
  155. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/canvas/ChartViewer/index.tsx +0 -159
  156. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/canvas/Filter/index.tsx +0 -192
  157. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/canvas/LineChart/index.tsx +0 -1034
  158. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/canvas/NumCard/NumCard.module.css +0 -8
  159. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/canvas/NumCard/index.tsx +0 -509
  160. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/canvas/NumLineCard/index.tsx +0 -66
  161. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/canvas/PieChart/index.tsx +0 -552
  162. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/canvas/RadarChart/index.tsx +0 -263
  163. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/canvas/Section/index.tsx +0 -35
  164. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/canvas/Table/index.tsx +0 -207
  165. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/canvas/TreemapChart/index.tsx +0 -382
  166. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/canvas/WorldMap/index.tsx +0 -135
  167. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/canvas/chart-constants.ts +0 -53
  168. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/canvas/icon/InfoIcon.tsx +0 -8
  169. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/canvas/icon/index.ts +0 -1
  170. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/canvas/map/config.ts +0 -31
  171. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/canvas/map/nameMap.json +0 -9
  172. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/canvas/map/world.geo.json +0 -39349
  173. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/canvas/metric-info-tooltip/index.tsx +0 -19
@@ -5,6 +5,10 @@ import {
5
5
  BarChartOutlined,
6
6
  LineChartOutlined,
7
7
  PieChartOutlined,
8
+ RadarChartOutlined,
9
+ AppstoreOutlined,
10
+ GlobalOutlined,
11
+ TableOutlined,
8
12
  } from '@ant-design/icons';
9
13
  import {
10
14
  DndContext,
@@ -22,28 +26,36 @@ import {
22
26
  import { CSS } from '@dnd-kit/utilities';
23
27
  import { restrictToVerticalAxis } from '@dnd-kit/modifiers';
24
28
  import type { CanvasConfigModalProps } from '../canvasConfigRegistry';
25
- import type { ChartViewerChart } from '@/components/canvas/ChartViewer';
29
+ import type { MultiChartType } from '@gadmin2n/charts';
30
+ import {
31
+ CANVAS_MODAL_PROPS,
32
+ CANVAS_MODAL_TITLE_STYLE,
33
+ } from './canvasModalProps';
26
34
 
27
35
  // ─── 所有可选图表的元信息 ─────────────────────────────────────────────────────
28
36
 
29
37
  const ALL_CHARTS: {
30
- key: ChartViewerChart;
38
+ key: MultiChartType;
31
39
  label: string;
32
40
  icon: React.ReactNode;
33
41
  }[] = [
34
42
  { key: 'bar', label: '柱状图', icon: <BarChartOutlined /> },
35
43
  { key: 'line', label: '折线图', icon: <LineChartOutlined /> },
36
44
  { key: 'pie', label: '饼图', icon: <PieChartOutlined /> },
45
+ { key: 'radar', label: '雷达图', icon: <RadarChartOutlined /> },
46
+ { key: 'treemap', label: '矩形树图', icon: <AppstoreOutlined /> },
47
+ { key: 'worldmap', label: '世界地图', icon: <GlobalOutlined /> },
48
+ { key: 'table', label: '表格', icon: <TableOutlined /> },
37
49
  ];
38
50
 
39
51
  // ─── 从 code 字符串解析 charts prop ──────────────────────────────────────────
40
52
 
41
- function parseCharts(code: string): ChartViewerChart[] {
53
+ function parseCharts(code: string): MultiChartType[] {
42
54
  const match = code.match(/charts=\{(\[.*?\])\}/s);
43
55
  if (!match) return ['bar', 'line', 'pie'];
44
56
  try {
45
57
  const parsed = JSON.parse(match[1].replace(/'/g, '"'));
46
- if (Array.isArray(parsed)) return parsed as ChartViewerChart[];
58
+ if (Array.isArray(parsed)) return parsed as MultiChartType[];
47
59
  } catch {
48
60
  // 解析失败时返回默认值
49
61
  }
@@ -52,7 +64,7 @@ function parseCharts(code: string): ChartViewerChart[] {
52
64
 
53
65
  // ─── 将新的 charts 写回 code 字符串 ──────────────────────────────────────────
54
66
 
55
- function writeCharts(code: string, charts: ChartViewerChart[]): string {
67
+ function writeCharts(code: string, charts: MultiChartType[]): string {
56
68
  const chartsStr = `charts={${JSON.stringify(charts)}}`;
57
69
  // 已有 charts prop → 替换
58
70
  if (/charts=\{.*?\}/s.test(code)) {
@@ -65,12 +77,12 @@ function writeCharts(code: string, charts: ChartViewerChart[]): string {
65
77
  // ─── SortableChartItem ────────────────────────────────────────────────────────
66
78
 
67
79
  interface SortableChartItemProps {
68
- chartKey: ChartViewerChart;
80
+ chartKey: MultiChartType;
69
81
  label: string;
70
82
  icon: React.ReactNode;
71
83
  checked: boolean;
72
84
  disabled: boolean;
73
- onToggle: (key: ChartViewerChart, checked: boolean) => void;
85
+ onToggle: (key: MultiChartType, checked: boolean) => void;
74
86
  }
75
87
 
76
88
  const SortableChartItem: React.FC<SortableChartItemProps> = ({
@@ -125,22 +137,22 @@ const SortableChartItem: React.FC<SortableChartItemProps> = ({
125
137
  );
126
138
  };
127
139
 
128
- // ─── ChartViewerConfigModal ───────────────────────────────────────────────────
140
+ // ─── MultiChartConfigModal ───────────────────────────────────────────────────
129
141
 
130
- const ChartViewerConfigModal: React.FC<CanvasConfigModalProps> = ({
142
+ const MultiChartConfigModal: React.FC<CanvasConfigModalProps> = ({
131
143
  code,
132
144
  onConfirm,
133
145
  onCancel,
134
146
  }) => {
135
147
  const initialCharts = parseCharts(code);
136
148
  // 将 ALL_CHARTS 按 initialCharts 顺序排列,未在 initialCharts 中的追加到末尾
137
- const initialOrder: ChartViewerChart[] = [
149
+ const initialOrder: MultiChartType[] = [
138
150
  ...initialCharts,
139
151
  ...ALL_CHARTS.map((c) => c.key).filter((k) => !initialCharts.includes(k)),
140
152
  ];
141
153
 
142
- const [order, setOrder] = useState<ChartViewerChart[]>(initialOrder);
143
- const [checked, setChecked] = useState<Set<ChartViewerChart>>(
154
+ const [order, setOrder] = useState<MultiChartType[]>(initialOrder);
155
+ const [checked, setChecked] = useState<Set<MultiChartType>>(
144
156
  new Set(initialCharts),
145
157
  );
146
158
 
@@ -151,7 +163,7 @@ const ChartViewerConfigModal: React.FC<CanvasConfigModalProps> = ({
151
163
  );
152
164
 
153
165
  const handleToggle = useCallback(
154
- (key: ChartViewerChart, isChecked: boolean) => {
166
+ (key: MultiChartType, isChecked: boolean) => {
155
167
  setChecked((prev) => {
156
168
  const next = new Set(prev);
157
169
  if (isChecked) next.add(key);
@@ -166,8 +178,8 @@ const ChartViewerConfigModal: React.FC<CanvasConfigModalProps> = ({
166
178
  const { active, over } = event;
167
179
  if (!over || active.id === over.id) return;
168
180
  setOrder((prev) => {
169
- const oldIndex = prev.indexOf(active.id as ChartViewerChart);
170
- const newIndex = prev.indexOf(over.id as ChartViewerChart);
181
+ const oldIndex = prev.indexOf(active.id as MultiChartType);
182
+ const newIndex = prev.indexOf(over.id as MultiChartType);
171
183
  return arrayMove(prev, oldIndex, newIndex);
172
184
  });
173
185
  }, []);
@@ -180,13 +192,13 @@ const ChartViewerConfigModal: React.FC<CanvasConfigModalProps> = ({
180
192
 
181
193
  return (
182
194
  <Modal
195
+ {...CANVAS_MODAL_PROPS}
183
196
  open
184
- title="配置图表"
197
+ title={<span style={CANVAS_MODAL_TITLE_STYLE}>配置图表</span>}
185
198
  okText="确认"
186
199
  cancelText="取消"
187
200
  onOk={handleOk}
188
201
  onCancel={onCancel}
189
- width={360}
190
202
  >
191
203
  <DndContext
192
204
  sensors={sensors}
@@ -214,4 +226,4 @@ const ChartViewerConfigModal: React.FC<CanvasConfigModalProps> = ({
214
226
  );
215
227
  };
216
228
 
217
- export default ChartViewerConfigModal;
229
+ export default MultiChartConfigModal;
@@ -0,0 +1,427 @@
1
+ import React, { useState, useEffect } from 'react';
2
+ import {
3
+ Modal,
4
+ Input,
5
+ Checkbox,
6
+ Flex,
7
+ Divider,
8
+ Typography,
9
+ Radio,
10
+ Slider,
11
+ } from 'antd';
12
+ import {
13
+ BarChartOutlined,
14
+ LineChartOutlined,
15
+ PieChartOutlined,
16
+ RadarChartOutlined,
17
+ AppstoreOutlined,
18
+ GlobalOutlined,
19
+ TableOutlined,
20
+ } from '@ant-design/icons';
21
+ import {
22
+ CANVAS_MODAL_PROPS,
23
+ CANVAS_MODAL_TITLE_STYLE,
24
+ } from './canvasModalProps';
25
+
26
+ const { Text } = Typography;
27
+
28
+ // ─── Types ───────────────────────────────────────────────────────────────────
29
+
30
+ export interface MultiChartDataSourceResult {
31
+ /** 用户输入的数据描述 */
32
+ dataDescription: string;
33
+ /** 选中的图表类型 */
34
+ charts: string[];
35
+ /** 各图表配置(用于 prompt) */
36
+ chartConfigs: Record<string, Record<string, any>>;
37
+ /** 原始 code */
38
+ code: string;
39
+ }
40
+
41
+ interface MultiChartDataSourceModalProps {
42
+ open: boolean;
43
+ code: string;
44
+ onConfirm: (result: MultiChartDataSourceResult) => void;
45
+ onCancel: () => void;
46
+ }
47
+
48
+ // ─── 图表元信息 ──────────────────────────────────────────────────────────────
49
+
50
+ const ALL_CHART_OPTIONS = [
51
+ { key: 'bar', label: '柱状图', icon: <BarChartOutlined /> },
52
+ { key: 'line', label: '折线图', icon: <LineChartOutlined /> },
53
+ { key: 'pie', label: '饼图', icon: <PieChartOutlined /> },
54
+ { key: 'radar', label: '雷达图', icon: <RadarChartOutlined /> },
55
+ { key: 'treemap', label: '矩形树图', icon: <AppstoreOutlined /> },
56
+ { key: 'worldmap', label: '世界地图', icon: <GlobalOutlined /> },
57
+ { key: 'table', label: '表格', icon: <TableOutlined /> },
58
+ ];
59
+
60
+ // 每种图表可配置的选项
61
+ interface ConfigOptionCheckbox {
62
+ key: string;
63
+ label: string;
64
+ type?: 'checkbox';
65
+ /** 依赖条件:'key' = 该 key 为 true;'key:value' = 该 key 等于 value */
66
+ dependsOn?: string;
67
+ }
68
+
69
+ interface ConfigOptionSelect {
70
+ key: string;
71
+ label: string;
72
+ type: 'select';
73
+ options: { value: string; label: string }[];
74
+ }
75
+
76
+ interface ConfigOptionSlider {
77
+ key: string;
78
+ label: string;
79
+ type: 'slider';
80
+ min: number;
81
+ max: number;
82
+ }
83
+
84
+ type ConfigOption =
85
+ | ConfigOptionCheckbox
86
+ | ConfigOptionSelect
87
+ | ConfigOptionSlider;
88
+
89
+ const CHART_CONFIG_OPTIONS: Record<string, ConfigOption[]> = {
90
+ bar: [
91
+ {
92
+ key: 'variant',
93
+ label: '样式',
94
+ type: 'select',
95
+ options: [
96
+ { value: 'bar', label: '单系列' },
97
+ { value: 'groupBar', label: '多系列' },
98
+ ],
99
+ },
100
+ {
101
+ key: 'direction',
102
+ label: '方向',
103
+ type: 'select',
104
+ options: [
105
+ { value: 'vertical', label: '纵向' },
106
+ { value: 'horizontal', label: '横向' },
107
+ ],
108
+ },
109
+ { key: 'stacked', label: '堆叠模式', dependsOn: 'variant:groupBar' },
110
+ { key: 'percent', label: '百分比堆叠', dependsOn: 'stacked' },
111
+ { key: 'showGrid', label: '显示网格线' },
112
+ { key: 'showLabel', label: '显示数据标签' },
113
+ { key: 'legendShow', label: '显示图例' },
114
+ ],
115
+ line: [
116
+ { key: 'showGrid', label: '显示网格线' },
117
+ { key: 'showAxis', label: '显示坐标轴' },
118
+ { key: 'showDots', label: '显示坐标点' },
119
+ { key: 'showLabel', label: '显示坐标点数据', dependsOn: 'showDots' },
120
+ { key: 'smooth', label: '拟合曲线' },
121
+ { key: 'area', label: '面积填充' },
122
+ { key: 'stacked', label: '堆叠模式' },
123
+ { key: 'legendShow', label: '显示图例' },
124
+ ],
125
+ pie: [
126
+ {
127
+ key: 'variant',
128
+ label: '样式',
129
+ type: 'select',
130
+ options: [
131
+ { value: 'pie', label: '饼图' },
132
+ { value: 'ring', label: '环形图' },
133
+ ],
134
+ },
135
+ { key: 'legendShow', label: '显示图例' },
136
+ ],
137
+ radar: [
138
+ {
139
+ key: 'dimensionCount',
140
+ label: '维度数量',
141
+ type: 'slider',
142
+ min: 3,
143
+ max: 8,
144
+ },
145
+ { key: 'legendShow', label: '显示图例' },
146
+ ],
147
+ treemap: [{ key: 'legendShow', label: '显示图例' }],
148
+ worldmap: [],
149
+ table: [{ key: 'pagination', label: '显示分页' }],
150
+ };
151
+
152
+ // ─── 从 code 解析当前 charts ─────────────────────────────────────────────────
153
+
154
+ function parseCharts(code: string): string[] {
155
+ const match = code.match(/charts=\{(\[.*?\])\}/s);
156
+ if (!match) return ['bar', 'line', 'pie'];
157
+ try {
158
+ return JSON.parse(match[1].replace(/'/g, '"'));
159
+ } catch {
160
+ return ['bar', 'line', 'pie'];
161
+ }
162
+ }
163
+
164
+ // ─── Component ───────────────────────────────────────────────────────────────
165
+
166
+ const MultiChartDataSourceModal: React.FC<MultiChartDataSourceModalProps> = ({
167
+ open,
168
+ code,
169
+ onConfirm,
170
+ onCancel,
171
+ }) => {
172
+ const [dataDescription, setDataDescription] = useState('');
173
+ const [selectedCharts, setSelectedCharts] = useState<Set<string>>(new Set());
174
+ const [chartConfigs, setChartConfigs] = useState<
175
+ Record<string, Record<string, any>>
176
+ >({});
177
+
178
+ // 初始化
179
+ useEffect(() => {
180
+ if (open) {
181
+ const charts = parseCharts(code);
182
+ setSelectedCharts(new Set(charts));
183
+ setDataDescription('');
184
+ // 初始化每个图表的默认配置
185
+ const configs: Record<string, Record<string, any>> = {};
186
+ ALL_CHART_OPTIONS.forEach(({ key }) => {
187
+ const options = CHART_CONFIG_OPTIONS[key] ?? [];
188
+ configs[key] = {};
189
+ options.forEach((opt) => {
190
+ if (opt.type === 'select') {
191
+ // select 类型:默认选第一个选项
192
+ configs[key][opt.key] = opt.options[0]?.value ?? '';
193
+ } else if (opt.type === 'slider') {
194
+ // slider 类型:默认取中间值
195
+ configs[key][opt.key] = Math.round((opt.min + opt.max) / 2);
196
+ } else {
197
+ // checkbox 类型:showGrid/showLabel/legendShow/showAxis 默认 true,其余 false
198
+ configs[key][opt.key] =
199
+ opt.key === 'showGrid' ||
200
+ opt.key === 'showLabel' ||
201
+ opt.key === 'showAxis' ||
202
+ opt.key === 'legendShow';
203
+ }
204
+ });
205
+ });
206
+ setChartConfigs(configs);
207
+ }
208
+ }, [open, code]);
209
+
210
+ const handleChartToggle = (key: string, checked: boolean) => {
211
+ setSelectedCharts((prev) => {
212
+ const next = new Set(prev);
213
+ if (checked) next.add(key);
214
+ else next.delete(key);
215
+ return next;
216
+ });
217
+ };
218
+
219
+ const handleConfigToggle = (
220
+ chartKey: string,
221
+ configKey: string,
222
+ checked: boolean,
223
+ ) => {
224
+ setChartConfigs((prev) => {
225
+ const updated = {
226
+ ...prev,
227
+ [chartKey]: { ...prev[chartKey], [configKey]: checked },
228
+ };
229
+ // 当关闭 stacked 时,同步关闭 percent
230
+ if (!checked && configKey === 'stacked') {
231
+ updated[chartKey].percent = false;
232
+ }
233
+ return updated;
234
+ });
235
+ };
236
+
237
+ const handleConfigSelect = (
238
+ chartKey: string,
239
+ configKey: string,
240
+ value: string | number,
241
+ ) => {
242
+ setChartConfigs((prev) => {
243
+ const updated = {
244
+ ...prev,
245
+ [chartKey]: { ...prev[chartKey], [configKey]: value },
246
+ };
247
+ // 切到 bar 时,关闭 stacked/percent
248
+ if (configKey === 'variant' && value === 'bar') {
249
+ updated[chartKey].stacked = false;
250
+ updated[chartKey].percent = false;
251
+ }
252
+ return updated;
253
+ });
254
+ };
255
+
256
+ /** 检查依赖是否满足 */
257
+ const isDependencyMet = (chartKey: string, dependsOn?: string): boolean => {
258
+ if (!dependsOn) return true;
259
+ const config = chartConfigs[chartKey] ?? {};
260
+ if (dependsOn.includes(':')) {
261
+ const [depKey, depVal] = dependsOn.split(':');
262
+ return config[depKey] === depVal;
263
+ }
264
+ return config[dependsOn] === true;
265
+ };
266
+
267
+ const handleConfirm = () => {
268
+ const charts = ALL_CHART_OPTIONS.filter(({ key }) =>
269
+ selectedCharts.has(key),
270
+ ).map(({ key }) => key);
271
+
272
+ // 只传选中图表的配置
273
+ const filteredConfigs: Record<string, Record<string, any>> = {};
274
+ charts.forEach((key) => {
275
+ if (chartConfigs[key]) filteredConfigs[key] = chartConfigs[key];
276
+ });
277
+
278
+ onConfirm({
279
+ dataDescription: dataDescription.trim(),
280
+ charts,
281
+ chartConfigs: filteredConfigs,
282
+ code,
283
+ });
284
+ };
285
+
286
+ return (
287
+ <Modal
288
+ {...CANVAS_MODAL_PROPS}
289
+ title={<span style={CANVAS_MODAL_TITLE_STYLE}>配置复合图表数据来源</span>}
290
+ open={open}
291
+ onOk={handleConfirm}
292
+ onCancel={onCancel}
293
+ okText="确认"
294
+ cancelText="取消"
295
+ okButtonProps={{ disabled: selectedCharts.size === 0 }}
296
+ width={520}
297
+ >
298
+ <div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
299
+ {/* 数据描述 */}
300
+ <div>
301
+ <div style={{ marginBottom: 6, fontSize: 13, color: '#595959' }}>
302
+ 数据来源描述:
303
+ </div>
304
+ <Input.TextArea
305
+ value={dataDescription}
306
+ onChange={(e) => setDataDescription(e.target.value)}
307
+ placeholder="描述你需要的数据,如:从 t_daily_stats 表查询每日各类型设备活跃数"
308
+ rows={3}
309
+ style={{ resize: 'vertical' }}
310
+ />
311
+ </div>
312
+
313
+ <Divider style={{ margin: '8px 0' }} />
314
+
315
+ {/* 选择图表类型 */}
316
+ <div>
317
+ <div style={{ marginBottom: 8, fontSize: 13, color: '#595959' }}>
318
+ 选择展示的图表类型:
319
+ </div>
320
+ <Flex wrap="wrap" gap={8}>
321
+ {ALL_CHART_OPTIONS.map(({ key, label, icon }) => (
322
+ <Checkbox
323
+ key={key}
324
+ checked={selectedCharts.has(key)}
325
+ onChange={(e) => handleChartToggle(key, e.target.checked)}
326
+ >
327
+ <Flex align="center" gap={4}>
328
+ {icon}
329
+ <span>{label}</span>
330
+ </Flex>
331
+ </Checkbox>
332
+ ))}
333
+ </Flex>
334
+ </div>
335
+
336
+ {/* 各图表配置 */}
337
+ {ALL_CHART_OPTIONS.filter(
338
+ ({ key }) =>
339
+ selectedCharts.has(key) &&
340
+ (CHART_CONFIG_OPTIONS[key]?.length ?? 0) > 0,
341
+ ).map(({ key, label, icon }) => (
342
+ <div key={key}>
343
+ <Flex align="center" gap={6} style={{ marginBottom: 6 }}>
344
+ {icon}
345
+ <Text strong style={{ fontSize: 13 }}>
346
+ {label}配置
347
+ </Text>
348
+ </Flex>
349
+ <Flex wrap="wrap" gap={8} style={{ paddingLeft: 20 }}>
350
+ {(CHART_CONFIG_OPTIONS[key] ?? []).map((opt) => {
351
+ if (opt.type === 'select') {
352
+ return (
353
+ <Flex key={opt.key} align="center" gap={6}>
354
+ <Text style={{ fontSize: 12, color: '#8c8c8c' }}>
355
+ {opt.label}:
356
+ </Text>
357
+ <Radio.Group
358
+ size="small"
359
+ value={
360
+ chartConfigs[key]?.[opt.key] ?? opt.options[0]?.value
361
+ }
362
+ onChange={(e) =>
363
+ handleConfigSelect(key, opt.key, e.target.value)
364
+ }
365
+ >
366
+ {opt.options.map((o) => (
367
+ <Radio.Button key={o.value} value={o.value}>
368
+ {o.label}
369
+ </Radio.Button>
370
+ ))}
371
+ </Radio.Group>
372
+ </Flex>
373
+ );
374
+ }
375
+ if (opt.type === 'slider') {
376
+ return (
377
+ <Flex
378
+ key={opt.key}
379
+ align="center"
380
+ gap={6}
381
+ style={{ width: '100%' }}
382
+ >
383
+ <Text
384
+ style={{
385
+ fontSize: 12,
386
+ color: '#8c8c8c',
387
+ whiteSpace: 'nowrap',
388
+ }}
389
+ >
390
+ {opt.label}: {chartConfigs[key]?.[opt.key] ?? opt.min}
391
+ </Text>
392
+ <Slider
393
+ min={opt.min}
394
+ max={opt.max}
395
+ value={
396
+ chartConfigs[key]?.[opt.key] ??
397
+ Math.round((opt.min + opt.max) / 2)
398
+ }
399
+ onChange={(v) => handleConfigSelect(key, opt.key, v)}
400
+ style={{ flex: 1, minWidth: 120 }}
401
+ />
402
+ </Flex>
403
+ );
404
+ }
405
+ const disabled = !isDependencyMet(key, opt.dependsOn);
406
+ return (
407
+ <Checkbox
408
+ key={opt.key}
409
+ checked={chartConfigs[key]?.[opt.key] ?? false}
410
+ disabled={disabled}
411
+ onChange={(e) =>
412
+ handleConfigToggle(key, opt.key, e.target.checked)
413
+ }
414
+ >
415
+ {opt.label}
416
+ </Checkbox>
417
+ );
418
+ })}
419
+ </Flex>
420
+ </div>
421
+ ))}
422
+ </div>
423
+ </Modal>
424
+ );
425
+ };
426
+
427
+ export default MultiChartDataSourceModal;
@@ -2,6 +2,10 @@ import React, { useState, useEffect } from 'react';
2
2
  import { Modal, Checkbox, Input, Button, Space } from 'antd';
3
3
  import { PlusOutlined, MinusCircleOutlined } from '@ant-design/icons';
4
4
  import { useTranslation } from 'react-i18next';
5
+ import {
6
+ CANVAS_MODAL_PROPS,
7
+ CANVAS_MODAL_TITLE_STYLE,
8
+ } from './canvasModalProps';
5
9
 
6
10
  interface NumCardDataSourceModalProps {
7
11
  open: boolean;
@@ -95,15 +99,17 @@ const NumCardDataSourceModal: React.FC<NumCardDataSourceModalProps> = ({
95
99
 
96
100
  return (
97
101
  <Modal
98
- title={t('canvas.dataSourceModal.title')}
102
+ {...CANVAS_MODAL_PROPS}
103
+ title={
104
+ <span style={CANVAS_MODAL_TITLE_STYLE}>
105
+ {t('canvas.dataSourceModal.title')}
106
+ </span>
107
+ }
99
108
  open={open}
100
109
  onOk={handleConfirm}
101
110
  onCancel={onCancel}
102
111
  okText={t('canvas.dataSourceModal.ok')}
103
112
  cancelText={t('canvas.dataSourceModal.cancel')}
104
- width={420}
105
- centered
106
- destroyOnClose
107
113
  >
108
114
  <div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
109
115
  <div>
@@ -1,6 +1,10 @@
1
1
  import React, { useState, useEffect, useRef } from 'react';
2
2
  import { Modal, Input } from 'antd';
3
3
  import type { TextAreaRef } from 'antd/es/input/TextArea';
4
+ import {
5
+ CANVAS_MODAL_PROPS,
6
+ CANVAS_MODAL_TITLE_STYLE,
7
+ } from './canvasModalProps';
4
8
 
5
9
  export interface PromptModalProps {
6
10
  /** 控制弹窗开关 */
@@ -48,25 +52,13 @@ const PromptModal: React.FC<PromptModalProps> = ({
48
52
 
49
53
  return (
50
54
  <Modal
55
+ {...CANVAS_MODAL_PROPS}
51
56
  open={open}
52
57
  onCancel={onCancel}
53
58
  onOk={handleOk}
54
59
  okText="确认"
55
60
  cancelText="取消"
56
- width={480}
57
- centered
58
- destroyOnClose
59
- closable={false}
60
- styles={{
61
- header: { padding: '16px 20px 0', marginBottom: 0 },
62
- body: { padding: '12px 20px 16px' },
63
- footer: { padding: '0 20px 16px' },
64
- }}
65
- title={
66
- <span style={{ fontSize: 13, fontWeight: 500, color: '#595959' }}>
67
- {label}
68
- </span>
69
- }
61
+ title={<span style={CANVAS_MODAL_TITLE_STYLE}>{label}</span>}
70
62
  >
71
63
  <Input.TextArea
72
64
  ref={textAreaRef}
@@ -1,6 +1,10 @@
1
1
  import React, { useState, useEffect } from 'react';
2
2
  import { Modal, Slider, Input } from 'antd';
3
3
  import { useTranslation } from 'react-i18next';
4
+ import {
5
+ CANVAS_MODAL_PROPS,
6
+ CANVAS_MODAL_TITLE_STYLE,
7
+ } from './canvasModalProps';
4
8
 
5
9
  interface RadarChartDataSourceModalProps {
6
10
  open: boolean;
@@ -43,15 +47,17 @@ const RadarChartDataSourceModal: React.FC<RadarChartDataSourceModalProps> = ({
43
47
 
44
48
  return (
45
49
  <Modal
46
- title={t('canvas.dataSourceModal.title')}
50
+ {...CANVAS_MODAL_PROPS}
51
+ title={
52
+ <span style={CANVAS_MODAL_TITLE_STYLE}>
53
+ {t('canvas.dataSourceModal.title')}
54
+ </span>
55
+ }
47
56
  open={open}
48
57
  onOk={handleConfirm}
49
58
  onCancel={onCancel}
50
59
  okText={t('canvas.dataSourceModal.ok')}
51
60
  cancelText={t('canvas.dataSourceModal.cancel')}
52
- width={420}
53
- centered
54
- destroyOnClose
55
61
  >
56
62
  <div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
57
63
  <div>