@yuku123/z-cognition-component 2.0.1 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/dist-lib/BaseInput-DHrGPDB9.js +1096 -0
  2. package/dist-lib/ClockCircleOutlined-DP6fSLgk.js +12 -0
  3. package/dist-lib/Collapse-B77SsmFh.js +523 -0
  4. package/dist-lib/{ConceptsPage-BOeKdDKI.js → ConceptsPage-DOf_CJlz.js} +13 -16
  5. package/dist-lib/DeleteOutlined-BAZSAooQ.js +12 -0
  6. package/dist-lib/{DocsPage-BZOBFp3c.js → DocsPage-CiC7TU96.js} +4 -4
  7. package/dist-lib/EllipsisOutlined-Dr4orLLw.js +1109 -0
  8. package/dist-lib/EvidenceFormList-CrE2FzHk.js +90 -0
  9. package/dist-lib/{EyeOutlined-DGSrX-0M.js → EyeOutlined-CudyDdjH.js} +1 -1
  10. package/dist-lib/ImpactPage-CYiuqy0S.js +68 -0
  11. package/dist-lib/{LeftOutlined-Cgo6Izj-.js → LeftOutlined-CJasZIyX.js} +1 -1
  12. package/dist-lib/{OntologyDetailPage-B8DyU8WW.js → OntologyDetailPage-mgK_NQxP.js} +99 -93
  13. package/dist-lib/{OntologyInferPage-CvcjxpBB.js → OntologyInferPage-NUaoaQpN.js} +38 -40
  14. package/dist-lib/{OntologyListPage-Cb0XfpWE.js → OntologyListPage-C9wH01y0.js} +47 -49
  15. package/dist-lib/OntologyMaterializePage-D_fDqYHY.js +134 -0
  16. package/dist-lib/OntologyNodesPage-5kH7RHwE.js +2844 -0
  17. package/dist-lib/{OntologyValidatePage-abQVJwzV.js → OntologyValidatePage-DtkYK_l4.js} +49 -52
  18. package/dist-lib/Pagination-BJ8wnqAa.js +1112 -0
  19. package/dist-lib/PlusOutlined-BSTPGLOH.js +21 -0
  20. package/dist-lib/{ReloadOutlined-CS-e-TmN.js → ReloadOutlined-B26pDoyV.js} +19 -10
  21. package/dist-lib/{ResolvePage-rbQ-8nNZ.js → ResolvePage-Cz9HORZ3.js} +31 -33
  22. package/dist-lib/{RotateRightOutlined-q7zp2e47.js → RotateRightOutlined-DqyspFCO.js} +1 -1
  23. package/dist-lib/Skeleton-CxFsInYI.js +671 -0
  24. package/dist-lib/Table-Civ838nE.js +20514 -0
  25. package/dist-lib/{Table-CDagah-g.js → Table-J_7eBbi7.js} +414 -414
  26. package/dist-lib/TermDetailPage-BtkOpbPT.js +263 -0
  27. package/dist-lib/{TermsPage-CuufAyuL.js → TermsPage-BuzCMYov.js} +28 -31
  28. package/dist-lib/_commonjsHelpers-DaMA6jEr.js +8 -0
  29. package/dist-lib/accessAk-CA30m5eX.js +64 -0
  30. package/dist-lib/{agents-mAJW3cEN.js → agents-eZDKzePP.js} +41 -41
  31. package/dist-lib/{ai-BcYmZiRo.js → ai-CNSn3-sd.js} +32 -32
  32. package/dist-lib/{ai-chat-share-DO7GXjG4.js → ai-chat-share-Yrqt_J6a.js} +13 -14
  33. package/dist-lib/ak-manage-DklVFT5I.js +805 -0
  34. package/dist-lib/{approval-RPDUKg9-.js → approval-B-bCSmfi.js} +25 -26
  35. package/dist-lib/{approvals-CNjxJUpR.js → approvals-B0ggYiyD.js} +42 -43
  36. package/dist-lib/{assistant-FIQQziCn.js → assistant-Of0mgMsM.js} +33 -34
  37. package/dist-lib/{assistant-history-DsEGBJnq.js → assistant-history-DcyDhUzJ.js} +5 -5
  38. package/dist-lib/{assistant-summary-B-f3k55y.js → assistant-summary-CjLaTyFz.js} +1 -1
  39. package/dist-lib/{audit-NwnH1hm5.js → audit-wDNCfmOy.js} +1 -1
  40. package/dist-lib/{bios-CRwKtcit.js → bios-CIwO1AUK.js} +128 -130
  41. package/dist-lib/callSuper-CpMOVGin.js +7 -0
  42. package/dist-lib/callSuper-CwIeyYoc.js +7 -0
  43. package/dist-lib/category-9gqNseEa.js +76 -0
  44. package/dist-lib/causal-CzAYukj9.js +789 -0
  45. package/dist-lib/{changelog-DlL5u9o4.js → changelog-CQfIMS51.js} +2 -2
  46. package/dist-lib/changelog-sKJMQrlV.js +103 -0
  47. package/dist-lib/chat-panel-BPbqKckR.js +1543 -0
  48. package/dist-lib/chunk-6KYCQHYJ-DcgZQlO5.js +1627 -0
  49. package/dist-lib/code-space-D_ZE966E.js +1070 -0
  50. package/dist-lib/{colors-sdAcAcU3.js → colors-DpKdb8L-.js} +3 -3
  51. package/dist-lib/community-9_7ExHcm.js +70 -0
  52. package/dist-lib/community-CfWXxujB.js +217 -0
  53. package/dist-lib/community-material-page-Z_EZuBPl.js +747 -0
  54. package/dist-lib/connections-Bcqsp11M.js +1065 -0
  55. package/dist-lib/context-T27uno74.js +54 -0
  56. package/dist-lib/{createForOfIteratorHelper-DEx_aTey.js → createForOfIteratorHelper-CasBzL_Q.js} +1 -1
  57. package/dist-lib/{dayjs.min-BauDENhn.js → dayjs.min-DoEf5yCX.js} +1 -1
  58. package/dist-lib/detail-CV6xp_Jp.js +84 -0
  59. package/dist-lib/{detail-Cfb-zdr9.js → detail-DioaWKWj.js} +5847 -7224
  60. package/dist-lib/{detail-Dcfg3W8B.js → detail-EyLdjGpX.js} +71 -72
  61. package/dist-lib/development-CFcOIUKc.js +167 -0
  62. package/dist-lib/{docx-preview-B5nQuTwk.js → docx-preview-D4v2g8Yg.js} +1 -1
  63. package/dist-lib/{downloads-MkyxiHxi.js → downloads-DtV5hOQv.js} +3 -4
  64. package/dist-lib/{edit-DLGAM-Vo.js → edit-NtXUNj5N.js} +262 -266
  65. package/dist-lib/{editor-BtiheUpe.js → editor-KZhj-rwT.js} +25 -26
  66. package/dist-lib/editor-page-BaxK_OYm.js +1169 -0
  67. package/dist-lib/embed-mf8t3QXh.js +51841 -0
  68. package/dist-lib/embed.css +2 -2
  69. package/dist-lib/{evaluation-Dz9bUuhS.js → evaluation-CZTpC9v3.js} +14 -15
  70. package/dist-lib/execution-B6HmOA2_.js +159 -0
  71. package/dist-lib/focus-set-lt52maBX.js +38 -0
  72. package/dist-lib/{format-UGmYKemG.js → format-CWI99NCN.js} +1 -1
  73. package/dist-lib/graph-BllA9bmL.js +44 -0
  74. package/dist-lib/graph-DHV-rdiK.js +640 -0
  75. package/dist-lib/{index-o65vKUwa.js → index--AI-htgA.js} +44 -45
  76. package/dist-lib/index-2SysmGHo.js +1166 -0
  77. package/dist-lib/{index-CJSTTgTM.js → index-3J47mTL1.js} +10 -10
  78. package/dist-lib/index-4tbtbcAt.js +550 -0
  79. package/dist-lib/index-B12ZggsE.js +77 -0
  80. package/dist-lib/{index-D3GHtSlM.js → index-B5Roo82U.js} +49 -50
  81. package/dist-lib/{index-nQSVLWfW.js → index-B7SfTpox.js} +79 -81
  82. package/dist-lib/index-BEO8itgt.js +566 -0
  83. package/dist-lib/index-BPbOPT2j.js +413 -0
  84. package/dist-lib/index-BVgdmf6r.js +2487 -0
  85. package/dist-lib/index-Bd7AGv4a.js +34 -0
  86. package/dist-lib/index-BkJjYgKD.js +5012 -0
  87. package/dist-lib/{index-DBlG9uXV.js → index-BkTegt8T.js} +513 -590
  88. package/dist-lib/{index-BGB6NawZ.js → index-Bln3mJfp.js} +2 -2
  89. package/dist-lib/index-BoCtPJD4.js +915 -0
  90. package/dist-lib/{index-DMTPsTna.js → index-BqTsLClH.js} +3 -4
  91. package/dist-lib/index-Bs4MevzC.js +16075 -0
  92. package/dist-lib/index-BsoHetYT.js +236 -0
  93. package/dist-lib/{index-9aQ4BzIK.js → index-BvJ35WL3.js} +13 -14
  94. package/dist-lib/{index-BEjXaDfk.js → index-Bw4M9KLv.js} +84 -85
  95. package/dist-lib/index-C2CV4bte.js +242 -0
  96. package/dist-lib/{index-D_Qey9G8.js → index-CF0ucN_K.js} +12 -12
  97. package/dist-lib/{index-B57Fj7Y0.js → index-CLhLA2ig.js} +92 -94
  98. package/dist-lib/{index-Vu6sPBci.js → index-CSJA8wvL.js} +301 -296
  99. package/dist-lib/index-CSnvcFg-.js +543 -0
  100. package/dist-lib/{index-C3AMwzIi.js → index-CZipVp1G.js} +1 -1
  101. package/dist-lib/{index-ounfql2z.js → index-CdJ5ggvp.js} +26 -28
  102. package/dist-lib/index-CgwK2maq.js +1987 -0
  103. package/dist-lib/{index-Bc-Vin3j.js → index-CtqUgNxs.js} +53 -55
  104. package/dist-lib/index-CvxfA0ZK.js +215 -0
  105. package/dist-lib/{index-y7jVGGI0.js → index-CwyFMPcr.js} +16 -18
  106. package/dist-lib/index-D35Ry0PG.js +1162 -0
  107. package/dist-lib/{index-c2HokEFp.js → index-D6ns_Xmf.js} +10 -11
  108. package/dist-lib/{index-DsuUGhTA.js → index-DGbjbjBY.js} +46 -48
  109. package/dist-lib/index-DKAGVWMX.js +390 -0
  110. package/dist-lib/index-DQ16Zb7x.js +546 -0
  111. package/dist-lib/index-DRcTwC17.js +418 -0
  112. package/dist-lib/index-DU6bO95v.js +2075 -0
  113. package/dist-lib/index-DaMLYomP.js +853 -0
  114. package/dist-lib/index-Dd9pPAT3.js +2192 -0
  115. package/dist-lib/{index-DuI4K5e1.js → index-DgfIEgir.js} +29 -29
  116. package/dist-lib/{index-Cy9i4Kx7.js → index-DhSCFLtV.js} +113 -117
  117. package/dist-lib/index-DxzorPvG.js +13960 -0
  118. package/dist-lib/index-If4xc1-H.js +559 -0
  119. package/dist-lib/index-QZ9JPfVR.js +251 -0
  120. package/dist-lib/index-VeAMz0iC.js +1719 -0
  121. package/dist-lib/index-mUlorJxp.js +3279 -0
  122. package/dist-lib/{index-g16g7A4k.js → index-xQmDaKK3.js} +6 -6
  123. package/dist-lib/{index-BwVZgt5s.js → index-zXwXfn-X.js} +48 -50
  124. package/dist-lib/index.js +3 -4
  125. package/dist-lib/json-field-COcz5F2R.js +196 -0
  126. package/dist-lib/{jszip.min-DcEHhn-b.js → jszip.min-dcaDnWUw.js} +1 -1
  127. package/dist-lib/{kb-form-modal-BNoIhw6B.js → kb-form-modal-D9gnvXbE.js} +67 -67
  128. package/dist-lib/{kbTeam-EgcbWseM.js → kbTeam-CorrPJFr.js} +3 -3
  129. package/dist-lib/{knowledge-base-C023dnJ-.js → knowledge-base-DJkjMFHW.js} +103 -104
  130. package/dist-lib/{knowledge-hub-B4fGCn8m.js → knowledge-hub-DKiDlaZz.js} +54 -55
  131. package/dist-lib/login-56zv4aLO.js +36 -0
  132. package/dist-lib/{markdown-lite-EvJ9Fw7X.js → markdown-lite-p1tiuSZM.js} +198 -202
  133. package/dist-lib/material-DtPASeqq.js +204 -0
  134. package/dist-lib/material-draft-markdown-281d5_GN.js +443 -0
  135. package/dist-lib/material-original-preview-CPGjdmbe.js +214 -0
  136. package/dist-lib/{material-preview-docx-CH-09KeC.js → material-preview-docx-lp_xPipj.js} +1 -1
  137. package/dist-lib/{material-preview-pdf-CKAovvpc.js → material-preview-pdf-CTSo215V.js} +7 -7
  138. package/dist-lib/{material-preview-pptx-D8XGDF-u.js → material-preview-pptx-6Byitp0J.js} +1 -1
  139. package/dist-lib/material-workspace-model-QLsU5qUO.js +328 -0
  140. package/dist-lib/{member-BUg2QYlE.js → member-Cz-OIdj9.js} +1 -1
  141. package/dist-lib/memory-reorganization-DgJnWIrW.js +8 -0
  142. package/dist-lib/memory-spaces-D-orVNR7.js +2340 -0
  143. package/dist-lib/{message-GF-w8HuR.js → message-C9gfvpGg.js} +1 -1
  144. package/dist-lib/{message-Cwj8dO78.js → message-D6FhzB7J.js} +24 -25
  145. package/dist-lib/{messages-JID13L8-.js → messages-cctmEVcG.js} +15 -16
  146. package/dist-lib/meta-DT_O4zM9.js +708 -0
  147. package/dist-lib/{metrics-CT4eLzrq.js → metrics-BNeVcI8-.js} +2 -2
  148. package/dist-lib/mobile-D8kZjfQU.js +2413 -0
  149. package/dist-lib/{monitor-Bs9BfJOj.js → monitor-DTUyqumg.js} +4 -4
  150. package/dist-lib/{monitor-CmS65YSu.js → monitor-DexMYjzF.js} +8 -8
  151. package/dist-lib/{my-access-1Yj7UloI.js → my-access-DWBV6ohp.js} +120 -132
  152. package/dist-lib/{my-permissions-yQDHPLYI.js → my-permissions-B-gJZQYM.js} +22 -23
  153. package/dist-lib/navigation-DVlyWnpD.js +102 -0
  154. package/dist-lib/{new-BgkoBnZV.js → new-JmARyD88.js} +14 -15
  155. package/dist-lib/{ontology-BPrbXPor.js → ontology-B4rkO33J.js} +50 -52
  156. package/dist-lib/ontology-dataprep-BwD5TKs2.js +322 -0
  157. package/dist-lib/{ontology-domains-Cbqnm-po.js → ontology-domains-zxFrjn0v.js} +89 -92
  158. package/dist-lib/ontology-extract-BHOxruRO.js +3199 -0
  159. package/dist-lib/ontology-extract-iR_rXxFe.js +295 -0
  160. package/dist-lib/ontology-flow-CW0SzeK7.js +456 -0
  161. package/dist-lib/ontology-flow-Dv5iQ20f.js +154 -0
  162. package/dist-lib/ontology-modeling-B9wswveh.js +510 -0
  163. package/dist-lib/ontology-modeling-hakCluBi.js +15136 -0
  164. package/dist-lib/{ontology-scenarios-D3xy6IZL.js → ontology-scenarios-C2kp7Rs-.js} +1466 -1482
  165. package/dist-lib/ontology-scenarios-DKnfydG6.js +675 -0
  166. package/dist-lib/ontology-task-config-DmnWyCCB.js +122 -0
  167. package/dist-lib/ontology-terms-BoNB-5ar.js +66 -0
  168. package/dist-lib/ontology-terms-C-NhpcIZ.js +1195 -0
  169. package/dist-lib/pages-CticGC6S.js +512 -0
  170. package/dist-lib/pages.js +3 -3
  171. package/dist-lib/{permission-fTfxpEhV.js → permission-Dq1-AOQw.js} +41 -41
  172. package/dist-lib/pipeline-layout-CJlOMXJF.js +70 -0
  173. package/dist-lib/{pptx-preview.es-AUrdYKu3.js → pptx-preview.es-D4ODiBv2.js} +2 -2
  174. package/dist-lib/preset-Bp_mvsJm.js +56827 -0
  175. package/dist-lib/{preset-gh5SGoYT.js → preset-DCNSE--Y.js} +8 -8
  176. package/dist-lib/progress-CZxOOnIs.js +778 -0
  177. package/dist-lib/{quota-BlHnhkAT.js → quota-oICQRHFU.js} +4 -4
  178. package/dist-lib/row-By17TCiW.js +154 -0
  179. package/dist-lib/runs-DQTDpPaN.js +565 -0
  180. package/dist-lib/{save-blob-B-pzX8eT.js → save-blob-CwCZE1Dn.js} +2 -2
  181. package/dist-lib/{scenario-mapping-preview-DByQXh0y.js → scenario-mapping-preview-sJtjgmry.js} +46 -48
  182. package/dist-lib/scenario-simple-form-BvKSPFzw.js +989 -0
  183. package/dist-lib/{schedule-H4_9KnRj.js → schedule-CwkPPSuT.js} +8 -8
  184. package/dist-lib/script-gYJAFobb.js +2709 -0
  185. package/dist-lib/{settings-C3PI8KYa.js → settings-CJd5Jj4y.js} +133 -134
  186. package/dist-lib/{shared-DqeN-Wbb.js → shared-DG5-VCDM.js} +1 -1
  187. package/dist-lib/{shared-utils-DN3zT9P-.js → shared-utils-CFHws1DA.js} +2 -2
  188. package/dist-lib/{skills-eGlCExr0.js → skills-lxpJ5Lzx.js} +39 -40
  189. package/dist-lib/{source-selection-BCvClzc-.js → source-selection-DJnQQckl.js} +16 -16
  190. package/dist-lib/sources-C83LpCcV.js +279 -0
  191. package/dist-lib/style-B5THvtDY.js +191 -0
  192. package/dist-lib/{task-config-DEJVJ7zK.js → task-config-BNYoOb79.js} +4 -4
  193. package/dist-lib/{tech-C-4uM9bS.js → tech-LuZvKDo6.js} +3 -4
  194. package/dist-lib/templates-a-kbCamr.js +58 -0
  195. package/dist-lib/tenant-login-COB-5h_2.js +338 -0
  196. package/dist-lib/{tools-le6miafZ.js → tools-CrA6GrY6.js} +14 -14
  197. package/dist-lib/{use-domain-access-B3pDp3s5.js → use-domain-access-ehGJBGvU.js} +15 -15
  198. package/dist-lib/{use-g6-graph-WLX0PweO.js → use-g6-graph-DfRnsBS6.js} +1 -1
  199. package/dist-lib/{use-graph-layers-Dmp7uMHO.js → use-graph-layers-CrhEeHfD.js} +48 -50
  200. package/dist-lib/use-resizable-columns-BpMCRKif.js +59 -0
  201. package/dist-lib/useBreakpoint-Cul9y9Cu.js +87 -0
  202. package/dist-lib/{useForm-Byp1LopG.js → useForm-B-dwOwJ8.js} +11 -11
  203. package/dist-lib/{version-control-panel-WT1PobuV.js → version-control-panel-mWXkC-uB.js} +26 -27
  204. package/dist-lib/{version-management-DC0k1DRg.js → version-management-nPlG7wQO.js} +6 -7
  205. package/dist-lib/{welcome-VyWLrbth.js → welcome-Cqv1-rXT.js} +3 -4
  206. package/package.json +1 -1
  207. package/dist-lib/ApartmentOutlined-M6qSurnE.js +0 -12
  208. package/dist-lib/ArrowLeftOutlined-DowsrSUj.js +0 -12
  209. package/dist-lib/EvidenceFormList-DXqqSpPV.js +0 -91
  210. package/dist-lib/ImpactPage-DyhUR6fT.js +0 -71
  211. package/dist-lib/OntologyMaterializePage-B0f9TnJa.js +0 -136
  212. package/dist-lib/OntologyNodesPage-D4MWlm6q.js +0 -1268
  213. package/dist-lib/Pagination-Dxslodkq.js +0 -1344
  214. package/dist-lib/PlusOutlined-B_dXo_97.js +0 -12
  215. package/dist-lib/SearchOutlined-puH6bCY6.js +0 -979
  216. package/dist-lib/Skeleton-DXcERb5r.js +0 -557
  217. package/dist-lib/TagsOutlined-B4_qkn6-.js +0 -20
  218. package/dist-lib/TermDetailPage-CP0D6OvA.js +0 -242
  219. package/dist-lib/TextArea-DTpTS5HL.js +0 -1897
  220. package/dist-lib/ThunderboltOutlined-Bf54AaFE.js +0 -20
  221. package/dist-lib/callSuper-DZEfdkXG.js +0 -7
  222. package/dist-lib/changelog-Dj_Pv2nc.js +0 -69
  223. package/dist-lib/chunk-YDNE64FV-DGyyfCo0.js +0 -2004
  224. package/dist-lib/context-Buz0ggsK.js +0 -710
  225. package/dist-lib/context-DpmyNOn3.js +0 -21
  226. package/dist-lib/embed-DwLg9RDW.js +0 -31148
  227. package/dist-lib/focus-set-h0YtOUB2.js +0 -427
  228. package/dist-lib/index-CaXylbQR.js +0 -3419
  229. package/dist-lib/index-Cfu1W1H6.js +0 -535
  230. package/dist-lib/index-CrMcNEAZ.js +0 -9656
  231. package/dist-lib/index-CyKWCYMK.js +0 -218
  232. package/dist-lib/index-DBtGE89a.js +0 -168
  233. package/dist-lib/index-DjFPRXl5.js +0 -1484
  234. package/dist-lib/index-DvWHYX81.js +0 -450
  235. package/dist-lib/index-HieOUSwH.js +0 -340
  236. package/dist-lib/index-bOY1cBol.js +0 -4890
  237. package/dist-lib/meta-DPp5L3Uc.js +0 -540
  238. package/dist-lib/ontology-modeling-6k-m8fzr.js +0 -38946
  239. package/dist-lib/ontology-modeling-BT-EuDCs.js +0 -1039
  240. package/dist-lib/ontology-scenarios-DWYC2yxd.js +0 -660
  241. package/dist-lib/pages-CsexFuEz.js +0 -73
  242. package/dist-lib/row-B5MnGm9M.js +0 -156
  243. package/dist-lib/scenario-simple-form-Bw-6n9Kh.js +0 -2396
  244. package/dist-lib/useClosable-BY7FgWKy.js +0 -59
@@ -0,0 +1,456 @@
1
+ import { d as Y, h as q, m as X, t as J } from "./ontology-extract-iR_rXxFe.js";
2
+ import { jsx as b, jsxs as L } from "react/jsx-runtime";
3
+ import { b as Z } from "./format-CWI99NCN.js";
4
+ import { useState as P, useEffect as W, useRef as ee, useCallback as te } from "react";
5
+ import { p as re, a as oe } from "./ontology-dataprep-BwD5TKs2.js";
6
+ import { d as ne, e as M, g as se } from "./ontology-modeling-B9wswveh.js";
7
+ import { q as ae } from "./ontology-task-config-DmnWyCCB.js";
8
+ import { g as ce } from "./ontology-terms-BoNB-5ar.js";
9
+ import { d9 as B } from "./embed-mf8t3QXh.js";
10
+ const le = "导航与执行同为图谱化 → 向量化:先写图,再同步向量。状态来自执行结果,非工单生效状态;暂不开放独立入口。", ie = ["ONTOLOGY_VECTOR_SYNC", "ONTOLOGY_INSTANCE_VECTOR_SYNC"], de = ["ONTOLOGY_SCHEMA_ITEM", "ONTOLOGY_SYNC_FILE"];
11
+ function D(e, t, r) {
12
+ return {
13
+ key: e,
14
+ label: e === "vector" ? "知识向量化" : "知识图谱化",
15
+ status: t,
16
+ summary: r,
17
+ note: le
18
+ };
19
+ }
20
+ function ue(e, t, r) {
21
+ if (!t.length) return D(e, "info", "未获取执行结果");
22
+ const n = t.filter((p) => p === "SUCCEEDED").length, d = t.filter((p) => p === "FAILED" || p === "CANCELED").length, c = t.some((p) => ["PENDING", "QUEUED", "RUNNING", "PAUSED"].includes(p ?? "")), i = t.filter((p) => p === "SKIPPED").length, f = t.filter((p) => !["SUCCEEDED", "FAILED", "CANCELED", "SKIPPED", "PENDING", "QUEUED", "RUNNING", "PAUSED"].includes(p ?? "")).length, s = d ? "failed" : c ? "active" : r || i || f ? "info" : "done", l = [`执行节点成功 ${n}/${t.length}`];
23
+ return d && l.push(`失败/取消 ${d}`), c && l.push("执行中/待执行"), i && l.push(`跳过 ${i}`), (r || f) && l.push("部分未获取执行结果"), D(e, s, l.join(" · "));
24
+ }
25
+ function fe(e, t) {
26
+ const r = [...new Map(e.filter((n) => n.orderCode).map((n) => [n.orderCode, n])).values()];
27
+ return ["graph", "vector"].map((n) => {
28
+ var i;
29
+ let d = 0;
30
+ const c = [];
31
+ for (const f of r) {
32
+ const s = t == null ? void 0 : t.scopes.find((o) => (o.scopeType === "ORDER" || !o.scopeType) && o.orderCode === f.orderCode && (!o.ontologyCode || !f.ontologyCode || o.ontologyCode === f.ontologyCode)), l = s != null && s.scopeId ? t == null ? void 0 : t.progressByScope[s.scopeId] : void 0;
33
+ if (!l || l.scopeId && l.scopeId !== (s == null ? void 0 : s.scopeId) || l.orderCode && l.orderCode !== f.orderCode) {
34
+ d += 1;
35
+ continue;
36
+ }
37
+ const p = ((i = l.nodes) == null ? void 0 : i.filter((o) => o.nodeRole === "STEP" && (n === "vector" ? ie.includes(o.handlerType ?? "") && o.targetId === f.orderCode : de.includes(o.handlerType ?? "") && !!o.targetId))) ?? [];
38
+ p.length || (d += 1), c.push(...p.map((o) => o.runStatus));
39
+ }
40
+ return ue(n, c, d);
41
+ });
42
+ }
43
+ function pe(e, t) {
44
+ const r = e && (t == null ? void 0 : t.scopes.find((c) => c.scopeType === "COLLECTION_VECTOR" && c.runCode === e.code));
45
+ let n = D("vector", "info", "未获取执行结果");
46
+ if (r) {
47
+ const c = r.failedCount ?? 0, i = r.runStatus === "COMPLETED" && !c && (r.totalCount ?? 0) > 0 && r.successCount === r.totalCount, f = ["QUEUED", "RUNNING", "PAUSED"].includes(r.runStatus ?? ""), s = c > 0 || r.runStatus === "FAILED" || r.runStatus === "CANCELED";
48
+ n = D(
49
+ "vector",
50
+ s ? "failed" : f ? "active" : i ? "done" : "info",
51
+ `${i ? "向量同步完成" : s ? "向量同步失败/取消" : f ? "向量同步中" : "未获取完整执行结果"} · 节点 ${r.successCount ?? 0}/${r.totalCount ?? 0}`
52
+ );
53
+ }
54
+ let d = D("graph", "info", "未获取执行结果");
55
+ if (e && e.succeededRows !== void 0) {
56
+ const c = e.failedRows ?? 0, i = e.status === 3 || c > 0, f = e.status === 2 && !i && e.succeededRows > 0;
57
+ d = D(
58
+ "graph",
59
+ i || e.status === 4 ? "failed" : e.status === 0 || e.status === 1 ? "active" : f ? "done" : "info",
60
+ `已写入 ${e.succeededRows} 行${i ? ` · 部分成功,失败 ${c} 行` : e.status === 4 ? " · 运行失败" : e.status === 5 ? " · 已取消" : e.status === 2 && !e.succeededRows ? " · 本轮无写入" : ""}`
61
+ );
62
+ }
63
+ return [d, n];
64
+ }
65
+ const me = {
66
+ done: "已完成",
67
+ active: "进行中",
68
+ failed: "失败",
69
+ idle: "未开始",
70
+ info: "仅展示"
71
+ };
72
+ function xe(e) {
73
+ return e.inapplicable ? "不适用" : me[e.status];
74
+ }
75
+ const Ee = 1, Ce = 2, he = [3, 4], ge = 5, Se = [6, 7];
76
+ function Te(e) {
77
+ switch (e) {
78
+ case "RUNNING":
79
+ case "QUEUED":
80
+ case "PAUSED":
81
+ case "NEEDS_REVIEW":
82
+ return "active";
83
+ case "FAILED":
84
+ return "failed";
85
+ case "COMPLETED":
86
+ return "done";
87
+ default:
88
+ return "idle";
89
+ }
90
+ }
91
+ const Ie = ["QUEUED", "RUNNING", "PAUSED"];
92
+ function be(e) {
93
+ const { runStatus: t } = e;
94
+ return t === "FAILED" ? { phase: "failed", label: "提取失败", tag: "red" } : t && Ie.includes(t) ? { phase: "extracting", label: q(t), tag: "blue" } : t === "CANCELED" ? { phase: "canceled", label: "已取消", tag: "gray" } : e.draftProposalCount ? { phase: "draft", label: "草案待提交", tag: "amber" } : e.pendingOrderCount ? { phase: "pending", label: "待审批", tag: "amber" } : e.failedOrderCount ? { phase: "failed", label: "生效失败", tag: "red" } : e.executingOrderCount ? { phase: "executing", label: "生效中", tag: "blue" } : e.effectiveOrderCount ? e.effectiveOrderCount >= e.proposalCount ? { phase: "effective", label: "已生效", tag: "green" } : { phase: "effective", label: "部分生效", tag: "amber" } : t === "NEEDS_REVIEW" ? { phase: "review", label: "待复核", tag: "amber" } : e.proposalCount ? { phase: "idle", label: "已驳回", tag: "red" } : {
95
+ phase: "idle",
96
+ label: t === "COMPLETED" ? "无提案" : "未开始",
97
+ tag: "gray"
98
+ };
99
+ }
100
+ function Ne(e) {
101
+ const t = [
102
+ Y(e.sourceKind),
103
+ `${e.roundCount ?? 0} 轮`,
104
+ `草案 ${e.draftGroupCount ?? 0} 组`
105
+ ];
106
+ return e.runStatus === "RUNNING" && e.totalCount && t.push(`节点 ${e.successCount ?? 0}/${e.totalCount}`), e.runStatus === "FAILED" && e.failedCount && t.push(`失败 ${e.failedCount} 条`), t.join(" · ");
107
+ }
108
+ function je(e, t, r, n = {}) {
109
+ var l, p;
110
+ let d = t.filter((o) => !o.conversationId).length;
111
+ const c = /* @__PURE__ */ new Map();
112
+ t.forEach((o) => {
113
+ if (!o.conversationId)
114
+ return;
115
+ const a = c.get(o.conversationId);
116
+ a ? a.push(o) : c.set(o.conversationId, [o]);
117
+ });
118
+ const i = () => ({
119
+ key: "terms",
120
+ label: "术语标化",
121
+ status: "info",
122
+ summary: r.pendingCount === void 0 ? "全域统计暂不可用" : `全域待确认 ${r.pendingCount} 条`,
123
+ note: "术语按本域统计,不按提取任务归集",
124
+ target: "terms"
125
+ }), f = [...e].sort((o, a) => O(a.createTime) - O(o.createTime)).map((o) => {
126
+ const a = o.conversationId && c.get(o.conversationId) || [];
127
+ o.conversationId && c.delete(o.conversationId);
128
+ const m = a.filter((E) => E.status === 1).length, g = a.filter((E) => E.status === 3).length, C = a.filter((E) => E.orderStatus === Ee).length, T = a.filter(
129
+ (E) => E.orderStatus === Ce
130
+ ).length, h = a.filter(
131
+ (E) => E.orderStatus !== void 0 && he.includes(E.orderStatus)
132
+ ).length, I = a.filter(
133
+ (E) => E.orderStatus === ge
134
+ ).length, R = a.filter(
135
+ (E) => E.orderStatus !== void 0 && Se.includes(E.orderStatus)
136
+ ).length, S = [];
137
+ a.length && S.push(`${a.length} 条提案`), m && S.push(`待提交 ${m}`), C && S.push(`待审批 ${C} 单`);
138
+ const y = g + T;
139
+ y && S.push(`已驳回 ${y}`), h && S.push(`执行中 ${h}`), I && S.push(`已生效 ${I}`), R && S.push(`有失败 ${R}`);
140
+ const $ = C || m ? "active" : R ? "failed" : a.length ? "done" : "idle", A = [
141
+ K(ve(o)),
142
+ {
143
+ key: "extract",
144
+ label: "结构化提取",
145
+ status: Te(o.runStatus),
146
+ summary: Ne(o),
147
+ badge: o.runStatus === "NEEDS_REVIEW" && o.draftGroupCount ? o.draftGroupCount : void 0,
148
+ note: "查看该提取任务详情",
149
+ target: "extract"
150
+ },
151
+ i(),
152
+ {
153
+ key: "approve",
154
+ label: "提案审核/标注",
155
+ status: n.proposalsFailed ? "info" : $,
156
+ summary: n.proposalsFailed ? "未获取提案结果" : S.join(" · ") || "暂无提案",
157
+ badge: C || void 0,
158
+ note: "进入提案审核/标注处理提案与工单",
159
+ target: "approve"
160
+ },
161
+ ...fe(a, n.execution)
162
+ ];
163
+ return {
164
+ key: `extract:${o.code}`,
165
+ taskKind: "extract",
166
+ task: o,
167
+ name: o.name,
168
+ overall: n.proposalsFailed ? { phase: "idle", label: "提案结果待确认", tag: "gray" } : z(be({
169
+ runStatus: o.runStatus,
170
+ proposalCount: a.length,
171
+ draftProposalCount: m,
172
+ pendingOrderCount: C,
173
+ executingOrderCount: h,
174
+ effectiveOrderCount: I,
175
+ failedOrderCount: R
176
+ }), A),
177
+ sourceLabel: Y(o.sourceKind),
178
+ createTime: o.createTime,
179
+ proposalCount: a.length,
180
+ draftProposalCount: m,
181
+ rejectedProposalCount: g,
182
+ pendingOrderCount: C,
183
+ executingOrderCount: h,
184
+ effectiveOrderCount: I,
185
+ failedOrderCount: R,
186
+ steps: V(A, n.stages, r.enabled, "extract")
187
+ };
188
+ }), s = ((p = (l = n.stages) == null ? void 0 : l.items.find((o) => o.taskCode === "COLLECTION")) == null ? void 0 : p.enabled) !== !1;
189
+ for (const o of n.collectionTasks ?? []) {
190
+ const a = [...n.collectionRuns ?? []].filter((T) => T.taskCode === o.code).sort((T, h) => O(h.startedAt) - O(T.startedAt))[0], m = (a == null ? void 0 : a.status) ?? o.lastRunStatus, g = De(m), C = [
191
+ K(ye(o)),
192
+ {
193
+ key: "collection",
194
+ label: "数据集采集",
195
+ status: m === 2 ? "done" : m === 3 || m === 4 ? "failed" : m === 0 || m === 1 ? "active" : "idle",
196
+ summary: `${g.label}${a ? ` · 成功 ${a.succeededRows ?? 0} / 失败 ${a.failedRows ?? 0} 行` : " · 未获取运行明细"}`,
197
+ target: s ? "collection" : void 0,
198
+ note: s ? "查看该采集任务的运行记录;下游状态仅对应最新一次运行" : "本域数据集采集入口已停用,请在阶段配置中开启并发布;历史运行结果仍保留"
199
+ },
200
+ i(),
201
+ Oe(),
202
+ ...pe(a, n.execution)
203
+ ];
204
+ f.push({
205
+ key: `collection:${o.code}`,
206
+ taskKind: "collection",
207
+ task: o,
208
+ run: a,
209
+ name: o.name,
210
+ overall: z(g, C),
211
+ sourceLabel: "数据集采集",
212
+ createTime: o.createTime,
213
+ steps: V(C, n.stages, r.enabled, "collection")
214
+ });
215
+ }
216
+ return f.sort((o, a) => O(a.createTime) - O(o.createTime)), c.forEach((o) => {
217
+ d += o.length;
218
+ }), { instances: f, unattachedProposalCount: d };
219
+ }
220
+ function z(e, t) {
221
+ if (e.phase !== "effective") return e;
222
+ const r = t.filter((n) => n.key === "vector" || n.key === "graph");
223
+ return r.some((n) => n.status === "failed") ? { phase: "failed", label: "生效失败", tag: "red" } : r.some((n) => n.status === "active") ? { phase: "executing", label: "生效中", tag: "blue" } : r.some((n) => n.status !== "done") ? { phase: "idle", label: "执行结果待确认", tag: "amber" } : e.label === "采集完成" ? { phase: "effective", label: "已生效", tag: "green" } : e;
224
+ }
225
+ const Re = {
226
+ extract: "EXTRACT",
227
+ terms: "TERMS",
228
+ approve: "REVIEW",
229
+ collection: "COLLECTION",
230
+ vector: "VECTOR",
231
+ graph: "GRAPH"
232
+ };
233
+ function K(e) {
234
+ return {
235
+ key: "prep",
236
+ label: "数据准备",
237
+ status: "info",
238
+ summary: e,
239
+ note: "查看该流程用到的数据来源与记录时间",
240
+ target: "prep"
241
+ };
242
+ }
243
+ function ve(e) {
244
+ var r;
245
+ const t = (r = e.sourceSummary) == null ? void 0 : r.trim();
246
+ return t || (e.roundCount ? `${e.roundCount} 轮` : "查看记录");
247
+ }
248
+ function ye(e) {
249
+ var t, r;
250
+ return ((t = e.datasetName) == null ? void 0 : t.trim()) || ((r = e.datasetCode) == null ? void 0 : r.trim()) || "查看记录";
251
+ }
252
+ function Oe() {
253
+ return { key: "approve", label: "提案审核/标注", status: "idle", summary: "暂无提案", target: "approve" };
254
+ }
255
+ function V(e, t, r, n) {
256
+ return e.map((d) => {
257
+ var s;
258
+ const c = d.key;
259
+ if (c === "prep") return d;
260
+ const i = n === "collection" && (c === "terms" || c === "approve"), f = c === "terms" ? !r : ((s = t == null ? void 0 : t.items.find((l) => l.taskCode === Re[c])) == null ? void 0 : s.enabled) === !1;
261
+ return !i && !f ? d : {
262
+ key: c,
263
+ label: d.label,
264
+ status: "idle",
265
+ summary: "不适用",
266
+ note: i ? "该阶段不适用于此类流程" : "该阶段已停用,请在阶段配置中开启并发布",
267
+ inapplicable: !0
268
+ };
269
+ });
270
+ }
271
+ function O(e) {
272
+ const t = e ? Date.parse(e.replace(" ", "T")) : 0;
273
+ return Number.isFinite(t) ? t : 0;
274
+ }
275
+ function De(e) {
276
+ switch (e) {
277
+ case 0:
278
+ return { phase: "idle", label: "采集待执行", tag: "gray" };
279
+ case 1:
280
+ return { phase: "executing", label: "采集中", tag: "blue" };
281
+ case 2:
282
+ return { phase: "effective", label: "采集完成", tag: "green" };
283
+ case 3:
284
+ return { phase: "failed", label: "采集部分成功", tag: "amber" };
285
+ case 4:
286
+ return { phase: "failed", label: "采集失败", tag: "red" };
287
+ case 5:
288
+ return { phase: "canceled", label: "采集已取消", tag: "gray" };
289
+ default:
290
+ return { phase: "idle", label: "未开始", tag: "gray" };
291
+ }
292
+ }
293
+ const Ae = {
294
+ KB: "知识库材料",
295
+ ATTACHMENT: "附件",
296
+ CHAT: "对话输入",
297
+ DATASET: "数据集"
298
+ }, Le = "审核通过前可继续追加数据;审核通过后入参记录冻结。";
299
+ function U(e) {
300
+ return `${e.kind}:${e.ref || e.name || ""}`;
301
+ }
302
+ function x(e) {
303
+ return { key: U(e), kind: e.kind, name: e.name || e.ref || "未命名材料", size: e.size };
304
+ }
305
+ function $e(e) {
306
+ var c, i, f;
307
+ const t = /* @__PURE__ */ new Set(), r = [...e.rounds].sort((s, l) => s.roundNo - l.roundNo), n = [];
308
+ for (const s of r) {
309
+ const l = [];
310
+ for (const a of s.sourceRefs ?? []) {
311
+ const m = U(a);
312
+ t.has(m) || (t.add(m), l.push(x(a)));
313
+ }
314
+ if (!(!!((c = s.sourceRefs) != null && c.length) || !!((i = s.userInput) != null && i.trim()))) continue;
315
+ (f = s.userInput) != null && f.trim() && l.push({ key: `CHAT:${s.roundNo}`, kind: "CHAT", name: s.userInput.trim() });
316
+ const o = s.rerunOf ? `(重跑第 ${s.rerunOf} 轮)` : "";
317
+ n.push({
318
+ key: `round:${s.roundNo}`,
319
+ title: `第 ${s.roundNo} 轮${o}`,
320
+ recordedAt: s.startedAt,
321
+ items: l
322
+ });
323
+ }
324
+ const d = (e.attachments ?? []).filter((s) => !t.has(U(s))).map(x);
325
+ return d.length ? [{
326
+ key: "initial",
327
+ title: "发起时",
328
+ recordedAt: e.task.createTime,
329
+ items: d
330
+ }, ...n] : n;
331
+ }
332
+ function _e(e) {
333
+ var r, n;
334
+ const t = ((r = e.datasetName) == null ? void 0 : r.trim()) || ((n = e.datasetCode) == null ? void 0 : n.trim());
335
+ return t ? [{
336
+ key: "initial",
337
+ title: "发起时",
338
+ recordedAt: e.createTime,
339
+ items: [{ key: `DATASET:${e.datasetCode || t}`, kind: "DATASET", name: t }]
340
+ }] : [];
341
+ }
342
+ function He({ records: e }) {
343
+ return e.length ? /* @__PURE__ */ L("div", { className: "of-prep", children: [
344
+ e.map((t) => /* @__PURE__ */ L("section", { className: "of-prep-record", children: [
345
+ /* @__PURE__ */ L("header", { children: [
346
+ /* @__PURE__ */ b("b", { children: t.title }),
347
+ t.recordedAt ? /* @__PURE__ */ b("span", { children: t.recordedAt }) : null
348
+ ] }),
349
+ t.items.length ? /* @__PURE__ */ b("ul", { children: t.items.map((r) => /* @__PURE__ */ L("li", { children: [
350
+ /* @__PURE__ */ b("span", { className: "of-prep-kind", children: Ae[r.kind] }),
351
+ /* @__PURE__ */ b("span", { className: "of-prep-name", children: r.name }),
352
+ r.size === void 0 ? null : /* @__PURE__ */ b("span", { className: "of-prep-size tnum", children: Z(r.size) })
353
+ ] }, r.key)) }) : /* @__PURE__ */ b("p", { children: "本轮未新增材料" })
354
+ ] }, t.key)),
355
+ /* @__PURE__ */ b("footer", { children: Le })
356
+ ] }) : /* @__PURE__ */ b("div", { className: "of-prep-empty", children: "未记录到入参" });
357
+ }
358
+ const Pe = { records: [], loading: !1, failed: !1 };
359
+ function Ye(e) {
360
+ var i, f, s;
361
+ const { taskKind: t, taskCode: r, enabled: n } = e, [d, c] = P(null);
362
+ return W(() => {
363
+ if (!n || t !== "extract" || !r) return;
364
+ let l = !0;
365
+ return X(r).then((p) => {
366
+ l && c(p ? { taskCode: r, records: $e(p), failed: !1 } : { taskCode: r, records: [], failed: !0 });
367
+ }).catch(() => {
368
+ l && c({ taskCode: r, records: [], failed: !0 });
369
+ }), () => {
370
+ l = !1;
371
+ };
372
+ }, [n, t, r]), !n || !t || !r ? Pe : t === "collection" ? {
373
+ records: _e({
374
+ datasetName: (i = e.collectionTask) == null ? void 0 : i.datasetName,
375
+ datasetCode: (f = e.collectionTask) == null ? void 0 : f.datasetCode,
376
+ createTime: (s = e.collectionTask) == null ? void 0 : s.createTime
377
+ }),
378
+ loading: !1,
379
+ failed: !1
380
+ } : !d || d.taskCode !== r ? { records: [], loading: !0, failed: !1 } : { records: d.records, loading: !1, failed: d.failed };
381
+ }
382
+ const j = 20, H = 100, Ue = 40, _ = {
383
+ tasks: [],
384
+ collectionTasks: [],
385
+ collectionRuns: [],
386
+ proposals: [],
387
+ proposalsTruncated: !1,
388
+ proposalsFailed: !1,
389
+ terms: { enabled: !1 },
390
+ execution: { scopes: [], progressByScope: {} },
391
+ loading: !0,
392
+ errors: []
393
+ };
394
+ async function N(e) {
395
+ try {
396
+ return await e;
397
+ } catch {
398
+ return;
399
+ }
400
+ }
401
+ function We(e) {
402
+ const t = B(), [r, n] = P({ version: e, domainCode: t, data: _ }), [d, c] = P(0), i = ee(0);
403
+ W(() => {
404
+ const s = ++i.current, l = () => s === i.current && B() === t;
405
+ return n({ version: e, domainCode: t, data: _ }), (async () => {
406
+ var o;
407
+ try {
408
+ const [a, m, g, C, T, h, I] = await Promise.all([
409
+ N(J({ current: 1, size: j }, { silent: !0 })),
410
+ N(re({ current: 1, size: j }, { silent: !0 })),
411
+ N(ne({ current: 1, size: 200 }, { silent: !0 })),
412
+ N(ae(void 0, { silent: !0 })),
413
+ N(ce({ silent: !0 })),
414
+ N(M({ current: 1, size: H, scopeType: "ORDER" }, { silent: !0 })),
415
+ N(M({ current: 1, size: H, scopeType: "COLLECTION_VECTOR" }, { silent: !0 }))
416
+ ]);
417
+ if (!l()) return;
418
+ const R = (a == null ? void 0 : a.records) ?? [], S = (m == null ? void 0 : m.records) ?? [], y = (g == null ? void 0 : g.records) ?? [], $ = new Set(R.map((u) => u.conversationId).filter(Boolean)), A = new Set(y.filter((u) => u.conversationId && $.has(u.conversationId)).map((u) => u.orderCode).filter(Boolean)), E = /* @__PURE__ */ new Set(), Q = ((h == null ? void 0 : h.records) ?? []).filter((u) => !u.orderCode || !A.has(u.orderCode) || E.has(u.orderCode) || u.scopeType && u.scopeType !== "ORDER" ? !1 : (E.add(u.orderCode), !!u.scopeId)).slice(0, Ue), [k, w] = await Promise.all([
419
+ Promise.all(S.map((u) => N(oe({ current: 1, size: 1, taskCode: u.code }, { silent: !0 })))),
420
+ Promise.all(Q.map(async (u) => {
421
+ const G = u.scopeId;
422
+ return [G, await N(se(G, { silent: !0 }))];
423
+ }))
424
+ ]);
425
+ if (!l()) return;
426
+ const F = ((o = C == null ? void 0 : C.items.find((u) => u.taskCode === "TERMS")) == null ? void 0 : o.enabled) === !0, v = [];
427
+ a || v.push("提取任务加载失败"), m || v.push("采集任务加载失败"), k.some((u) => !u) && v.push("采集运行加载失败"), g || v.push("提取提案进度加载失败"), (!h || !I || w.some(([, u]) => !u)) && v.push("向量/图谱执行进度加载失败"), C || v.push("阶段配置加载失败,暂按默认开关展示"), F && !T && v.push("全域术语统计加载失败"), n({ version: e, domainCode: t, data: {
428
+ tasks: R,
429
+ collectionTasks: S,
430
+ collectionRuns: k.flatMap((u) => (u == null ? void 0 : u.records) ?? []),
431
+ proposals: y,
432
+ proposalsFailed: !g,
433
+ proposalsTruncated: !!(g && g.total > y.length),
434
+ stages: C,
435
+ terms: { enabled: F, pendingCount: T == null ? void 0 : T.pendingCount },
436
+ execution: { scopes: [...(h == null ? void 0 : h.records) ?? [], ...(I == null ? void 0 : I.records) ?? []], progressByScope: Object.fromEntries(w) },
437
+ errors: v,
438
+ loading: !0
439
+ } });
440
+ } finally {
441
+ l() && n((a) => ({ ...a, data: { ...a.data, loading: !1 } }));
442
+ }
443
+ })(), () => {
444
+ i.current += 1;
445
+ };
446
+ }, [d, e, t]);
447
+ const f = te(() => c((s) => s + 1), []);
448
+ return { data: r.version === e && r.domainCode === t ? r.data : _, reload: f };
449
+ }
450
+ export {
451
+ He as F,
452
+ Ye as a,
453
+ je as b,
454
+ xe as f,
455
+ We as u
456
+ };
@@ -0,0 +1,154 @@
1
+ import { jsx as e, jsxs as n, Fragment as N } from "react/jsx-runtime";
2
+ import { useRef as F, useState as v, useEffect as L } from "react";
3
+ import { A as z, I as h, B as b, L as P, d9 as C } from "./embed-mf8t3QXh.js";
4
+ import { u as B, b as R, a as S, F as j } from "./ontology-flow-CW0SzeK7.js";
5
+ import { P as A } from "./index-CwyFMPcr.js";
6
+ function E(a, s = C()) {
7
+ const o = `/ontology/flow-instances/${a.taskKind}/${encodeURIComponent(a.task.code)}`;
8
+ return s ? `${o}?domain=${encodeURIComponent(s)}` : o;
9
+ }
10
+ function y({ step: a }) {
11
+ return /* @__PURE__ */ n(N, { children: [
12
+ /* @__PURE__ */ e("span", { className: "of-step-dot", "aria-hidden": "true" }),
13
+ /* @__PURE__ */ n("span", { className: "of-step-copy", children: [
14
+ /* @__PURE__ */ n("b", { children: [
15
+ a.label,
16
+ a.badge ? /* @__PURE__ */ e("em", { className: "of-step-badge tnum", children: a.badge }) : null
17
+ ] }),
18
+ /* @__PURE__ */ e("small", { children: a.summary })
19
+ ] })
20
+ ] });
21
+ }
22
+ function U({ instance: a, opened: s }) {
23
+ const { records: o, loading: c, failed: d } = S({
24
+ taskKind: a.taskKind,
25
+ taskCode: a.task.code,
26
+ enabled: s,
27
+ collectionTask: a.taskKind === "collection" ? a.task : void 0
28
+ });
29
+ return c ? /* @__PURE__ */ e("div", { className: "of-prep-empty", children: "正在加载入参记录…" }) : d ? /* @__PURE__ */ e("div", { className: "of-prep-empty", children: "入参记录加载失败" }) : /* @__PURE__ */ e(j, { records: o });
30
+ }
31
+ function D({ instance: a, step: s }) {
32
+ const [o, c] = v(!1);
33
+ return /* @__PURE__ */ e(
34
+ A,
35
+ {
36
+ trigger: "click",
37
+ open: o,
38
+ onOpenChange: c,
39
+ placement: "bottomLeft",
40
+ title: "数据准备",
41
+ content: /* @__PURE__ */ e(U, { instance: a, opened: o }),
42
+ children: /* @__PURE__ */ e("button", { type: "button", className: `of-step ${s.status}`, title: s.note, "data-step": s.key, children: /* @__PURE__ */ e(y, { step: s }) })
43
+ }
44
+ );
45
+ }
46
+ function V({ instance: a, expanded: s, canOpen: o, onToggle: c, onStep: d }) {
47
+ const u = { "--of-step-count": a.steps.length };
48
+ return /* @__PURE__ */ n("li", { className: "of-instance", "data-task-kind": a.taskKind, children: [
49
+ /* @__PURE__ */ n("div", { className: "of-row", children: [
50
+ /* @__PURE__ */ n("button", { type: "button", className: "of-row-toggle", "aria-expanded": s, onClick: c, children: [
51
+ /* @__PURE__ */ e(h, { name: s ? "chevron-down" : "chevron-right", size: 13 }),
52
+ /* @__PURE__ */ e("span", { className: "of-instance-name", children: a.name })
53
+ ] }),
54
+ /* @__PURE__ */ e("span", { className: `tag ${a.overall.tag} of-instance-tag`, children: a.overall.label }),
55
+ /* @__PURE__ */ e("span", { className: "of-row-meta", children: a.sourceLabel }),
56
+ /* @__PURE__ */ e("span", { className: "of-row-meta tnum", children: a.createTime || "—" }),
57
+ /* @__PURE__ */ e(P, { className: "of-row-link", to: E(a), children: "查看详情" })
58
+ ] }),
59
+ s ? a.steps.length ? /* @__PURE__ */ e("ol", { className: "of-chain", style: u, "aria-label": `${a.name} 流程进度`, children: a.steps.map((i, l) => {
60
+ const m = !!i.target && (i.target !== "extract" && i.target !== "collection" || o);
61
+ return /* @__PURE__ */ n("li", { children: [
62
+ i.key === "prep" ? /* @__PURE__ */ e(D, { instance: a, step: i }) : /* @__PURE__ */ e(
63
+ "button",
64
+ {
65
+ type: "button",
66
+ className: `of-step ${i.status}${m ? "" : " locked"}`,
67
+ title: i.note,
68
+ "data-step": i.key,
69
+ "aria-disabled": m ? void 0 : !0,
70
+ onClick: () => d(i),
71
+ children: /* @__PURE__ */ e(y, { step: i })
72
+ }
73
+ ),
74
+ l < a.steps.length - 1 ? /* @__PURE__ */ e(h, { className: "of-chain-sep", name: "chevron-right", size: 12 }) : null
75
+ ] }, i.key);
76
+ }) }) : /* @__PURE__ */ e("span", { className: "of-instance-meta", children: "本域未启用此链路的展示阶段" }) : null
77
+ ] });
78
+ }
79
+ function Q({ onCreateTask: a, onChangeView: s, onOpenTask: o, onOpenCollectionTask: c, version: d, focusToken: u }) {
80
+ const { message: i } = z.useApp(), { data: l, reload: m } = B(d), p = F(null), [w, k] = v([]);
81
+ L(() => {
82
+ if (!u) return;
83
+ const t = p.current;
84
+ if (!t) return;
85
+ t.scrollIntoView({ behavior: "smooth", block: "start" }), t.classList.add("of-instances-focus");
86
+ const r = window.setTimeout(() => t.classList.remove("of-instances-focus"), 1600);
87
+ return () => {
88
+ window.clearTimeout(r), t.classList.remove("of-instances-focus");
89
+ };
90
+ }, [u]);
91
+ const { instances: f, unattachedProposalCount: g } = R(l.tasks, l.proposals, l.terms, l), I = (t) => {
92
+ k((r) => r.includes(t) ? r.filter((K) => K !== t) : [...r, t]);
93
+ }, x = (t) => {
94
+ t.taskKind === "extract" ? o == null || o(t.task.code) : c == null || c(t.task.code);
95
+ }, $ = (t, r) => {
96
+ r.target === "extract" || r.target === "collection" ? x(t) : r.target === "terms" || r.target === "approve" ? s(r.target) : i.info(r.note ?? "该阶段暂不支持查看");
97
+ };
98
+ return /* @__PURE__ */ e("div", { className: "view ontology-flow", children: /* @__PURE__ */ n("div", { className: "of-body", children: [
99
+ l.errors.length ? /* @__PURE__ */ n("div", { className: "of-notice", role: "status", children: [
100
+ /* @__PURE__ */ e(h, { name: "alert-triangle", size: 15 }),
101
+ /* @__PURE__ */ n("span", { children: [
102
+ l.errors.join(";"),
103
+ "。"
104
+ ] }),
105
+ /* @__PURE__ */ e("button", { type: "button", onClick: m, children: "重试" })
106
+ ] }) : null,
107
+ /* @__PURE__ */ n("section", { ref: p, className: "of-instances", "aria-label": "流程实例", "aria-busy": l.loading, children: [
108
+ /* @__PURE__ */ n("header", { className: "of-instances-head", children: [
109
+ /* @__PURE__ */ e("b", { children: "流程实例" }),
110
+ /* @__PURE__ */ e("span", { children: "点行展开阶段链" }),
111
+ /* @__PURE__ */ e("div", { className: "of-instances-actions", children: /* @__PURE__ */ e(b, { size: "small", icon: /* @__PURE__ */ e(h, { name: "refresh", size: 13 }), loading: l.loading, onClick: m, children: "刷新" }) })
112
+ ] }),
113
+ /* @__PURE__ */ n("div", { className: "of-instances-hints", children: [
114
+ /* @__PURE__ */ e("span", { children: f.length ? `${f.length} 个任务 · 按创建时间由新到旧(缺失时间置后)` : "一个任务即一条流程链路" }),
115
+ l.proposalsTruncated ? /* @__PURE__ */ n("span", { className: "hint", children: [
116
+ "提案超过 ",
117
+ l.proposals.length,
118
+ " 条,仅统计最近部分"
119
+ ] }) : null,
120
+ g ? /* @__PURE__ */ n("span", { className: "hint", children: [
121
+ g,
122
+ " 条提案未挂当前窗口任务(人工、导入或窗口外),见提案审核/标注"
123
+ ] }) : null
124
+ ] }),
125
+ l.loading ? /* @__PURE__ */ e("div", { className: "of-empty", role: "status", children: "正在加载流程实例…" }) : f.length ? /* @__PURE__ */ n(N, { children: [
126
+ /* @__PURE__ */ n("div", { className: "of-list-head", children: [
127
+ /* @__PURE__ */ e("span", { children: "实例" }),
128
+ /* @__PURE__ */ e("span", { children: "状态" }),
129
+ /* @__PURE__ */ e("span", { children: "来源" }),
130
+ /* @__PURE__ */ e("span", { children: "创建时间" }),
131
+ /* @__PURE__ */ e("span", { children: "操作" })
132
+ ] }),
133
+ /* @__PURE__ */ e("ul", { className: "of-instance-list", children: f.map((t) => /* @__PURE__ */ e(
134
+ V,
135
+ {
136
+ instance: t,
137
+ expanded: w.includes(t.key),
138
+ canOpen: !!(t.taskKind === "extract" ? o : c),
139
+ onToggle: () => I(t.key),
140
+ onStep: (r) => $(t, r)
141
+ },
142
+ t.key
143
+ )) })
144
+ ] }) : /* @__PURE__ */ n("div", { className: "of-empty", children: [
145
+ /* @__PURE__ */ e(h, { name: "inbox", size: 22 }),
146
+ /* @__PURE__ */ e("b", { children: l.errors.length ? "流程实例暂不可用,请重试" : "还没有流程实例" }),
147
+ !l.errors.length && a ? /* @__PURE__ */ e(b, { size: "small", type: "primary", onClick: a, children: "新建流程" }) : null
148
+ ] })
149
+ ] })
150
+ ] }) });
151
+ }
152
+ export {
153
+ Q as default
154
+ };