@yuku123/z-cognition-component 2.0.2 → 2.0.4
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/BaseInput-rxw05EpT.js +1096 -0
- package/dist-lib/ClockCircleOutlined-DqK04lTb.js +12 -0
- package/dist-lib/Collapse-D9XOithE.js +523 -0
- package/dist-lib/{ConceptsPage-BOeKdDKI.js → ConceptsPage-DOf_CJlz.js} +13 -16
- package/dist-lib/DeleteOutlined-DnGmqa7C.js +12 -0
- package/dist-lib/{DocsPage-BZOBFp3c.js → DocsPage-CiC7TU96.js} +4 -4
- package/dist-lib/EllipsisOutlined-VzQrhleP.js +1109 -0
- package/dist-lib/EvidenceFormList-CrE2FzHk.js +90 -0
- package/dist-lib/{EyeOutlined-DGSrX-0M.js → EyeOutlined-CIFgRd6d.js} +4 -4
- package/dist-lib/ImpactPage-CYiuqy0S.js +68 -0
- package/dist-lib/{LeftOutlined-Cgo6Izj-.js → LeftOutlined-Be44-JWT.js} +1 -1
- package/dist-lib/{OntologyDetailPage-B8DyU8WW.js → OntologyDetailPage-mgK_NQxP.js} +99 -93
- package/dist-lib/{OntologyInferPage-CvcjxpBB.js → OntologyInferPage-NUaoaQpN.js} +38 -40
- package/dist-lib/{OntologyListPage-Cb0XfpWE.js → OntologyListPage-C9wH01y0.js} +47 -49
- package/dist-lib/OntologyMaterializePage-D_fDqYHY.js +134 -0
- package/dist-lib/OntologyNodesPage-5kH7RHwE.js +2844 -0
- package/dist-lib/{OntologyValidatePage-abQVJwzV.js → OntologyValidatePage-DtkYK_l4.js} +49 -52
- package/dist-lib/Pagination-BuFXTevS.js +1112 -0
- package/dist-lib/PlusOutlined-BSTPGLOH.js +21 -0
- package/dist-lib/{ReloadOutlined-CS-e-TmN.js → ReloadOutlined-B26pDoyV.js} +19 -10
- package/dist-lib/{ResolvePage-rbQ-8nNZ.js → ResolvePage-Cz9HORZ3.js} +31 -33
- package/dist-lib/{RotateRightOutlined-q7zp2e47.js → RotateRightOutlined-CYlCNRvD.js} +1 -1
- package/dist-lib/Skeleton-CxFsInYI.js +671 -0
- package/dist-lib/Table-Civ838nE.js +20514 -0
- package/dist-lib/{Table-CDagah-g.js → Table-D1RvQXGM.js} +414 -414
- package/dist-lib/TermDetailPage-BtkOpbPT.js +263 -0
- package/dist-lib/{TermsPage-CuufAyuL.js → TermsPage-BuzCMYov.js} +28 -31
- package/dist-lib/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist-lib/accessAk-DlxcvD0O.js +64 -0
- package/dist-lib/{agents-CvgRLQw2.js → agents-CabJdV6W.js} +46 -46
- package/dist-lib/{ai-DYDhijtn.js → ai-DZ6fqUyK.js} +32 -32
- package/dist-lib/{ai-chat-share-DJnybJtS.js → ai-chat-share-CYSU7UlK.js} +13 -14
- package/dist-lib/ak-manage-MTp2UyyK.js +805 -0
- package/dist-lib/{approval-3IbhY8Lp.js → approval-F9OYS1Ov.js} +25 -26
- package/dist-lib/{approvals-Cd6CVzz4.js → approvals-DDEl02-L.js} +42 -43
- package/dist-lib/{assistant-cIXgilaE.js → assistant-CcC1rvys.js} +48 -49
- package/dist-lib/{assistant-history-BQzH4ChB.js → assistant-history-fmy8IsJL.js} +5 -5
- package/dist-lib/{assistant-summary-LKTj_HKM.js → assistant-summary-kuK5-mku.js} +1 -1
- package/dist-lib/{audit-CxuJ5unU.js → audit-C0GYByqU.js} +1 -1
- package/dist-lib/{bios-BplnCOF4.js → bios-_axkM_DR.js} +128 -130
- package/dist-lib/callSuper-CuPJalb0.js +7 -0
- package/dist-lib/callSuper-CwIeyYoc.js +7 -0
- package/dist-lib/category-BPLw60Ia.js +76 -0
- package/dist-lib/causal-CcWolsb5.js +789 -0
- package/dist-lib/{changelog-BoGqt_81.js → changelog-BQdmpq5H.js} +2 -2
- package/dist-lib/changelog-DC6nlUDh.js +103 -0
- package/dist-lib/chat-panel-CgpP4Xf5.js +1543 -0
- package/dist-lib/chunk-6KYCQHYJ-DcgZQlO5.js +1627 -0
- package/dist-lib/code-space-CZ3CzVcA.js +1070 -0
- package/dist-lib/{colors-sdAcAcU3.js → colors-BsFEfaVs.js} +1 -1
- package/dist-lib/community-D9mD_Tq1.js +217 -0
- package/dist-lib/community-ESJc4qtl.js +70 -0
- package/dist-lib/community-material-page-Ct5uMwhv.js +747 -0
- package/dist-lib/connections-DrxmCfe3.js +1065 -0
- package/dist-lib/context-T27uno74.js +54 -0
- package/dist-lib/{createForOfIteratorHelper-DEx_aTey.js → createForOfIteratorHelper-3K1vcDqi.js} +1 -1
- package/dist-lib/{dayjs.min-BauDENhn.js → dayjs.min-DoEf5yCX.js} +1 -1
- package/dist-lib/{detail-Cx5c4KJH.js → detail-DXOJf57e.js} +39 -40
- package/dist-lib/detail-kPAVlzm3.js +84 -0
- package/dist-lib/{detail-BaX7WiWV.js → detail-lGslEB8s.js} +5847 -7224
- package/dist-lib/development-aLXXcLcF.js +167 -0
- package/dist-lib/{docx-preview-B5nQuTwk.js → docx-preview-D4v2g8Yg.js} +1 -1
- package/dist-lib/{downloads-C3Oz04OW.js → downloads-DFOEFvX6.js} +3 -4
- package/dist-lib/{edit-Cbn2eJaJ.js → edit-BbtVK23D.js} +200 -204
- package/dist-lib/{editor-mtaJBQXz.js → editor-DbLQFOUf.js} +25 -26
- package/dist-lib/editor-page-B_H0fRAI.js +1169 -0
- package/dist-lib/embed-BUaR8PAn.js +51816 -0
- package/dist-lib/embed.css +2 -2
- package/dist-lib/{evaluation-BoHiY8yT.js → evaluation-8Tx-3UQh.js} +14 -15
- package/dist-lib/execution-Dz5dBEFl.js +159 -0
- package/dist-lib/focus-set-lt52maBX.js +38 -0
- package/dist-lib/{format-UGmYKemG.js → format-CWI99NCN.js} +1 -1
- package/dist-lib/graph-BllA9bmL.js +44 -0
- package/dist-lib/graph-DacHEbKr.js +640 -0
- package/dist-lib/index-4tbtbcAt.js +550 -0
- package/dist-lib/index-B6G8CZ1v.js +915 -0
- package/dist-lib/index-BDWjubAD.js +390 -0
- package/dist-lib/{index-BEjXaDfk.js → index-BI-rknta.js} +53 -54
- package/dist-lib/index-BLGPH51v.js +251 -0
- package/dist-lib/index-BMv3kGDG.js +236 -0
- package/dist-lib/{index-CHBNrCMy.js → index-BOB3j3H_.js} +29 -29
- package/dist-lib/index-BU2GXuww.js +413 -0
- package/dist-lib/index-BVgdmf6r.js +2487 -0
- package/dist-lib/index-BWmgE7bB.js +2075 -0
- package/dist-lib/{index-B57Fj7Y0.js → index-Be_iqVpx.js} +50 -52
- package/dist-lib/{index-y7jVGGI0.js → index-Bf8IQq4A.js} +21 -23
- package/dist-lib/{index-DsuUGhTA.js → index-Bi7O9pQv.js} +177 -179
- package/dist-lib/index-Bs4MevzC.js +16075 -0
- package/dist-lib/{index-DBlG9uXV.js → index-Bt9F-2Fl.js} +520 -597
- package/dist-lib/{index-Cj4DDWyj.js → index-BtW_nQBU.js} +10 -11
- package/dist-lib/{index-CyKWCYMK.js → index-BuGHtvxH.js} +81 -84
- package/dist-lib/{index-Bc-Vin3j.js → index-CDxeB8C4.js} +47 -49
- package/dist-lib/index-CNBwau86.js +1166 -0
- package/dist-lib/{index-9aQ4BzIK.js → index-CS6H40rM.js} +24 -25
- package/dist-lib/index-CSnvcFg-.js +543 -0
- package/dist-lib/{index-o65vKUwa.js → index-CSoMwNHq.js} +82 -83
- package/dist-lib/{index-C3AMwzIi.js → index-CZipVp1G.js} +1 -1
- package/dist-lib/index-CdNxm2We.js +1987 -0
- package/dist-lib/{index-DMTPsTna.js → index-CjFA5T3K.js} +3 -4
- package/dist-lib/{index-Bm1sK-VN.js → index-D23tZfhi.js} +10 -10
- package/dist-lib/index-D35Ry0PG.js +1162 -0
- package/dist-lib/index-D7nLwQye.js +5012 -0
- package/dist-lib/index-DQ16Zb7x.js +546 -0
- package/dist-lib/{index-BwVZgt5s.js → index-DR9LGJpi.js} +46 -48
- package/dist-lib/index-DRcTwC17.js +418 -0
- package/dist-lib/index-DTgboCiF.js +566 -0
- package/dist-lib/index-Dd9pPAT3.js +2192 -0
- package/dist-lib/{index-Vu6sPBci.js → index-Ddx6XQu5.js} +285 -280
- package/dist-lib/index-Di2bQwQn.js +242 -0
- package/dist-lib/{index-Cy9i4Kx7.js → index-DlqhOJnd.js} +101 -105
- package/dist-lib/index-DxzorPvG.js +13960 -0
- package/dist-lib/{index-CLTfICbf.js → index-GQGXGr9M.js} +6 -6
- package/dist-lib/{index-nQSVLWfW.js → index-IB3GOib9.js} +81 -83
- package/dist-lib/index-If4xc1-H.js +559 -0
- package/dist-lib/index-Pcxp_AYe.js +1719 -0
- package/dist-lib/{index-ounfql2z.js → index-QkktEus5.js} +25 -27
- package/dist-lib/{index-B22_2Dzh.js → index-fVCVIu8I.js} +2 -2
- package/dist-lib/{index-D3GHtSlM.js → index-jHh-ITBK.js} +28 -29
- package/dist-lib/index-keRQ37lH.js +853 -0
- package/dist-lib/index-mUlorJxp.js +3279 -0
- package/dist-lib/{index-BSlCGnzo.js → index-n6hK1r_G.js} +12 -12
- package/dist-lib/index-qYfXuLnZ.js +34 -0
- package/dist-lib/index-yPMzsLHL.js +77 -0
- package/dist-lib/index.js +3 -4
- package/dist-lib/json-field-Bu-gFb6c.js +196 -0
- package/dist-lib/{jszip.min-DcEHhn-b.js → jszip.min-dcaDnWUw.js} +1 -1
- package/dist-lib/{kb-form-modal-B0rM1ZvV.js → kb-form-modal-DsXpXfNT.js} +64 -63
- package/dist-lib/{kbTeam-Bh_FQH28.js → kbTeam-D8hsAHI5.js} +3 -3
- package/dist-lib/{knowledge-base-Cl1Ka1e6.js → knowledge-base-D2XMD7iI.js} +111 -111
- package/dist-lib/{knowledge-hub-CPuzdRiq.js → knowledge-hub-BoBR8-j-.js} +52 -53
- package/dist-lib/login-B4C374Y_.js +36 -0
- package/dist-lib/{markdown-lite-Cu62Fl7J.js → markdown-lite-ROKlyMXg.js} +156 -160
- package/dist-lib/material-CqtPqoZj.js +204 -0
- package/dist-lib/material-draft-markdown-BKlKt3pc.js +443 -0
- package/dist-lib/material-original-preview-pzANkVK5.js +214 -0
- package/dist-lib/{material-preview-docx-CH-09KeC.js → material-preview-docx-lp_xPipj.js} +1 -1
- package/dist-lib/{material-preview-pptx-D8XGDF-u.js → material-preview-pptx-6Byitp0J.js} +1 -1
- package/dist-lib/material-workspace-model-BUpogooV.js +328 -0
- package/dist-lib/{member-DKDx77PD.js → member-CCTFfLDC.js} +1 -1
- package/dist-lib/memory-reorganization-CBTDCRhV.js +8 -0
- package/dist-lib/memory-spaces-CZGIBlz2.js +2340 -0
- package/dist-lib/{message-BrooQ3Q7.js → message-Chq3cAdy.js} +24 -25
- package/dist-lib/{message-Dievi8Jw.js → message-Rz7LvGMk.js} +1 -1
- package/dist-lib/{messages-xTNmTS9g.js → messages-DciGawgR.js} +15 -16
- package/dist-lib/meta-BWgVxZgd.js +708 -0
- package/dist-lib/{metrics-DiHYqBKB.js → metrics-iWreq4IL.js} +2 -2
- package/dist-lib/mobile-CNrK04Ak.js +2413 -0
- package/dist-lib/{monitor-BBCu3zRe.js → monitor-BpUJZCht.js} +8 -8
- package/dist-lib/{monitor-BXsdMJSV.js → monitor-CaTKbDI1.js} +4 -4
- package/dist-lib/{my-access-CEGErUgv.js → my-access-ZH5CWVGF.js} +120 -132
- package/dist-lib/{my-permissions-wSr5zv7g.js → my-permissions-edhi0lav.js} +22 -23
- package/dist-lib/navigation-2WdPUP2T.js +102 -0
- package/dist-lib/{new-BevAuTe5.js → new-Dq6mvU2w.js} +14 -15
- package/dist-lib/{ontology-DXGSJC-y.js → ontology-BX6X1X2J.js} +50 -52
- package/dist-lib/ontology-dataprep-BjMnFRBG.js +322 -0
- package/dist-lib/{ontology-domains-jTG7CZm8.js → ontology-domains-B7AuwW8S.js} +100 -103
- package/dist-lib/ontology-extract-FpJ6K8z6.js +295 -0
- package/dist-lib/ontology-extract-wbvBwGZO.js +3199 -0
- package/dist-lib/ontology-flow-CJsIvS35.js +456 -0
- package/dist-lib/ontology-flow-Cgi8Fk-i.js +154 -0
- package/dist-lib/ontology-modeling-C_6GvHBT.js +15136 -0
- package/dist-lib/ontology-modeling-CeDS1-FE.js +510 -0
- package/dist-lib/ontology-scenarios-4Ar7Y8Kt.js +675 -0
- package/dist-lib/{ontology-scenarios-J5kw6xgi.js → ontology-scenarios-BaYN82pv.js} +1289 -1305
- package/dist-lib/ontology-task-config-CDt7NdIq.js +122 -0
- package/dist-lib/ontology-terms-CnFarWZX.js +66 -0
- package/dist-lib/ontology-terms-CxTp2Dcq.js +1195 -0
- package/dist-lib/pages-CticGC6S.js +512 -0
- package/dist-lib/pages.js +3 -3
- package/dist-lib/{permission-BUXo69Ne.js → permission-CNqwhyF3.js} +41 -41
- package/dist-lib/pipeline-layout-CJlOMXJF.js +70 -0
- package/dist-lib/{pptx-preview.es-AUrdYKu3.js → pptx-preview.es-D4ODiBv2.js} +2 -2
- package/dist-lib/preset-Bp_mvsJm.js +56827 -0
- package/dist-lib/{preset-gh5SGoYT.js → preset-CfByvcqu.js} +8 -8
- package/dist-lib/progress-ImhDvynO.js +778 -0
- package/dist-lib/{quota-D31cXjul.js → quota-B38BWyPo.js} +4 -3
- package/dist-lib/row-DeVE0t_N.js +154 -0
- package/dist-lib/runs-ILSUwEOv.js +565 -0
- package/dist-lib/{save-blob-CiWNK-cX.js → save-blob-C5BbV45B.js} +2 -2
- package/dist-lib/{scenario-mapping-preview-DQ_OBV4Z.js → scenario-mapping-preview-7v1SRE7V.js} +43 -45
- package/dist-lib/scenario-simple-form-mFm6f2ho.js +989 -0
- package/dist-lib/{schedule-BktxwX3S.js → schedule-DzB9rZrm.js} +8 -8
- package/dist-lib/script-CKdVDsYh.js +2709 -0
- package/dist-lib/{settings-dsB3H65I.js → settings-CaihqQtz.js} +121 -121
- package/dist-lib/{shared-CTCzvhyE.js → shared-B51Q5536.js} +1 -1
- package/dist-lib/{shared-utils-BstybhBG.js → shared-utils-Ck5sql2m.js} +2 -2
- package/dist-lib/{skills-CHPlMsgO.js → skills-By3A0Dc1.js} +39 -40
- package/dist-lib/{source-selection-tXqc855k.js → source-selection-sIKyG7xR.js} +16 -16
- package/dist-lib/sources-DvIMColY.js +279 -0
- package/dist-lib/style-BHQZmWlH.js +191 -0
- package/dist-lib/{task-config-BiTOiZj0.js → task-config-CoPFj_FN.js} +4 -4
- package/dist-lib/{tech-BKlGPkV0.js → tech-BJgEEFrT.js} +3 -4
- package/dist-lib/templates-CODaf2QI.js +58 -0
- package/dist-lib/tenant-login-DmN4qfah.js +338 -0
- package/dist-lib/{tools-CouQ4FWk.js → tools-CyRz1Ofg.js} +14 -14
- package/dist-lib/use-current-tenant-otPCQ3X8.js +22 -0
- package/dist-lib/{use-domain-access-BPlNfoiP.js → use-domain-access-BuD99GTw.js} +15 -15
- package/dist-lib/{use-g6-graph-WLX0PweO.js → use-g6-graph-C5h9frJM.js} +1 -1
- package/dist-lib/{use-graph-layers-ja-ZIC_R.js → use-graph-layers-Cbd3Jggb.js} +48 -50
- package/dist-lib/use-resizable-columns-BpMCRKif.js +59 -0
- package/dist-lib/useBreakpoint-B8dF3ifo.js +87 -0
- package/dist-lib/{useForm-Byp1LopG.js → useForm-BZkiMeaN.js} +9 -9
- package/dist-lib/{version-control-panel-CkBm36Yk.js → version-control-panel-HdMlbpbO.js} +26 -27
- package/dist-lib/{version-management-B4kIbdVc.js → version-management-BYoxw4GV.js} +6 -7
- package/dist-lib/{welcome-F5iZoFB1.js → welcome-CMNXQf8J.js} +3 -4
- package/package.json +1 -1
- package/dist-lib/ApartmentOutlined-M6qSurnE.js +0 -12
- package/dist-lib/ArrowLeftOutlined-DowsrSUj.js +0 -12
- package/dist-lib/EvidenceFormList-DXqqSpPV.js +0 -91
- package/dist-lib/ImpactPage-DyhUR6fT.js +0 -71
- package/dist-lib/OntologyMaterializePage-B0f9TnJa.js +0 -136
- package/dist-lib/OntologyNodesPage-D4MWlm6q.js +0 -1268
- package/dist-lib/Pagination-Dxslodkq.js +0 -1344
- package/dist-lib/PlusOutlined-B_dXo_97.js +0 -12
- package/dist-lib/SearchOutlined-puH6bCY6.js +0 -979
- package/dist-lib/Skeleton-DXcERb5r.js +0 -557
- package/dist-lib/TagsOutlined-B4_qkn6-.js +0 -20
- package/dist-lib/TermDetailPage-CP0D6OvA.js +0 -242
- package/dist-lib/TextArea-DTpTS5HL.js +0 -1897
- package/dist-lib/ThunderboltOutlined-Bf54AaFE.js +0 -20
- package/dist-lib/callSuper-DZEfdkXG.js +0 -7
- package/dist-lib/changelog-Cn81Dvgk.js +0 -69
- package/dist-lib/chunk-YDNE64FV-DGyyfCo0.js +0 -2004
- package/dist-lib/context-Buz0ggsK.js +0 -710
- package/dist-lib/context-DpmyNOn3.js +0 -21
- package/dist-lib/embed-CR8XVkMy.js +0 -31148
- package/dist-lib/focus-set-h0YtOUB2.js +0 -427
- package/dist-lib/index-CaXylbQR.js +0 -3419
- package/dist-lib/index-Cfu1W1H6.js +0 -535
- package/dist-lib/index-CrMcNEAZ.js +0 -9656
- package/dist-lib/index-DBtGE89a.js +0 -168
- package/dist-lib/index-DjFPRXl5.js +0 -1484
- package/dist-lib/index-DvWHYX81.js +0 -450
- package/dist-lib/index-PBT9GksC.js +0 -340
- package/dist-lib/index-bOY1cBol.js +0 -4890
- package/dist-lib/meta-BD_qYTZu.js +0 -540
- package/dist-lib/ontology-modeling-CjRsa-DR.js +0 -1039
- package/dist-lib/ontology-modeling-DOj68TuI.js +0 -38946
- package/dist-lib/ontology-scenarios-CcAagMiP.js +0 -660
- package/dist-lib/pages-CsexFuEz.js +0 -73
- package/dist-lib/row-B5MnGm9M.js +0 -156
- package/dist-lib/scenario-simple-form-DESMvU7A.js +0 -2396
- package/dist-lib/useClosable-BY7FgWKy.js +0 -59
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as r, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { I as d } from "./embed-
|
|
2
|
+
import { I as d } from "./embed-BUaR8PAn.js";
|
|
3
3
|
function o({ enabled: e }) {
|
|
4
4
|
return /* @__PURE__ */ n("span", { className: `tag sm ${e ? "green" : "amber"}`, children: e ? "已启用" : "已停用" });
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { O as u } from "./ai-
|
|
1
|
+
import { q as f } from "./embed-BUaR8PAn.js";
|
|
2
|
+
import { O as u } from "./ai-DZ6fqUyK.js";
|
|
3
3
|
import { useState as s, useEffect as l } from "react";
|
|
4
4
|
const d = /^[a-zA-Z][a-zA-Z0-9_-]{1,63}$/, m = "字母开头,仅字母、数字、下划线、连字符,2–64 位";
|
|
5
5
|
function _(e) {
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { A as
|
|
4
|
-
import { j as
|
|
5
|
-
import { A as
|
|
6
|
-
import { u as
|
|
2
|
+
import { u as H, g as W, I as i, Q as R, t as f, k as G, j as J } from "./embed-BUaR8PAn.js";
|
|
3
|
+
import { A as V, s as X } from "./save-blob-C5BbV45B.js";
|
|
4
|
+
import { j as Y, p as Z, q as ee, t as te, v as ne } from "./ai-DZ6fqUyK.js";
|
|
5
|
+
import { A as F, a as ae, b as se, c as le, d as ie } from "./shared-B51Q5536.js";
|
|
6
|
+
import { u as ce, A as oe, f as de } from "./shared-utils-Ck5sql2m.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import { useState as s, useEffect as
|
|
9
|
-
|
|
10
|
-
const F = "/ai/skills/new";
|
|
8
|
+
import { useState as s, useEffect as O, useMemo as U } from "react";
|
|
9
|
+
const j = "/ai/skills/new";
|
|
11
10
|
function re({
|
|
12
11
|
skill: h,
|
|
13
12
|
onClose: c
|
|
14
13
|
}) {
|
|
15
14
|
const [o, A] = s(null), [N, v] = s(!0), [y, d] = s(!1);
|
|
16
|
-
return
|
|
15
|
+
return O(() => {
|
|
17
16
|
let r = !0;
|
|
18
17
|
return (async () => {
|
|
19
18
|
v(!0), d(!1);
|
|
20
|
-
const b = await
|
|
19
|
+
const b = await ne(h.code);
|
|
21
20
|
if (r) {
|
|
22
21
|
if (v(!1), b === void 0) {
|
|
23
22
|
d(!0);
|
|
@@ -29,13 +28,13 @@ function re({
|
|
|
29
28
|
r = !1;
|
|
30
29
|
};
|
|
31
30
|
}, [h.code]), /* @__PURE__ */ t(
|
|
32
|
-
|
|
31
|
+
J,
|
|
33
32
|
{
|
|
34
33
|
icon: "link",
|
|
35
34
|
title: `引用关系 · ${h.name}`,
|
|
36
35
|
width: 560,
|
|
37
36
|
onClose: c,
|
|
38
|
-
body: N ? /* @__PURE__ */ t(
|
|
37
|
+
body: N ? /* @__PURE__ */ t(F, { text: "正在查询引用关系…" }) : y ? /* @__PURE__ */ n("div", { className: "empty", children: [
|
|
39
38
|
/* @__PURE__ */ t("b", { children: "引用关系加载失败" }),
|
|
40
39
|
/* @__PURE__ */ t("p", { children: "接口返回异常,请稍后重试。" })
|
|
41
40
|
] }) : /* @__PURE__ */ n("div", { className: "ai-usage-block", children: [
|
|
@@ -50,18 +49,18 @@ function re({
|
|
|
50
49
|
}
|
|
51
50
|
);
|
|
52
51
|
}
|
|
53
|
-
function
|
|
54
|
-
const h =
|
|
55
|
-
|
|
52
|
+
function ve() {
|
|
53
|
+
const h = H(), [c, o] = s([]), [A, N] = s(!0), [v, y] = s(!1), [d, r] = s(""), [p, b] = s("all"), [_, B] = s(0), [S, k] = s(null), [M, x] = s(!1), [w, z] = s(null), [u, T] = s([]), [I, $] = s(!1), P = ce();
|
|
54
|
+
O(() => {
|
|
56
55
|
let e = !0;
|
|
57
56
|
return (async () => {
|
|
58
57
|
N(!0), y(!1);
|
|
59
|
-
const l = await
|
|
58
|
+
const l = await Y();
|
|
60
59
|
e && (N(!1), l === void 0 ? (y(!0), o([])) : o(l));
|
|
61
60
|
})(), () => {
|
|
62
61
|
e = !1;
|
|
63
62
|
};
|
|
64
|
-
}, [
|
|
63
|
+
}, [_]);
|
|
65
64
|
const C = U(
|
|
66
65
|
() => ({
|
|
67
66
|
all: c.length,
|
|
@@ -71,7 +70,7 @@ function ye() {
|
|
|
71
70
|
[c]
|
|
72
71
|
), m = U(() => {
|
|
73
72
|
const e = d.trim();
|
|
74
|
-
return c.filter((a) => p === "enabled" && !a.enabled || p === "disabled" && a.enabled ? !1 :
|
|
73
|
+
return c.filter((a) => p === "enabled" && !a.enabled || p === "disabled" && a.enabled ? !1 : W(e, a.code, a.name, a.description, a.prompt));
|
|
75
74
|
}, [d, c, p]), g = () => B((e) => e + 1), E = m.length > 0 && m.every((e) => u.includes(e.code)), q = () => {
|
|
76
75
|
T(E ? [] : m.map((e) => e.code));
|
|
77
76
|
}, D = (e) => {
|
|
@@ -83,8 +82,8 @@ function ye() {
|
|
|
83
82
|
if (a.length) {
|
|
84
83
|
a.length === 1 ? z(a[0]) : $(!0);
|
|
85
84
|
try {
|
|
86
|
-
const l = await
|
|
87
|
-
l && (
|
|
85
|
+
const l = await Z(a);
|
|
86
|
+
l && (X(
|
|
88
87
|
l,
|
|
89
88
|
a.length === 1 ? `${a[0]}-skill-export.zip` : "skills-export.zip"
|
|
90
89
|
), f(
|
|
@@ -102,24 +101,24 @@ function ye() {
|
|
|
102
101
|
f("无法启用", "提示词为空,填写提示词后才能启用。", "warn");
|
|
103
102
|
return;
|
|
104
103
|
}
|
|
105
|
-
const a = await
|
|
104
|
+
const a = await ee(e.code, !e.enabled);
|
|
106
105
|
a && (f(
|
|
107
106
|
e.enabled ? "已停用技能" : "已启用技能",
|
|
108
107
|
a.name,
|
|
109
108
|
"success"
|
|
110
109
|
), g());
|
|
111
|
-
},
|
|
112
|
-
if (!await
|
|
110
|
+
}, Q = async (e) => {
|
|
111
|
+
if (!await G({
|
|
113
112
|
title: `删除技能「${e.name}」?`,
|
|
114
113
|
sub: "仍被智能体引用时后端会拒绝。",
|
|
115
114
|
confirmText: "删除"
|
|
116
115
|
}))
|
|
117
116
|
return;
|
|
118
|
-
await
|
|
117
|
+
await te(e.code) !== void 0 && (f("已删除技能", e.name, "success"), g());
|
|
119
118
|
};
|
|
120
119
|
return /* @__PURE__ */ n("div", { className: "view ai-list-page", children: [
|
|
121
|
-
A ? /* @__PURE__ */ t("section", { className: "panel", children: /* @__PURE__ */ t(
|
|
122
|
-
|
|
120
|
+
A ? /* @__PURE__ */ t("section", { className: "panel", children: /* @__PURE__ */ t(F, { text: "正在加载技能定义…" }) }) : v ? /* @__PURE__ */ t("section", { className: "panel", children: /* @__PURE__ */ t(
|
|
121
|
+
ae,
|
|
123
122
|
{
|
|
124
123
|
title: "技能列表加载失败",
|
|
125
124
|
onRetry: g
|
|
@@ -136,7 +135,7 @@ function ye() {
|
|
|
136
135
|
] })
|
|
137
136
|
] }),
|
|
138
137
|
/* @__PURE__ */ n("div", { className: "row", style: { gap: 6 }, children: [
|
|
139
|
-
/* @__PURE__ */ t(
|
|
138
|
+
/* @__PURE__ */ t(se, { status: P }),
|
|
140
139
|
/* @__PURE__ */ n("button", { className: "btn sm ghost", type: "button", onClick: g, children: [
|
|
141
140
|
/* @__PURE__ */ t(i, { name: "refresh", size: 13 }),
|
|
142
141
|
"刷新"
|
|
@@ -146,7 +145,7 @@ function ye() {
|
|
|
146
145
|
{
|
|
147
146
|
className: "btn sm primary",
|
|
148
147
|
type: "button",
|
|
149
|
-
onClick: () => h(
|
|
148
|
+
onClick: () => h(j),
|
|
150
149
|
children: [
|
|
151
150
|
/* @__PURE__ */ t(i, { name: "plus", size: 13 }),
|
|
152
151
|
"新建技能"
|
|
@@ -158,7 +157,7 @@ function ye() {
|
|
|
158
157
|
{
|
|
159
158
|
className: "btn sm ghost",
|
|
160
159
|
type: "button",
|
|
161
|
-
onClick: () =>
|
|
160
|
+
onClick: () => x(!0),
|
|
162
161
|
children: [
|
|
163
162
|
/* @__PURE__ */ t(i, { name: "upload", size: 13 }),
|
|
164
163
|
"导入"
|
|
@@ -206,7 +205,7 @@ function ye() {
|
|
|
206
205
|
}
|
|
207
206
|
)
|
|
208
207
|
] }),
|
|
209
|
-
/* @__PURE__ */ t("div", { className: "segmented sm", children:
|
|
208
|
+
/* @__PURE__ */ t("div", { className: "segmented sm", children: oe.map((e) => /* @__PURE__ */ n(
|
|
210
209
|
"button",
|
|
211
210
|
{
|
|
212
211
|
type: "button",
|
|
@@ -258,7 +257,7 @@ function ye() {
|
|
|
258
257
|
/* @__PURE__ */ t("b", { children: e.name }),
|
|
259
258
|
/* @__PURE__ */ t("small", { children: e.code })
|
|
260
259
|
] }) }),
|
|
261
|
-
/* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(
|
|
260
|
+
/* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(ie, { enabled: e.enabled }) }),
|
|
262
261
|
/* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(
|
|
263
262
|
"span",
|
|
264
263
|
{
|
|
@@ -267,14 +266,14 @@ function ye() {
|
|
|
267
266
|
children: e.description || "—"
|
|
268
267
|
}
|
|
269
268
|
) }),
|
|
270
|
-
/* @__PURE__ */ t("td", { className: "mono-sm", children:
|
|
269
|
+
/* @__PURE__ */ t("td", { className: "mono-sm", children: de(e.updateTime) }),
|
|
271
270
|
/* @__PURE__ */ t("td", { children: /* @__PURE__ */ n("div", { className: "row-actions", children: [
|
|
272
271
|
/* @__PURE__ */ n(
|
|
273
272
|
"button",
|
|
274
273
|
{
|
|
275
274
|
className: "btn xs ghost",
|
|
276
275
|
type: "button",
|
|
277
|
-
onClick: () =>
|
|
276
|
+
onClick: () => k(e),
|
|
278
277
|
children: [
|
|
279
278
|
/* @__PURE__ */ t(i, { name: "link", size: 11 }),
|
|
280
279
|
"引用"
|
|
@@ -320,14 +319,14 @@ function ye() {
|
|
|
320
319
|
className: "icon-btn",
|
|
321
320
|
type: "button",
|
|
322
321
|
title: "删除",
|
|
323
|
-
onClick: () => void
|
|
322
|
+
onClick: () => void Q(e),
|
|
324
323
|
children: /* @__PURE__ */ t(i, { name: "trash", size: 13 })
|
|
325
324
|
}
|
|
326
325
|
)
|
|
327
326
|
] }) })
|
|
328
327
|
] }, e.code)) })
|
|
329
328
|
] }) }) : /* @__PURE__ */ t(
|
|
330
|
-
|
|
329
|
+
le,
|
|
331
330
|
{
|
|
332
331
|
icon: d ? "search" : "sparkles",
|
|
333
332
|
title: d ? "没有匹配的技能" : "还没有技能",
|
|
@@ -346,7 +345,7 @@ function ye() {
|
|
|
346
345
|
{
|
|
347
346
|
className: "btn primary",
|
|
348
347
|
type: "button",
|
|
349
|
-
onClick: () => h(
|
|
348
|
+
onClick: () => h(j),
|
|
350
349
|
children: [
|
|
351
350
|
/* @__PURE__ */ t(i, { name: "plus", size: 13 }),
|
|
352
351
|
"新建技能"
|
|
@@ -360,19 +359,19 @@ function ye() {
|
|
|
360
359
|
re,
|
|
361
360
|
{
|
|
362
361
|
skill: S,
|
|
363
|
-
onClose: () =>
|
|
362
|
+
onClose: () => k(null)
|
|
364
363
|
}
|
|
365
364
|
) : null,
|
|
366
365
|
/* @__PURE__ */ t(
|
|
367
|
-
|
|
366
|
+
V,
|
|
368
367
|
{
|
|
369
368
|
open: M,
|
|
370
|
-
onClose: () =>
|
|
369
|
+
onClose: () => x(!1),
|
|
371
370
|
onImported: g
|
|
372
371
|
}
|
|
373
372
|
)
|
|
374
373
|
] });
|
|
375
374
|
}
|
|
376
375
|
export {
|
|
377
|
-
|
|
376
|
+
ve as default
|
|
378
377
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as D, r as c,
|
|
1
|
+
import { t as D, r as c, K as L, I as O } from "./embed-BUaR8PAn.js";
|
|
2
2
|
import { jsxs as g, jsx as l } from "react/jsx-runtime";
|
|
3
|
-
import { useState as f, useRef as x, useEffect as
|
|
3
|
+
import { useState as f, useRef as x, useEffect as T } from "react";
|
|
4
4
|
const w = "/kb/v1/knowledgeBase/aiHosting", B = () => ({ "X-Tenant-Code": L() });
|
|
5
5
|
async function E(e) {
|
|
6
6
|
try {
|
|
@@ -185,14 +185,14 @@ function ue({
|
|
|
185
185
|
secret: i,
|
|
186
186
|
disabled: s = !1
|
|
187
187
|
}) {
|
|
188
|
-
const [d, y] = f([]), [k, m] = f(""), [h, S] = f(""), [
|
|
189
|
-
|
|
190
|
-
|
|
188
|
+
const [d, y] = f([]), [k, m] = f(""), [h, S] = f(""), [C, a] = f(""), [b, A] = f(!1), [K, P] = f(0), R = x(i);
|
|
189
|
+
T(() => {
|
|
190
|
+
R.current = i;
|
|
191
191
|
});
|
|
192
|
-
const p = t.trim(),
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}, [p, n]),
|
|
192
|
+
const p = t.trim(), G = x(p);
|
|
193
|
+
T(() => {
|
|
194
|
+
G.current !== p && (G.current = p, n(""));
|
|
195
|
+
}, [p, n]), T(() => {
|
|
196
196
|
let o = !1, j = 0;
|
|
197
197
|
return (async () => {
|
|
198
198
|
if (!V(p)) {
|
|
@@ -209,7 +209,7 @@ function ue({
|
|
|
209
209
|
enabled: !0,
|
|
210
210
|
scope: { repo: p },
|
|
211
211
|
credentialType: "TOKEN",
|
|
212
|
-
secret: ((q =
|
|
212
|
+
secret: ((q = R.current) == null ? void 0 : q.trim()) || void 0
|
|
213
213
|
});
|
|
214
214
|
if (!o) {
|
|
215
215
|
if (A(!1), !H) {
|
|
@@ -222,7 +222,7 @@ function ue({
|
|
|
222
222
|
})(), () => {
|
|
223
223
|
o = !0, window.clearTimeout(j);
|
|
224
224
|
};
|
|
225
|
-
}, [e, p, u,
|
|
225
|
+
}, [e, p, u, K]), T(() => {
|
|
226
226
|
if (b || r || k !== p || !d.length)
|
|
227
227
|
return;
|
|
228
228
|
const o = h || (d.includes("main") ? "main" : d.includes("master") ? "master" : "");
|
|
@@ -271,7 +271,7 @@ function ue({
|
|
|
271
271
|
}
|
|
272
272
|
)
|
|
273
273
|
] }),
|
|
274
|
-
|
|
274
|
+
C ? /* @__PURE__ */ l("span", { className: "help", children: C }) : null
|
|
275
275
|
] });
|
|
276
276
|
}
|
|
277
277
|
function pe({
|
|
@@ -280,8 +280,8 @@ function pe({
|
|
|
280
280
|
placeholder: r = "https://git.example.com/group/repo.git",
|
|
281
281
|
disabled: n = !1
|
|
282
282
|
}) {
|
|
283
|
-
const [u, i] = f(!1), [s, d] = f(""), [y, k] = f([]), [m, h] = f(!1), [S,
|
|
284
|
-
return
|
|
283
|
+
const [u, i] = f(!1), [s, d] = f(""), [y, k] = f([]), [m, h] = f(!1), [S, C] = f(!1);
|
|
284
|
+
return T(() => {
|
|
285
285
|
if (!u)
|
|
286
286
|
return;
|
|
287
287
|
let a = !1;
|
|
@@ -290,8 +290,8 @@ function pe({
|
|
|
290
290
|
})();
|
|
291
291
|
const A = setTimeout(
|
|
292
292
|
async () => {
|
|
293
|
-
const
|
|
294
|
-
a || (k(
|
|
293
|
+
const K = await z(s.trim() || void 0);
|
|
294
|
+
a || (k(K ?? []), h(!1), C(!0));
|
|
295
295
|
},
|
|
296
296
|
s.trim() ? 220 : 0
|
|
297
297
|
);
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { jsxs as c, jsx as e, Fragment as I } from "react/jsx-runtime";
|
|
2
|
+
import { useState as f } from "react";
|
|
3
|
+
import { a as $, h as k, B as w, I as A } from "./embed-BUaR8PAn.js";
|
|
4
|
+
import { u as B, E as D, e as F, s as Y, t as Z, g as ee, J as re, p as te, S as ae, a as ne, D as oe, b as ie, c as se, d as le, f as ce } from "./style-BHQZmWlH.js";
|
|
5
|
+
import { i as O, J as de, p as R } from "./json-field-Bu-gFb6c.js";
|
|
6
|
+
import { D as _ } from "./index-DlqhOJnd.js";
|
|
7
|
+
import { F as g } from "./index-Bt9F-2Fl.js";
|
|
8
|
+
import { I as v } from "./index-CNBwau86.js";
|
|
9
|
+
import { S as he } from "./index-BDWjubAD.js";
|
|
10
|
+
import { T as U } from "./index-Be_iqVpx.js";
|
|
11
|
+
import { S as L } from "./index-BLGPH51v.js";
|
|
12
|
+
import { U as me } from "./index-Pcxp_AYe.js";
|
|
13
|
+
import { T as pe } from "./index-CDxeB8C4.js";
|
|
14
|
+
import { P as ue } from "./index-BuGHtvxH.js";
|
|
15
|
+
const q = 10 * 1024 * 1024, x = { INLINE: "内联数据", JDBC: "数据库 JDBC", HTTP: "HTTP 接口", FILE: "本地文件" };
|
|
16
|
+
function H(o) {
|
|
17
|
+
switch (o) {
|
|
18
|
+
case "INLINE":
|
|
19
|
+
return { rows: [] };
|
|
20
|
+
case "JDBC":
|
|
21
|
+
return { host: "", port: 3306, database: "", username: "" };
|
|
22
|
+
case "HTTP":
|
|
23
|
+
return { url: "", startPage: 1 };
|
|
24
|
+
case "FILE":
|
|
25
|
+
return { content: "", format: "JSON" };
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function fe(o) {
|
|
29
|
+
if (!o.name.trim()) throw new Error("请填写数据接入名称");
|
|
30
|
+
if (!Object.hasOwn(x, o.type)) throw new Error("未知数据接入类型");
|
|
31
|
+
const t = o.config, m = /password|authorization|cookie|token|api[-_]?key|secret/i;
|
|
32
|
+
if (o.type === "JDBC" || o.type === "HTTP") {
|
|
33
|
+
const l = (s) => Array.isArray(s) ? s.some(l) : O(s) && Object.entries(s).some(([i, p]) => m.test(i) || l(p));
|
|
34
|
+
if (l(t)) throw new Error("密码、令牌和认证头必须填写在独立凭据区域,不能存入 config");
|
|
35
|
+
}
|
|
36
|
+
if (o.type === "INLINE" && (!Array.isArray(t.rows) || !t.rows.every(O))) throw new Error("内联数据必须是对象数组");
|
|
37
|
+
if (o.type === "JDBC") {
|
|
38
|
+
for (const l of ["host", "database", "username"])
|
|
39
|
+
if (typeof t[l] != "string" || !t[l].trim()) throw new Error(`请填写 ${l}`);
|
|
40
|
+
if (typeof t.port != "number" || !Number.isInteger(t.port) || t.port < 1 || t.port > 65535) throw new Error("端口范围为 1–65535");
|
|
41
|
+
}
|
|
42
|
+
if (o.type === "HTTP") {
|
|
43
|
+
let l;
|
|
44
|
+
try {
|
|
45
|
+
l = new URL(String(t.url));
|
|
46
|
+
} catch {
|
|
47
|
+
throw new Error("请填写有效的 HTTP URL");
|
|
48
|
+
}
|
|
49
|
+
if (!["http:", "https:"].includes(l.protocol) || l.username || l.password) throw new Error("URL 仅支持 HTTP(S),且不可内嵌凭据");
|
|
50
|
+
if ([...l.searchParams.keys()].some((s) => m.test(s))) throw new Error("URL 中的认证参数不能存入 config,请使用独立凭据");
|
|
51
|
+
for (const s of ["itemsPath", "pageParam", "pageSizeParam"])
|
|
52
|
+
if (t[s] !== void 0 && typeof t[s] != "string") throw new Error(`${s} 必须是字符串`);
|
|
53
|
+
if (t.startPage !== void 0 && (typeof t.startPage != "number" || !Number.isInteger(t.startPage) || t.startPage < 0)) throw new Error("起始页必须是非负整数");
|
|
54
|
+
if (t.headers !== void 0 && (!O(t.headers) || !Object.values(t.headers).every((s) => typeof s == "string"))) throw new Error("公开 headers 必须是字符串映射对象");
|
|
55
|
+
}
|
|
56
|
+
if (o.type === "FILE") {
|
|
57
|
+
if (typeof t.content != "string") throw new Error("请上传文件文本,不支持服务器文件路径");
|
|
58
|
+
if (new TextEncoder().encode(t.content).byteLength > q) throw new Error("文件内容不能超过 10MB");
|
|
59
|
+
if (t.format !== "JSON" && t.format !== "CSV") throw new Error("文件格式必须为 JSON 或 CSV");
|
|
60
|
+
t.format === "JSON" && JSON.parse(t.content);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function ge({ source: o, onClose: t, onSaved: m }) {
|
|
64
|
+
const { can: l } = $(), s = l("etl.source.manage"), [i, p] = f(() => o ? {
|
|
65
|
+
code: o.code,
|
|
66
|
+
name: o.name,
|
|
67
|
+
type: o.type,
|
|
68
|
+
description: o.description,
|
|
69
|
+
config: o.config,
|
|
70
|
+
enabled: o.enabled
|
|
71
|
+
} : { name: "", type: "INLINE", config: H("INLINE"), enabled: !0 }), [u, n] = f(""), [a, y] = f(!1), [b, T] = f(!1), [d, z] = f(""), [J, j] = f(""), [V, M] = f((o == null ? void 0 : o.hasCredential) ?? !1), { busy: N, error: Q, perform: K, setError: P } = B(), C = i.config, S = (r) => p((h) => ({ ...h, config: { ...h.config, ...r } })), E = (r, h) => /* @__PURE__ */ e(g.Item, { label: h, children: /* @__PURE__ */ e(v, { "aria-label": h, value: typeof C[r] == "string" ? C[r] : "", onChange: (X) => S({ [r]: X.target.value }) }) }, r), G = () => {
|
|
72
|
+
try {
|
|
73
|
+
if (J) throw new Error(J);
|
|
74
|
+
b ? p({ ...i, config: R(d) }) : z(JSON.stringify(C, null, 2)), T(!b), P("");
|
|
75
|
+
} catch (r) {
|
|
76
|
+
P(F(r));
|
|
77
|
+
}
|
|
78
|
+
}, W = async () => {
|
|
79
|
+
const r = await K(async () => {
|
|
80
|
+
if (J) throw new Error(J);
|
|
81
|
+
const h = { ...i, config: b ? R(d) : C };
|
|
82
|
+
return u.trim() && (h.secret = i.type === "JDBC" ? { password: u } : { headers: { Authorization: u } }), fe(h), Y(h);
|
|
83
|
+
}, "数据接入已保存");
|
|
84
|
+
r && (p({ code: r.code, name: r.name, type: r.type, description: r.description, config: r.config, enabled: r.enabled }), z(JSON.stringify(r.config, null, 2)), n(""), M(r.hasCredential), m(r));
|
|
85
|
+
};
|
|
86
|
+
return /* @__PURE__ */ c(
|
|
87
|
+
_,
|
|
88
|
+
{
|
|
89
|
+
open: !0,
|
|
90
|
+
title: o ? "数据接入详情" : "新建数据接入",
|
|
91
|
+
width: 680,
|
|
92
|
+
rootClassName: "etl-drawer",
|
|
93
|
+
onClose: t,
|
|
94
|
+
maskClosable: !N && !a,
|
|
95
|
+
closable: !N && !a,
|
|
96
|
+
keyboard: !N && !a,
|
|
97
|
+
extra: s && /* @__PURE__ */ e(w, { type: "primary", loading: N, disabled: a, onClick: () => void W(), children: "保存数据接入" }),
|
|
98
|
+
children: [
|
|
99
|
+
/* @__PURE__ */ e(D, { error: Q }),
|
|
100
|
+
/* @__PURE__ */ c(g, { layout: "vertical", disabled: !s || N || a, children: [
|
|
101
|
+
/* @__PURE__ */ e(g.Item, { label: "名称", required: !0, children: /* @__PURE__ */ e(v, { "aria-label": "数据接入名称", value: i.name, onChange: (r) => p({ ...i, name: r.target.value }) }) }),
|
|
102
|
+
/* @__PURE__ */ c("div", { className: "etl-form-grid", children: [
|
|
103
|
+
/* @__PURE__ */ e(g.Item, { label: "来源类型", children: /* @__PURE__ */ e(
|
|
104
|
+
k,
|
|
105
|
+
{
|
|
106
|
+
"aria-label": "来源类型",
|
|
107
|
+
value: i.type,
|
|
108
|
+
options: Object.entries(x).map(([r, h]) => ({ value: r, label: h })),
|
|
109
|
+
onChange: (r) => {
|
|
110
|
+
p({ ...i, type: r, config: H(r) }), T(!1), n(""), j("");
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
) }),
|
|
114
|
+
/* @__PURE__ */ e(g.Item, { label: "启用", children: /* @__PURE__ */ e(he, { checked: i.enabled, onChange: (r) => p({ ...i, enabled: r }) }) })
|
|
115
|
+
] }),
|
|
116
|
+
/* @__PURE__ */ e(g.Item, { label: "说明", children: /* @__PURE__ */ e(v.TextArea, { value: i.description, onChange: (r) => p({ ...i, description: r.target.value }) }) }),
|
|
117
|
+
/* @__PURE__ */ c("div", { className: "etl-section-heading", children: [
|
|
118
|
+
/* @__PURE__ */ e("strong", { children: "连接配置" }),
|
|
119
|
+
/* @__PURE__ */ e(w, { size: "small", onClick: G, children: b ? "返回表单" : "高级 JSON" })
|
|
120
|
+
] }),
|
|
121
|
+
b ? /* @__PURE__ */ e(v.TextArea, { "aria-label": "来源配置 JSON", className: "etl-code-input", rows: 14, value: d, onChange: (r) => z(r.target.value) }) : /* @__PURE__ */ c(I, { children: [
|
|
122
|
+
i.type === "INLINE" && /* @__PURE__ */ e(g.Item, { label: "数据行(JSON 对象数组)", children: /* @__PURE__ */ e(de, { label: "内联数据行", value: C.rows, onChange: (r) => {
|
|
123
|
+
if (!Array.isArray(r) || !r.every(O)) throw new Error("必须是对象数组");
|
|
124
|
+
S({ rows: r });
|
|
125
|
+
}, onError: j }) }),
|
|
126
|
+
i.type === "JDBC" && /* @__PURE__ */ c("div", { className: "etl-form-grid", children: [
|
|
127
|
+
E("host", "主机"),
|
|
128
|
+
/* @__PURE__ */ e(g.Item, { label: "端口", children: /* @__PURE__ */ e(U, { "aria-label": "端口", min: 1, max: 65535, value: Number(C.port), onChange: (r) => S({ port: r }) }) }),
|
|
129
|
+
E("database", "数据库"),
|
|
130
|
+
E("username", "用户名")
|
|
131
|
+
] }),
|
|
132
|
+
i.type === "HTTP" && /* @__PURE__ */ c(I, { children: [
|
|
133
|
+
E("url", "请求 URL"),
|
|
134
|
+
/* @__PURE__ */ c("div", { className: "etl-form-grid", children: [
|
|
135
|
+
E("itemsPath", "结果数组路径"),
|
|
136
|
+
E("pageParam", "页码参数"),
|
|
137
|
+
E("pageSizeParam", "页大小参数"),
|
|
138
|
+
/* @__PURE__ */ e(g.Item, { label: "起始页", children: /* @__PURE__ */ e(U, { min: 0, value: Number(C.startPage ?? 1), onChange: (r) => S({ startPage: r }) }) })
|
|
139
|
+
] })
|
|
140
|
+
] }),
|
|
141
|
+
i.type === "FILE" && /* @__PURE__ */ c(I, { children: [
|
|
142
|
+
/* @__PURE__ */ c(L, { children: [
|
|
143
|
+
/* @__PURE__ */ e(k, { "aria-label": "文件格式", value: String(C.format), options: [{ value: "JSON" }, { value: "CSV" }], onChange: (r) => S({ format: r }) }),
|
|
144
|
+
/* @__PURE__ */ e(me, { accept: ".json,.csv", maxCount: 1, showUploadList: !1, beforeUpload: async (r) => {
|
|
145
|
+
y(!0);
|
|
146
|
+
try {
|
|
147
|
+
if (r.size > q) throw new Error("文件不能超过 10MB");
|
|
148
|
+
if (!/\.(json|csv)$/i.test(r.name)) throw new Error("仅支持 JSON 或 CSV 文件");
|
|
149
|
+
const h = await r.text();
|
|
150
|
+
S({ content: h, format: /\.csv$/i.test(r.name) ? "CSV" : "JSON" }), P("");
|
|
151
|
+
} catch (h) {
|
|
152
|
+
P(F(h));
|
|
153
|
+
} finally {
|
|
154
|
+
y(!1);
|
|
155
|
+
}
|
|
156
|
+
return !1;
|
|
157
|
+
}, children: /* @__PURE__ */ e(w, { loading: a, icon: /* @__PURE__ */ e(A, { name: "upload", size: 14 }), children: "读取本地文件(≤10MB)" }) })
|
|
158
|
+
] }),
|
|
159
|
+
/* @__PURE__ */ e(g.Item, { label: "文件文本", children: /* @__PURE__ */ e(v.TextArea, { "aria-label": "文件文本", rows: 8, value: String(C.content ?? ""), onChange: (r) => S({ content: r.target.value }) }) })
|
|
160
|
+
] })
|
|
161
|
+
] }),
|
|
162
|
+
["JDBC", "HTTP"].includes(i.type) && /* @__PURE__ */ e(g.Item, { label: `${i.type === "JDBC" ? "密码" : "Authorization 认证头"}(${V ? "已保存,留空保留" : "未配置"})`, children: /* @__PURE__ */ e(v.Password, { autoComplete: "new-password", "aria-label": "独立凭据", value: u, onChange: (r) => n(r.target.value) }) })
|
|
163
|
+
] }),
|
|
164
|
+
/* @__PURE__ */ e("p", { className: "etl-note", children: "配置不会返回明文凭据;连接测试、元数据和样本使用最近保存的数据接入。高级 JSON 中的 headers 仅供公开请求头。" })
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
function we({ source: o, onClose: t }) {
|
|
170
|
+
const { busy: m, error: l, perform: s } = B(), [i, p] = f(), [u, n] = f(), [a, y] = f(""), [b, T] = f();
|
|
171
|
+
return /* @__PURE__ */ c(_, { open: !0, title: `连接与样本 · ${o.name}`, width: 820, rootClassName: "etl-drawer", onClose: t, children: [
|
|
172
|
+
/* @__PURE__ */ e(D, { error: l }),
|
|
173
|
+
/* @__PURE__ */ c(L, { wrap: !0, children: [
|
|
174
|
+
/* @__PURE__ */ e(w, { loading: m, onClick: () => void s(() => Z(o.code)).then((d) => {
|
|
175
|
+
d && p(d);
|
|
176
|
+
}), children: "测试连接" }),
|
|
177
|
+
/* @__PURE__ */ e(w, { loading: m, onClick: () => void s(() => ee(o.code)).then((d) => {
|
|
178
|
+
d && n(d);
|
|
179
|
+
}), children: "获取元数据" })
|
|
180
|
+
] }),
|
|
181
|
+
i && /* @__PURE__ */ c("p", { role: "status", className: i.success ? "etl-note" : "etl-field-error", children: [
|
|
182
|
+
i.success ? "连接成功" : "连接失败",
|
|
183
|
+
":",
|
|
184
|
+
i.message
|
|
185
|
+
] }),
|
|
186
|
+
u && /* @__PURE__ */ c(I, { children: [
|
|
187
|
+
/* @__PURE__ */ e("h3", { children: "实体与字段" }),
|
|
188
|
+
/* @__PURE__ */ e(re, { value: u })
|
|
189
|
+
] }),
|
|
190
|
+
/* @__PURE__ */ e("h3", { children: "样本预览" }),
|
|
191
|
+
/* @__PURE__ */ c(L, { wrap: !0, children: [
|
|
192
|
+
u != null && u.length ? /* @__PURE__ */ e(k, { "aria-label": "预览实体", allowClear: !0, placeholder: "选择实体", value: a || void 0, options: u.map((d) => ({ value: d.name })), onChange: (d) => y(d ?? "") }) : /* @__PURE__ */ e(v, { "aria-label": "预览实体", placeholder: "实体名称(可选)", value: a, onChange: (d) => y(d.target.value) }),
|
|
193
|
+
/* @__PURE__ */ e(w, { loading: m, onClick: () => void s(() => te({ code: o.code, source: a ? { entity: a } : void 0, limit: 10 })).then((d) => {
|
|
194
|
+
d && T(d);
|
|
195
|
+
}), children: "读取 10 行样本" })
|
|
196
|
+
] }),
|
|
197
|
+
b && /* @__PURE__ */ c(I, { children: [
|
|
198
|
+
/* @__PURE__ */ c("p", { className: "etl-note", children: [
|
|
199
|
+
"返回 ",
|
|
200
|
+
b.rows.length,
|
|
201
|
+
" 行 · ",
|
|
202
|
+
b.exhausted ? "来源已读完" : "仅展示样本,仍有更多数据"
|
|
203
|
+
] }),
|
|
204
|
+
/* @__PURE__ */ e(ae, { rows: b.rows })
|
|
205
|
+
] })
|
|
206
|
+
] });
|
|
207
|
+
}
|
|
208
|
+
function xe() {
|
|
209
|
+
const { can: o } = $(), t = ne(ce, { current: 1, size: 20 }), m = B(), [l, s] = f(), [i, p] = f(), u = [
|
|
210
|
+
{ title: "数据接入", dataIndex: "name", width: 220, sorter: (n, a) => n.name.localeCompare(a.name), ellipsis: !0, render: (n, a) => /* @__PURE__ */ e(w, { className: "etl-cell-link", title: a.name, type: "link", onClick: () => void m.perform(() => se(a.code)).then((y) => {
|
|
211
|
+
y && s(y);
|
|
212
|
+
}), children: a.name }) },
|
|
213
|
+
{ title: "编码", dataIndex: "code", width: 190, sorter: (n, a) => n.code.localeCompare(a.code), ellipsis: !0 },
|
|
214
|
+
{ title: "类型", dataIndex: "type", width: 160, sorter: (n, a) => n.type.localeCompare(a.type), render: (n) => x[n] },
|
|
215
|
+
{ title: "状态", key: "enabled", width: 110, sorter: (n, a) => Number(n.enabled) - Number(a.enabled), render: (n, a) => /* @__PURE__ */ e(pe, { children: a.enabled ? "已启用" : "已停用" }) },
|
|
216
|
+
{ title: "凭据", key: "credential", width: 110, sorter: (n, a) => Number(n.hasCredential) - Number(a.hasCredential), render: (n, a) => a.hasCredential ? "已配置" : "未配置" },
|
|
217
|
+
{ title: "更新时间", dataIndex: "updateTime", width: 180, sorter: (n, a) => (n.updateTime ?? "").localeCompare(a.updateTime ?? "") },
|
|
218
|
+
{ title: "操作", key: "action", width: 220, render: (n, a) => /* @__PURE__ */ c(L, { children: [
|
|
219
|
+
/* @__PURE__ */ e(w, { type: "link", size: "small", onClick: () => p(a), children: "连接 / 样本" }),
|
|
220
|
+
o("etl.source.manage") && /* @__PURE__ */ e(ue, { title: "删除数据接入?", description: "引用该来源的模板可能无法运行,此操作不可撤销。", onConfirm: () => m.perform(() => le(a.code), "已删除").then((y) => {
|
|
221
|
+
y && t.refresh();
|
|
222
|
+
}), children: /* @__PURE__ */ e(w, { danger: !0, type: "link", size: "small", disabled: m.busy, children: "删除" }) })
|
|
223
|
+
] }) }
|
|
224
|
+
];
|
|
225
|
+
return /* @__PURE__ */ c("div", { className: "view etl-page", children: [
|
|
226
|
+
/* @__PURE__ */ e(oe, { active: "sources" }),
|
|
227
|
+
/* @__PURE__ */ c("div", { className: "view-bar etl-toolbar", children: [
|
|
228
|
+
/* @__PURE__ */ e(v.Search, { placeholder: "搜索数据接入名称 / 编码", allowClear: !0, onSearch: (n) => t.setQuery({ ...t.query, current: 1, keyword: n }) }),
|
|
229
|
+
/* @__PURE__ */ e(
|
|
230
|
+
k,
|
|
231
|
+
{
|
|
232
|
+
"aria-label": "筛选来源类型",
|
|
233
|
+
allowClear: !0,
|
|
234
|
+
placeholder: "所有类型",
|
|
235
|
+
options: Object.entries(x).map(([n, a]) => ({ value: n, label: a })),
|
|
236
|
+
onChange: (n) => t.setQuery({ ...t.query, current: 1, type: n })
|
|
237
|
+
}
|
|
238
|
+
),
|
|
239
|
+
/* @__PURE__ */ e(w, { icon: /* @__PURE__ */ e(A, { name: "refresh", size: 14 }), onClick: t.refresh, loading: t.loading, children: "刷新" }),
|
|
240
|
+
o("etl.source.manage") && /* @__PURE__ */ e(w, { type: "primary", icon: /* @__PURE__ */ e(A, { name: "plus", size: 14 }), onClick: () => s("new"), children: "新建" })
|
|
241
|
+
] }),
|
|
242
|
+
/* @__PURE__ */ c("section", { className: "panel", children: [
|
|
243
|
+
/* @__PURE__ */ e("p", { className: "etl-note", children: "连接来源、查看元数据,再将样本交给编排模板。凭据独立保存,不会回显明文。表格排序仅作用于当前页。" }),
|
|
244
|
+
/* @__PURE__ */ e(D, { error: t.error || m.error, retry: t.refresh }),
|
|
245
|
+
/* @__PURE__ */ e(
|
|
246
|
+
ie,
|
|
247
|
+
{
|
|
248
|
+
rowKey: "code",
|
|
249
|
+
columns: u,
|
|
250
|
+
dataSource: t.page.records,
|
|
251
|
+
loading: t.loading || m.busy,
|
|
252
|
+
pagination: {
|
|
253
|
+
current: t.query.current,
|
|
254
|
+
pageSize: t.query.size,
|
|
255
|
+
total: t.page.total,
|
|
256
|
+
showSizeChanger: !0,
|
|
257
|
+
showTotal: (n) => `共 ${n} 个数据接入`,
|
|
258
|
+
onChange: (n, a) => t.setQuery({ ...t.query, current: n, size: a })
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
)
|
|
262
|
+
] }),
|
|
263
|
+
l && /* @__PURE__ */ e(
|
|
264
|
+
ge,
|
|
265
|
+
{
|
|
266
|
+
source: l === "new" ? void 0 : l,
|
|
267
|
+
onClose: () => s(void 0),
|
|
268
|
+
onSaved: (n) => {
|
|
269
|
+
s(n), t.refresh();
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
l === "new" ? "new" : l.code
|
|
273
|
+
),
|
|
274
|
+
i && /* @__PURE__ */ e(we, { source: i, onClose: () => p(void 0) }, i.code)
|
|
275
|
+
] });
|
|
276
|
+
}
|
|
277
|
+
export {
|
|
278
|
+
xe as default
|
|
279
|
+
};
|