@yuku123/z-cognition-component 1.0.2 → 1.0.4

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.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),k=require("react-router-dom"),s=require("antd"),O=require("@ant-design/icons"),o=require("./api-D5Hgcud4.cjs"),{TextArea:R}=s.Input,A={ERROR:"red",WARNING:"orange",INFO:"blue"};function q(){const[u]=k.useSearchParams(),a=u.get("id")||"",[i,S]=n.useState("source"),[h,j]=n.useState("default"),[l,p]=n.useState(""),[g,w]=n.useState(`{
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),R=require("react-router-dom"),s=require("antd"),k=require("@ant-design/icons"),o=require("./api-D5Hgcud4.cjs"),{TextArea:O}=s.Input,A={ERROR:"red",WARNING:"orange",INFO:"blue"};function q(){const[u]=R.useSearchParams(),a=u.get("id")||"",[i,S]=n.useState("source"),[h,j]=n.useState("default"),[l,p]=n.useState(""),[g,w]=n.useState(`{
2
2
  "individuals": [],
3
3
  "statements": []
4
- }`),[f,x]=n.useState([]),[r,d]=n.useState(null),[v,y]=n.useState(!1);n.useEffect(()=>{a&&o.ontologyApi.listSources().then(x).catch(()=>x([]))},[a]);const C=async()=>{y(!0),d(null);try{if(i==="source"){if(!l.trim()){s.message.warning("按来源校验需要指定 source");return}d(await o.ontologyApi.validateSource(a,l.trim(),h))}else d(await o.ontologyApi.validate(a,m(g)))}catch(t){s.message.error(t.message)}finally{y(!1)}},I=[{title:"级别",dataIndex:"severity",key:"severity",width:90,render:t=>e.jsx(s.Tag,{color:A[t]||"default",children:t})},{title:"编码",dataIndex:"code",key:"code",width:160},{title:"主体",dataIndex:"subject",key:"subject",width:160},{title:"谓词",dataIndex:"predicate",key:"predicate",width:140},{title:"说明",dataIndex:"message",key:"message"}];if(!a)return e.jsx(s.Alert,{type:"warning",message:"缺少本体 ID(?id=xxx)"});const c=(r==null?void 0:r.issues)||[];return e.jsxs(s.Spin,{spinning:v,children:[e.jsx(s.Card,{size:"small",style:{marginBottom:16},children:e.jsxs(s.Space,{direction:"vertical",style:{width:"100%"},size:12,children:[e.jsxs(s.Space,{wrap:!0,children:[e.jsx(s.Select,{style:{width:180},value:i,onChange:S,options:[{value:"source",label:"按来源校验"},{value:"inline",label:"内联快照校验"}]}),e.jsx(s.Input,{style:{width:220},placeholder:"工作空间",value:h,onChange:t=>j(t.target.value)}),i==="source"?e.jsx(s.Select,{style:{width:280},placeholder:"选择或输入数据源",value:l||void 0,onChange:p,showSearch:!0,options:f.map(t=>({value:t.id,label:t.description?`${t.id} — ${t.description}`:t.id})),notFoundContent:null}):null,e.jsx(s.Button,{type:"primary",icon:e.jsx(O.CheckCircleOutlined,{}),onClick:C,children:"执行校验"})]}),i==="source"?e.jsx(s.Input,{style:{width:420},placeholder:"source ID(可直接输入)",value:l,onChange:t=>p(t.target.value)}):e.jsx(R,{rows:10,value:g,onChange:t=>w(t.target.value),placeholder:'{"individuals": [], "statements": []}'})]})}),r?e.jsxs(s.Card,{size:"small",title:`校验结果(${c.length} 条问题)`,children:[e.jsxs(s.Space,{size:"large",wrap:!0,style:{marginBottom:c.length?12:0},children:[e.jsxs("span",{children:["错误 ",e.jsx("b",{children:o.field(r,"errorCount","error_count")})]}),e.jsxs("span",{children:["警告 ",e.jsx("b",{children:o.field(r,"warningCount","warning_count")})]}),e.jsxs("span",{children:["提示 ",e.jsx("b",{children:o.field(r,"infoCount","info_count")})]})]}),c.length===0?e.jsx(s.Alert,{type:"success",message:"校验通过,未发现问题"}):e.jsx(s.Table,{rowKey:(t,b)=>`${t.code}-${b}`,size:"small",columns:I,dataSource:c,pagination:!1})]}):null]})}function m(u){try{return JSON.parse(u)}catch(a){throw new Error(`快照不是合法 JSON:${a.message}`)}}exports.default=q;exports.parseSnapshot=m;
4
+ }`),[f,x]=n.useState([]),[r,d]=n.useState(null),[v,y]=n.useState(!1);n.useEffect(()=>{a&&o.ontologyApi.listSources().then(x).catch(()=>x([]))},[a]);const C=async()=>{y(!0),d(null);try{if(i==="source"){if(!l.trim()){s.message.warning("按来源校验需要指定 source");return}d(await o.ontologyApi.validateSource(a,l.trim(),h))}else d(await o.ontologyApi.validate(a,m(g)))}catch(t){s.message.error(t.message)}finally{y(!1)}},I=[{title:"级别",dataIndex:"severity",key:"severity",width:90,render:t=>e.jsx(s.Tag,{color:A[t]||"default",children:t})},{title:"编码",dataIndex:"code",key:"code",width:160},{title:"主体",dataIndex:"subject",key:"subject",width:160},{title:"谓词",dataIndex:"predicate",key:"predicate",width:140},{title:"说明",dataIndex:"message",key:"message"}];if(!a)return e.jsx(s.Alert,{type:"warning",message:"缺少本体 ID(?id=xxx)"});const c=(r==null?void 0:r.issues)||[];return e.jsxs(s.Spin,{spinning:v,children:[e.jsx(s.Card,{size:"small",style:{marginBottom:16},children:e.jsxs(s.Space,{direction:"vertical",style:{width:"100%"},size:12,children:[e.jsxs(s.Space,{wrap:!0,children:[e.jsx(s.Select,{style:{width:180},value:i,onChange:S,options:[{value:"source",label:"按来源校验"},{value:"inline",label:"内联快照校验"}]}),e.jsx(s.Input,{style:{width:220},placeholder:"工作空间",value:h,onChange:t=>j(t.target.value)}),i==="source"?e.jsx(s.Select,{style:{width:280},placeholder:"选择或输入数据源",value:l||void 0,onChange:p,showSearch:!0,options:f.map(t=>({value:t.id,label:t.description?`${t.id} — ${t.description}`:t.id})),notFoundContent:null}):null,e.jsx(s.Button,{type:"primary",icon:e.jsx(k.CheckCircleOutlined,{}),onClick:C,children:"执行校验"})]}),i==="source"?e.jsx(s.Input,{style:{width:420},placeholder:"source ID(可直接输入)",value:l,onChange:t=>p(t.target.value)}):e.jsx(O,{rows:10,value:g,onChange:t=>w(t.target.value),placeholder:'{"individuals": [], "statements": []}'})]})}),r?e.jsxs(s.Card,{size:"small",title:`校验结果(${c.length} 条问题)`,children:[e.jsxs(s.Space,{size:"large",wrap:!0,style:{marginBottom:c.length?12:0},children:[e.jsxs("span",{children:["错误 ",e.jsx("b",{children:o.field(r,"errorCount","error_count")})]}),e.jsxs("span",{children:["警告 ",e.jsx("b",{children:o.field(r,"warningCount","warning_count")})]}),e.jsxs("span",{children:["提示 ",e.jsx("b",{children:o.field(r,"infoCount","info_count")})]})]}),c.length===0?e.jsx(s.Alert,{type:"success",message:"校验通过,未发现问题"}):e.jsx(s.Table,{rowKey:(t,b)=>`${t.code}-${b}`,size:"small",columns:I,dataSource:c,pagination:!1})]}):null]})}function m(u){try{return JSON.parse(u)}catch(a){throw new Error(`快照不是合法 JSON:${a.message}`)}}exports.default=q;exports.parseSnapshot=m;
@@ -2,15 +2,15 @@ import { jsx as e, jsxs as o, Fragment as te } from "react/jsx-runtime";
2
2
  import { useState as a, useCallback as ie, useEffect as ne } from "react";
3
3
  import { useSearchParams as le, useNavigate as re } from "react-router-dom";
4
4
  import { Input as d, Form as l, Alert as D, Spin as ae, Space as F, Button as p, Select as g, Descriptions as s, Typography as f, Tag as z, Table as x, Popconfirm as se, Modal as L, message as m } from "antd";
5
- import { ArrowLeftOutlined as oe, ReloadOutlined as de, EditOutlined as ce, DiffOutlined as me, RollbackOutlined as ue } from "@ant-design/icons";
5
+ import { ArrowLeftOutlined as oe, ReloadOutlined as de, EditOutlined as ce, DiffOutlined as me } from "@ant-design/icons";
6
6
  import { cognitionApi as u } from "./api.js";
7
- import { S as he, T as pe, a as fe, t as ge } from "./EvidenceFormList-097ICr7D.js";
8
- const { TextArea: ye } = d;
9
- function Ee() {
10
- const [P] = le(), q = re(), r = P.get("key") || "", [i, j] = a(null), [S, H] = a([]), [E, _] = a([]), [M, $] = a(!0), [O, k] = a(""), [U, y] = a(!1), [V, C] = a(!1), [w] = l.useForm(), [v, A] = a(null), [I, N] = a(null), [G, R] = a(!1), [c, J] = a(null), h = ie(async () => {
7
+ import { S as ue, T as he, a as pe, t as fe } from "./EvidenceFormList-097ICr7D.js";
8
+ const { TextArea: ge } = d;
9
+ function Se() {
10
+ const [P] = le(), q = re(), r = P.get("key") || "", [i, j] = a(null), [S, H] = a([]), [E, _] = a([]), [M, $] = a(!0), [k, O] = a(""), [U, y] = a(!1), [V, C] = a(!1), [w] = l.useForm(), [v, A] = a(null), [I, N] = a(null), [G, K] = a(!1), [c, J] = a(null), h = ie(async () => {
11
11
  var t, n;
12
12
  if (r) {
13
- $(!0), k("");
13
+ $(!0), O("");
14
14
  try {
15
15
  const [b, Z, T] = await Promise.all([
16
16
  u.getTerm(r),
@@ -21,7 +21,7 @@ function Ee() {
21
21
  const B = (t = (T || [])[0]) == null ? void 0 : t.revisionNo, ee = (n = (T || [])[1]) == null ? void 0 : n.revisionNo;
22
22
  N(B ?? null), A(ee ?? B ?? null);
23
23
  } catch (b) {
24
- k(b.message);
24
+ O(b.message);
25
25
  } finally {
26
26
  $(!1);
27
27
  }
@@ -35,7 +35,7 @@ function Ee() {
35
35
  w.setFieldsValue({
36
36
  ...i,
37
37
  aliases: i.aliases || [],
38
- evidences: ge(S)
38
+ evidences: fe(S)
39
39
  }), y(!0);
40
40
  }, W = async () => {
41
41
  const t = await w.validateFields();
@@ -64,11 +64,11 @@ function Ee() {
64
64
  return;
65
65
  }
66
66
  try {
67
- J(await u.diffTerm(r, v, I)), R(!0);
67
+ J(await u.diffTerm(r, v, I)), K(!0);
68
68
  } catch (t) {
69
69
  m.error(t.message);
70
70
  }
71
- }, K = E.map((t) => ({
71
+ }, R = E.map((t) => ({
72
72
  value: t.revisionNo,
73
73
  label: `r${t.revisionNo} · ${t.createdAt} · ${t.actor || "-"} · ${t.note || ""}`
74
74
  }));
@@ -77,17 +77,17 @@ function Ee() {
77
77
  /* @__PURE__ */ e(p, { icon: /* @__PURE__ */ e(oe, {}), onClick: () => q("/cognition/terms"), children: "返回列表" }),
78
78
  /* @__PURE__ */ e(p, { icon: /* @__PURE__ */ e(de, {}), onClick: h, children: "刷新" }),
79
79
  /* @__PURE__ */ e(p, { type: "primary", icon: /* @__PURE__ */ e(ce, {}), disabled: !i, onClick: Q, children: "编辑(生成新版本)" }),
80
- /* @__PURE__ */ e(g, { style: { width: 300 }, placeholder: "left", value: v, onChange: A, options: K }),
81
- /* @__PURE__ */ e(g, { style: { width: 300 }, placeholder: "right", value: I, onChange: N, options: K }),
80
+ /* @__PURE__ */ e(g, { style: { width: 300 }, placeholder: "left", value: v, onChange: A, options: R }),
81
+ /* @__PURE__ */ e(g, { style: { width: 300 }, placeholder: "right", value: I, onChange: N, options: R }),
82
82
  /* @__PURE__ */ e(p, { icon: /* @__PURE__ */ e(me, {}), onClick: Y, children: "版本对比" })
83
83
  ] }),
84
- O ? /* @__PURE__ */ e(D, { type: "error", showIcon: !0, message: O, style: { marginBottom: 16 } }) : null,
84
+ k ? /* @__PURE__ */ e(D, { type: "error", showIcon: !0, message: k, style: { marginBottom: 16 } }) : null,
85
85
  i ? /* @__PURE__ */ o(te, { children: [
86
86
  /* @__PURE__ */ o(s, { bordered: !0, size: "small", column: 2, style: { marginBottom: 16 }, children: [
87
87
  /* @__PURE__ */ e(s.Item, { label: "termKey", children: /* @__PURE__ */ e(f.Text, { code: !0, children: i.termKey }) }),
88
88
  /* @__PURE__ */ e(s.Item, { label: "规范名", children: i.canonical }),
89
89
  /* @__PURE__ */ o(s.Item, { label: "状态", children: [
90
- /* @__PURE__ */ e(z, { color: he[i.status] || "blue", children: i.status }),
90
+ /* @__PURE__ */ e(z, { color: ue[i.status] || "blue", children: i.status }),
91
91
  i.supersededBy ? /* @__PURE__ */ o("span", { children: [
92
92
  "→ ",
93
93
  i.supersededBy
@@ -148,7 +148,7 @@ function Ee() {
148
148
  title: `回滚到 r${n.revisionNo}?`,
149
149
  description: "会以该版本内容生成一条新的 revision",
150
150
  onConfirm: () => X(n.revisionNo),
151
- children: /* @__PURE__ */ e(p, { size: "small", icon: /* @__PURE__ */ e(ue, {}), children: "回滚" })
151
+ children: /* @__PURE__ */ e(p, { type: "link", size: "small", children: "回滚" })
152
152
  }
153
153
  )
154
154
  }
@@ -169,7 +169,7 @@ function Ee() {
169
169
  children: /* @__PURE__ */ o(l, { form: w, layout: "vertical", children: [
170
170
  /* @__PURE__ */ o(F, { size: "large", wrap: !0, children: [
171
171
  /* @__PURE__ */ e(l.Item, { name: "canonical", label: "规范名", rules: [{ required: !0, message: "必填" }], children: /* @__PURE__ */ e(d, { style: { width: 240 } }) }),
172
- /* @__PURE__ */ e(l.Item, { name: "status", label: "状态", rules: [{ required: !0 }], children: /* @__PURE__ */ e(g, { style: { width: 140 }, options: pe.map((t) => ({ value: t, label: t })) }) }),
172
+ /* @__PURE__ */ e(l.Item, { name: "status", label: "状态", rules: [{ required: !0 }], children: /* @__PURE__ */ e(g, { style: { width: 140 }, options: he.map((t) => ({ value: t, label: t })) }) }),
173
173
  /* @__PURE__ */ e(l.Item, { name: "supersededBy", label: "替代项(DEPRECATED 必填)", children: /* @__PURE__ */ e(d, { style: { width: 180 } }) }),
174
174
  /* @__PURE__ */ e(l.Item, { name: "domain", label: "域", children: /* @__PURE__ */ e(d, { style: { width: 140 } }) }),
175
175
  /* @__PURE__ */ e(l.Item, { name: "owner", label: "owner", children: /* @__PURE__ */ e(d, { style: { width: 140 } }) })
@@ -182,11 +182,11 @@ function Ee() {
182
182
  name: "definition",
183
183
  label: "定义",
184
184
  rules: [{ required: !0, message: "必填" }],
185
- children: /* @__PURE__ */ e(ye, { rows: 3 })
185
+ children: /* @__PURE__ */ e(ge, { rows: 3 })
186
186
  }
187
187
  ),
188
188
  /* @__PURE__ */ e(l.Item, { name: "note", label: "变更说明", children: /* @__PURE__ */ e(d, { placeholder: "console update" }) }),
189
- /* @__PURE__ */ e(l.Item, { label: "证据(至少一条;本次提交即本版本证据)", required: !0, children: /* @__PURE__ */ e(fe, {}) })
189
+ /* @__PURE__ */ e(l.Item, { label: "证据(至少一条;本次提交即本版本证据)", required: !0, children: /* @__PURE__ */ e(pe, {}) })
190
190
  ] })
191
191
  }
192
192
  ),
@@ -195,7 +195,7 @@ function Ee() {
195
195
  {
196
196
  title: c ? `${c.subjectKey}: r${c.leftRevision} → r${c.rightRevision}` : "版本对比",
197
197
  open: G,
198
- onCancel: () => R(!1),
198
+ onCancel: () => K(!1),
199
199
  footer: null,
200
200
  width: 720,
201
201
  children: /* @__PURE__ */ e(
@@ -217,5 +217,5 @@ function Ee() {
217
217
  ] });
218
218
  }
219
219
  export {
220
- Ee as default
220
+ Se as default
221
221
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),E=require("react-router-dom"),t=require("antd"),d=require("@ant-design/icons"),o=require("./api.cjs"),u=require("./EvidenceFormList-CQNgMNCG.cjs"),{TextArea:V}=t.Input;function G(){const[O]=E.useSearchParams(),$=E.useNavigate(),l=O.get("key")||"",[i,k]=n.useState(null),[f,B]=n.useState([]),[y,C]=n.useState([]),[R,I]=n.useState(!0),[v,w]=n.useState(""),[q,m]=n.useState(!1),[N,b]=n.useState(!1),[h]=t.Form.useForm(),[p,T]=n.useState(null),[x,S]=n.useState(null),[K,D]=n.useState(!1),[a,L]=n.useState(null),c=n.useCallback(async()=>{var s,r;if(l){I(!0),w("");try{const[j,_,g]=await Promise.all([o.cognitionApi.getTerm(l),o.cognitionApi.listTermEvidence(l),o.cognitionApi.listTermRevisions(l)]);k(j),B(_||[]),C(g||[]);const A=(s=(g||[])[0])==null?void 0:s.revisionNo,U=(r=(g||[])[1])==null?void 0:r.revisionNo;S(A??null),T(U??A??null)}catch(j){w(j.message)}finally{I(!1)}}},[l]);if(n.useEffect(()=>{c()},[c]),!l)return e.jsx(t.Alert,{type:"warning",showIcon:!0,message:"缺少 ?key= 参数"});const z=()=>{h.setFieldsValue({...i,aliases:i.aliases||[],evidences:u.toEvidenceFormValues(f)}),m(!0)},P=async()=>{const s=await h.validateFields();b(!0);try{await o.cognitionApi.updateTerm(l,{...s,termKey:l,actor:s.actor||"console",note:s.note||"console update"}),t.message.success("已生成新 revision"),m(!1),await c()}catch(r){t.message.error(r.field?`${r.field}: ${r.message}`:r.message)}finally{b(!1)}},M=async s=>{try{await o.cognitionApi.rollbackTerm(l,s,`console rollback to r${s}`),t.message.success(`已回滚到 r${s}(生成新 revision,历史不改写)`),await c()}catch(r){t.message.error(r.message)}},H=async()=>{if(p==null||x==null){t.message.warning("先选两个 revision");return}try{L(await o.cognitionApi.diffTerm(l,p,x)),D(!0)}catch(s){t.message.error(s.message)}},F=y.map(s=>({value:s.revisionNo,label:`r${s.revisionNo} · ${s.createdAt} · ${s.actor||"-"} · ${s.note||""}`}));return e.jsxs(t.Spin,{spinning:R,children:[e.jsxs(t.Space,{style:{marginBottom:16},wrap:!0,children:[e.jsx(t.Button,{icon:e.jsx(d.ArrowLeftOutlined,{}),onClick:()=>$("/cognition/terms"),children:"返回列表"}),e.jsx(t.Button,{icon:e.jsx(d.ReloadOutlined,{}),onClick:c,children:"刷新"}),e.jsx(t.Button,{type:"primary",icon:e.jsx(d.EditOutlined,{}),disabled:!i,onClick:z,children:"编辑(生成新版本)"}),e.jsx(t.Select,{style:{width:300},placeholder:"left",value:p,onChange:T,options:F}),e.jsx(t.Select,{style:{width:300},placeholder:"right",value:x,onChange:S,options:F}),e.jsx(t.Button,{icon:e.jsx(d.DiffOutlined,{}),onClick:H,children:"版本对比"})]}),v?e.jsx(t.Alert,{type:"error",showIcon:!0,message:v,style:{marginBottom:16}}):null,i?e.jsxs(e.Fragment,{children:[e.jsxs(t.Descriptions,{bordered:!0,size:"small",column:2,style:{marginBottom:16},children:[e.jsx(t.Descriptions.Item,{label:"termKey",children:e.jsx(t.Typography.Text,{code:!0,children:i.termKey})}),e.jsx(t.Descriptions.Item,{label:"规范名",children:i.canonical}),e.jsxs(t.Descriptions.Item,{label:"状态",children:[e.jsx(t.Tag,{color:u.STATUS_COLOR[i.status]||"blue",children:i.status}),i.supersededBy?e.jsxs("span",{children:["→ ",i.supersededBy]}):null]}),e.jsxs(t.Descriptions.Item,{label:"当前版本",children:["r",i.revisionNo]}),e.jsx(t.Descriptions.Item,{label:"域",children:i.domain||"—"}),e.jsx(t.Descriptions.Item,{label:"owner",children:i.owner||"—"}),e.jsx(t.Descriptions.Item,{label:"绑定概念",children:i.conceptKey||"—"}),e.jsx(t.Descriptions.Item,{label:"更新时间",children:i.updatedAt}),e.jsx(t.Descriptions.Item,{label:"别名",span:2,children:(i.aliases||[]).length?i.aliases.map(s=>e.jsx(t.Tag,{children:s},s)):"—"}),e.jsx(t.Descriptions.Item,{label:"定义",span:2,children:i.definition})]}),e.jsxs(t.Typography.Title,{level:5,children:["证据(当前版本 r",i.revisionNo,")"]}),e.jsx(t.Table,{rowKey:"id",size:"small",style:{marginBottom:24},dataSource:f,pagination:!1,columns:[{title:"类型",dataIndex:"evidenceType",width:140},{title:"refId",dataIndex:"refId"},{title:"snapshotHash",dataIndex:"snapshotHash",width:200},{title:"版本",dataIndex:"revisionNo",width:80,render:s=>`r${s}`},{title:"采集时间",dataIndex:"capturedAt",width:190}]}),e.jsx(t.Typography.Title,{level:5,children:"版本历史(回滚不改写历史,只追加新 revision)"}),e.jsx(t.Table,{rowKey:"revisionNo",size:"small",dataSource:y,pagination:!1,columns:[{title:"版本",dataIndex:"revisionNo",width:80,render:s=>`r${s}`},{title:"时间",dataIndex:"createdAt",width:190},{title:"操作人",dataIndex:"actor",width:140},{title:"说明",dataIndex:"note"},{title:"操作",width:120,render:(s,r)=>e.jsx(t.Popconfirm,{title:`回滚到 r${r.revisionNo}?`,description:"会以该版本内容生成一条新的 revision",onConfirm:()=>M(r.revisionNo),children:e.jsx(t.Button,{size:"small",icon:e.jsx(d.RollbackOutlined,{}),children:"回滚"})})}]})]}):null,e.jsx(t.Modal,{title:`编辑 ${l}`,open:q,onCancel:()=>m(!1),onOk:P,confirmLoading:N,width:820,destroyOnHidden:!0,children:e.jsxs(t.Form,{form:h,layout:"vertical",children:[e.jsxs(t.Space,{size:"large",wrap:!0,children:[e.jsx(t.Form.Item,{name:"canonical",label:"规范名",rules:[{required:!0,message:"必填"}],children:e.jsx(t.Input,{style:{width:240}})}),e.jsx(t.Form.Item,{name:"status",label:"状态",rules:[{required:!0}],children:e.jsx(t.Select,{style:{width:140},options:u.TERM_STATUSES.map(s=>({value:s,label:s}))})}),e.jsx(t.Form.Item,{name:"supersededBy",label:"替代项(DEPRECATED 必填)",children:e.jsx(t.Input,{style:{width:180}})}),e.jsx(t.Form.Item,{name:"domain",label:"域",children:e.jsx(t.Input,{style:{width:140}})}),e.jsx(t.Form.Item,{name:"owner",label:"owner",children:e.jsx(t.Input,{style:{width:140}})})]}),e.jsx(t.Form.Item,{name:"aliases",label:"别名",children:e.jsx(t.Select,{mode:"tags",tokenSeparators:[","]})}),e.jsx(t.Form.Item,{name:"conceptKey",label:"绑定概念",children:e.jsx(t.Input,{})}),e.jsx(t.Form.Item,{name:"definition",label:"定义",rules:[{required:!0,message:"必填"}],children:e.jsx(V,{rows:3})}),e.jsx(t.Form.Item,{name:"note",label:"变更说明",children:e.jsx(t.Input,{placeholder:"console update"})}),e.jsx(t.Form.Item,{label:"证据(至少一条;本次提交即本版本证据)",required:!0,children:e.jsx(u.EvidenceFormList,{})})]})}),e.jsx(t.Modal,{title:a?`${a.subjectKey}: r${a.leftRevision} → r${a.rightRevision}`:"版本对比",open:K,onCancel:()=>D(!1),footer:null,width:720,children:e.jsx(t.Table,{rowKey:s=>s.field,size:"small",pagination:!1,dataSource:a?a.changes:[],columns:[{title:"字段",dataIndex:"field",width:140},{title:"左",dataIndex:"left",render:s=>e.jsx(t.Typography.Text,{delete:s!=="",children:s??"—"})},{title:"右",dataIndex:"right",render:s=>e.jsx(t.Typography.Text,{strong:!0,children:s??"—"})}]})})]})}exports.default=G;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),E=require("react-router-dom"),t=require("antd"),d=require("@ant-design/icons"),o=require("./api.cjs"),u=require("./EvidenceFormList-CQNgMNCG.cjs"),{TextArea:V}=t.Input;function G(){const[$]=E.useSearchParams(),O=E.useNavigate(),l=$.get("key")||"",[i,k]=n.useState(null),[y,B]=n.useState([]),[f,C]=n.useState([]),[R,I]=n.useState(!0),[v,w]=n.useState(""),[q,m]=n.useState(!1),[N,b]=n.useState(!1),[h]=t.Form.useForm(),[p,T]=n.useState(null),[x,S]=n.useState(null),[K,D]=n.useState(!1),[a,L]=n.useState(null),c=n.useCallback(async()=>{var s,r;if(l){I(!0),w("");try{const[j,_,g]=await Promise.all([o.cognitionApi.getTerm(l),o.cognitionApi.listTermEvidence(l),o.cognitionApi.listTermRevisions(l)]);k(j),B(_||[]),C(g||[]);const A=(s=(g||[])[0])==null?void 0:s.revisionNo,U=(r=(g||[])[1])==null?void 0:r.revisionNo;S(A??null),T(U??A??null)}catch(j){w(j.message)}finally{I(!1)}}},[l]);if(n.useEffect(()=>{c()},[c]),!l)return e.jsx(t.Alert,{type:"warning",showIcon:!0,message:"缺少 ?key= 参数"});const z=()=>{h.setFieldsValue({...i,aliases:i.aliases||[],evidences:u.toEvidenceFormValues(y)}),m(!0)},P=async()=>{const s=await h.validateFields();b(!0);try{await o.cognitionApi.updateTerm(l,{...s,termKey:l,actor:s.actor||"console",note:s.note||"console update"}),t.message.success("已生成新 revision"),m(!1),await c()}catch(r){t.message.error(r.field?`${r.field}: ${r.message}`:r.message)}finally{b(!1)}},M=async s=>{try{await o.cognitionApi.rollbackTerm(l,s,`console rollback to r${s}`),t.message.success(`已回滚到 r${s}(生成新 revision,历史不改写)`),await c()}catch(r){t.message.error(r.message)}},H=async()=>{if(p==null||x==null){t.message.warning("先选两个 revision");return}try{L(await o.cognitionApi.diffTerm(l,p,x)),D(!0)}catch(s){t.message.error(s.message)}},F=f.map(s=>({value:s.revisionNo,label:`r${s.revisionNo} · ${s.createdAt} · ${s.actor||"-"} · ${s.note||""}`}));return e.jsxs(t.Spin,{spinning:R,children:[e.jsxs(t.Space,{style:{marginBottom:16},wrap:!0,children:[e.jsx(t.Button,{icon:e.jsx(d.ArrowLeftOutlined,{}),onClick:()=>O("/cognition/terms"),children:"返回列表"}),e.jsx(t.Button,{icon:e.jsx(d.ReloadOutlined,{}),onClick:c,children:"刷新"}),e.jsx(t.Button,{type:"primary",icon:e.jsx(d.EditOutlined,{}),disabled:!i,onClick:z,children:"编辑(生成新版本)"}),e.jsx(t.Select,{style:{width:300},placeholder:"left",value:p,onChange:T,options:F}),e.jsx(t.Select,{style:{width:300},placeholder:"right",value:x,onChange:S,options:F}),e.jsx(t.Button,{icon:e.jsx(d.DiffOutlined,{}),onClick:H,children:"版本对比"})]}),v?e.jsx(t.Alert,{type:"error",showIcon:!0,message:v,style:{marginBottom:16}}):null,i?e.jsxs(e.Fragment,{children:[e.jsxs(t.Descriptions,{bordered:!0,size:"small",column:2,style:{marginBottom:16},children:[e.jsx(t.Descriptions.Item,{label:"termKey",children:e.jsx(t.Typography.Text,{code:!0,children:i.termKey})}),e.jsx(t.Descriptions.Item,{label:"规范名",children:i.canonical}),e.jsxs(t.Descriptions.Item,{label:"状态",children:[e.jsx(t.Tag,{color:u.STATUS_COLOR[i.status]||"blue",children:i.status}),i.supersededBy?e.jsxs("span",{children:["→ ",i.supersededBy]}):null]}),e.jsxs(t.Descriptions.Item,{label:"当前版本",children:["r",i.revisionNo]}),e.jsx(t.Descriptions.Item,{label:"域",children:i.domain||"—"}),e.jsx(t.Descriptions.Item,{label:"owner",children:i.owner||"—"}),e.jsx(t.Descriptions.Item,{label:"绑定概念",children:i.conceptKey||"—"}),e.jsx(t.Descriptions.Item,{label:"更新时间",children:i.updatedAt}),e.jsx(t.Descriptions.Item,{label:"别名",span:2,children:(i.aliases||[]).length?i.aliases.map(s=>e.jsx(t.Tag,{children:s},s)):"—"}),e.jsx(t.Descriptions.Item,{label:"定义",span:2,children:i.definition})]}),e.jsxs(t.Typography.Title,{level:5,children:["证据(当前版本 r",i.revisionNo,")"]}),e.jsx(t.Table,{rowKey:"id",size:"small",style:{marginBottom:24},dataSource:y,pagination:!1,columns:[{title:"类型",dataIndex:"evidenceType",width:140},{title:"refId",dataIndex:"refId"},{title:"snapshotHash",dataIndex:"snapshotHash",width:200},{title:"版本",dataIndex:"revisionNo",width:80,render:s=>`r${s}`},{title:"采集时间",dataIndex:"capturedAt",width:190}]}),e.jsx(t.Typography.Title,{level:5,children:"版本历史(回滚不改写历史,只追加新 revision)"}),e.jsx(t.Table,{rowKey:"revisionNo",size:"small",dataSource:f,pagination:!1,columns:[{title:"版本",dataIndex:"revisionNo",width:80,render:s=>`r${s}`},{title:"时间",dataIndex:"createdAt",width:190},{title:"操作人",dataIndex:"actor",width:140},{title:"说明",dataIndex:"note"},{title:"操作",width:120,render:(s,r)=>e.jsx(t.Popconfirm,{title:`回滚到 r${r.revisionNo}?`,description:"会以该版本内容生成一条新的 revision",onConfirm:()=>M(r.revisionNo),children:e.jsx(t.Button,{type:"link",size:"small",children:"回滚"})})}]})]}):null,e.jsx(t.Modal,{title:`编辑 ${l}`,open:q,onCancel:()=>m(!1),onOk:P,confirmLoading:N,width:820,destroyOnHidden:!0,children:e.jsxs(t.Form,{form:h,layout:"vertical",children:[e.jsxs(t.Space,{size:"large",wrap:!0,children:[e.jsx(t.Form.Item,{name:"canonical",label:"规范名",rules:[{required:!0,message:"必填"}],children:e.jsx(t.Input,{style:{width:240}})}),e.jsx(t.Form.Item,{name:"status",label:"状态",rules:[{required:!0}],children:e.jsx(t.Select,{style:{width:140},options:u.TERM_STATUSES.map(s=>({value:s,label:s}))})}),e.jsx(t.Form.Item,{name:"supersededBy",label:"替代项(DEPRECATED 必填)",children:e.jsx(t.Input,{style:{width:180}})}),e.jsx(t.Form.Item,{name:"domain",label:"域",children:e.jsx(t.Input,{style:{width:140}})}),e.jsx(t.Form.Item,{name:"owner",label:"owner",children:e.jsx(t.Input,{style:{width:140}})})]}),e.jsx(t.Form.Item,{name:"aliases",label:"别名",children:e.jsx(t.Select,{mode:"tags",tokenSeparators:[","]})}),e.jsx(t.Form.Item,{name:"conceptKey",label:"绑定概念",children:e.jsx(t.Input,{})}),e.jsx(t.Form.Item,{name:"definition",label:"定义",rules:[{required:!0,message:"必填"}],children:e.jsx(V,{rows:3})}),e.jsx(t.Form.Item,{name:"note",label:"变更说明",children:e.jsx(t.Input,{placeholder:"console update"})}),e.jsx(t.Form.Item,{label:"证据(至少一条;本次提交即本版本证据)",required:!0,children:e.jsx(u.EvidenceFormList,{})})]})}),e.jsx(t.Modal,{title:a?`${a.subjectKey}: r${a.leftRevision} → r${a.rightRevision}`:"版本对比",open:K,onCancel:()=>D(!1),footer:null,width:720,children:e.jsx(t.Table,{rowKey:s=>s.field,size:"small",pagination:!1,dataSource:a?a.changes:[],columns:[{title:"字段",dataIndex:"field",width:140},{title:"左",dataIndex:"left",render:s=>e.jsx(t.Typography.Text,{delete:s!=="",children:s??"—"})},{title:"右",dataIndex:"right",render:s=>e.jsx(t.Typography.Text,{strong:!0,children:s??"—"})}]})})]})}exports.default=G;
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./api.cjs"),t=require("./EvidenceFormList-CQNgMNCG.cjs"),r=require("./TermsPage-CE3E3fG-.cjs"),T=require("./TermDetailPage-DQcYkPdm.cjs"),o=require("./ConceptsPage-BH4lEiVn.cjs"),E=require("./ResolvePage-BDb56PdI.cjs"),a=require("./ImpactPage-BMvZUgTJ.cjs"),i=require("./DocsPage-CmGTg0A3.cjs");exports.ApiError=e.ApiError;exports.TOKEN_KEY=e.TOKEN_KEY;exports.cognitionApi=e.cognitionApi;exports.getToken=e.getToken;exports.setToken=e.setToken;exports.CONCEPT_TYPES=t.CONCEPT_TYPES;exports.EVIDENCE_TYPES=t.EVIDENCE_TYPES;exports.KEY_PATTERN=t.KEY_PATTERN;exports.STATUS_COLOR=t.STATUS_COLOR;exports.TERM_STATUSES=t.TERM_STATUSES;exports.TermsPage=r.default;exports.TermDetailPage=T.default;exports.ConceptsPage=o.default;exports.ResolvePage=E.default;exports.ImpactPage=a.default;exports.DocsPage=i.default;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./api.cjs"),t=require("./EvidenceFormList-CQNgMNCG.cjs"),r=require("./TermsPage-CE3E3fG-.cjs"),T=require("./TermDetailPage-Dbl2_C80.cjs"),o=require("./ConceptsPage-DfloraCZ.cjs"),E=require("./ResolvePage-BDb56PdI.cjs"),a=require("./ImpactPage-BMvZUgTJ.cjs"),i=require("./DocsPage-CmGTg0A3.cjs");exports.ApiError=e.ApiError;exports.TOKEN_KEY=e.TOKEN_KEY;exports.cognitionApi=e.cognitionApi;exports.getToken=e.getToken;exports.setToken=e.setToken;exports.CONCEPT_TYPES=t.CONCEPT_TYPES;exports.EVIDENCE_TYPES=t.EVIDENCE_TYPES;exports.KEY_PATTERN=t.KEY_PATTERN;exports.STATUS_COLOR=t.STATUS_COLOR;exports.TERM_STATUSES=t.TERM_STATUSES;exports.TermsPage=r.default;exports.TermDetailPage=T.default;exports.ConceptsPage=o.default;exports.ResolvePage=E.default;exports.ImpactPage=a.default;exports.DocsPage=i.default;
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { ApiError as o, TOKEN_KEY as r, cognitionApi as t, getToken as s, setToken as T } from "./api.js";
2
2
  import { C as E, E as p, K as m, S as P, T as g } from "./EvidenceFormList-097ICr7D.js";
3
3
  import { default as x } from "./TermsPage-BJWfX1hw.js";
4
- import { default as d } from "./TermDetailPage-BiF5UVM5.js";
5
- import { default as C } from "./ConceptsPage-C8nsSzRc.js";
4
+ import { default as d } from "./TermDetailPage-CPPzVMdp.js";
5
+ import { default as C } from "./ConceptsPage-CLEcHolu.js";
6
6
  import { default as i } from "./ResolvePage-CmrRVFkA.js";
7
7
  import { default as A } from "./ImpactPage-BiajQqHA.js";
8
8
  import { default as K } from "./DocsPage-DNkkd9Sm.js";
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./use-g6-graph-B9K6IPJe.cjs"),h=1,m=3;function E(o){return Number.isFinite(o)?Math.min(m,Math.max(h,Math.round(o))):h}function _(o,t,c){return`${t}|${o}|${c}`}function d({roots:o,hops:t,direction:c,edges:u}){if(!o.length)return{tags:[],edgeKeys:[]};const e=new Set(o),T=E(t);let s=new Set(o);for(let n=0;n<T;n+=1){const i=new Set;if(u.forEach(r=>{if(!r.srcTag||!r.dstTag)return;const O=(c==="out"||c==="both")&&s.has(r.srcTag),f=(c==="in"||c==="both")&&s.has(r.dstTag);!O&&!f||(O&&!e.has(r.dstTag)&&(e.add(r.dstTag),i.add(r.dstTag)),f&&!e.has(r.srcTag)&&(e.add(r.srcTag),i.add(r.srcTag)))}),!i.size)break;s=i}const S=new Set;return u.forEach(n=>{!n.srcTag||!n.dstTag||e.has(n.srcTag)&&e.has(n.dstTag)&&S.add(_(n.edgeName,n.srcTag,n.dstTag))}),{tags:[...e].sort(),edgeKeys:[...S].sort()}}function g(o,t){const c=Math.min(t.x1,t.x2),u=Math.max(t.x1,t.x2),e=Math.min(t.y1,t.y2),T=Math.max(t.y1,t.y2);return Object.entries(o).filter(([,s])=>s.x>=c&&s.x<=u&&s.y>=e&&s.y<=T).map(([s])=>s).sort()}exports.GRAPH_BEHAVIORS=a.GRAPH_BEHAVIORS;exports.NODE_FILL=a.NODE_FILL;exports.NODE_STROKE=a.NODE_STROKE;exports.STATE_STYLES=a.STATE_STYLES;exports.UNCATEGORIZED_CAT_CODE=a.UNCATEGORIZED_CAT_CODE;exports.buildCategoryColorMap=a.buildCategoryColorMap;exports.computeForceLayout=a.computeForceLayout;exports.createLiveSimulation=a.createLiveSimulation;exports.toG6Data=a.toG6Data;exports.toInstanceG6Data=a.toInstanceG6Data;exports.useG6Graph=a.useG6Graph;exports.FOCUS_HOPS_MAX=m;exports.FOCUS_HOPS_MIN=h;exports.clampHops=E;exports.computeFocusNeighborhood=d;exports.edgeKeyOf=_;exports.nodesInRect=g;
@@ -0,0 +1,50 @@
1
+ import { G as b, N as M, a as _, S as l, U as p, b as N, c as C, d as G, t as w, e as A, u as D } from "./use-g6-graph-2-Pr4oTs.js";
2
+ const m = 1, S = 3;
3
+ function d(t) {
4
+ return Number.isFinite(t) ? Math.min(S, Math.max(m, Math.round(t))) : m;
5
+ }
6
+ function g(t, a, c) {
7
+ return `${a}|${t}|${c}`;
8
+ }
9
+ function x({ roots: t, hops: a, direction: c, edges: u }) {
10
+ if (!t.length)
11
+ return { tags: [], edgeKeys: [] };
12
+ const r = new Set(t), h = d(a);
13
+ let s = new Set(t);
14
+ for (let n = 0; n < h; n += 1) {
15
+ const f = /* @__PURE__ */ new Set();
16
+ if (u.forEach((o) => {
17
+ if (!o.srcTag || !o.dstTag) return;
18
+ const i = (c === "out" || c === "both") && s.has(o.srcTag), e = (c === "in" || c === "both") && s.has(o.dstTag);
19
+ !i && !e || (i && !r.has(o.dstTag) && (r.add(o.dstTag), f.add(o.dstTag)), e && !r.has(o.srcTag) && (r.add(o.srcTag), f.add(o.srcTag)));
20
+ }), !f.size) break;
21
+ s = f;
22
+ }
23
+ const T = /* @__PURE__ */ new Set();
24
+ return u.forEach((n) => {
25
+ !n.srcTag || !n.dstTag || r.has(n.srcTag) && r.has(n.dstTag) && T.add(g(n.edgeName, n.srcTag, n.dstTag));
26
+ }), { tags: [...r].sort(), edgeKeys: [...T].sort() };
27
+ }
28
+ function y(t, a) {
29
+ const c = Math.min(a.x1, a.x2), u = Math.max(a.x1, a.x2), r = Math.min(a.y1, a.y2), h = Math.max(a.y1, a.y2);
30
+ return Object.entries(t).filter(([, s]) => s.x >= c && s.x <= u && s.y >= r && s.y <= h).map(([s]) => s).sort();
31
+ }
32
+ export {
33
+ S as FOCUS_HOPS_MAX,
34
+ m as FOCUS_HOPS_MIN,
35
+ b as GRAPH_BEHAVIORS,
36
+ M as NODE_FILL,
37
+ _ as NODE_STROKE,
38
+ l as STATE_STYLES,
39
+ p as UNCATEGORIZED_CAT_CODE,
40
+ N as buildCategoryColorMap,
41
+ d as clampHops,
42
+ x as computeFocusNeighborhood,
43
+ C as computeForceLayout,
44
+ G as createLiveSimulation,
45
+ g as edgeKeyOf,
46
+ y as nodesInRect,
47
+ w as toG6Data,
48
+ A as toInstanceG6Data,
49
+ D as useG6Graph
50
+ };
package/dist/pages.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),e=require("react"),t=require("@ant-design/icons"),s=e.lazy(()=>Promise.resolve().then(()=>require("./TermsPage-CE3E3fG-.cjs"))),l=e.lazy(()=>Promise.resolve().then(()=>require("./TermDetailPage-DQcYkPdm.cjs"))),a=e.lazy(()=>Promise.resolve().then(()=>require("./ConceptsPage-BH4lEiVn.cjs"))),r=e.lazy(()=>Promise.resolve().then(()=>require("./ResolvePage-BDb56PdI.cjs"))),c=e.lazy(()=>Promise.resolve().then(()=>require("./ImpactPage-BMvZUgTJ.cjs"))),m=e.lazy(()=>Promise.resolve().then(()=>require("./DocsPage-CmGTg0A3.cjs"))),g=e.lazy(()=>Promise.resolve().then(()=>require("./OntologyListPage-ClYfQsCI.cjs"))),y=e.lazy(()=>Promise.resolve().then(()=>require("./OntologyDetailPage-BnrMC9RD.cjs"))),u=e.lazy(()=>Promise.resolve().then(()=>require("./OntologyNodesPage-B93kbY3c.cjs"))),d=e.lazy(()=>Promise.resolve().then(()=>require("./OntologyValidatePage-40ZvGGH4.cjs"))),p=e.lazy(()=>Promise.resolve().then(()=>require("./OntologyInferPage-FoVA-toR.cjs"))),h=e.lazy(()=>Promise.resolve().then(()=>require("./OntologyMaterializePage-CUPoItSa.cjs"))),P={title:"z-cognition 业务认知域",short:"z-cognition"},n=[{key:"/ontology/schemas",label:"本体列表",icon:o.jsx(t.ApartmentOutlined,{}),desc:"注册 / 查询 / 删除 schema"},{key:"/ontology/detail",label:"本体详情",icon:o.jsx(t.ReadOutlined,{}),desc:"类定义 / 属性 / 统计"},{key:"/ontology/nodes",label:"类与实例",icon:o.jsx(t.PartitionOutlined,{}),desc:"图侧节点浏览"},{key:"/ontology/validate",label:"校验",icon:o.jsx(t.CheckCircleOutlined,{}),desc:"来源 / 快照两套口径"},{key:"/ontology/infer",label:"推理",icon:o.jsx(t.ThunderboltOutlined,{}),desc:"隐含类型与陈述"},{key:"/ontology/materialize",label:"物化",icon:o.jsx(t.DatabaseOutlined,{}),desc:"落成图节点与边"}],i=[{key:"/cognition/terms",label:"术语",icon:o.jsx(t.TagsOutlined,{}),desc:"登记 / 版本 / 回滚"},{key:"/cognition/concepts",label:"概念",icon:o.jsx(t.PartitionOutlined,{}),desc:"六类概念与父子关系"},{key:"/cognition/resolve",label:"消歧",icon:o.jsx(t.SearchOutlined,{}),desc:"词 → 术语 + 证据"},{key:"/cognition/impact",label:"影响面",icon:o.jsx(t.BranchesOutlined,{}),desc:"改之前先看谁引用"},{key:"/cognition/docs",label:"说明",icon:o.jsx(t.ReadOutlined,{}),desc:"能力与 API 清单"}],v=[{title:"本体管理",icon:"🧩",items:n},{title:"业务认知",icon:"🧠",items:i}],O=[{path:"/cognition/terms",Component:s},{path:"/cognition/terms/detail",Component:l},{path:"/cognition/concepts",Component:a},{path:"/cognition/resolve",Component:r},{path:"/cognition/impact",Component:c},{path:"/cognition/docs",Component:m},{path:"/ontology/schemas",Component:g},{path:"/ontology/detail",Component:y},{path:"/ontology/nodes",Component:u},{path:"/ontology/validate",Component:d},{path:"/ontology/infer",Component:p},{path:"/ontology/materialize",Component:h}];exports.appMeta=P;exports.menuItems=i;exports.menuSections=v;exports.ontologyMenuItems=n;exports.routes=O;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),o=require("@ant-design/icons"),s=t.lazy(()=>Promise.resolve().then(()=>require("./TermsPage-CE3E3fG-.cjs"))),l=t.lazy(()=>Promise.resolve().then(()=>require("./TermDetailPage-Dbl2_C80.cjs"))),a=t.lazy(()=>Promise.resolve().then(()=>require("./ConceptsPage-DfloraCZ.cjs"))),r=t.lazy(()=>Promise.resolve().then(()=>require("./ResolvePage-BDb56PdI.cjs"))),c=t.lazy(()=>Promise.resolve().then(()=>require("./ImpactPage-BMvZUgTJ.cjs"))),m=t.lazy(()=>Promise.resolve().then(()=>require("./DocsPage-CmGTg0A3.cjs"))),g=t.lazy(()=>Promise.resolve().then(()=>require("./OntologyListPage-ClYfQsCI.cjs"))),y=t.lazy(()=>Promise.resolve().then(()=>require("./OntologyDetailPage-CEGX8Ykd.cjs"))),u=t.lazy(()=>Promise.resolve().then(()=>require("./OntologyNodesPage-Do8cnOwY.cjs"))),d=t.lazy(()=>Promise.resolve().then(()=>require("./OntologyValidatePage-Dqzp4hWg.cjs"))),p=t.lazy(()=>Promise.resolve().then(()=>require("./OntologyInferPage-Bzgd_iDk.cjs"))),h=t.lazy(()=>Promise.resolve().then(()=>require("./OntologyMaterializePage-CjrmDG7j.cjs"))),P={title:"z-cognition 业务认知域",short:"z-cognition"},n=[{key:"/ontology/schemas",label:"本体列表",icon:e.jsx(o.ApartmentOutlined,{}),desc:"注册 / 查询 / 删除 schema"},{key:"/ontology/detail",label:"本体详情",icon:e.jsx(o.ReadOutlined,{}),desc:"类定义 / 属性 / 统计"},{key:"/ontology/nodes",label:"类与实例",icon:e.jsx(o.PartitionOutlined,{}),desc:"图侧节点浏览"},{key:"/ontology/validate",label:"校验",icon:e.jsx(o.CheckCircleOutlined,{}),desc:"来源 / 快照两套口径"},{key:"/ontology/infer",label:"推理",icon:e.jsx(o.ThunderboltOutlined,{}),desc:"隐含类型与陈述"},{key:"/ontology/materialize",label:"物化",icon:e.jsx(o.DatabaseOutlined,{}),desc:"落成图节点与边"}],i=[{key:"/cognition/terms",label:"术语",icon:e.jsx(o.TagsOutlined,{}),desc:"登记 / 版本 / 回滚"},{key:"/cognition/concepts",label:"概念",icon:e.jsx(o.PartitionOutlined,{}),desc:"六类概念与父子关系"},{key:"/cognition/resolve",label:"消歧",icon:e.jsx(o.SearchOutlined,{}),desc:"词 → 术语 + 证据"},{key:"/cognition/impact",label:"影响面",icon:e.jsx(o.BranchesOutlined,{}),desc:"改之前先看谁引用"},{key:"/cognition/docs",label:"说明",icon:e.jsx(o.ReadOutlined,{}),desc:"能力与 API 清单"}],O=[{title:"本体管理",icon:e.jsx(o.ApartmentOutlined,{}),items:n},{title:"业务认知",icon:e.jsx(o.BulbOutlined,{}),items:i}],v=[{path:"/cognition/terms",Component:s},{path:"/cognition/terms/detail",Component:l},{path:"/cognition/concepts",Component:a},{path:"/cognition/resolve",Component:r},{path:"/cognition/impact",Component:c},{path:"/cognition/docs",Component:m},{path:"/ontology/schemas",Component:g},{path:"/ontology/detail",Component:y},{path:"/ontology/nodes",Component:u},{path:"/ontology/validate",Component:d},{path:"/ontology/infer",Component:p},{path:"/ontology/materialize",Component:h}];exports.appMeta=P;exports.menuItems=i;exports.menuSections=O;exports.ontologyMenuItems=n;exports.routes=v;
package/dist/pages.js CHANGED
@@ -1,40 +1,40 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { lazy as o } from "react";
3
- import { TagsOutlined as i, PartitionOutlined as e, SearchOutlined as c, BranchesOutlined as a, ReadOutlined as n, ApartmentOutlined as l, CheckCircleOutlined as s, ThunderboltOutlined as m, DatabaseOutlined as p } from "@ant-design/icons";
4
- const g = o(() => import("./TermsPage-BJWfX1hw.js")), r = o(() => import("./TermDetailPage-BiF5UVM5.js")), d = o(() => import("./ConceptsPage-C8nsSzRc.js")), y = o(() => import("./ResolvePage-CmrRVFkA.js")), h = o(() => import("./ImpactPage-BiajQqHA.js")), C = o(() => import("./DocsPage-DNkkd9Sm.js")), O = o(() => import("./OntologyListPage-DJnVZ_19.js")), u = o(() => import("./OntologyDetailPage-DIsWePGJ.js")), P = o(() => import("./OntologyNodesPage-C68cRXHu.js")), b = o(() => import("./OntologyValidatePage-WX4sAfzY.js")), k = o(() => import("./OntologyInferPage-BhHrVjSM.js")), f = o(() => import("./OntologyMaterializePage-DxxtArEt.js")), M = { title: "z-cognition 业务认知域", short: "z-cognition" }, z = [
5
- { key: "/ontology/schemas", label: "本体列表", icon: /* @__PURE__ */ t(l, {}), desc: "注册 / 查询 / 删除 schema" },
6
- { key: "/ontology/detail", label: "本体详情", icon: /* @__PURE__ */ t(n, {}), desc: "类定义 / 属性 / 统计" },
7
- { key: "/ontology/nodes", label: "类与实例", icon: /* @__PURE__ */ t(e, {}), desc: "图侧节点浏览" },
8
- { key: "/ontology/validate", label: "校验", icon: /* @__PURE__ */ t(s, {}), desc: "来源 / 快照两套口径" },
9
- { key: "/ontology/infer", label: "推理", icon: /* @__PURE__ */ t(m, {}), desc: "隐含类型与陈述" },
10
- { key: "/ontology/materialize", label: "物化", icon: /* @__PURE__ */ t(p, {}), desc: "落成图节点与边" }
11
- ], v = [
12
- { key: "/cognition/terms", label: "术语", icon: /* @__PURE__ */ t(i, {}), desc: "登记 / 版本 / 回滚" },
13
- { key: "/cognition/concepts", label: "概念", icon: /* @__PURE__ */ t(e, {}), desc: "六类概念与父子关系" },
14
- { key: "/cognition/resolve", label: "消歧", icon: /* @__PURE__ */ t(c, {}), desc: "词 → 术语 + 证据" },
15
- { key: "/cognition/impact", label: "影响面", icon: /* @__PURE__ */ t(a, {}), desc: "改之前先看谁引用" },
16
- { key: "/cognition/docs", label: "说明", icon: /* @__PURE__ */ t(n, {}), desc: "能力与 API 清单" }
17
- ], x = [
18
- { title: "本体管理", icon: "🧩", items: z },
19
- { title: "业务认知", icon: "🧠", items: v }
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { lazy as t } from "react";
3
+ import { TagsOutlined as c, PartitionOutlined as e, SearchOutlined as l, BranchesOutlined as a, ReadOutlined as n, ApartmentOutlined as i, BulbOutlined as s, CheckCircleOutlined as m, ThunderboltOutlined as p, DatabaseOutlined as g } from "@ant-design/icons";
4
+ const r = t(() => import("./TermsPage-BJWfX1hw.js")), d = t(() => import("./TermDetailPage-CPPzVMdp.js")), y = t(() => import("./ConceptsPage-CLEcHolu.js")), h = t(() => import("./ResolvePage-CmrRVFkA.js")), u = t(() => import("./ImpactPage-BiajQqHA.js")), O = t(() => import("./DocsPage-DNkkd9Sm.js")), C = t(() => import("./OntologyListPage-DJnVZ_19.js")), b = t(() => import("./OntologyDetailPage-BIZLIZ23.js")), P = t(() => import("./OntologyNodesPage-CiGsZLSG.js")), k = t(() => import("./OntologyValidatePage-WX4sAfzY.js")), f = t(() => import("./OntologyInferPage-BhHrVjSM.js")), z = t(() => import("./OntologyMaterializePage-DxxtArEt.js")), x = { title: "z-cognition 业务认知域", short: "z-cognition" }, v = [
5
+ { key: "/ontology/schemas", label: "本体列表", icon: /* @__PURE__ */ o(i, {}), desc: "注册 / 查询 / 删除 schema" },
6
+ { key: "/ontology/detail", label: "本体详情", icon: /* @__PURE__ */ o(n, {}), desc: "类定义 / 属性 / 统计" },
7
+ { key: "/ontology/nodes", label: "类与实例", icon: /* @__PURE__ */ o(e, {}), desc: "图侧节点浏览" },
8
+ { key: "/ontology/validate", label: "校验", icon: /* @__PURE__ */ o(m, {}), desc: "来源 / 快照两套口径" },
9
+ { key: "/ontology/infer", label: "推理", icon: /* @__PURE__ */ o(p, {}), desc: "隐含类型与陈述" },
10
+ { key: "/ontology/materialize", label: "物化", icon: /* @__PURE__ */ o(g, {}), desc: "落成图节点与边" }
11
+ ], I = [
12
+ { key: "/cognition/terms", label: "术语", icon: /* @__PURE__ */ o(c, {}), desc: "登记 / 版本 / 回滚" },
13
+ { key: "/cognition/concepts", label: "概念", icon: /* @__PURE__ */ o(e, {}), desc: "六类概念与父子关系" },
14
+ { key: "/cognition/resolve", label: "消歧", icon: /* @__PURE__ */ o(l, {}), desc: "词 → 术语 + 证据" },
15
+ { key: "/cognition/impact", label: "影响面", icon: /* @__PURE__ */ o(a, {}), desc: "改之前先看谁引用" },
16
+ { key: "/cognition/docs", label: "说明", icon: /* @__PURE__ */ o(n, {}), desc: "能力与 API 清单" }
20
17
  ], A = [
21
- { path: "/cognition/terms", Component: g },
22
- { path: "/cognition/terms/detail", Component: r },
23
- { path: "/cognition/concepts", Component: d },
24
- { path: "/cognition/resolve", Component: y },
25
- { path: "/cognition/impact", Component: h },
26
- { path: "/cognition/docs", Component: C },
27
- { path: "/ontology/schemas", Component: O },
28
- { path: "/ontology/detail", Component: u },
18
+ { title: "本体管理", icon: /* @__PURE__ */ o(i, {}), items: v },
19
+ { title: "业务认知", icon: /* @__PURE__ */ o(s, {}), items: I }
20
+ ], B = [
21
+ { path: "/cognition/terms", Component: r },
22
+ { path: "/cognition/terms/detail", Component: d },
23
+ { path: "/cognition/concepts", Component: y },
24
+ { path: "/cognition/resolve", Component: h },
25
+ { path: "/cognition/impact", Component: u },
26
+ { path: "/cognition/docs", Component: O },
27
+ { path: "/ontology/schemas", Component: C },
28
+ { path: "/ontology/detail", Component: b },
29
29
  { path: "/ontology/nodes", Component: P },
30
- { path: "/ontology/validate", Component: b },
31
- { path: "/ontology/infer", Component: k },
32
- { path: "/ontology/materialize", Component: f }
30
+ { path: "/ontology/validate", Component: k },
31
+ { path: "/ontology/infer", Component: f },
32
+ { path: "/ontology/materialize", Component: z }
33
33
  ];
34
34
  export {
35
- M as appMeta,
36
- v as menuItems,
37
- x as menuSections,
38
- z as ontologyMenuItems,
39
- A as routes
35
+ x as appMeta,
36
+ I as menuItems,
37
+ A as menuSections,
38
+ v as ontologyMenuItems,
39
+ B as routes
40
40
  };