@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.
- package/dist-lib/BaseInput-DHrGPDB9.js +1096 -0
- package/dist-lib/ClockCircleOutlined-DP6fSLgk.js +12 -0
- package/dist-lib/Collapse-B77SsmFh.js +523 -0
- package/dist-lib/{ConceptsPage-BOeKdDKI.js → ConceptsPage-DOf_CJlz.js} +13 -16
- package/dist-lib/DeleteOutlined-BAZSAooQ.js +12 -0
- package/dist-lib/{DocsPage-BZOBFp3c.js → DocsPage-CiC7TU96.js} +4 -4
- package/dist-lib/EllipsisOutlined-Dr4orLLw.js +1109 -0
- package/dist-lib/EvidenceFormList-CrE2FzHk.js +90 -0
- package/dist-lib/{EyeOutlined-DGSrX-0M.js → EyeOutlined-CudyDdjH.js} +1 -1
- package/dist-lib/ImpactPage-CYiuqy0S.js +68 -0
- package/dist-lib/{LeftOutlined-Cgo6Izj-.js → LeftOutlined-CJasZIyX.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-BJ8wnqAa.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-DqyspFCO.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-J_7eBbi7.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-CA30m5eX.js +64 -0
- package/dist-lib/{agents-mAJW3cEN.js → agents-eZDKzePP.js} +41 -41
- package/dist-lib/{ai-BcYmZiRo.js → ai-CNSn3-sd.js} +32 -32
- package/dist-lib/{ai-chat-share-DO7GXjG4.js → ai-chat-share-Yrqt_J6a.js} +13 -14
- package/dist-lib/ak-manage-DklVFT5I.js +805 -0
- package/dist-lib/{approval-RPDUKg9-.js → approval-B-bCSmfi.js} +25 -26
- package/dist-lib/{approvals-CNjxJUpR.js → approvals-B0ggYiyD.js} +42 -43
- package/dist-lib/{assistant-FIQQziCn.js → assistant-Of0mgMsM.js} +33 -34
- package/dist-lib/{assistant-history-DsEGBJnq.js → assistant-history-DcyDhUzJ.js} +5 -5
- package/dist-lib/{assistant-summary-B-f3k55y.js → assistant-summary-CjLaTyFz.js} +1 -1
- package/dist-lib/{audit-NwnH1hm5.js → audit-wDNCfmOy.js} +1 -1
- package/dist-lib/{bios-CRwKtcit.js → bios-CIwO1AUK.js} +128 -130
- package/dist-lib/callSuper-CpMOVGin.js +7 -0
- package/dist-lib/callSuper-CwIeyYoc.js +7 -0
- package/dist-lib/category-9gqNseEa.js +76 -0
- package/dist-lib/causal-CzAYukj9.js +789 -0
- package/dist-lib/{changelog-DlL5u9o4.js → changelog-CQfIMS51.js} +2 -2
- package/dist-lib/changelog-sKJMQrlV.js +103 -0
- package/dist-lib/chat-panel-BPbqKckR.js +1543 -0
- package/dist-lib/chunk-6KYCQHYJ-DcgZQlO5.js +1627 -0
- package/dist-lib/code-space-D_ZE966E.js +1070 -0
- package/dist-lib/{colors-sdAcAcU3.js → colors-DpKdb8L-.js} +3 -3
- package/dist-lib/community-9_7ExHcm.js +70 -0
- package/dist-lib/community-CfWXxujB.js +217 -0
- package/dist-lib/community-material-page-Z_EZuBPl.js +747 -0
- package/dist-lib/connections-Bcqsp11M.js +1065 -0
- package/dist-lib/context-T27uno74.js +54 -0
- package/dist-lib/{createForOfIteratorHelper-DEx_aTey.js → createForOfIteratorHelper-CasBzL_Q.js} +1 -1
- package/dist-lib/{dayjs.min-BauDENhn.js → dayjs.min-DoEf5yCX.js} +1 -1
- package/dist-lib/detail-CV6xp_Jp.js +84 -0
- package/dist-lib/{detail-Cfb-zdr9.js → detail-DioaWKWj.js} +5847 -7224
- package/dist-lib/{detail-Dcfg3W8B.js → detail-EyLdjGpX.js} +71 -72
- package/dist-lib/development-CFcOIUKc.js +167 -0
- package/dist-lib/{docx-preview-B5nQuTwk.js → docx-preview-D4v2g8Yg.js} +1 -1
- package/dist-lib/{downloads-MkyxiHxi.js → downloads-DtV5hOQv.js} +3 -4
- package/dist-lib/{edit-DLGAM-Vo.js → edit-NtXUNj5N.js} +262 -266
- package/dist-lib/{editor-BtiheUpe.js → editor-KZhj-rwT.js} +25 -26
- package/dist-lib/editor-page-BaxK_OYm.js +1169 -0
- package/dist-lib/embed-mf8t3QXh.js +51841 -0
- package/dist-lib/embed.css +2 -2
- package/dist-lib/{evaluation-Dz9bUuhS.js → evaluation-CZTpC9v3.js} +14 -15
- package/dist-lib/execution-B6HmOA2_.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-DHV-rdiK.js +640 -0
- package/dist-lib/{index-o65vKUwa.js → index--AI-htgA.js} +44 -45
- package/dist-lib/index-2SysmGHo.js +1166 -0
- package/dist-lib/{index-CJSTTgTM.js → index-3J47mTL1.js} +10 -10
- package/dist-lib/index-4tbtbcAt.js +550 -0
- package/dist-lib/index-B12ZggsE.js +77 -0
- package/dist-lib/{index-D3GHtSlM.js → index-B5Roo82U.js} +49 -50
- package/dist-lib/{index-nQSVLWfW.js → index-B7SfTpox.js} +79 -81
- package/dist-lib/index-BEO8itgt.js +566 -0
- package/dist-lib/index-BPbOPT2j.js +413 -0
- package/dist-lib/index-BVgdmf6r.js +2487 -0
- package/dist-lib/index-Bd7AGv4a.js +34 -0
- package/dist-lib/index-BkJjYgKD.js +5012 -0
- package/dist-lib/{index-DBlG9uXV.js → index-BkTegt8T.js} +513 -590
- package/dist-lib/{index-BGB6NawZ.js → index-Bln3mJfp.js} +2 -2
- package/dist-lib/index-BoCtPJD4.js +915 -0
- package/dist-lib/{index-DMTPsTna.js → index-BqTsLClH.js} +3 -4
- package/dist-lib/index-Bs4MevzC.js +16075 -0
- package/dist-lib/index-BsoHetYT.js +236 -0
- package/dist-lib/{index-9aQ4BzIK.js → index-BvJ35WL3.js} +13 -14
- package/dist-lib/{index-BEjXaDfk.js → index-Bw4M9KLv.js} +84 -85
- package/dist-lib/index-C2CV4bte.js +242 -0
- package/dist-lib/{index-D_Qey9G8.js → index-CF0ucN_K.js} +12 -12
- package/dist-lib/{index-B57Fj7Y0.js → index-CLhLA2ig.js} +92 -94
- package/dist-lib/{index-Vu6sPBci.js → index-CSJA8wvL.js} +301 -296
- package/dist-lib/index-CSnvcFg-.js +543 -0
- package/dist-lib/{index-C3AMwzIi.js → index-CZipVp1G.js} +1 -1
- package/dist-lib/{index-ounfql2z.js → index-CdJ5ggvp.js} +26 -28
- package/dist-lib/index-CgwK2maq.js +1987 -0
- package/dist-lib/{index-Bc-Vin3j.js → index-CtqUgNxs.js} +53 -55
- package/dist-lib/index-CvxfA0ZK.js +215 -0
- package/dist-lib/{index-y7jVGGI0.js → index-CwyFMPcr.js} +16 -18
- package/dist-lib/index-D35Ry0PG.js +1162 -0
- package/dist-lib/{index-c2HokEFp.js → index-D6ns_Xmf.js} +10 -11
- package/dist-lib/{index-DsuUGhTA.js → index-DGbjbjBY.js} +46 -48
- package/dist-lib/index-DKAGVWMX.js +390 -0
- package/dist-lib/index-DQ16Zb7x.js +546 -0
- package/dist-lib/index-DRcTwC17.js +418 -0
- package/dist-lib/index-DU6bO95v.js +2075 -0
- package/dist-lib/index-DaMLYomP.js +853 -0
- package/dist-lib/index-Dd9pPAT3.js +2192 -0
- package/dist-lib/{index-DuI4K5e1.js → index-DgfIEgir.js} +29 -29
- package/dist-lib/{index-Cy9i4Kx7.js → index-DhSCFLtV.js} +113 -117
- package/dist-lib/index-DxzorPvG.js +13960 -0
- package/dist-lib/index-If4xc1-H.js +559 -0
- package/dist-lib/index-QZ9JPfVR.js +251 -0
- package/dist-lib/index-VeAMz0iC.js +1719 -0
- package/dist-lib/index-mUlorJxp.js +3279 -0
- package/dist-lib/{index-g16g7A4k.js → index-xQmDaKK3.js} +6 -6
- package/dist-lib/{index-BwVZgt5s.js → index-zXwXfn-X.js} +48 -50
- package/dist-lib/index.js +3 -4
- package/dist-lib/json-field-COcz5F2R.js +196 -0
- package/dist-lib/{jszip.min-DcEHhn-b.js → jszip.min-dcaDnWUw.js} +1 -1
- package/dist-lib/{kb-form-modal-BNoIhw6B.js → kb-form-modal-D9gnvXbE.js} +67 -67
- package/dist-lib/{kbTeam-EgcbWseM.js → kbTeam-CorrPJFr.js} +3 -3
- package/dist-lib/{knowledge-base-C023dnJ-.js → knowledge-base-DJkjMFHW.js} +103 -104
- package/dist-lib/{knowledge-hub-B4fGCn8m.js → knowledge-hub-DKiDlaZz.js} +54 -55
- package/dist-lib/login-56zv4aLO.js +36 -0
- package/dist-lib/{markdown-lite-EvJ9Fw7X.js → markdown-lite-p1tiuSZM.js} +198 -202
- package/dist-lib/material-DtPASeqq.js +204 -0
- package/dist-lib/material-draft-markdown-281d5_GN.js +443 -0
- package/dist-lib/material-original-preview-CPGjdmbe.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-pdf-CKAovvpc.js → material-preview-pdf-CTSo215V.js} +7 -7
- package/dist-lib/{material-preview-pptx-D8XGDF-u.js → material-preview-pptx-6Byitp0J.js} +1 -1
- package/dist-lib/material-workspace-model-QLsU5qUO.js +328 -0
- package/dist-lib/{member-BUg2QYlE.js → member-Cz-OIdj9.js} +1 -1
- package/dist-lib/memory-reorganization-DgJnWIrW.js +8 -0
- package/dist-lib/memory-spaces-D-orVNR7.js +2340 -0
- package/dist-lib/{message-GF-w8HuR.js → message-C9gfvpGg.js} +1 -1
- package/dist-lib/{message-Cwj8dO78.js → message-D6FhzB7J.js} +24 -25
- package/dist-lib/{messages-JID13L8-.js → messages-cctmEVcG.js} +15 -16
- package/dist-lib/meta-DT_O4zM9.js +708 -0
- package/dist-lib/{metrics-CT4eLzrq.js → metrics-BNeVcI8-.js} +2 -2
- package/dist-lib/mobile-D8kZjfQU.js +2413 -0
- package/dist-lib/{monitor-Bs9BfJOj.js → monitor-DTUyqumg.js} +4 -4
- package/dist-lib/{monitor-CmS65YSu.js → monitor-DexMYjzF.js} +8 -8
- package/dist-lib/{my-access-1Yj7UloI.js → my-access-DWBV6ohp.js} +120 -132
- package/dist-lib/{my-permissions-yQDHPLYI.js → my-permissions-B-gJZQYM.js} +22 -23
- package/dist-lib/navigation-DVlyWnpD.js +102 -0
- package/dist-lib/{new-BgkoBnZV.js → new-JmARyD88.js} +14 -15
- package/dist-lib/{ontology-BPrbXPor.js → ontology-B4rkO33J.js} +50 -52
- package/dist-lib/ontology-dataprep-BwD5TKs2.js +322 -0
- package/dist-lib/{ontology-domains-Cbqnm-po.js → ontology-domains-zxFrjn0v.js} +89 -92
- package/dist-lib/ontology-extract-BHOxruRO.js +3199 -0
- package/dist-lib/ontology-extract-iR_rXxFe.js +295 -0
- package/dist-lib/ontology-flow-CW0SzeK7.js +456 -0
- package/dist-lib/ontology-flow-Dv5iQ20f.js +154 -0
- package/dist-lib/ontology-modeling-B9wswveh.js +510 -0
- package/dist-lib/ontology-modeling-hakCluBi.js +15136 -0
- package/dist-lib/{ontology-scenarios-D3xy6IZL.js → ontology-scenarios-C2kp7Rs-.js} +1466 -1482
- package/dist-lib/ontology-scenarios-DKnfydG6.js +675 -0
- package/dist-lib/ontology-task-config-DmnWyCCB.js +122 -0
- package/dist-lib/ontology-terms-BoNB-5ar.js +66 -0
- package/dist-lib/ontology-terms-C-NhpcIZ.js +1195 -0
- package/dist-lib/pages-CticGC6S.js +512 -0
- package/dist-lib/pages.js +3 -3
- package/dist-lib/{permission-fTfxpEhV.js → permission-Dq1-AOQw.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-DCNSE--Y.js} +8 -8
- package/dist-lib/progress-CZxOOnIs.js +778 -0
- package/dist-lib/{quota-BlHnhkAT.js → quota-oICQRHFU.js} +4 -4
- package/dist-lib/row-By17TCiW.js +154 -0
- package/dist-lib/runs-DQTDpPaN.js +565 -0
- package/dist-lib/{save-blob-B-pzX8eT.js → save-blob-CwCZE1Dn.js} +2 -2
- package/dist-lib/{scenario-mapping-preview-DByQXh0y.js → scenario-mapping-preview-sJtjgmry.js} +46 -48
- package/dist-lib/scenario-simple-form-BvKSPFzw.js +989 -0
- package/dist-lib/{schedule-H4_9KnRj.js → schedule-CwkPPSuT.js} +8 -8
- package/dist-lib/script-gYJAFobb.js +2709 -0
- package/dist-lib/{settings-C3PI8KYa.js → settings-CJd5Jj4y.js} +133 -134
- package/dist-lib/{shared-DqeN-Wbb.js → shared-DG5-VCDM.js} +1 -1
- package/dist-lib/{shared-utils-DN3zT9P-.js → shared-utils-CFHws1DA.js} +2 -2
- package/dist-lib/{skills-eGlCExr0.js → skills-lxpJ5Lzx.js} +39 -40
- package/dist-lib/{source-selection-BCvClzc-.js → source-selection-DJnQQckl.js} +16 -16
- package/dist-lib/sources-C83LpCcV.js +279 -0
- package/dist-lib/style-B5THvtDY.js +191 -0
- package/dist-lib/{task-config-DEJVJ7zK.js → task-config-BNYoOb79.js} +4 -4
- package/dist-lib/{tech-C-4uM9bS.js → tech-LuZvKDo6.js} +3 -4
- package/dist-lib/templates-a-kbCamr.js +58 -0
- package/dist-lib/tenant-login-COB-5h_2.js +338 -0
- package/dist-lib/{tools-le6miafZ.js → tools-CrA6GrY6.js} +14 -14
- package/dist-lib/{use-domain-access-B3pDp3s5.js → use-domain-access-ehGJBGvU.js} +15 -15
- package/dist-lib/{use-g6-graph-WLX0PweO.js → use-g6-graph-DfRnsBS6.js} +1 -1
- package/dist-lib/{use-graph-layers-Dmp7uMHO.js → use-graph-layers-CrhEeHfD.js} +48 -50
- package/dist-lib/use-resizable-columns-BpMCRKif.js +59 -0
- package/dist-lib/useBreakpoint-Cul9y9Cu.js +87 -0
- package/dist-lib/{useForm-Byp1LopG.js → useForm-B-dwOwJ8.js} +11 -11
- package/dist-lib/{version-control-panel-WT1PobuV.js → version-control-panel-mWXkC-uB.js} +26 -27
- package/dist-lib/{version-management-DC0k1DRg.js → version-management-nPlG7wQO.js} +6 -7
- package/dist-lib/{welcome-VyWLrbth.js → welcome-Cqv1-rXT.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-Dj_Pv2nc.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-DwLg9RDW.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-CyKWCYMK.js +0 -218
- 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-HieOUSwH.js +0 -340
- package/dist-lib/index-bOY1cBol.js +0 -4890
- package/dist-lib/meta-DPp5L3Uc.js +0 -540
- package/dist-lib/ontology-modeling-6k-m8fzr.js +0 -38946
- package/dist-lib/ontology-modeling-BT-EuDCs.js +0 -1039
- package/dist-lib/ontology-scenarios-DWYC2yxd.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-Bw-6n9Kh.js +0 -2396
- package/dist-lib/useClosable-BY7FgWKy.js +0 -59
|
@@ -0,0 +1,915 @@
|
|
|
1
|
+
import * as n from "react";
|
|
2
|
+
import { bg as G, ah as Ie, bz as q, aT as Ut, bh as Lt, bk as Bt, bf as xt, cZ as Xt, by as kt, bi as ne, bq as qt, bH as et, b0 as Kt, c_ as Gt, bj as _t, c$ as Yt, a7 as Jt, a8 as Ht, ap as Dt, a9 as Zt, ar as Qt, bN as er, aq as tr, bl as rr, aG as Tt, d0 as nr, bm as ar, a6 as Ot, d1 as lr, d2 as or, aU as ir, cV as sr, bO as ur, aa as Rt, aK as cr, aJ as dr, bn as fr, co as vr, cf as Pt, d3 as hr, bp as pr, cw as mr } from "./embed-mf8t3QXh.js";
|
|
3
|
+
import { a as St, c as gr, U as Cr, e as Sr, i as yr, g as br, S as wr } from "./index-DGbjbjBY.js";
|
|
4
|
+
import { _ as xr } from "./createForOfIteratorHelper-CasBzL_Q.js";
|
|
5
|
+
import { g as Nr } from "./index-BqTsLClH.js";
|
|
6
|
+
const Er = (function(e) {
|
|
7
|
+
var t = n.useRef({
|
|
8
|
+
valueLabels: /* @__PURE__ */ new Map()
|
|
9
|
+
});
|
|
10
|
+
return n.useMemo(function() {
|
|
11
|
+
var r = t.current.valueLabels, l = /* @__PURE__ */ new Map(), a = e.map(function(s) {
|
|
12
|
+
var o = s.value, i = s.label, u = i ?? r.get(o);
|
|
13
|
+
return l.set(o, u), G(G({}, s), {}, {
|
|
14
|
+
label: u
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
return t.current.valueLabels = l, [a];
|
|
18
|
+
}, [e]);
|
|
19
|
+
});
|
|
20
|
+
var Ir = function(t, r, l, a) {
|
|
21
|
+
return n.useMemo(function() {
|
|
22
|
+
var s = function(E) {
|
|
23
|
+
return E.map(function(D) {
|
|
24
|
+
var P = D.value;
|
|
25
|
+
return P;
|
|
26
|
+
});
|
|
27
|
+
}, o = s(t), i = s(r), u = o.filter(function(V) {
|
|
28
|
+
return !a[V];
|
|
29
|
+
}), f = o, p = i;
|
|
30
|
+
if (l) {
|
|
31
|
+
var _ = St(o, !0, a);
|
|
32
|
+
f = _.checkedKeys, p = _.halfCheckedKeys;
|
|
33
|
+
}
|
|
34
|
+
return [Array.from(new Set([].concat(Ie(u), Ie(f)))), p];
|
|
35
|
+
}, [t, r, l, a]);
|
|
36
|
+
}, At = function(t) {
|
|
37
|
+
return Array.isArray(t) ? t : t !== void 0 ? [t] : [];
|
|
38
|
+
}, kr = function(t) {
|
|
39
|
+
var r = t || {}, l = r.label, a = r.value, s = r.children;
|
|
40
|
+
return {
|
|
41
|
+
_title: l ? [l] : ["title", "label"],
|
|
42
|
+
value: a || "value",
|
|
43
|
+
key: a || "value",
|
|
44
|
+
children: s || "children"
|
|
45
|
+
};
|
|
46
|
+
}, yt = function(t) {
|
|
47
|
+
return !t || t.disabled || t.disableCheckbox || t.checkable === !1;
|
|
48
|
+
}, _r = function(t, r) {
|
|
49
|
+
var l = [], a = function s(o) {
|
|
50
|
+
o.forEach(function(i) {
|
|
51
|
+
var u = i[r.children];
|
|
52
|
+
u && (l.push(i[r.value]), s(u));
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
return a(t), l;
|
|
56
|
+
}, bt = function(t) {
|
|
57
|
+
return t == null;
|
|
58
|
+
};
|
|
59
|
+
const Dr = (function(e, t) {
|
|
60
|
+
return n.useMemo(function() {
|
|
61
|
+
var r = gr(e, {
|
|
62
|
+
fieldNames: t,
|
|
63
|
+
initWrapper: function(a) {
|
|
64
|
+
return G(G({}, a), {}, {
|
|
65
|
+
valueEntities: /* @__PURE__ */ new Map()
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
processEntity: function(a, s) {
|
|
69
|
+
var o = a.node[t.value];
|
|
70
|
+
if (process.env.NODE_ENV !== "production") {
|
|
71
|
+
var i = a.node.key;
|
|
72
|
+
q(!bt(o), "TreeNode `value` is invalidate: undefined"), q(!s.valueEntities.has(o), "Same `value` exist in the tree: ".concat(o)), q(!i || String(i) === String(o), "`key` or `value` with TreeNode must be the same or you can remove one of them. key: ".concat(i, ", value: ").concat(o, "."));
|
|
73
|
+
}
|
|
74
|
+
s.valueEntities.set(o, a);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
return r;
|
|
78
|
+
}, [e, t]);
|
|
79
|
+
});
|
|
80
|
+
var Nt = function() {
|
|
81
|
+
return null;
|
|
82
|
+
}, Tr = ["children", "value"];
|
|
83
|
+
function $t(e) {
|
|
84
|
+
return Ut(e).map(function(t) {
|
|
85
|
+
if (!/* @__PURE__ */ n.isValidElement(t) || !t.type)
|
|
86
|
+
return null;
|
|
87
|
+
var r = t, l = r.key, a = r.props, s = a.children, o = a.value, i = Lt(a, Tr), u = G({
|
|
88
|
+
key: l,
|
|
89
|
+
value: o
|
|
90
|
+
}, i), f = $t(s);
|
|
91
|
+
return f.length && (u.children = f), u;
|
|
92
|
+
}).filter(function(t) {
|
|
93
|
+
return t;
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function wt(e) {
|
|
97
|
+
if (!e)
|
|
98
|
+
return e;
|
|
99
|
+
var t = G({}, e);
|
|
100
|
+
return "props" in t || Object.defineProperty(t, "props", {
|
|
101
|
+
get: function() {
|
|
102
|
+
return q(!1, "New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."), t;
|
|
103
|
+
}
|
|
104
|
+
}), t;
|
|
105
|
+
}
|
|
106
|
+
function Or(e, t, r, l, a, s) {
|
|
107
|
+
var o = null, i = null;
|
|
108
|
+
function u() {
|
|
109
|
+
function f(p) {
|
|
110
|
+
var _ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "0", V = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
|
|
111
|
+
return p.map(function(E, D) {
|
|
112
|
+
var P = "".concat(_, "-").concat(D), I = E[s.value], H = r.includes(I), J = f(E[s.children] || [], P, H), Z = /* @__PURE__ */ n.createElement(Nt, E, J.map(function(R) {
|
|
113
|
+
return R.node;
|
|
114
|
+
}));
|
|
115
|
+
if (t === I && (o = Z), H) {
|
|
116
|
+
var ae = {
|
|
117
|
+
pos: P,
|
|
118
|
+
node: Z,
|
|
119
|
+
children: J
|
|
120
|
+
};
|
|
121
|
+
return V || i.push(ae), ae;
|
|
122
|
+
}
|
|
123
|
+
return null;
|
|
124
|
+
}).filter(function(E) {
|
|
125
|
+
return E;
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
i || (i = [], f(l), i.sort(function(p, _) {
|
|
129
|
+
var V = p.node.props.value, E = _.node.props.value, D = r.indexOf(V), P = r.indexOf(E);
|
|
130
|
+
return D - P;
|
|
131
|
+
}));
|
|
132
|
+
}
|
|
133
|
+
Object.defineProperty(e, "triggerNode", {
|
|
134
|
+
get: function() {
|
|
135
|
+
return q(!1, "`triggerNode` is deprecated. Please consider decoupling data with node."), u(), o;
|
|
136
|
+
}
|
|
137
|
+
}), Object.defineProperty(e, "allCheckedNodes", {
|
|
138
|
+
get: function() {
|
|
139
|
+
return q(!1, "`allCheckedNodes` is deprecated. Please consider decoupling data with node."), u(), a ? i : i.map(function(p) {
|
|
140
|
+
var _ = p.node;
|
|
141
|
+
return _;
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
var Pr = function(t, r, l) {
|
|
147
|
+
var a = l.fieldNames, s = l.treeNodeFilterProp, o = l.filterTreeNode, i = a.children;
|
|
148
|
+
return n.useMemo(function() {
|
|
149
|
+
if (!r || o === !1)
|
|
150
|
+
return t;
|
|
151
|
+
var u = typeof o == "function" ? o : function(p, _) {
|
|
152
|
+
return String(_[s]).toUpperCase().includes(r.toUpperCase());
|
|
153
|
+
}, f = function p(_) {
|
|
154
|
+
var V = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
155
|
+
return _.reduce(function(E, D) {
|
|
156
|
+
var P = D[i], I = V || u(r, wt(D)), H = p(P || [], I);
|
|
157
|
+
return (I || H.length) && E.push(G(G({}, D), {}, Bt({
|
|
158
|
+
isLeaf: void 0
|
|
159
|
+
}, i, H))), E;
|
|
160
|
+
}, []);
|
|
161
|
+
};
|
|
162
|
+
return f(t);
|
|
163
|
+
}, [t, r, i, s, o]);
|
|
164
|
+
};
|
|
165
|
+
function Vt(e) {
|
|
166
|
+
var t = n.useRef();
|
|
167
|
+
t.current = e;
|
|
168
|
+
var r = n.useCallback(function() {
|
|
169
|
+
return t.current.apply(t, arguments);
|
|
170
|
+
}, []);
|
|
171
|
+
return r;
|
|
172
|
+
}
|
|
173
|
+
function Vr(e, t) {
|
|
174
|
+
var r = t.id, l = t.pId, a = t.rootPId, s = /* @__PURE__ */ new Map(), o = [];
|
|
175
|
+
return e.forEach(function(i) {
|
|
176
|
+
var u = i[r], f = G(G({}, i), {}, {
|
|
177
|
+
key: i.key || u
|
|
178
|
+
});
|
|
179
|
+
s.set(u, f);
|
|
180
|
+
}), s.forEach(function(i) {
|
|
181
|
+
var u = i[l], f = s.get(u);
|
|
182
|
+
f ? (f.children = f.children || [], f.children.push(i)) : (u === a || a === null) && o.push(i);
|
|
183
|
+
}), o;
|
|
184
|
+
}
|
|
185
|
+
function Mr(e, t, r) {
|
|
186
|
+
return n.useMemo(function() {
|
|
187
|
+
if (e) {
|
|
188
|
+
if (r) {
|
|
189
|
+
var l = G({
|
|
190
|
+
id: "id",
|
|
191
|
+
pId: "pId",
|
|
192
|
+
rootPId: null
|
|
193
|
+
}, xt(r) === "object" ? r : {});
|
|
194
|
+
return Vr(e, l);
|
|
195
|
+
}
|
|
196
|
+
return e;
|
|
197
|
+
}
|
|
198
|
+
return $t(t);
|
|
199
|
+
}, [t, r, e]);
|
|
200
|
+
}
|
|
201
|
+
var Wt = /* @__PURE__ */ n.createContext(null), Ft = /* @__PURE__ */ n.createContext(null), Lr = {
|
|
202
|
+
width: 0,
|
|
203
|
+
height: 0,
|
|
204
|
+
display: "flex",
|
|
205
|
+
overflow: "hidden",
|
|
206
|
+
opacity: 0,
|
|
207
|
+
border: 0,
|
|
208
|
+
padding: 0,
|
|
209
|
+
margin: 0
|
|
210
|
+
}, Kr = function(t, r) {
|
|
211
|
+
var l = Xt(), a = l.prefixCls, s = l.multiple, o = l.searchValue, i = l.toggleOpen, u = l.open, f = l.notFoundContent, p = n.useContext(Ft), _ = p.virtual, V = p.listHeight, E = p.listItemHeight, D = p.listItemScrollOffset, P = p.treeData, I = p.fieldNames, H = p.onSelect, J = p.dropdownMatchSelectWidth, Z = p.treeExpandAction, ae = p.treeTitleRender, R = p.onPopupScroll, T = p.leftMaxCount, Le = p.leafCountOnly, le = p.valueEntities, b = n.useContext(Wt), ue = b.checkable, A = b.checkedKeys, Ke = b.halfCheckedKeys, ce = b.treeExpandedKeys, He = b.treeDefaultExpandAll, Re = b.treeDefaultExpandedKeys, de = b.onTreeExpand, ke = b.treeIcon, Ae = b.showTreeIcon, $e = b.switcherIcon, We = b.treeLine, Fe = b.treeNodeFilterProp, je = b.loadData, _e = b.treeLoadedKeys, ze = b.treeMotion, Ce = b.onTreeLoad, fe = b.keyEntities, Q = n.useRef(), F = kt(
|
|
212
|
+
function() {
|
|
213
|
+
return P;
|
|
214
|
+
},
|
|
215
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
216
|
+
[u, P],
|
|
217
|
+
function(m, v) {
|
|
218
|
+
return v[0] && m[1] !== v[1];
|
|
219
|
+
}
|
|
220
|
+
), j = n.useMemo(function() {
|
|
221
|
+
return ue ? {
|
|
222
|
+
checked: A,
|
|
223
|
+
halfChecked: Ke
|
|
224
|
+
} : null;
|
|
225
|
+
}, [ue, A, Ke]);
|
|
226
|
+
n.useEffect(function() {
|
|
227
|
+
if (u && !s && A.length) {
|
|
228
|
+
var m;
|
|
229
|
+
(m = Q.current) === null || m === void 0 || m.scrollTo({
|
|
230
|
+
key: A[0]
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
}, [u]);
|
|
234
|
+
var ve = function(v) {
|
|
235
|
+
v.preventDefault();
|
|
236
|
+
}, Se = function(v, x) {
|
|
237
|
+
var C = x.node;
|
|
238
|
+
ue && yt(C) || (H(C.key, {
|
|
239
|
+
selected: !A.includes(C.key)
|
|
240
|
+
}), s || i(!1));
|
|
241
|
+
}, he = n.useState(Re), pe = ne(he, 2), Y = pe[0], Ue = pe[1], ee = n.useState(null), De = ne(ee, 2), ye = De[0], oe = De[1], me = n.useMemo(function() {
|
|
242
|
+
return ce ? Ie(ce) : o ? ye : Y;
|
|
243
|
+
}, [Y, ye, ce, o]), B = function(v) {
|
|
244
|
+
Ue(v), oe(v), de && de(v);
|
|
245
|
+
}, Te = String(o).toLowerCase(), $ = function(v) {
|
|
246
|
+
return Te ? String(v[Fe]).toLowerCase().includes(Te) : !1;
|
|
247
|
+
};
|
|
248
|
+
n.useEffect(function() {
|
|
249
|
+
o && oe(_r(P, I));
|
|
250
|
+
}, [o]);
|
|
251
|
+
var M = n.useState(function() {
|
|
252
|
+
return /* @__PURE__ */ new Map();
|
|
253
|
+
}), be = ne(M, 2), L = be[0], tt = be[1];
|
|
254
|
+
n.useEffect(function() {
|
|
255
|
+
T && tt(/* @__PURE__ */ new Map());
|
|
256
|
+
}, [T]);
|
|
257
|
+
function te(m) {
|
|
258
|
+
var v = m[I.value];
|
|
259
|
+
if (!L.has(v)) {
|
|
260
|
+
var x = le.get(v), C = (x.children || []).length === 0;
|
|
261
|
+
if (C)
|
|
262
|
+
L.set(v, !1);
|
|
263
|
+
else {
|
|
264
|
+
var N = x.children.filter(function(W) {
|
|
265
|
+
return !W.node.disabled && !W.node.disableCheckbox && !A.includes(W.node[I.value]);
|
|
266
|
+
}), U = N.length;
|
|
267
|
+
L.set(v, U > T);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return L.get(v);
|
|
271
|
+
}
|
|
272
|
+
var w = qt(function(m) {
|
|
273
|
+
var v = m[I.value];
|
|
274
|
+
return A.includes(v) || T === null ? !1 : T <= 0 ? !0 : Le && T ? te(m) : !1;
|
|
275
|
+
}), Oe = function m(v) {
|
|
276
|
+
var x = xr(v), C;
|
|
277
|
+
try {
|
|
278
|
+
for (x.s(); !(C = x.n()).done; ) {
|
|
279
|
+
var N = C.value;
|
|
280
|
+
if (!(N.disabled || N.selectable === !1)) {
|
|
281
|
+
if (o) {
|
|
282
|
+
if ($(N))
|
|
283
|
+
return N;
|
|
284
|
+
} else
|
|
285
|
+
return N;
|
|
286
|
+
if (N[I.children]) {
|
|
287
|
+
var U = m(N[I.children]);
|
|
288
|
+
if (U)
|
|
289
|
+
return U;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
} catch (W) {
|
|
294
|
+
x.e(W);
|
|
295
|
+
} finally {
|
|
296
|
+
x.f();
|
|
297
|
+
}
|
|
298
|
+
return null;
|
|
299
|
+
}, Be = n.useState(null), we = ne(Be, 2), ge = we[0], Xe = we[1], z = fe[ge];
|
|
300
|
+
n.useEffect(function() {
|
|
301
|
+
if (u) {
|
|
302
|
+
var m = null, v = function() {
|
|
303
|
+
var C = Oe(F);
|
|
304
|
+
return C ? C[I.value] : null;
|
|
305
|
+
};
|
|
306
|
+
!s && A.length && !o ? m = A[0] : m = v(), Xe(m);
|
|
307
|
+
}
|
|
308
|
+
}, [u, o]), n.useImperativeHandle(r, function() {
|
|
309
|
+
var m;
|
|
310
|
+
return {
|
|
311
|
+
scrollTo: (m = Q.current) === null || m === void 0 ? void 0 : m.scrollTo,
|
|
312
|
+
onKeyDown: function(x) {
|
|
313
|
+
var C, N = x.which;
|
|
314
|
+
switch (N) {
|
|
315
|
+
// >>> Arrow keys
|
|
316
|
+
case et.UP:
|
|
317
|
+
case et.DOWN:
|
|
318
|
+
case et.LEFT:
|
|
319
|
+
case et.RIGHT:
|
|
320
|
+
(C = Q.current) === null || C === void 0 || C.onKeyDown(x);
|
|
321
|
+
break;
|
|
322
|
+
// >>> Select item
|
|
323
|
+
case et.ENTER: {
|
|
324
|
+
if (z) {
|
|
325
|
+
var U = w(z.node), W = (z == null ? void 0 : z.node) || {}, Pe = W.selectable, ie = W.value, Ge = W.disabled;
|
|
326
|
+
Pe !== !1 && !Ge && !U && Se(null, {
|
|
327
|
+
node: {
|
|
328
|
+
key: ge
|
|
329
|
+
},
|
|
330
|
+
selected: !A.includes(ie)
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
// >>> Close
|
|
336
|
+
case et.ESC:
|
|
337
|
+
i(!1);
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
onKeyUp: function() {
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
});
|
|
344
|
+
var qe = kt(function() {
|
|
345
|
+
return !o;
|
|
346
|
+
}, [o, ce || Y], function(m, v) {
|
|
347
|
+
var x = ne(m, 1), C = x[0], N = ne(v, 2), U = N[0], W = N[1];
|
|
348
|
+
return C !== U && !!(U || W);
|
|
349
|
+
}), K = qe ? je : null;
|
|
350
|
+
if (F.length === 0)
|
|
351
|
+
return /* @__PURE__ */ n.createElement("div", {
|
|
352
|
+
role: "listbox",
|
|
353
|
+
className: "".concat(a, "-empty"),
|
|
354
|
+
onMouseDown: ve
|
|
355
|
+
}, f);
|
|
356
|
+
var O = {
|
|
357
|
+
fieldNames: I
|
|
358
|
+
};
|
|
359
|
+
return _e && (O.loadedKeys = _e), me && (O.expandedKeys = me), /* @__PURE__ */ n.createElement("div", {
|
|
360
|
+
onMouseDown: ve
|
|
361
|
+
}, z && u && /* @__PURE__ */ n.createElement("span", {
|
|
362
|
+
style: Lr,
|
|
363
|
+
"aria-live": "assertive"
|
|
364
|
+
}, z.node.value), /* @__PURE__ */ n.createElement(Cr.Provider, {
|
|
365
|
+
value: {
|
|
366
|
+
nodeDisabled: w
|
|
367
|
+
}
|
|
368
|
+
}, /* @__PURE__ */ n.createElement(Sr, Kt({
|
|
369
|
+
ref: Q,
|
|
370
|
+
focusable: !1,
|
|
371
|
+
prefixCls: "".concat(a, "-tree"),
|
|
372
|
+
treeData: F,
|
|
373
|
+
height: V,
|
|
374
|
+
itemHeight: E,
|
|
375
|
+
itemScrollOffset: D,
|
|
376
|
+
virtual: _ !== !1 && J !== !1,
|
|
377
|
+
multiple: s,
|
|
378
|
+
icon: ke,
|
|
379
|
+
showIcon: Ae,
|
|
380
|
+
switcherIcon: $e,
|
|
381
|
+
showLine: We,
|
|
382
|
+
loadData: K,
|
|
383
|
+
motion: ze,
|
|
384
|
+
activeKey: ge,
|
|
385
|
+
checkable: ue,
|
|
386
|
+
checkStrictly: !0,
|
|
387
|
+
checkedKeys: j,
|
|
388
|
+
selectedKeys: ue ? [] : A,
|
|
389
|
+
defaultExpandAll: He,
|
|
390
|
+
titleRender: ae
|
|
391
|
+
}, O, {
|
|
392
|
+
// Proxy event out
|
|
393
|
+
onActiveChange: Xe,
|
|
394
|
+
onSelect: Se,
|
|
395
|
+
onCheck: Se,
|
|
396
|
+
onExpand: B,
|
|
397
|
+
onLoad: Ce,
|
|
398
|
+
filterTreeNode: $,
|
|
399
|
+
expandAction: Z,
|
|
400
|
+
onScroll: R
|
|
401
|
+
}))));
|
|
402
|
+
}, jt = /* @__PURE__ */ n.forwardRef(Kr);
|
|
403
|
+
process.env.NODE_ENV !== "production" && (jt.displayName = "OptionList");
|
|
404
|
+
var Et = "SHOW_ALL", It = "SHOW_PARENT", dt = "SHOW_CHILD";
|
|
405
|
+
function Mt(e, t, r, l) {
|
|
406
|
+
var a = new Set(e);
|
|
407
|
+
return t === dt ? e.filter(function(s) {
|
|
408
|
+
var o = r[s];
|
|
409
|
+
return !o || !o.children || !o.children.some(function(i) {
|
|
410
|
+
var u = i.node;
|
|
411
|
+
return a.has(u[l.value]);
|
|
412
|
+
}) || !o.children.every(function(i) {
|
|
413
|
+
var u = i.node;
|
|
414
|
+
return yt(u) || a.has(u[l.value]);
|
|
415
|
+
});
|
|
416
|
+
}) : t === It ? e.filter(function(s) {
|
|
417
|
+
var o = r[s], i = o ? o.parent : null;
|
|
418
|
+
return !i || yt(i.node) || !a.has(i.key);
|
|
419
|
+
}) : e;
|
|
420
|
+
}
|
|
421
|
+
function Hr(e) {
|
|
422
|
+
var t = e.searchPlaceholder, r = e.treeCheckStrictly, l = e.treeCheckable, a = e.labelInValue, s = e.value, o = e.multiple, i = e.showCheckedStrategy, u = e.maxCount;
|
|
423
|
+
q(!t, "`searchPlaceholder` has been removed."), r && a === !1 && q(!1, "`treeCheckStrictly` will force set `labelInValue` to `true`."), (a || r) && q(At(s).every(function(f) {
|
|
424
|
+
return f && xt(f) === "object" && "value" in f;
|
|
425
|
+
}), "Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead."), r || o || l ? q(!s || Array.isArray(s), "`value` should be an array when `TreeSelect` is checkable or multiple.") : q(!Array.isArray(s), "`value` should not be array when `TreeSelect` is single mode."), u && (i === "SHOW_ALL" && !r || i === "SHOW_PARENT") && q(!1, "`maxCount` not work with `showCheckedStrategy=SHOW_ALL` (when `treeCheckStrictly=false`) or `showCheckedStrategy=SHOW_PARENT`.");
|
|
426
|
+
}
|
|
427
|
+
var Rr = ["id", "prefixCls", "value", "defaultValue", "onChange", "onSelect", "onDeselect", "searchValue", "inputValue", "onSearch", "autoClearSearchValue", "filterTreeNode", "treeNodeFilterProp", "showCheckedStrategy", "treeNodeLabelProp", "multiple", "treeCheckable", "treeCheckStrictly", "labelInValue", "maxCount", "fieldNames", "treeDataSimpleMode", "treeData", "children", "loadData", "treeLoadedKeys", "onTreeLoad", "treeDefaultExpandAll", "treeExpandedKeys", "treeDefaultExpandedKeys", "onTreeExpand", "treeExpandAction", "virtual", "listHeight", "listItemHeight", "listItemScrollOffset", "onDropdownVisibleChange", "dropdownMatchSelectWidth", "treeLine", "treeIcon", "showTreeIcon", "switcherIcon", "treeMotion", "treeTitleRender", "onPopupScroll"];
|
|
428
|
+
function Ar(e) {
|
|
429
|
+
return !e || xt(e) !== "object";
|
|
430
|
+
}
|
|
431
|
+
var zt = /* @__PURE__ */ n.forwardRef(function(e, t) {
|
|
432
|
+
var r = e.id, l = e.prefixCls, a = l === void 0 ? "rc-tree-select" : l, s = e.value, o = e.defaultValue, i = e.onChange, u = e.onSelect, f = e.onDeselect, p = e.searchValue, _ = e.inputValue, V = e.onSearch, E = e.autoClearSearchValue, D = E === void 0 ? !0 : E, P = e.filterTreeNode, I = e.treeNodeFilterProp, H = I === void 0 ? "value" : I, J = e.showCheckedStrategy, Z = e.treeNodeLabelProp, ae = e.multiple, R = e.treeCheckable, T = e.treeCheckStrictly, Le = e.labelInValue, le = e.maxCount, b = e.fieldNames, ue = e.treeDataSimpleMode, A = e.treeData, Ke = e.children, ce = e.loadData, He = e.treeLoadedKeys, Re = e.onTreeLoad, de = e.treeDefaultExpandAll, ke = e.treeExpandedKeys, Ae = e.treeDefaultExpandedKeys, $e = e.onTreeExpand, We = e.treeExpandAction, Fe = e.virtual, je = e.listHeight, _e = je === void 0 ? 200 : je, ze = e.listItemHeight, Ce = ze === void 0 ? 20 : ze, fe = e.listItemScrollOffset, Q = fe === void 0 ? 0 : fe, F = e.onDropdownVisibleChange, j = e.dropdownMatchSelectWidth, ve = j === void 0 ? !0 : j, Se = e.treeLine, he = e.treeIcon, pe = e.showTreeIcon, Y = e.switcherIcon, Ue = e.treeMotion, ee = e.treeTitleRender, De = e.onPopupScroll, ye = Lt(e, Rr), oe = Gt(r), me = R && !T, B = R || T, Te = T || Le, $ = B || ae, M = _t(o, {
|
|
433
|
+
value: s
|
|
434
|
+
}), be = ne(M, 2), L = be[0], tt = be[1], te = n.useMemo(function() {
|
|
435
|
+
return R ? J || dt : Et;
|
|
436
|
+
}, [J, R]);
|
|
437
|
+
process.env.NODE_ENV !== "production" && Hr(e);
|
|
438
|
+
var w = n.useMemo(
|
|
439
|
+
function() {
|
|
440
|
+
return kr(b);
|
|
441
|
+
},
|
|
442
|
+
/* eslint-disable react-hooks/exhaustive-deps */
|
|
443
|
+
[JSON.stringify(b)]
|
|
444
|
+
/* eslint-enable react-hooks/exhaustive-deps */
|
|
445
|
+
), Oe = _t("", {
|
|
446
|
+
value: p !== void 0 ? p : _,
|
|
447
|
+
postState: function(d) {
|
|
448
|
+
return d || "";
|
|
449
|
+
}
|
|
450
|
+
}), Be = ne(Oe, 2), we = Be[0], ge = Be[1], Xe = function(d) {
|
|
451
|
+
ge(d), V == null || V(d);
|
|
452
|
+
}, z = Mr(A, Ke, ue), qe = Dr(z, w), K = qe.keyEntities, O = qe.valueEntities, m = n.useCallback(function(c) {
|
|
453
|
+
var d = [], h = [];
|
|
454
|
+
return c.forEach(function(g) {
|
|
455
|
+
O.has(g) ? h.push(g) : d.push(g);
|
|
456
|
+
}), {
|
|
457
|
+
missingRawValues: d,
|
|
458
|
+
existRawValues: h
|
|
459
|
+
};
|
|
460
|
+
}, [O]), v = Pr(z, we, {
|
|
461
|
+
fieldNames: w,
|
|
462
|
+
treeNodeFilterProp: H,
|
|
463
|
+
filterTreeNode: P
|
|
464
|
+
}), x = n.useCallback(function(c) {
|
|
465
|
+
if (c) {
|
|
466
|
+
if (Z)
|
|
467
|
+
return c[Z];
|
|
468
|
+
for (var d = w._title, h = 0; h < d.length; h += 1) {
|
|
469
|
+
var g = c[d[h]];
|
|
470
|
+
if (g !== void 0)
|
|
471
|
+
return g;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}, [w, Z]), C = n.useCallback(function(c) {
|
|
475
|
+
var d = At(c);
|
|
476
|
+
return d.map(function(h) {
|
|
477
|
+
return Ar(h) ? {
|
|
478
|
+
value: h
|
|
479
|
+
} : h;
|
|
480
|
+
});
|
|
481
|
+
}, []), N = n.useCallback(function(c) {
|
|
482
|
+
var d = C(c);
|
|
483
|
+
return d.map(function(h) {
|
|
484
|
+
var g = h.label, re = h.value, k = h.halfChecked, S, y = O.get(re);
|
|
485
|
+
if (y) {
|
|
486
|
+
var X;
|
|
487
|
+
g = ee ? ee(y.node) : (X = g) !== null && X !== void 0 ? X : x(y.node), S = y.node.disabled;
|
|
488
|
+
} else if (g === void 0) {
|
|
489
|
+
var Ne = C(L).find(function(at) {
|
|
490
|
+
return at.value === re;
|
|
491
|
+
});
|
|
492
|
+
g = Ne.label;
|
|
493
|
+
}
|
|
494
|
+
return {
|
|
495
|
+
label: g,
|
|
496
|
+
value: re,
|
|
497
|
+
halfChecked: k,
|
|
498
|
+
disabled: S
|
|
499
|
+
};
|
|
500
|
+
});
|
|
501
|
+
}, [O, x, C, L]), U = n.useMemo(function() {
|
|
502
|
+
return C(L === null ? [] : L);
|
|
503
|
+
}, [C, L]), W = n.useMemo(function() {
|
|
504
|
+
var c = [], d = [];
|
|
505
|
+
return U.forEach(function(h) {
|
|
506
|
+
h.halfChecked ? d.push(h) : c.push(h);
|
|
507
|
+
}), [c, d];
|
|
508
|
+
}, [U]), Pe = ne(W, 2), ie = Pe[0], Ge = Pe[1], it = n.useMemo(function() {
|
|
509
|
+
return ie.map(function(c) {
|
|
510
|
+
return c.value;
|
|
511
|
+
});
|
|
512
|
+
}, [ie]), ft = Ir(ie, Ge, me, K), st = ne(ft, 2), xe = st[0], Ye = st[1], rt = n.useMemo(function() {
|
|
513
|
+
var c = Mt(xe, te, K, w), d = c.map(function(k) {
|
|
514
|
+
var S, y;
|
|
515
|
+
return (S = (y = K[k]) === null || y === void 0 || (y = y.node) === null || y === void 0 ? void 0 : y[w.value]) !== null && S !== void 0 ? S : k;
|
|
516
|
+
}), h = d.map(function(k) {
|
|
517
|
+
var S = ie.find(function(X) {
|
|
518
|
+
return X.value === k;
|
|
519
|
+
}), y = Le ? S == null ? void 0 : S.label : ee == null ? void 0 : ee(S);
|
|
520
|
+
return {
|
|
521
|
+
value: k,
|
|
522
|
+
label: y
|
|
523
|
+
};
|
|
524
|
+
}), g = N(h), re = g[0];
|
|
525
|
+
return !$ && re && bt(re.value) && bt(re.label) ? [] : g.map(function(k) {
|
|
526
|
+
var S;
|
|
527
|
+
return G(G({}, k), {}, {
|
|
528
|
+
label: (S = k.label) !== null && S !== void 0 ? S : k.value
|
|
529
|
+
});
|
|
530
|
+
});
|
|
531
|
+
}, [w, $, xe, ie, N, te, K]), vt = Er(rt), ht = ne(vt, 1), Je = ht[0], ut = n.useMemo(function() {
|
|
532
|
+
return $ && (te === "SHOW_CHILD" || T || !R) ? le : null;
|
|
533
|
+
}, [le, $, T, te, R]), Ze = Vt(function(c, d, h) {
|
|
534
|
+
var g = Mt(c, te, K, w);
|
|
535
|
+
if (!(ut && g.length > ut)) {
|
|
536
|
+
var re = N(c);
|
|
537
|
+
if (tt(re), D && ge(""), i) {
|
|
538
|
+
var k = c;
|
|
539
|
+
me && (k = g.map(function(se) {
|
|
540
|
+
var Ee = O.get(se);
|
|
541
|
+
return Ee ? Ee.node[w.value] : se;
|
|
542
|
+
}));
|
|
543
|
+
var S = d || {
|
|
544
|
+
triggerValue: void 0,
|
|
545
|
+
selected: void 0
|
|
546
|
+
}, y = S.triggerValue, X = S.selected, Ne = k;
|
|
547
|
+
if (T) {
|
|
548
|
+
var at = Ge.filter(function(se) {
|
|
549
|
+
return !k.includes(se.value);
|
|
550
|
+
});
|
|
551
|
+
Ne = [].concat(Ie(Ne), Ie(at));
|
|
552
|
+
}
|
|
553
|
+
var lt = N(Ne), Ve = {
|
|
554
|
+
// [Legacy] Always return as array contains label & value
|
|
555
|
+
preValue: ie,
|
|
556
|
+
triggerValue: y
|
|
557
|
+
}, Qe = !0;
|
|
558
|
+
(T || h === "selection" && !X) && (Qe = !1), Or(Ve, y, c, z, Qe, w), B ? Ve.checked = X : Ve.selected = X;
|
|
559
|
+
var ct = Te ? lt : lt.map(function(se) {
|
|
560
|
+
return se.value;
|
|
561
|
+
});
|
|
562
|
+
i($ ? ct : ct[0], Te ? null : lt.map(function(se) {
|
|
563
|
+
return se.label;
|
|
564
|
+
}), Ve);
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
}), nt = n.useCallback(function(c, d) {
|
|
568
|
+
var h, g = d.selected, re = d.source, k = K[c], S = k == null ? void 0 : k.node, y = (h = S == null ? void 0 : S[w.value]) !== null && h !== void 0 ? h : c;
|
|
569
|
+
if (!$)
|
|
570
|
+
Ze([y], {
|
|
571
|
+
selected: !0,
|
|
572
|
+
triggerValue: y
|
|
573
|
+
}, "option");
|
|
574
|
+
else {
|
|
575
|
+
var X = g ? [].concat(Ie(it), [y]) : xe.filter(function(Ee) {
|
|
576
|
+
return Ee !== y;
|
|
577
|
+
});
|
|
578
|
+
if (me) {
|
|
579
|
+
var Ne = m(X), at = Ne.missingRawValues, lt = Ne.existRawValues, Ve = lt.map(function(Ee) {
|
|
580
|
+
return O.get(Ee).key;
|
|
581
|
+
}), Qe;
|
|
582
|
+
if (g) {
|
|
583
|
+
var ct = St(Ve, !0, K);
|
|
584
|
+
Qe = ct.checkedKeys;
|
|
585
|
+
} else {
|
|
586
|
+
var se = St(Ve, {
|
|
587
|
+
halfCheckedKeys: Ye
|
|
588
|
+
}, K);
|
|
589
|
+
Qe = se.checkedKeys;
|
|
590
|
+
}
|
|
591
|
+
X = [].concat(Ie(at), Ie(Qe.map(function(Ee) {
|
|
592
|
+
return K[Ee].node[w.value];
|
|
593
|
+
})));
|
|
594
|
+
}
|
|
595
|
+
Ze(X, {
|
|
596
|
+
selected: g,
|
|
597
|
+
triggerValue: y
|
|
598
|
+
}, re || "option");
|
|
599
|
+
}
|
|
600
|
+
g || !$ ? u == null || u(y, wt(S)) : f == null || f(y, wt(S));
|
|
601
|
+
}, [m, O, K, w, $, it, Ze, me, u, f, xe, Ye, le]), pt = n.useCallback(function(c) {
|
|
602
|
+
if (F) {
|
|
603
|
+
var d = {};
|
|
604
|
+
Object.defineProperty(d, "documentClickClose", {
|
|
605
|
+
get: function() {
|
|
606
|
+
return q(!1, "Second param of `onDropdownVisibleChange` has been removed."), !1;
|
|
607
|
+
}
|
|
608
|
+
}), F(c, d);
|
|
609
|
+
}
|
|
610
|
+
}, [F]), mt = Vt(function(c, d) {
|
|
611
|
+
var h = c.map(function(g) {
|
|
612
|
+
return g.value;
|
|
613
|
+
});
|
|
614
|
+
if (d.type === "clear") {
|
|
615
|
+
Ze(h, {}, "selection");
|
|
616
|
+
return;
|
|
617
|
+
}
|
|
618
|
+
d.values.length && nt(d.values[0].value, {
|
|
619
|
+
selected: !1,
|
|
620
|
+
source: "selection"
|
|
621
|
+
});
|
|
622
|
+
}), gt = n.useMemo(function() {
|
|
623
|
+
return {
|
|
624
|
+
virtual: Fe,
|
|
625
|
+
dropdownMatchSelectWidth: ve,
|
|
626
|
+
listHeight: _e,
|
|
627
|
+
listItemHeight: Ce,
|
|
628
|
+
listItemScrollOffset: Q,
|
|
629
|
+
treeData: v,
|
|
630
|
+
fieldNames: w,
|
|
631
|
+
onSelect: nt,
|
|
632
|
+
treeExpandAction: We,
|
|
633
|
+
treeTitleRender: ee,
|
|
634
|
+
onPopupScroll: De,
|
|
635
|
+
leftMaxCount: le === void 0 ? null : le - Je.length,
|
|
636
|
+
leafCountOnly: te === "SHOW_CHILD" && !T && !!R,
|
|
637
|
+
valueEntities: O
|
|
638
|
+
};
|
|
639
|
+
}, [Fe, ve, _e, Ce, Q, v, w, nt, We, ee, De, le, Je.length, te, T, R, O]), Ct = n.useMemo(function() {
|
|
640
|
+
return {
|
|
641
|
+
checkable: B,
|
|
642
|
+
loadData: ce,
|
|
643
|
+
treeLoadedKeys: He,
|
|
644
|
+
onTreeLoad: Re,
|
|
645
|
+
checkedKeys: xe,
|
|
646
|
+
halfCheckedKeys: Ye,
|
|
647
|
+
treeDefaultExpandAll: de,
|
|
648
|
+
treeExpandedKeys: ke,
|
|
649
|
+
treeDefaultExpandedKeys: Ae,
|
|
650
|
+
onTreeExpand: $e,
|
|
651
|
+
treeIcon: he,
|
|
652
|
+
treeMotion: Ue,
|
|
653
|
+
showTreeIcon: pe,
|
|
654
|
+
switcherIcon: Y,
|
|
655
|
+
treeLine: Se,
|
|
656
|
+
treeNodeFilterProp: H,
|
|
657
|
+
keyEntities: K
|
|
658
|
+
};
|
|
659
|
+
}, [B, ce, He, Re, xe, Ye, de, ke, Ae, $e, he, Ue, pe, Y, Se, H, K]);
|
|
660
|
+
return /* @__PURE__ */ n.createElement(Ft.Provider, {
|
|
661
|
+
value: gt
|
|
662
|
+
}, /* @__PURE__ */ n.createElement(Wt.Provider, {
|
|
663
|
+
value: Ct
|
|
664
|
+
}, /* @__PURE__ */ n.createElement(Yt, Kt({
|
|
665
|
+
ref: t
|
|
666
|
+
}, ye, {
|
|
667
|
+
// >>> MISC
|
|
668
|
+
id: oe,
|
|
669
|
+
prefixCls: a,
|
|
670
|
+
mode: $ ? "multiple" : void 0,
|
|
671
|
+
displayValues: Je,
|
|
672
|
+
onDisplayValuesChange: mt,
|
|
673
|
+
searchValue: we,
|
|
674
|
+
onSearch: Xe,
|
|
675
|
+
OptionList: jt,
|
|
676
|
+
emptyOptions: !z.length,
|
|
677
|
+
onDropdownVisibleChange: pt,
|
|
678
|
+
dropdownMatchSelectWidth: ve
|
|
679
|
+
}))));
|
|
680
|
+
});
|
|
681
|
+
process.env.NODE_ENV !== "production" && (zt.displayName = "TreeSelect");
|
|
682
|
+
var ot = zt;
|
|
683
|
+
ot.TreeNode = Nt;
|
|
684
|
+
ot.SHOW_ALL = Et;
|
|
685
|
+
ot.SHOW_PARENT = It;
|
|
686
|
+
ot.SHOW_CHILD = dt;
|
|
687
|
+
const $r = (e) => {
|
|
688
|
+
const {
|
|
689
|
+
componentCls: t,
|
|
690
|
+
treePrefixCls: r,
|
|
691
|
+
colorBgElevated: l
|
|
692
|
+
} = e, a = `.${r}`;
|
|
693
|
+
return [
|
|
694
|
+
// ======================================================
|
|
695
|
+
// == Dropdown ==
|
|
696
|
+
// ======================================================
|
|
697
|
+
{
|
|
698
|
+
[`${t}-dropdown`]: [
|
|
699
|
+
{
|
|
700
|
+
padding: `${Dt(e.paddingXS)} ${Dt(e.calc(e.paddingXS).div(2).equal())}`
|
|
701
|
+
},
|
|
702
|
+
// ====================== Tree ======================
|
|
703
|
+
br(r, Ht(e, {
|
|
704
|
+
colorBgContainer: l
|
|
705
|
+
}), !1),
|
|
706
|
+
{
|
|
707
|
+
[a]: {
|
|
708
|
+
borderRadius: 0,
|
|
709
|
+
[`${a}-list-holder-inner`]: {
|
|
710
|
+
alignItems: "stretch",
|
|
711
|
+
[`${a}-treenode`]: {
|
|
712
|
+
[`${a}-node-content-wrapper`]: {
|
|
713
|
+
flex: "auto"
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
},
|
|
719
|
+
// ==================== Checkbox ====================
|
|
720
|
+
Nr(`${r}-checkbox`, e),
|
|
721
|
+
// ====================== RTL =======================
|
|
722
|
+
{
|
|
723
|
+
"&-rtl": {
|
|
724
|
+
direction: "rtl",
|
|
725
|
+
[`${a}-switcher${a}-switcher_close`]: {
|
|
726
|
+
[`${a}-switcher-icon svg`]: {
|
|
727
|
+
transform: "rotate(90deg)"
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
]
|
|
733
|
+
}
|
|
734
|
+
];
|
|
735
|
+
};
|
|
736
|
+
function Wr(e, t, r) {
|
|
737
|
+
return Jt("TreeSelect", (l) => {
|
|
738
|
+
const a = Ht(l, {
|
|
739
|
+
treePrefixCls: t
|
|
740
|
+
});
|
|
741
|
+
return $r(a);
|
|
742
|
+
}, yr)(e, r);
|
|
743
|
+
}
|
|
744
|
+
var Fr = function(e, t) {
|
|
745
|
+
var r = {};
|
|
746
|
+
for (var l in e) Object.prototype.hasOwnProperty.call(e, l) && t.indexOf(l) < 0 && (r[l] = e[l]);
|
|
747
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, l = Object.getOwnPropertySymbols(e); a < l.length; a++)
|
|
748
|
+
t.indexOf(l[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, l[a]) && (r[l[a]] = e[l[a]]);
|
|
749
|
+
return r;
|
|
750
|
+
};
|
|
751
|
+
const jr = (e, t) => {
|
|
752
|
+
var r, l, a, s, o;
|
|
753
|
+
const {
|
|
754
|
+
prefixCls: i,
|
|
755
|
+
size: u,
|
|
756
|
+
disabled: f,
|
|
757
|
+
bordered: p = !0,
|
|
758
|
+
style: _,
|
|
759
|
+
className: V,
|
|
760
|
+
rootClassName: E,
|
|
761
|
+
treeCheckable: D,
|
|
762
|
+
multiple: P,
|
|
763
|
+
listHeight: I = 256,
|
|
764
|
+
listItemHeight: H,
|
|
765
|
+
placement: J,
|
|
766
|
+
notFoundContent: Z,
|
|
767
|
+
switcherIcon: ae,
|
|
768
|
+
treeLine: R,
|
|
769
|
+
getPopupContainer: T,
|
|
770
|
+
popupClassName: Le,
|
|
771
|
+
dropdownClassName: le,
|
|
772
|
+
treeIcon: b = !1,
|
|
773
|
+
transitionName: ue,
|
|
774
|
+
choiceTransitionName: A = "",
|
|
775
|
+
status: Ke,
|
|
776
|
+
treeExpandAction: ce,
|
|
777
|
+
builtinPlacements: He,
|
|
778
|
+
dropdownMatchSelectWidth: Re,
|
|
779
|
+
popupMatchSelectWidth: de,
|
|
780
|
+
allowClear: ke,
|
|
781
|
+
variant: Ae,
|
|
782
|
+
dropdownStyle: $e,
|
|
783
|
+
dropdownRender: We,
|
|
784
|
+
popupRender: Fe,
|
|
785
|
+
onDropdownVisibleChange: je,
|
|
786
|
+
onOpenChange: _e,
|
|
787
|
+
tagRender: ze,
|
|
788
|
+
maxCount: Ce,
|
|
789
|
+
showCheckedStrategy: fe,
|
|
790
|
+
treeCheckStrictly: Q,
|
|
791
|
+
styles: F,
|
|
792
|
+
classNames: j
|
|
793
|
+
} = e, ve = Fr(e, ["prefixCls", "size", "disabled", "bordered", "style", "className", "rootClassName", "treeCheckable", "multiple", "listHeight", "listItemHeight", "placement", "notFoundContent", "switcherIcon", "treeLine", "getPopupContainer", "popupClassName", "dropdownClassName", "treeIcon", "transitionName", "choiceTransitionName", "status", "treeExpandAction", "builtinPlacements", "dropdownMatchSelectWidth", "popupMatchSelectWidth", "allowClear", "variant", "dropdownStyle", "dropdownRender", "popupRender", "onDropdownVisibleChange", "onOpenChange", "tagRender", "maxCount", "showCheckedStrategy", "treeCheckStrictly", "styles", "classNames"]), {
|
|
794
|
+
getPopupContainer: Se,
|
|
795
|
+
getPrefixCls: he,
|
|
796
|
+
renderEmpty: pe,
|
|
797
|
+
direction: Y,
|
|
798
|
+
virtual: Ue,
|
|
799
|
+
popupMatchSelectWidth: ee,
|
|
800
|
+
popupOverflow: De
|
|
801
|
+
} = n.useContext(Zt), {
|
|
802
|
+
styles: ye,
|
|
803
|
+
classNames: oe,
|
|
804
|
+
switcherIcon: me
|
|
805
|
+
} = Qt("treeSelect"), [, B] = er(), Te = H ?? (B == null ? void 0 : B.controlHeightSM) + (B == null ? void 0 : B.paddingXXS);
|
|
806
|
+
if (process.env.NODE_ENV !== "production") {
|
|
807
|
+
const c = tr("TreeSelect");
|
|
808
|
+
Object.entries({
|
|
809
|
+
dropdownMatchSelectWidth: "popupMatchSelectWidth",
|
|
810
|
+
dropdownStyle: "styles.popup.root",
|
|
811
|
+
dropdownClassName: "classNames.popup.root",
|
|
812
|
+
popupClassName: "classNames.popup.root",
|
|
813
|
+
dropdownRender: "popupRender",
|
|
814
|
+
onDropdownVisibleChange: "onOpenChange",
|
|
815
|
+
bordered: "variant"
|
|
816
|
+
}).forEach(([h, g]) => {
|
|
817
|
+
c.deprecated(!(h in e), h, g);
|
|
818
|
+
}), process.env.NODE_ENV !== "production" && c(P !== !1 || !D, "usage", "`multiple` will always be `true` when `treeCheckable` is true"), process.env.NODE_ENV !== "production" && c(!("showArrow" in e), "deprecated", "`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null.");
|
|
819
|
+
}
|
|
820
|
+
const $ = he(), M = he("select", i), be = he("select-tree", i), L = he("tree-select", i), {
|
|
821
|
+
compactSize: tt,
|
|
822
|
+
compactItemClassnames: te
|
|
823
|
+
} = rr(M, Y), w = Tt(M), Oe = Tt(L), [Be, we, ge] = nr(M, w), [Xe] = Wr(L, be, Oe), [z, qe] = ar("treeSelect", Ae, p), K = Ot(((r = j == null ? void 0 : j.popup) === null || r === void 0 ? void 0 : r.root) || ((l = oe == null ? void 0 : oe.popup) === null || l === void 0 ? void 0 : l.root) || Le || le, `${L}-dropdown`, {
|
|
824
|
+
[`${L}-dropdown-rtl`]: Y === "rtl"
|
|
825
|
+
}, E, oe.root, j == null ? void 0 : j.root, ge, w, Oe, we), O = ((a = F == null ? void 0 : F.popup) === null || a === void 0 ? void 0 : a.root) || ((s = ye == null ? void 0 : ye.popup) === null || s === void 0 ? void 0 : s.root) || $e, m = lr(Fe || We), v = _e || je, x = !!(D || P), C = n.useMemo(() => {
|
|
826
|
+
if (!(Ce && (fe === "SHOW_ALL" && !Q || fe === "SHOW_PARENT")))
|
|
827
|
+
return Ce;
|
|
828
|
+
}, [Ce, fe, Q]), N = or(e.suffixIcon, e.showArrow), U = (o = de ?? Re) !== null && o !== void 0 ? o : ee, {
|
|
829
|
+
status: W,
|
|
830
|
+
hasFeedback: Pe,
|
|
831
|
+
isFormItemInput: ie,
|
|
832
|
+
feedbackIcon: Ge
|
|
833
|
+
} = n.useContext(ir), it = pr(W, Ke), {
|
|
834
|
+
suffixIcon: ft,
|
|
835
|
+
removeIcon: st,
|
|
836
|
+
clearIcon: xe
|
|
837
|
+
} = sr(Object.assign(Object.assign({}, ve), {
|
|
838
|
+
multiple: x,
|
|
839
|
+
showSuffixIcon: N,
|
|
840
|
+
hasFeedback: Pe,
|
|
841
|
+
feedbackIcon: Ge,
|
|
842
|
+
prefixCls: M,
|
|
843
|
+
componentName: "TreeSelect"
|
|
844
|
+
})), Ye = ke === !0 ? {
|
|
845
|
+
clearIcon: xe
|
|
846
|
+
} : ke;
|
|
847
|
+
let rt;
|
|
848
|
+
Z !== void 0 ? rt = Z : rt = (pe == null ? void 0 : pe("Select")) || /* @__PURE__ */ n.createElement(ur, {
|
|
849
|
+
componentName: "Select"
|
|
850
|
+
});
|
|
851
|
+
const vt = Rt(ve, ["suffixIcon", "removeIcon", "clearIcon", "itemIcon", "switcherIcon", "style"]), ht = n.useMemo(() => J !== void 0 ? J : Y === "rtl" ? "bottomRight" : "bottomLeft", [J, Y]), Je = cr((c) => {
|
|
852
|
+
var d;
|
|
853
|
+
return (d = u ?? tt) !== null && d !== void 0 ? d : c;
|
|
854
|
+
}), ut = n.useContext(dr), Ze = f ?? ut, nt = Ot(!i && L, {
|
|
855
|
+
[`${M}-lg`]: Je === "large",
|
|
856
|
+
[`${M}-sm`]: Je === "small",
|
|
857
|
+
[`${M}-rtl`]: Y === "rtl",
|
|
858
|
+
[`${M}-${z}`]: qe,
|
|
859
|
+
[`${M}-in-form-item`]: ie
|
|
860
|
+
}, fr(M, it, Pe), te, V, E, oe.root, j == null ? void 0 : j.root, ge, w, Oe, we), pt = ae ?? me, mt = (c) => /* @__PURE__ */ n.createElement(wr, {
|
|
861
|
+
prefixCls: be,
|
|
862
|
+
switcherIcon: pt,
|
|
863
|
+
treeNodeProps: c,
|
|
864
|
+
showLine: R
|
|
865
|
+
}), [gt] = vr("SelectLike", O == null ? void 0 : O.zIndex), Ct = /* @__PURE__ */ n.createElement(ot, Object.assign({
|
|
866
|
+
virtual: Ue,
|
|
867
|
+
disabled: Ze
|
|
868
|
+
}, vt, {
|
|
869
|
+
dropdownMatchSelectWidth: U,
|
|
870
|
+
builtinPlacements: hr(He, De),
|
|
871
|
+
ref: t,
|
|
872
|
+
prefixCls: M,
|
|
873
|
+
className: nt,
|
|
874
|
+
style: Object.assign(Object.assign({}, F == null ? void 0 : F.root), _),
|
|
875
|
+
listHeight: I,
|
|
876
|
+
listItemHeight: Te,
|
|
877
|
+
treeCheckable: D && /* @__PURE__ */ n.createElement("span", {
|
|
878
|
+
className: `${M}-tree-checkbox-inner`
|
|
879
|
+
}),
|
|
880
|
+
treeLine: !!R,
|
|
881
|
+
suffixIcon: ft,
|
|
882
|
+
multiple: x,
|
|
883
|
+
placement: ht,
|
|
884
|
+
removeIcon: st,
|
|
885
|
+
allowClear: Ye,
|
|
886
|
+
switcherIcon: mt,
|
|
887
|
+
showTreeIcon: b,
|
|
888
|
+
notFoundContent: rt,
|
|
889
|
+
getPopupContainer: T || Se,
|
|
890
|
+
treeMotion: null,
|
|
891
|
+
dropdownClassName: K,
|
|
892
|
+
dropdownStyle: Object.assign(Object.assign({}, O), {
|
|
893
|
+
zIndex: gt
|
|
894
|
+
}),
|
|
895
|
+
dropdownRender: m,
|
|
896
|
+
onDropdownVisibleChange: v,
|
|
897
|
+
choiceTransitionName: Pt($, "", A),
|
|
898
|
+
transitionName: Pt($, "slide-up", ue),
|
|
899
|
+
treeExpandAction: ce,
|
|
900
|
+
tagRender: x ? ze : void 0,
|
|
901
|
+
maxCount: C,
|
|
902
|
+
showCheckedStrategy: fe,
|
|
903
|
+
treeCheckStrictly: Q
|
|
904
|
+
}));
|
|
905
|
+
return Be(Xe(Ct));
|
|
906
|
+
}, zr = /* @__PURE__ */ n.forwardRef(jr), Me = zr, Ur = mr(Me, "dropdownAlign", (e) => Rt(e, ["visible"]));
|
|
907
|
+
Me.TreeNode = Nt;
|
|
908
|
+
Me.SHOW_ALL = Et;
|
|
909
|
+
Me.SHOW_PARENT = It;
|
|
910
|
+
Me.SHOW_CHILD = dt;
|
|
911
|
+
Me._InternalPanelDoNotUseOrYouWillBeFired = Ur;
|
|
912
|
+
process.env.NODE_ENV !== "production" && (Me.displayName = "TreeSelect");
|
|
913
|
+
export {
|
|
914
|
+
Me as T
|
|
915
|
+
};
|