@gadmin2n/schematics 0.0.139 → 0.0.141
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/dist/lib/application/files/gadmin2-game-angle-demo/Jenkinsfile +6 -34
- package/dist/lib/application/files/gadmin2-game-angle-demo/config/prisma/approval.prisma +199 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/config/prisma/system.prisma +9 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/config/prisma/workflow.prisma +191 -14
- package/dist/lib/application/files/gadmin2-game-angle-demo/config/ui/Event.ts +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/gitignore +6 -5
- package/dist/lib/application/files/gadmin2-game-angle-demo/readme.md +10 -3
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/migrate-between-pg-schemas.js +6 -4
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/package.json +5 -2
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/prisma.config.ts +12 -3
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/scripts/gen-jwt.ts +8 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/scripts/migrate-human-approval-configs.ts +86 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/seed/workflow-node-types.ts +710 -121
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/seed/workflow.seed.ts +125 -10
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/config/index.ts +28 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/lib/json-body-parser.spec.ts +61 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/lib/json-body-parser.ts +7 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/lib/structured-all-exceptions.filter.spec.ts +54 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/lib/structured-all-exceptions.filter.ts +86 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/main.ts +9 -3
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/approvalChannel/approval-channel.controller.ts +89 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/approvalChannel/approval-channel.dto.ts +68 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/approvalChannel/approval-channel.service.spec.ts +177 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/approvalChannel/approval-channel.service.ts +283 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/approvalChannel/approvalChannel.module.ts +10 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/codeRuntime/code-executor.spec.ts +42 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/codeRuntime/code-executor.ts +108 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/codeRuntime/code-runtime.controller.ts +101 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/codeRuntime/code-runtime.dto.ts +29 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/codeRuntime/codeRuntime.module.ts +21 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/externalInteraction/external-interaction-handler.registry.ts +30 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/externalInteraction/external-interaction-handler.ts +15 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/externalInteraction/external-interaction-runtime.controller.spec.ts +105 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/externalInteraction/external-interaction-runtime.controller.ts +96 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/externalInteraction/external-interaction-runtime.dto.ts +78 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/externalInteraction/external-interaction-signal-outbox.service.spec.ts +56 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/externalInteraction/external-interaction-signal-outbox.service.ts +111 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/externalInteraction/external-interaction-token.spec.ts +23 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/externalInteraction/external-interaction-token.ts +18 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/externalInteraction/external-interaction.service.spec.ts +240 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/externalInteraction/external-interaction.service.ts +339 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/externalInteraction/external-interaction.types.ts +74 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/externalInteraction/external-wait.handler.ts +47 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/externalInteraction/externalInteraction.module.ts +41 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/externalInteraction/human-approval.handler.spec.ts +70 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/externalInteraction/human-approval.handler.ts +76 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/externalInteraction/workflow-callback-url.controller.ts +12 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/externalInteraction/workflow-callback-url.service.spec.ts +227 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/externalInteraction/workflow-callback-url.service.ts +121 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/httpRequest/http-request-runtime.controller.ts +160 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/httpRequest/http-request-runtime.dto.ts +41 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/httpRequest/http-request-runtime.util.spec.ts +171 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/httpRequest/http-request-runtime.util.ts +245 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/httpRequest/httpRequest.module.ts +22 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/approval-rule-evaluator.spec.ts +68 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/approval-rule-evaluator.ts +126 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/approval-rule.types.ts +34 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/approval-signal-outbox.service.ts +115 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/approval-subject-source.util.spec.ts +45 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/approval-subject-source.util.ts +59 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/human-approval.controller.ts +72 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/human-approval.dto.ts +144 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/human-approval.errors.ts +19 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/human-approval.external-decision.spec.ts +350 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/human-approval.service.ts +774 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/humanApproval.module.ts +46 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/legacy-approval-config-migration.ts +227 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/outbox-retry.util.ts +14 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/runtime/human-approval-runtime.controller.ts +151 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/runtime/human-approval-runtime.dto.ts +88 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/runtime/runtime-token.guard.ts +43 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/index.ts +21 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/integrationConnection/integration-connection.controller.ts +77 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/integrationConnection/integration-connection.dto.ts +98 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/integrationConnection/integration-connection.service.ts +277 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/integrationConnection/integration-secret-cipher.spec.ts +14 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/integrationConnection/integration-secret-cipher.ts +59 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/integrationConnection/integrationConnection.module.ts +10 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/subjectProvider/actor-context.util.ts +27 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/subjectProvider/providers/user-group.provider.ts +208 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/subjectProvider/providers/user.provider.ts +168 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/subjectProvider/subject-provider.controller.spec.ts +157 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/subjectProvider/subject-provider.controller.ts +176 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/subjectProvider/subject-provider.dto.ts +21 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/subjectProvider/subject-provider.errors.ts +78 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/subjectProvider/subject-provider.registry.spec.ts +100 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/subjectProvider/subject-provider.registry.ts +115 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/subjectProvider/subject-provider.types.ts +97 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/subjectProvider/subjectProvider.module.ts +34 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/temporalTenantConfig/temporalTenantConfig.controller.spec.ts +89 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/temporalTenantConfig/temporalTenantConfig.controller.ts +4 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/userGroup/user-group.controller.ts +119 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/userGroup/user-group.dto.ts +91 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/userGroup/user-group.errors.ts +34 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/userGroup/user-group.service.spec.ts +161 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/userGroup/user-group.service.ts +390 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/userGroup/userGroup.module.ts +10 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/dsl-validate.util.spec.ts +17 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/dsl-validate.util.ts +8 -2
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/parameter-binding.ts +93 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/temporal.service.spec.ts +34 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/temporal.service.ts +26 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-callable.spec.ts +158 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-callable.ts +155 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-compiler.service.spec.ts +512 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-compiler.service.ts +368 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-compiler.types.ts +43 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-data-edge.util.spec.ts +174 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-data-edge.util.ts +149 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-dsl-comparison.ts +43 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-execution.dto.ts +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-export.dto.ts +4 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-export.service.ts +70 -28
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-handle-validator.ts +128 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-http-response.spec.ts +85 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-http-response.ts +157 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow.controller.spec.ts +59 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow.controller.ts +27 -5
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow.module.ts +18 -3
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow.service.spec.ts +493 -21
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow.service.ts +426 -90
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowConfig/node-config-validator.service.spec.ts +79 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowConfig/node-config-validator.service.ts +62 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowConfig/schema.types.ts +10 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowConfig/subject-config-validator.service.spec.ts +124 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowConfig/subject-config-validator.service.ts +236 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowConfig/widget-catalog.service.spec.ts +49 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowConfig/widget-catalog.service.ts +69 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowConfig/workflowConfig.module.ts +20 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowNodeInstance/node-instance-config.util.spec.ts +15 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowNodeInstance/node-instance-config.util.ts +25 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowNodeInstance/workflowNodeInstance.controller.ts +103 -11
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowNodeInstance/workflowNodeInstance.dto.ts +98 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowNodeInstance/workflowNodeInstance.module.ts +3 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowNodeInstance/workflowNodeInstance.service.spec.ts +72 -62
- package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowNodeInstance/workflowNodeInstance.service.ts +148 -11
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/package.json +13 -9
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/App.tsx +5 -2
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/authProvider.ts +2 -2
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/BulkActions.tsx +0 -5
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/PageHeader.tsx +46 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/SearchBar.tsx +26 -18
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/auditLog/components/eventList/index.tsx +2 -2
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/auditLog/components/logButton/index.tsx +24 -17
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/auditLog/components/logList/index.tsx +7 -18
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/auditLog/components/modalDiffViewer/index.tsx +2 -2
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/contexts/color-mode/index.tsx +288 -33
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/contexts/color-mode/themeStyles.ts +97 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/index.ts +1 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/layout/SettingDrawer.tsx +251 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/layout/header.tsx +47 -19
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/layout/layout.tsx +18 -9
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/layout/menuRenderer.tsx +155 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/layout/sider.tsx +123 -129
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/config/routeRegistry.test.ts +10 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/config/routeRegistry.tsx +18 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/constants/layout.ts +32 -3
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/dev-shell/AddDataModal.tsx +98 -3
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/dev-shell/AddPageModal.tsx +101 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/dev-shell/DevShell.tsx +8 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/dev-shell/style.css +51 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/helpers/form.tsx +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/helpers/list.tsx +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/helpers/login.ts +40 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/helpers/show.tsx +5 -5
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/hooks/useDynamicResources.tsx +16 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/hooks/useListPageState.ts +10 -7
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/i18n.ts +4 -2
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/locales/en/common.json +26 -2
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/locales/en/workflow.json +575 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/locales/zh_CN/common.json +26 -2
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/locales/zh_CN/workflow.json +575 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/plugins/devShellPlugin.ts +152 -2
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/agenda/index.tsx +9 -15
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/agenda/show.tsx +41 -9
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/agendaJob/edit.tsx +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/agendaJob/list.tsx +10 -8
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/agendaJob/show.tsx +3 -3
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/audit/components/action-cell.css +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/audit/edit.tsx +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/audit/list.tsx +141 -138
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/audit/show.tsx +3 -6
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/CanvasCell.css +3 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/CanvasCell.tsx +45 -13
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/CanvasComponentLibrary.tsx +45 -22
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/CanvasListPage.tsx +175 -119
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/CanvasPage.tsx +248 -74
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/CanvasToolbar.tsx +33 -18
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/CodeFloatWindow.tsx +16 -10
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/PublishModal.tsx +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/canvasContextMenuRegistry.tsx +31 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/canvasDefaults.ts +15 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/components/BarChartDataSourceModal.tsx +16 -11
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/components/CanvasAiModal.tsx +25 -21
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/components/ExportModal.tsx +6 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/components/LineChartDataSourceModal.tsx +9 -10
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/components/MultiChartConfigModal.tsx +4 -7
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/components/MultiChartDataSourceModal.tsx +23 -9
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/components/NumCardDataSourceModal.tsx +16 -11
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/components/PromptModal.tsx +2 -5
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/components/RadarChartDataSourceModal.tsx +16 -11
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/components/TableConfigModal.tsx +2 -9
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/components/TableDataSourceModal.tsx +23 -12
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/components/canvasModalProps.ts +2 -17
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/sectionCompactor.test.ts +149 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/sectionCompactor.ts +111 -17
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/types.ts +1 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/whiteboardLayout.test.ts +83 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/whiteboardLayout.ts +118 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/whiteboardName.test.ts +26 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas-page/index.tsx +9 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/game/edit.tsx +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/game/list.tsx +10 -8
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/game/show.tsx +3 -6
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/human-approval/DecisionModal.tsx +71 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/human-approval/inbox.tsx +209 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/page/Components/AssignRolesModal.tsx +6 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/page/list.tsx +47 -150
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/permissionReadme/index.tsx +21 -20
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/resource/Components/modal.tsx +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/resource/list.tsx +115 -118
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/role/Components/modal.tsx +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/role/list.tsx +61 -64
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/user/components/show-drawer.tsx +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/user/list.tsx +187 -200
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/approval-channels/ApprovalChannelModal.test.tsx +84 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/approval-channels/ApprovalChannelModal.tsx +141 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/approval-channels/approval-channel.types.ts +16 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/approval-channels/index.tsx +210 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/CreateNodeInstanceDrawer.tsx +154 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/CustomNode.tsx +194 -5
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/DeletableEdge.tsx +76 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/DslView.tsx +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/EnhancedFlowRenderer.tsx +176 -22
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/ExecutionStatusNode.test.tsx +62 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/ExecutionStatusNode.tsx +94 -5
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/ExportModal.tsx +15 -10
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/FlowRenderer.tsx +251 -70
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/ImportModal.tsx +18 -24
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/InstanceRequiredDialog.tsx +106 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/LookupConnectionDialog.test.tsx +45 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/LookupConnectionDialog.tsx +43 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/NewNodeDefaults.test.tsx +283 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/NodeEditModal.tsx +6 -7
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/NodePropertyPanel.test.tsx +335 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/NodePropertyPanel.tsx +433 -237
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/ParameterBindingEditor.tsx +179 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/RunWorkflowModal.tsx +18 -16
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/StatusCards.tsx +20 -16
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/VersionPanel.tsx +6 -4
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/connections/ConnectionModal.test.tsx +68 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/connections/ConnectionModal.tsx +367 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/connections/connection.types.ts +21 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/connections/index.tsx +180 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/editor.tsx +38 -22
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/hooks/useNodeInstanceLibrary.ts +41 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/hooks/useWorkflowAgent.ts +6 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/index.tsx +29 -35
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/instance-detail.tsx +8 -11
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/instances.tsx +4 -3
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/components/NodeInstanceForm.tsx +56 -23
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/create.tsx +21 -6
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/edit.tsx +17 -20
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/index.tsx +9 -17
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/schema-form/SchemaField.tsx +311 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/schema-form/SchemaForm.test.tsx +218 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/schema-form/SchemaForm.tsx +83 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/schema-form/default-widgets.tsx +135 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/schema-form/schema-defaults.ts +36 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/schema-form/schema.types.ts +32 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/schema-form/widget-registry.test.tsx +23 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/schema-form/widget-registry.tsx +52 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/show.tsx +9 -13
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/ApprovalRequestTriggerConfigEditor.tsx +39 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/ApprovalRuleEditor.test.tsx +20 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/ApprovalRuleEditor.tsx +72 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/ApproverSourceEditor.test.tsx +47 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/ApproverSourceEditor.tsx +185 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/CallableInputParametersEditor.test.tsx +102 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/CallableInputParametersEditor.tsx +150 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/CodeConfigEditor.tsx +103 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/ExternalRequestConfigEditor.test.tsx +135 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/ExternalRequestConfigEditor.tsx +273 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/ExternalWaitConfigEditor.tsx +303 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/HttpRequestConfigEditor.test.tsx +189 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/HttpRequestConfigEditor.tsx +706 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/HumanApprovalConfigEditor.test.tsx +86 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/HumanApprovalConfigEditor.tsx +458 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/ReturnResultConfigEditor.test.tsx +81 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/ReturnResultConfigEditor.tsx +281 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/SubjectPicker.test.tsx +61 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/SubjectPicker.tsx +266 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/SubmitApprovalResultConfigEditor.tsx +104 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/SubmitExternalResultConfigEditor.tsx +98 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/UserGroupCreateModal.tsx +70 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/UserGroupEditModal.tsx +138 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/approver-source.test.ts +25 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/approver-source.ts +42 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/subject-provider.api.ts +95 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/show.tsx +15 -11
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/temporal-tenant/index.test.tsx +152 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/temporal-tenant/index.tsx +438 -141
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/types/parameter-binding.ts +49 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/types.ts +31 -2
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/utils/lookupConnection.test.ts +208 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/utils/lookupConnection.ts +246 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/utils/newNodeConfig.ts +77 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/utils/removeWorkflowEdges.test.ts +34 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/utils/removeWorkflowEdges.ts +18 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/utils/resolveLookupPorts.ts +66 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/utils/resolveOutputs.test.ts +39 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/utils/resolveOutputs.ts +48 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/utils/resolveWorkflowDisplay.test.ts +51 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/utils/resolveWorkflowDisplay.ts +32 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflowEventOutbox/edit.tsx +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflowEventOutbox/list.tsx +10 -8
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflowEventOutbox/show.tsx +3 -3
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/styles/antd-theme-vars.css +93 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/styles/antd.css +8 -8
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/styles/fc.css +4 -4
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/styles/index.css +40 -5
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/styles/show-drawer.module.css +3 -3
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/styles/show-page.module.css +3 -3
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/styles/theme-styles.css +81 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/test/setup.ts +5 -0
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/vite.config.ts +1 -7
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/vitest.config.ts +12 -0
- package/package.json +1 -1
- package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/components/DynamicConfigForm.tsx +0 -154
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
buildVirtualTableCode,
|
|
19
19
|
} from './utils/tableCodeUtils';
|
|
20
20
|
import { parseJsLiteralProp } from './utils/jsLiteralParser';
|
|
21
|
+
import { readWhiteboardName, writeWhiteboardName } from './whiteboardLayout';
|
|
21
22
|
|
|
22
23
|
// ─── 组件特有右键菜单操作注册表 ────────────────────────────────────────────────
|
|
23
24
|
//
|
|
@@ -57,6 +58,35 @@ export interface MenuActionContext {
|
|
|
57
58
|
}) => void;
|
|
58
59
|
}
|
|
59
60
|
|
|
61
|
+
function whiteboardActions(
|
|
62
|
+
code: string,
|
|
63
|
+
updateCode: (newCode: string) => void,
|
|
64
|
+
closeMenu: () => void,
|
|
65
|
+
ctx?: MenuActionContext,
|
|
66
|
+
t?: TFunction,
|
|
67
|
+
): MenuProps['items'] {
|
|
68
|
+
return [
|
|
69
|
+
{
|
|
70
|
+
key: 'rename-whiteboard',
|
|
71
|
+
icon: <EditOutlined />,
|
|
72
|
+
label: t?.('canvas.menu.renameWhiteboard') ?? '修改白板名称',
|
|
73
|
+
onClick: () => {
|
|
74
|
+
closeMenu();
|
|
75
|
+
ctx?.showPrompt({
|
|
76
|
+
label: t?.('canvas.menu.renameWhiteboardTitle') ?? '修改白板名称',
|
|
77
|
+
placeholder:
|
|
78
|
+
t?.('canvas.menu.whiteboardNamePlaceholder') ?? '请输入白板名称',
|
|
79
|
+
defaultValue: readWhiteboardName(code),
|
|
80
|
+
onConfirm: (name) => {
|
|
81
|
+
if (!name) return;
|
|
82
|
+
updateCode(writeWhiteboardName(code, name));
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
];
|
|
88
|
+
}
|
|
89
|
+
|
|
60
90
|
// ─── NumCard 特有操作 ─────────────────────────────────────────────────────────
|
|
61
91
|
|
|
62
92
|
function numCardActions(
|
|
@@ -1294,6 +1324,7 @@ export const CANVAS_CONTEXT_MENU_REGISTRY: Record<
|
|
|
1294
1324
|
string,
|
|
1295
1325
|
ComponentActionsFactory
|
|
1296
1326
|
> = {
|
|
1327
|
+
Whiteboard: whiteboardActions,
|
|
1297
1328
|
NumCard: numCardActions,
|
|
1298
1329
|
Table: tableActions,
|
|
1299
1330
|
BarChart: barChartActions,
|
package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/canvas/canvasDefaults.ts
CHANGED
|
@@ -22,6 +22,7 @@ export interface CanvasDefault {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export const CANVAS_COMPONENTS: string[] = [
|
|
25
|
+
'Whiteboard',
|
|
25
26
|
'NumCard',
|
|
26
27
|
'BarChart',
|
|
27
28
|
'LineChart',
|
|
@@ -33,6 +34,20 @@ export const CANVAS_COMPONENTS: string[] = [
|
|
|
33
34
|
];
|
|
34
35
|
|
|
35
36
|
export const CANVAS_DEFAULTS: Record<string, CanvasDefault> = {
|
|
37
|
+
Whiteboard: {
|
|
38
|
+
code: `<Section title="白板" testId="canvas-whiteboard" />`,
|
|
39
|
+
layout: { w: 36, h: 28, minW: 16, minH: 12 },
|
|
40
|
+
props: getPropsFor('Section'),
|
|
41
|
+
variants: [
|
|
42
|
+
{
|
|
43
|
+
name: 'default',
|
|
44
|
+
label: 'default',
|
|
45
|
+
code: `<Section title="白板" testId="canvas-whiteboard" />`,
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
imports: `import { Section } from "@gadmin2n/charts";`,
|
|
49
|
+
},
|
|
50
|
+
|
|
36
51
|
NumCard: {
|
|
37
52
|
code: `<NumCard variant="default" title="指标" value={0} testId="canvas-numcard" />`,
|
|
38
53
|
layout: { w: 10, h: 8, minW: 4, minH: 2 },
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { Modal, Radio, Input, Checkbox } from 'antd';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import {
|
|
5
|
-
CANVAS_MODAL_PROPS,
|
|
6
|
-
CANVAS_MODAL_TITLE_STYLE,
|
|
7
|
-
} from './canvasModalProps';
|
|
4
|
+
import { CANVAS_MODAL_PROPS } from './canvasModalProps';
|
|
8
5
|
|
|
9
6
|
export interface BarChartDataSourceResult {
|
|
10
7
|
direction: 'vertical' | 'horizontal';
|
|
@@ -63,11 +60,7 @@ const BarChartDataSourceModal: React.FC<BarChartDataSourceModalProps> = ({
|
|
|
63
60
|
return (
|
|
64
61
|
<Modal
|
|
65
62
|
{...CANVAS_MODAL_PROPS}
|
|
66
|
-
title={
|
|
67
|
-
<span style={CANVAS_MODAL_TITLE_STYLE}>
|
|
68
|
-
{t('canvas.dataSourceModal.title')}
|
|
69
|
-
</span>
|
|
70
|
-
}
|
|
63
|
+
title={t('canvas.dataSourceModal.title')}
|
|
71
64
|
open={open}
|
|
72
65
|
onOk={handleConfirm}
|
|
73
66
|
onCancel={onCancel}
|
|
@@ -76,7 +69,13 @@ const BarChartDataSourceModal: React.FC<BarChartDataSourceModalProps> = ({
|
|
|
76
69
|
>
|
|
77
70
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
|
78
71
|
<div>
|
|
79
|
-
<div
|
|
72
|
+
<div
|
|
73
|
+
style={{
|
|
74
|
+
marginBottom: 6,
|
|
75
|
+
fontSize: 13,
|
|
76
|
+
color: 'var(--ant-color-text-secondary)',
|
|
77
|
+
}}
|
|
78
|
+
>
|
|
80
79
|
方向:
|
|
81
80
|
</div>
|
|
82
81
|
<Radio.Group
|
|
@@ -102,7 +101,13 @@ const BarChartDataSourceModal: React.FC<BarChartDataSourceModalProps> = ({
|
|
|
102
101
|
</div>
|
|
103
102
|
|
|
104
103
|
<div>
|
|
105
|
-
<div
|
|
104
|
+
<div
|
|
105
|
+
style={{
|
|
106
|
+
marginBottom: 6,
|
|
107
|
+
fontSize: 13,
|
|
108
|
+
color: 'var(--ant-color-text-secondary)',
|
|
109
|
+
}}
|
|
110
|
+
>
|
|
106
111
|
数据来源描述:
|
|
107
112
|
</div>
|
|
108
113
|
<Input.TextArea
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React, { useState, useEffect, useRef } from 'react';
|
|
2
|
-
import { Modal, Input } from 'antd';
|
|
2
|
+
import { Modal, Input, Button, Typography } from 'antd';
|
|
3
|
+
import { SendOutlined } from '@ant-design/icons';
|
|
3
4
|
import type { TextAreaRef } from 'antd/es/input/TextArea';
|
|
4
|
-
|
|
5
|
+
|
|
6
|
+
const { Text } = Typography;
|
|
5
7
|
|
|
6
8
|
export interface CanvasAiModalProps {
|
|
7
9
|
/** 控制弹窗开关 */
|
|
@@ -33,7 +35,7 @@ const CanvasAiModal: React.FC<CanvasAiModalProps> = ({
|
|
|
33
35
|
}
|
|
34
36
|
}, [open]);
|
|
35
37
|
|
|
36
|
-
const
|
|
38
|
+
const handleSubmit = () => {
|
|
37
39
|
const trimmed = value.trim();
|
|
38
40
|
if (!trimmed) return;
|
|
39
41
|
onSubmit(trimmed);
|
|
@@ -42,37 +44,39 @@ const CanvasAiModal: React.FC<CanvasAiModalProps> = ({
|
|
|
42
44
|
|
|
43
45
|
return (
|
|
44
46
|
<Modal
|
|
45
|
-
|
|
46
|
-
centered
|
|
47
|
-
destroyOnClose
|
|
48
|
-
closable={false}
|
|
49
|
-
styles={{
|
|
50
|
-
header: { padding: '16px 20px 0', marginBottom: 0 },
|
|
51
|
-
body: { padding: '12px 20px 16px' },
|
|
52
|
-
footer: { padding: '0 20px 16px', borderTop: 'none' },
|
|
53
|
-
}}
|
|
47
|
+
title="AI 配置页面"
|
|
54
48
|
open={open}
|
|
55
49
|
onCancel={onClose}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
title={<span style={CANVAS_MODAL_TITLE_STYLE}>AI 配置页面</span>}
|
|
50
|
+
footer={null}
|
|
51
|
+
width={520}
|
|
52
|
+
destroyOnClose
|
|
60
53
|
>
|
|
54
|
+
<Text type="secondary" style={{ display: 'block', marginBottom: 12 }}>
|
|
55
|
+
描述你想要的页面效果,AI 将自动为你实现
|
|
56
|
+
</Text>
|
|
61
57
|
<Input.TextArea
|
|
62
58
|
ref={textAreaRef}
|
|
63
59
|
value={value}
|
|
64
|
-
placeholder="
|
|
60
|
+
placeholder="例:把所有数字卡片改成蓝色主题,图表数据改为近7天趋势"
|
|
65
61
|
onChange={(e) => setValue(e.target.value)}
|
|
66
62
|
onKeyDown={(e) => {
|
|
67
63
|
if ((e.metaKey || e.ctrlKey) && e.key === 'Enter') {
|
|
68
64
|
e.preventDefault();
|
|
69
|
-
|
|
65
|
+
handleSubmit();
|
|
70
66
|
}
|
|
71
67
|
}}
|
|
72
|
-
|
|
73
|
-
autoSize={{ minRows: 4, maxRows: 10 }}
|
|
74
|
-
allowClear
|
|
68
|
+
autoSize={{ minRows: 6, maxRows: 12 }}
|
|
75
69
|
/>
|
|
70
|
+
<Button
|
|
71
|
+
type="primary"
|
|
72
|
+
icon={<SendOutlined />}
|
|
73
|
+
onClick={handleSubmit}
|
|
74
|
+
disabled={!value.trim()}
|
|
75
|
+
style={{ marginTop: 12 }}
|
|
76
|
+
block
|
|
77
|
+
>
|
|
78
|
+
发送
|
|
79
|
+
</Button>
|
|
76
80
|
</Modal>
|
|
77
81
|
);
|
|
78
82
|
};
|
|
@@ -67,7 +67,12 @@ export function ExportModal({ open, canvasId, onClose }: ExportModalProps) {
|
|
|
67
67
|
</div>
|
|
68
68
|
) : (
|
|
69
69
|
<>
|
|
70
|
-
<p
|
|
70
|
+
<p
|
|
71
|
+
style={{
|
|
72
|
+
marginBottom: 8,
|
|
73
|
+
color: 'var(--ant-color-text-secondary)',
|
|
74
|
+
}}
|
|
75
|
+
>
|
|
71
76
|
Export URL (valid for 30 minutes):
|
|
72
77
|
</p>
|
|
73
78
|
<Input.TextArea
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { Modal, Checkbox, 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
|
+
import { CANVAS_MODAL_PROPS } from './canvasModalProps';
|
|
8
5
|
|
|
9
6
|
export interface LineChartDataSourceResult {
|
|
10
7
|
legendShow: boolean;
|
|
@@ -78,11 +75,7 @@ const LineChartDataSourceModal: React.FC<LineChartDataSourceModalProps> = ({
|
|
|
78
75
|
return (
|
|
79
76
|
<Modal
|
|
80
77
|
{...CANVAS_MODAL_PROPS}
|
|
81
|
-
title={
|
|
82
|
-
<span style={CANVAS_MODAL_TITLE_STYLE}>
|
|
83
|
-
{t('canvas.dataSourceModal.title')}
|
|
84
|
-
</span>
|
|
85
|
-
}
|
|
78
|
+
title={t('canvas.dataSourceModal.title')}
|
|
86
79
|
open={open}
|
|
87
80
|
onOk={handleConfirm}
|
|
88
81
|
onCancel={onCancel}
|
|
@@ -140,7 +133,13 @@ const LineChartDataSourceModal: React.FC<LineChartDataSourceModalProps> = ({
|
|
|
140
133
|
</Checkbox>
|
|
141
134
|
|
|
142
135
|
<div style={{ marginTop: 4 }}>
|
|
143
|
-
<div
|
|
136
|
+
<div
|
|
137
|
+
style={{
|
|
138
|
+
marginBottom: 6,
|
|
139
|
+
fontSize: 13,
|
|
140
|
+
color: 'var(--ant-color-text-secondary)',
|
|
141
|
+
}}
|
|
142
|
+
>
|
|
144
143
|
数据来源描述:
|
|
145
144
|
</div>
|
|
146
145
|
<Input.TextArea
|
|
@@ -27,10 +27,7 @@ import { CSS } from '@dnd-kit/utilities';
|
|
|
27
27
|
import { restrictToVerticalAxis } from '@dnd-kit/modifiers';
|
|
28
28
|
import type { CanvasConfigModalProps } from '../canvasConfigRegistry';
|
|
29
29
|
import type { MultiChartType } from '@gadmin2n/charts';
|
|
30
|
-
import {
|
|
31
|
-
CANVAS_MODAL_PROPS,
|
|
32
|
-
CANVAS_MODAL_TITLE_STYLE,
|
|
33
|
-
} from './canvasModalProps';
|
|
30
|
+
import { CANVAS_MODAL_PROPS } from './canvasModalProps';
|
|
34
31
|
|
|
35
32
|
// ─── 所有可选图表的元信息 ─────────────────────────────────────────────────────
|
|
36
33
|
|
|
@@ -112,7 +109,7 @@ const SortableChartItem: React.FC<SortableChartItemProps> = ({
|
|
|
112
109
|
transition,
|
|
113
110
|
opacity: isDragging ? 0.5 : 1,
|
|
114
111
|
padding: '8px 0',
|
|
115
|
-
borderBottom: '1px solid
|
|
112
|
+
borderBottom: '1px solid var(--ant-color-border-secondary)',
|
|
116
113
|
userSelect: 'none',
|
|
117
114
|
}}
|
|
118
115
|
>
|
|
@@ -120,7 +117,7 @@ const SortableChartItem: React.FC<SortableChartItemProps> = ({
|
|
|
120
117
|
{...attributes}
|
|
121
118
|
{...listeners}
|
|
122
119
|
style={{
|
|
123
|
-
color: '
|
|
120
|
+
color: 'var(--ant-color-text-quaternary)',
|
|
124
121
|
cursor: 'grab',
|
|
125
122
|
touchAction: 'none',
|
|
126
123
|
fontSize: 16,
|
|
@@ -194,7 +191,7 @@ const MultiChartConfigModal: React.FC<CanvasConfigModalProps> = ({
|
|
|
194
191
|
<Modal
|
|
195
192
|
{...CANVAS_MODAL_PROPS}
|
|
196
193
|
open
|
|
197
|
-
title=
|
|
194
|
+
title="配置图表"
|
|
198
195
|
okText="确认"
|
|
199
196
|
cancelText="取消"
|
|
200
197
|
onOk={handleOk}
|
|
@@ -18,10 +18,7 @@ import {
|
|
|
18
18
|
GlobalOutlined,
|
|
19
19
|
TableOutlined,
|
|
20
20
|
} from '@ant-design/icons';
|
|
21
|
-
import {
|
|
22
|
-
CANVAS_MODAL_PROPS,
|
|
23
|
-
CANVAS_MODAL_TITLE_STYLE,
|
|
24
|
-
} from './canvasModalProps';
|
|
21
|
+
import { CANVAS_MODAL_PROPS } from './canvasModalProps';
|
|
25
22
|
|
|
26
23
|
const { Text } = Typography;
|
|
27
24
|
|
|
@@ -286,7 +283,7 @@ const MultiChartDataSourceModal: React.FC<MultiChartDataSourceModalProps> = ({
|
|
|
286
283
|
return (
|
|
287
284
|
<Modal
|
|
288
285
|
{...CANVAS_MODAL_PROPS}
|
|
289
|
-
title=
|
|
286
|
+
title="配置复合图表数据来源"
|
|
290
287
|
open={open}
|
|
291
288
|
onOk={handleConfirm}
|
|
292
289
|
onCancel={onCancel}
|
|
@@ -298,7 +295,13 @@ const MultiChartDataSourceModal: React.FC<MultiChartDataSourceModalProps> = ({
|
|
|
298
295
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
|
299
296
|
{/* 数据描述 */}
|
|
300
297
|
<div>
|
|
301
|
-
<div
|
|
298
|
+
<div
|
|
299
|
+
style={{
|
|
300
|
+
marginBottom: 6,
|
|
301
|
+
fontSize: 13,
|
|
302
|
+
color: 'var(--ant-color-text-secondary)',
|
|
303
|
+
}}
|
|
304
|
+
>
|
|
302
305
|
数据来源描述:
|
|
303
306
|
</div>
|
|
304
307
|
<Input.TextArea
|
|
@@ -314,7 +317,13 @@ const MultiChartDataSourceModal: React.FC<MultiChartDataSourceModalProps> = ({
|
|
|
314
317
|
|
|
315
318
|
{/* 选择图表类型 */}
|
|
316
319
|
<div>
|
|
317
|
-
<div
|
|
320
|
+
<div
|
|
321
|
+
style={{
|
|
322
|
+
marginBottom: 8,
|
|
323
|
+
fontSize: 13,
|
|
324
|
+
color: 'var(--ant-color-text-secondary)',
|
|
325
|
+
}}
|
|
326
|
+
>
|
|
318
327
|
选择展示的图表类型:
|
|
319
328
|
</div>
|
|
320
329
|
<Flex wrap="wrap" gap={8}>
|
|
@@ -351,7 +360,12 @@ const MultiChartDataSourceModal: React.FC<MultiChartDataSourceModalProps> = ({
|
|
|
351
360
|
if (opt.type === 'select') {
|
|
352
361
|
return (
|
|
353
362
|
<Flex key={opt.key} align="center" gap={6}>
|
|
354
|
-
<Text
|
|
363
|
+
<Text
|
|
364
|
+
style={{
|
|
365
|
+
fontSize: 12,
|
|
366
|
+
color: 'var(--ant-color-text-tertiary)',
|
|
367
|
+
}}
|
|
368
|
+
>
|
|
355
369
|
{opt.label}:
|
|
356
370
|
</Text>
|
|
357
371
|
<Radio.Group
|
|
@@ -383,7 +397,7 @@ const MultiChartDataSourceModal: React.FC<MultiChartDataSourceModalProps> = ({
|
|
|
383
397
|
<Text
|
|
384
398
|
style={{
|
|
385
399
|
fontSize: 12,
|
|
386
|
-
color: '
|
|
400
|
+
color: 'var(--ant-color-text-tertiary)',
|
|
387
401
|
whiteSpace: 'nowrap',
|
|
388
402
|
}}
|
|
389
403
|
>
|
|
@@ -2,10 +2,7 @@ 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
|
+
import { CANVAS_MODAL_PROPS } from './canvasModalProps';
|
|
9
6
|
|
|
10
7
|
interface NumCardDataSourceModalProps {
|
|
11
8
|
open: boolean;
|
|
@@ -100,11 +97,7 @@ const NumCardDataSourceModal: React.FC<NumCardDataSourceModalProps> = ({
|
|
|
100
97
|
return (
|
|
101
98
|
<Modal
|
|
102
99
|
{...CANVAS_MODAL_PROPS}
|
|
103
|
-
title={
|
|
104
|
-
<span style={CANVAS_MODAL_TITLE_STYLE}>
|
|
105
|
-
{t('canvas.dataSourceModal.title')}
|
|
106
|
-
</span>
|
|
107
|
-
}
|
|
100
|
+
title={t('canvas.dataSourceModal.title')}
|
|
108
101
|
open={open}
|
|
109
102
|
onOk={handleConfirm}
|
|
110
103
|
onCancel={onCancel}
|
|
@@ -129,7 +122,13 @@ const NumCardDataSourceModal: React.FC<NumCardDataSourceModalProps> = ({
|
|
|
129
122
|
gap: 8,
|
|
130
123
|
}}
|
|
131
124
|
>
|
|
132
|
-
<span
|
|
125
|
+
<span
|
|
126
|
+
style={{
|
|
127
|
+
flexShrink: 0,
|
|
128
|
+
fontSize: 13,
|
|
129
|
+
color: 'var(--ant-color-text-secondary)',
|
|
130
|
+
}}
|
|
131
|
+
>
|
|
133
132
|
{t('canvas.dataSourceModal.chartRange')}
|
|
134
133
|
</span>
|
|
135
134
|
<Input
|
|
@@ -198,7 +197,13 @@ const NumCardDataSourceModal: React.FC<NumCardDataSourceModalProps> = ({
|
|
|
198
197
|
</div>
|
|
199
198
|
|
|
200
199
|
<div>
|
|
201
|
-
<div
|
|
200
|
+
<div
|
|
201
|
+
style={{
|
|
202
|
+
marginBottom: 6,
|
|
203
|
+
fontSize: 13,
|
|
204
|
+
color: 'var(--ant-color-text-secondary)',
|
|
205
|
+
}}
|
|
206
|
+
>
|
|
202
207
|
{t('canvas.dataSourceModal.descLabel')}
|
|
203
208
|
</div>
|
|
204
209
|
<Input.TextArea
|
|
@@ -1,10 +1,7 @@
|
|
|
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
|
+
import { CANVAS_MODAL_PROPS } from './canvasModalProps';
|
|
8
5
|
|
|
9
6
|
export interface PromptModalProps {
|
|
10
7
|
/** 控制弹窗开关 */
|
|
@@ -58,7 +55,7 @@ const PromptModal: React.FC<PromptModalProps> = ({
|
|
|
58
55
|
onOk={handleOk}
|
|
59
56
|
okText="确认"
|
|
60
57
|
cancelText="取消"
|
|
61
|
-
title={
|
|
58
|
+
title={label}
|
|
62
59
|
>
|
|
63
60
|
<Input.TextArea
|
|
64
61
|
ref={textAreaRef}
|
|
@@ -1,10 +1,7 @@
|
|
|
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
|
+
import { CANVAS_MODAL_PROPS } from './canvasModalProps';
|
|
8
5
|
|
|
9
6
|
interface RadarChartDataSourceModalProps {
|
|
10
7
|
open: boolean;
|
|
@@ -48,11 +45,7 @@ const RadarChartDataSourceModal: React.FC<RadarChartDataSourceModalProps> = ({
|
|
|
48
45
|
return (
|
|
49
46
|
<Modal
|
|
50
47
|
{...CANVAS_MODAL_PROPS}
|
|
51
|
-
title={
|
|
52
|
-
<span style={CANVAS_MODAL_TITLE_STYLE}>
|
|
53
|
-
{t('canvas.dataSourceModal.title')}
|
|
54
|
-
</span>
|
|
55
|
-
}
|
|
48
|
+
title={t('canvas.dataSourceModal.title')}
|
|
56
49
|
open={open}
|
|
57
50
|
onOk={handleConfirm}
|
|
58
51
|
onCancel={onCancel}
|
|
@@ -61,7 +54,13 @@ const RadarChartDataSourceModal: React.FC<RadarChartDataSourceModalProps> = ({
|
|
|
61
54
|
>
|
|
62
55
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
|
63
56
|
<div>
|
|
64
|
-
<div
|
|
57
|
+
<div
|
|
58
|
+
style={{
|
|
59
|
+
marginBottom: 6,
|
|
60
|
+
fontSize: 13,
|
|
61
|
+
color: 'var(--ant-color-text-secondary)',
|
|
62
|
+
}}
|
|
63
|
+
>
|
|
65
64
|
维度数量:{dimensionCount}
|
|
66
65
|
</div>
|
|
67
66
|
<Slider
|
|
@@ -74,7 +73,13 @@ const RadarChartDataSourceModal: React.FC<RadarChartDataSourceModalProps> = ({
|
|
|
74
73
|
</div>
|
|
75
74
|
|
|
76
75
|
<div>
|
|
77
|
-
<div
|
|
76
|
+
<div
|
|
77
|
+
style={{
|
|
78
|
+
marginBottom: 6,
|
|
79
|
+
fontSize: 13,
|
|
80
|
+
color: 'var(--ant-color-text-secondary)',
|
|
81
|
+
}}
|
|
82
|
+
>
|
|
78
83
|
数据来源描述:
|
|
79
84
|
</div>
|
|
80
85
|
<Input.TextArea
|
|
@@ -3,10 +3,7 @@ import { Modal, Table as AntTable, Checkbox, Alert } from 'antd';
|
|
|
3
3
|
import type { ColumnsType } from 'antd/es/table';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import type { CanvasConfigModalProps } from '../canvasConfigRegistry';
|
|
6
|
-
import {
|
|
7
|
-
CANVAS_MODAL_PROPS,
|
|
8
|
-
CANVAS_MODAL_TITLE_STYLE,
|
|
9
|
-
} from './canvasModalProps';
|
|
6
|
+
import { CANVAS_MODAL_PROPS } from './canvasModalProps';
|
|
10
7
|
import {
|
|
11
8
|
parseTableColumnsMeta,
|
|
12
9
|
readTableFlag,
|
|
@@ -154,11 +151,7 @@ const TableConfigModal: React.FC<CanvasConfigModalProps> = ({
|
|
|
154
151
|
{...CANVAS_MODAL_PROPS}
|
|
155
152
|
width={520}
|
|
156
153
|
open
|
|
157
|
-
title={
|
|
158
|
-
<span style={CANVAS_MODAL_TITLE_STYLE}>
|
|
159
|
-
{t('canvas.modal.columnConfigTitle', { defaultValue: '列配置' })}
|
|
160
|
-
</span>
|
|
161
|
-
}
|
|
154
|
+
title={t('canvas.modal.columnConfigTitle', { defaultValue: '列配置' })}
|
|
162
155
|
okText={t('canvas.modal.ok', { defaultValue: '确认' })}
|
|
163
156
|
cancelText={t('canvas.modal.cancel', { defaultValue: '取消' })}
|
|
164
157
|
onOk={handleOk}
|
|
@@ -2,10 +2,7 @@ import React, { useState, useEffect } from 'react';
|
|
|
2
2
|
import { Modal, Checkbox, Input, Button, Select } 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
|
+
import { CANVAS_MODAL_PROPS } from './canvasModalProps';
|
|
9
6
|
|
|
10
7
|
// ─── Types ────────────────────────────────────────────────────────────────────
|
|
11
8
|
|
|
@@ -82,11 +79,7 @@ const TableDataSourceModal: React.FC<TableDataSourceModalProps> = ({
|
|
|
82
79
|
return (
|
|
83
80
|
<Modal
|
|
84
81
|
{...CANVAS_MODAL_PROPS}
|
|
85
|
-
title={
|
|
86
|
-
<span style={CANVAS_MODAL_TITLE_STYLE}>
|
|
87
|
-
{t('canvas.dataSourceModal.title')}
|
|
88
|
-
</span>
|
|
89
|
-
}
|
|
82
|
+
title={t('canvas.dataSourceModal.title')}
|
|
90
83
|
open={open}
|
|
91
84
|
onOk={handleConfirm}
|
|
92
85
|
onCancel={onCancel}
|
|
@@ -96,7 +89,13 @@ const TableDataSourceModal: React.FC<TableDataSourceModalProps> = ({
|
|
|
96
89
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
|
97
90
|
{/* 列配置 */}
|
|
98
91
|
<div>
|
|
99
|
-
<div
|
|
92
|
+
<div
|
|
93
|
+
style={{
|
|
94
|
+
marginBottom: 8,
|
|
95
|
+
fontSize: 13,
|
|
96
|
+
color: 'var(--ant-color-text-secondary)',
|
|
97
|
+
}}
|
|
98
|
+
>
|
|
100
99
|
列配置:
|
|
101
100
|
</div>
|
|
102
101
|
{columns.map((col, index) => (
|
|
@@ -158,7 +157,13 @@ const TableDataSourceModal: React.FC<TableDataSourceModalProps> = ({
|
|
|
158
157
|
gap: 8,
|
|
159
158
|
}}
|
|
160
159
|
>
|
|
161
|
-
<span
|
|
160
|
+
<span
|
|
161
|
+
style={{
|
|
162
|
+
flexShrink: 0,
|
|
163
|
+
fontSize: 13,
|
|
164
|
+
color: 'var(--ant-color-text-secondary)',
|
|
165
|
+
}}
|
|
166
|
+
>
|
|
162
167
|
每页条数:
|
|
163
168
|
</span>
|
|
164
169
|
<Select
|
|
@@ -191,7 +196,13 @@ const TableDataSourceModal: React.FC<TableDataSourceModalProps> = ({
|
|
|
191
196
|
|
|
192
197
|
{/* 数据来源描述 */}
|
|
193
198
|
<div>
|
|
194
|
-
<div
|
|
199
|
+
<div
|
|
200
|
+
style={{
|
|
201
|
+
marginBottom: 6,
|
|
202
|
+
fontSize: 13,
|
|
203
|
+
color: 'var(--ant-color-text-secondary)',
|
|
204
|
+
}}
|
|
205
|
+
>
|
|
195
206
|
数据来源描述:
|
|
196
207
|
</div>
|
|
197
208
|
<Input.TextArea
|
|
@@ -1,24 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Canvas
|
|
2
|
+
* Canvas 编辑弹窗统一 Props
|
|
3
3
|
*
|
|
4
4
|
* 所有 Canvas 画布内的工具/配置弹窗共享这些 Modal props,
|
|
5
|
-
*
|
|
5
|
+
* 使用 antd 默认样式(标准标题、右上角关闭按钮、标准 footer)。
|
|
6
6
|
*/
|
|
7
7
|
export const CANVAS_MODAL_PROPS = {
|
|
8
|
-
width: 420,
|
|
9
|
-
centered: true,
|
|
10
8
|
destroyOnClose: true,
|
|
11
|
-
closable: false,
|
|
12
|
-
styles: {
|
|
13
|
-
header: { padding: '16px 20px 0', marginBottom: 0 },
|
|
14
|
-
body: { padding: '12px 20px 16px' },
|
|
15
|
-
footer: { padding: '0 20px 16px', borderTop: 'none' },
|
|
16
|
-
},
|
|
17
9
|
} as const;
|
|
18
|
-
|
|
19
|
-
/** 统一标题样式 */
|
|
20
|
-
export const CANVAS_MODAL_TITLE_STYLE: React.CSSProperties = {
|
|
21
|
-
fontSize: 13,
|
|
22
|
-
fontWeight: 500,
|
|
23
|
-
color: '#595959',
|
|
24
|
-
};
|