@yuku123/z-cognition-component 2.0.0 → 2.0.1
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-mAJW3cEN.js} +46 -46
- package/dist-lib/{ai-CQ67aRC4.js → ai-BcYmZiRo.js} +30 -30
- package/dist-lib/{ai-chat-share-AOB7rEOb.js → ai-chat-share-DO7GXjG4.js} +14 -13
- package/dist-lib/{approval-LLVR3fMa.js → approval-RPDUKg9-.js} +26 -25
- package/dist-lib/{approvals-D1DSA-Mw.js → approvals-CNjxJUpR.js} +43 -42
- package/dist-lib/{assistant-DpabpWKV.js → assistant-FIQQziCn.js} +50 -49
- package/dist-lib/{assistant-history-ChvhtZwX.js → assistant-history-DsEGBJnq.js} +5 -5
- package/dist-lib/{assistant-summary-B0ksF8CX.js → assistant-summary-B-f3k55y.js} +1 -1
- package/dist-lib/{audit-DeU1XEgQ.js → audit-NwnH1hm5.js} +1 -1
- package/dist-lib/{bios-Bk36bVhw.js → bios-CRwKtcit.js} +130 -125
- package/dist-lib/callSuper-DZEfdkXG.js +7 -0
- package/dist-lib/{changelog-CCMDMI4R.js → changelog-Dj_Pv2nc.js} +1 -1
- package/dist-lib/{changelog-xEt2qnho.js → changelog-DlL5u9o4.js} +2 -2
- 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-Cfb-zdr9.js} +50 -49
- package/dist-lib/{detail-BW6dD_YP.js → detail-Dcfg3W8B.js} +89 -88
- package/dist-lib/{docx-preview-D4v2g8Yg.js → docx-preview-B5nQuTwk.js} +1 -1
- package/dist-lib/{downloads-Dj4DgBSS.js → downloads-MkyxiHxi.js} +4 -3
- package/dist-lib/{edit-nZ7siGuW.js → edit-DLGAM-Vo.js} +265 -259
- package/dist-lib/{editor-BuhZwEsv.js → editor-BtiheUpe.js} +21 -20
- package/dist-lib/embed-DwLg9RDW.js +31148 -0
- package/dist-lib/{evaluation-B-igEqQ9.js → evaluation-Dz9bUuhS.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-B57Fj7Y0.js +1169 -0
- package/dist-lib/{index-D_-8dmug.js → index-BEjXaDfk.js} +23 -22
- package/dist-lib/{index-BJ2Gpcbi.js → index-BGB6NawZ.js} +2 -2
- package/dist-lib/index-Bc-Vin3j.js +256 -0
- 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-SAPKyv8e.js → index-CJSTTgTM.js} +10 -10
- package/dist-lib/{index-CnLkqTRm.js → index-CaXylbQR.js} +175 -173
- package/dist-lib/index-Cfu1W1H6.js +535 -0
- 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-rtSfQuYs.js → index-D_Qey9G8.js} +12 -12
- package/dist-lib/index-DjFPRXl5.js +1484 -0
- package/dist-lib/{index-Bu6udiyN.js → index-DsuUGhTA.js} +123 -121
- package/dist-lib/{index-B5jr3A7f.js → index-DuI4K5e1.js} +19 -19
- package/dist-lib/index-DvWHYX81.js +450 -0
- package/dist-lib/{index-D5V4bZ4e.js → index-HieOUSwH.js} +8 -8
- package/dist-lib/index-Vu6sPBci.js +1884 -0
- package/dist-lib/index-bOY1cBol.js +4890 -0
- package/dist-lib/{index-DzrH4RQ7.js → index-c2HokEFp.js} +11 -10
- package/dist-lib/{index-BFRg0cn3.js → index-g16g7A4k.js} +6 -6
- 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-BNoIhw6B.js} +71 -71
- package/dist-lib/{kbTeam-BECePvJe.js → kbTeam-EgcbWseM.js} +3 -3
- package/dist-lib/{knowledge-base-C8gHP0dj.js → knowledge-base-C023dnJ-.js} +104 -103
- package/dist-lib/{knowledge-hub-C9KkDv1A.js → knowledge-hub-B4fGCn8m.js} +52 -51
- package/dist-lib/{markdown-lite-BABX4bcl.js → markdown-lite-EvJ9Fw7X.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-pptx-6Byitp0J.js → material-preview-pptx-D8XGDF-u.js} +1 -1
- package/dist-lib/{member-B5WF3FCj.js → member-BUg2QYlE.js} +1 -1
- package/dist-lib/{message-kHyjuooj.js → message-Cwj8dO78.js} +25 -24
- package/dist-lib/{message-D2MSaOMq.js → message-GF-w8HuR.js} +1 -1
- package/dist-lib/{messages-D_VDuKK7.js → messages-JID13L8-.js} +16 -15
- package/dist-lib/{meta-CEf_DYcU.js → meta-DPp5L3Uc.js} +1 -1
- package/dist-lib/{metrics-hONGW0KG.js → metrics-CT4eLzrq.js} +2 -2
- package/dist-lib/{monitor-DFmEu6rH.js → monitor-Bs9BfJOj.js} +4 -4
- package/dist-lib/{monitor-DF3WVsVV.js → monitor-CmS65YSu.js} +8 -8
- package/dist-lib/{my-access-j53lA6T6.js → my-access-1Yj7UloI.js} +3 -3
- package/dist-lib/{my-permissions-C5L8ZN2d.js → my-permissions-yQDHPLYI.js} +23 -22
- package/dist-lib/{new-DfZ61nMQ.js → new-BgkoBnZV.js} +14 -12
- package/dist-lib/{ontology-CUH5qslO.js → ontology-BPrbXPor.js} +145 -142
- package/dist-lib/{ontology-domains-CRC1ZRit.js → ontology-domains-Cbqnm-po.js} +88 -84
- package/dist-lib/{ontology-modeling-DaSk5fsh.js → ontology-modeling-6k-m8fzr.js} +2125 -2117
- package/dist-lib/ontology-modeling-BT-EuDCs.js +1039 -0
- package/dist-lib/{ontology-scenarios-DAbyoKV6.js → ontology-scenarios-D3xy6IZL.js} +703 -712
- package/dist-lib/ontology-scenarios-DWYC2yxd.js +660 -0
- package/dist-lib/pages-CsexFuEz.js +73 -0
- package/dist-lib/pages.js +3 -3
- package/dist-lib/{permission-CklDU2kO.js → permission-fTfxpEhV.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-BlHnhkAT.js} +4 -4
- package/dist-lib/{row-CE051ClO.js → row-B5MnGm9M.js} +63 -61
- package/dist-lib/{save-blob-qKrc8-z6.js → save-blob-B-pzX8eT.js} +2 -2
- package/dist-lib/{scenario-mapping-preview-CSDqIN3R.js → scenario-mapping-preview-DByQXh0y.js} +48 -46
- package/dist-lib/{scenario-simple-form-CAkhVgeV.js → scenario-simple-form-Bw-6n9Kh.js} +425 -423
- package/dist-lib/{schedule-B_ujtL3h.js → schedule-H4_9KnRj.js} +8 -8
- package/dist-lib/{settings-BIkKTQjc.js → settings-C3PI8KYa.js} +147 -146
- package/dist-lib/{shared-Dfz1X4Mq.js → shared-DqeN-Wbb.js} +1 -1
- package/dist-lib/{shared-utils-BeRiAkbe.js → shared-utils-DN3zT9P-.js} +2 -2
- package/dist-lib/{skills-BzpcX5fN.js → skills-eGlCExr0.js} +40 -39
- package/dist-lib/{source-selection-DOL5LBrV.js → source-selection-BCvClzc-.js} +16 -16
- package/dist-lib/{task-config-D0a7TOYt.js → task-config-DEJVJ7zK.js} +4 -4
- package/dist-lib/{tech-CH01ekZ5.js → tech-C-4uM9bS.js} +4 -3
- package/dist-lib/{tools-YnTN61uE.js → tools-le6miafZ.js} +14 -14
- package/dist-lib/{use-domain-access-CXx1YzE5.js → use-domain-access-B3pDp3s5.js} +13 -13
- package/dist-lib/use-g6-graph-WLX0PweO.js +1119 -0
- package/dist-lib/{use-graph-layers-CowyyYcb.js → use-graph-layers-Dmp7uMHO.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-WT1PobuV.js} +27 -26
- package/dist-lib/{version-management-C_v8w1E4.js → version-management-DC0k1DRg.js} +7 -6
- package/dist-lib/{welcome-ChEcA4Ej.js → welcome-VyWLrbth.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
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsxs as c, jsx as o, Fragment as L } from "react/jsx-runtime";
|
|
2
2
|
import { useState as w, useEffect as R, useMemo as m, useCallback as x } from "react";
|
|
3
|
-
import { A as D } from "./index-
|
|
4
|
-
import { u as U,
|
|
3
|
+
import { A as D } from "./index-CJSTTgTM.js";
|
|
4
|
+
import { u as U, I as p, f as H, M as Y, m as $, a as T, b as j, c as F, H as W } from "./embed-DwLg9RDW.js";
|
|
5
|
+
import { u as K } from "./chunk-YDNE64FV-DGyyfCo0.js";
|
|
5
6
|
const q = [
|
|
6
7
|
{
|
|
7
8
|
key: "overview",
|
|
@@ -76,7 +77,7 @@ function X(t) {
|
|
|
76
77
|
granted: t("menu.welcome")
|
|
77
78
|
}
|
|
78
79
|
];
|
|
79
|
-
return
|
|
80
|
+
return Y.forEach((l, a) => {
|
|
80
81
|
i.push({
|
|
81
82
|
code: l.code,
|
|
82
83
|
name: l.name,
|
|
@@ -100,8 +101,8 @@ function Z(t) {
|
|
|
100
101
|
...t,
|
|
101
102
|
name: t.name || $(t.code),
|
|
102
103
|
icon: t.icon || "circle",
|
|
103
|
-
description:
|
|
104
|
-
resolvedPath:
|
|
104
|
+
description: F(t.code),
|
|
105
|
+
resolvedPath: j(t.code, t.path)
|
|
105
106
|
};
|
|
106
107
|
}
|
|
107
108
|
function ee(t) {
|
|
@@ -125,7 +126,7 @@ function ee(t) {
|
|
|
125
126
|
}
|
|
126
127
|
function ne(t) {
|
|
127
128
|
const i = t.get("menu.ontology") ?? [], l = i.find((a) => a.code === "menu.ontology.build");
|
|
128
|
-
return l ? q.filter((a) => !
|
|
129
|
+
return l ? q.filter((a) => !W.has(a.path)).map((a) => ({
|
|
129
130
|
...l,
|
|
130
131
|
code: `${l.code}#${a.key}`,
|
|
131
132
|
name: a.name,
|
|
@@ -134,14 +135,14 @@ function ne(t) {
|
|
|
134
135
|
resolvedPath: a.path
|
|
135
136
|
})) : i;
|
|
136
137
|
}
|
|
137
|
-
function
|
|
138
|
-
const t =
|
|
138
|
+
function le() {
|
|
139
|
+
const t = K(), { canSeeMenu: i, context: l } = U(), [a, r] = w(null), [k, O] = w(!0), [I, y] = w(null);
|
|
139
140
|
R(() => {
|
|
140
141
|
let e = !0;
|
|
141
142
|
return (async () => {
|
|
142
143
|
O(!0);
|
|
143
144
|
try {
|
|
144
|
-
const n = await
|
|
145
|
+
const n = await H();
|
|
145
146
|
e && r(n);
|
|
146
147
|
} finally {
|
|
147
148
|
e && O(!1);
|
|
@@ -385,5 +386,5 @@ function te() {
|
|
|
385
386
|
] });
|
|
386
387
|
}
|
|
387
388
|
export {
|
|
388
|
-
|
|
389
|
+
le as default
|
|
389
390
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as i,
|
|
1
|
+
import { r as i, C as D, I as y } from "./embed-DwLg9RDW.js";
|
|
2
2
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect as v } from "react";
|
|
4
|
-
import { d as S } from "./dayjs.min-
|
|
4
|
+
import { d as S } from "./dayjs.min-BauDENhn.js";
|
|
5
5
|
const c = "/kb/v1/evaluation", u = () => ({ "X-Tenant-Code": D() });
|
|
6
6
|
async function d(e) {
|
|
7
7
|
try {
|
|
@@ -102,7 +102,7 @@ function z(e, t) {
|
|
|
102
102
|
})
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function V(e) {
|
|
106
106
|
return d(
|
|
107
107
|
() => i(`${c}/pageCaseResults`, {
|
|
108
108
|
method: "post",
|
|
@@ -111,7 +111,7 @@ function K(e) {
|
|
|
111
111
|
})
|
|
112
112
|
);
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function K(e, t, r) {
|
|
115
115
|
return d(
|
|
116
116
|
() => i(`${c}/listBadcases`, {
|
|
117
117
|
method: "get",
|
|
@@ -660,12 +660,12 @@ export {
|
|
|
660
660
|
fe as i,
|
|
661
661
|
ue as j,
|
|
662
662
|
be as k,
|
|
663
|
-
|
|
663
|
+
K as l,
|
|
664
664
|
oe as m,
|
|
665
665
|
$ as n,
|
|
666
666
|
X as o,
|
|
667
667
|
B as p,
|
|
668
|
-
|
|
668
|
+
V as q,
|
|
669
669
|
le as r,
|
|
670
670
|
ne as s,
|
|
671
671
|
ie as t,
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
import * as s from "react";
|
|
2
|
+
import { R as K, a as Q, b as Y } from "./context-Buz0ggsK.js";
|
|
3
|
+
import { g as Z, r as ee, u as H, d as oe, a8 as ne, p as te, s as re, x as se, ah as ie, b as ae, R as ce, ai as le, $ as de, a0 as pe } from "./index-CrMcNEAZ.js";
|
|
4
|
+
import { c as v } from "./SearchOutlined-puH6bCY6.js";
|
|
5
|
+
import { _ as me } from "./callSuper-DZEfdkXG.js";
|
|
6
|
+
const S = (e, o, t, n, r) => ({
|
|
7
|
+
background: e,
|
|
8
|
+
border: `${H(n.lineWidth)} ${n.lineType} ${o}`,
|
|
9
|
+
[`${r}-icon`]: {
|
|
10
|
+
color: t
|
|
11
|
+
}
|
|
12
|
+
}), ue = (e) => {
|
|
13
|
+
const {
|
|
14
|
+
componentCls: o,
|
|
15
|
+
motionDurationSlow: t,
|
|
16
|
+
marginXS: n,
|
|
17
|
+
marginSM: r,
|
|
18
|
+
fontSize: i,
|
|
19
|
+
fontSizeLG: l,
|
|
20
|
+
lineHeight: d,
|
|
21
|
+
borderRadiusLG: u,
|
|
22
|
+
motionEaseInOutCirc: p,
|
|
23
|
+
withDescriptionIconSize: g,
|
|
24
|
+
colorText: y,
|
|
25
|
+
colorTextHeading: C,
|
|
26
|
+
withDescriptionPadding: b,
|
|
27
|
+
defaultPadding: a
|
|
28
|
+
} = e;
|
|
29
|
+
return {
|
|
30
|
+
[o]: Object.assign(Object.assign({}, ee(e)), {
|
|
31
|
+
position: "relative",
|
|
32
|
+
display: "flex",
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
padding: a,
|
|
35
|
+
wordWrap: "break-word",
|
|
36
|
+
borderRadius: u,
|
|
37
|
+
[`&${o}-rtl`]: {
|
|
38
|
+
direction: "rtl"
|
|
39
|
+
},
|
|
40
|
+
[`${o}-content`]: {
|
|
41
|
+
flex: 1,
|
|
42
|
+
minWidth: 0
|
|
43
|
+
},
|
|
44
|
+
[`${o}-icon`]: {
|
|
45
|
+
marginInlineEnd: n,
|
|
46
|
+
lineHeight: 0
|
|
47
|
+
},
|
|
48
|
+
"&-description": {
|
|
49
|
+
display: "none",
|
|
50
|
+
fontSize: i,
|
|
51
|
+
lineHeight: d
|
|
52
|
+
},
|
|
53
|
+
"&-message": {
|
|
54
|
+
color: C
|
|
55
|
+
},
|
|
56
|
+
[`&${o}-motion-leave`]: {
|
|
57
|
+
overflow: "hidden",
|
|
58
|
+
opacity: 1,
|
|
59
|
+
transition: `max-height ${t} ${p}, opacity ${t} ${p},
|
|
60
|
+
padding-top ${t} ${p}, padding-bottom ${t} ${p},
|
|
61
|
+
margin-bottom ${t} ${p}`
|
|
62
|
+
},
|
|
63
|
+
[`&${o}-motion-leave-active`]: {
|
|
64
|
+
maxHeight: 0,
|
|
65
|
+
marginBottom: "0 !important",
|
|
66
|
+
paddingTop: 0,
|
|
67
|
+
paddingBottom: 0,
|
|
68
|
+
opacity: 0
|
|
69
|
+
}
|
|
70
|
+
}),
|
|
71
|
+
[`${o}-with-description`]: {
|
|
72
|
+
alignItems: "flex-start",
|
|
73
|
+
padding: b,
|
|
74
|
+
[`${o}-icon`]: {
|
|
75
|
+
marginInlineEnd: r,
|
|
76
|
+
fontSize: g,
|
|
77
|
+
lineHeight: 0
|
|
78
|
+
},
|
|
79
|
+
[`${o}-message`]: {
|
|
80
|
+
display: "block",
|
|
81
|
+
marginBottom: n,
|
|
82
|
+
color: C,
|
|
83
|
+
fontSize: l
|
|
84
|
+
},
|
|
85
|
+
[`${o}-description`]: {
|
|
86
|
+
display: "block",
|
|
87
|
+
color: y
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
[`${o}-banner`]: {
|
|
91
|
+
marginBottom: 0,
|
|
92
|
+
border: "0 !important",
|
|
93
|
+
borderRadius: 0
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}, fe = (e) => {
|
|
97
|
+
const {
|
|
98
|
+
componentCls: o,
|
|
99
|
+
colorSuccess: t,
|
|
100
|
+
colorSuccessBorder: n,
|
|
101
|
+
colorSuccessBg: r,
|
|
102
|
+
colorWarning: i,
|
|
103
|
+
colorWarningBorder: l,
|
|
104
|
+
colorWarningBg: d,
|
|
105
|
+
colorError: u,
|
|
106
|
+
colorErrorBorder: p,
|
|
107
|
+
colorErrorBg: g,
|
|
108
|
+
colorInfo: y,
|
|
109
|
+
colorInfoBorder: C,
|
|
110
|
+
colorInfoBg: b
|
|
111
|
+
} = e;
|
|
112
|
+
return {
|
|
113
|
+
[o]: {
|
|
114
|
+
"&-success": S(r, n, t, e, o),
|
|
115
|
+
"&-info": S(b, C, y, e, o),
|
|
116
|
+
"&-warning": S(d, l, i, e, o),
|
|
117
|
+
"&-error": Object.assign(Object.assign({}, S(g, p, u, e, o)), {
|
|
118
|
+
[`${o}-description > pre`]: {
|
|
119
|
+
margin: 0,
|
|
120
|
+
padding: 0
|
|
121
|
+
}
|
|
122
|
+
})
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
}, ge = (e) => {
|
|
126
|
+
const {
|
|
127
|
+
componentCls: o,
|
|
128
|
+
iconCls: t,
|
|
129
|
+
motionDurationMid: n,
|
|
130
|
+
marginXS: r,
|
|
131
|
+
fontSizeIcon: i,
|
|
132
|
+
colorIcon: l,
|
|
133
|
+
colorIconHover: d
|
|
134
|
+
} = e;
|
|
135
|
+
return {
|
|
136
|
+
[o]: {
|
|
137
|
+
"&-action": {
|
|
138
|
+
marginInlineStart: r
|
|
139
|
+
},
|
|
140
|
+
[`${o}-close-icon`]: {
|
|
141
|
+
marginInlineStart: r,
|
|
142
|
+
padding: 0,
|
|
143
|
+
overflow: "hidden",
|
|
144
|
+
fontSize: i,
|
|
145
|
+
lineHeight: H(i),
|
|
146
|
+
backgroundColor: "transparent",
|
|
147
|
+
border: "none",
|
|
148
|
+
outline: "none",
|
|
149
|
+
cursor: "pointer",
|
|
150
|
+
[`${t}-close`]: {
|
|
151
|
+
color: l,
|
|
152
|
+
transition: `color ${n}`,
|
|
153
|
+
"&:hover": {
|
|
154
|
+
color: d
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"&-close-text": {
|
|
159
|
+
color: l,
|
|
160
|
+
transition: `color ${n}`,
|
|
161
|
+
"&:hover": {
|
|
162
|
+
color: d
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
}, ye = (e) => ({
|
|
168
|
+
withDescriptionIconSize: e.fontSizeHeading3,
|
|
169
|
+
defaultPadding: `${e.paddingContentVerticalSM}px 12px`,
|
|
170
|
+
withDescriptionPadding: `${e.paddingMD}px ${e.paddingContentHorizontalLG}px`
|
|
171
|
+
}), $e = Z("Alert", (e) => [ue(e), fe(e), ge(e)], ye);
|
|
172
|
+
var P = function(e, o) {
|
|
173
|
+
var t = {};
|
|
174
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && o.indexOf(n) < 0 && (t[n] = e[n]);
|
|
175
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
|
|
176
|
+
o.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (t[n[r]] = e[n[r]]);
|
|
177
|
+
return t;
|
|
178
|
+
};
|
|
179
|
+
const Ce = {
|
|
180
|
+
success: Y,
|
|
181
|
+
info: Q,
|
|
182
|
+
error: ae,
|
|
183
|
+
warning: K
|
|
184
|
+
}, be = (e) => {
|
|
185
|
+
const {
|
|
186
|
+
icon: o,
|
|
187
|
+
prefixCls: t,
|
|
188
|
+
type: n
|
|
189
|
+
} = e, r = Ce[n] || null;
|
|
190
|
+
return o ? ie(o, /* @__PURE__ */ s.createElement("span", {
|
|
191
|
+
className: `${t}-icon`
|
|
192
|
+
}, o), () => ({
|
|
193
|
+
className: v(`${t}-icon`, o.props.className)
|
|
194
|
+
})) : /* @__PURE__ */ s.createElement(r, {
|
|
195
|
+
className: `${t}-icon`
|
|
196
|
+
});
|
|
197
|
+
}, he = (e) => {
|
|
198
|
+
const {
|
|
199
|
+
isClosable: o,
|
|
200
|
+
prefixCls: t,
|
|
201
|
+
closeIcon: n,
|
|
202
|
+
handleClose: r,
|
|
203
|
+
ariaProps: i
|
|
204
|
+
} = e, l = n === !0 || n === void 0 ? /* @__PURE__ */ s.createElement(ce, null) : n;
|
|
205
|
+
return o ? /* @__PURE__ */ s.createElement("button", Object.assign({
|
|
206
|
+
type: "button",
|
|
207
|
+
onClick: r,
|
|
208
|
+
className: `${t}-close-icon`,
|
|
209
|
+
tabIndex: 0
|
|
210
|
+
}, i), l) : null;
|
|
211
|
+
}, E = /* @__PURE__ */ s.forwardRef((e, o) => {
|
|
212
|
+
const {
|
|
213
|
+
description: t,
|
|
214
|
+
prefixCls: n,
|
|
215
|
+
message: r,
|
|
216
|
+
banner: i,
|
|
217
|
+
className: l,
|
|
218
|
+
rootClassName: d,
|
|
219
|
+
style: u,
|
|
220
|
+
onMouseEnter: p,
|
|
221
|
+
onMouseLeave: g,
|
|
222
|
+
onClick: y,
|
|
223
|
+
afterClose: C,
|
|
224
|
+
showIcon: b,
|
|
225
|
+
closable: a,
|
|
226
|
+
closeText: h,
|
|
227
|
+
closeIcon: $,
|
|
228
|
+
action: x,
|
|
229
|
+
id: R
|
|
230
|
+
} = e, z = P(e, ["description", "prefixCls", "message", "banner", "className", "rootClassName", "style", "onMouseEnter", "onMouseLeave", "onClick", "afterClose", "showIcon", "closable", "closeText", "closeIcon", "action", "id"]), [w, _] = s.useState(!1);
|
|
231
|
+
process.env.NODE_ENV !== "production" && oe("Alert").deprecated(!h, "closeText", "closable.closeIcon");
|
|
232
|
+
const N = s.useRef(null);
|
|
233
|
+
s.useImperativeHandle(o, () => ({
|
|
234
|
+
nativeElement: N.current
|
|
235
|
+
}));
|
|
236
|
+
const {
|
|
237
|
+
getPrefixCls: D,
|
|
238
|
+
direction: A,
|
|
239
|
+
closable: f,
|
|
240
|
+
closeIcon: O,
|
|
241
|
+
className: T,
|
|
242
|
+
style: L
|
|
243
|
+
} = ne("alert"), c = D("alert", n), [k, W, V] = $e(c), G = (m) => {
|
|
244
|
+
var I;
|
|
245
|
+
_(!0), (I = e.onClose) === null || I === void 0 || I.call(e, m);
|
|
246
|
+
}, j = s.useMemo(() => e.type !== void 0 ? e.type : i ? "warning" : "info", [e.type, i]), X = s.useMemo(() => typeof a == "object" && a.closeIcon || h ? !0 : typeof a == "boolean" ? a : $ !== !1 && $ !== null && $ !== void 0 ? !0 : !!f, [h, $, a, f]), M = i && b === void 0 ? !0 : b, F = v(c, `${c}-${j}`, {
|
|
247
|
+
[`${c}-with-description`]: !!t,
|
|
248
|
+
[`${c}-no-icon`]: !M,
|
|
249
|
+
[`${c}-banner`]: !!i,
|
|
250
|
+
[`${c}-rtl`]: A === "rtl"
|
|
251
|
+
}, T, l, d, V, W), U = te(z, {
|
|
252
|
+
aria: !0,
|
|
253
|
+
data: !0
|
|
254
|
+
}), q = s.useMemo(() => typeof a == "object" && a.closeIcon ? a.closeIcon : h || ($ !== void 0 ? $ : typeof f == "object" && f.closeIcon ? f.closeIcon : O), [$, a, f, h, O]), J = s.useMemo(() => {
|
|
255
|
+
const m = a ?? f;
|
|
256
|
+
if (typeof m == "object") {
|
|
257
|
+
const {
|
|
258
|
+
closeIcon: I
|
|
259
|
+
} = m;
|
|
260
|
+
return P(m, ["closeIcon"]);
|
|
261
|
+
}
|
|
262
|
+
return {};
|
|
263
|
+
}, [a, f]);
|
|
264
|
+
return k(/* @__PURE__ */ s.createElement(re, {
|
|
265
|
+
visible: !w,
|
|
266
|
+
motionName: `${c}-motion`,
|
|
267
|
+
motionAppear: !1,
|
|
268
|
+
motionEnter: !1,
|
|
269
|
+
onLeaveStart: (m) => ({
|
|
270
|
+
maxHeight: m.offsetHeight
|
|
271
|
+
}),
|
|
272
|
+
onLeaveEnd: C
|
|
273
|
+
}, ({
|
|
274
|
+
className: m,
|
|
275
|
+
style: I
|
|
276
|
+
}, B) => /* @__PURE__ */ s.createElement("div", Object.assign({
|
|
277
|
+
id: R,
|
|
278
|
+
ref: se(N, B),
|
|
279
|
+
"data-show": !w,
|
|
280
|
+
className: v(F, m),
|
|
281
|
+
style: Object.assign(Object.assign(Object.assign({}, L), u), I),
|
|
282
|
+
onMouseEnter: p,
|
|
283
|
+
onMouseLeave: g,
|
|
284
|
+
onClick: y,
|
|
285
|
+
role: "alert"
|
|
286
|
+
}, U), M ? /* @__PURE__ */ s.createElement(be, {
|
|
287
|
+
description: t,
|
|
288
|
+
icon: e.icon,
|
|
289
|
+
prefixCls: c,
|
|
290
|
+
type: j
|
|
291
|
+
}) : null, /* @__PURE__ */ s.createElement("div", {
|
|
292
|
+
className: `${c}-content`
|
|
293
|
+
}, r ? /* @__PURE__ */ s.createElement("div", {
|
|
294
|
+
className: `${c}-message`
|
|
295
|
+
}, r) : null, t ? /* @__PURE__ */ s.createElement("div", {
|
|
296
|
+
className: `${c}-description`
|
|
297
|
+
}, t) : null), x ? /* @__PURE__ */ s.createElement("div", {
|
|
298
|
+
className: `${c}-action`
|
|
299
|
+
}, x) : null, /* @__PURE__ */ s.createElement(he, {
|
|
300
|
+
isClosable: X,
|
|
301
|
+
prefixCls: c,
|
|
302
|
+
closeIcon: q,
|
|
303
|
+
handleClose: G,
|
|
304
|
+
ariaProps: J
|
|
305
|
+
}))));
|
|
306
|
+
});
|
|
307
|
+
process.env.NODE_ENV !== "production" && (E.displayName = "Alert");
|
|
308
|
+
let Ie = /* @__PURE__ */ (function(e) {
|
|
309
|
+
function o() {
|
|
310
|
+
var t;
|
|
311
|
+
return pe(this, o), t = me(this, o, arguments), t.state = {
|
|
312
|
+
error: void 0,
|
|
313
|
+
info: {
|
|
314
|
+
componentStack: ""
|
|
315
|
+
}
|
|
316
|
+
}, t;
|
|
317
|
+
}
|
|
318
|
+
return le(o, e), de(o, [{
|
|
319
|
+
key: "componentDidCatch",
|
|
320
|
+
value: function(n, r) {
|
|
321
|
+
this.setState({
|
|
322
|
+
error: n,
|
|
323
|
+
info: r
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
}, {
|
|
327
|
+
key: "render",
|
|
328
|
+
value: function() {
|
|
329
|
+
const {
|
|
330
|
+
message: n,
|
|
331
|
+
description: r,
|
|
332
|
+
id: i,
|
|
333
|
+
children: l
|
|
334
|
+
} = this.props, {
|
|
335
|
+
error: d,
|
|
336
|
+
info: u
|
|
337
|
+
} = this.state, p = (u == null ? void 0 : u.componentStack) || null, g = typeof n > "u" ? (d || "").toString() : n, y = typeof r > "u" ? p : r;
|
|
338
|
+
return d ? /* @__PURE__ */ s.createElement(E, {
|
|
339
|
+
id: i,
|
|
340
|
+
type: "error",
|
|
341
|
+
message: g,
|
|
342
|
+
description: /* @__PURE__ */ s.createElement("pre", {
|
|
343
|
+
style: {
|
|
344
|
+
fontSize: "0.9em",
|
|
345
|
+
overflowX: "auto"
|
|
346
|
+
}
|
|
347
|
+
}, y)
|
|
348
|
+
}) : l;
|
|
349
|
+
}
|
|
350
|
+
}]);
|
|
351
|
+
})(s.Component);
|
|
352
|
+
const Se = E;
|
|
353
|
+
Se.ErrorBoundary = Ie;
|
|
354
|
+
export {
|
|
355
|
+
Se as A
|
|
356
|
+
};
|