@sim-design/training 1.0.0 → 1.1.0
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/README.md +481 -15
- package/dist/{ArrowLeftOutlined-CiSQq3bL.js → ArrowLeftOutlined-BxA84GXs.js} +1 -1
- package/dist/ArrowLeftOutlined-D785XjyB.js +12 -0
- package/dist/{AssessmentPlugin-Bx4VrBdV.js → AssessmentPlugin-D_iesmyg.js} +7 -7
- package/dist/AssessmentPlugin-zRr-IsdA.js +607 -0
- package/dist/CaseAnalysisPlugin-CXuQpkPd.js +2196 -0
- package/dist/CaseAnalysisPlugin-DytlXsRD.js +2196 -0
- package/dist/CaseDetailContent-DT5nCtRT.js +28613 -0
- package/dist/CaseDetailContent-Y7Q430MG.js +28595 -0
- package/dist/{CharacterDialoguePanel-Bvdab3qj.js → CharacterDialoguePanel-CdtUl-Sv.js} +178 -139
- package/dist/CharacterDialoguePanel-D_4YNFZv.js +815 -0
- package/dist/{CheckCircleFilled-Byo8CDfW.js → CheckCircleFilled-CnslIY7j.js} +1 -1
- package/dist/CheckCircleFilled-NvZaC2sk.js +12 -0
- package/dist/DecisionMakingPlugin-B_KQUFzW.js +1385 -0
- package/dist/DecisionMakingPlugin-ILLGek3S.js +1385 -0
- package/dist/{DecisionSelectPlugin-DtQ2KV34.js → DecisionSelectPlugin-BGQiHGBK.js} +20 -11
- package/dist/DecisionSelectPlugin-Bqmh6XGh.js +872 -0
- package/dist/{DecisionShared-Dh9oeQFT.js → DecisionShared-BHq1lEqt.js} +2 -2
- package/dist/DecisionShared-Be-zKZLT.js +65 -0
- package/dist/DeleteOutlined-BvMjU7m5.js +12 -0
- package/dist/DeleteOutlined-Dqy6M2LH.js +12 -0
- package/dist/{CustomLayoutRenderer--rnQrqQ2.js → DialogueFormPlugin-BpCeFadt.js} +22724 -21631
- package/dist/DialogueFormPlugin-CXlbxX-z.js +123617 -0
- package/dist/DialoguePlugin-CO7Nzv0K.js +596 -0
- package/dist/DialoguePlugin-DDNdsylz.js +596 -0
- package/dist/DocumentReviewPlugin-2CnKQwVG.js +1967 -0
- package/dist/DocumentReviewPlugin-qYYrnjvE.js +1967 -0
- package/dist/{EyeOutlined-XvOAKlLs.js → EyeOutlined-BrKCNjui.js} +1 -1
- package/dist/EyeOutlined-CW0tYV0f.js +12 -0
- package/dist/FormFillingPlugin-C3h8ySOZ.js +969 -0
- package/dist/FormFillingPlugin-CPmd76Qr.js +969 -0
- package/dist/HolderOutlined-CH0tShWu.js +12 -0
- package/dist/HolderOutlined-Dm6TBtqf.js +12 -0
- package/dist/ModelEditor-BjEbFloQ.js +11753 -0
- package/dist/ModelEditor-CwR67DFQ.js +11753 -0
- package/dist/{ProcessOperationPlugin-IijngDlX.js → ProcessOperationPlugin-1Lz431aC.js} +12 -12
- package/dist/ProcessOperationPlugin-BkmdG3ch.js +88 -0
- package/dist/QAPlugin-0C4kpq3J.js +172 -0
- package/dist/QAPlugin-UC8uywcg.js +172 -0
- package/dist/{ReloadOutlined-Daor2m11.js → ReloadOutlined-BZ92nlYF.js} +1 -1
- package/dist/ReloadOutlined-CYoPOwLl.js +12 -0
- package/dist/{SettingOutlined-CLEOgXB-.js → SettingOutlined-F466s0Ti.js} +33 -65
- package/dist/SettingOutlined-c2hikCfN.js +60 -0
- package/dist/StarFilled-Bilmj6UK.js +28 -0
- package/dist/StarFilled-CtH30fL0.js +28 -0
- package/dist/StrategyLabPlugin-CvO07sXV.js +12445 -0
- package/dist/StrategyLabPlugin-DUqZYctQ.js +12445 -0
- package/dist/ThunderboltOutlined-BpmoCKdV.js +28 -0
- package/dist/ThunderboltOutlined-DDQFi5Cv.js +28 -0
- package/dist/TrainingModelContainer-DqCsdC7C.js +11241 -0
- package/dist/TrainingModelContainer-yi8W6KFl.js +11241 -0
- package/dist/{UndoOutlined-ChUQYUul.js → UndoOutlined-6JZVzmdX.js} +26 -42
- package/dist/UndoOutlined-Dw6_9_OL.js +68 -0
- package/dist/{WarningFilled-1Rc4hr0C.js → WarningFilled-Cy1tvuQy.js} +1 -1
- package/dist/WarningFilled-lkr453eh.js +12 -0
- package/dist/{adapters-D1FFZFoA.js → adapters-BbCnXSYo.js} +2 -2
- package/dist/{analysisTools-CXyOvSZT.js → analysisTools-Cp5-3DaU.js} +59 -12
- package/dist/creator.js +4 -2
- package/dist/designTokens-walF_QkZ.js +23 -0
- package/dist/images/healthcare/bg.jpg +0 -0
- package/dist/{index-CYjdXPgc.js → index-C71iHgSs.js} +2640 -2722
- package/dist/{index-XuBVjlmu.js → index-CBvqcbIU.js} +7214 -7643
- package/dist/index-D94YNWTb.js +433 -0
- package/dist/index-DSYmOXnQ.js +6486 -0
- package/dist/index-fP97rKeQ.js +433 -0
- package/dist/index.js +8 -6
- package/dist/judgement-xTGXlDcn.js +29 -0
- package/dist/runtime.js +1 -1
- package/dist/sortable.esm-bm_c5vmI.js +3307 -0
- package/dist/types.js +1 -1
- package/dist/useDialogueLogic-D1lkUKUZ.js +576 -0
- package/dist/useDialogueLogic-vOJ9XRNP.js +576 -0
- package/dist-types/client/src/admin/CaseDataEditor.d.ts +20 -0
- package/dist-types/client/src/admin/CaseEditor.d.ts +19 -0
- package/dist-types/client/src/admin/DialogueFormCheckRulesEditor.d.ts +11 -0
- package/dist-types/client/src/admin/DialogueFormInitDataEditor.d.ts +31 -0
- package/dist-types/client/src/admin/InitDataEditors.d.ts +7 -0
- package/dist-types/client/src/admin/ModelEditor.d.ts +11 -0
- package/dist-types/client/src/admin/ModelPreview.d.ts +13 -0
- package/dist-types/client/src/admin/OptionSelector.d.ts +32 -0
- package/dist-types/client/src/admin/StageStepEditor.d.ts +20 -0
- package/dist-types/client/src/admin/StepAnswerKeyEditor.d.ts +19 -0
- package/dist-types/client/src/admin/StepByStepCreator.d.ts +27 -0
- package/dist-types/client/src/admin/components/AbilityMapEditor.d.ts +12 -0
- package/dist-types/client/src/admin/components/CasePreview.d.ts +8 -0
- package/dist-types/client/src/admin/components/StepAbilitySelector.d.ts +9 -0
- package/dist-types/client/src/admin/constants/creatorConstants.d.ts +39 -0
- package/dist-types/client/src/admin/editors/CaseAnalysisEditor.d.ts +11 -0
- package/dist-types/client/src/admin/editors/DecisionMakingEditor.d.ts +7 -0
- package/dist-types/client/src/admin/editors/DialogueEditor.d.ts +12 -0
- package/dist-types/client/src/admin/editors/DocumentReviewEditor.d.ts +7 -0
- package/dist-types/client/src/admin/editors/DocumentReviewRuntimeRulesEditor.d.ts +15 -0
- package/dist-types/client/src/admin/editors/FormFillingEditor.d.ts +33 -0
- package/dist-types/client/src/admin/editors/ModelUIConfigEditor.d.ts +5 -0
- package/dist-types/client/src/admin/editors/QAEditor.d.ts +6 -0
- package/dist-types/client/src/admin/editors/RouterEditors.d.ts +18 -0
- package/dist-types/client/src/admin/editors/StepBriefingEditor.d.ts +14 -0
- package/dist-types/client/src/admin/editors/StrategyLabEditor.d.ts +24 -0
- package/dist-types/client/src/admin/editors/decisionEditorParts.d.ts +18 -0
- package/dist-types/client/src/admin/editors/index.d.ts +8 -0
- package/dist-types/client/src/admin/editors/shared.d.ts +17 -0
- package/dist-types/client/src/admin/hooks/useStep1Intent.d.ts +16 -0
- package/dist-types/client/src/admin/hooks/useStep2Outline.d.ts +41 -0
- package/dist-types/client/src/admin/hooks/useStep3Details.d.ts +123 -0
- package/dist-types/client/src/admin/hooks/useStep4Cases.d.ts +48 -0
- package/dist-types/client/src/admin/hooks/useStep5Validation.d.ts +16 -0
- package/dist-types/client/src/admin/landingValidation.d.ts +74 -0
- package/dist-types/client/src/admin/schemaFieldUtils.d.ts +55 -0
- package/dist-types/client/src/admin/services.d.ts +461 -0
- package/dist-types/client/src/admin/shared-editors.d.ts +31 -0
- package/dist-types/client/src/admin/types/creatorArtifacts.d.ts +140 -0
- package/dist-types/client/src/components/AbilityMapView.d.ts +15 -0
- package/dist-types/client/src/components/CaseDetail/CaseDetailContent.d.ts +12 -0
- package/dist-types/client/src/components/ConversationalDataCollector/IntentConfirmPanel.d.ts +20 -0
- package/dist-types/client/src/components/ConversationalDataCollector/index.d.ts +7 -0
- package/dist-types/client/src/components/ConversationalDataCollector/intentState.d.ts +24 -0
- package/dist-types/client/src/components/ConversationalDataCollector/types.d.ts +95 -0
- package/dist-types/client/src/components/ConversationalDataCollector/utils.d.ts +62 -0
- package/dist-types/client/src/components/CustomLayoutRenderer.d.ts +8 -0
- package/dist-types/client/src/components/MarkdownRenderer.d.ts +15 -0
- package/dist-types/client/src/components/StrategyLabScene/VisualInputComponents.d.ts +85 -0
- package/dist-types/client/src/components/StrategyLabScene/components/AdversarialView.d.ts +18 -0
- package/dist-types/client/src/components/StrategyLabScene/components/BottomBar.d.ts +22 -0
- package/dist-types/client/src/components/StrategyLabScene/components/CharacterCard.d.ts +14 -0
- package/dist-types/client/src/components/StrategyLabScene/components/CharacterDialoguePanel.d.ts +32 -0
- package/dist-types/client/src/components/StrategyLabScene/components/CollaborativeView.d.ts +20 -0
- package/dist-types/client/src/components/StrategyLabScene/components/ComparisonView.d.ts +16 -0
- package/dist-types/client/src/components/StrategyLabScene/components/DecisionInput.d.ts +27 -0
- package/dist-types/client/src/components/StrategyLabScene/components/DecisionSwitcher.d.ts +14 -0
- package/dist-types/client/src/components/StrategyLabScene/components/EvaluationReport.d.ts +13 -0
- package/dist-types/client/src/components/StrategyLabScene/components/NodeChainPanels.d.ts +32 -0
- package/dist-types/client/src/components/StrategyLabScene/components/ProgressSteps.d.ts +15 -0
- package/dist-types/client/src/components/StrategyLabScene/components/SandboxView.d.ts +19 -0
- package/dist-types/client/src/components/StrategyLabScene/components/ScenarioPanel.d.ts +17 -0
- package/dist-types/client/src/components/StrategyLabScene/components/SimulationAnimation.d.ts +13 -0
- package/dist-types/client/src/components/StrategyLabScene/components/SimulationResult.d.ts +15 -0
- package/dist-types/client/src/components/StrategyLabScene/components/StressTestView.d.ts +22 -0
- package/dist-types/client/src/components/StrategyLabScene/themeMatching.d.ts +21 -0
- package/dist-types/client/src/components/StrategyLabScene/themes/education.d.ts +45 -0
- package/dist-types/client/src/components/StrategyLabScene/themes/healthcare.d.ts +7 -0
- package/dist-types/client/src/components/StrategyLabScene/themes/index.d.ts +22 -0
- package/dist-types/client/src/components/StrategyLabScene/themes/professional.d.ts +7 -0
- package/dist-types/client/src/components/StrategyLabScene/themes/technology.d.ts +7 -0
- package/dist-types/client/src/components/StrategyLabScene/types.d.ts +82 -0
- package/dist-types/client/src/components/StrategyLabScene/views/UnifiedStrategyLabView.d.ts +72 -0
- package/dist-types/client/src/components/TrainingEngine/BriefingQAChat.d.ts +19 -0
- package/dist-types/client/src/components/TrainingEngine/CaseInfoModal.d.ts +12 -0
- package/dist-types/client/src/components/TrainingEngine/CaseSelector.d.ts +15 -0
- package/dist-types/client/src/components/TrainingEngine/ClassicView.d.ts +7 -0
- package/dist-types/client/src/components/TrainingEngine/DashboardHomePage.d.ts +7 -0
- package/dist-types/client/src/components/TrainingEngine/EnhancedStudentProfilePanel.d.ts +9 -0
- package/dist-types/client/src/components/TrainingEngine/EvaluationPanel.d.ts +8 -0
- package/dist-types/client/src/components/TrainingEngine/GlobalQAPanel.d.ts +34 -0
- package/dist-types/client/src/components/TrainingEngine/GuidanceHistoryDrawer.d.ts +7 -0
- package/dist-types/client/src/components/TrainingEngine/GuidancePanel.d.ts +3 -0
- package/dist-types/client/src/components/TrainingEngine/ImmersiveGameView.d.ts +7 -0
- package/dist-types/client/src/components/TrainingEngine/PluginRenderer.d.ts +15 -0
- package/dist-types/client/src/components/TrainingEngine/ProgressTracker.d.ts +3 -0
- package/dist-types/client/src/components/TrainingEngine/StageAssessingOverlay.d.ts +17 -0
- package/dist-types/client/src/components/TrainingEngine/StageAssessmentPanel.d.ts +10 -0
- package/dist-types/client/src/components/TrainingEngine/StepExecutor.d.ts +20 -0
- package/dist-types/client/src/components/TrainingEngine/StepNodeMap.d.ts +15 -0
- package/dist-types/client/src/components/TrainingEngine/StudentProfilePanel.d.ts +6 -0
- package/dist-types/client/src/components/TrainingEngine/ThemeContext.d.ts +8 -0
- package/dist-types/client/src/components/TrainingEngine/TrainingMaterialsSidebar.d.ts +21 -0
- package/dist-types/client/src/components/TrainingEngine/TrainingModelContainer.d.ts +42 -0
- package/dist-types/client/src/components/TrainingEngine/ViewProps.d.ts +37 -0
- package/dist-types/client/src/components/TrainingEngine/profileDataSelectors.d.ts +23 -0
- package/dist-types/client/src/components/TrainingEngine/stepInitData.d.ts +42 -0
- package/dist-types/client/src/components/TrainingEngine/targetAbilityUtils.d.ts +11 -0
- package/dist-types/client/src/components/VisualizationRenderer/ChartRenderer.d.ts +12 -0
- package/dist-types/client/src/components/VisualizationRenderer/types.d.ts +41 -0
- package/dist-types/client/src/config/appConfig.d.ts +15 -0
- package/dist-types/client/src/configs/agentConfig.d.ts +66 -0
- package/dist-types/client/src/configs/intentDiscoveryConfig.d.ts +22 -0
- package/dist-types/client/src/data/mockTrainingModel.d.ts +10 -0
- package/dist-types/client/src/hooks/useAIService.d.ts +17 -0
- package/dist-types/client/src/hooks/useDialogueLogic.d.ts +53 -0
- package/dist-types/client/src/hooks/useFormFillingLogic.d.ts +26 -0
- package/dist-types/client/src/hooks/useFormRealtimeGuidance.d.ts +45 -0
- package/dist-types/client/src/hooks/useRealtimeGuidance.d.ts +66 -0
- package/dist-types/client/src/hooks/useStageAssessment.d.ts +8 -0
- package/dist-types/client/src/hooks/useStepExecution.d.ts +14 -0
- package/dist-types/client/src/hooks/useTrainingModel.d.ts +30 -0
- package/dist-types/client/src/lib/creator.d.ts +1 -0
- package/dist-types/client/src/lib/index.d.ts +1 -0
- package/dist-types/client/src/lib/types.d.ts +113 -22
- package/dist-types/client/src/plugins/AssessmentPlugin.d.ts +8 -0
- package/dist-types/client/src/plugins/CaseAnalysisPlugin.d.ts +9 -0
- package/dist-types/client/src/plugins/CaseAnalysisPluginView.d.ts +26 -0
- package/dist-types/client/src/plugins/DecisionSelectPlugin.d.ts +8 -0
- package/dist-types/client/src/plugins/DialogueFormPlugin.d.ts +9 -0
- package/dist-types/client/src/plugins/DialogueFormPluginView.d.ts +37 -0
- package/dist-types/client/src/plugins/DialoguePlugin.d.ts +8 -0
- package/dist-types/client/src/plugins/DialoguePluginView.d.ts +44 -0
- package/dist-types/client/src/plugins/DocumentReview/DocumentCard.d.ts +47 -0
- package/dist-types/client/src/plugins/DocumentReview/LayoutComponents.d.ts +47 -0
- package/dist-types/client/src/plugins/DocumentReview/MarkListPanel.d.ts +51 -0
- package/dist-types/client/src/plugins/DocumentReview/MarkModal.d.ts +37 -0
- package/dist-types/client/src/plugins/DocumentReview/ResultPanel.d.ts +32 -0
- package/dist-types/client/src/plugins/DocumentReview/Toolbar.d.ts +31 -0
- package/dist-types/client/src/plugins/DocumentReview/designTokens.d.ts +76 -0
- package/dist-types/client/src/plugins/DocumentReviewPlugin.d.ts +14 -0
- package/dist-types/client/src/plugins/ProcessOperationPlugin.d.ts +8 -0
- package/dist-types/client/src/plugins/QAPlugin.d.ts +9 -0
- package/dist-types/client/src/plugins/StrategyLabPlugin.d.ts +7 -0
- package/dist-types/client/src/plugins/decision-making/DecisionMakingPlugin.d.ts +4 -0
- package/dist-types/client/src/plugins/decision-making/DecisionWorkspace.d.ts +23 -0
- package/dist-types/client/src/plugins/decision-making/MaterialsPanel.d.ts +18 -0
- package/dist-types/client/src/plugins/decision-making/logic.d.ts +46 -0
- package/dist-types/client/src/plugins/decision-making/scoring.d.ts +79 -0
- package/dist-types/client/src/plugins/decision-making/styles.d.ts +743 -0
- package/dist-types/client/src/plugins/decision-making/types.d.ts +179 -0
- package/dist-types/client/src/plugins/form-filling/DocumentFormLayout.d.ts +22 -0
- package/dist-types/client/src/plugins/form-filling/FormAssistPanel.d.ts +20 -0
- package/dist-types/client/src/plugins/form-filling/FormFillingPlugin.d.ts +15 -0
- package/dist-types/client/src/plugins/form-filling/forms.d.ts +28 -0
- package/dist-types/client/src/plugins/form-filling/scoring.d.ts +86 -0
- package/dist-types/client/src/plugins/form-filling/useFormFilling.d.ts +42 -0
- package/dist-types/client/src/plugins/form-filling/validationRules.d.ts +26 -0
- package/dist-types/client/src/plugins/shared/DecisionShared.d.ts +54 -0
- package/dist-types/client/src/plugins/shared/FrameworkWidget.d.ts +19 -0
- package/dist-types/client/src/plugins/shared/PluginFooter.d.ts +4 -0
- package/dist-types/client/src/plugins/shared/PluginHeader.d.ts +4 -0
- package/dist-types/client/src/plugins/shared/analysisTools.d.ts +30 -0
- package/dist-types/client/src/plugins/shared/disturbanceUtils.d.ts +5 -0
- package/dist-types/client/src/plugins/shared/index.d.ts +5 -0
- package/dist-types/client/src/plugins/shared/jsonRepair.d.ts +39 -0
- package/dist-types/client/src/plugins/shared/judgement.d.ts +46 -0
- package/dist-types/client/src/plugins/shared/nodeChain.d.ts +15 -0
- package/dist-types/client/src/plugins/shared/renderFieldGrid.d.ts +16 -0
- package/dist-types/client/src/plugins/shared/reportBlocks.d.ts +33 -0
- package/dist-types/client/src/plugins/shared/reportEvaluation.d.ts +30 -0
- package/dist-types/client/src/plugins/shared/reportExport.d.ts +12 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/BlockPropertiesPanel.d.ts +9 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/BlockToolbox.d.ts +11 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/ReportWorkbench.d.ts +20 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/SortableBlock.d.ts +15 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/factory.d.ts +14 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/outlineDraft.d.ts +7 -0
- package/dist-types/client/src/plugins/shared/simulationEngine.d.ts +112 -0
- package/dist-types/client/src/plugins/shared/simulationModes.d.ts +21 -0
- package/dist-types/client/src/plugins/shared/themes.d.ts +5 -0
- package/dist-types/client/src/plugins/shared/types.d.ts +1247 -0
- package/dist-types/client/src/services/AICommandHandler.d.ts +68 -0
- package/dist-types/client/src/services/cozeApiClient.d.ts +44 -0
- package/dist-types/client/src/services/mockApi.d.ts +48 -0
- package/dist-types/client/src/services/storageService.d.ts +88 -0
- package/dist-types/client/src/stores/abilityStore.d.ts +33 -0
- package/dist-types/client/src/stores/dialogueStore.d.ts +30 -0
- package/dist-types/client/src/stores/formRegistryStore.d.ts +45 -0
- package/dist-types/client/src/stores/guidanceStore.d.ts +17 -0
- package/dist-types/client/src/stores/stepEvidenceStore.d.ts +14 -0
- package/dist-types/client/src/stores/strategyLabStore.d.ts +46 -0
- package/dist-types/client/src/stores/trainingStore.d.ts +84 -0
- package/dist-types/client/src/types/ai-commands.d.ts +144 -0
- package/dist-types/client/src/types.d.ts +17 -0
- package/dist-types/client/src/utils/abilityMapGenerator.d.ts +27 -0
- package/dist-types/client/src/utils/formUtils.d.ts +66 -0
- package/dist-types/client/src/utils/rule-engine.d.ts +36 -0
- package/dist-types/shared/types/index.d.ts +592 -0
- package/package.json +5 -3
- package/dist/CaseAnalysisPlugin-CQvF9_zr.js +0 -416
- package/dist/DialogueFormPlugin-C9ssnVMr.js +0 -959
- package/dist/DialoguePlugin-DU00QpmQ.js +0 -416
- package/dist/DocumentReviewPlugin-HNOZY1T4.js +0 -977
- package/dist/FormFillingPlugin-DURWsioi.js +0 -445
- package/dist/ModelEditor-BPJsPR0S.js +0 -8264
- package/dist/PluginHeader-B-GESJmT.js +0 -87
- package/dist/QAPlugin-Bh_UjK1N.js +0 -184
- package/dist/RadarChart-C5ZM0kWt.js +0 -24963
- package/dist/StrategyLabPlugin-DGeZsr_7.js +0 -14361
- package/dist/ThunderboltOutlined-nH_FO_4A.js +0 -44
- package/dist/ToolOutlined-DtuNJDB2.js +0 -28
- package/dist/TrainingModelContainer-DpW-uB8O.js +0 -11883
- package/dist/WarningOutlined-5g1d66hO.js +0 -164
- package/dist/judgement-D_9i7x9S.js +0 -20
- package/dist/useDialogueLogic-IHELcN3X.js +0 -368
|
@@ -1,445 +0,0 @@
|
|
|
1
|
-
import { j as r, c as D } from "./RadarChart-C5ZM0kWt.js";
|
|
2
|
-
import { useState as J, useRef as K, useCallback as ee, useMemo as re } from "react";
|
|
3
|
-
import { Form as z, Button as M, Row as oe, Col as te, Collapse as W, Typography as Q, Card as se, Divider as ne, Steps as le, Space as ae, Alert as H, Input as U, InputNumber as ce, Select as X } from "antd";
|
|
4
|
-
import { P as ie } from "./PluginHeader-B-GESJmT.js";
|
|
5
|
-
import { a as _ } from "./judgement-D_9i7x9S.js";
|
|
6
|
-
import { u as me, C as ue } from "./CustomLayoutRenderer--rnQrqQ2.js";
|
|
7
|
-
const Y = ({ buttonText: e, theme: a, onSubmit: c }) => /* @__PURE__ */ r.jsx(z.Item, { children: /* @__PURE__ */ r.jsx(
|
|
8
|
-
M,
|
|
9
|
-
{
|
|
10
|
-
type: "primary",
|
|
11
|
-
size: "large",
|
|
12
|
-
onClick: c,
|
|
13
|
-
block: !0,
|
|
14
|
-
style: { backgroundColor: a.primaryColor, borderColor: a.primaryColor },
|
|
15
|
-
children: e
|
|
16
|
-
}
|
|
17
|
-
) });
|
|
18
|
-
function de(e, a) {
|
|
19
|
-
if (!a || a.length === 0)
|
|
20
|
-
return [{ group: null, fields: e }];
|
|
21
|
-
const c = new Map(e.map((m) => [m.name, m])), i = /* @__PURE__ */ new Set(), s = [];
|
|
22
|
-
for (const m of a) {
|
|
23
|
-
const C = m.fields.map((f) => c.get(f)).filter(Boolean);
|
|
24
|
-
C.forEach((f) => i.add(f.name)), s.push({ group: m, fields: C });
|
|
25
|
-
}
|
|
26
|
-
const n = e.filter((m) => !i.has(m.name));
|
|
27
|
-
return n.length > 0 && s.push({ group: null, fields: n }), s;
|
|
28
|
-
}
|
|
29
|
-
function P(e, a, c, i) {
|
|
30
|
-
const s = Math.floor(24 / a);
|
|
31
|
-
return /* @__PURE__ */ r.jsx(oe, { gutter: 16, children: e.map((n) => {
|
|
32
|
-
const m = Math.min((n.colSpan || 1) * s, 24);
|
|
33
|
-
return /* @__PURE__ */ r.jsx(te, { span: m, style: n.style, children: /* @__PURE__ */ r.jsx(
|
|
34
|
-
z.Item,
|
|
35
|
-
{
|
|
36
|
-
name: n.name,
|
|
37
|
-
label: n.label,
|
|
38
|
-
required: n.required,
|
|
39
|
-
validateStatus: c[n.name] ? "error" : "",
|
|
40
|
-
help: c[n.name],
|
|
41
|
-
rules: [
|
|
42
|
-
{
|
|
43
|
-
required: n.required,
|
|
44
|
-
message: `${n.label}为必填项`
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
|
-
children: i(n)
|
|
48
|
-
}
|
|
49
|
-
) }, n.name);
|
|
50
|
-
}) });
|
|
51
|
-
}
|
|
52
|
-
const { Text: V } = Q, Z = ({
|
|
53
|
-
fields: e,
|
|
54
|
-
groups: a,
|
|
55
|
-
columns: c,
|
|
56
|
-
theme: i,
|
|
57
|
-
labelLayout: s,
|
|
58
|
-
groupStyle: n,
|
|
59
|
-
formInstance: m,
|
|
60
|
-
formData: C,
|
|
61
|
-
validationErrors: f,
|
|
62
|
-
renderFormField: L,
|
|
63
|
-
onValuesChange: S,
|
|
64
|
-
onSubmit: k,
|
|
65
|
-
submitButtonText: b
|
|
66
|
-
}) => {
|
|
67
|
-
const j = de(e, a), [I, o] = J(
|
|
68
|
-
() => j.filter((t) => !t.group || t.group.defaultExpanded !== !1).map((t, u) => String(u))
|
|
69
|
-
), w = (t, u) => {
|
|
70
|
-
var $;
|
|
71
|
-
const T = (($ = t.group) == null ? void 0 : $.columns) || c, l = P(t.fields, T, f, L);
|
|
72
|
-
if (!t.group)
|
|
73
|
-
return /* @__PURE__ */ r.jsx("div", { children: l }, `ungrouped-${u}`);
|
|
74
|
-
const { title: g, description: d, style: v, collapsible: E } = t.group;
|
|
75
|
-
return n === "none" ? /* @__PURE__ */ r.jsx("div", { style: v, children: l }, t.group.key) : n === "card" ? E ? /* @__PURE__ */ r.jsx(
|
|
76
|
-
W,
|
|
77
|
-
{
|
|
78
|
-
defaultActiveKey: t.group.defaultExpanded !== !1 ? [t.group.key] : [],
|
|
79
|
-
style: { marginBottom: 16, ...v },
|
|
80
|
-
items: [{
|
|
81
|
-
key: t.group.key,
|
|
82
|
-
label: /* @__PURE__ */ r.jsxs("span", { children: [
|
|
83
|
-
g,
|
|
84
|
-
d && /* @__PURE__ */ r.jsx(V, { type: "secondary", style: { marginLeft: 8, fontSize: 12 }, children: d })
|
|
85
|
-
] }),
|
|
86
|
-
children: l
|
|
87
|
-
}]
|
|
88
|
-
},
|
|
89
|
-
t.group.key
|
|
90
|
-
) : /* @__PURE__ */ r.jsx(
|
|
91
|
-
se,
|
|
92
|
-
{
|
|
93
|
-
title: /* @__PURE__ */ r.jsxs("span", { children: [
|
|
94
|
-
g,
|
|
95
|
-
d && /* @__PURE__ */ r.jsx(V, { type: "secondary", style: { marginLeft: 8, fontSize: 12, fontWeight: "normal" }, children: d })
|
|
96
|
-
] }),
|
|
97
|
-
size: "small",
|
|
98
|
-
style: {
|
|
99
|
-
marginBottom: 16,
|
|
100
|
-
borderColor: i.borderColor,
|
|
101
|
-
borderRadius: i.borderRadius,
|
|
102
|
-
...v
|
|
103
|
-
},
|
|
104
|
-
styles: {
|
|
105
|
-
header: {
|
|
106
|
-
backgroundColor: i.headerBg,
|
|
107
|
-
color: i.headerColor
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
children: l
|
|
111
|
-
},
|
|
112
|
-
t.group.key
|
|
113
|
-
) : E ? /* @__PURE__ */ r.jsx(
|
|
114
|
-
W,
|
|
115
|
-
{
|
|
116
|
-
ghost: !0,
|
|
117
|
-
defaultActiveKey: t.group.defaultExpanded !== !1 ? [t.group.key] : [],
|
|
118
|
-
activeKey: I.includes(String(u)) ? [t.group.key] : [],
|
|
119
|
-
onChange: (O) => {
|
|
120
|
-
o(
|
|
121
|
-
(y) => O.length > 0 ? [...y, String(u)] : y.filter((x) => x !== String(u))
|
|
122
|
-
);
|
|
123
|
-
},
|
|
124
|
-
style: v,
|
|
125
|
-
items: [{
|
|
126
|
-
key: t.group.key,
|
|
127
|
-
label: /* @__PURE__ */ r.jsxs("span", { children: [
|
|
128
|
-
g,
|
|
129
|
-
d && /* @__PURE__ */ r.jsx(V, { type: "secondary", style: { marginLeft: 8, fontSize: 12 }, children: d })
|
|
130
|
-
] }),
|
|
131
|
-
children: l
|
|
132
|
-
}]
|
|
133
|
-
},
|
|
134
|
-
t.group.key
|
|
135
|
-
) : /* @__PURE__ */ r.jsxs("div", { style: v, children: [
|
|
136
|
-
/* @__PURE__ */ r.jsxs(ne, { orientation: "left", style: { marginTop: 8, marginBottom: 16 }, children: [
|
|
137
|
-
g,
|
|
138
|
-
d && /* @__PURE__ */ r.jsx(V, { type: "secondary", style: { marginLeft: 8, fontSize: 12 }, children: d })
|
|
139
|
-
] }),
|
|
140
|
-
l
|
|
141
|
-
] }, t.group.key);
|
|
142
|
-
};
|
|
143
|
-
return /* @__PURE__ */ r.jsxs(
|
|
144
|
-
z,
|
|
145
|
-
{
|
|
146
|
-
form: m,
|
|
147
|
-
layout: s,
|
|
148
|
-
labelCol: s === "horizontal" ? { span: 8 } : void 0,
|
|
149
|
-
wrapperCol: s === "horizontal" ? { span: 16 } : void 0,
|
|
150
|
-
initialValues: C,
|
|
151
|
-
onValuesChange: (t) => S(t),
|
|
152
|
-
children: [
|
|
153
|
-
j.map((t, u) => w(t, u)),
|
|
154
|
-
k && /* @__PURE__ */ r.jsx(
|
|
155
|
-
Y,
|
|
156
|
-
{
|
|
157
|
-
buttonText: b || "提交",
|
|
158
|
-
theme: i,
|
|
159
|
-
onSubmit: k
|
|
160
|
-
}
|
|
161
|
-
)
|
|
162
|
-
]
|
|
163
|
-
}
|
|
164
|
-
);
|
|
165
|
-
}, { Text: pe } = Q, ye = ({
|
|
166
|
-
fields: e,
|
|
167
|
-
groups: a,
|
|
168
|
-
columns: c,
|
|
169
|
-
theme: i,
|
|
170
|
-
labelLayout: s,
|
|
171
|
-
formInstance: n,
|
|
172
|
-
formData: m,
|
|
173
|
-
validationErrors: C,
|
|
174
|
-
renderFormField: f,
|
|
175
|
-
onValuesChange: L,
|
|
176
|
-
onSubmit: S,
|
|
177
|
-
submitButtonText: k
|
|
178
|
-
}) => {
|
|
179
|
-
const [b, j] = J(0), I = new Map(e.map((l) => [l.name, l]));
|
|
180
|
-
if (!a || a.length === 0)
|
|
181
|
-
return /* @__PURE__ */ r.jsxs(
|
|
182
|
-
z,
|
|
183
|
-
{
|
|
184
|
-
form: n,
|
|
185
|
-
layout: s,
|
|
186
|
-
labelCol: s === "horizontal" ? { span: 8 } : void 0,
|
|
187
|
-
wrapperCol: s === "horizontal" ? { span: 16 } : void 0,
|
|
188
|
-
initialValues: m,
|
|
189
|
-
onValuesChange: (l) => L(l),
|
|
190
|
-
children: [
|
|
191
|
-
P(e, c, C, f),
|
|
192
|
-
S && /* @__PURE__ */ r.jsx(
|
|
193
|
-
Y,
|
|
194
|
-
{
|
|
195
|
-
buttonText: k || "提交",
|
|
196
|
-
theme: i,
|
|
197
|
-
onSubmit: S
|
|
198
|
-
}
|
|
199
|
-
)
|
|
200
|
-
]
|
|
201
|
-
}
|
|
202
|
-
);
|
|
203
|
-
const o = a[b], w = o ? o.fields.map((l) => I.get(l)).filter(Boolean) : [], t = (o == null ? void 0 : o.columns) || c, u = async () => {
|
|
204
|
-
const l = w.map((g) => g.name);
|
|
205
|
-
try {
|
|
206
|
-
await n.validateFields(l), j((g) => Math.min(g + 1, a.length - 1));
|
|
207
|
-
} catch {
|
|
208
|
-
}
|
|
209
|
-
}, T = () => {
|
|
210
|
-
j((l) => Math.max(l - 1, 0));
|
|
211
|
-
};
|
|
212
|
-
return /* @__PURE__ */ r.jsxs("div", { children: [
|
|
213
|
-
/* @__PURE__ */ r.jsx(
|
|
214
|
-
le,
|
|
215
|
-
{
|
|
216
|
-
current: b,
|
|
217
|
-
items: a.map((l) => ({ title: l.title })),
|
|
218
|
-
style: { marginBottom: 24 },
|
|
219
|
-
size: "small"
|
|
220
|
-
}
|
|
221
|
-
),
|
|
222
|
-
/* @__PURE__ */ r.jsxs(
|
|
223
|
-
z,
|
|
224
|
-
{
|
|
225
|
-
form: n,
|
|
226
|
-
layout: s,
|
|
227
|
-
labelCol: s === "horizontal" ? { span: 8 } : void 0,
|
|
228
|
-
wrapperCol: s === "horizontal" ? { span: 16 } : void 0,
|
|
229
|
-
initialValues: m,
|
|
230
|
-
onValuesChange: (l) => L(l),
|
|
231
|
-
children: [
|
|
232
|
-
(o == null ? void 0 : o.description) && /* @__PURE__ */ r.jsx(pe, { type: "secondary", style: { display: "block", marginBottom: 16 }, children: o.description }),
|
|
233
|
-
/* @__PURE__ */ r.jsx("div", { style: o == null ? void 0 : o.style, children: P(w, t, C, f) }),
|
|
234
|
-
/* @__PURE__ */ r.jsx(z.Item, { children: /* @__PURE__ */ r.jsxs(ae, { children: [
|
|
235
|
-
b > 0 && /* @__PURE__ */ r.jsx(M, { onClick: T, children: "上一步" }),
|
|
236
|
-
b < a.length - 1 ? /* @__PURE__ */ r.jsx(
|
|
237
|
-
M,
|
|
238
|
-
{
|
|
239
|
-
type: "primary",
|
|
240
|
-
onClick: u,
|
|
241
|
-
style: {
|
|
242
|
-
backgroundColor: i.primaryColor,
|
|
243
|
-
borderColor: i.primaryColor
|
|
244
|
-
},
|
|
245
|
-
children: "下一步"
|
|
246
|
-
}
|
|
247
|
-
) : /* @__PURE__ */ r.jsx(
|
|
248
|
-
M,
|
|
249
|
-
{
|
|
250
|
-
type: "primary",
|
|
251
|
-
onClick: S,
|
|
252
|
-
style: {
|
|
253
|
-
backgroundColor: i.primaryColor,
|
|
254
|
-
borderColor: i.primaryColor
|
|
255
|
-
},
|
|
256
|
-
children: k || "提交"
|
|
257
|
-
}
|
|
258
|
-
)
|
|
259
|
-
] }) })
|
|
260
|
-
]
|
|
261
|
-
}
|
|
262
|
-
)
|
|
263
|
-
] });
|
|
264
|
-
}, { Option: he } = X, { TextArea: fe } = U, ge = {
|
|
265
|
-
form: Z,
|
|
266
|
-
stepper: ye
|
|
267
|
-
}, we = ({
|
|
268
|
-
initData: e,
|
|
269
|
-
checkRules: a,
|
|
270
|
-
onFinish: c,
|
|
271
|
-
onRealtimeData: i
|
|
272
|
-
}) => {
|
|
273
|
-
const s = (e == null ? void 0 : e.uiConfig) || {}, n = D(s.theme), m = s.layout || "form", C = s.labelLayout || "vertical", f = s.groupStyle || "divider", L = s.columns || 1, S = s.groups || [], k = s.headerVariant || "card", b = s.submitButtonText || "提交申请书", j = s.customLayoutCode, o = me(e, { onRealtimeData: i, isCustomLayout: !!j }), w = K(c), t = K(e), u = K(o);
|
|
274
|
-
w.current = c, t.current = e, u.current = o;
|
|
275
|
-
const T = ee(async () => {
|
|
276
|
-
var y, x, F, B, p;
|
|
277
|
-
try {
|
|
278
|
-
await u.current.stableOnSubmit();
|
|
279
|
-
const h = u.current.formData, R = ((y = u.current.resolvedTemplate) == null ? void 0 : y.fields) || [], q = Object.keys(h).filter(
|
|
280
|
-
(N) => h[N] != null && h[N] !== ""
|
|
281
|
-
);
|
|
282
|
-
w.current({
|
|
283
|
-
stepId: ((x = t.current) == null ? void 0 : x.stepId) || "unknown",
|
|
284
|
-
operationType: "form-submit",
|
|
285
|
-
operationData: h,
|
|
286
|
-
operationLog: [
|
|
287
|
-
{
|
|
288
|
-
action: "submit",
|
|
289
|
-
data: h,
|
|
290
|
-
timestamp: Date.now()
|
|
291
|
-
}
|
|
292
|
-
],
|
|
293
|
-
timestamp: Date.now(),
|
|
294
|
-
evidenceSummary: _({
|
|
295
|
-
sourceStepId: ((F = t.current) == null ? void 0 : F.stepId) || "unknown",
|
|
296
|
-
sourceStepName: ((B = t.current) == null ? void 0 : B.stepName) || "表单填写",
|
|
297
|
-
sourceType: "form-filling",
|
|
298
|
-
title: `${((p = t.current) == null ? void 0 : p.stepName) || "表单填写"}摘要`,
|
|
299
|
-
summary: `已完成表单填写,共 ${q.length} 个字段。`,
|
|
300
|
-
keyFacts: q.slice(0, 5).map((N) => {
|
|
301
|
-
var A;
|
|
302
|
-
return {
|
|
303
|
-
label: ((A = R.find((G) => G.name === N)) == null ? void 0 : A.label) || N,
|
|
304
|
-
value: String(h[N] ?? "")
|
|
305
|
-
};
|
|
306
|
-
})
|
|
307
|
-
})
|
|
308
|
-
});
|
|
309
|
-
} catch (h) {
|
|
310
|
-
console.error("表单提交失败:", h);
|
|
311
|
-
}
|
|
312
|
-
}, []), l = re(() => ({
|
|
313
|
-
theme: n,
|
|
314
|
-
formData: { ...o.formData },
|
|
315
|
-
onValueChange: o.stableOnValueChange,
|
|
316
|
-
onSubmit: T
|
|
317
|
-
}), [n, o.formData, o.stableOnValueChange, T]), g = async () => {
|
|
318
|
-
var y;
|
|
319
|
-
try {
|
|
320
|
-
if (await o.form.validateFields(), Object.keys(o.validationErrors).some(
|
|
321
|
-
(p) => o.validationErrors[p] && !o.validationErrors[p].startsWith("⚠️")
|
|
322
|
-
)) {
|
|
323
|
-
console.error("请修正表单错误后再提交");
|
|
324
|
-
return;
|
|
325
|
-
}
|
|
326
|
-
const F = Object.keys(o.formData).filter((p) => o.formData[p] != null && o.formData[p] !== ""), B = ((y = o.resolvedTemplate) == null ? void 0 : y.fields) || [];
|
|
327
|
-
c({
|
|
328
|
-
stepId: (e == null ? void 0 : e.stepId) || "unknown",
|
|
329
|
-
operationType: "form-submit",
|
|
330
|
-
operationData: o.formData,
|
|
331
|
-
operationLog: [
|
|
332
|
-
{
|
|
333
|
-
action: "submit",
|
|
334
|
-
data: o.formData,
|
|
335
|
-
timestamp: Date.now()
|
|
336
|
-
}
|
|
337
|
-
],
|
|
338
|
-
timestamp: Date.now(),
|
|
339
|
-
evidenceSummary: _({
|
|
340
|
-
sourceStepId: (e == null ? void 0 : e.stepId) || "unknown",
|
|
341
|
-
sourceStepName: (e == null ? void 0 : e.stepName) || "表单填写",
|
|
342
|
-
sourceType: "form-filling",
|
|
343
|
-
title: `${(e == null ? void 0 : e.stepName) || "表单填写"}摘要`,
|
|
344
|
-
summary: `已完成表单填写,共 ${F.length} 个字段。`,
|
|
345
|
-
keyFacts: F.slice(0, 5).map((p) => {
|
|
346
|
-
var h;
|
|
347
|
-
return {
|
|
348
|
-
label: ((h = B.find((R) => R.name === p)) == null ? void 0 : h.label) || p,
|
|
349
|
-
value: String(o.formData[p] ?? "")
|
|
350
|
-
};
|
|
351
|
-
})
|
|
352
|
-
})
|
|
353
|
-
});
|
|
354
|
-
} catch (x) {
|
|
355
|
-
console.error("表单验证失败:", x);
|
|
356
|
-
}
|
|
357
|
-
}, d = e == null ? void 0 : e.formTemplate, v = d == null ? void 0 : d.formName;
|
|
358
|
-
if (!d)
|
|
359
|
-
return /* @__PURE__ */ r.jsx(H, { message: "表单模板未找到", type: "error" });
|
|
360
|
-
if (!o.resolvedTemplate)
|
|
361
|
-
return /* @__PURE__ */ r.jsx(
|
|
362
|
-
H,
|
|
363
|
-
{
|
|
364
|
-
message: `表单 "${v}" 的模板未找到`,
|
|
365
|
-
description: "该表单引用了一个尚未注册的表单模板,请确保定义该表单的步骤已先执行过。",
|
|
366
|
-
type: "error",
|
|
367
|
-
showIcon: !0
|
|
368
|
-
}
|
|
369
|
-
);
|
|
370
|
-
const E = o.resolvedTemplate.fields || [], $ = ge[m] || Z, O = (y) => {
|
|
371
|
-
const x = Object.keys(y)[0], F = y[x];
|
|
372
|
-
o.handleFieldChange(x, F);
|
|
373
|
-
};
|
|
374
|
-
return j ? /* @__PURE__ */ r.jsx("div", { style: { padding: "20px", ...s.styleOverrides }, children: /* @__PURE__ */ r.jsx(
|
|
375
|
-
ue,
|
|
376
|
-
{
|
|
377
|
-
code: j,
|
|
378
|
-
scope: l
|
|
379
|
-
}
|
|
380
|
-
) }) : /* @__PURE__ */ r.jsxs("div", { style: { padding: "20px", ...s.styleOverrides }, children: [
|
|
381
|
-
/* @__PURE__ */ r.jsx(
|
|
382
|
-
ie,
|
|
383
|
-
{
|
|
384
|
-
title: o.resolvedTemplate.formName || v,
|
|
385
|
-
variant: k,
|
|
386
|
-
theme: n
|
|
387
|
-
}
|
|
388
|
-
),
|
|
389
|
-
/* @__PURE__ */ r.jsx(
|
|
390
|
-
$,
|
|
391
|
-
{
|
|
392
|
-
fields: E,
|
|
393
|
-
groups: S,
|
|
394
|
-
columns: L,
|
|
395
|
-
theme: n,
|
|
396
|
-
labelLayout: C,
|
|
397
|
-
groupStyle: f,
|
|
398
|
-
formInstance: o.form,
|
|
399
|
-
formData: o.formData,
|
|
400
|
-
validationErrors: o.validationErrors,
|
|
401
|
-
renderFormField: xe,
|
|
402
|
-
onValuesChange: O,
|
|
403
|
-
onSubmit: g,
|
|
404
|
-
submitButtonText: b
|
|
405
|
-
}
|
|
406
|
-
)
|
|
407
|
-
] });
|
|
408
|
-
};
|
|
409
|
-
function xe(e) {
|
|
410
|
-
var a;
|
|
411
|
-
switch (e.type) {
|
|
412
|
-
case "select":
|
|
413
|
-
return /* @__PURE__ */ r.jsx(X, { placeholder: `请选择${e.label}`, children: (a = e.options) == null ? void 0 : a.map((c) => /* @__PURE__ */ r.jsx(he, { value: c, children: c }, c)) });
|
|
414
|
-
case "number":
|
|
415
|
-
return /* @__PURE__ */ r.jsx(
|
|
416
|
-
ce,
|
|
417
|
-
{
|
|
418
|
-
placeholder: `请输入${e.label}`,
|
|
419
|
-
min: e.min,
|
|
420
|
-
max: e.max,
|
|
421
|
-
style: { width: "100%" }
|
|
422
|
-
}
|
|
423
|
-
);
|
|
424
|
-
case "text":
|
|
425
|
-
default:
|
|
426
|
-
return e.maxLength && e.maxLength > 30 ? /* @__PURE__ */ r.jsx(
|
|
427
|
-
fe,
|
|
428
|
-
{
|
|
429
|
-
placeholder: `请输入${e.label}`,
|
|
430
|
-
maxLength: e.maxLength,
|
|
431
|
-
rows: 4,
|
|
432
|
-
showCount: !0
|
|
433
|
-
}
|
|
434
|
-
) : /* @__PURE__ */ r.jsx(
|
|
435
|
-
U,
|
|
436
|
-
{
|
|
437
|
-
placeholder: `请输入${e.label}`,
|
|
438
|
-
maxLength: e.maxLength
|
|
439
|
-
}
|
|
440
|
-
);
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
export {
|
|
444
|
-
we as default
|
|
445
|
-
};
|