@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.
- package/dist-lib/ApartmentOutlined-M6qSurnE.js +12 -0
- package/dist-lib/ArrowLeftOutlined-DowsrSUj.js +12 -0
- package/dist-lib/{ConceptsPage-DOf_CJlz.js → ConceptsPage-BOeKdDKI.js} +16 -13
- package/dist-lib/{DocsPage-CiC7TU96.js → DocsPage-BZOBFp3c.js} +4 -4
- package/dist-lib/EvidenceFormList-DXqqSpPV.js +91 -0
- package/dist-lib/{EyeOutlined-CH-5UdnC.js → EyeOutlined-DGSrX-0M.js} +1 -1
- package/dist-lib/ImpactPage-DyhUR6fT.js +71 -0
- package/dist-lib/{LeftOutlined-DQTflZ6D.js → LeftOutlined-Cgo6Izj-.js} +1 -1
- package/dist-lib/{OntologyDetailPage-mgK_NQxP.js → OntologyDetailPage-B8DyU8WW.js} +93 -99
- package/dist-lib/{OntologyInferPage-NUaoaQpN.js → OntologyInferPage-CvcjxpBB.js} +40 -38
- package/dist-lib/{OntologyListPage-C9wH01y0.js → OntologyListPage-Cb0XfpWE.js} +49 -47
- package/dist-lib/OntologyMaterializePage-B0f9TnJa.js +136 -0
- package/dist-lib/OntologyNodesPage-D4MWlm6q.js +1268 -0
- package/dist-lib/{OntologyValidatePage-DtkYK_l4.js → OntologyValidatePage-abQVJwzV.js} +52 -49
- package/dist-lib/{Pagination-Ds8VKQIT.js → Pagination-Dxslodkq.js} +258 -260
- package/dist-lib/PlusOutlined-B_dXo_97.js +12 -0
- package/dist-lib/{ReloadOutlined-B26pDoyV.js → ReloadOutlined-CS-e-TmN.js} +10 -19
- package/dist-lib/{ResolvePage-Cz9HORZ3.js → ResolvePage-rbQ-8nNZ.js} +33 -31
- package/dist-lib/{RotateRightOutlined-B575hEBK.js → RotateRightOutlined-q7zp2e47.js} +1 -1
- package/dist-lib/SearchOutlined-puH6bCY6.js +979 -0
- package/dist-lib/Skeleton-DXcERb5r.js +557 -0
- package/dist-lib/{Table-D8pPXolZ.js → Table-CDagah-g.js} +452 -450
- package/dist-lib/TagsOutlined-B4_qkn6-.js +20 -0
- package/dist-lib/TermDetailPage-CP0D6OvA.js +242 -0
- package/dist-lib/{TermsPage-BuzCMYov.js → TermsPage-CuufAyuL.js} +31 -28
- package/dist-lib/TextArea-DTpTS5HL.js +1897 -0
- package/dist-lib/ThunderboltOutlined-Bf54AaFE.js +20 -0
- package/dist-lib/{agents-DS0rPJGV.js → agents-CvgRLQw2.js} +46 -46
- package/dist-lib/{ai-CQ67aRC4.js → ai-DYDhijtn.js} +30 -30
- package/dist-lib/{ai-chat-share-AOB7rEOb.js → ai-chat-share-DJnybJtS.js} +14 -13
- package/dist-lib/{approval-LLVR3fMa.js → approval-3IbhY8Lp.js} +26 -25
- package/dist-lib/{approvals-D1DSA-Mw.js → approvals-Cd6CVzz4.js} +43 -42
- package/dist-lib/{assistant-DpabpWKV.js → assistant-cIXgilaE.js} +50 -49
- package/dist-lib/{assistant-history-ChvhtZwX.js → assistant-history-BQzH4ChB.js} +5 -5
- package/dist-lib/{assistant-summary-B0ksF8CX.js → assistant-summary-LKTj_HKM.js} +1 -1
- package/dist-lib/{audit-DeU1XEgQ.js → audit-CxuJ5unU.js} +1 -1
- package/dist-lib/{bios-Bk36bVhw.js → bios-BplnCOF4.js} +130 -125
- package/dist-lib/callSuper-DZEfdkXG.js +7 -0
- package/dist-lib/{changelog-xEt2qnho.js → changelog-BoGqt_81.js} +2 -2
- package/dist-lib/{changelog-CCMDMI4R.js → changelog-Cn81Dvgk.js} +1 -1
- package/dist-lib/chunk-YDNE64FV-DGyyfCo0.js +2004 -0
- package/dist-lib/colors-sdAcAcU3.js +24 -0
- package/dist-lib/context-Buz0ggsK.js +710 -0
- package/dist-lib/context-DpmyNOn3.js +21 -0
- package/dist-lib/createForOfIteratorHelper-DEx_aTey.js +51 -0
- package/dist-lib/d3-force-CZK-Rgd6.js +598 -0
- package/dist-lib/{dayjs.min-DoEf5yCX.js → dayjs.min-BauDENhn.js} +1 -1
- package/dist-lib/{detail-Xtof0GoK.js → detail-BaX7WiWV.js} +51 -50
- package/dist-lib/{detail-BW6dD_YP.js → detail-Cx5c4KJH.js} +89 -88
- package/dist-lib/{docx-preview-D4v2g8Yg.js → docx-preview-B5nQuTwk.js} +1 -1
- package/dist-lib/{downloads-Dj4DgBSS.js → downloads-C3Oz04OW.js} +4 -3
- package/dist-lib/{edit-nZ7siGuW.js → edit-Cbn2eJaJ.js} +265 -259
- package/dist-lib/{editor-BuhZwEsv.js → editor-mtaJBQXz.js} +21 -20
- package/dist-lib/embed-CR8XVkMy.js +31148 -0
- package/dist-lib/{evaluation-B-igEqQ9.js → evaluation-BoHiY8yT.js} +15 -14
- package/dist-lib/{focus-set-DfRWcq91.js → focus-set-h0YtOUB2.js} +34 -33
- package/dist-lib/{format-CWI99NCN.js → format-UGmYKemG.js} +1 -1
- package/dist-lib/index-9aQ4BzIK.js +500 -0
- package/dist-lib/{index-BJ2Gpcbi.js → index-B22_2Dzh.js} +2 -2
- package/dist-lib/index-B57Fj7Y0.js +1169 -0
- package/dist-lib/{index-D_-8dmug.js → index-BEjXaDfk.js} +23 -22
- package/dist-lib/{index-rtSfQuYs.js → index-BSlCGnzo.js} +12 -12
- package/dist-lib/index-Bc-Vin3j.js +256 -0
- package/dist-lib/{index-SAPKyv8e.js → index-Bm1sK-VN.js} +10 -10
- package/dist-lib/{index-g9uC_rON.js → index-BwVZgt5s.js} +129 -146
- package/dist-lib/{index-CZipVp1G.js → index-C3AMwzIi.js} +1 -1
- package/dist-lib/{index-B5jr3A7f.js → index-CHBNrCMy.js} +19 -19
- package/dist-lib/{index-BFRg0cn3.js → index-CLTfICbf.js} +6 -6
- package/dist-lib/{index-CnLkqTRm.js → index-CaXylbQR.js} +175 -173
- package/dist-lib/index-Cfu1W1H6.js +535 -0
- package/dist-lib/{index-DzrH4RQ7.js → index-Cj4DDWyj.js} +11 -10
- package/dist-lib/index-CrMcNEAZ.js +9656 -0
- package/dist-lib/index-Cy9i4Kx7.js +699 -0
- package/dist-lib/index-CyKWCYMK.js +218 -0
- package/dist-lib/{index-CjwzwBTy.js → index-D3GHtSlM.js} +94 -93
- package/dist-lib/{index-B8l4PAGJ.js → index-DBlG9uXV.js} +112 -108
- package/dist-lib/index-DBtGE89a.js +168 -0
- package/dist-lib/{index-CS5YTpdI.js → index-DMTPsTna.js} +4 -3
- package/dist-lib/index-DjFPRXl5.js +1484 -0
- package/dist-lib/{index-Bu6udiyN.js → index-DsuUGhTA.js} +123 -121
- package/dist-lib/index-DvWHYX81.js +450 -0
- package/dist-lib/{index-D5V4bZ4e.js → index-PBT9GksC.js} +8 -8
- package/dist-lib/index-Vu6sPBci.js +1884 -0
- package/dist-lib/index-bOY1cBol.js +4890 -0
- package/dist-lib/index-nQSVLWfW.js +356 -0
- package/dist-lib/{index-pcUZcUIA.js → index-o65vKUwa.js} +48 -47
- package/dist-lib/{index-K7z38Ybg.js → index-ounfql2z.js} +33 -31
- package/dist-lib/{index-B1rpIXU7.js → index-y7jVGGI0.js} +23 -21
- package/dist-lib/index.js +3 -1
- package/dist-lib/{jszip.min-dcaDnWUw.js → jszip.min-DcEHhn-b.js} +1 -1
- package/dist-lib/{kb-form-modal-9L0AUHVG.js → kb-form-modal-B0rM1ZvV.js} +71 -71
- package/dist-lib/{kbTeam-BECePvJe.js → kbTeam-Bh_FQH28.js} +3 -3
- package/dist-lib/{knowledge-base-C8gHP0dj.js → knowledge-base-Cl1Ka1e6.js} +104 -103
- package/dist-lib/{knowledge-hub-C9KkDv1A.js → knowledge-hub-CPuzdRiq.js} +52 -51
- package/dist-lib/{markdown-lite-BABX4bcl.js → markdown-lite-Cu62Fl7J.js} +181 -177
- package/dist-lib/{material-preview-docx-lp_xPipj.js → material-preview-docx-CH-09KeC.js} +1 -1
- package/dist-lib/{material-preview-pdf-CKAovvpc.js → material-preview-pdf-CTSo215V.js} +7 -7
- package/dist-lib/{material-preview-pptx-6Byitp0J.js → material-preview-pptx-D8XGDF-u.js} +1 -1
- package/dist-lib/{member-B5WF3FCj.js → member-DKDx77PD.js} +1 -1
- package/dist-lib/{message-kHyjuooj.js → message-BrooQ3Q7.js} +25 -24
- package/dist-lib/{message-D2MSaOMq.js → message-Dievi8Jw.js} +1 -1
- package/dist-lib/{messages-D_VDuKK7.js → messages-xTNmTS9g.js} +16 -15
- package/dist-lib/{meta-CEf_DYcU.js → meta-BD_qYTZu.js} +1 -1
- package/dist-lib/{metrics-hONGW0KG.js → metrics-DiHYqBKB.js} +2 -2
- package/dist-lib/{monitor-DF3WVsVV.js → monitor-BBCu3zRe.js} +8 -8
- package/dist-lib/{monitor-DFmEu6rH.js → monitor-BXsdMJSV.js} +4 -4
- package/dist-lib/{my-access-j53lA6T6.js → my-access-CEGErUgv.js} +4 -4
- package/dist-lib/{my-permissions-C5L8ZN2d.js → my-permissions-wSr5zv7g.js} +23 -22
- package/dist-lib/{new-DfZ61nMQ.js → new-BevAuTe5.js} +14 -12
- package/dist-lib/{ontology-CUH5qslO.js → ontology-DXGSJC-y.js} +145 -142
- package/dist-lib/{ontology-domains-CRC1ZRit.js → ontology-domains-jTG7CZm8.js} +88 -84
- package/dist-lib/ontology-modeling-CjRsa-DR.js +1039 -0
- package/dist-lib/{ontology-modeling-DaSk5fsh.js → ontology-modeling-DOj68TuI.js} +2125 -2117
- package/dist-lib/ontology-scenarios-CcAagMiP.js +660 -0
- package/dist-lib/{ontology-scenarios-DAbyoKV6.js → ontology-scenarios-J5kw6xgi.js} +703 -712
- package/dist-lib/pages-CsexFuEz.js +73 -0
- package/dist-lib/pages.js +3 -3
- package/dist-lib/{permission-CklDU2kO.js → permission-BUXo69Ne.js} +31 -31
- package/dist-lib/{pptx-preview.es-D4ODiBv2.js → pptx-preview.es-AUrdYKu3.js} +2 -2
- package/dist-lib/{preset-Bp_mvsJm.js → preset-gh5SGoYT.js} +9810 -10199
- package/dist-lib/{quota-DLe9so2b.js → quota-D31cXjul.js} +4 -4
- package/dist-lib/{row-CE051ClO.js → row-B5MnGm9M.js} +63 -61
- package/dist-lib/{save-blob-qKrc8-z6.js → save-blob-CiWNK-cX.js} +2 -2
- package/dist-lib/{scenario-mapping-preview-CSDqIN3R.js → scenario-mapping-preview-DQ_OBV4Z.js} +48 -46
- package/dist-lib/{scenario-simple-form-CAkhVgeV.js → scenario-simple-form-DESMvU7A.js} +425 -423
- package/dist-lib/{schedule-B_ujtL3h.js → schedule-BktxwX3S.js} +8 -8
- package/dist-lib/{settings-BIkKTQjc.js → settings-dsB3H65I.js} +147 -146
- package/dist-lib/{shared-Dfz1X4Mq.js → shared-CTCzvhyE.js} +1 -1
- package/dist-lib/{shared-utils-BeRiAkbe.js → shared-utils-BstybhBG.js} +2 -2
- package/dist-lib/{skills-BzpcX5fN.js → skills-CHPlMsgO.js} +40 -39
- package/dist-lib/{source-selection-DOL5LBrV.js → source-selection-tXqc855k.js} +16 -16
- package/dist-lib/{task-config-D0a7TOYt.js → task-config-BiTOiZj0.js} +4 -4
- package/dist-lib/{tech-CH01ekZ5.js → tech-BKlGPkV0.js} +4 -3
- package/dist-lib/{tools-YnTN61uE.js → tools-CouQ4FWk.js} +14 -14
- package/dist-lib/{use-domain-access-CXx1YzE5.js → use-domain-access-BPlNfoiP.js} +13 -13
- package/dist-lib/use-g6-graph-WLX0PweO.js +1119 -0
- package/dist-lib/{use-graph-layers-CowyyYcb.js → use-graph-layers-ja-ZIC_R.js} +50 -48
- package/dist-lib/useClosable-BY7FgWKy.js +59 -0
- package/dist-lib/useForm-Byp1LopG.js +145 -0
- package/dist-lib/{version-control-panel-CLy2ZXI_.js → version-control-panel-CkBm36Yk.js} +27 -26
- package/dist-lib/{version-management-C_v8w1E4.js → version-management-B4kIbdVc.js} +7 -6
- package/dist-lib/{welcome-ChEcA4Ej.js → welcome-F5iZoFB1.js} +4 -3
- package/package.json +2 -3
- package/dist-lib/EvidenceFormList-CrE2FzHk.js +0 -90
- package/dist-lib/ImpactPage-CYiuqy0S.js +0 -68
- package/dist-lib/OntologyMaterializePage-D_fDqYHY.js +0 -134
- package/dist-lib/OntologyNodesPage-5kH7RHwE.js +0 -2844
- package/dist-lib/PlusOutlined-BSTPGLOH.js +0 -21
- package/dist-lib/Skeleton-CxFsInYI.js +0 -671
- package/dist-lib/Table-Civ838nE.js +0 -20514
- package/dist-lib/TermDetailPage-BtkOpbPT.js +0 -263
- package/dist-lib/_commonjsHelpers-DaMA6jEr.js +0 -8
- package/dist-lib/callSuper-CwIeyYoc.js +0 -7
- package/dist-lib/chunk-6KYCQHYJ-DcgZQlO5.js +0 -1627
- package/dist-lib/context-T27uno74.js +0 -54
- package/dist-lib/d3-force-Cr_oBTiR.js +0 -647
- package/dist-lib/embed-Bs3Hmsyy.js +0 -51377
- package/dist-lib/index-0TvzCTD7.js +0 -2336
- package/dist-lib/index-4tbtbcAt.js +0 -550
- package/dist-lib/index-B1wh6i1C.js +0 -1308
- package/dist-lib/index-BVgdmf6r.js +0 -2487
- package/dist-lib/index-CSnvcFg-.js +0 -543
- package/dist-lib/index-D35Ry0PG.js +0 -1162
- package/dist-lib/index-DC57_dnh.js +0 -604
- package/dist-lib/index-DQ16Zb7x.js +0 -546
- package/dist-lib/index-DRcTwC17.js +0 -418
- package/dist-lib/index-Dd9pPAT3.js +0 -2192
- package/dist-lib/index-DxzorPvG.js +0 -13960
- package/dist-lib/index-If4xc1-H.js +0 -559
- package/dist-lib/index-R71k3nB_.js +0 -710
- package/dist-lib/index-mUlorJxp.js +0 -3279
- package/dist-lib/ontology-modeling-CvJIImxt.js +0 -3612
- package/dist-lib/ontology-scenarios-BRDkk3uA.js +0 -675
- package/dist-lib/pages-CticGC6S.js +0 -512
- package/dist-lib/use-g6-graph-SwJtPLce.js +0 -57552
|
@@ -0,0 +1,710 @@
|
|
|
1
|
+
import * as a from "react";
|
|
2
|
+
import K, { useContext as He, useRef as Te, useState as me, useEffect as ge } from "react";
|
|
3
|
+
import { p as ze, i as Ve, j as Ke, _ as Y, k as We, g as Be, m as Ge, C as Ue, K as pe, r as Xe, c as Ee, f as Se, l as qe, b as Ye, d as Je, R as Ze } from "./index-CrMcNEAZ.js";
|
|
4
|
+
import { I as fe, _ as W, i as L, a as be, c as H, h as ue, q as ke, b as J } from "./SearchOutlined-puH6bCY6.js";
|
|
5
|
+
import { createPortal as Qe } from "react-dom";
|
|
6
|
+
var et = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, name: "check-circle", theme: "filled" }, tt = function(t, o) {
|
|
7
|
+
return /* @__PURE__ */ a.createElement(fe, W({}, t, {
|
|
8
|
+
ref: o,
|
|
9
|
+
icon: et
|
|
10
|
+
}));
|
|
11
|
+
}, Oe = /* @__PURE__ */ a.forwardRef(tt);
|
|
12
|
+
process.env.NODE_ENV !== "production" && (Oe.displayName = "CheckCircleFilled");
|
|
13
|
+
var nt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "exclamation-circle", theme: "filled" }, ot = function(t, o) {
|
|
14
|
+
return /* @__PURE__ */ a.createElement(fe, W({}, t, {
|
|
15
|
+
ref: o,
|
|
16
|
+
icon: nt
|
|
17
|
+
}));
|
|
18
|
+
}, Re = /* @__PURE__ */ a.forwardRef(ot);
|
|
19
|
+
process.env.NODE_ENV !== "production" && (Re.displayName = "ExclamationCircleFilled");
|
|
20
|
+
var at = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "info-circle", theme: "filled" }, rt = function(t, o) {
|
|
21
|
+
return /* @__PURE__ */ a.createElement(fe, W({}, t, {
|
|
22
|
+
ref: o,
|
|
23
|
+
icon: at
|
|
24
|
+
}));
|
|
25
|
+
}, Pe = /* @__PURE__ */ a.forwardRef(rt);
|
|
26
|
+
process.env.NODE_ENV !== "production" && (Pe.displayName = "InfoCircleFilled");
|
|
27
|
+
var $e = /* @__PURE__ */ a.forwardRef(function(e, t) {
|
|
28
|
+
var o = e.prefixCls, n = e.style, r = e.className, d = e.duration, x = d === void 0 ? 4.5 : d, E = e.showProgress, b = e.pauseOnHover, f = b === void 0 ? !0 : b, y = e.eventKey, C = e.content, i = e.closable, m = e.closeIcon, h = m === void 0 ? "x" : m, g = e.props, l = e.onClick, $ = e.onNoticeClose, P = e.times, k = e.hovering, S = a.useState(!1), R = L(S, 2), p = R[0], _ = R[1], u = a.useState(0), s = L(u, 2), c = s[0], v = s[1], A = a.useState(0), M = L(A, 2), I = M[0], G = M[1], O = k || p, F = x > 0 && E, T = function() {
|
|
29
|
+
$(y);
|
|
30
|
+
}, U = function(N) {
|
|
31
|
+
(N.key === "Enter" || N.code === "Enter" || N.keyCode === Ve.ENTER) && T();
|
|
32
|
+
};
|
|
33
|
+
a.useEffect(function() {
|
|
34
|
+
if (!O && x > 0) {
|
|
35
|
+
var j = Date.now() - I, N = setTimeout(function() {
|
|
36
|
+
T();
|
|
37
|
+
}, x * 1e3 - I);
|
|
38
|
+
return function() {
|
|
39
|
+
f && clearTimeout(N), G(Date.now() - j);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}, [x, O, P]), a.useEffect(function() {
|
|
43
|
+
if (!O && F && (f || I === 0)) {
|
|
44
|
+
var j = performance.now(), N, w = function ne() {
|
|
45
|
+
cancelAnimationFrame(N), N = requestAnimationFrame(function(oe) {
|
|
46
|
+
var B = oe + I - j, z = Math.min(B / (x * 1e3), 1);
|
|
47
|
+
v(z * 100), z < 1 && ne();
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
return w(), function() {
|
|
51
|
+
f && cancelAnimationFrame(N);
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}, [x, I, O, F, P]);
|
|
55
|
+
var Z = a.useMemo(function() {
|
|
56
|
+
return be(i) === "object" && i !== null ? i : i ? {
|
|
57
|
+
closeIcon: h
|
|
58
|
+
} : {};
|
|
59
|
+
}, [i, h]), te = ze(Z, !0), X = 100 - (!c || c < 0 ? 0 : c > 100 ? 100 : c), D = "".concat(o, "-notice");
|
|
60
|
+
return /* @__PURE__ */ a.createElement("div", W({}, g, {
|
|
61
|
+
ref: t,
|
|
62
|
+
className: H(D, r, ue({}, "".concat(D, "-closable"), i)),
|
|
63
|
+
style: n,
|
|
64
|
+
onMouseEnter: function(N) {
|
|
65
|
+
var w;
|
|
66
|
+
_(!0), g == null || (w = g.onMouseEnter) === null || w === void 0 || w.call(g, N);
|
|
67
|
+
},
|
|
68
|
+
onMouseLeave: function(N) {
|
|
69
|
+
var w;
|
|
70
|
+
_(!1), g == null || (w = g.onMouseLeave) === null || w === void 0 || w.call(g, N);
|
|
71
|
+
},
|
|
72
|
+
onClick: l
|
|
73
|
+
}), /* @__PURE__ */ a.createElement("div", {
|
|
74
|
+
className: "".concat(D, "-content")
|
|
75
|
+
}, C), i && /* @__PURE__ */ a.createElement("a", W({
|
|
76
|
+
tabIndex: 0,
|
|
77
|
+
className: "".concat(D, "-close"),
|
|
78
|
+
onKeyDown: U,
|
|
79
|
+
"aria-label": "Close"
|
|
80
|
+
}, te, {
|
|
81
|
+
onClick: function(N) {
|
|
82
|
+
N.preventDefault(), N.stopPropagation(), T();
|
|
83
|
+
}
|
|
84
|
+
}), Z.closeIcon), F && /* @__PURE__ */ a.createElement("progress", {
|
|
85
|
+
className: "".concat(D, "-progress"),
|
|
86
|
+
max: "100",
|
|
87
|
+
value: X
|
|
88
|
+
}, X + "%"));
|
|
89
|
+
}), we = /* @__PURE__ */ K.createContext({}), st = function(t) {
|
|
90
|
+
var o = t.children, n = t.classNames;
|
|
91
|
+
return /* @__PURE__ */ K.createElement(we.Provider, {
|
|
92
|
+
value: {
|
|
93
|
+
classNames: n
|
|
94
|
+
}
|
|
95
|
+
}, o);
|
|
96
|
+
}, ye = 8, Ce = 3, Ne = 16, it = function(t) {
|
|
97
|
+
var o = {
|
|
98
|
+
offset: ye,
|
|
99
|
+
threshold: Ce,
|
|
100
|
+
gap: Ne
|
|
101
|
+
};
|
|
102
|
+
if (t && be(t) === "object") {
|
|
103
|
+
var n, r, d;
|
|
104
|
+
o.offset = (n = t.offset) !== null && n !== void 0 ? n : ye, o.threshold = (r = t.threshold) !== null && r !== void 0 ? r : Ce, o.gap = (d = t.gap) !== null && d !== void 0 ? d : Ne;
|
|
105
|
+
}
|
|
106
|
+
return [!!t, o];
|
|
107
|
+
}, ct = ["className", "style", "classNames", "styles"], Ie = function(t) {
|
|
108
|
+
var o = t.configList, n = t.placement, r = t.prefixCls, d = t.className, x = t.style, E = t.motion, b = t.onAllNoticeRemoved, f = t.onNoticeClose, y = t.stack, C = He(we), i = C.classNames, m = Te({}), h = me(null), g = L(h, 2), l = g[0], $ = g[1], P = me([]), k = L(P, 2), S = k[0], R = k[1], p = o.map(function(O) {
|
|
109
|
+
return {
|
|
110
|
+
config: O,
|
|
111
|
+
key: String(O.key)
|
|
112
|
+
};
|
|
113
|
+
}), _ = it(y), u = L(_, 2), s = u[0], c = u[1], v = c.offset, A = c.threshold, M = c.gap, I = s && (S.length > 0 || p.length <= A), G = typeof E == "function" ? E(n) : E;
|
|
114
|
+
return ge(function() {
|
|
115
|
+
s && S.length > 1 && R(function(O) {
|
|
116
|
+
return O.filter(function(F) {
|
|
117
|
+
return p.some(function(T) {
|
|
118
|
+
var U = T.key;
|
|
119
|
+
return F === U;
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
}, [S, p, s]), ge(function() {
|
|
124
|
+
var O;
|
|
125
|
+
if (s && m.current[(O = p[p.length - 1]) === null || O === void 0 ? void 0 : O.key]) {
|
|
126
|
+
var F;
|
|
127
|
+
$(m.current[(F = p[p.length - 1]) === null || F === void 0 ? void 0 : F.key]);
|
|
128
|
+
}
|
|
129
|
+
}, [p, s]), /* @__PURE__ */ K.createElement(Ke, W({
|
|
130
|
+
key: n,
|
|
131
|
+
className: H(r, "".concat(r, "-").concat(n), i == null ? void 0 : i.list, d, ue(ue({}, "".concat(r, "-stack"), !!s), "".concat(r, "-stack-expanded"), I)),
|
|
132
|
+
style: x,
|
|
133
|
+
keys: p,
|
|
134
|
+
motionAppear: !0
|
|
135
|
+
}, G, {
|
|
136
|
+
onAllRemoved: function() {
|
|
137
|
+
b(n);
|
|
138
|
+
}
|
|
139
|
+
}), function(O, F) {
|
|
140
|
+
var T = O.config, U = O.className, Z = O.style, te = O.index, X = T, D = X.key, j = X.times, N = String(D), w = T, ne = w.className, oe = w.style, B = w.classNames, z = w.styles, Fe = ke(w, ct), ae = p.findIndex(function(ee) {
|
|
141
|
+
return ee.key === N;
|
|
142
|
+
}), Q = {};
|
|
143
|
+
if (s) {
|
|
144
|
+
var q = p.length - 1 - (ae > -1 ? ae : te - 1), de = n === "top" || n === "bottom" ? "-50%" : "0";
|
|
145
|
+
if (q > 0) {
|
|
146
|
+
var re, se, ie;
|
|
147
|
+
Q.height = I ? (re = m.current[N]) === null || re === void 0 ? void 0 : re.offsetHeight : l == null ? void 0 : l.offsetHeight;
|
|
148
|
+
for (var ve = 0, ce = 0; ce < q; ce++) {
|
|
149
|
+
var le;
|
|
150
|
+
ve += ((le = m.current[p[p.length - 1 - ce].key]) === null || le === void 0 ? void 0 : le.offsetHeight) + M;
|
|
151
|
+
}
|
|
152
|
+
var je = (I ? ve : q * v) * (n.startsWith("top") ? 1 : -1), Le = !I && l !== null && l !== void 0 && l.offsetWidth && (se = m.current[N]) !== null && se !== void 0 && se.offsetWidth ? ((l == null ? void 0 : l.offsetWidth) - v * 2 * (q < 3 ? q : 3)) / ((ie = m.current[N]) === null || ie === void 0 ? void 0 : ie.offsetWidth) : 1;
|
|
153
|
+
Q.transform = "translate3d(".concat(de, ", ").concat(je, "px, 0) scaleX(").concat(Le, ")");
|
|
154
|
+
} else
|
|
155
|
+
Q.transform = "translate3d(".concat(de, ", 0, 0)");
|
|
156
|
+
}
|
|
157
|
+
return /* @__PURE__ */ K.createElement("div", {
|
|
158
|
+
ref: F,
|
|
159
|
+
className: H("".concat(r, "-notice-wrapper"), U, B == null ? void 0 : B.wrapper),
|
|
160
|
+
style: J(J(J({}, Z), Q), z == null ? void 0 : z.wrapper),
|
|
161
|
+
onMouseEnter: function() {
|
|
162
|
+
return R(function(V) {
|
|
163
|
+
return V.includes(N) ? V : [].concat(Y(V), [N]);
|
|
164
|
+
});
|
|
165
|
+
},
|
|
166
|
+
onMouseLeave: function() {
|
|
167
|
+
return R(function(V) {
|
|
168
|
+
return V.filter(function(De) {
|
|
169
|
+
return De !== N;
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
}, /* @__PURE__ */ K.createElement($e, W({}, Fe, {
|
|
174
|
+
ref: function(V) {
|
|
175
|
+
ae > -1 ? m.current[N] = V : delete m.current[N];
|
|
176
|
+
},
|
|
177
|
+
prefixCls: r,
|
|
178
|
+
classNames: B,
|
|
179
|
+
styles: z,
|
|
180
|
+
className: H(ne, i == null ? void 0 : i.notice),
|
|
181
|
+
style: oe,
|
|
182
|
+
times: j,
|
|
183
|
+
key: D,
|
|
184
|
+
eventKey: D,
|
|
185
|
+
onNoticeClose: f,
|
|
186
|
+
hovering: s && S.length > 0
|
|
187
|
+
})));
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
process.env.NODE_ENV !== "production" && (Ie.displayName = "NoticeList");
|
|
191
|
+
var _e = /* @__PURE__ */ a.forwardRef(function(e, t) {
|
|
192
|
+
var o = e.prefixCls, n = o === void 0 ? "rc-notification" : o, r = e.container, d = e.motion, x = e.maxCount, E = e.className, b = e.style, f = e.onAllRemoved, y = e.stack, C = e.renderNotifications, i = a.useState([]), m = L(i, 2), h = m[0], g = m[1], l = function(s) {
|
|
193
|
+
var c, v = h.find(function(A) {
|
|
194
|
+
return A.key === s;
|
|
195
|
+
});
|
|
196
|
+
v == null || (c = v.onClose) === null || c === void 0 || c.call(v), g(function(A) {
|
|
197
|
+
return A.filter(function(M) {
|
|
198
|
+
return M.key !== s;
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
};
|
|
202
|
+
a.useImperativeHandle(t, function() {
|
|
203
|
+
return {
|
|
204
|
+
open: function(s) {
|
|
205
|
+
g(function(c) {
|
|
206
|
+
var v = Y(c), A = v.findIndex(function(G) {
|
|
207
|
+
return G.key === s.key;
|
|
208
|
+
}), M = J({}, s);
|
|
209
|
+
if (A >= 0) {
|
|
210
|
+
var I;
|
|
211
|
+
M.times = (((I = c[A]) === null || I === void 0 ? void 0 : I.times) || 0) + 1, v[A] = M;
|
|
212
|
+
} else
|
|
213
|
+
M.times = 0, v.push(M);
|
|
214
|
+
return x > 0 && v.length > x && (v = v.slice(-x)), v;
|
|
215
|
+
});
|
|
216
|
+
},
|
|
217
|
+
close: function(s) {
|
|
218
|
+
l(s);
|
|
219
|
+
},
|
|
220
|
+
destroy: function() {
|
|
221
|
+
g([]);
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
});
|
|
225
|
+
var $ = a.useState({}), P = L($, 2), k = P[0], S = P[1];
|
|
226
|
+
a.useEffect(function() {
|
|
227
|
+
var u = {};
|
|
228
|
+
h.forEach(function(s) {
|
|
229
|
+
var c = s.placement, v = c === void 0 ? "topRight" : c;
|
|
230
|
+
v && (u[v] = u[v] || [], u[v].push(s));
|
|
231
|
+
}), Object.keys(k).forEach(function(s) {
|
|
232
|
+
u[s] = u[s] || [];
|
|
233
|
+
}), S(u);
|
|
234
|
+
}, [h]);
|
|
235
|
+
var R = function(s) {
|
|
236
|
+
S(function(c) {
|
|
237
|
+
var v = J({}, c), A = v[s] || [];
|
|
238
|
+
return A.length || delete v[s], v;
|
|
239
|
+
});
|
|
240
|
+
}, p = a.useRef(!1);
|
|
241
|
+
if (a.useEffect(function() {
|
|
242
|
+
Object.keys(k).length > 0 ? p.current = !0 : p.current && (f == null || f(), p.current = !1);
|
|
243
|
+
}, [k]), !r)
|
|
244
|
+
return null;
|
|
245
|
+
var _ = Object.keys(k);
|
|
246
|
+
return /* @__PURE__ */ Qe(/* @__PURE__ */ a.createElement(a.Fragment, null, _.map(function(u) {
|
|
247
|
+
var s = k[u], c = /* @__PURE__ */ a.createElement(Ie, {
|
|
248
|
+
key: u,
|
|
249
|
+
configList: s,
|
|
250
|
+
placement: u,
|
|
251
|
+
prefixCls: n,
|
|
252
|
+
className: E == null ? void 0 : E(u),
|
|
253
|
+
style: b == null ? void 0 : b(u),
|
|
254
|
+
motion: d,
|
|
255
|
+
onNoticeClose: l,
|
|
256
|
+
onAllNoticeRemoved: R,
|
|
257
|
+
stack: y
|
|
258
|
+
});
|
|
259
|
+
return C ? C(c, {
|
|
260
|
+
prefixCls: n,
|
|
261
|
+
key: u
|
|
262
|
+
}) : c;
|
|
263
|
+
})), r);
|
|
264
|
+
});
|
|
265
|
+
process.env.NODE_ENV !== "production" && (_e.displayName = "Notifications");
|
|
266
|
+
var lt = ["getContainer", "motion", "prefixCls", "maxCount", "className", "style", "onAllRemoved", "stack", "renderNotifications"], ut = function() {
|
|
267
|
+
return document.body;
|
|
268
|
+
}, he = 0;
|
|
269
|
+
function ft() {
|
|
270
|
+
for (var e = {}, t = arguments.length, o = new Array(t), n = 0; n < t; n++)
|
|
271
|
+
o[n] = arguments[n];
|
|
272
|
+
return o.forEach(function(r) {
|
|
273
|
+
r && Object.keys(r).forEach(function(d) {
|
|
274
|
+
var x = r[d];
|
|
275
|
+
x !== void 0 && (e[d] = x);
|
|
276
|
+
});
|
|
277
|
+
}), e;
|
|
278
|
+
}
|
|
279
|
+
function dt() {
|
|
280
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.getContainer, o = t === void 0 ? ut : t, n = e.motion, r = e.prefixCls, d = e.maxCount, x = e.className, E = e.style, b = e.onAllRemoved, f = e.stack, y = e.renderNotifications, C = ke(e, lt), i = a.useState(), m = L(i, 2), h = m[0], g = m[1], l = a.useRef(), $ = /* @__PURE__ */ a.createElement(_e, {
|
|
281
|
+
container: h,
|
|
282
|
+
ref: l,
|
|
283
|
+
prefixCls: r,
|
|
284
|
+
motion: n,
|
|
285
|
+
maxCount: d,
|
|
286
|
+
className: x,
|
|
287
|
+
style: E,
|
|
288
|
+
onAllRemoved: b,
|
|
289
|
+
stack: f,
|
|
290
|
+
renderNotifications: y
|
|
291
|
+
}), P = a.useState([]), k = L(P, 2), S = k[0], R = k[1], p = We(function(u) {
|
|
292
|
+
var s = ft(C, u);
|
|
293
|
+
(s.key === null || s.key === void 0) && (s.key = "rc-notification-".concat(he), he += 1), R(function(c) {
|
|
294
|
+
return [].concat(Y(c), [{
|
|
295
|
+
type: "open",
|
|
296
|
+
config: s
|
|
297
|
+
}]);
|
|
298
|
+
});
|
|
299
|
+
}), _ = a.useMemo(function() {
|
|
300
|
+
return {
|
|
301
|
+
open: p,
|
|
302
|
+
close: function(s) {
|
|
303
|
+
R(function(c) {
|
|
304
|
+
return [].concat(Y(c), [{
|
|
305
|
+
type: "close",
|
|
306
|
+
key: s
|
|
307
|
+
}]);
|
|
308
|
+
});
|
|
309
|
+
},
|
|
310
|
+
destroy: function() {
|
|
311
|
+
R(function(s) {
|
|
312
|
+
return [].concat(Y(s), [{
|
|
313
|
+
type: "destroy"
|
|
314
|
+
}]);
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
}, []);
|
|
319
|
+
return a.useEffect(function() {
|
|
320
|
+
g(o());
|
|
321
|
+
}), a.useEffect(function() {
|
|
322
|
+
if (l.current && S.length) {
|
|
323
|
+
S.forEach(function(c) {
|
|
324
|
+
switch (c.type) {
|
|
325
|
+
case "open":
|
|
326
|
+
l.current.open(c.config);
|
|
327
|
+
break;
|
|
328
|
+
case "close":
|
|
329
|
+
l.current.close(c.key);
|
|
330
|
+
break;
|
|
331
|
+
case "destroy":
|
|
332
|
+
l.current.destroy();
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
var u, s;
|
|
337
|
+
R(function(c) {
|
|
338
|
+
return (u !== c || !s) && (u = c, s = c.filter(function(v) {
|
|
339
|
+
return !S.includes(v);
|
|
340
|
+
})), s;
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
}, [S]), [_, $];
|
|
344
|
+
}
|
|
345
|
+
const vt = (e) => {
|
|
346
|
+
const {
|
|
347
|
+
componentCls: t,
|
|
348
|
+
iconCls: o,
|
|
349
|
+
boxShadow: n,
|
|
350
|
+
colorText: r,
|
|
351
|
+
colorSuccess: d,
|
|
352
|
+
colorError: x,
|
|
353
|
+
colorWarning: E,
|
|
354
|
+
colorInfo: b,
|
|
355
|
+
fontSizeLG: f,
|
|
356
|
+
motionEaseInOutCirc: y,
|
|
357
|
+
motionDurationSlow: C,
|
|
358
|
+
marginXS: i,
|
|
359
|
+
paddingXS: m,
|
|
360
|
+
borderRadiusLG: h,
|
|
361
|
+
zIndexPopup: g,
|
|
362
|
+
// Custom token
|
|
363
|
+
contentPadding: l,
|
|
364
|
+
contentBg: $
|
|
365
|
+
} = e, P = `${t}-notice`, k = new pe("MessageMoveIn", {
|
|
366
|
+
"0%": {
|
|
367
|
+
padding: 0,
|
|
368
|
+
transform: "translateY(-100%)",
|
|
369
|
+
opacity: 0
|
|
370
|
+
},
|
|
371
|
+
"100%": {
|
|
372
|
+
padding: m,
|
|
373
|
+
transform: "translateY(0)",
|
|
374
|
+
opacity: 1
|
|
375
|
+
}
|
|
376
|
+
}), S = new pe("MessageMoveOut", {
|
|
377
|
+
"0%": {
|
|
378
|
+
maxHeight: e.height,
|
|
379
|
+
padding: m,
|
|
380
|
+
opacity: 1
|
|
381
|
+
},
|
|
382
|
+
"100%": {
|
|
383
|
+
maxHeight: 0,
|
|
384
|
+
padding: 0,
|
|
385
|
+
opacity: 0
|
|
386
|
+
}
|
|
387
|
+
}), R = {
|
|
388
|
+
padding: m,
|
|
389
|
+
textAlign: "center",
|
|
390
|
+
[`${t}-custom-content`]: {
|
|
391
|
+
display: "flex",
|
|
392
|
+
alignItems: "center"
|
|
393
|
+
},
|
|
394
|
+
[`${t}-custom-content > ${o}`]: {
|
|
395
|
+
marginInlineEnd: i,
|
|
396
|
+
// affected by ltr or rtl
|
|
397
|
+
fontSize: f
|
|
398
|
+
},
|
|
399
|
+
[`${P}-content`]: {
|
|
400
|
+
display: "inline-block",
|
|
401
|
+
padding: l,
|
|
402
|
+
background: $,
|
|
403
|
+
borderRadius: h,
|
|
404
|
+
boxShadow: n,
|
|
405
|
+
pointerEvents: "all"
|
|
406
|
+
},
|
|
407
|
+
[`${t}-success > ${o}`]: {
|
|
408
|
+
color: d
|
|
409
|
+
},
|
|
410
|
+
[`${t}-error > ${o}`]: {
|
|
411
|
+
color: x
|
|
412
|
+
},
|
|
413
|
+
[`${t}-warning > ${o}`]: {
|
|
414
|
+
color: E
|
|
415
|
+
},
|
|
416
|
+
[`${t}-info > ${o},
|
|
417
|
+
${t}-loading > ${o}`]: {
|
|
418
|
+
color: b
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
return [
|
|
422
|
+
// ============================ Holder ============================
|
|
423
|
+
{
|
|
424
|
+
[t]: Object.assign(Object.assign({}, Xe(e)), {
|
|
425
|
+
color: r,
|
|
426
|
+
position: "fixed",
|
|
427
|
+
top: i,
|
|
428
|
+
width: "100%",
|
|
429
|
+
pointerEvents: "none",
|
|
430
|
+
zIndex: g,
|
|
431
|
+
[`${t}-move-up`]: {
|
|
432
|
+
animationFillMode: "forwards"
|
|
433
|
+
},
|
|
434
|
+
[`
|
|
435
|
+
${t}-move-up-appear,
|
|
436
|
+
${t}-move-up-enter
|
|
437
|
+
`]: {
|
|
438
|
+
animationName: k,
|
|
439
|
+
animationDuration: C,
|
|
440
|
+
animationPlayState: "paused",
|
|
441
|
+
animationTimingFunction: y
|
|
442
|
+
},
|
|
443
|
+
[`
|
|
444
|
+
${t}-move-up-appear${t}-move-up-appear-active,
|
|
445
|
+
${t}-move-up-enter${t}-move-up-enter-active
|
|
446
|
+
`]: {
|
|
447
|
+
animationPlayState: "running"
|
|
448
|
+
},
|
|
449
|
+
[`${t}-move-up-leave`]: {
|
|
450
|
+
animationName: S,
|
|
451
|
+
animationDuration: C,
|
|
452
|
+
animationPlayState: "paused",
|
|
453
|
+
animationTimingFunction: y
|
|
454
|
+
},
|
|
455
|
+
[`${t}-move-up-leave${t}-move-up-leave-active`]: {
|
|
456
|
+
animationPlayState: "running"
|
|
457
|
+
},
|
|
458
|
+
"&-rtl": {
|
|
459
|
+
direction: "rtl",
|
|
460
|
+
span: {
|
|
461
|
+
direction: "rtl"
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
})
|
|
465
|
+
},
|
|
466
|
+
// ============================ Notice ============================
|
|
467
|
+
{
|
|
468
|
+
[t]: {
|
|
469
|
+
[`${P}-wrapper`]: Object.assign({}, R)
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
// ============================= Pure =============================
|
|
473
|
+
{
|
|
474
|
+
[`${t}-notice-pure-panel`]: Object.assign(Object.assign({}, R), {
|
|
475
|
+
padding: 0,
|
|
476
|
+
textAlign: "start"
|
|
477
|
+
})
|
|
478
|
+
}
|
|
479
|
+
];
|
|
480
|
+
}, mt = (e) => ({
|
|
481
|
+
zIndexPopup: e.zIndexPopupBase + Ue + 10,
|
|
482
|
+
contentBg: e.colorBgElevated,
|
|
483
|
+
contentPadding: `${(e.controlHeightLG - e.fontSize * e.lineHeight) / 2}px ${e.paddingSM}px`
|
|
484
|
+
}), Ae = Be("Message", (e) => {
|
|
485
|
+
const t = Ge(e, {
|
|
486
|
+
height: 150
|
|
487
|
+
});
|
|
488
|
+
return vt(t);
|
|
489
|
+
}, mt);
|
|
490
|
+
var gt = function(e, t) {
|
|
491
|
+
var o = {};
|
|
492
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
|
|
493
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
|
|
494
|
+
t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
|
|
495
|
+
return o;
|
|
496
|
+
};
|
|
497
|
+
const pt = {
|
|
498
|
+
info: /* @__PURE__ */ a.createElement(Pe, null),
|
|
499
|
+
success: /* @__PURE__ */ a.createElement(Oe, null),
|
|
500
|
+
error: /* @__PURE__ */ a.createElement(Ye, null),
|
|
501
|
+
warning: /* @__PURE__ */ a.createElement(Re, null),
|
|
502
|
+
loading: /* @__PURE__ */ a.createElement(qe, null)
|
|
503
|
+
}, Me = ({
|
|
504
|
+
prefixCls: e,
|
|
505
|
+
type: t,
|
|
506
|
+
icon: o,
|
|
507
|
+
children: n
|
|
508
|
+
}) => /* @__PURE__ */ a.createElement("div", {
|
|
509
|
+
className: H(`${e}-custom-content`, `${e}-${t}`)
|
|
510
|
+
}, o || pt[t], /* @__PURE__ */ a.createElement("span", null, n)), wt = (e) => {
|
|
511
|
+
const {
|
|
512
|
+
prefixCls: t,
|
|
513
|
+
className: o,
|
|
514
|
+
type: n,
|
|
515
|
+
icon: r,
|
|
516
|
+
content: d
|
|
517
|
+
} = e, x = gt(e, ["prefixCls", "className", "type", "icon", "content"]), {
|
|
518
|
+
getPrefixCls: E
|
|
519
|
+
} = a.useContext(Ee), b = t || E("message"), f = Se(b), [y, C, i] = Ae(b, f);
|
|
520
|
+
return y(/* @__PURE__ */ a.createElement($e, Object.assign({}, x, {
|
|
521
|
+
prefixCls: b,
|
|
522
|
+
className: H(o, C, `${b}-notice-pure-panel`, i, f),
|
|
523
|
+
eventKey: "pure",
|
|
524
|
+
duration: null,
|
|
525
|
+
content: /* @__PURE__ */ a.createElement(Me, {
|
|
526
|
+
prefixCls: b,
|
|
527
|
+
type: n,
|
|
528
|
+
icon: r
|
|
529
|
+
}, d)
|
|
530
|
+
})));
|
|
531
|
+
};
|
|
532
|
+
function yt(e, t) {
|
|
533
|
+
return {
|
|
534
|
+
motionName: t ?? `${e}-move-up`
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
function Ct(e) {
|
|
538
|
+
let t;
|
|
539
|
+
const o = new Promise((r) => {
|
|
540
|
+
t = e(() => {
|
|
541
|
+
r(!0);
|
|
542
|
+
});
|
|
543
|
+
}), n = () => {
|
|
544
|
+
t == null || t();
|
|
545
|
+
};
|
|
546
|
+
return n.then = (r, d) => o.then(r, d), n.promise = o, n;
|
|
547
|
+
}
|
|
548
|
+
var Nt = function(e, t) {
|
|
549
|
+
var o = {};
|
|
550
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
|
|
551
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
|
|
552
|
+
t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
|
|
553
|
+
return o;
|
|
554
|
+
};
|
|
555
|
+
const ht = 8, xt = 3, Et = ({
|
|
556
|
+
children: e,
|
|
557
|
+
prefixCls: t
|
|
558
|
+
}) => {
|
|
559
|
+
const o = Se(t), [n, r, d] = Ae(t, o);
|
|
560
|
+
return n(/* @__PURE__ */ a.createElement(st, {
|
|
561
|
+
classNames: {
|
|
562
|
+
list: H(r, d, o)
|
|
563
|
+
}
|
|
564
|
+
}, e));
|
|
565
|
+
}, St = (e, {
|
|
566
|
+
prefixCls: t,
|
|
567
|
+
key: o
|
|
568
|
+
}) => /* @__PURE__ */ a.createElement(Et, {
|
|
569
|
+
prefixCls: t,
|
|
570
|
+
key: o
|
|
571
|
+
}, e), bt = /* @__PURE__ */ a.forwardRef((e, t) => {
|
|
572
|
+
const {
|
|
573
|
+
top: o,
|
|
574
|
+
prefixCls: n,
|
|
575
|
+
getContainer: r,
|
|
576
|
+
maxCount: d,
|
|
577
|
+
duration: x = xt,
|
|
578
|
+
rtl: E,
|
|
579
|
+
transitionName: b,
|
|
580
|
+
onAllRemoved: f
|
|
581
|
+
} = e, {
|
|
582
|
+
getPrefixCls: y,
|
|
583
|
+
getPopupContainer: C,
|
|
584
|
+
message: i,
|
|
585
|
+
direction: m
|
|
586
|
+
} = a.useContext(Ee), h = n || y("message"), g = () => ({
|
|
587
|
+
left: "50%",
|
|
588
|
+
transform: "translateX(-50%)",
|
|
589
|
+
top: o ?? ht
|
|
590
|
+
}), l = () => H({
|
|
591
|
+
[`${h}-rtl`]: E ?? m === "rtl"
|
|
592
|
+
}), $ = () => yt(h, b), P = /* @__PURE__ */ a.createElement("span", {
|
|
593
|
+
className: `${h}-close-x`
|
|
594
|
+
}, /* @__PURE__ */ a.createElement(Ze, {
|
|
595
|
+
className: `${h}-close-icon`
|
|
596
|
+
})), [k, S] = dt({
|
|
597
|
+
prefixCls: h,
|
|
598
|
+
style: g,
|
|
599
|
+
className: l,
|
|
600
|
+
motion: $,
|
|
601
|
+
closable: !1,
|
|
602
|
+
closeIcon: P,
|
|
603
|
+
duration: x,
|
|
604
|
+
getContainer: () => (r == null ? void 0 : r()) || (C == null ? void 0 : C()) || document.body,
|
|
605
|
+
maxCount: d,
|
|
606
|
+
onAllRemoved: f,
|
|
607
|
+
renderNotifications: St
|
|
608
|
+
});
|
|
609
|
+
return a.useImperativeHandle(t, () => Object.assign(Object.assign({}, k), {
|
|
610
|
+
prefixCls: h,
|
|
611
|
+
message: i
|
|
612
|
+
})), S;
|
|
613
|
+
});
|
|
614
|
+
let xe = 0;
|
|
615
|
+
function kt(e) {
|
|
616
|
+
const t = a.useRef(null), o = Je("Message");
|
|
617
|
+
return [a.useMemo(() => {
|
|
618
|
+
const r = (f) => {
|
|
619
|
+
var y;
|
|
620
|
+
(y = t.current) === null || y === void 0 || y.close(f);
|
|
621
|
+
}, d = (f) => {
|
|
622
|
+
if (!t.current) {
|
|
623
|
+
process.env.NODE_ENV !== "production" && o(!1, "usage", "You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.");
|
|
624
|
+
const _ = () => {
|
|
625
|
+
};
|
|
626
|
+
return _.then = () => {
|
|
627
|
+
}, _;
|
|
628
|
+
}
|
|
629
|
+
const {
|
|
630
|
+
open: y,
|
|
631
|
+
prefixCls: C,
|
|
632
|
+
message: i
|
|
633
|
+
} = t.current, m = `${C}-notice`, {
|
|
634
|
+
content: h,
|
|
635
|
+
icon: g,
|
|
636
|
+
type: l,
|
|
637
|
+
key: $,
|
|
638
|
+
className: P,
|
|
639
|
+
style: k,
|
|
640
|
+
onClose: S
|
|
641
|
+
} = f, R = Nt(f, ["content", "icon", "type", "key", "className", "style", "onClose"]);
|
|
642
|
+
let p = $;
|
|
643
|
+
return p == null && (xe += 1, p = `antd-message-${xe}`), Ct((_) => (y(Object.assign(Object.assign({}, R), {
|
|
644
|
+
key: p,
|
|
645
|
+
content: /* @__PURE__ */ a.createElement(Me, {
|
|
646
|
+
prefixCls: C,
|
|
647
|
+
type: l,
|
|
648
|
+
icon: g
|
|
649
|
+
}, h),
|
|
650
|
+
placement: "top",
|
|
651
|
+
className: H(l && `${m}-${l}`, P, i == null ? void 0 : i.className),
|
|
652
|
+
style: Object.assign(Object.assign({}, i == null ? void 0 : i.style), k),
|
|
653
|
+
onClose: () => {
|
|
654
|
+
S == null || S(), _();
|
|
655
|
+
}
|
|
656
|
+
})), () => {
|
|
657
|
+
r(p);
|
|
658
|
+
}));
|
|
659
|
+
}, E = {
|
|
660
|
+
open: d,
|
|
661
|
+
destroy: (f) => {
|
|
662
|
+
var y;
|
|
663
|
+
f !== void 0 ? r(f) : (y = t.current) === null || y === void 0 || y.destroy();
|
|
664
|
+
}
|
|
665
|
+
};
|
|
666
|
+
return ["info", "success", "warning", "error", "loading"].forEach((f) => {
|
|
667
|
+
const y = (C, i, m) => {
|
|
668
|
+
let h;
|
|
669
|
+
C && typeof C == "object" && "content" in C ? h = C : h = {
|
|
670
|
+
content: C
|
|
671
|
+
};
|
|
672
|
+
let g, l;
|
|
673
|
+
typeof i == "function" ? l = i : (g = i, l = m);
|
|
674
|
+
const $ = Object.assign(Object.assign({
|
|
675
|
+
onClose: l,
|
|
676
|
+
duration: g
|
|
677
|
+
}, h), {
|
|
678
|
+
type: f
|
|
679
|
+
});
|
|
680
|
+
return d($);
|
|
681
|
+
};
|
|
682
|
+
E[f] = y;
|
|
683
|
+
}), E;
|
|
684
|
+
}, []), /* @__PURE__ */ a.createElement(bt, Object.assign({
|
|
685
|
+
key: "message-holder"
|
|
686
|
+
}, e, {
|
|
687
|
+
ref: t
|
|
688
|
+
}))];
|
|
689
|
+
}
|
|
690
|
+
function It(e) {
|
|
691
|
+
return kt(e);
|
|
692
|
+
}
|
|
693
|
+
const _t = /* @__PURE__ */ K.createContext({}), At = /* @__PURE__ */ K.createContext({
|
|
694
|
+
message: {},
|
|
695
|
+
notification: {},
|
|
696
|
+
modal: {}
|
|
697
|
+
});
|
|
698
|
+
export {
|
|
699
|
+
_t as A,
|
|
700
|
+
st as N,
|
|
701
|
+
wt as P,
|
|
702
|
+
Re as R,
|
|
703
|
+
Pe as a,
|
|
704
|
+
Oe as b,
|
|
705
|
+
It as c,
|
|
706
|
+
At as d,
|
|
707
|
+
kt as e,
|
|
708
|
+
dt as u,
|
|
709
|
+
Ct as w
|
|
710
|
+
};
|