@yuku123/z-cognition-component 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/dist-lib/ApartmentOutlined-M6qSurnE.js +12 -0
  2. package/dist-lib/ArrowLeftOutlined-DowsrSUj.js +12 -0
  3. package/dist-lib/{ConceptsPage-DOf_CJlz.js → ConceptsPage-BOeKdDKI.js} +16 -13
  4. package/dist-lib/{DocsPage-CiC7TU96.js → DocsPage-BZOBFp3c.js} +4 -4
  5. package/dist-lib/EvidenceFormList-DXqqSpPV.js +91 -0
  6. package/dist-lib/{EyeOutlined-CH-5UdnC.js → EyeOutlined-DGSrX-0M.js} +1 -1
  7. package/dist-lib/ImpactPage-DyhUR6fT.js +71 -0
  8. package/dist-lib/{LeftOutlined-DQTflZ6D.js → LeftOutlined-Cgo6Izj-.js} +1 -1
  9. package/dist-lib/{OntologyDetailPage-mgK_NQxP.js → OntologyDetailPage-B8DyU8WW.js} +93 -99
  10. package/dist-lib/{OntologyInferPage-NUaoaQpN.js → OntologyInferPage-CvcjxpBB.js} +40 -38
  11. package/dist-lib/{OntologyListPage-C9wH01y0.js → OntologyListPage-Cb0XfpWE.js} +49 -47
  12. package/dist-lib/OntologyMaterializePage-B0f9TnJa.js +136 -0
  13. package/dist-lib/OntologyNodesPage-D4MWlm6q.js +1268 -0
  14. package/dist-lib/{OntologyValidatePage-DtkYK_l4.js → OntologyValidatePage-abQVJwzV.js} +52 -49
  15. package/dist-lib/{Pagination-Ds8VKQIT.js → Pagination-Dxslodkq.js} +258 -260
  16. package/dist-lib/PlusOutlined-B_dXo_97.js +12 -0
  17. package/dist-lib/{ReloadOutlined-B26pDoyV.js → ReloadOutlined-CS-e-TmN.js} +10 -19
  18. package/dist-lib/{ResolvePage-Cz9HORZ3.js → ResolvePage-rbQ-8nNZ.js} +33 -31
  19. package/dist-lib/{RotateRightOutlined-B575hEBK.js → RotateRightOutlined-q7zp2e47.js} +1 -1
  20. package/dist-lib/SearchOutlined-puH6bCY6.js +979 -0
  21. package/dist-lib/Skeleton-DXcERb5r.js +557 -0
  22. package/dist-lib/{Table-D8pPXolZ.js → Table-CDagah-g.js} +452 -450
  23. package/dist-lib/TagsOutlined-B4_qkn6-.js +20 -0
  24. package/dist-lib/TermDetailPage-CP0D6OvA.js +242 -0
  25. package/dist-lib/{TermsPage-BuzCMYov.js → TermsPage-CuufAyuL.js} +31 -28
  26. package/dist-lib/TextArea-DTpTS5HL.js +1897 -0
  27. package/dist-lib/ThunderboltOutlined-Bf54AaFE.js +20 -0
  28. package/dist-lib/{agents-DS0rPJGV.js → agents-CvgRLQw2.js} +46 -46
  29. package/dist-lib/{ai-CQ67aRC4.js → ai-DYDhijtn.js} +30 -30
  30. package/dist-lib/{ai-chat-share-AOB7rEOb.js → ai-chat-share-DJnybJtS.js} +14 -13
  31. package/dist-lib/{approval-LLVR3fMa.js → approval-3IbhY8Lp.js} +26 -25
  32. package/dist-lib/{approvals-D1DSA-Mw.js → approvals-Cd6CVzz4.js} +43 -42
  33. package/dist-lib/{assistant-DpabpWKV.js → assistant-cIXgilaE.js} +50 -49
  34. package/dist-lib/{assistant-history-ChvhtZwX.js → assistant-history-BQzH4ChB.js} +5 -5
  35. package/dist-lib/{assistant-summary-B0ksF8CX.js → assistant-summary-LKTj_HKM.js} +1 -1
  36. package/dist-lib/{audit-DeU1XEgQ.js → audit-CxuJ5unU.js} +1 -1
  37. package/dist-lib/{bios-Bk36bVhw.js → bios-BplnCOF4.js} +130 -125
  38. package/dist-lib/callSuper-DZEfdkXG.js +7 -0
  39. package/dist-lib/{changelog-xEt2qnho.js → changelog-BoGqt_81.js} +2 -2
  40. package/dist-lib/{changelog-CCMDMI4R.js → changelog-Cn81Dvgk.js} +1 -1
  41. package/dist-lib/chunk-YDNE64FV-DGyyfCo0.js +2004 -0
  42. package/dist-lib/colors-sdAcAcU3.js +24 -0
  43. package/dist-lib/context-Buz0ggsK.js +710 -0
  44. package/dist-lib/context-DpmyNOn3.js +21 -0
  45. package/dist-lib/createForOfIteratorHelper-DEx_aTey.js +51 -0
  46. package/dist-lib/d3-force-CZK-Rgd6.js +598 -0
  47. package/dist-lib/{dayjs.min-DoEf5yCX.js → dayjs.min-BauDENhn.js} +1 -1
  48. package/dist-lib/{detail-Xtof0GoK.js → detail-BaX7WiWV.js} +51 -50
  49. package/dist-lib/{detail-BW6dD_YP.js → detail-Cx5c4KJH.js} +89 -88
  50. package/dist-lib/{docx-preview-D4v2g8Yg.js → docx-preview-B5nQuTwk.js} +1 -1
  51. package/dist-lib/{downloads-Dj4DgBSS.js → downloads-C3Oz04OW.js} +4 -3
  52. package/dist-lib/{edit-nZ7siGuW.js → edit-Cbn2eJaJ.js} +265 -259
  53. package/dist-lib/{editor-BuhZwEsv.js → editor-mtaJBQXz.js} +21 -20
  54. package/dist-lib/embed-CR8XVkMy.js +31148 -0
  55. package/dist-lib/{evaluation-B-igEqQ9.js → evaluation-BoHiY8yT.js} +15 -14
  56. package/dist-lib/{focus-set-DfRWcq91.js → focus-set-h0YtOUB2.js} +34 -33
  57. package/dist-lib/{format-CWI99NCN.js → format-UGmYKemG.js} +1 -1
  58. package/dist-lib/index-9aQ4BzIK.js +500 -0
  59. package/dist-lib/{index-BJ2Gpcbi.js → index-B22_2Dzh.js} +2 -2
  60. package/dist-lib/index-B57Fj7Y0.js +1169 -0
  61. package/dist-lib/{index-D_-8dmug.js → index-BEjXaDfk.js} +23 -22
  62. package/dist-lib/{index-rtSfQuYs.js → index-BSlCGnzo.js} +12 -12
  63. package/dist-lib/index-Bc-Vin3j.js +256 -0
  64. package/dist-lib/{index-SAPKyv8e.js → index-Bm1sK-VN.js} +10 -10
  65. package/dist-lib/{index-g9uC_rON.js → index-BwVZgt5s.js} +129 -146
  66. package/dist-lib/{index-CZipVp1G.js → index-C3AMwzIi.js} +1 -1
  67. package/dist-lib/{index-B5jr3A7f.js → index-CHBNrCMy.js} +19 -19
  68. package/dist-lib/{index-BFRg0cn3.js → index-CLTfICbf.js} +6 -6
  69. package/dist-lib/{index-CnLkqTRm.js → index-CaXylbQR.js} +175 -173
  70. package/dist-lib/index-Cfu1W1H6.js +535 -0
  71. package/dist-lib/{index-DzrH4RQ7.js → index-Cj4DDWyj.js} +11 -10
  72. package/dist-lib/index-CrMcNEAZ.js +9656 -0
  73. package/dist-lib/index-Cy9i4Kx7.js +699 -0
  74. package/dist-lib/index-CyKWCYMK.js +218 -0
  75. package/dist-lib/{index-CjwzwBTy.js → index-D3GHtSlM.js} +94 -93
  76. package/dist-lib/{index-B8l4PAGJ.js → index-DBlG9uXV.js} +112 -108
  77. package/dist-lib/index-DBtGE89a.js +168 -0
  78. package/dist-lib/{index-CS5YTpdI.js → index-DMTPsTna.js} +4 -3
  79. package/dist-lib/index-DjFPRXl5.js +1484 -0
  80. package/dist-lib/{index-Bu6udiyN.js → index-DsuUGhTA.js} +123 -121
  81. package/dist-lib/index-DvWHYX81.js +450 -0
  82. package/dist-lib/{index-D5V4bZ4e.js → index-PBT9GksC.js} +8 -8
  83. package/dist-lib/index-Vu6sPBci.js +1884 -0
  84. package/dist-lib/index-bOY1cBol.js +4890 -0
  85. package/dist-lib/index-nQSVLWfW.js +356 -0
  86. package/dist-lib/{index-pcUZcUIA.js → index-o65vKUwa.js} +48 -47
  87. package/dist-lib/{index-K7z38Ybg.js → index-ounfql2z.js} +33 -31
  88. package/dist-lib/{index-B1rpIXU7.js → index-y7jVGGI0.js} +23 -21
  89. package/dist-lib/index.js +3 -1
  90. package/dist-lib/{jszip.min-dcaDnWUw.js → jszip.min-DcEHhn-b.js} +1 -1
  91. package/dist-lib/{kb-form-modal-9L0AUHVG.js → kb-form-modal-B0rM1ZvV.js} +71 -71
  92. package/dist-lib/{kbTeam-BECePvJe.js → kbTeam-Bh_FQH28.js} +3 -3
  93. package/dist-lib/{knowledge-base-C8gHP0dj.js → knowledge-base-Cl1Ka1e6.js} +104 -103
  94. package/dist-lib/{knowledge-hub-C9KkDv1A.js → knowledge-hub-CPuzdRiq.js} +52 -51
  95. package/dist-lib/{markdown-lite-BABX4bcl.js → markdown-lite-Cu62Fl7J.js} +181 -177
  96. package/dist-lib/{material-preview-docx-lp_xPipj.js → material-preview-docx-CH-09KeC.js} +1 -1
  97. package/dist-lib/{material-preview-pdf-CKAovvpc.js → material-preview-pdf-CTSo215V.js} +7 -7
  98. package/dist-lib/{material-preview-pptx-6Byitp0J.js → material-preview-pptx-D8XGDF-u.js} +1 -1
  99. package/dist-lib/{member-B5WF3FCj.js → member-DKDx77PD.js} +1 -1
  100. package/dist-lib/{message-kHyjuooj.js → message-BrooQ3Q7.js} +25 -24
  101. package/dist-lib/{message-D2MSaOMq.js → message-Dievi8Jw.js} +1 -1
  102. package/dist-lib/{messages-D_VDuKK7.js → messages-xTNmTS9g.js} +16 -15
  103. package/dist-lib/{meta-CEf_DYcU.js → meta-BD_qYTZu.js} +1 -1
  104. package/dist-lib/{metrics-hONGW0KG.js → metrics-DiHYqBKB.js} +2 -2
  105. package/dist-lib/{monitor-DF3WVsVV.js → monitor-BBCu3zRe.js} +8 -8
  106. package/dist-lib/{monitor-DFmEu6rH.js → monitor-BXsdMJSV.js} +4 -4
  107. package/dist-lib/{my-access-j53lA6T6.js → my-access-CEGErUgv.js} +4 -4
  108. package/dist-lib/{my-permissions-C5L8ZN2d.js → my-permissions-wSr5zv7g.js} +23 -22
  109. package/dist-lib/{new-DfZ61nMQ.js → new-BevAuTe5.js} +14 -12
  110. package/dist-lib/{ontology-CUH5qslO.js → ontology-DXGSJC-y.js} +145 -142
  111. package/dist-lib/{ontology-domains-CRC1ZRit.js → ontology-domains-jTG7CZm8.js} +88 -84
  112. package/dist-lib/ontology-modeling-CjRsa-DR.js +1039 -0
  113. package/dist-lib/{ontology-modeling-DaSk5fsh.js → ontology-modeling-DOj68TuI.js} +2125 -2117
  114. package/dist-lib/ontology-scenarios-CcAagMiP.js +660 -0
  115. package/dist-lib/{ontology-scenarios-DAbyoKV6.js → ontology-scenarios-J5kw6xgi.js} +703 -712
  116. package/dist-lib/pages-CsexFuEz.js +73 -0
  117. package/dist-lib/pages.js +3 -3
  118. package/dist-lib/{permission-CklDU2kO.js → permission-BUXo69Ne.js} +31 -31
  119. package/dist-lib/{pptx-preview.es-D4ODiBv2.js → pptx-preview.es-AUrdYKu3.js} +2 -2
  120. package/dist-lib/{preset-Bp_mvsJm.js → preset-gh5SGoYT.js} +9810 -10199
  121. package/dist-lib/{quota-DLe9so2b.js → quota-D31cXjul.js} +4 -4
  122. package/dist-lib/{row-CE051ClO.js → row-B5MnGm9M.js} +63 -61
  123. package/dist-lib/{save-blob-qKrc8-z6.js → save-blob-CiWNK-cX.js} +2 -2
  124. package/dist-lib/{scenario-mapping-preview-CSDqIN3R.js → scenario-mapping-preview-DQ_OBV4Z.js} +48 -46
  125. package/dist-lib/{scenario-simple-form-CAkhVgeV.js → scenario-simple-form-DESMvU7A.js} +425 -423
  126. package/dist-lib/{schedule-B_ujtL3h.js → schedule-BktxwX3S.js} +8 -8
  127. package/dist-lib/{settings-BIkKTQjc.js → settings-dsB3H65I.js} +147 -146
  128. package/dist-lib/{shared-Dfz1X4Mq.js → shared-CTCzvhyE.js} +1 -1
  129. package/dist-lib/{shared-utils-BeRiAkbe.js → shared-utils-BstybhBG.js} +2 -2
  130. package/dist-lib/{skills-BzpcX5fN.js → skills-CHPlMsgO.js} +40 -39
  131. package/dist-lib/{source-selection-DOL5LBrV.js → source-selection-tXqc855k.js} +16 -16
  132. package/dist-lib/{task-config-D0a7TOYt.js → task-config-BiTOiZj0.js} +4 -4
  133. package/dist-lib/{tech-CH01ekZ5.js → tech-BKlGPkV0.js} +4 -3
  134. package/dist-lib/{tools-YnTN61uE.js → tools-CouQ4FWk.js} +14 -14
  135. package/dist-lib/{use-domain-access-CXx1YzE5.js → use-domain-access-BPlNfoiP.js} +13 -13
  136. package/dist-lib/use-g6-graph-WLX0PweO.js +1119 -0
  137. package/dist-lib/{use-graph-layers-CowyyYcb.js → use-graph-layers-ja-ZIC_R.js} +50 -48
  138. package/dist-lib/useClosable-BY7FgWKy.js +59 -0
  139. package/dist-lib/useForm-Byp1LopG.js +145 -0
  140. package/dist-lib/{version-control-panel-CLy2ZXI_.js → version-control-panel-CkBm36Yk.js} +27 -26
  141. package/dist-lib/{version-management-C_v8w1E4.js → version-management-B4kIbdVc.js} +7 -6
  142. package/dist-lib/{welcome-ChEcA4Ej.js → welcome-F5iZoFB1.js} +4 -3
  143. package/package.json +2 -3
  144. package/dist-lib/EvidenceFormList-CrE2FzHk.js +0 -90
  145. package/dist-lib/ImpactPage-CYiuqy0S.js +0 -68
  146. package/dist-lib/OntologyMaterializePage-D_fDqYHY.js +0 -134
  147. package/dist-lib/OntologyNodesPage-5kH7RHwE.js +0 -2844
  148. package/dist-lib/PlusOutlined-BSTPGLOH.js +0 -21
  149. package/dist-lib/Skeleton-CxFsInYI.js +0 -671
  150. package/dist-lib/Table-Civ838nE.js +0 -20514
  151. package/dist-lib/TermDetailPage-BtkOpbPT.js +0 -263
  152. package/dist-lib/_commonjsHelpers-DaMA6jEr.js +0 -8
  153. package/dist-lib/callSuper-CwIeyYoc.js +0 -7
  154. package/dist-lib/chunk-6KYCQHYJ-DcgZQlO5.js +0 -1627
  155. package/dist-lib/context-T27uno74.js +0 -54
  156. package/dist-lib/d3-force-Cr_oBTiR.js +0 -647
  157. package/dist-lib/embed-Bs3Hmsyy.js +0 -51377
  158. package/dist-lib/index-0TvzCTD7.js +0 -2336
  159. package/dist-lib/index-4tbtbcAt.js +0 -550
  160. package/dist-lib/index-B1wh6i1C.js +0 -1308
  161. package/dist-lib/index-BVgdmf6r.js +0 -2487
  162. package/dist-lib/index-CSnvcFg-.js +0 -543
  163. package/dist-lib/index-D35Ry0PG.js +0 -1162
  164. package/dist-lib/index-DC57_dnh.js +0 -604
  165. package/dist-lib/index-DQ16Zb7x.js +0 -546
  166. package/dist-lib/index-DRcTwC17.js +0 -418
  167. package/dist-lib/index-Dd9pPAT3.js +0 -2192
  168. package/dist-lib/index-DxzorPvG.js +0 -13960
  169. package/dist-lib/index-If4xc1-H.js +0 -559
  170. package/dist-lib/index-R71k3nB_.js +0 -710
  171. package/dist-lib/index-mUlorJxp.js +0 -3279
  172. package/dist-lib/ontology-modeling-CvJIImxt.js +0 -3612
  173. package/dist-lib/ontology-scenarios-BRDkk3uA.js +0 -675
  174. package/dist-lib/pages-CticGC6S.js +0 -512
  175. package/dist-lib/use-g6-graph-SwJtPLce.js +0 -57552
@@ -1,1162 +0,0 @@
1
- import * as s from "react";
2
- import { useRef as Rt, useEffect as It, useMemo as Ke, isValidElement as Ot } from "react";
3
- import { f as Dt, H as Mt, a_ as Lt, bs as Xe, bC as Ht, o as Z, m as _t, aN as Bt, ax as Wt, Y as At, a5 as Ge, aB as Pt, j as Je, G as ee, v as zt, ad as Vt, E as kt, aq as Ft, aj as Ye, _ as ie, ap as J, g as Ut, F as Qe, aT as Pe, aV as jt, z as qt, l as Kt, y as Ce } from "./index-DxzorPvG.js";
4
- import { I as Ne, c as k } from "./pages-CticGC6S.js";
5
- import "react-dom/client";
6
- import "react-dom";
7
- import { K as ze, T as $e, R as Xt } from "./Table-Civ838nE.js";
8
- var Gt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z" } }] }, name: "copy", theme: "outlined" };
9
- function xe() {
10
- return xe = Object.assign ? Object.assign.bind() : function(e) {
11
- for (var t = 1; t < arguments.length; t++) {
12
- var n = arguments[t];
13
- for (var r in n)
14
- Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
15
- }
16
- return e;
17
- }, xe.apply(this, arguments);
18
- }
19
- const Jt = (e, t) => /* @__PURE__ */ s.createElement(Ne, xe({}, e, {
20
- ref: t,
21
- icon: Gt
22
- })), Ze = /* @__PURE__ */ s.forwardRef(Jt);
23
- process.env.NODE_ENV !== "production" && (Ze.displayName = "CopyOutlined");
24
- var Yt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z" } }] }, name: "edit", theme: "outlined" };
25
- function Se() {
26
- return Se = Object.assign ? Object.assign.bind() : function(e) {
27
- for (var t = 1; t < arguments.length; t++) {
28
- var n = arguments[t];
29
- for (var r in n)
30
- Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
31
- }
32
- return e;
33
- }, Se.apply(this, arguments);
34
- }
35
- const Qt = (e, t) => /* @__PURE__ */ s.createElement(Ne, Se({}, e, {
36
- ref: t,
37
- icon: Yt
38
- })), et = /* @__PURE__ */ s.forwardRef(Qt);
39
- process.env.NODE_ENV !== "production" && (et.displayName = "EditOutlined");
40
- var Zt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z" } }] }, name: "enter", theme: "outlined" };
41
- function ve() {
42
- return ve = Object.assign ? Object.assign.bind() : function(e) {
43
- for (var t = 1; t < arguments.length; t++) {
44
- var n = arguments[t];
45
- for (var r in n)
46
- Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
47
- }
48
- return e;
49
- }, ve.apply(this, arguments);
50
- }
51
- const en = (e, t) => /* @__PURE__ */ s.createElement(Ne, ve({}, e, {
52
- ref: t,
53
- icon: Zt
54
- })), tt = /* @__PURE__ */ s.forwardRef(en);
55
- process.env.NODE_ENV !== "production" && (tt.displayName = "EnterOutlined");
56
- const tn = (e) => {
57
- if (Dt() && window.document.documentElement) {
58
- const t = Array.isArray(e) ? e : [e], {
59
- documentElement: n
60
- } = window.document;
61
- return t.some((r) => r in n.style);
62
- }
63
- return !1;
64
- };
65
- function Ve(e, t) {
66
- return tn(e);
67
- }
68
- const nt = (e, t = {}) => !Mt(e) && (t != null && t.skipEmpty) ? [] : Array.isArray(e) ? e : [e], nn = (e, t, n, r) => {
69
- const {
70
- titleMarginBottom: o,
71
- fontWeightStrong: l
72
- } = r;
73
- return {
74
- marginBottom: o,
75
- color: n,
76
- fontWeight: l,
77
- fontSize: e,
78
- lineHeight: t
79
- };
80
- }, sn = (e) => {
81
- const t = [1, 2, 3, 4, 5], n = {};
82
- return t.forEach((r) => {
83
- n[`
84
- h${r}&,
85
- div&-h${r},
86
- div&-h${r} > textarea,
87
- h${r}
88
- `] = nn(e[`fontSizeHeading${r}`], e[`lineHeightHeading${r}`], e.colorTextHeading, e);
89
- }), n;
90
- }, rn = (e) => {
91
- const {
92
- componentCls: t
93
- } = e;
94
- return {
95
- [`&${`${t}-link`}`]: {
96
- ...Xe(e),
97
- userSelect: "text",
98
- [`&[disabled], &${t}-disabled`]: {
99
- color: e.colorTextDisabled,
100
- cursor: "not-allowed",
101
- "&:active, &:hover": {
102
- color: e.colorTextDisabled
103
- },
104
- "&:active": {
105
- pointerEvents: "none",
106
- // Action buttons (copy, edit, expand) must remain interactive even when
107
- // the disabled link is being clicked, otherwise their click events get
108
- // swallowed by the parent's pointer-events: none during :active.
109
- [`${t}-actions`]: {
110
- pointerEvents: "auto"
111
- }
112
- }
113
- }
114
- }
115
- };
116
- }, on = (e) => ({
117
- code: {
118
- margin: "0 0.2em",
119
- paddingInline: "0.4em",
120
- paddingBlock: "0.2em 0.1em",
121
- fontSize: "85%",
122
- fontFamily: e.fontFamilyCode,
123
- background: "rgba(150, 150, 150, 0.1)",
124
- border: `${Z(e.lineWidth)} ${e.lineType} rgba(100, 100, 100, 0.2)`,
125
- borderRadius: 3
126
- },
127
- kbd: {
128
- margin: "0 0.2em",
129
- paddingInline: "0.4em",
130
- paddingBlock: "0.15em 0.1em",
131
- fontSize: "90%",
132
- fontFamily: e.fontFamilyCode,
133
- background: "rgba(150, 150, 150, 0.06)",
134
- border: `${Z(e.lineWidth)} ${e.lineType} rgba(100, 100, 100, 0.2)`,
135
- borderBottomWidth: 2,
136
- borderRadius: 3
137
- },
138
- mark: {
139
- padding: 0,
140
- // FIXME hardcode in v4
141
- backgroundColor: Ht[2]
142
- },
143
- "u, ins": {
144
- textDecoration: "underline",
145
- textDecorationSkipInk: "auto"
146
- },
147
- "s, del": {
148
- textDecoration: "line-through"
149
- },
150
- strong: {
151
- fontWeight: e.fontWeightStrong
152
- },
153
- // list
154
- "ul, ol": {
155
- marginInline: 0,
156
- marginBlock: "0 1em",
157
- padding: 0,
158
- li: {
159
- marginInline: "20px 0",
160
- marginBlock: 0,
161
- paddingInline: "4px 0",
162
- paddingBlock: 0
163
- }
164
- },
165
- ul: {
166
- listStyleType: "circle",
167
- ul: {
168
- listStyleType: "disc"
169
- }
170
- },
171
- ol: {
172
- listStyleType: "decimal"
173
- },
174
- // pre & block
175
- "pre, blockquote": {
176
- margin: "1em 0"
177
- },
178
- pre: {
179
- padding: "0.4em 0.6em",
180
- whiteSpace: "pre-wrap",
181
- wordWrap: "break-word",
182
- background: "rgba(150, 150, 150, 0.1)",
183
- border: `${Z(e.lineWidth)} ${e.lineType} rgba(100, 100, 100, 0.2)`,
184
- borderRadius: 3,
185
- fontFamily: e.fontFamilyCode,
186
- // Compatible for marked
187
- code: {
188
- display: "inline",
189
- margin: 0,
190
- padding: 0,
191
- fontSize: "inherit",
192
- fontFamily: "inherit",
193
- background: "transparent",
194
- border: 0
195
- }
196
- },
197
- blockquote: {
198
- paddingInline: "0.6em 0",
199
- paddingBlock: 0,
200
- borderInlineStart: "4px solid rgba(100, 100, 100, 0.2)",
201
- opacity: 0.85
202
- },
203
- // table - Follow Table component default style
204
- table: {
205
- width: "100%",
206
- textAlign: "start",
207
- borderCollapse: "separate",
208
- borderSpacing: 0,
209
- marginBlock: "1em",
210
- "th, td": {
211
- padding: Z(e.padding),
212
- overflowWrap: "break-word",
213
- borderBottom: `${Z(e.lineWidth)} ${e.lineType} ${e.colorSplit}`
214
- },
215
- "thead > tr:first-child > th:first-child": {
216
- borderStartStartRadius: e.borderRadiusLG
217
- },
218
- "thead > tr:first-child > th:last-child": {
219
- borderStartEndRadius: e.borderRadiusLG
220
- },
221
- "thead > tr > th": {
222
- textAlign: "start",
223
- position: "relative",
224
- color: e.colorTextHeading,
225
- fontWeight: e.fontWeightStrong,
226
- backgroundColor: e.colorFillAlter,
227
- transition: `background-color ${e.motionDurationMid} ease`,
228
- "&:not(:last-child)::before": {
229
- position: "absolute",
230
- top: "50%",
231
- insetInlineEnd: 0,
232
- width: 1,
233
- height: "1.6em",
234
- backgroundColor: e.colorSplit,
235
- transform: "translateY(-50%)",
236
- content: '""'
237
- }
238
- },
239
- "tbody > tr": {
240
- "> th, > td": {
241
- transition: `background-color ${e.motionDurationMid} ease`
242
- },
243
- "&:hover > th, &:hover > td": {
244
- backgroundColor: e.colorFillAlter
245
- }
246
- }
247
- }
248
- }), an = (e) => {
249
- const {
250
- componentCls: t,
251
- paddingSM: n
252
- } = e, r = n;
253
- return {
254
- "&-edit-content": {
255
- position: "relative",
256
- "div&": {
257
- insetInlineStart: e.calc(e.paddingSM).mul(-1).equal(),
258
- insetBlockStart: e.calc(r).div(-2).add(1).equal(),
259
- marginBottom: e.calc(r).div(2).sub(2).equal()
260
- },
261
- [`${t}-edit-content-confirm`]: {
262
- position: "absolute",
263
- insetInlineEnd: e.calc(e.marginXS).add(2).equal(),
264
- insetBlockEnd: e.marginXS,
265
- color: e.colorIcon,
266
- // default style
267
- fontWeight: 400,
268
- fontSize: e.fontSize,
269
- fontStyle: "normal",
270
- pointerEvents: "none"
271
- },
272
- // Double the `-edit-content` class to raise this selector's specificity
273
- // above Input's own `textarea.ant-input { line-height: token.lineHeight }`
274
- // rule. Both otherwise share the same (0,1,1) specificity and Input is
275
- // injected after Typography, so on the raw TextArea path the Input rule
276
- // would win the cascade and the inherited font props below (notably
277
- // `line-height`) would not apply.
278
- [`&${t}-edit-content textarea`]: {
279
- margin: "0!important",
280
- // Inherit the edited element's typography so the editing textarea
281
- // matches the rendered text (including customized heading tokens such
282
- // as `fontSizeHeading1` and the strong heading weight), keeping editing
283
- // WYSIWYG. Browsers do not inherit font properties for form controls by
284
- // default, so they are set explicitly here.
285
- fontSize: "inherit",
286
- lineHeight: "inherit",
287
- fontFamily: "inherit",
288
- fontWeight: "inherit",
289
- // Fix Editable Textarea flash in Firefox
290
- MozTransition: "none",
291
- height: "1em"
292
- }
293
- }
294
- };
295
- }, ln = (e) => ({
296
- [`${e.componentCls}-copy-success`]: {
297
- "&, &:hover, &:focus": {
298
- color: e.colorSuccess
299
- }
300
- },
301
- [`${e.componentCls}-copy-icon-only`]: {
302
- marginInlineStart: 0
303
- }
304
- }), cn = () => ({
305
- "a&-ellipsis, span&-ellipsis": {
306
- display: "inline-block",
307
- maxWidth: "100%"
308
- },
309
- "&-ellipsis-single-line": {
310
- ...Lt,
311
- // https://blog.csdn.net/iefreer/article/details/50421025
312
- "a&, span&": {
313
- verticalAlign: "bottom"
314
- },
315
- "> code": {
316
- paddingBlock: 0,
317
- maxWidth: "calc(100% - 1.2em)",
318
- display: "inline-block",
319
- overflow: "hidden",
320
- textOverflow: "ellipsis",
321
- verticalAlign: "bottom",
322
- // https://github.com/ant-design/ant-design/issues/45953
323
- boxSizing: "content-box"
324
- }
325
- },
326
- "&-ellipsis-multiple-line": {
327
- display: "-webkit-box",
328
- overflow: "hidden",
329
- WebkitLineClamp: 3,
330
- WebkitBoxOrient: "vertical"
331
- }
332
- }), dn = (e) => {
333
- const {
334
- componentCls: t,
335
- titleMarginTop: n
336
- } = e;
337
- return {
338
- [t]: {
339
- color: e.colorText,
340
- wordBreak: "break-word",
341
- lineHeight: e.lineHeight,
342
- [`&${t}-secondary, &${t}-link${t}-secondary`]: {
343
- color: e.colorTextDescription
344
- },
345
- [`&${t}-success, &${t}-link${t}-success`]: {
346
- color: e.colorSuccessText
347
- },
348
- [`&${t}-warning, &${t}-link${t}-warning`]: {
349
- color: e.colorWarningText
350
- },
351
- [`&${t}-danger, &${t}-link${t}-danger`]: {
352
- color: e.colorErrorText,
353
- [`&${t}-link:active, &${t}-link:focus`]: {
354
- color: e.colorErrorTextActive
355
- },
356
- [`&${t}-link:hover`]: {
357
- color: e.colorErrorTextHover
358
- }
359
- },
360
- [`&${t}-disabled`]: {
361
- color: e.colorTextDisabled,
362
- cursor: "not-allowed",
363
- userSelect: "none"
364
- },
365
- "div&, p": {
366
- marginBottom: "1em"
367
- },
368
- ...sn(e),
369
- [`& + h1${t}, & + h2${t}, & + h3${t}, & + h4${t}, & + h5${t}`]: {
370
- marginTop: n
371
- },
372
- "div, ul, li, p, h1, h2, h3, h4, h5": {
373
- "+ h1, + h2, + h3, + h4, + h5": {
374
- marginTop: n
375
- }
376
- },
377
- ...on(e),
378
- ...rn(e),
379
- // Operation
380
- [`${t}-actions`]: {
381
- display: "inline"
382
- },
383
- [`
384
- ${t}-expand,
385
- ${t}-collapse,
386
- ${t}-edit,
387
- ${t}-copy
388
- `]: {
389
- ...Xe(e),
390
- marginInlineStart: e.marginXXS
391
- },
392
- [`${t}-actions-start`]: {
393
- [`
394
- ${t}-expand,
395
- ${t}-collapse,
396
- ${t}-edit,
397
- ${t}-copy:not(${t}-copy-icon-only)
398
- `]: {
399
- marginInlineStart: 0,
400
- marginInlineEnd: e.marginXXS
401
- }
402
- },
403
- ...an(e),
404
- ...ln(e),
405
- ...cn(),
406
- "&-rtl": {
407
- direction: "rtl"
408
- }
409
- }
410
- };
411
- }, pn = () => ({
412
- titleMarginTop: "1.2em",
413
- titleMarginBottom: "0.5em"
414
- }), st = _t("Typography", dn, pn), un = (e) => {
415
- const {
416
- prefixCls: t,
417
- "aria-label": n,
418
- className: r,
419
- style: o,
420
- classNames: l,
421
- styles: p,
422
- direction: f,
423
- maxLength: d,
424
- autoSize: u = !0,
425
- value: c,
426
- onSave: b,
427
- onCancel: N,
428
- onEnd: g,
429
- component: R,
430
- enterIcon: $ = /* @__PURE__ */ s.createElement(tt, null)
431
- } = e, C = s.useRef(null), h = s.useRef(!1), M = s.useRef(null), [_, j] = s.useState(c);
432
- s.useEffect(() => {
433
- j(c);
434
- }, [c]), s.useEffect(() => {
435
- var y;
436
- if ((y = C.current) != null && y.resizableTextArea) {
437
- const {
438
- textArea: T
439
- } = C.current.resizableTextArea;
440
- T.focus();
441
- const {
442
- length: I
443
- } = T.value;
444
- T.setSelectionRange(I, I);
445
- }
446
- }, []);
447
- const E = ({
448
- target: y
449
- }) => {
450
- j(y.value.replace(/[\n\r]/g, ""));
451
- }, w = () => {
452
- h.current = !0;
453
- }, B = () => {
454
- h.current = !1;
455
- }, H = ({
456
- keyCode: y
457
- }) => {
458
- h.current || (M.current = y);
459
- }, L = () => {
460
- b(_.trim());
461
- }, x = ({
462
- keyCode: y,
463
- ctrlKey: T,
464
- altKey: I,
465
- metaKey: W,
466
- shiftKey: O
467
- }) => {
468
- M.current !== y || h.current || T || I || W || O || (y === ze.ENTER ? (L(), g == null || g()) : y === ze.ESC && N());
469
- }, q = () => {
470
- L();
471
- }, [F, P] = st(t), m = k(t, `${t}-edit-content`, {
472
- [`${t}-rtl`]: f === "rtl",
473
- [`${t}-${R}`]: !!R
474
- }, r, l.root, F, P);
475
- return /* @__PURE__ */ s.createElement("div", {
476
- className: m,
477
- style: {
478
- ...p.root,
479
- ...o
480
- }
481
- }, /* @__PURE__ */ s.createElement(Bt, {
482
- ref: C,
483
- maxLength: d,
484
- value: _,
485
- onChange: E,
486
- onKeyDown: H,
487
- onKeyUp: x,
488
- onCompositionStart: w,
489
- onCompositionEnd: B,
490
- onBlur: q,
491
- "aria-label": n,
492
- rows: 1,
493
- autoSize: u,
494
- className: l.textarea,
495
- style: p.textarea
496
- }), $ !== null ? Wt($, {
497
- className: `${t}-edit-content-confirm`
498
- }) : null);
499
- }, mn = (e, t) => {
500
- let n = !1;
501
- const r = (o) => {
502
- var l, p, f;
503
- o.stopPropagation(), o.preventDefault(), (l = o.clipboardData) == null || l.clearData(), (p = o.clipboardData) == null || p.setData("text/plain", e), t && ((f = o.clipboardData) == null || f.setData("text/html", e)), n = !0;
504
- };
505
- try {
506
- return document.addEventListener("copy", r, {
507
- capture: !0
508
- }), document.execCommand("copy"), n;
509
- } catch {
510
- return !1;
511
- } finally {
512
- document.removeEventListener("copy", r, {
513
- capture: !0
514
- });
515
- }
516
- }, fn = async (e, t) => {
517
- try {
518
- return t ? await navigator.clipboard.write([new ClipboardItem({
519
- "text/html": new Blob([e], {
520
- type: "text/html"
521
- }),
522
- "text/plain": new Blob([e], {
523
- type: "text/plain"
524
- })
525
- })]) : await navigator.clipboard.writeText(e), !0;
526
- } catch {
527
- return !1;
528
- }
529
- };
530
- async function gn(e, t) {
531
- if (typeof e != "string")
532
- return process.env.NODE_ENV !== "production" && At(!1, "The clipboard content must be of string type", ""), !1;
533
- const n = (t == null ? void 0 : t.format) === "text/html";
534
- return !!(await fn(e, n) || mn(e, n));
535
- }
536
- const yn = ({
537
- copyConfig: e,
538
- children: t
539
- }) => {
540
- const [n, r] = Ge(!1), [o, l] = s.useState(!1), p = {};
541
- e.format && (p.format = e.format);
542
- const f = Pt(async (d) => {
543
- var u;
544
- d == null || d.preventDefault(), d == null || d.stopPropagation(), l(!0);
545
- try {
546
- const c = Je(e.text) ? await e.text() : e.text;
547
- await gn(c || nt(t, {
548
- skipEmpty: !0
549
- }).join("") || "", p), l(!1), r(!0, !0), r(!1, {
550
- ms: 3e3
551
- }), (u = e.onCopy) == null || u.call(e, d);
552
- } catch (c) {
553
- throw l(!1), c;
554
- }
555
- });
556
- return {
557
- copied: n,
558
- copyLoading: o,
559
- onClick: f
560
- };
561
- }, fe = (e, t) => {
562
- const n = !!e;
563
- return s.useMemo(() => {
564
- const r = {
565
- ...t,
566
- ...n && ee(e) ? e : null
567
- };
568
- return [n, r];
569
- }, [n, e, t]);
570
- }, En = (e) => {
571
- const t = Rt(void 0);
572
- return It(() => {
573
- t.current = e;
574
- }), t.current;
575
- }, hn = (e, t, n) => Ke(() => e === !0 ? {
576
- title: t ?? n
577
- } : /* @__PURE__ */ Ot(e) ? {
578
- title: e
579
- } : ee(e) ? {
580
- title: t ?? n,
581
- ...e
582
- } : {
583
- title: e
584
- }, [e, t, n]), rt = (e, t, n, r, o) => {
585
- const {
586
- getPrefixCls: l,
587
- direction: p,
588
- className: f,
589
- style: d,
590
- classNames: u,
591
- styles: c
592
- } = zt("typography"), b = r ?? p, N = l("typography", e), g = {
593
- ...o,
594
- prefixCls: N,
595
- direction: b
596
- }, R = Ke(() => ({
597
- root: f
598
- }), [f]), $ = Vt(d), [C, h] = kt([R, u, t], [c, $, n], {
599
- props: g
600
- });
601
- return [C, h, N, b];
602
- }, we = /* @__PURE__ */ s.forwardRef((e, t) => {
603
- const {
604
- component: n = "article",
605
- className: r,
606
- rootClassName: o,
607
- children: l,
608
- direction: p,
609
- style: f,
610
- classNames: d,
611
- styles: u,
612
- prefixCls: c,
613
- ...b
614
- } = e, [N, g] = st(c), R = k(c, {
615
- [`${c}-rtl`]: p === "rtl"
616
- }, r, o, N, g, d == null ? void 0 : d.root), $ = {
617
- ...u == null ? void 0 : u.root,
618
- ...f
619
- };
620
- return /* @__PURE__ */ s.createElement(n, {
621
- ...b,
622
- className: R,
623
- style: $,
624
- ref: t
625
- }, l);
626
- });
627
- process.env.NODE_ENV !== "production" && (we.displayName = "InternalTypography");
628
- const ot = /* @__PURE__ */ s.forwardRef((e, t) => {
629
- const {
630
- prefixCls: n,
631
- className: r,
632
- rootClassName: o,
633
- direction: l,
634
- classNames: p,
635
- styles: f,
636
- ...d
637
- } = e, [u, c, b, N] = rt(n, p, f, l, e);
638
- return /* @__PURE__ */ s.createElement(we, {
639
- ref: t,
640
- className: k(r, o),
641
- direction: N,
642
- classNames: u,
643
- styles: c,
644
- prefixCls: b,
645
- ...d
646
- });
647
- });
648
- process.env.NODE_ENV !== "production" && (ot.displayName = "Typography");
649
- const ke = (e) => e === !1 ? [!1, !1] : nt(e);
650
- function ge(e, t, n) {
651
- return e === !0 || e === void 0 ? t : e || n && t;
652
- }
653
- function bn(e) {
654
- const t = document.createElement("em");
655
- e.appendChild(t), process.env.NODE_ENV !== "production" && (t.className = "ant-typography-css-ellipsis-content-measure");
656
- const n = e.getBoundingClientRect(), r = t.getBoundingClientRect();
657
- return e.removeChild(t), // Horizontal out of range
658
- n.left > r.left || r.right > n.right || // Vertical out of range
659
- n.top > r.top || r.bottom > n.bottom;
660
- }
661
- const Te = (e) => ["string", "number"].includes(typeof e), xn = (e) => {
662
- const {
663
- prefixCls: t,
664
- copied: n,
665
- locale: r,
666
- iconOnly: o,
667
- tooltips: l,
668
- icon: p,
669
- tabIndex: f,
670
- onCopy: d,
671
- loading: u,
672
- className: c,
673
- style: b
674
- } = e, N = ke(l), g = ke(p), {
675
- copied: R,
676
- copy: $
677
- } = r ?? {}, C = n ? R : $, h = ge(N[n ? 1 : 0], C), M = typeof h == "string" ? h : C;
678
- return /* @__PURE__ */ s.createElement($e, {
679
- title: h
680
- }, /* @__PURE__ */ s.createElement("button", {
681
- type: "button",
682
- className: k(`${t}-copy`, c, {
683
- [`${t}-copy-success`]: n,
684
- [`${t}-copy-icon-only`]: o
685
- }),
686
- style: b,
687
- onClick: d,
688
- "aria-label": M,
689
- tabIndex: f
690
- }, n ? ge(g[1], /* @__PURE__ */ s.createElement(Xt, null), !0) : ge(g[0], u ? /* @__PURE__ */ s.createElement(Ft, null) : /* @__PURE__ */ s.createElement(Ze, null), !0)));
691
- }, re = /* @__PURE__ */ s.forwardRef(({
692
- style: e,
693
- children: t
694
- }, n) => {
695
- const r = s.useRef(null);
696
- return s.useImperativeHandle(n, () => ({
697
- isExceed: () => {
698
- const o = r.current;
699
- return o.scrollHeight > o.clientHeight;
700
- },
701
- getHeight: () => r.current.clientHeight
702
- })), /* @__PURE__ */ s.createElement("span", {
703
- "aria-hidden": !0,
704
- ref: r,
705
- style: {
706
- position: "fixed",
707
- display: "block",
708
- left: 0,
709
- top: 0,
710
- pointerEvents: "none",
711
- backgroundColor: "rgba(255, 0, 0, 0.65)",
712
- ...e
713
- }
714
- }, t);
715
- }), Sn = (e) => e.reduce((t, n) => t + (Te(n) ? String(n).length : 1), 0);
716
- function Fe(e, t) {
717
- let n = 0;
718
- const r = [];
719
- for (let o = 0; o < e.length; o += 1) {
720
- if (n === t)
721
- return r;
722
- const l = e[o], f = Te(l) ? String(l).length : 1, d = n + f;
723
- if (d > t) {
724
- const u = t - n;
725
- return r.push(String(l).slice(0, u)), r;
726
- }
727
- r.push(l), n = d;
728
- }
729
- return e;
730
- }
731
- const ye = 0, Ee = 1, he = 2, be = 3, Ue = 4, oe = {
732
- display: "-webkit-box",
733
- overflow: "hidden",
734
- WebkitBoxOrient: "vertical"
735
- };
736
- function vn(e) {
737
- const {
738
- enableMeasure: t,
739
- width: n,
740
- text: r,
741
- children: o,
742
- rows: l,
743
- expanded: p,
744
- measureDeps: f,
745
- miscDeps: d,
746
- onEllipsis: u
747
- } = e, c = s.useMemo(() => Ye(r), [r]), b = s.useMemo(() => Sn(c), [r]), N = s.useMemo(() => o(c, !1), [r].concat(ie(f))), [g, R] = s.useState(null), $ = s.useRef(null), C = s.useRef(null), h = s.useRef(null), M = s.useRef(null), _ = s.useRef(null), [j, E] = s.useState(!1), [w, B] = s.useState(ye), [H, L] = s.useState(0), [x, q] = s.useState(null);
748
- J(() => {
749
- B(t && n && b ? Ee : ye);
750
- }, [n, r, l, t, c].concat(ie(f))), J(() => {
751
- var y, T, I, W;
752
- if (w === Ee) {
753
- B(he);
754
- const O = C.current && getComputedStyle(C.current).whiteSpace;
755
- q(O);
756
- } else if (w === he) {
757
- const O = !!((y = h.current) != null && y.isExceed());
758
- B(O ? be : Ue), R(O ? [0, b] : null), E(O);
759
- const z = ((T = h.current) == null ? void 0 : T.getHeight()) || 0, ce = l === 1 ? 0 : ((I = M.current) == null ? void 0 : I.getHeight()) || 0, de = ((W = _.current) == null ? void 0 : W.getHeight()) || 0, K = Math.max(
760
- z,
761
- // height of rows with ellipsis
762
- ce + de
763
- );
764
- L(K + 1), u(O);
765
- }
766
- }, [w]);
767
- const F = g ? Math.ceil((g[0] + g[1]) / 2) : 0;
768
- J(() => {
769
- var I;
770
- const [y, T] = g || [0, 0];
771
- if (y !== T) {
772
- const O = (((I = $.current) == null ? void 0 : I.getHeight()) || 0) > H;
773
- let z = F;
774
- T - y === 1 && (z = O ? y : T), R(O ? [y, z] : [z, T]);
775
- }
776
- }, [g, F]);
777
- const P = s.useMemo(() => {
778
- if (!t)
779
- return o(c, !1);
780
- if (w !== be || !g || g[0] !== g[1]) {
781
- const y = o(c, !1);
782
- return [Ue, ye].includes(w) ? y : /* @__PURE__ */ s.createElement("span", {
783
- style: {
784
- ...oe,
785
- WebkitLineClamp: l
786
- }
787
- }, y);
788
- }
789
- return o(p ? c : Fe(c, g[0]), j);
790
- }, [p, w, g, c].concat(ie(d))), m = {
791
- width: n,
792
- margin: 0,
793
- padding: 0,
794
- whiteSpace: x === "nowrap" ? "normal" : "inherit"
795
- };
796
- return /* @__PURE__ */ s.createElement(s.Fragment, null, P, w === he && /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement(re, {
797
- style: {
798
- ...m,
799
- ...oe,
800
- WebkitLineClamp: l
801
- },
802
- ref: h
803
- }, N), /* @__PURE__ */ s.createElement(re, {
804
- style: {
805
- ...m,
806
- ...oe,
807
- WebkitLineClamp: l - 1
808
- },
809
- ref: M
810
- }, N), /* @__PURE__ */ s.createElement(re, {
811
- style: {
812
- ...m,
813
- ...oe,
814
- WebkitLineClamp: 1
815
- },
816
- ref: _
817
- }, o([], !0))), w === be && g && g[0] !== g[1] && /* @__PURE__ */ s.createElement(re, {
818
- style: {
819
- ...m,
820
- top: 400
821
- },
822
- ref: $
823
- }, o(Fe(c, F), !0)), w === Ee && /* @__PURE__ */ s.createElement("span", {
824
- style: {
825
- whiteSpace: "inherit"
826
- },
827
- ref: C
828
- }));
829
- }
830
- const it = ({
831
- enableEllipsis: e,
832
- isEllipsis: t,
833
- disabled: n,
834
- children: r,
835
- tooltipProps: o
836
- }) => !(o != null && o.title) || !e ? r : /* @__PURE__ */ s.createElement($e, {
837
- ...o,
838
- disabled: !t || n
839
- }, r);
840
- process.env.NODE_ENV !== "production" && (it.displayName = "EllipsisTooltip");
841
- function Cn({
842
- mark: e,
843
- code: t,
844
- underline: n,
845
- delete: r,
846
- strong: o,
847
- keyboard: l,
848
- italic: p
849
- }, f) {
850
- let d = f;
851
- function u(c, b) {
852
- b && (d = /* @__PURE__ */ s.createElement(c, {}, d));
853
- }
854
- return u("strong", o), u("u", n), u("del", r), u("code", t), u("mark", e), u("kbd", l), u("i", p), d;
855
- }
856
- const Nn = "...", je = ["delete", "mark", "code", "underline", "strong", "keyboard", "italic"], ae = /* @__PURE__ */ s.forwardRef((e, t) => {
857
- const {
858
- prefixCls: n,
859
- className: r,
860
- style: o,
861
- classNames: l,
862
- styles: p,
863
- direction: f,
864
- type: d,
865
- disabled: u,
866
- children: c,
867
- ellipsis: b,
868
- editable: N,
869
- copyable: g,
870
- actions: R,
871
- component: $,
872
- title: C,
873
- onClick: h,
874
- onMouseEnter: M,
875
- onMouseLeave: _,
876
- ...j
877
- } = e, [E] = Ut("Text"), w = s.useRef(null), B = s.useRef(null), [H, L, x, q] = rt(n, l, p, f, e), F = Qe(j, je), [P, m] = fe(N), [y, T] = Pe(!1, m.editing), {
878
- triggerType: I = ["icon"]
879
- } = m, W = (i) => {
880
- var a;
881
- i && ((a = m.onStart) == null || a.call(m)), T(i);
882
- }, O = En(y);
883
- J(() => {
884
- var i;
885
- !y && O && ((i = B.current) == null || i.focus());
886
- }, [y]);
887
- const z = (i) => {
888
- i == null || i.preventDefault(), W(!0);
889
- }, ce = (i) => {
890
- var a;
891
- (a = m.onChange) == null || a.call(m, i), W(!1);
892
- }, de = () => {
893
- var i;
894
- (i = m.onCancel) == null || i.call(m), W(!1);
895
- }, [K, Re] = fe(g), {
896
- placement: Y = "end"
897
- } = R ?? {}, {
898
- copied: Ie,
899
- copyLoading: Oe,
900
- onClick: at
901
- } = yn({
902
- copyConfig: Re,
903
- children: c
904
- }), [De, lt] = s.useState(!1), [Me, ct] = s.useState(!1), [Le, dt] = s.useState(!1), [pt, ut] = s.useState(!1), [mt, ft] = s.useState(!0), [V, S] = fe(b, {
905
- expandable: !1,
906
- symbol: (i) => i ? E == null ? void 0 : E.collapse : E == null ? void 0 : E.expand
907
- }), [A, gt] = Pe(S.defaultExpanded || !1, S.expanded), D = V && (!A || S.expandable === "collapsible"), {
908
- rows: X = 1
909
- } = S, te = s.useMemo(() => (
910
- // Disable ellipsis
911
- D && // Provide suffix
912
- (S.suffix !== void 0 || S.onEllipsis || // Can't use css ellipsis since we need to provide the place for button
913
- S.expandable || P || K)
914
- ), [D, S, P, K]);
915
- J(() => {
916
- V && !te && (lt(Ve("webkitLineClamp")), ct(Ve("textOverflow")));
917
- }, [te, V]);
918
- const [U, yt] = s.useState(D), He = s.useMemo(() => te ? !1 : X === 1 ? Me : De, [te, X, De, Me]);
919
- J(() => {
920
- yt(He && D);
921
- }, [He, D]);
922
- const ne = hn(S.tooltip, m.text, c), Q = U && !!ne.title, _e = D && (U ? Q && pt : Le), Et = D && X === 1 && U, pe = D && X > 1 && U, ht = (i, a) => {
923
- var v;
924
- gt(a.expanded), (v = S.onExpand) == null || v.call(S, i, a);
925
- }, [Be, bt] = s.useState(0), [xt, We] = Ge(!1), ue = s.useRef(!1), St = ({
926
- offsetWidth: i
927
- }) => {
928
- bt(i);
929
- }, vt = (i) => {
930
- var a;
931
- dt(i), Le !== i && ((a = S.onEllipsis) == null || a.call(S, i));
932
- }, me = s.useCallback(() => {
933
- const i = w.current;
934
- if (V && Q && i) {
935
- const a = bn(i);
936
- ut((v) => v === a ? v : a);
937
- }
938
- }, [V, Q]);
939
- s.useEffect(() => {
940
- ue.current && me();
941
- }, [me, c, pe, mt, Be]), s.useEffect(() => {
942
- const i = w.current;
943
- if (typeof IntersectionObserver > "u" || !i || !Q || !D)
944
- return;
945
- const a = new IntersectionObserver(() => {
946
- ft(!!i.offsetParent);
947
- });
948
- return a.observe(i), () => {
949
- a.disconnect();
950
- };
951
- }, [Q, D]);
952
- const se = s.useMemo(() => {
953
- if (!(!V || U))
954
- return [m.text, c, C, ne.title].find(Te);
955
- }, [V, U, C, ne.title, _e, m.text]);
956
- if (y)
957
- return /* @__PURE__ */ s.createElement(un, {
958
- value: m.text ?? (typeof c == "string" ? c : ""),
959
- onSave: ce,
960
- onCancel: de,
961
- onEnd: m.onEnd,
962
- prefixCls: x,
963
- className: r,
964
- style: o,
965
- direction: q,
966
- component: $,
967
- maxLength: m.maxLength,
968
- autoSize: m.autoSize,
969
- enterIcon: m.enterIcon,
970
- classNames: H,
971
- styles: L
972
- });
973
- const Ct = () => {
974
- const {
975
- expandable: i,
976
- symbol: a
977
- } = S;
978
- return i ? /* @__PURE__ */ s.createElement("button", {
979
- type: "button",
980
- key: "expand",
981
- className: k(`${x}-${A ? "collapse" : "expand"}`, H.action),
982
- style: L.action,
983
- onClick: (v) => ht(v, {
984
- expanded: !A
985
- }),
986
- "aria-label": A ? E.collapse : E == null ? void 0 : E.expand
987
- }, Je(a) ? a(A) : a) : null;
988
- }, Nt = () => {
989
- if (!P)
990
- return;
991
- const {
992
- icon: i,
993
- tooltip: a,
994
- tabIndex: v
995
- } = m, G = Ye(a)[0] || (E == null ? void 0 : E.edit), Tt = typeof G == "string" ? G : "";
996
- return I.includes("icon") ? /* @__PURE__ */ s.createElement($e, {
997
- key: "edit",
998
- title: a === !1 ? "" : G
999
- }, /* @__PURE__ */ s.createElement("button", {
1000
- type: "button",
1001
- ref: B,
1002
- className: k(`${x}-edit`, H.action),
1003
- style: L.action,
1004
- onClick: z,
1005
- "aria-label": Tt,
1006
- tabIndex: v
1007
- }, i || /* @__PURE__ */ s.createElement(et, null))) : null;
1008
- }, $t = () => K ? /* @__PURE__ */ s.createElement(xn, {
1009
- key: "copy",
1010
- ...Re,
1011
- prefixCls: x,
1012
- copied: Ie,
1013
- locale: E,
1014
- onCopy: at,
1015
- loading: Oe,
1016
- iconOnly: !Kt(c),
1017
- className: H.action,
1018
- style: L.action
1019
- }) : null, Ae = (i) => {
1020
- const a = i && Ct(), v = Nt(), G = $t();
1021
- return !a && !v && !G ? null : /* @__PURE__ */ s.createElement("span", {
1022
- key: "operations",
1023
- className: k(`${x}-actions`, H.actions, {
1024
- [`${x}-actions-start`]: Y === "start"
1025
- }),
1026
- style: L.actions,
1027
- onMouseEnter: () => We(!0, !0),
1028
- onMouseLeave: () => We(!1, {
1029
- // Delay 500ms for better user experience
1030
- ms: 500
1031
- })
1032
- }, a, v, G);
1033
- }, wt = (i) => [i && !A && /* @__PURE__ */ s.createElement("span", {
1034
- "aria-hidden": !0,
1035
- key: "ellipsis"
1036
- }, Nn), S.suffix];
1037
- return /* @__PURE__ */ s.createElement(jt, {
1038
- onResize: St,
1039
- disabled: !D
1040
- }, (i) => /* @__PURE__ */ s.createElement(it, {
1041
- tooltipProps: ne,
1042
- enableEllipsis: D,
1043
- isEllipsis: _e,
1044
- disabled: xt
1045
- }, /* @__PURE__ */ s.createElement(we, {
1046
- onMouseEnter: (a) => {
1047
- ue.current = !0, me(), M == null || M(a);
1048
- },
1049
- onMouseLeave: (a) => {
1050
- ue.current = !1, _ == null || _(a);
1051
- },
1052
- className: k({
1053
- [`${x}-${d}`]: d,
1054
- [`${x}-disabled`]: u,
1055
- [`${x}-ellipsis`]: V,
1056
- [`${x}-ellipsis-single-line`]: Et,
1057
- [`${x}-ellipsis-multiple-line`]: pe,
1058
- [`${x}-link`]: $ === "a"
1059
- }, r),
1060
- classNames: H,
1061
- styles: L,
1062
- prefixCls: x,
1063
- style: {
1064
- ...o,
1065
- WebkitLineClamp: pe ? X : void 0
1066
- },
1067
- component: $,
1068
- ref: qt(i, w, t),
1069
- direction: q,
1070
- onClick: (a) => {
1071
- I.includes("text") && z(a), h == null || h(a);
1072
- },
1073
- "aria-label": se == null ? void 0 : se.toString(),
1074
- title: C,
1075
- ...F
1076
- }, /* @__PURE__ */ s.createElement(vn, {
1077
- enableMeasure: D && !U,
1078
- text: c,
1079
- rows: X,
1080
- width: Be,
1081
- onEllipsis: vt,
1082
- expanded: A,
1083
- measureDeps: [Y],
1084
- miscDeps: [Ie, A, Oe, P, K, Y, E].concat(ie(je.map((a) => e[a])))
1085
- }, (a, v) => Cn(e, /* @__PURE__ */ s.createElement(s.Fragment, null, Y === "start" ? Ae(v) : null, a.length > 0 && v && !A && se ? /* @__PURE__ */ s.createElement("span", {
1086
- key: "show-content",
1087
- "aria-hidden": !0
1088
- }, a) : a, wt(v), Y === "start" ? null : Ae(v)))))));
1089
- }), $n = /* @__PURE__ */ s.forwardRef((e, t) => {
1090
- const {
1091
- ellipsis: n,
1092
- rel: r,
1093
- children: o,
1094
- // @ts-expect-error: https://github.com/ant-design/ant-design/issues/26622
1095
- navigate: l,
1096
- ...p
1097
- } = e;
1098
- if (process.env.NODE_ENV !== "production") {
1099
- const d = Ce("Typography.Link");
1100
- process.env.NODE_ENV !== "production" && d(!ee(n), "usage", "`ellipsis` only supports boolean value.");
1101
- }
1102
- const f = {
1103
- ...p,
1104
- rel: r === void 0 && p.target === "_blank" ? "noopener noreferrer" : r
1105
- };
1106
- return /* @__PURE__ */ s.createElement(ae, {
1107
- ...f,
1108
- ref: t,
1109
- ellipsis: !!n,
1110
- component: "a"
1111
- }, o);
1112
- }), wn = /* @__PURE__ */ s.forwardRef((e, t) => {
1113
- const {
1114
- children: n,
1115
- ...r
1116
- } = e;
1117
- return /* @__PURE__ */ s.createElement(ae, {
1118
- ref: t,
1119
- ...r,
1120
- component: "div"
1121
- }, n);
1122
- }), Tn = /* @__PURE__ */ s.forwardRef((e, t) => {
1123
- const {
1124
- ellipsis: n,
1125
- children: r,
1126
- ...o
1127
- } = e, l = s.useMemo(() => ee(n) ? Qe(n, ["expandable", "rows"]) : n, [n]);
1128
- if (process.env.NODE_ENV !== "production") {
1129
- const p = Ce("Typography.Text");
1130
- process.env.NODE_ENV !== "production" && p(!ee(n) || !("expandable" in n) && !("rows" in n), "usage", "`ellipsis` do not support `expandable` or `rows` props.");
1131
- }
1132
- return /* @__PURE__ */ s.createElement(ae, {
1133
- ref: t,
1134
- ...o,
1135
- ellipsis: l,
1136
- component: "span"
1137
- }, r);
1138
- }), qe = [1, 2, 3, 4, 5], Rn = /* @__PURE__ */ s.forwardRef((e, t) => {
1139
- const {
1140
- level: n = 1,
1141
- children: r,
1142
- ...o
1143
- } = e;
1144
- if (process.env.NODE_ENV !== "production") {
1145
- const p = Ce("Typography.Title");
1146
- process.env.NODE_ENV !== "production" && p(qe.includes(n), "usage", "Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version.");
1147
- }
1148
- const l = qe.includes(n) ? `h${n}` : "h1";
1149
- return /* @__PURE__ */ s.createElement(ae, {
1150
- ref: t,
1151
- ...o,
1152
- component: l
1153
- }, r);
1154
- }), le = ot;
1155
- le.Text = Tn;
1156
- le.Link = $n;
1157
- le.Title = Rn;
1158
- le.Paragraph = wn;
1159
- export {
1160
- et as R,
1161
- le as T
1162
- };