@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,604 +0,0 @@
1
- import * as a from "react";
2
- import { ah as Y, ai as Z, aj as L, ak as ee, al as ce, am as N, an as ie, ao as de, ap as ue, aq as oe, ar as pe, as as ge, at as me, au as fe, av as Ce, aw as be, ax as ye, ay as he, az as $e, aA as ve, aB as ne, aC as te, aD as Se, aE as Ie, aF as J, aG as xe } from "./embed-Bs3Hmsyy.js";
3
- import { _ as Ee } from "./Pagination-Ds8VKQIT.js";
4
- import { g as Oe, i as Ne, a as we } from "./index-g9uC_rON.js";
5
- const D = (e, n, r, o, t) => ({
6
- background: e,
7
- border: `${L(o.lineWidth)} ${o.lineType} ${n}`,
8
- [`${t}-icon`]: {
9
- color: r
10
- }
11
- }), Te = (e) => {
12
- const {
13
- componentCls: n,
14
- motionDurationSlow: r,
15
- marginXS: o,
16
- marginSM: t,
17
- fontSize: s,
18
- fontSizeLG: l,
19
- lineHeight: u,
20
- borderRadiusLG: i,
21
- motionEaseInOutCirc: d,
22
- withDescriptionIconSize: b,
23
- colorText: f,
24
- colorTextHeading: p,
25
- withDescriptionPadding: h,
26
- defaultPadding: c
27
- } = e;
28
- return {
29
- [n]: Object.assign(Object.assign({}, Z(e)), {
30
- position: "relative",
31
- display: "flex",
32
- alignItems: "center",
33
- padding: c,
34
- wordWrap: "break-word",
35
- borderRadius: i,
36
- [`&${n}-rtl`]: {
37
- direction: "rtl"
38
- },
39
- [`${n}-content`]: {
40
- flex: 1,
41
- minWidth: 0
42
- },
43
- [`${n}-icon`]: {
44
- marginInlineEnd: o,
45
- lineHeight: 0
46
- },
47
- "&-description": {
48
- display: "none",
49
- fontSize: s,
50
- lineHeight: u
51
- },
52
- "&-message": {
53
- color: p
54
- },
55
- [`&${n}-motion-leave`]: {
56
- overflow: "hidden",
57
- opacity: 1,
58
- transition: `max-height ${r} ${d}, opacity ${r} ${d},
59
- padding-top ${r} ${d}, padding-bottom ${r} ${d},
60
- margin-bottom ${r} ${d}`
61
- },
62
- [`&${n}-motion-leave-active`]: {
63
- maxHeight: 0,
64
- marginBottom: "0 !important",
65
- paddingTop: 0,
66
- paddingBottom: 0,
67
- opacity: 0
68
- }
69
- }),
70
- [`${n}-with-description`]: {
71
- alignItems: "flex-start",
72
- padding: h,
73
- [`${n}-icon`]: {
74
- marginInlineEnd: t,
75
- fontSize: b,
76
- lineHeight: 0
77
- },
78
- [`${n}-message`]: {
79
- display: "block",
80
- marginBottom: o,
81
- color: p,
82
- fontSize: l
83
- },
84
- [`${n}-description`]: {
85
- display: "block",
86
- color: f
87
- }
88
- },
89
- [`${n}-banner`]: {
90
- marginBottom: 0,
91
- border: "0 !important",
92
- borderRadius: 0
93
- }
94
- };
95
- }, je = (e) => {
96
- const {
97
- componentCls: n,
98
- colorSuccess: r,
99
- colorSuccessBorder: o,
100
- colorSuccessBg: t,
101
- colorWarning: s,
102
- colorWarningBorder: l,
103
- colorWarningBg: u,
104
- colorError: i,
105
- colorErrorBorder: d,
106
- colorErrorBg: b,
107
- colorInfo: f,
108
- colorInfoBorder: p,
109
- colorInfoBg: h
110
- } = e;
111
- return {
112
- [n]: {
113
- "&-success": D(t, o, r, e, n),
114
- "&-info": D(h, p, f, e, n),
115
- "&-warning": D(u, l, s, e, n),
116
- "&-error": Object.assign(Object.assign({}, D(b, d, i, e, n)), {
117
- [`${n}-description > pre`]: {
118
- margin: 0,
119
- padding: 0
120
- }
121
- })
122
- }
123
- };
124
- }, Pe = (e) => {
125
- const {
126
- componentCls: n,
127
- iconCls: r,
128
- motionDurationMid: o,
129
- marginXS: t,
130
- fontSizeIcon: s,
131
- colorIcon: l,
132
- colorIconHover: u
133
- } = e;
134
- return {
135
- [n]: {
136
- "&-action": {
137
- marginInlineStart: t
138
- },
139
- [`${n}-close-icon`]: {
140
- marginInlineStart: t,
141
- padding: 0,
142
- overflow: "hidden",
143
- fontSize: s,
144
- lineHeight: L(s),
145
- backgroundColor: "transparent",
146
- border: "none",
147
- outline: "none",
148
- cursor: "pointer",
149
- [`${r}-close`]: {
150
- color: l,
151
- transition: `color ${o}`,
152
- "&:hover": {
153
- color: u
154
- }
155
- }
156
- },
157
- "&-close-text": {
158
- color: l,
159
- transition: `color ${o}`,
160
- "&:hover": {
161
- color: u
162
- }
163
- }
164
- }
165
- };
166
- }, Be = (e) => ({
167
- withDescriptionIconSize: e.fontSizeHeading3,
168
- defaultPadding: `${e.paddingContentVerticalSM}px 12px`,
169
- withDescriptionPadding: `${e.paddingMD}px ${e.paddingContentHorizontalLG}px`
170
- }), ze = Y("Alert", (e) => [Te(e), je(e), Pe(e)], Be);
171
- var K = function(e, n) {
172
- var r = {};
173
- for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (r[o] = e[o]);
174
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var t = 0, o = Object.getOwnPropertySymbols(e); t < o.length; t++)
175
- n.indexOf(o[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[t]) && (r[o[t]] = e[o[t]]);
176
- return r;
177
- };
178
- const _e = {
179
- success: fe,
180
- info: me,
181
- error: ge,
182
- warning: pe
183
- }, He = (e) => {
184
- const {
185
- icon: n,
186
- prefixCls: r,
187
- type: o
188
- } = e, t = _e[o] || null;
189
- return n ? oe(n, /* @__PURE__ */ a.createElement("span", {
190
- className: `${r}-icon`
191
- }, n), () => ({
192
- className: N(`${r}-icon`, n.props.className)
193
- })) : /* @__PURE__ */ a.createElement(t, {
194
- className: `${r}-icon`
195
- });
196
- }, Me = (e) => {
197
- const {
198
- isClosable: n,
199
- prefixCls: r,
200
- closeIcon: o,
201
- handleClose: t,
202
- ariaProps: s
203
- } = e, l = o === !0 || o === void 0 ? /* @__PURE__ */ a.createElement(Ce, null) : o;
204
- return n ? /* @__PURE__ */ a.createElement("button", Object.assign({
205
- type: "button",
206
- onClick: t,
207
- className: `${r}-close-icon`,
208
- tabIndex: 0
209
- }, s), l) : null;
210
- }, q = /* @__PURE__ */ a.forwardRef((e, n) => {
211
- const {
212
- description: r,
213
- prefixCls: o,
214
- message: t,
215
- banner: s,
216
- className: l,
217
- rootClassName: u,
218
- style: i,
219
- onMouseEnter: d,
220
- onMouseLeave: b,
221
- onClick: f,
222
- afterClose: p,
223
- showIcon: h,
224
- closable: c,
225
- closeText: g,
226
- closeIcon: y,
227
- action: x,
228
- id: w
229
- } = e, E = K(e, ["description", "prefixCls", "message", "banner", "className", "rootClassName", "style", "onMouseEnter", "onMouseLeave", "onClick", "afterClose", "showIcon", "closable", "closeText", "closeIcon", "action", "id"]), [T, j] = a.useState(!1);
230
- process.env.NODE_ENV !== "production" && ee("Alert").deprecated(!g, "closeText", "closable.closeIcon");
231
- const B = a.useRef(null);
232
- a.useImperativeHandle(n, () => ({
233
- nativeElement: B.current
234
- }));
235
- const {
236
- getPrefixCls: C,
237
- direction: V,
238
- closable: $,
239
- closeIcon: z,
240
- className: W,
241
- style: _
242
- } = ce("alert"), m = C("alert", o), [k, H, F] = ze(m), M = (I) => {
243
- var O;
244
- j(!0), (O = e.onClose) === null || O === void 0 || O.call(e, I);
245
- }, v = a.useMemo(() => e.type !== void 0 ? e.type : s ? "warning" : "info", [e.type, s]), X = a.useMemo(() => typeof c == "object" && c.closeIcon || g ? !0 : typeof c == "boolean" ? c : y !== !1 && y !== null && y !== void 0 ? !0 : !!$, [g, y, c, $]), S = s && h === void 0 ? !0 : h, R = N(m, `${m}-${v}`, {
246
- [`${m}-with-description`]: !!r,
247
- [`${m}-no-icon`]: !S,
248
- [`${m}-banner`]: !!s,
249
- [`${m}-rtl`]: V === "rtl"
250
- }, W, l, u, F, H), P = ie(E, {
251
- aria: !0,
252
- data: !0
253
- }), se = a.useMemo(() => typeof c == "object" && c.closeIcon ? c.closeIcon : g || (y !== void 0 ? y : typeof $ == "object" && $.closeIcon ? $.closeIcon : z), [y, c, $, g, z]), le = a.useMemo(() => {
254
- const I = c ?? $;
255
- if (typeof I == "object") {
256
- const {
257
- closeIcon: O
258
- } = I;
259
- return K(I, ["closeIcon"]);
260
- }
261
- return {};
262
- }, [c, $]);
263
- return k(/* @__PURE__ */ a.createElement(de, {
264
- visible: !T,
265
- motionName: `${m}-motion`,
266
- motionAppear: !1,
267
- motionEnter: !1,
268
- onLeaveStart: (I) => ({
269
- maxHeight: I.offsetHeight
270
- }),
271
- onLeaveEnd: p
272
- }, ({
273
- className: I,
274
- style: O
275
- }, Q) => /* @__PURE__ */ a.createElement("div", Object.assign({
276
- id: w,
277
- ref: ue(B, Q),
278
- "data-show": !T,
279
- className: N(R, I),
280
- style: Object.assign(Object.assign(Object.assign({}, _), i), O),
281
- onMouseEnter: d,
282
- onMouseLeave: b,
283
- onClick: f,
284
- role: "alert"
285
- }, P), S ? /* @__PURE__ */ a.createElement(He, {
286
- description: r,
287
- icon: e.icon,
288
- prefixCls: m,
289
- type: v
290
- }) : null, /* @__PURE__ */ a.createElement("div", {
291
- className: `${m}-content`
292
- }, t ? /* @__PURE__ */ a.createElement("div", {
293
- className: `${m}-message`
294
- }, t) : null, r ? /* @__PURE__ */ a.createElement("div", {
295
- className: `${m}-description`
296
- }, r) : null), x ? /* @__PURE__ */ a.createElement("div", {
297
- className: `${m}-action`
298
- }, x) : null, /* @__PURE__ */ a.createElement(Me, {
299
- isClosable: X,
300
- prefixCls: m,
301
- closeIcon: se,
302
- handleClose: M,
303
- ariaProps: le
304
- }))));
305
- });
306
- process.env.NODE_ENV !== "production" && (q.displayName = "Alert");
307
- let Re = /* @__PURE__ */ (function(e) {
308
- function n() {
309
- var r;
310
- return he(this, n), r = Ee(this, n, arguments), r.state = {
311
- error: void 0,
312
- info: {
313
- componentStack: ""
314
- }
315
- }, r;
316
- }
317
- return be(n, e), ye(n, [{
318
- key: "componentDidCatch",
319
- value: function(o, t) {
320
- this.setState({
321
- error: o,
322
- info: t
323
- });
324
- }
325
- }, {
326
- key: "render",
327
- value: function() {
328
- const {
329
- message: o,
330
- description: t,
331
- id: s,
332
- children: l
333
- } = this.props, {
334
- error: u,
335
- info: i
336
- } = this.state, d = (i == null ? void 0 : i.componentStack) || null, b = typeof o > "u" ? (u || "").toString() : o, f = typeof t > "u" ? d : t;
337
- return u ? /* @__PURE__ */ a.createElement(q, {
338
- id: s,
339
- type: "error",
340
- message: b,
341
- description: /* @__PURE__ */ a.createElement("pre", {
342
- style: {
343
- fontSize: "0.9em",
344
- overflowX: "auto"
345
- }
346
- }, f)
347
- }) : l;
348
- }
349
- }]);
350
- })(a.Component);
351
- const De = q;
352
- De.ErrorBoundary = Re;
353
- const Ae = (e) => {
354
- const {
355
- paddingXXS: n,
356
- lineWidth: r,
357
- tagPaddingHorizontal: o,
358
- componentCls: t,
359
- calc: s
360
- } = e, l = s(o).sub(r).equal(), u = s(n).sub(r).equal();
361
- return {
362
- // Result
363
- [t]: Object.assign(Object.assign({}, Z(e)), {
364
- display: "inline-block",
365
- height: "auto",
366
- // https://github.com/ant-design/ant-design/pull/47504
367
- marginInlineEnd: e.marginXS,
368
- paddingInline: l,
369
- fontSize: e.tagFontSize,
370
- lineHeight: e.tagLineHeight,
371
- whiteSpace: "nowrap",
372
- background: e.defaultBg,
373
- border: `${L(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,
374
- borderRadius: e.borderRadiusSM,
375
- opacity: 1,
376
- transition: `all ${e.motionDurationMid}`,
377
- textAlign: "start",
378
- position: "relative",
379
- // RTL
380
- [`&${t}-rtl`]: {
381
- direction: "rtl"
382
- },
383
- "&, a, a:hover": {
384
- color: e.defaultColor
385
- },
386
- [`${t}-close-icon`]: {
387
- marginInlineStart: u,
388
- fontSize: e.tagIconSize,
389
- color: e.colorIcon,
390
- cursor: "pointer",
391
- transition: `all ${e.motionDurationMid}`,
392
- "&:hover": {
393
- color: e.colorTextHeading
394
- }
395
- },
396
- [`&${t}-has-color`]: {
397
- borderColor: "transparent",
398
- [`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]: {
399
- color: e.colorTextLightSolid
400
- }
401
- },
402
- "&-checkable": {
403
- backgroundColor: "transparent",
404
- borderColor: "transparent",
405
- cursor: "pointer",
406
- [`&:not(${t}-checkable-checked):hover`]: {
407
- color: e.colorPrimary,
408
- backgroundColor: e.colorFillSecondary
409
- },
410
- "&:active, &-checked": {
411
- color: e.colorTextLightSolid
412
- },
413
- "&-checked": {
414
- backgroundColor: e.colorPrimary,
415
- "&:hover": {
416
- backgroundColor: e.colorPrimaryHover
417
- }
418
- },
419
- "&:active": {
420
- backgroundColor: e.colorPrimaryActive
421
- }
422
- },
423
- "&-hidden": {
424
- display: "none"
425
- },
426
- // To ensure that a space will be placed between character and `Icon`.
427
- [`> ${e.iconCls} + span, > span + ${e.iconCls}`]: {
428
- marginInlineStart: l
429
- }
430
- }),
431
- [`${t}-borderless`]: {
432
- borderColor: "transparent",
433
- background: e.tagBorderlessBg
434
- }
435
- };
436
- }, G = (e) => {
437
- const {
438
- lineWidth: n,
439
- fontSizeIcon: r,
440
- calc: o
441
- } = e, t = e.fontSizeSM;
442
- return ve(e, {
443
- tagFontSize: t,
444
- tagLineHeight: L(o(e.lineHeightSM).mul(t).equal()),
445
- tagIconSize: o(r).sub(o(n).mul(2)).equal(),
446
- // Tag icon is much smaller
447
- tagPaddingHorizontal: 8,
448
- // Fixed padding.
449
- tagBorderlessBg: e.defaultBg
450
- });
451
- }, U = (e) => ({
452
- defaultBg: new $e(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),
453
- defaultColor: e.colorText
454
- }), re = Y("Tag", (e) => {
455
- const n = G(e);
456
- return Ae(n);
457
- }, U);
458
- var Le = function(e, n) {
459
- var r = {};
460
- for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (r[o] = e[o]);
461
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var t = 0, o = Object.getOwnPropertySymbols(e); t < o.length; t++)
462
- n.indexOf(o[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[t]) && (r[o[t]] = e[o[t]]);
463
- return r;
464
- };
465
- const Ve = /* @__PURE__ */ a.forwardRef((e, n) => {
466
- const {
467
- prefixCls: r,
468
- style: o,
469
- className: t,
470
- checked: s,
471
- children: l,
472
- icon: u,
473
- onChange: i,
474
- onClick: d
475
- } = e, b = Le(e, ["prefixCls", "style", "className", "checked", "children", "icon", "onChange", "onClick"]), {
476
- getPrefixCls: f,
477
- tag: p
478
- } = a.useContext(ne), h = (E) => {
479
- i == null || i(!s), d == null || d(E);
480
- }, c = f("tag", r), [g, y, x] = re(c), w = N(c, `${c}-checkable`, {
481
- [`${c}-checkable-checked`]: s
482
- }, p == null ? void 0 : p.className, t, y, x);
483
- return g(/* @__PURE__ */ a.createElement("span", Object.assign({}, b, {
484
- ref: n,
485
- style: Object.assign(Object.assign({}, o), p == null ? void 0 : p.style),
486
- className: w,
487
- onClick: h
488
- }), u, /* @__PURE__ */ a.createElement("span", null, l)));
489
- }), We = (e) => Oe(e, (n, {
490
- textColor: r,
491
- lightBorderColor: o,
492
- lightColor: t,
493
- darkColor: s
494
- }) => ({
495
- [`${e.componentCls}${e.componentCls}-${n}`]: {
496
- color: r,
497
- background: t,
498
- borderColor: o,
499
- // Inverse color
500
- "&-inverse": {
501
- color: e.colorTextLightSolid,
502
- background: s,
503
- borderColor: s
504
- },
505
- [`&${e.componentCls}-borderless`]: {
506
- borderColor: "transparent"
507
- }
508
- }
509
- })), ke = te(["Tag", "preset"], (e) => {
510
- const n = G(e);
511
- return We(n);
512
- }, U);
513
- function Fe(e) {
514
- return typeof e != "string" ? e : e.charAt(0).toUpperCase() + e.slice(1);
515
- }
516
- const A = (e, n, r) => {
517
- const o = Fe(r);
518
- return {
519
- [`${e.componentCls}${e.componentCls}-${n}`]: {
520
- color: e[`color${r}`],
521
- background: e[`color${o}Bg`],
522
- borderColor: e[`color${o}Border`],
523
- [`&${e.componentCls}-borderless`]: {
524
- borderColor: "transparent"
525
- }
526
- }
527
- };
528
- }, Xe = te(["Tag", "status"], (e) => {
529
- const n = G(e);
530
- return [A(n, "success", "Success"), A(n, "processing", "Info"), A(n, "error", "Error"), A(n, "warning", "Warning")];
531
- }, U);
532
- var qe = function(e, n) {
533
- var r = {};
534
- for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (r[o] = e[o]);
535
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var t = 0, o = Object.getOwnPropertySymbols(e); t < o.length; t++)
536
- n.indexOf(o[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[t]) && (r[o[t]] = e[o[t]]);
537
- return r;
538
- };
539
- const Ge = /* @__PURE__ */ a.forwardRef((e, n) => {
540
- const {
541
- prefixCls: r,
542
- className: o,
543
- rootClassName: t,
544
- style: s,
545
- children: l,
546
- icon: u,
547
- color: i,
548
- onClose: d,
549
- bordered: b = !0,
550
- visible: f
551
- } = e, p = qe(e, ["prefixCls", "className", "rootClassName", "style", "children", "icon", "color", "onClose", "bordered", "visible"]), {
552
- getPrefixCls: h,
553
- direction: c,
554
- tag: g
555
- } = a.useContext(ne), [y, x] = a.useState(!0), w = Se(p, ["closeIcon", "closable"]);
556
- process.env.NODE_ENV !== "production" && ee("Tag").deprecated(!("visible" in e), "visible", "visible && <Tag />"), a.useEffect(() => {
557
- f !== void 0 && x(f);
558
- }, [f]);
559
- const E = Ne(i), T = we(i), j = E || T, B = Object.assign(Object.assign({
560
- backgroundColor: i && !j ? i : void 0
561
- }, g == null ? void 0 : g.style), s), C = h("tag", r), [V, $, z] = re(C), W = N(C, g == null ? void 0 : g.className, {
562
- [`${C}-${i}`]: j,
563
- [`${C}-has-color`]: i && !j,
564
- [`${C}-hidden`]: !y,
565
- [`${C}-rtl`]: c === "rtl",
566
- [`${C}-borderless`]: !b
567
- }, o, t, $, z), _ = (v) => {
568
- v.stopPropagation(), d == null || d(v), !v.defaultPrevented && x(!1);
569
- }, [, m] = Ie(J(e), J(g), {
570
- closable: !1,
571
- closeIconRender: (v) => {
572
- const X = /* @__PURE__ */ a.createElement("span", {
573
- className: `${C}-close-icon`,
574
- onClick: _
575
- }, v);
576
- return oe(v, X, (S) => ({
577
- onClick: (R) => {
578
- var P;
579
- (P = S == null ? void 0 : S.onClick) === null || P === void 0 || P.call(S, R), _(R);
580
- },
581
- className: N(S == null ? void 0 : S.className, `${C}-close-icon`)
582
- }));
583
- }
584
- }), k = typeof p.onClick == "function" || l && l.type === "a", H = u || null, F = H ? /* @__PURE__ */ a.createElement(a.Fragment, null, H, l && /* @__PURE__ */ a.createElement("span", null, l)) : l, M = /* @__PURE__ */ a.createElement("span", Object.assign({}, w, {
585
- ref: n,
586
- className: W,
587
- style: B
588
- }), F, m, E && /* @__PURE__ */ a.createElement(ke, {
589
- key: "preset",
590
- prefixCls: C
591
- }), T && /* @__PURE__ */ a.createElement(Xe, {
592
- key: "status",
593
- prefixCls: C
594
- }));
595
- return V(k ? /* @__PURE__ */ a.createElement(xe, {
596
- component: "Tag"
597
- }, M) : M);
598
- }), ae = Ge;
599
- process.env.NODE_ENV !== "production" && (ae.displayName = "Tag");
600
- ae.CheckableTag = Ve;
601
- export {
602
- De as A,
603
- ae as T
604
- };