@openbkn/workshop 0.2.3 → 0.3.0-rc.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.
Files changed (96) hide show
  1. package/README.md +1 -1
  2. package/dist/{ActionConfirm-ITBip2Ic.js → ActionConfirm-BX1dlrAM.js} +5 -5
  3. package/dist/{ActionFailure-CWifUJ2j.js → ActionFailure-xcSfKJYC.js} +2 -2
  4. package/dist/{AgentChat-C1uyzwuA.js → AgentChat-DHdX_6W7.js} +407 -383
  5. package/dist/AppListPage-DsUvFo6B.js +1549 -0
  6. package/dist/{AskDrawer-Bw1NM5v_.js → AskDrawer-j-CR4yXP.js} +4 -4
  7. package/dist/{ComputedView-_CaPjqhY.js → ComputedView-dWFlHngu.js} +1035 -1016
  8. package/dist/{ConclusionApply-CG5wSeVp.js → ConclusionApply-BAoZpxl-.js} +4 -4
  9. package/dist/{CypherEditor-DbLHQoJJ.js → CypherEditor-CZ5Z4SGH.js} +47 -47
  10. package/dist/{LandingList-BMPCXj6K.js → LandingList-BUO6-at_.js} +5 -5
  11. package/dist/{MenuUnfoldOutlined-BoARCVho.js → MenuUnfoldOutlined-DAeIeIap.js} +3 -3
  12. package/dist/{ModelTrial-DZjC0E8E.js → ModelTrial-C7XvLVY7.js} +4 -4
  13. package/dist/{PageRenderer-Debi-U0v.js → PageRenderer-CkmvW4aO.js} +21264 -20549
  14. package/dist/{ScenarioApply-BNFfjIwR.js → ScenarioApply-COdlyvrC.js} +6 -6
  15. package/dist/{SimulateForm-CEqqMjks.js → SimulateForm-B_9laTIl.js} +4 -4
  16. package/dist/{Subgraph-C0VjOnZf.js → Subgraph-CDY3wvCA.js} +3 -3
  17. package/dist/WorkshopLabPage-BtYnBpk4.js +12020 -0
  18. package/dist/{WorkshopRunPage-BlyM18id.js → WorkshopRunPage-DHMJ3b8k.js} +24 -24
  19. package/dist/{abnfDiagram-WEYOIA3C-wqYhe75a.js → abnfDiagram-WEYOIA3C-Blje2Kbf.js} +3 -3
  20. package/dist/{action-type-tool.service-CtCfESYq.js → action-type-tool.service-BN-W_Az_.js} +1 -1
  21. package/dist/{architectureDiagram-ZHVYKT53-BYJ2H7bS.js → architectureDiagram-ZHVYKT53-B_FkRXc3.js} +3 -3
  22. package/dist/{bkn-agent-execution.service-ogW6NIAz.js → bkn-agent-execution.service-CJalMVIc.js} +1 -1
  23. package/dist/{blockDiagram-RJAE7QA3-DZfrfHRw.js → blockDiagram-RJAE7QA3-CYJLthoI.js} +3 -3
  24. package/dist/{c4Diagram-XDPPPE54--S7sRxgd.js → c4Diagram-XDPPPE54-CmMaN3M4.js} +2 -2
  25. package/dist/{channel-Ca2_7Xkz.js → channel-Dp24Bgua.js} +1 -1
  26. package/dist/{chunk-2E7WHVMD-BMnl6-jy.js → chunk-2E7WHVMD-DrnpfYKB.js} +1 -1
  27. package/dist/{chunk-2Q5K7J3B-BNVTYluA.js → chunk-2Q5K7J3B-BXqKcHlQ.js} +1 -1
  28. package/dist/{chunk-4EMNKR2T-CKorQf5z.js → chunk-4EMNKR2T-DYgY_0_y.js} +1 -1
  29. package/dist/{chunk-55XCU76K-C4xutPQ4.js → chunk-55XCU76K-Bja7bE8g.js} +1 -1
  30. package/dist/{chunk-5VM5RSS4-BM5F2WnL.js → chunk-5VM5RSS4-CGTnbRRi.js} +1 -1
  31. package/dist/{chunk-JWPE2WC7-CSU5SIs8.js → chunk-JWPE2WC7-2AyjxdJR.js} +1 -1
  32. package/dist/{chunk-VQ5W62QI-Dtk59D_l.js → chunk-VQ5W62QI-B3PGCKOg.js} +1 -1
  33. package/dist/{chunk-XXDRQBXY-DzVLFl9c.js → chunk-XXDRQBXY-RrIsI-B5.js} +1 -1
  34. package/dist/{chunk-ZCHMQSOR-cdQdJeDJ.js → chunk-ZCHMQSOR-COJTBW1i.js} +2 -2
  35. package/dist/{classDiagram-v2-4MYWR3UA-CABAzYlW.js → classDiagram-v2-4MYWR3UA-DolLxH6t.js} +5 -5
  36. package/dist/{cose-bilkent-JH36ORCC-Ca8GJbqv.js → cose-bilkent-JH36ORCC-DMSYgFxc.js} +2 -2
  37. package/dist/customComponents-DasaZ6pq.js +1 -1
  38. package/dist/customComponents.en-US-CkabuCXg.js +1 -1
  39. package/dist/{customParseFormat-H00Ur3YB.js → customParseFormat-C9WAjjqH.js} +1 -1
  40. package/dist/{cynefinDiagram-WF24UDRP-iIy_O6OH.js → cynefinDiagram-WF24UDRP-DrksRWCn.js} +2 -2
  41. package/dist/{dagre-NK4GIZVX-lW5Hra0G.js → dagre-NK4GIZVX-CFRT2dAc.js} +2 -2
  42. package/dist/{dayjs.min-C8_4Wqpb.js → dayjs.min-CziT8yW9.js} +1 -1
  43. package/dist/{diagram-CBK3MWTC-l5LVSm6X.js → diagram-CBK3MWTC-DzZ_sQCl.js} +3 -3
  44. package/dist/{diagram-I5XIIV2D-ChpwB8Wz.js → diagram-I5XIIV2D-RYNBUOF4.js} +2 -2
  45. package/dist/{diagram-ODIL2UCW-DBavGl7R.js → diagram-ODIL2UCW-DqJETE9R.js} +3 -3
  46. package/dist/{diagram-PFBEJUXE-B3fNIQm9.js → diagram-PFBEJUXE-BekIE7hh.js} +2 -2
  47. package/dist/{diagram-RJA3I4VV-Dmj0Shdh.js → diagram-RJA3I4VV-DAIwlMxl.js} +2 -2
  48. package/dist/{diagram-TYUNFSNR-D98rsKpY.js → diagram-TYUNFSNR-CLJ0Ou9i.js} +6 -6
  49. package/dist/{ebnfDiagram-V4P3TTPT-Bxr2oP9U.js → ebnfDiagram-V4P3TTPT-CRs8ppfT.js} +3 -3
  50. package/dist/{elk-QONTBCTQ-CvFT6Pst.js → elk-QONTBCTQ-Bqoh6AYY.js} +5 -5
  51. package/dist/{erDiagram-KYQIGQAA-dgeEoLzk.js → erDiagram-KYQIGQAA-BSp8Z7uQ.js} +4 -4
  52. package/dist/{flowDiagram-IUGLLWBU-ChsJgBPn.js → flowDiagram-IUGLLWBU-WKILTCDc.js} +7 -7
  53. package/dist/{ganttDiagram-R7GPNTJY-C9WcR8Tf.js → ganttDiagram-R7GPNTJY-CaTn_Mmr.js} +4 -4
  54. package/dist/generateCypher-BE_4YCWB.js +1032 -0
  55. package/dist/{gitGraphDiagram-PDYL7XHY-CeZTDs7V.js → gitGraphDiagram-PDYL7XHY-DGPs-RF6.js} +3 -3
  56. package/dist/{infoDiagram-MVDRKAX5-CzfcVWVf.js → infoDiagram-MVDRKAX5-HIQg7U3R.js} +1 -1
  57. package/dist/{ishikawaDiagram-HPEHV2GE-BK4ExPHB.js → ishikawaDiagram-HPEHV2GE-C84x8n2j.js} +2 -2
  58. package/dist/{journeyDiagram-BOSHW7O7-DXJ-ihrY.js → journeyDiagram-BOSHW7O7-CvYDNxSY.js} +4 -4
  59. package/dist/{kanban-definition-FNSA4HC5-C9rAkIZN.js → kanban-definition-FNSA4HC5-B586ryFD.js} +2 -2
  60. package/dist/{mermaid.core-uROF3Ult.js → mermaid.core-3J01L12Z.js} +5803 -5740
  61. package/dist/{mindmap-definition-6OY57UG3-DC9FfvxT.js → mindmap-definition-6OY57UG3-Donc6BMy.js} +3 -3
  62. package/dist/{models-D5Mffixi.js → models-Rf3LB8wS.js} +1 -1
  63. package/dist/{object-metric-numeric-DIgqXqB5.js → object-metric-numeric-BcgaJ6EW.js} +1 -1
  64. package/dist/{object-metric.service-B3PtIPEA.js → object-metric.service-CKiaFYcp.js} +2 -2
  65. package/dist/{pegDiagram-ECIUJNBX-CUCvcOc0.js → pegDiagram-ECIUJNBX-CYVi7x6D.js} +3 -3
  66. package/dist/{pieDiagram-GNMPY74T-DprBId-p.js → pieDiagram-GNMPY74T-4iWKYTTS.js} +2 -2
  67. package/dist/{prompt-D9VtVs5i.js → prompt-BQzBLrua.js} +110 -100
  68. package/dist/{quadrantDiagram-D57K4MC3-CcvW9eIV.js → quadrantDiagram-D57K4MC3-Bm6Cyi1I.js} +1 -1
  69. package/dist/{railroadDiagram-Y72NRBL7-DH43paGB.js → railroadDiagram-Y72NRBL7-Du6iN-Jz.js} +3 -3
  70. package/dist/{requirementDiagram-EQYSW5RA-CBY8WT39.js → requirementDiagram-EQYSW5RA-BGxpuSlc.js} +3 -3
  71. package/dist/{sankeyDiagram-SY24JHO5-DD80tYLM.js → sankeyDiagram-SY24JHO5-CsHmu__D.js} +2 -2
  72. package/dist/{sequenceDiagram-BLEHNHQU-Bo9dDD6b.js → sequenceDiagram-BLEHNHQU-DBNi943L.js} +3 -3
  73. package/dist/{sizeCapture-INFHLROL-BQTwKEEH.js → sizeCapture-INFHLROL-CcGr2ilA.js} +1 -1
  74. package/dist/{stateDiagram-v2-A6IESKWZ-um_LWxkE.js → stateDiagram-v2-A6IESKWZ-C78tVzaF.js} +4 -4
  75. package/dist/{swimlanes-B3ENRKFQ-DyYkLRSQ.js → swimlanes-B3ENRKFQ-BROc4LGM.js} +3 -3
  76. package/dist/{swimlanesDiagram-AYQRV4AK-DlAG_Vwl.js → swimlanesDiagram-AYQRV4AK-C0RDY4m2.js} +3 -3
  77. package/dist/{text-BqSVQKS6.js → text-CzC6K33E.js} +7 -3
  78. package/dist/{text.en-US-BhAxy_LE.js → text.en-US-D8mxBP0p.js} +6 -2
  79. package/dist/{timeline-definition-JXYKGLGB-DVH8Jsv4.js → timeline-definition-JXYKGLGB-C6WGe4xl.js} +1 -1
  80. package/dist/toolMatchLines-DrXpUwcl.js +4675 -0
  81. package/dist/{useLabData-fKy_tVvS.js → useLabData-B-3UW8zF.js} +8007 -7251
  82. package/dist/{usecaseDiagram-WPOLBNNX-DvsgvjCb.js → usecaseDiagram-WPOLBNNX-yMP7SDIg.js} +3 -3
  83. package/dist/{vennDiagram-Q3Y3IDCW-BQcWfjtm.js → vennDiagram-Q3Y3IDCW-bZW2LzBB.js} +2 -2
  84. package/dist/{wardleyDiagram-IVAIDKWA-M_Wv4tRx.js → wardleyDiagram-IVAIDKWA-DBbog93x.js} +2 -2
  85. package/dist/{workshop-app-wZ37Phc-.js → workshop-app-ByYXbgcn.js} +5008 -4707
  86. package/dist/workshop-app.css +1 -1
  87. package/dist/workshop-app.js +1 -1
  88. package/dist/{xychartDiagram-4URNHDU4-DBviJ7Ux.js → xychartDiagram-4URNHDU4-CVLJNXOt.js} +1 -1
  89. package/dist-cli/workshop.js +182 -140
  90. package/package.json +1 -1
  91. package/skill/SKILL.en-US.md +5 -0
  92. package/skill/SKILL.md +3 -0
  93. package/dist/AppFormModal-ByNEloW-.js +0 -4282
  94. package/dist/AppListPage-D2NVBJs7.js +0 -1465
  95. package/dist/WorkshopLabPage-C7hssyUo.js +0 -11364
  96. package/dist/generateCypher-kvNYDLY4.js +0 -399
@@ -1,6 +1,6 @@
1
- import { g as ce } from "./chunk-XXDRQBXY-DzVLFl9c.js";
2
- import { s as le } from "./chunk-VQ5W62QI-Dtk59D_l.js";
3
- import { _ as h, l as I, r as he, t as de, O as ge, R as j, c as P, j as G, b1 as ue, a7 as pe, a8 as fe, a9 as me } from "./mermaid.core-uROF3Ult.js";
1
+ import { g as ce } from "./chunk-XXDRQBXY-RrIsI-B5.js";
2
+ import { s as le } from "./chunk-VQ5W62QI-B3PGCKOg.js";
3
+ import { _ as h, l as I, r as he, t as de, O as ge, R as j, c as P, j as G, b1 as ue, a7 as pe, a8 as fe, a9 as me } from "./mermaid.core-3J01L12Z.js";
4
4
  const _ = [];
5
5
  for (let t = 0; t < 256; ++t)
6
6
  _.push((t + 256).toString(16).slice(1));
@@ -1,4 +1,4 @@
1
- import { w as s } from "./workshop-app-wZ37Phc-.js";
1
+ import { w as s } from "./workshop-app-ByYXbgcn.js";
2
2
  const t = (o) => s().listLlmModels(o), a = (o) => s().chatModel(o);
3
3
  export {
4
4
  a as c,
@@ -1,4 +1,4 @@
1
- import { B as n, t as p, J as a } from "./workshop-app-wZ37Phc-.js";
1
+ import { B as n, t as p, J as a } from "./workshop-app-ByYXbgcn.js";
2
2
  const s = a(), m = /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/, y = new n("-9223372036854775808"), d = new n("9223372036854775807"), g = /* @__PURE__ */ new Set(["int64", "decimal", "duration"]);
3
3
  function c(t) {
4
4
  const e = t.trim();
@@ -1,5 +1,5 @@
1
- import { n as s, q as a, v as b } from "./workshop-app-wZ37Phc-.js";
2
- import { serializeObjectMetricBody as c } from "./object-metric-numeric-DIgqXqB5.js";
1
+ import { n as s, q as a, v as b } from "./workshop-app-ByYXbgcn.js";
2
+ import { serializeObjectMetricBody as c } from "./object-metric-numeric-BcgaJ6EW.js";
3
3
  function d(e) {
4
4
  if (e === "forward" || e === "outgoing") return "forward";
5
5
  if (e === "backward" || e === "incoming") return "backward";
@@ -1,6 +1,6 @@
1
- import { g as l, r as m, d as a } from "./chunk-2E7WHVMD-BMnl6-jy.js";
2
- import { p } from "./chunk-JWPE2WC7-CSU5SIs8.js";
3
- import { _ as t, l as o } from "./mermaid.core-uROF3Ult.js";
1
+ import { g as l, r as m, d as a } from "./chunk-2E7WHVMD-DrnpfYKB.js";
2
+ import { p } from "./chunk-JWPE2WC7-2AyjxdJR.js";
3
+ import { _ as t, l as o } from "./mermaid.core-3J01L12Z.js";
4
4
  import { M as u, d as c } from "./cynefin-EF2NZ3EQ-D7MVnMHu.js";
5
5
  var f = c().RailroadPeg.parser.LangiumParser, i = /* @__PURE__ */ t((e) => {
6
6
  const r = e.alternatives.map(d);
@@ -1,5 +1,5 @@
1
- import { p as tt } from "./chunk-JWPE2WC7-CSU5SIs8.js";
2
- import { g as et, s as at, a as rt, b as it, x as nt, v as ot, _ as l, l as E, c as st, Q as lt, T as ct, V as dt, W as I, d as gt, D as ht, X as pt, R as ft } from "./mermaid.core-uROF3Ult.js";
1
+ import { p as tt } from "./chunk-JWPE2WC7-2AyjxdJR.js";
2
+ import { g as et, s as at, a as rt, b as it, x as nt, v as ot, _ as l, l as E, c as st, Q as lt, T as ct, V as dt, W as I, d as gt, D as ht, X as pt, R as ft } from "./mermaid.core-3J01L12Z.js";
3
3
  import { p as ut } from "./cynefin-EF2NZ3EQ-D7MVnMHu.js";
4
4
  import { o as mt } from "./d3-scale-DA8IHmf0.js";
5
5
  var vt = ft.pie, R = {
@@ -1,14 +1,14 @@
1
- import { h as O, l as P, A as F, g as N, f as w } from "./PageRenderer-Debi-U0v.js";
2
- import { G as j, H as x, I as _, J as R, a as C, K as g, L as W, N as S, O as D, P as Y, Q as v, U as I, V as L, W as U } from "./useLabData-fKy_tVvS.js";
3
- import { x as k, y as G, L as H, P as J, C as q, z as M, D as z, A as X, F as B, W as Z } from "./workshop-app-wZ37Phc-.js";
1
+ import { h as _, l as P, A as F, g as w, f as N } from "./PageRenderer-CkmvW4aO.js";
2
+ import { G as j, H as x, I as O, J as R, a as C, K as g, L as W, N as S, O as k, P as D, Q as v, U as Y, V as I, W as L } from "./useLabData-B-3UW8zF.js";
3
+ import { x as U, y as G, L as H, P as J, C as q, z as M, D as z, A as X, F as B, W as Z } from "./workshop-app-ByYXbgcn.js";
4
4
  const m = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
5
5
  function $e(e) {
6
6
  return m(e) && e.scheduleModel !== void 0;
7
7
  }
8
- function K(e, t, n) {
9
- const i = (e.actionTypes ?? []).filter((o) => !n || n.has(o.objectType)).map((o) => {
10
- const l = (o.inputs ?? []).map((r) => r.label && r.label !== r.name ? `${r.name}(${r.label})` : r.name);
11
- return `- ${o.id}:${o.name},对象类 ${o.objectType},${o.kind}${l.length > 0 ? `;输入:${l.join("、")}` : ""}`;
8
+ function K(e, t, i) {
9
+ const n = (e.actionTypes ?? []).filter((o) => !i || i.has(o.objectType)).map((o) => {
10
+ const d = (o.inputs ?? []).map((r) => r.label && r.label !== r.name ? `${r.name}(${r.label})` : r.name);
11
+ return `- ${o.id}:${o.name},对象类 ${o.objectType},${o.kind}${d.length > 0 ? `;输入:${d.join("、")}` : ""}`;
12
12
  }), s = t.map(
13
13
  (o) => `- box "${o.box}"(${o.boxName}),tool "${o.tool}":${o.toolName}${o.description ? `;${o.description}` : ""}`
14
14
  );
@@ -27,14 +27,14 @@ scheduleModel 的结构(只填知识网络里确有依据的项;没把握的
27
27
  - action 只能用下面列出的、对应对象类上的行动类 id。create、modify 可写 params:{ 输入名: { from: "field", name: 属性名 } | { from: "const", value } }。行动的必填输入没有同名字段可取、而说明里写了通常取值(如「计划状态,新建通常为已排」)时,填 { from: "const", value: "已排" },不要留空。
28
28
 
29
29
  行动类(id:名称,对象类,种类):
30
- ${i.length > 0 ? i.join(`
30
+ ${n.length > 0 ? n.join(`
31
31
  `) : "(无)"}
32
32
 
33
33
  可用规则函数(只能从这里选,box、tool 原样照抄):
34
34
  ${s.length > 0 ? s.join(`
35
35
  `) : "(知识网络没有挂载带规则函数的工具箱)"}
36
36
 
37
- needs:知识网络缺对象类、属性、关系或行动,或没有合适的规则函数时,逐条写清楚要补什么,step 取 ${_.join("、")} 之一。needs 的 text 是给业务人员看的:对象类、属性、行动一律写显示名(如“预测单号”),不要写 id 或属性名(如 billno)。不要编造 id,也不要用别的对象、属性凑;规则函数没有合适的就不写进 rules,在 needs 里写“建议新建:XX 检查(读哪些对象、判断什么)”。
37
+ needs:知识网络缺对象类、属性、关系或行动,或没有合适的规则函数时,逐条写清楚要补什么,step 取 ${O.join("、")} 之一。needs 的 text 是给业务人员看的:对象类、属性、行动一律写显示名(如“预测单号”),不要写 id 或属性名(如 billno)。不要编造 id,也不要用别的对象、属性凑;规则函数没有合适的就不写进 rules,在 needs 里写“建议新建:XX 检查(读哪些对象、判断什么)”。
38
38
  当前 App Spec 已有 scheduleModel 时,输出修改后的完整 scheduleModel:用户没提到的答案原样保留。只改调度甘特的显示时,在 scheduleModel 里写 display:{ resource?: { title?, tick?, daysBefore?, daysAfter?, layers?: [{ color?, tone?, colorField?, popoverFields? }] }, demand?: 同 },layers 按甘特现有图层的顺序。
39
39
  请求与调度无关(例如加一张指标卡)时,照常输出 patch 或 spec,不要写 scheduleModel。`;
40
40
  }
@@ -47,54 +47,54 @@ function V(e) {
47
47
  ].filter((t) => typeof t == "string") : [];
48
48
  }
49
49
  const Q = /([`'"]?)\b([A-Za-z_][A-Za-z0-9_]*)\b\1/g;
50
- function E(e, t, n) {
51
- const i = /* @__PURE__ */ new Map(), s = (r, y) => {
52
- y && y !== r && !i.has(r) && i.set(r, y);
53
- }, o = V(n), l = [
50
+ function E(e, t, i) {
51
+ const n = /* @__PURE__ */ new Map(), s = (r, y) => {
52
+ y && y !== r && !n.has(r) && n.set(r, y);
53
+ }, o = V(i), d = [
54
54
  ...o.map((r) => t.objectTypes[r]).filter(Boolean),
55
55
  ...Object.values(t.objectTypes).filter((r) => !o.includes(r.id))
56
56
  ];
57
- for (const r of l) s(r.id, r.name);
57
+ for (const r of d) s(r.id, r.name);
58
58
  for (const r of t.actionTypes ?? []) s(r.id, r.name);
59
59
  for (const r of t.relations) s(r.id, r.name);
60
- for (const r of l) for (const y of r.properties) s(y.name, y.label);
60
+ for (const r of d) for (const y of r.properties) s(y.name, y.label);
61
61
  return e.replace(Q, (r, y, b) => {
62
- const $ = i.get(b);
62
+ const $ = n.get(b);
63
63
  return $ ? y ? `「${$}」` : $ : r;
64
64
  });
65
65
  }
66
- function ee(e, t, n) {
67
- return Array.isArray(e) ? e.flatMap((i) => {
68
- if (typeof i == "string")
69
- return i.trim() ? [{ text: E(i.trim(), t, n) }] : [];
70
- if (!m(i) || typeof i.text != "string" || !i.text.trim()) return [];
71
- const s = _.includes(i.step) ? i.step : void 0;
72
- return [{ ...s ? { step: s } : {}, text: E(i.text.trim(), t, n) }];
66
+ function ee(e, t, i) {
67
+ return Array.isArray(e) ? e.flatMap((n) => {
68
+ if (typeof n == "string")
69
+ return n.trim() ? [{ text: E(n.trim(), t, i) }] : [];
70
+ if (!m(n) || typeof n.text != "string" || !n.text.trim()) return [];
71
+ const s = O.includes(n.step) ? n.step : void 0;
72
+ return [{ ...s ? { step: s } : {}, text: E(n.text.trim(), t, i) }];
73
73
  }) : [];
74
74
  }
75
- function he(e, t, n, i) {
75
+ function he(e, t, i, n) {
76
76
  if (!m(e) || !m(e.scheduleModel))
77
77
  return { ok: !1, errors: ["scheduleModel 必须是对象"] };
78
78
  const s = e.scheduleModel, o = [];
79
79
  if (j.includes(s.result) || o.push(`scheduleModel.result 只能是 ${j.join("、")}`), !Array.isArray(s.tasks) || s.tasks.length === 0)
80
80
  return { ok: !1, errors: [...o, "scheduleModel.tasks 至少要有一类任务"] };
81
- const l = {
81
+ const d = {
82
82
  ...s,
83
83
  tasks: s.tasks.map((y) => m(y) ? { ...y } : y),
84
84
  resource: m(s.resource) ? s.resource : { objectType: "?", titleField: "?" }
85
85
  };
86
86
  if (o.push(
87
- ...x(l).filter(
87
+ ...x(d).filter(
88
88
  // Required where results go onto the tasks or into plan records: the wizard suggests them.
89
89
  (y) => !/ 必填$| 写入计划记录时必填$/.test(y)
90
90
  )
91
91
  ), o.length > 0) return { ok: !1, errors: o };
92
- if (o.push(...te(s, t, n, i)), o.length > 0) return { ok: !1, errors: o };
92
+ if (o.push(...te(s, t, i, n)), o.length > 0) return { ok: !1, errors: o };
93
93
  const r = s;
94
94
  return { ok: !0, proposal: { model: r, needs: ee(e.needs, t, r) } };
95
95
  }
96
- function te(e, t, n, i) {
97
- const s = [], o = "不在知识网络里:不要编造,缺的写进 needs", l = (a, c) => a === void 0 ? !1 : t.objectTypes[a] ? !0 : (s.push(`${c} 的对象类 ${a} ${o}`), !1), r = (a, c, p) => {
96
+ function te(e, t, i, n) {
97
+ const s = [], o = "不在知识网络里:不要编造,缺的写进 needs", d = (a, c) => a === void 0 ? !1 : t.objectTypes[a] ? !0 : (s.push(`${c} 的对象类 ${a} ${o}`), !1), r = (a, c, p) => {
98
98
  c === void 0 || c === "" || t.objectTypes[a]?.properties.some((u) => u.name === c) || s.push(`${p} 的属性 ${c} 不是 ${a} 的属性:只用知识网络一节列出的属性名`);
99
99
  }, y = (a, c, p) => {
100
100
  if (!c?.length) return a;
@@ -111,47 +111,47 @@ function te(e, t, n, i) {
111
111
  };
112
112
  e.tasks.forEach((a, c) => {
113
113
  const p = `scheduleModel.tasks[${c}]`;
114
- if (!l(a.objectType, p)) return;
114
+ if (!d(a.objectType, p)) return;
115
115
  const u = a.objectType;
116
- for (const d of ["assignField", "start", "end", "status", "groupField"])
117
- r(u, a[d], `${p}.${d}`);
118
- for (const d of a.titleFields ?? []) r(u, d, `${p}.titleFields`);
119
- for (const d of a.doneWhen ?? []) r(u, d.field, `${p}.doneWhen`);
120
- for (const d of ["target", "ready"]) {
121
- const h = a[d];
116
+ for (const l of ["assignField", "start", "end", "status", "groupField"])
117
+ r(u, a[l], `${p}.${l}`);
118
+ for (const l of a.titleFields ?? []) r(u, l, `${p}.titleFields`);
119
+ for (const l of a.doneWhen ?? []) r(u, l.field, `${p}.doneWhen`);
120
+ for (const l of ["target", "ready"]) {
121
+ const h = a[l];
122
122
  if (!h) continue;
123
- const T = y(u, h.path, `${p}.${d}`);
124
- T && r(T, h.field, `${p}.${d}`);
123
+ const T = y(u, h.path, `${p}.${l}`);
124
+ T && r(T, h.field, `${p}.${l}`);
125
125
  }
126
- for (const d of a.predecessors?.path ?? [])
127
- t.relations.some((h) => h.id === k(d).id) || s.push(`${p}.predecessors 的关系 ${d} ${o}`);
126
+ for (const l of a.predecessors?.path ?? [])
127
+ t.relations.some((h) => h.id === U(l).id) || s.push(`${p}.predecessors 的关系 ${l} ${o}`);
128
128
  b(u, a.modify?.action, `${p}.modify`);
129
- for (const d of a.rules ?? [])
130
- n.some((h) => h.box === d.tool.box && h.tool === d.tool.tool) || s.push(
131
- `${p}.rules 的规则函数 ${d.tool.box}/${d.tool.tool} 不在可用规则函数里:只能照抄列出的,没有合适的写进 needs`
129
+ for (const l of a.rules ?? [])
130
+ i.some((h) => h.box === l.tool.box && h.tool === l.tool.tool) || s.push(
131
+ `${p}.rules 的规则函数 ${l.tool.box}/${l.tool.tool} 不在可用规则函数里:只能照抄列出的,没有合适的写进 needs`
132
132
  );
133
133
  });
134
134
  const { resource: $ } = e;
135
- if ($ && l($.objectType, "scheduleModel.resource"))
135
+ if ($ && d($.objectType, "scheduleModel.resource"))
136
136
  for (const a of ["titleField", "parentField", "groupField", "capacityField"])
137
137
  r($.objectType, $[a], `scheduleModel.resource.${a}`);
138
138
  (e.calendars ?? []).forEach((a, c) => {
139
139
  const p = `scheduleModel.calendars[${c}]`;
140
- if (l(a.objectType, p))
140
+ if (d(a.objectType, p))
141
141
  for (const u of ["resourceField", "start", "end"]) r(a.objectType, a[u], `${p}.${u}`);
142
142
  });
143
143
  const f = e.record;
144
- if (f && l(f.objectType, "scheduleModel.record")) {
144
+ if (f && d(f.objectType, "scheduleModel.record")) {
145
145
  const a = "scheduleModel.record";
146
146
  for (const c of ["resourceField", "start", "end", "status", "daysField"])
147
147
  r(c === "daysField" ? e.tasks[0]?.objectType ?? "" : f.objectType, f[c], `${a}.${c}`);
148
148
  for (const c of f.match ?? []) {
149
149
  r(f.objectType, c.from, `${a}.match.from`), r(e.tasks[0]?.objectType ?? "", c.to, `${a}.match.to`);
150
150
  const p = [
151
- t.objectTypes[f.objectType]?.properties.find((d) => d.name === c.from)?.type,
152
- t.objectTypes[e.tasks[0]?.objectType ?? ""]?.properties.find((d) => d.name === c.to)?.type
151
+ t.objectTypes[f.objectType]?.properties.find((l) => l.name === c.from)?.type,
152
+ t.objectTypes[e.tasks[0]?.objectType ?? ""]?.properties.find((l) => l.name === c.to)?.type
153
153
  ];
154
- !i?.record?.match?.some((d) => d.from === c.from && d.to === c.to) && p.some((d) => d === "number" || d === "date") && s.push(
154
+ !n?.record?.match?.some((l) => l.from === c.from && l.to === c.to) && p.some((l) => l === "number" || l === "date") && s.push(
155
155
  `${a}.match 的 ${c.from} = ${c.to} 是数量或日期:计划与需求只按单号、编码这类编号字段对应(如预测单号 + 产品编码),不要用数量、日期、状态`
156
156
  );
157
157
  }
@@ -160,10 +160,10 @@ function te(e, t, n, i) {
160
160
  }
161
161
  return s;
162
162
  }
163
- const se = Object.entries(B).filter(([e]) => !Z.has(e)).map(([e, [t, n]]) => `${e} ${t}×${n}`).join("、"), oe = X.filter(
163
+ const se = Object.entries(B).filter(([e]) => !Z.has(e)).map(([e, [t, i]]) => `${e} ${t}×${i}`).join("、"), oe = X.filter(
164
164
  (e) => g[e].category === "scenario"
165
165
  ), re = `
166
- - 用户明确要求写、做、开发一个新组件(如“写一个风险矩阵组件”),或要的展示与交互上面的标准组件都做不到(如四象限气泡图、桑基图、日历热力图)时,不要用标准组件凑,也不要输出 spec 或 patch,只输出 {"component": {"explicit": 用户是否明确要求写新组件, "reason": "一句话:最接近的标准组件是哪个、差在哪"}},组件由另外的步骤去写。标准组件能做到的不要输出 component。`, ne = `## 页面写法
166
+ - 用户明确要求写、做、开发一个新组件(如“写一个风险矩阵组件”),或要的展示与交互上面的标准组件都做不到(如四象限气泡图、桑基图、日历热力图)时,不要用标准组件凑,也不要输出 spec 或 patch,只输出 {"component": {"explicit": 用户是否明确要求写新组件, "reason": "一句话:最接近的标准组件是哪个、差在哪"}},组件由另外的步骤去写。标准组件能做到的不要输出 component。`, ie = `## 页面写法
167
167
  1. 一页一个任务:页面标题写谁要做什么(如“今日缺料”“待回复采购单”),不写功能名。
168
168
  2. 首屏先说结论:页面开头放一个文字组件(text),一句话说清现在怎么样、先干什么,数字用 values 引用;下面最多 4 个关键数字,一个按紧急程度或日期排好的清单(告警、事件列表或表格),再加最多两张图。其余放到下一页或详情抽屉。
169
169
  3. 数字带一句说明:指标卡每项写 description,说明它的含义或该干什么;表格、告警、事件列表、图表也写一句 description。
@@ -176,27 +176,27 @@ const se = Object.entries(B).filter(([e]) => !Z.has(e)).map(([e, [t, n]]) => `${
176
176
  10. 空状态说清楚:没有数据时写明原因和下一步。
177
177
  11. 页面不超过 7 页:按“每天看”“偶尔用”“设置”分组。
178
178
  `;
179
- function be(e, t, n = [], {
180
- newComponents: i = !1,
179
+ function be(e, t, i = [], {
180
+ newComponents: n = !1,
181
181
  ...s
182
182
  } = {}) {
183
183
  return `你是 Workshop 应用构建助手,负责生成或修改业务应用的 App Spec(JSON)。页面只能用固定的布局类型和标准组件,业务差异全部写在数据源(含进度、计算列)、筛选(variables)和组件 config 里。
184
184
 
185
- ${ie(e, t, n, s)}
185
+ ${ne(e, t, i, s)}
186
186
 
187
187
  ## 输出
188
188
  只输出一个 JSON 对象,不要解释、不要 Markdown:
189
189
  - 小改动输出 {"patch": [...]},为 JSON Patch(op 为 add、remove、replace、move、test),路径相对 App Spec,例如 /pages/0/regions/grid/1/config/title;数组末尾追加用 "-"。改动或删除某个组件前,先用 test 核对下标指向的就是它,例如 {"op":"test","path":"/pages/0/regions/grid/1/id","value":"kpis"};删除同一数组里的几项时从后往前删。
190
- - 新建应用或大改输出 {"spec": 完整 App Spec}。${i ? re : ""}
190
+ - 新建应用或大改输出 {"spec": 完整 App Spec}。${n ? re : ""}
191
191
  用户没有要求改的部分保持不变;只用上面列出的组件、配置项、对象类、属性和关系。`;
192
192
  }
193
- function ie(e, t, n = [], {
194
- scenarios: i = !0,
193
+ function ne(e, t, i = [], {
194
+ scenarios: n = !0,
195
195
  ruleTools: s,
196
- scheduling: o = n.some((l) => l.type === "scheduleGantt")
196
+ scheduling: o = i.some((d) => d.type === "scheduleGantt")
197
197
  } = {}) {
198
- const l = s && o ? K(e, s, t) : "", r = Object.entries(H).map(([$, f]) => `- ${$}:区域 ${f.join("、")}`).join(`
199
- `), y = W(i).map(($) => {
198
+ const d = s && o ? K(e, s, t) : "", r = Object.entries(H).map(([$, f]) => `- ${$}:区域 ${f.join("、")}`).join(`
199
+ `), y = W(n).map(($) => {
200
200
  const f = g[$];
201
201
  return `### ${$}(${f.label})
202
202
  ${f.description}
@@ -204,10 +204,10 @@ config:
204
204
  ${S(f.descriptors)}`;
205
205
  }).join(`
206
206
 
207
- `), b = i ? "" : `
207
+ `), b = n ? "" : `
208
208
  方案推演需要企业版,当前环境不提供:不要加方案类组件(${oe.join("、")});用户要求方案推演时,只输出不含它们的 App Spec。`;
209
209
  return `## App Spec 结构
210
- { apiVersion: "${D}", app: { id, name }, dependencies: { knowledgeNetwork: { id: "${e.id}", name: "${e.name}" } }, sources, variables, eventTypes?, scheduleModel?, pages: [ { id, title, layout, regions, detail? } ], theme }
210
+ { apiVersion: "${k}", app: { id, name }, dependencies: { knowledgeNetwork: { id: "${e.id}", name: "${e.name}" } }, sources, variables, eventTypes?, scheduleModel?, pages: [ { id, title, layout, regions, detail? } ], theme }
211
211
  - 数据源、筛选和主题属于整个应用,所有页面共用,筛选的值在页面之间保留。
212
212
  - 每个页面有自己的 id、标题、布局、组件和详情抽屉;组件 id 在页面内唯一。
213
213
  - scheduleModel(可选)是调度模型的答案,页面上的调度甘特与它的数据源由它生成:patch 和 spec 里不要写、改或删 scheduleModel,系统会保留原值;要改调度的答案,按“调度模型”一节输出。
@@ -226,11 +226,21 @@ ${r}
226
226
  每项 { id, label, objectType, key, progress?, computed? }:objectType 为对象类 id;key 为标识对象的属性。
227
227
  子集 { id, label, objectType, key, from: { source, where?, filters? } }:另一个数据源的子集,组件的 source 可以选它。from.source 为来源数据源 id(不能再是子集,也不能是带参数的 Cypher 数据源);where 为对象须全部满足的条件,可读来源的属性、进度列和计算列,写法同计算列的条件;filters 为它跟随的筛选,写法同组件的 filters。objectType、key 必须与来源一致;progress、computed 沿用来源,不能自己写。同一个子集(如“执行中的订单”)要给多个组件用,或要按条件统计时,定义成子集。
228
228
  字段格式 formats(可选):{ 字段名: { unit?, decimals?, colors? } },所有组件显示这个字段时都沿用。unit 为数字的单位(如 件、万元),decimals 为小数位(0–6),colors 为着色规则列表 [{ when: 条件列表, tone }]:行满足条件时该字段显示为这个颜色(tone 同计算列的色调:neutral/info/success/warning/danger),条件可读本行任何字段,第一条成立的生效。子集沿用来源的格式。
229
- ${Y}
229
+ ${D}
230
230
  ${q}
231
231
 
232
+ ## 自动联动(页面的 linking)
233
+ 页面 linking 为 auto 时自动联动(新建的页面都是):点击任一组件(表格的行、指标卡、分段与下拉筛选、透视表的行、趋势图、地图、告警、搜索框、日期区间)就是整页共享的一个条件,其他组件自动跟随——同类对象按同一字段或同一批对象筛,另一类对象沿知识网络里两类对象之间最短的关系连接筛(3 跳以内;一样短的有几条时沿任一条关联到即保留);详情抽屉、关系子图、Agent 自动读取最近点中的对象。所以这样的页面不要写 variables 里的取值、日期区间、搜索、选中对象、对象集合筛选,也不要写组件的 writes、selection、filters;基准日期 asOf 照旧是 variables 里的一项。
234
+ 只在需要判断时写这几项:
235
+ - 组件的 follow: false(写在组件这一层,与 id、type 并列):总量参照、目标值、对比基准这类不该随点击变的组件。
236
+ - 组件的 click(同一层):select 只选中对象、不筛选页面,用于只看详情的明细表;none 点击不产生条件。不写为筛选页面。
237
+ - 表格的表头搜索 search、勾选 picks、快捷筛选 quickFilter 默认不开,要开时写 true。
238
+ - 应用的 linkPaths:[{ between: [对象类, 对象类], path: [关系 id…] }],只在自动选的最短连接含义不对时写(按关系的名称与说明判断,例如只想按“供应商可供的物料”联动):指定一条路径(最多 4 跳,两个方向都生效),path 为空表示不联动。没有把握时不写。
239
+ - 自动规则覆盖不了的联动(两组互不影响的联动、同时选中两个对象对比、带参数的 Cypher 数据源)仍按下一节写显式筛选;组件写入显式筛选时点击只写它,不再产生页面条件。
240
+ linking 不写或为 manual 时按下一节手动联动。修改已有页面时不要擅自改它的 linking。
241
+
232
242
  ## 筛选(variables)与联动
233
- 联动两头都是显式的:组件点击时把值写入一个筛选(组件 config 里的 writes 等配置项);其他组件在自己的 filters 里列出跟随哪些筛选、按自己的哪个字段比对。没列在 filters 里的筛选不影响它;filters 为空就不受任何筛选影响。筛选本身不绑数据源和字段,所以不同数据源的组件可以跟随同一个筛选(比如两类对象都有客户字段时,各按自己的客户字段跟随同一个“客户”筛选)。
243
+ 手动联动的页面两头都是显式的:组件点击时把值写入一个筛选(组件 config 里的 writes 等配置项);其他组件在自己的 filters 里列出跟随哪些筛选、按自己的哪个字段比对。没列在 filters 里的筛选不影响它;filters 为空就不受任何筛选影响。筛选本身不绑数据源和字段,所以不同数据源的组件可以跟随同一个筛选(比如两类对象都有客户字段时,各按自己的客户字段跟随同一个“客户”筛选)。
234
244
  每项 { name, label, kind, default? }:
235
245
  - asOf:基准日期,全页一个。不是筛选,不用写进 filters:有进度或计算列读了基准日期的数据源自动按它计算。
236
246
  - value:一个或几个取值,比如某个分类字段的值;组件写入时可以是几个值的列表,比如一张“未完成”指标卡写入 ["${M.active.value}","${M.overdue.value}"](进度状态的代码)。跟随写 { variable, field }。
@@ -263,42 +273,42 @@ ${y}
263
273
  ${v.description}
264
274
  config:
265
275
  ${S(v.descriptors)}
266
- ${ae(n, l !== "")}${l}
267
- ${ne}
276
+ ${ae(i, d !== "")}${d}
277
+ ${ie}
268
278
  ## 主题(theme)
269
279
  surface(可选)为组件外观:card 每个组件带底色和边框,plain 组件直接放在页面上、靠间距分开,不写为 card。新建应用写 plain;改已有应用时,用户没要求就保留原值。
270
- 颜色一律 #rrggbb;chartPalette 6–8 个颜色;colorText 与 colorBg、colorSurface 对比度不低于 ${I},colorTextMuted 与 colorSurface 不低于 ${L};mode 为 light 或 dark;fontSize 12–16;radius 0–16;shadow 为 none、subtle、strong;density 为 compact、comfortable。
280
+ 颜色一律 #rrggbb;chartPalette 6–8 个颜色;colorText 与 colorBg、colorSurface 对比度不低于 ${Y},colorTextMuted 与 colorSurface 不低于 ${I};mode 为 light 或 dark;fontSize 12–16;radius 0–16;shadow 为 none、subtle、strong;density 为 compact、comfortable。
271
281
  用户说的“强调色、主色”指 colorPrimary(chartPalette 第一个颜色通常与它一致);点名的颜色要在所选模板基础上改进去。主题模板:
272
- ${Object.values(w).map(($) => `- ${$.name}:${JSON.stringify($)}`).join(`
282
+ ${Object.values(N).map(($) => `- ${$.name}:${JSON.stringify($)}`).join(`
273
283
  `)}
274
284
 
275
- ${le(e, t)}${de(e, t)}`;
285
+ ${de(e, t)}${le(e, t)}`;
276
286
  }
277
287
  function ae(e, t = !1) {
278
288
  return e.length === 0 ? "" : `
279
289
  ## 组件说明
280
290
  以下组件附有说明,配置它们时以说明为准:先按“本体契约”把业务对象对应到组件的角色,再按“扩展点”接知识网络上的规则工具、逻辑属性或指标。说明中要求的对象类、属性、关系或工具在上面的知识网络里找不到时,不要用别的对象或计算列凑,也不要在配置里写业务规则,相应的可选项留空。${t ? "调度甘特按“调度模型”一节输出答案:规则函数只从那里列出的选,要补的内容写进 needs。其他组件里要填 { box, tool } 的配置项一律不写,不要编造工具箱或工具的 id,由构建者在配置面板中选择。" : "本提示不含执行工厂的工具清单:说明里提到的规则工具(如“齐套检查”)以及任何要填 { box, tool } 的配置项一律不写,不要编造工具箱或工具的 id,由构建者在配置面板中选择。说明里“问用户”“列出要补的内容”在这里不适用:只输出 App Spec。"}
281
291
 
282
- ${e.map((i) => `<guide type="${i.type}">
283
- ${i.text.trim()}
292
+ ${e.map((n) => `<guide type="${n.type}">
293
+ ${n.text.trim()}
284
294
  </guide>`).join(`
285
295
 
286
296
  `)}
287
297
  `;
288
298
  }
289
299
  function ce(e, t) {
290
- const n = JSON.stringify(e ?? "");
291
- return F.filter((i) => {
292
- const s = g[i]?.label;
293
- return n.includes(`"type":"${i}"`) || t.includes(i) || s !== void 0 && t.includes(s) || N(i).some((o) => t.toLowerCase().includes(o.toLowerCase()));
300
+ const i = JSON.stringify(e ?? "");
301
+ return F.filter((n) => {
302
+ const s = g[n]?.label;
303
+ return i.includes(`"type":"${n}"`) || t.includes(n) || s !== void 0 && t.includes(s) || w(n).some((o) => t.toLowerCase().includes(o.toLowerCase()));
294
304
  });
295
305
  }
296
- async function me(e, t, n = []) {
297
- const i = [.../* @__PURE__ */ new Set([...ce(e, t), ...n])].filter(
298
- O
306
+ async function me(e, t, i = []) {
307
+ const n = [.../* @__PURE__ */ new Set([...ce(e, t), ...i])].filter(
308
+ _
299
309
  );
300
310
  return (await Promise.all(
301
- i.map(async (o) => {
311
+ n.map(async (o) => {
302
312
  try {
303
313
  return { type: o, text: await P(o) };
304
314
  } catch {
@@ -307,43 +317,43 @@ async function me(e, t, n = []) {
307
317
  })
308
318
  )).filter((o) => o !== null);
309
319
  }
310
- function de(e, t) {
311
- const n = U(e, t);
312
- return n ? `
320
+ function le(e, t) {
321
+ const i = L(e, t);
322
+ return i ? `
313
323
 
314
324
  ## 对象指标
315
- ${n}` : "";
325
+ ${i}` : "";
316
326
  }
317
- function ge(e, t, n) {
327
+ function ge(e, t, i) {
318
328
  return e ? `当前 App Spec:
319
329
  ${JSON.stringify(e)}
320
330
 
321
- ${n ? `${n}
331
+ ${i ? `${i}
322
332
 
323
333
  ` : ""}用户要求:${t}` : `当前还没有应用内容,请新建一个完整的 App Spec(输出 {"spec": ...})。
324
334
 
325
335
  用户要求:${t}`;
326
336
  }
327
337
  const A = 30;
328
- function Te(e, t, n) {
329
- const i = /* @__PURE__ */ new Set(), s = JSON.stringify(t ?? "");
338
+ function Te(e, t, i) {
339
+ const n = /* @__PURE__ */ new Set(), s = JSON.stringify(t ?? "");
330
340
  for (const o of Object.values(e.objectTypes))
331
- (s.includes(`"${o.id}"`) || n.includes(o.name) || n.includes(o.id)) && i.add(o.id);
332
- if (i.size === 0) {
341
+ (s.includes(`"${o.id}"`) || i.includes(o.name) || i.includes(o.id)) && n.add(o.id);
342
+ if (n.size === 0) {
333
343
  const o = /* @__PURE__ */ new Map();
334
- for (const l of e.relations)
335
- for (const r of [l.source, l.target])
344
+ for (const d of e.relations)
345
+ for (const r of [d.source, d.target])
336
346
  o.set(r, (o.get(r) ?? 0) + 1);
337
- [...o].sort((l, r) => r[1] - l[1]).slice(0, 10).forEach(([l]) => i.add(l));
347
+ [...o].sort((d, r) => r[1] - d[1]).slice(0, 10).forEach(([d]) => n.add(d));
338
348
  }
339
- return i;
349
+ return n;
340
350
  }
341
- function le(e, t) {
342
- const n = Object.values(e.objectTypes), i = (s) => !t || n.length <= A || t.has(s);
351
+ function de(e, t) {
352
+ const i = Object.values(e.objectTypes), n = (s) => !t || i.length <= A || t.has(s);
343
353
  return `## 知识网络 ${e.name}(${e.id})
344
- 对象类(id:名称;业务说明;属性 名称:类型(显示名))${n.length > A && t ? ";网络较大,只列出与本次要求相关的对象类的属性,其余只列名称,需要时请用户点名" : ""}:
345
- ${n.map(
346
- (s) => `- ${s.id}:${s.name}${s.comment ? `;${s.comment}` : ""}${i(s.id) ? `;${s.properties.map((o) => `${o.name}:${o.type}(${o.label})`).join(",")}` : ""}`
354
+ 对象类(id:名称;业务说明;属性 名称:类型(显示名))${i.length > A && t ? ";网络较大,只列出与本次要求相关的对象类的属性,其余只列名称,需要时请用户点名" : ""}:
355
+ ${i.map(
356
+ (s) => `- ${s.id}:${s.name}${s.comment ? `;${s.comment}` : ""}${n(s.id) ? `;${s.properties.map((o) => `${o.name}:${o.type}(${o.label})`).join(",")}` : ""}`
347
357
  ).join(`
348
358
  `)}
349
359
  关系(id:名称,起点 → 终点;路径可以反向经过关系):
@@ -353,7 +363,7 @@ ${e.relations.map((s) => `- ${s.id}:${s.name},${s.source} → ${s.target}`).
353
363
  function pe(e) {
354
364
  if (!e.eventTypes) return "";
355
365
  const t = e.eventTypes.map(
356
- (n) => `- ${n.code}:${n.name},${n.source === "rule" ? "规则命中" : "用户登记"}${n.subject ? `,关于 ${n.subject}` : ""}`
366
+ (i) => `- ${i.code}:${i.name},${i.source === "rule" ? "规则命中" : "用户登记"}${i.subject ? `,关于 ${i.subject}` : ""}`
357
367
  );
358
368
  return `
359
369
  事件类型(编码:名称,来源,关于的对象类):
@@ -363,7 +373,7 @@ ${t.length > 0 ? t.join(`
363
373
  export {
364
374
  oe as S,
365
375
  ce as a,
366
- le as d,
376
+ de as d,
367
377
  Te as f,
368
378
  me as g,
369
379
  $e as i,
@@ -1,4 +1,4 @@
1
- import { s as Ae, g as ke, x as ae, v as Fe, a as Pe, b as ve, _ as o, c as zt, l as bt, k as Lt, d as Ce, D as Le, R as z, j as Ee, Y as De } from "./mermaid.core-uROF3Ult.js";
1
+ import { s as Ae, g as ke, x as ae, v as Fe, a as Pe, b as ve, _ as o, c as zt, l as bt, k as Lt, d as Ce, D as Le, R as z, j as Ee, Y as De } from "./mermaid.core-3J01L12Z.js";
2
2
  import { l as ie } from "./d3-scale-DA8IHmf0.js";
3
3
  var Et = (function() {
4
4
  var t = /* @__PURE__ */ o(function(Y, r, l, x) {
@@ -1,6 +1,6 @@
1
- import { g as o, r as l, d as t } from "./chunk-2E7WHVMD-BMnl6-jy.js";
2
- import { p as m } from "./chunk-JWPE2WC7-CSU5SIs8.js";
3
- import { _ as n, l as s } from "./mermaid.core-uROF3Ult.js";
1
+ import { g as o, r as l, d as t } from "./chunk-2E7WHVMD-DrnpfYKB.js";
2
+ import { p as m } from "./chunk-JWPE2WC7-2AyjxdJR.js";
3
+ import { _ as n, l as s } from "./mermaid.core-3J01L12Z.js";
4
4
  import { M as p, c as u } from "./cynefin-EF2NZ3EQ-D7MVnMHu.js";
5
5
  var d = u().Railroad.parser.LangiumParser, a = /* @__PURE__ */ n((e) => {
6
6
  switch (e.$type) {
@@ -1,6 +1,6 @@
1
- import { g as ze } from "./chunk-XXDRQBXY-DzVLFl9c.js";
2
- import { s as Xe } from "./chunk-VQ5W62QI-Dtk59D_l.js";
3
- import { _ as m, O as Be, b as Je, a as Ze, s as et, g as tt, v as st, x as it, c as Ne, l as qe, D as rt, F as nt, G as at, H as lt, M as ct, N as ot, r as ht, t as ut, u as ft } from "./mermaid.core-uROF3Ult.js";
1
+ import { g as ze } from "./chunk-XXDRQBXY-RrIsI-B5.js";
2
+ import { s as Xe } from "./chunk-VQ5W62QI-B3PGCKOg.js";
3
+ import { _ as m, O as Be, b as Je, a as Ze, s as et, g as tt, v as st, x as it, c as Ne, l as qe, D as rt, F as nt, G as at, H as lt, M as ct, N as ot, r as ht, t as ut, u as ft } from "./mermaid.core-3J01L12Z.js";
4
4
  var Ce = (function() {
5
5
  var e = /* @__PURE__ */ m(function($, i, n, o) {
6
6
  for (n = n || {}, o = $.length; o--; n[$[o]] = i) ;
@@ -1,5 +1,5 @@
1
- import { v as Ae, x as Se, s as Le, g as Ee, b as $e, a as Te, _ as u, c as le, E as Me, k as K, aa as Ne, D as Ce, m as Pe } from "./mermaid.core-uROF3Ult.js";
2
- import "./dayjs.min-C8_4Wqpb.js";
1
+ import { v as Ae, x as Se, s as Le, g as Ee, b as $e, a as Te, _ as u, c as le, E as Me, k as K, aa as Ne, D as Ce, m as Pe } from "./mermaid.core-3J01L12Z.js";
2
+ import "./dayjs.min-CziT8yW9.js";
3
3
  import { w as ue, x as W, y as Ie, z as Oe, o as De } from "./d3-scale-DA8IHmf0.js";
4
4
  function k(e) {
5
5
  for (var a = e.length / 6 | 0, d = new Array(a), r = 0; r < a; ) d[r] = "#" + e.slice(r * 6, ++r * 6);
@@ -1,6 +1,6 @@
1
- import { I as pr } from "./chunk-2Q5K7J3B-BNVTYluA.js";
2
- import { _ as f, q as Er, c as j, k as Ht, l as nt, p as Ue, d as ur, e as fr, m as N, b as He, s as _r, v as gr, a as xr, g as yr, x as Ir, y as Rr, J as Or, D as Lr, j as Ft, u as Q, a0 as tt, a1 as vt, V as Ge, a2 as br, O as zt, a3 as mr, a4 as Xe } from "./mermaid.core-uROF3Ult.js";
3
- import { a as Sr, g as le, b as pt, d as Ar, e as he, f as de } from "./chunk-55XCU76K-C4xutPQ4.js";
1
+ import { I as pr } from "./chunk-2Q5K7J3B-BXqKcHlQ.js";
2
+ import { _ as f, q as Er, c as j, k as Ht, l as nt, p as Ue, d as ur, e as fr, m as N, b as He, s as _r, v as gr, a as xr, g as yr, x as Ir, y as Rr, J as Or, D as Lr, j as Ft, u as Q, a0 as tt, a1 as vt, V as Ge, a2 as br, O as zt, a3 as mr, a4 as Xe } from "./mermaid.core-3J01L12Z.js";
3
+ import { a as Sr, g as le, b as pt, d as Ar, e as he, f as de } from "./chunk-55XCU76K-Bja7bE8g.js";
4
4
  var ne = (function() {
5
5
  var e = /* @__PURE__ */ f(function(_t, w, C, D) {
6
6
  for (C = C || {}, D = _t.length; D--; C[_t[D]] = w) ;
@@ -1,4 +1,4 @@
1
- import { _ as o } from "./mermaid.core-uROF3Ult.js";
1
+ import { _ as o } from "./mermaid.core-3J01L12Z.js";
2
2
  var c = 1;
3
3
  function i() {
4
4
  if (!(typeof globalThis > "u"))
@@ -1,7 +1,7 @@
1
- import { g as ie } from "./chunk-XXDRQBXY-DzVLFl9c.js";
2
- import { s as re } from "./chunk-VQ5W62QI-Dtk59D_l.js";
3
- import { _ as p, l as b, c as $, r as ae, t as ne, u as oe, a as le, b as ce, g as he, s as de, v as ue, x as fe, a6 as pe, m as U, D as Se, k as vt, B as ge, F as ye, G as me, H as Te, M as Ee } from "./mermaid.core-uROF3Ult.js";
4
- import { c as _e } from "./chunk-55XCU76K-C4xutPQ4.js";
1
+ import { g as ie } from "./chunk-XXDRQBXY-RrIsI-B5.js";
2
+ import { s as re } from "./chunk-VQ5W62QI-B3PGCKOg.js";
3
+ import { _ as p, l as b, c as $, r as ae, t as ne, u as oe, a as le, b as ce, g as he, s as de, v as ue, x as fe, a6 as pe, m as U, D as Se, k as vt, B as ge, F as ye, G as me, H as Te, M as Ee } from "./mermaid.core-3J01L12Z.js";
4
+ import { c as _e } from "./chunk-55XCU76K-Bja7bE8g.js";
5
5
  var At = (function() {
6
6
  var t = /* @__PURE__ */ p(function(V, o, f, n) {
7
7
  for (f = f || {}, n = V.length; n--; f[V[n]] = o) ;
@@ -1,6 +1,6 @@
1
- import { a as rr } from "./chunk-4EMNKR2T-CKorQf5z.js";
2
- import { c as ir } from "./chunk-ZCHMQSOR-cdQdJeDJ.js";
3
- import { _ as l, l as yn } from "./mermaid.core-uROF3Ult.js";
1
+ import { a as rr } from "./chunk-4EMNKR2T-DYgY_0_y.js";
2
+ import { c as ir } from "./chunk-ZCHMQSOR-COJTBW1i.js";
3
+ import { _ as l, l as yn } from "./mermaid.core-3J01L12Z.js";
4
4
  function To(t, { measure: e }) {
5
5
  const n = t.config?.swimlane?.lineHops;
6
6
  if (n === !1)
@@ -1,6 +1,6 @@
1
- import { c as e, s as r } from "./flowDiagram-IUGLLWBU-ChsJgBPn.js";
2
- import { _ as a } from "./mermaid.core-uROF3Ult.js";
3
- import "./dayjs.min-C8_4Wqpb.js";
1
+ import { c as e, s as r } from "./flowDiagram-IUGLLWBU-WKILTCDc.js";
2
+ import { _ as a } from "./mermaid.core-3J01L12Z.js";
3
+ import "./dayjs.min-CziT8yW9.js";
4
4
  var s = /* @__PURE__ */ a((t) => `${r(t)}
5
5
  .swimlane.cluster:not([data-color-id]) rect {
6
6
  stroke: ${t.clusterBorder} !important;
@@ -1,6 +1,6 @@
1
- const n = `# 文字(text)
1
+ const n = `# 文本(text)
2
2
 
3
- 一段文字,用来写页面开头的结论、分节标题和说明段落。正文里可以引用数字,数字跟着页面的筛选和基准日期变。
3
+ 一段文字,用来写页面开头的结论、分节标题和说明段落,在「基础」分类里。搭建时选中它就能在页面上直接编辑。正文里可以引用数字,数字跟着页面的筛选和基准日期变。
4
4
 
5
5
  ## 适用与不适用
6
6
 
@@ -21,6 +21,9 @@ const n = `# 文字(text)
21
21
  ## 组件内置的判断
22
22
 
23
23
  - 内容是 Markdown:标题、加粗、列表、链接。
24
+ - 搭建时选中文本即可在页面上直接输入;选中条上有标题、加粗、斜体、项目符号列表、编号列表和对齐按钮。离开文本时按 Markdown 保存。粘贴只保留文字。
25
+ - 含表格、图片、任务列表、代码或 HTML 的文本不能在页面上直接编辑,要在配置里改 Markdown。
26
+ - 对齐(\`align\`):左对齐(默认)、居中、右对齐,对整段文字生效。
24
27
  - \`{引用名}\` 换成对应的数字,\`{$asOf}\` 换成基准日期;数字还没读到或读不到时显示「—」。
25
28
  - 数字的统计写法和指标卡的一项相同:计数、求和、平均、最大最小、去重计数、占比,可只算满足条件的对象,也可以取知识网络的对象指标。
26
29
  - 数字没设小数位时,整数不带小数,其他最多两位;占比显示为百分比、一位小数。
@@ -71,7 +74,8 @@ const n = `# 文字(text)
71
74
  ## 限制
72
75
 
73
76
  - 只统计已读入的数据;对象类数据源最多读 5000 行,Cypher 数据源最多 10000 行(查询没写 LIMIT 时 1000 行)。对象指标由平台按全部对象计算,不受这个限制。
74
- - 只支持 Markdown 本身的排版,不支持字体颜色、对齐这类设置。
77
+ - 只支持 Markdown 本身的排版和整段对齐,不支持字体颜色、字号这类设置。
78
+ - 在页面上直接编辑时,正文里显示 \`{引用名}\` 本身,不显示数字;离开文本后显示数字。
75
79
  `;
76
80
  export {
77
81
  n as default