@openbkn/workshop 0.3.0-rc.1 → 0.3.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ActionConfirm-BX1dlrAM.js → ActionConfirm-G-F1ZPqU.js} +5 -5
- package/dist/{ActionFailure-xcSfKJYC.js → ActionFailure-PXLm8Yrm.js} +2 -2
- package/dist/{AgentChat-DHdX_6W7.js → AgentChat-D2h4hYuv.js} +25 -25
- package/dist/{AppListPage-DsUvFo6B.js → AppListPage-CjAyblsr.js} +4 -4
- package/dist/{AskDrawer-j-CR4yXP.js → AskDrawer-BOZHK2uD.js} +4 -4
- package/dist/{ComputedView-dWFlHngu.js → ComputedView-CFB6TLqD.js} +27 -27
- package/dist/{ConclusionApply-BAoZpxl-.js → ConclusionApply-QzEgCkEr.js} +4 -4
- package/dist/{CypherEditor-CZ5Z4SGH.js → CypherEditor-ChbgNwGj.js} +5 -5
- package/dist/{LandingList-BUO6-at_.js → LandingList-D4rN2C_h.js} +5 -5
- package/dist/{MenuUnfoldOutlined-DAeIeIap.js → MenuUnfoldOutlined-9J7j6Kim.js} +1 -1
- package/dist/{ModelTrial-C7XvLVY7.js → ModelTrial-DWE5fBa4.js} +4 -4
- package/dist/{PageRenderer-CkmvW4aO.js → PageRenderer-BYBHi5At.js} +12737 -12687
- package/dist/{ScenarioApply-COdlyvrC.js → ScenarioApply-Ck68QOWM.js} +25 -25
- package/dist/{SimulateForm-B_9laTIl.js → SimulateForm-QwSu0BWO.js} +4 -4
- package/dist/{Subgraph-CDY3wvCA.js → Subgraph-CMIts4-k.js} +3 -3
- package/dist/{WorkshopLabPage-BtYnBpk4.js → WorkshopLabPage-N-CVblXc.js} +4930 -4619
- package/dist/{WorkshopRunPage-DHMJ3b8k.js → WorkshopRunPage-LtG2nDNS.js} +6 -6
- package/dist/{abnfDiagram-WEYOIA3C-Blje2Kbf.js → abnfDiagram-WEYOIA3C-CEkD2Kbr.js} +3 -3
- package/dist/{action-type-tool.service-BN-W_Az_.js → action-type-tool.service-DfyMNDaF.js} +1 -1
- package/dist/{architectureDiagram-ZHVYKT53-B_FkRXc3.js → architectureDiagram-ZHVYKT53-ypBqmKJn.js} +3 -3
- package/dist/{bkn-agent-execution.service-CJalMVIc.js → bkn-agent-execution.service-DpOKT3iR.js} +1 -1
- package/dist/{blockDiagram-RJAE7QA3-CYJLthoI.js → blockDiagram-RJAE7QA3-BQiz7ppY.js} +3 -3
- package/dist/{c4Diagram-XDPPPE54-CmMaN3M4.js → c4Diagram-XDPPPE54-DoQEicnh.js} +2 -2
- package/dist/{channel-Dp24Bgua.js → channel-CLsZYFb3.js} +1 -1
- package/dist/{chunk-2E7WHVMD-DrnpfYKB.js → chunk-2E7WHVMD-C7KAk7Aw.js} +1 -1
- package/dist/{chunk-2Q5K7J3B-BXqKcHlQ.js → chunk-2Q5K7J3B-DJjZ1fjz.js} +1 -1
- package/dist/{chunk-4EMNKR2T-DYgY_0_y.js → chunk-4EMNKR2T-Da2DlW9r.js} +1 -1
- package/dist/{chunk-55XCU76K-Bja7bE8g.js → chunk-55XCU76K-Dke6HW5r.js} +1 -1
- package/dist/{chunk-5VM5RSS4-CGTnbRRi.js → chunk-5VM5RSS4-CfxCWhgL.js} +1 -1
- package/dist/{chunk-JWPE2WC7-2AyjxdJR.js → chunk-JWPE2WC7-BvFVx2S8.js} +1 -1
- package/dist/{chunk-VQ5W62QI-B3PGCKOg.js → chunk-VQ5W62QI-BKtRw0gX.js} +1 -1
- package/dist/{chunk-XXDRQBXY-RrIsI-B5.js → chunk-XXDRQBXY-BFdjgXiI.js} +1 -1
- package/dist/{chunk-ZCHMQSOR-COJTBW1i.js → chunk-ZCHMQSOR-BV9eKUlK.js} +2 -2
- package/dist/{classDiagram-v2-4MYWR3UA-DolLxH6t.js → classDiagram-v2-4MYWR3UA-CrCmRIma.js} +5 -5
- package/dist/{cose-bilkent-JH36ORCC-DMSYgFxc.js → cose-bilkent-JH36ORCC-BLuhBHgL.js} +2 -2
- package/dist/{customParseFormat-C9WAjjqH.js → customParseFormat-LvPG_yWc.js} +1 -1
- package/dist/{cynefinDiagram-WF24UDRP-DrksRWCn.js → cynefinDiagram-WF24UDRP-Dkdu7UWf.js} +2 -2
- package/dist/{dagre-NK4GIZVX-CFRT2dAc.js → dagre-NK4GIZVX-wQ94w-j-.js} +2 -2
- package/dist/{dayjs.min-CziT8yW9.js → dayjs.min-C7Hp2iGA.js} +1 -1
- package/dist/{diagram-CBK3MWTC-DzZ_sQCl.js → diagram-CBK3MWTC-DFfVlq-I.js} +3 -3
- package/dist/{diagram-I5XIIV2D-RYNBUOF4.js → diagram-I5XIIV2D-kg2lU_ud.js} +2 -2
- package/dist/{diagram-ODIL2UCW-DqJETE9R.js → diagram-ODIL2UCW-Cq22spS8.js} +3 -3
- package/dist/{diagram-PFBEJUXE-BekIE7hh.js → diagram-PFBEJUXE-6v743_6i.js} +2 -2
- package/dist/{diagram-RJA3I4VV-DAIwlMxl.js → diagram-RJA3I4VV-CfpzBZG7.js} +2 -2
- package/dist/{diagram-TYUNFSNR-CLJ0Ou9i.js → diagram-TYUNFSNR-DWcS3i5W.js} +6 -6
- package/dist/{ebnfDiagram-V4P3TTPT-CRs8ppfT.js → ebnfDiagram-V4P3TTPT-CDdo-DHX.js} +3 -3
- package/dist/{elk-QONTBCTQ-Bqoh6AYY.js → elk-QONTBCTQ-tURRkPjL.js} +5 -5
- package/dist/{erDiagram-KYQIGQAA-BSp8Z7uQ.js → erDiagram-KYQIGQAA-DOUye_XT.js} +4 -4
- package/dist/{flowDiagram-IUGLLWBU-WKILTCDc.js → flowDiagram-IUGLLWBU-DSva8jfA.js} +7 -7
- package/dist/{ganttDiagram-R7GPNTJY-CaTn_Mmr.js → ganttDiagram-R7GPNTJY-yY38MCsA.js} +4 -4
- package/dist/generateCypher-Cv-1H1ju.js +1088 -0
- package/dist/{gitGraphDiagram-PDYL7XHY-DGPs-RF6.js → gitGraphDiagram-PDYL7XHY-Cib4RIM7.js} +3 -3
- package/dist/{infoDiagram-MVDRKAX5-HIQg7U3R.js → infoDiagram-MVDRKAX5-C95Rlu7T.js} +1 -1
- package/dist/{ishikawaDiagram-HPEHV2GE-C84x8n2j.js → ishikawaDiagram-HPEHV2GE-BAJtxdug.js} +2 -2
- package/dist/{journeyDiagram-BOSHW7O7-CvYDNxSY.js → journeyDiagram-BOSHW7O7-D0_UFC4-.js} +4 -4
- package/dist/{kanban-definition-FNSA4HC5-B586ryFD.js → kanban-definition-FNSA4HC5-DVGJd60c.js} +2 -2
- package/dist/{mermaid.core-3J01L12Z.js → mermaid.core-CaigvKK3.js} +43 -43
- package/dist/{mindmap-definition-6OY57UG3-Donc6BMy.js → mindmap-definition-6OY57UG3-Cc9NVGcT.js} +3 -3
- package/dist/{models-Rf3LB8wS.js → models-9HukOADg.js} +1 -1
- package/dist/{object-metric-numeric-BcgaJ6EW.js → object-metric-numeric-DpQoy02c.js} +1 -1
- package/dist/{object-metric.service-CKiaFYcp.js → object-metric.service-Bs69yRkm.js} +2 -2
- package/dist/{pegDiagram-ECIUJNBX-CYVi7x6D.js → pegDiagram-ECIUJNBX-DAnSZciK.js} +3 -3
- package/dist/{pieDiagram-GNMPY74T-4iWKYTTS.js → pieDiagram-GNMPY74T-CPRmYgcD.js} +2 -2
- package/dist/{prompt-BQzBLrua.js → prompt-CdE-v-Ut.js} +124 -113
- package/dist/{quadrantDiagram-D57K4MC3-Bm6Cyi1I.js → quadrantDiagram-D57K4MC3--PBqyWig.js} +1 -1
- package/dist/{railroadDiagram-Y72NRBL7-Du6iN-Jz.js → railroadDiagram-Y72NRBL7-v4wxw4pH.js} +3 -3
- package/dist/{requirementDiagram-EQYSW5RA-BGxpuSlc.js → requirementDiagram-EQYSW5RA-CXUiIggI.js} +3 -3
- package/dist/{sankeyDiagram-SY24JHO5-CsHmu__D.js → sankeyDiagram-SY24JHO5-CXWMlyCF.js} +2 -2
- package/dist/{sequenceDiagram-BLEHNHQU-DBNi943L.js → sequenceDiagram-BLEHNHQU-BBOTQGfc.js} +3 -3
- package/dist/{sizeCapture-INFHLROL-CcGr2ilA.js → sizeCapture-INFHLROL-CoWTXUCl.js} +1 -1
- package/dist/{stateDiagram-v2-A6IESKWZ-C78tVzaF.js → stateDiagram-v2-A6IESKWZ-f2F4pX57.js} +4 -4
- package/dist/{swimlanes-B3ENRKFQ-BROc4LGM.js → swimlanes-B3ENRKFQ-Cpfk8ZRY.js} +3 -3
- package/dist/{swimlanesDiagram-AYQRV4AK-C0RDY4m2.js → swimlanesDiagram-AYQRV4AK-hM77bzoI.js} +3 -3
- package/dist/{timeline-definition-JXYKGLGB-C6WGe4xl.js → timeline-definition-JXYKGLGB-BR5tHWmO.js} +1 -1
- package/dist/{toolMatchLines-DrXpUwcl.js → toolMatchLines-CvXMA8LD.js} +2 -2
- package/dist/{useLabData-B-3UW8zF.js → useLabData-OIsblj-7.js} +3220 -3200
- package/dist/{usecaseDiagram-WPOLBNNX-yMP7SDIg.js → usecaseDiagram-WPOLBNNX-DKhBwmOs.js} +3 -3
- package/dist/{vennDiagram-Q3Y3IDCW-bZW2LzBB.js → vennDiagram-Q3Y3IDCW-BnwNAM2m.js} +2 -2
- package/dist/{wardleyDiagram-IVAIDKWA-DBbog93x.js → wardleyDiagram-IVAIDKWA-BAl9UccR.js} +2 -2
- package/dist/{workshop-app-ByYXbgcn.js → workshop-app-7WTuNuCp.js} +7521 -7419
- package/dist/workshop-app.css +1 -1
- package/dist/workshop-app.js +2 -2
- package/dist/{xychartDiagram-4URNHDU4-CVLJNXOt.js → xychartDiagram-4URNHDU4-DAUWzPOU.js} +1 -1
- package/dist-cli/workshop.js +179 -169
- package/package.json +1 -1
- package/skill/SKILL.en-US.md +1 -1
- package/skill/SKILL.md +1 -1
- package/dist/generateCypher-BE_4YCWB.js +0 -1032
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { h as
|
|
2
|
-
import { G as j, H as
|
|
3
|
-
import { x as
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
return
|
|
1
|
+
import { h as P, l as F, A as w, g as N, f as x } from "./PageRenderer-BYBHi5At.js";
|
|
2
|
+
import { G as j, H as R, I as A, J as I, a as C, K as g, L as k, N as S, O as D, P as W, Q as v, U as Y, V as L, W as U, X as G } from "./useLabData-OIsblj-7.js";
|
|
3
|
+
import { x as H, y as J, L as q, C as z, P as E, D as Z, z as X, W as B, F as K, A as V } from "./workshop-app-7WTuNuCp.js";
|
|
4
|
+
const b = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
|
|
5
|
+
function ge(e) {
|
|
6
|
+
return b(e) && e.scheduleModel !== void 0;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function Q(e, t, i) {
|
|
9
9
|
const n = (e.actionTypes ?? []).filter((o) => !i || i.has(o.objectType)).map((o) => {
|
|
10
|
-
const
|
|
11
|
-
return `- ${o.id}:${o.name},对象类 ${o.objectType},${o.kind}${
|
|
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("、")}` : ""}`;
|
|
12
12
|
}), s = t.map(
|
|
13
13
|
(o) => `- box "${o.box}"(${o.boxName}),tool "${o.tool}":${o.toolName}${o.description ? `;${o.description}` : ""}`
|
|
14
14
|
);
|
|
@@ -19,7 +19,7 @@ function K(e, t, i) {
|
|
|
19
19
|
|
|
20
20
|
scheduleModel 的结构(只填知识网络里确有依据的项;没把握的项省略,由向导按知识网络建议):
|
|
21
21
|
- result:"self"(直接改任务本身的资源与时间,由任务的修改行动写回)或 "record"(写入计划记录,任务本身不改,由计划记录的新建、修改行动写回)。
|
|
22
|
-
- tasks:[{ objectType, assignField?, start?, end?, status?, doneWhen?: [{ field, op: "eq", value }], groupField?, target?: { path?, field }, ready?: { path, field }, predecessors?: { path: [关系] }, modify?: { action }, rules?: [{ name, tool: { box, tool }, severity?: "hard" | "soft" }] }]:被排的东西,1 到 ${
|
|
22
|
+
- tasks:[{ objectType, assignField?, start?, end?, status?, doneWhen?: [{ field, op: "eq", value }], groupField?, target?: { path?, field }, ready?: { path, field }, predecessors?: { path: [关系] }, modify?: { action }, rules?: [{ name, tool: { box, tool }, severity?: "hard" | "soft" }] }]:被排的东西,1 到 ${I} 类共用同一类资源。assignField 为取值是资源标识的字段;target 为何时要完成(任务自己的日期,或沿 path 到达的对象的日期,如工单的交期);ready 为开工前要就绪的对象及其就绪日;predecessors 为同类任务之间的前序关系(一条)。result 为 record 时只能 1 类任务,不写 assignField、start、end、modify,可写 groupField(成批的字段,如预测单号)。
|
|
23
23
|
- resource:{ objectType, titleField, parentField?, groupField?, capacityField? }:资源(产线、机台、班组),parentField 为上级资源标识(与 groupField 二选一),capacityField 为并行上限(数字)。
|
|
24
24
|
- calendars?:[{ objectType, resourceField, start, end }]:资源不可用的时段(停线、停机、请假),最多 3 个。
|
|
25
25
|
- record(result 为 record 时):{ objectType, match: [{ from: 计划记录的字段, to: 任务的字段 }], resourceField, start, end, status?, active?: [{ field, op: "ne", value }], create?: { action }, modify?: { action }, daysField? }。match 是计划认出“为哪条需求排的”的字段:只用单号、编码这类编号(如 单号 ↔ 单号、产品编码 ↔ 物料编码),合起来要能唯一确定一条需求(一张单有多个产品时,单号之外再加产品编码);不要用数量、日期、状态,它们碰巧相等不代表是同一条需求。
|
|
@@ -34,11 +34,11 @@ ${n.length > 0 ? n.join(`
|
|
|
34
34
|
${s.length > 0 ? s.join(`
|
|
35
35
|
`) : "(知识网络没有挂载带规则函数的工具箱)"}
|
|
36
36
|
|
|
37
|
-
needs:知识网络缺对象类、属性、关系或行动,或没有合适的规则函数时,逐条写清楚要补什么,step 取 ${
|
|
37
|
+
needs:知识网络缺对象类、属性、关系或行动,或没有合适的规则函数时,逐条写清楚要补什么,step 取 ${A.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
|
}
|
|
41
|
-
function
|
|
41
|
+
function ee(e) {
|
|
42
42
|
return e ? [
|
|
43
43
|
...Array.isArray(e.tasks) ? e.tasks.map((t) => t?.objectType) : [],
|
|
44
44
|
e.resource?.objectType,
|
|
@@ -46,124 +46,124 @@ function V(e) {
|
|
|
46
46
|
e.record?.objectType
|
|
47
47
|
].filter((t) => typeof t == "string") : [];
|
|
48
48
|
}
|
|
49
|
-
const
|
|
50
|
-
function
|
|
49
|
+
const te = /([`'"]?)\b([A-Za-z_][A-Za-z0-9_]*)\b\1/g;
|
|
50
|
+
function M(e, t, i) {
|
|
51
51
|
const n = /* @__PURE__ */ new Map(), s = (r, y) => {
|
|
52
52
|
y && y !== r && !n.has(r) && n.set(r, y);
|
|
53
|
-
}, o =
|
|
53
|
+
}, o = ee(i), l = [
|
|
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
|
|
57
|
+
for (const r of l) 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
|
|
61
|
-
return e.replace(
|
|
62
|
-
const $ = n.get(
|
|
60
|
+
for (const r of l) for (const y of r.properties) s(y.name, y.label);
|
|
61
|
+
return e.replace(te, (r, y, m) => {
|
|
62
|
+
const $ = n.get(m);
|
|
63
63
|
return $ ? y ? `「${$}」` : $ : r;
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function se(e, t, i) {
|
|
67
67
|
return Array.isArray(e) ? e.flatMap((n) => {
|
|
68
68
|
if (typeof n == "string")
|
|
69
|
-
return n.trim() ? [{ text:
|
|
70
|
-
if (!
|
|
71
|
-
const s =
|
|
72
|
-
return [{ ...s ? { step: s } : {}, text:
|
|
69
|
+
return n.trim() ? [{ text: M(n.trim(), t, i) }] : [];
|
|
70
|
+
if (!b(n) || typeof n.text != "string" || !n.text.trim()) return [];
|
|
71
|
+
const s = A.includes(n.step) ? n.step : void 0;
|
|
72
|
+
return [{ ...s ? { step: s } : {}, text: M(n.text.trim(), t, i) }];
|
|
73
73
|
}) : [];
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
if (!
|
|
75
|
+
function Te(e, t, i, n) {
|
|
76
|
+
if (!b(e) || !b(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
|
|
81
|
+
const l = {
|
|
82
82
|
...s,
|
|
83
|
-
tasks: s.tasks.map((y) =>
|
|
84
|
-
resource:
|
|
83
|
+
tasks: s.tasks.map((y) => b(y) ? { ...y } : y),
|
|
84
|
+
resource: b(s.resource) ? s.resource : { objectType: "?", titleField: "?" }
|
|
85
85
|
};
|
|
86
86
|
if (o.push(
|
|
87
|
-
...
|
|
87
|
+
...R(l).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(...
|
|
92
|
+
if (o.push(...oe(s, t, i, n)), o.length > 0) return { ok: !1, errors: o };
|
|
93
93
|
const r = s;
|
|
94
|
-
return { ok: !0, proposal: { model: r, needs:
|
|
94
|
+
return { ok: !0, proposal: { model: r, needs: se(e.needs, t, r) } };
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
const s = [], o = "不在知识网络里:不要编造,缺的写进 needs",
|
|
96
|
+
function oe(e, t, i, n) {
|
|
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) => {
|
|
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;
|
|
101
|
-
const u =
|
|
101
|
+
const u = J(t, a, c);
|
|
102
102
|
if (!u || u.length === 0) {
|
|
103
103
|
s.push(`${p} 的关系 ${c.join(" > ")} 从 ${a} 走不通:${o}`);
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
106
|
return u[u.length - 1].to;
|
|
107
|
-
},
|
|
107
|
+
}, m = (a, c, p) => {
|
|
108
108
|
if (!c) return;
|
|
109
109
|
const u = C(t, c);
|
|
110
110
|
u ? u.objectType !== a && s.push(`${p} 的行动 ${c} 作用于 ${u.objectType},不是 ${a}`) : s.push(`${p} 的行动 ${c} ${o}`);
|
|
111
111
|
};
|
|
112
112
|
e.tasks.forEach((a, c) => {
|
|
113
113
|
const p = `scheduleModel.tasks[${c}]`;
|
|
114
|
-
if (!
|
|
114
|
+
if (!l(a.objectType, p)) return;
|
|
115
115
|
const u = a.objectType;
|
|
116
|
-
for (const
|
|
117
|
-
r(u, a[
|
|
118
|
-
for (const
|
|
119
|
-
for (const
|
|
120
|
-
for (const
|
|
121
|
-
const h = a[
|
|
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];
|
|
122
122
|
if (!h) continue;
|
|
123
|
-
const T = y(u, h.path, `${p}.${
|
|
124
|
-
T && r(T, h.field, `${p}.${
|
|
123
|
+
const T = y(u, h.path, `${p}.${d}`);
|
|
124
|
+
T && r(T, h.field, `${p}.${d}`);
|
|
125
125
|
}
|
|
126
|
-
for (const
|
|
127
|
-
t.relations.some((h) => h.id ===
|
|
128
|
-
|
|
129
|
-
for (const
|
|
130
|
-
i.some((h) => h.box ===
|
|
131
|
-
`${p}.rules 的规则函数 ${
|
|
126
|
+
for (const d of a.predecessors?.path ?? [])
|
|
127
|
+
t.relations.some((h) => h.id === H(d).id) || s.push(`${p}.predecessors 的关系 ${d} ${o}`);
|
|
128
|
+
m(u, a.modify?.action, `${p}.modify`);
|
|
129
|
+
for (const d of a.rules ?? [])
|
|
130
|
+
i.some((h) => h.box === d.tool.box && h.tool === d.tool.tool) || s.push(
|
|
131
|
+
`${p}.rules 的规则函数 ${d.tool.box}/${d.tool.tool} 不在可用规则函数里:只能照抄列出的,没有合适的写进 needs`
|
|
132
132
|
);
|
|
133
133
|
});
|
|
134
134
|
const { resource: $ } = e;
|
|
135
|
-
if ($ &&
|
|
135
|
+
if ($ && l($.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 (
|
|
140
|
+
if (l(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 &&
|
|
144
|
+
if (f && l(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((
|
|
152
|
-
t.objectTypes[e.tasks[0]?.objectType ?? ""]?.properties.find((
|
|
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
|
|
153
153
|
];
|
|
154
|
-
!n?.record?.match?.some((
|
|
154
|
+
!n?.record?.match?.some((d) => d.from === c.from && d.to === c.to) && p.some((d) => d === "number" || d === "date") && s.push(
|
|
155
155
|
`${a}.match 的 ${c.from} = ${c.to} 是数量或日期:计划与需求只按单号、编码这类编号字段对应(如预测单号 + 产品编码),不要用数量、日期、状态`
|
|
156
156
|
);
|
|
157
157
|
}
|
|
158
158
|
for (const c of f.active ?? []) r(f.objectType, c.field, `${a}.active`);
|
|
159
|
-
|
|
159
|
+
m(f.objectType, f.create?.action, `${a}.create`), m(f.objectType, f.modify?.action, `${a}.modify`);
|
|
160
160
|
}
|
|
161
161
|
return s;
|
|
162
162
|
}
|
|
163
|
-
const
|
|
163
|
+
const O = (e) => Object.entries(e).filter(([t]) => !B.has(t)).map(([t, [i, n]]) => `${t} ${i}×${n}`).join("、"), re = O(K), ie = O(V), ne = X.filter(
|
|
164
164
|
(e) => g[e].category === "scenario"
|
|
165
|
-
),
|
|
166
|
-
- 用户明确要求写、做、开发一个新组件(如“写一个风险矩阵组件”),或要的展示与交互上面的标准组件都做不到(如四象限气泡图、桑基图、日历热力图)时,不要用标准组件凑,也不要输出 spec 或 patch,只输出 {"component": {"explicit": 用户是否明确要求写新组件, "reason": "一句话:最接近的标准组件是哪个、差在哪"}},组件由另外的步骤去写。标准组件能做到的不要输出 component。`,
|
|
165
|
+
), ae = `
|
|
166
|
+
- 用户明确要求写、做、开发一个新组件(如“写一个风险矩阵组件”),或要的展示与交互上面的标准组件都做不到(如四象限气泡图、桑基图、日历热力图)时,不要用标准组件凑,也不要输出 spec 或 patch,只输出 {"component": {"explicit": 用户是否明确要求写新组件, "reason": "一句话:最接近的标准组件是哪个、差在哪"}},组件由另外的步骤去写。标准组件能做到的不要输出 component。`, ce = `## 页面写法
|
|
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, i]]) => `${
|
|
|
176
176
|
10. 空状态说清楚:没有数据时写明原因和下一步。
|
|
177
177
|
11. 页面不超过 7 页:按“每天看”“偶尔用”“设置”分组。
|
|
178
178
|
`;
|
|
179
|
-
function
|
|
179
|
+
function je(e, t, i = [], {
|
|
180
180
|
newComponents: n = !1,
|
|
181
181
|
...s
|
|
182
182
|
} = {}) {
|
|
183
183
|
return `你是 Workshop 应用构建助手,负责生成或修改业务应用的 App Spec(JSON)。页面只能用固定的布局类型和标准组件,业务差异全部写在数据源(含进度、计算列)、筛选(variables)和组件 config 里。
|
|
184
184
|
|
|
185
|
-
${
|
|
185
|
+
${de(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}。${n ?
|
|
190
|
+
- 新建应用或大改输出 {"spec": 完整 App Spec}。${n ? ae : ""}
|
|
191
191
|
用户没有要求改的部分保持不变;只用上面列出的组件、配置项、对象类、属性和关系。`;
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function de(e, t, i = [], {
|
|
194
194
|
scenarios: n = !0,
|
|
195
195
|
ruleTools: s,
|
|
196
|
-
scheduling: o = i.some((
|
|
196
|
+
scheduling: o = i.some((l) => l.type === "scheduleGantt")
|
|
197
197
|
} = {}) {
|
|
198
|
-
const
|
|
199
|
-
`), y =
|
|
198
|
+
const l = s && o ? Q(e, s, t) : "", r = Object.entries(q).map(([$, f]) => `- ${$}:区域 ${f.join("、")}`).join(`
|
|
199
|
+
`), y = k(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
|
-
`),
|
|
208
|
-
方案推演需要企业版,当前环境不提供:不要加方案类组件(${
|
|
207
|
+
`), m = n ? "" : `
|
|
208
|
+
方案推演需要企业版,当前环境不提供:不要加方案类组件(${ne.join("、")});用户要求方案推演时,只输出不含它们的 App Spec。`;
|
|
209
209
|
return `## App Spec 结构
|
|
210
|
-
{ apiVersion: "${
|
|
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 }
|
|
211
211
|
- 数据源、筛选和主题属于整个应用,所有页面共用,筛选的值在页面之间保留。
|
|
212
212
|
- 每个页面有自己的 id、标题、布局、组件和详情抽屉;组件 id 在页面内唯一。
|
|
213
213
|
- scheduleModel(可选)是调度模型的答案,页面上的调度甘特与它的数据源由它生成:patch 和 spec 里不要写、改或删 scheduleModel,系统会保留原值;要改调度的答案,按“调度模型”一节输出。
|
|
@@ -219,18 +219,22 @@ ${r}
|
|
|
219
219
|
- workbench:side 为侧栏(宽 sideWidth 220–420,位置 sidePosition left/right),main 为主区,aside 为右栏(宽 asideWidth,0 表示隐藏,否则 240–420)。
|
|
220
220
|
- dashboard:header 为顶部整行;grid 为网格,列数 columns 2–4,组件用 span 指定跨列数。
|
|
221
221
|
- detail:header 顶部整行;main 主区;aside 右栏。
|
|
222
|
-
- free
|
|
222
|
+
- free:自由网格,区域只有 cells;每个组件必须带 frame { x, y, w, h }(列与行,从左上角数起);同一行的组件 y 相同,不要重叠。网格有两种,由 layout.grid 决定,frame 与 pinRows 都按本页网格计数:
|
|
223
|
+
- grid: "fine"(细网格):24 列,每行连同间距约 27 像素;frame { x: 0–23, y: 0–800, w: 1–24, h: 2–80 },且 x + w ≤ 24;w、h 不得小于组件的最小尺寸(列×行):${re}。新建的自由网格页面一律写 grid: "fine"。
|
|
224
|
+
- 不写 grid 或 grid: "standard"(标准网格):12 列,行高 40 像素;frame { x: 0–11, y: 0–400, w: 1–12, h: 2–40 },且 x + w ≤ 12;最小尺寸:${ie}。
|
|
225
|
+
- 修改已有页面时不要改它的 grid,frame 按它原来的网格写。
|
|
226
|
+
- pinRows(可选,标准网格 0–12、细网格 0–24)为页面滚动时固定在顶部的行数:完全落在前 pinRows 行里的组件(如基准日期、筛选)一直显示在顶部;有组件从这几行开始、又延伸到下面时整页不固定,所以固定的组件要整个放在这几行里。
|
|
223
227
|
- gap 为 compact、normal、relaxed。
|
|
224
228
|
|
|
225
229
|
## 数据源(sources)
|
|
226
230
|
每项 { id, label, objectType, key, progress?, computed? }:objectType 为对象类 id;key 为标识对象的属性。
|
|
227
231
|
子集 { id, label, objectType, key, from: { source, where?, filters? } }:另一个数据源的子集,组件的 source 可以选它。from.source 为来源数据源 id(不能再是子集,也不能是带参数的 Cypher 数据源);where 为对象须全部满足的条件,可读来源的属性、进度列和计算列,写法同计算列的条件;filters 为它跟随的筛选,写法同组件的 filters。objectType、key 必须与来源一致;progress、computed 沿用来源,不能自己写。同一个子集(如“执行中的订单”)要给多个组件用,或要按条件统计时,定义成子集。
|
|
228
232
|
字段格式 formats(可选):{ 字段名: { unit?, decimals?, colors? } },所有组件显示这个字段时都沿用。unit 为数字的单位(如 件、万元),decimals 为小数位(0–6),colors 为着色规则列表 [{ when: 条件列表, tone }]:行满足条件时该字段显示为这个颜色(tone 同计算列的色调:neutral/info/success/warning/danger),条件可读本行任何字段,第一条成立的生效。子集沿用来源的格式。
|
|
229
|
-
${
|
|
230
|
-
${
|
|
233
|
+
${W}
|
|
234
|
+
${z}
|
|
231
235
|
|
|
232
236
|
## 自动联动(页面的 linking)
|
|
233
|
-
页面 linking 为 auto
|
|
237
|
+
页面 linking 为 auto 时自动联动(新建的页面都写 linking: "auto"):点击任一组件(表格的行、指标卡、分段与下拉筛选、透视表的行、趋势图、地图、告警、搜索框、日期区间)就是整页共享的一个条件,其他组件自动跟随——同类对象按同一字段或同一批对象筛,另一类对象沿知识网络里两类对象之间最短的关系连接筛(3 跳以内;一样短的有几条时沿任一条关联到即保留);详情抽屉、关系子图、Agent 自动读取最近点中的对象。所以这样的页面不要写 variables 里的取值、日期区间、搜索、选中对象、对象集合筛选,也不要写组件的 writes、selection、filters;基准日期 asOf 照旧是 variables 里的一项。
|
|
234
238
|
只在需要判断时写这几项:
|
|
235
239
|
- 组件的 follow: false(写在组件这一层,与 id、type 并列):总量参照、目标值、对比基准这类不该随点击变的组件。
|
|
236
240
|
- 组件的 click(同一层):select 只选中对象、不筛选页面,用于只看详情的明细表;none 点击不产生条件。不写为筛选页面。
|
|
@@ -243,7 +247,7 @@ linking 不写或为 manual 时按下一节手动联动。修改已有页面时
|
|
|
243
247
|
手动联动的页面两头都是显式的:组件点击时把值写入一个筛选(组件 config 里的 writes 等配置项);其他组件在自己的 filters 里列出跟随哪些筛选、按自己的哪个字段比对。没列在 filters 里的筛选不影响它;filters 为空就不受任何筛选影响。筛选本身不绑数据源和字段,所以不同数据源的组件可以跟随同一个筛选(比如两类对象都有客户字段时,各按自己的客户字段跟随同一个“客户”筛选)。
|
|
244
248
|
每项 { name, label, kind, default? }:
|
|
245
249
|
- asOf:基准日期,全页一个。不是筛选,不用写进 filters:有进度或计算列读了基准日期的数据源自动按它计算。
|
|
246
|
-
- value:一个或几个取值,比如某个分类字段的值;组件写入时可以是几个值的列表,比如一张“未完成”指标卡写入 ["${
|
|
250
|
+
- value:一个或几个取值,比如某个分类字段的值;组件写入时可以是几个值的列表,比如一张“未完成”指标卡写入 ["${E.active.value}","${E.overdue.value}"](进度状态的代码)。跟随写 { variable, field }。
|
|
247
251
|
- dateRange:一段日期,值为 { from?, to? };日期区间组件写入它,趋势图点某个月也写入这个月的区间。跟随写 { variable, field }(field 为日期字段)。
|
|
248
252
|
- search:一段文字。跟随写 { variable, fields }(在这些文本字段里查找)。
|
|
249
253
|
- selection { source }:选中的一个对象,详情抽屉、关系子图和 Agent 读它(config 里的 selection),不写进 filters。
|
|
@@ -266,25 +270,25 @@ linking 不写或为 manual 时按下一节手动联动。修改已有页面时
|
|
|
266
270
|
用户只要求“提醒、告警、看哪些超期”时用 alertList 即可;要求“记录下来、要有人处理、要核实或关闭”时,才在 eventTypes 里处理知识网络的事件类型。
|
|
267
271
|
|
|
268
272
|
## 组件
|
|
269
|
-
regions 中每项 { id, type, span?, frame?, surface?, config };id 在页面内唯一,字母开头;span 只用于 dashboard,frame 只用于 free;surface(可选)为 card 或 plain,只给要和主题不同的组件写,如不带框的页面里给一张很密的表格加底色。${
|
|
273
|
+
regions 中每项 { id, type, span?, frame?, surface?, config };id 在页面内唯一,字母开头;span 只用于 dashboard,frame 只用于 free;surface(可选)为 card 或 plain,只给要和主题不同的组件写,如不带框的页面里给一张很密的表格加底色。${m}
|
|
270
274
|
${y}
|
|
271
275
|
|
|
272
|
-
### 详情抽屉 detail(type 固定为 ${
|
|
276
|
+
### 详情抽屉 detail(type 固定为 ${Z},不放在 regions 里)
|
|
273
277
|
${v.description}
|
|
274
278
|
config:
|
|
275
279
|
${S(v.descriptors)}
|
|
276
|
-
${
|
|
277
|
-
${
|
|
280
|
+
${le(i, l !== "")}${l}
|
|
281
|
+
${ce}
|
|
278
282
|
## 主题(theme)
|
|
279
283
|
surface(可选)为组件外观:card 每个组件带底色和边框,plain 组件直接放在页面上、靠间距分开,不写为 card。新建应用写 plain;改已有应用时,用户没要求就保留原值。
|
|
280
|
-
颜色一律 #rrggbb;chartPalette 6–8 个颜色;colorText 与 colorBg、colorSurface 对比度不低于 ${Y},colorTextMuted 与 colorSurface 不低于 ${
|
|
284
|
+
颜色一律 #rrggbb;chartPalette 6–8 个颜色;colorText 与 colorBg、colorSurface 对比度不低于 ${Y},colorTextMuted 与 colorSurface 不低于 ${L};mode 为 light 或 dark;fontSize 12–16;radius 0–16;shadow 为 none、subtle、strong;density 为 compact、comfortable。
|
|
281
285
|
用户说的“强调色、主色”指 colorPrimary(chartPalette 第一个颜色通常与它一致);点名的颜色要在所选模板基础上改进去。主题模板:
|
|
282
|
-
${Object.values(
|
|
286
|
+
${Object.values(x).map(($) => `- ${$.name}:${JSON.stringify($)}`).join(`
|
|
283
287
|
`)}
|
|
284
288
|
|
|
285
|
-
${
|
|
289
|
+
${ye(e, t)}${ue(e, t)}${fe(e, t)}`;
|
|
286
290
|
}
|
|
287
|
-
function
|
|
291
|
+
function le(e, t = !1) {
|
|
288
292
|
return e.length === 0 ? "" : `
|
|
289
293
|
## 组件说明
|
|
290
294
|
以下组件附有说明,配置它们时以说明为准:先按“本体契约”把业务对象对应到组件的角色,再按“扩展点”接知识网络上的规则工具、逻辑属性或指标。说明中要求的对象类、属性、关系或工具在上面的知识网络里找不到时,不要用别的对象或计算列凑,也不要在配置里写业务规则,相应的可选项留空。${t ? "调度甘特按“调度模型”一节输出答案:规则函数只从那里列出的选,要补的内容写进 needs。其他组件里要填 { box, tool } 的配置项一律不写,不要编造工具箱或工具的 id,由构建者在配置面板中选择。" : "本提示不含执行工厂的工具清单:说明里提到的规则工具(如“齐套检查”)以及任何要填 { box, tool } 的配置项一律不写,不要编造工具箱或工具的 id,由构建者在配置面板中选择。说明里“问用户”“列出要补的内容”在这里不适用:只输出 App Spec。"}
|
|
@@ -296,35 +300,42 @@ ${n.text.trim()}
|
|
|
296
300
|
`)}
|
|
297
301
|
`;
|
|
298
302
|
}
|
|
299
|
-
function
|
|
303
|
+
function pe(e, t) {
|
|
300
304
|
const i = JSON.stringify(e ?? "");
|
|
301
|
-
return
|
|
305
|
+
return w.filter((n) => {
|
|
302
306
|
const s = g[n]?.label;
|
|
303
|
-
return i.includes(`"type":"${n}"`) || t.includes(n) || s !== void 0 && t.includes(s) ||
|
|
307
|
+
return i.includes(`"type":"${n}"`) || t.includes(n) || s !== void 0 && t.includes(s) || N(n).some((o) => t.toLowerCase().includes(o.toLowerCase()));
|
|
304
308
|
});
|
|
305
309
|
}
|
|
306
|
-
async function
|
|
307
|
-
const n = [.../* @__PURE__ */ new Set([...
|
|
308
|
-
|
|
310
|
+
async function Se(e, t, i = []) {
|
|
311
|
+
const n = [.../* @__PURE__ */ new Set([...pe(e, t), ...i])].filter(
|
|
312
|
+
P
|
|
309
313
|
);
|
|
310
314
|
return (await Promise.all(
|
|
311
315
|
n.map(async (o) => {
|
|
312
316
|
try {
|
|
313
|
-
return { type: o, text: await
|
|
317
|
+
return { type: o, text: await F(o) };
|
|
314
318
|
} catch {
|
|
315
319
|
return null;
|
|
316
320
|
}
|
|
317
321
|
})
|
|
318
322
|
)).filter((o) => o !== null);
|
|
319
323
|
}
|
|
320
|
-
function
|
|
321
|
-
const i =
|
|
324
|
+
function ue(e, t) {
|
|
325
|
+
const i = U(e, t);
|
|
322
326
|
return i ? `
|
|
323
327
|
|
|
324
328
|
## 对象指标
|
|
325
329
|
${i}` : "";
|
|
326
330
|
}
|
|
327
|
-
function
|
|
331
|
+
function fe(e, t) {
|
|
332
|
+
const i = G(e, t);
|
|
333
|
+
return i ? `
|
|
334
|
+
|
|
335
|
+
## 行动
|
|
336
|
+
${i}` : "";
|
|
337
|
+
}
|
|
338
|
+
function ve(e, t, i) {
|
|
328
339
|
return e ? `当前 App Spec:
|
|
329
340
|
${JSON.stringify(e)}
|
|
330
341
|
|
|
@@ -334,33 +345,33 @@ ${i ? `${i}
|
|
|
334
345
|
|
|
335
346
|
用户要求:${t}`;
|
|
336
347
|
}
|
|
337
|
-
const
|
|
338
|
-
function
|
|
348
|
+
const _ = 30;
|
|
349
|
+
function Ee(e, t, i) {
|
|
339
350
|
const n = /* @__PURE__ */ new Set(), s = JSON.stringify(t ?? "");
|
|
340
351
|
for (const o of Object.values(e.objectTypes))
|
|
341
352
|
(s.includes(`"${o.id}"`) || i.includes(o.name) || i.includes(o.id)) && n.add(o.id);
|
|
342
353
|
if (n.size === 0) {
|
|
343
354
|
const o = /* @__PURE__ */ new Map();
|
|
344
|
-
for (const
|
|
345
|
-
for (const r of [
|
|
355
|
+
for (const l of e.relations)
|
|
356
|
+
for (const r of [l.source, l.target])
|
|
346
357
|
o.set(r, (o.get(r) ?? 0) + 1);
|
|
347
|
-
[...o].sort((
|
|
358
|
+
[...o].sort((l, r) => r[1] - l[1]).slice(0, 10).forEach(([l]) => n.add(l));
|
|
348
359
|
}
|
|
349
360
|
return n;
|
|
350
361
|
}
|
|
351
|
-
function
|
|
352
|
-
const i = Object.values(e.objectTypes), n = (s) => !t || i.length <=
|
|
362
|
+
function ye(e, t) {
|
|
363
|
+
const i = Object.values(e.objectTypes), n = (s) => !t || i.length <= _ || t.has(s);
|
|
353
364
|
return `## 知识网络 ${e.name}(${e.id})
|
|
354
|
-
对象类(id:名称;业务说明;属性 名称:类型(显示名))${i.length >
|
|
365
|
+
对象类(id:名称;业务说明;属性 名称:类型(显示名))${i.length > _ && t ? ";网络较大,只列出与本次要求相关的对象类的属性,其余只列名称,需要时请用户点名" : ""}:
|
|
355
366
|
${i.map(
|
|
356
367
|
(s) => `- ${s.id}:${s.name}${s.comment ? `;${s.comment}` : ""}${n(s.id) ? `;${s.properties.map((o) => `${o.name}:${o.type}(${o.label})`).join(",")}` : ""}`
|
|
357
368
|
).join(`
|
|
358
369
|
`)}
|
|
359
370
|
关系(id:名称,起点 → 终点;路径可以反向经过关系):
|
|
360
371
|
${e.relations.map((s) => `- ${s.id}:${s.name},${s.source} → ${s.target}`).join(`
|
|
361
|
-
`)}${
|
|
372
|
+
`)}${$e(e)}`;
|
|
362
373
|
}
|
|
363
|
-
function
|
|
374
|
+
function $e(e) {
|
|
364
375
|
if (!e.eventTypes) return "";
|
|
365
376
|
const t = e.eventTypes.map(
|
|
366
377
|
(i) => `- ${i.code}:${i.name},${i.source === "rule" ? "规则命中" : "用户登记"}${i.subject ? `,关于 ${i.subject}` : ""}`
|
|
@@ -371,13 +382,13 @@ ${t.length > 0 ? t.join(`
|
|
|
371
382
|
`) : "(暂无)"}`;
|
|
372
383
|
}
|
|
373
384
|
export {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
385
|
+
ne as S,
|
|
386
|
+
pe as a,
|
|
387
|
+
ye as d,
|
|
388
|
+
Ee as f,
|
|
389
|
+
Se as g,
|
|
390
|
+
ge as i,
|
|
391
|
+
Te as p,
|
|
392
|
+
je as s,
|
|
393
|
+
ve as u
|
|
383
394
|
};
|
|
@@ -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-
|
|
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-CaigvKK3.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-
|
|
2
|
-
import { p as m } from "./chunk-JWPE2WC7-
|
|
3
|
-
import { _ as n, l as s } from "./mermaid.core-
|
|
1
|
+
import { g as o, r as l, d as t } from "./chunk-2E7WHVMD-C7KAk7Aw.js";
|
|
2
|
+
import { p as m } from "./chunk-JWPE2WC7-BvFVx2S8.js";
|
|
3
|
+
import { _ as n, l as s } from "./mermaid.core-CaigvKK3.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) {
|
package/dist/{requirementDiagram-EQYSW5RA-BGxpuSlc.js → requirementDiagram-EQYSW5RA-CXUiIggI.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as ze } from "./chunk-XXDRQBXY-
|
|
2
|
-
import { s as Xe } from "./chunk-VQ5W62QI-
|
|
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-
|
|
1
|
+
import { g as ze } from "./chunk-XXDRQBXY-BFdjgXiI.js";
|
|
2
|
+
import { s as Xe } from "./chunk-VQ5W62QI-BKtRw0gX.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-CaigvKK3.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-
|
|
2
|
-
import "./dayjs.min-
|
|
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-CaigvKK3.js";
|
|
2
|
+
import "./dayjs.min-C7Hp2iGA.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-
|
|
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-
|
|
3
|
-
import { a as Sr, g as le, b as pt, d as Ar, e as he, f as de } from "./chunk-55XCU76K-
|
|
1
|
+
import { I as pr } from "./chunk-2Q5K7J3B-DJjZ1fjz.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-CaigvKK3.js";
|
|
3
|
+
import { a as Sr, g as le, b as pt, d as Ar, e as he, f as de } from "./chunk-55XCU76K-Dke6HW5r.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,7 +1,7 @@
|
|
|
1
|
-
import { g as ie } from "./chunk-XXDRQBXY-
|
|
2
|
-
import { s as re } from "./chunk-VQ5W62QI-
|
|
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-
|
|
4
|
-
import { c as _e } from "./chunk-55XCU76K-
|
|
1
|
+
import { g as ie } from "./chunk-XXDRQBXY-BFdjgXiI.js";
|
|
2
|
+
import { s as re } from "./chunk-VQ5W62QI-BKtRw0gX.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-CaigvKK3.js";
|
|
4
|
+
import { c as _e } from "./chunk-55XCU76K-Dke6HW5r.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-
|
|
2
|
-
import { c as ir } from "./chunk-ZCHMQSOR-
|
|
3
|
-
import { _ as l, l as yn } from "./mermaid.core-
|
|
1
|
+
import { a as rr } from "./chunk-4EMNKR2T-Da2DlW9r.js";
|
|
2
|
+
import { c as ir } from "./chunk-ZCHMQSOR-BV9eKUlK.js";
|
|
3
|
+
import { _ as l, l as yn } from "./mermaid.core-CaigvKK3.js";
|
|
4
4
|
function To(t, { measure: e }) {
|
|
5
5
|
const n = t.config?.swimlane?.lineHops;
|
|
6
6
|
if (n === !1)
|
package/dist/{swimlanesDiagram-AYQRV4AK-C0RDY4m2.js → swimlanesDiagram-AYQRV4AK-hM77bzoI.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as e, s as r } from "./flowDiagram-IUGLLWBU-
|
|
2
|
-
import { _ as a } from "./mermaid.core-
|
|
3
|
-
import "./dayjs.min-
|
|
1
|
+
import { c as e, s as r } from "./flowDiagram-IUGLLWBU-DSva8jfA.js";
|
|
2
|
+
import { _ as a } from "./mermaid.core-CaigvKK3.js";
|
|
3
|
+
import "./dayjs.min-C7Hp2iGA.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;
|
package/dist/{timeline-definition-JXYKGLGB-C6WGe4xl.js → timeline-definition-JXYKGLGB-BR5tHWmO.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as o, O as pt, I as nt, F as Rt, a7 as Wt, a8 as Pt, a9 as Bt, c as ft, l as E, T as Vt, V as Ft, aa as yt, k as X, W as ct, N as zt, ab as Ot, D as Gt } from "./mermaid.core-
|
|
1
|
+
import { _ as o, O as pt, I as nt, F as Rt, a7 as Wt, a8 as Pt, a9 as Bt, c as ft, l as E, T as Vt, V as Ft, aa as yt, k as X, W as ct, N as zt, ab as Ot, D as Gt } from "./mermaid.core-CaigvKK3.js";
|
|
2
2
|
var tt = (function() {
|
|
3
3
|
var e = /* @__PURE__ */ o(function(k, a, d, l) {
|
|
4
4
|
for (d = d || {}, l = k.length; l--; d[k[l]] = a) ;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as b, as as Be, at as fe, au as hs, av as ue, aw as z, ax as te, ay as wn, az as vn, aA as kn, aB as F, aC as K, aD as gs, aE as $n, aF as ys, aG as V, aH as bt, aI as bs, aJ as ws, aK as X, aL as Sn, aM as Nn, aN as qt, aO as vs, aP as Kt, aQ as ks, aR as $s, aS as Ss, aT as Ns, aU as St, Y as Is, aV as In, aW as Ts, aX as Es, aY as As, aZ as zt, a as wt, a_ as Ht, a$ as Os, b0 as Ls, b1 as Cs, b2 as _s, b3 as Vt, b4 as xs, N as Ds, O as Ps, b5 as Ee, b6 as Ms, b7 as Fe, b8 as Rs, b9 as Tn, ba as j, bb as Te, bc as Nt, bd as It, be as Tt, bf as Fs, bg as we, bh as js, bi as Us, bj as Ve, bk as Et, bl as Xt, bm as Bs, bn as Gt, bo as Wt, bp as Qe, bq as qs, br as Ks, bs as En, bt as zs, bu as be, bv as et, bw as Xe, bx as je, by as Yt, bz as Hs, bA as Vs, bB as Xs, bC as An, bD as Gs, bE as Ws, bF as Ys, bG as Js, w as At, j as _, u as Zs, i as Jt, I as Zt, ao as Qs } from "./workshop-app-
|
|
2
|
-
import {
|
|
1
|
+
import { r as b, as as Be, at as fe, au as hs, av as ue, aw as z, ax as te, ay as wn, az as vn, aA as kn, aB as F, aC as K, aD as gs, aE as $n, aF as ys, aG as V, aH as bt, aI as bs, aJ as ws, aK as X, aL as Sn, aM as Nn, aN as qt, aO as vs, aP as Kt, aQ as ks, aR as $s, aS as Ss, aT as Ns, aU as St, Y as Is, aV as In, aW as Ts, aX as Es, aY as As, aZ as zt, a as wt, a_ as Ht, a$ as Os, b0 as Ls, b1 as Cs, b2 as _s, b3 as Vt, b4 as xs, N as Ds, O as Ps, b5 as Ee, b6 as Ms, b7 as Fe, b8 as Rs, b9 as Tn, ba as j, bb as Te, bc as Nt, bd as It, be as Tt, bf as Fs, bg as we, bh as js, bi as Us, bj as Ve, bk as Et, bl as Xt, bm as Bs, bn as Gt, bo as Wt, bp as Qe, bq as qs, br as Ks, bs as En, bt as zs, bu as be, bv as et, bw as Xe, bx as je, by as Yt, bz as Hs, bA as Vs, bB as Xs, bC as An, bD as Gs, bE as Ws, bF as Ys, bG as Js, w as At, j as _, u as Zs, i as Jt, I as Zt, ao as Qs } from "./workshop-app-7WTuNuCp.js";
|
|
2
|
+
import { bO as ei, bP as ti, bQ as ni, bR as ee, bS as Qt, M as si, A as ii, bT as ai, bU as en, aq as ri, ar as oi, bV as li, bW as ci, a8 as ui, b8 as fi, bX as di, bY as pi, bZ as mi } from "./useLabData-OIsblj-7.js";
|
|
3
3
|
var hi = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" } }] }, name: "delete", theme: "outlined" }, gi = function(t, n) {
|
|
4
4
|
return /* @__PURE__ */ b.createElement(Be, fe({}, t, {
|
|
5
5
|
ref: n,
|