@openbkn/workshop 0.2.2-rc.5 → 0.2.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.
Files changed (158) hide show
  1. package/README.md +83 -13
  2. package/component.d.ts +10 -0
  3. package/dist/ActionConfirm-DJ91X3ml.js +236 -0
  4. package/dist/ActionFailure-ZgPt_3B-.js +37 -0
  5. package/dist/AgentChat-CRYai8ge.js +1062 -0
  6. package/dist/AppFormModal-D73ucaHK.js +4282 -0
  7. package/dist/AppListPage-D87piiOw.js +1364 -0
  8. package/dist/AskDrawer-BUMYsRnt.js +38 -0
  9. package/dist/ComputedView-CgYrDbx1.js +3221 -0
  10. package/dist/ConclusionApply-sjGfoEBY.js +153 -0
  11. package/dist/CypherEditor-lus6FA5L.js +485 -0
  12. package/dist/LandingList-6JI6864C.js +230 -0
  13. package/dist/MenuUnfoldOutlined-Cdg24l2h.js +27 -0
  14. package/dist/ModelTrial-ClHFGTpQ.js +359 -0
  15. package/dist/PageRenderer-DBd_g6mN.js +85480 -0
  16. package/dist/README-DjRyTQSR.js +76 -0
  17. package/dist/ScenarioApply-DtW_hh47.js +590 -0
  18. package/dist/SimulateForm-C-i08Jjd.js +153 -0
  19. package/dist/Subgraph-CnrkH9AN.js +32586 -0
  20. package/dist/WorkshopLabPage-DiVXQL9e.js +11364 -0
  21. package/dist/WorkshopRunPage-6hjRUf64.js +253 -0
  22. package/dist/abnfDiagram-WEYOIA3C-beRNhN3c.js +87 -0
  23. package/dist/action-type-tool.service-B2B74fKC.js +1060 -0
  24. package/dist/actionButton-DA5CNEzx.js +94 -0
  25. package/dist/actionButton.en-US-qjeqA7hs.js +94 -0
  26. package/dist/agentChat-EoDznd58.js +116 -0
  27. package/dist/agentChat.en-US-B6-pFd9Y.js +116 -0
  28. package/dist/alertList-DqditwM8.js +84 -0
  29. package/dist/alertList.en-US-BAXAgltP.js +84 -0
  30. package/dist/architectureDiagram-ZHVYKT53-DY2l1qxx.js +4779 -0
  31. package/dist/asOfSlider-QPvHWUMV.js +83 -0
  32. package/dist/asOfSlider.en-US-BI4jVfSn.js +83 -0
  33. package/dist/bkn-agent-execution.service-DVh-SHyl.js +205 -0
  34. package/dist/blockDiagram-RJAE7QA3-DR0mjN2h.js +1435 -0
  35. package/dist/c4Diagram-XDPPPE54-DH5zsGug.js +1518 -0
  36. package/dist/channel-B034hcOF.js +5 -0
  37. package/dist/china-C6m7zXIv.js +9 -0
  38. package/dist/chunk-2E7WHVMD-Ba3svxgx.js +664 -0
  39. package/dist/chunk-2Q5K7J3B-rT4eU6_y.js +15 -0
  40. package/dist/chunk-4EMNKR2T-C1kQZYHK.js +262 -0
  41. package/dist/chunk-55XCU76K-dcpLOktb.js +68 -0
  42. package/dist/chunk-5VM5RSS4-BdpQuzmO.js +19 -0
  43. package/dist/chunk-JWPE2WC7-CDBrSjU7.js +8 -0
  44. package/dist/chunk-VQ5W62QI-BiVKc40w.js +19 -0
  45. package/dist/chunk-XXDRQBXY-CPYrcdVW.js +8 -0
  46. package/dist/chunk-ZCHMQSOR-BG8OLpvb.js +451 -0
  47. package/dist/classDiagram-v2-4MYWR3UA-DqbpQpwI.js +1564 -0
  48. package/dist/component.d-DFoMKuUv.js +179 -0
  49. package/dist/cose-bilkent-JH36ORCC-CdXk4sPf.js +2609 -0
  50. package/dist/customComponents-DasaZ6pq.js +4 -0
  51. package/dist/customComponents.en-US-CkabuCXg.js +79 -0
  52. package/dist/customParseFormat-C0uLEpdq.js +182 -0
  53. package/dist/cynefin-EF2NZ3EQ-D7MVnMHu.js +21746 -0
  54. package/dist/cynefinDiagram-WF24UDRP-BYT_KpDL.js +299 -0
  55. package/dist/cytoscape.esm-BCV9V6aO.js +18760 -0
  56. package/dist/d3-scale-DA8IHmf0.js +1841 -0
  57. package/dist/dagre-NK4GIZVX-l-ghPdM8.js +2154 -0
  58. package/dist/dateRange-BbkLMg8L.js +79 -0
  59. package/dist/dateRange.en-US-CV12Q02G.js +79 -0
  60. package/dist/dayjs.min-DZ-YV8Mv.js +284 -0
  61. package/dist/diagram-CBK3MWTC-Bt3HiwvA.js +542 -0
  62. package/dist/diagram-I5XIIV2D-DcbqfBjx.js +150 -0
  63. package/dist/diagram-ODIL2UCW-9PC1n3n5.js +346 -0
  64. package/dist/diagram-PFBEJUXE-DGhr2kc7.js +478 -0
  65. package/dist/diagram-RJA3I4VV-DwzpOjZ_.js +219 -0
  66. package/dist/diagram-TYUNFSNR-B3Bd3TDU.js +2583 -0
  67. package/dist/dropdownFilter-DOi_8-ZT.js +76 -0
  68. package/dist/dropdownFilter.en-US-BiXpvXtF.js +76 -0
  69. package/dist/ebnfDiagram-V4P3TTPT-E5NN2oKc.js +109 -0
  70. package/dist/elk-QONTBCTQ-dFjcujl_.js +49170 -0
  71. package/dist/erDiagram-KYQIGQAA-BMrasBzB.js +1061 -0
  72. package/dist/eventList-CnsAwfDS.js +115 -0
  73. package/dist/eventList.en-US-Cof3rCLq.js +115 -0
  74. package/dist/eventReport-XS-HegnH.js +76 -0
  75. package/dist/eventReport.en-US-DTx4vzWT.js +76 -0
  76. package/dist/flowDiagram-IUGLLWBU-BGIBH0q0.js +1769 -0
  77. package/dist/ganttChart-DEeSvTJA.js +77 -0
  78. package/dist/ganttChart.en-US-SwRKrnoD.js +77 -0
  79. package/dist/ganttDiagram-R7GPNTJY-C0tb1Lpp.js +1741 -0
  80. package/dist/generateCypher-Ch9_lQa6.js +399 -0
  81. package/dist/gitGraphDiagram-PDYL7XHY-DBqcOa-c.js +815 -0
  82. package/dist/graph-CKJmgLki.js +1541 -0
  83. package/dist/index-BA-GzCXt.js +441 -0
  84. package/dist/infoDiagram-MVDRKAX5-Bwuki4JA.js +24 -0
  85. package/dist/ishikawaDiagram-HPEHV2GE-Dz4d6ygx.js +622 -0
  86. package/dist/journeyDiagram-BOSHW7O7-C99m34Bb.js +834 -0
  87. package/dist/kanban-definition-FNSA4HC5-mdqjODsT.js +724 -0
  88. package/dist/katex-BsrBVQKd.js +11314 -0
  89. package/dist/manifest-BjV1PJ6u.js +41 -0
  90. package/dist/mermaid.core-yQghUlIz.js +17642 -0
  91. package/dist/metricCards-CSb-_cT2.js +104 -0
  92. package/dist/metricCards.en-US-BLLhRsQU.js +104 -0
  93. package/dist/mindmap-definition-6OY57UG3-BZhO2wX4.js +834 -0
  94. package/dist/modelTrial-Bvb-RhGt.js +137 -0
  95. package/dist/modelTrial.en-US-DYcuor-G.js +137 -0
  96. package/dist/models-DekiCOuZ.js +6 -0
  97. package/dist/object-metric-numeric-vs3BeDkH.js +42 -0
  98. package/dist/object-metric.service-flZgBMRX.js +233 -0
  99. package/dist/objectDetail-SQUbp4Py.js +117 -0
  100. package/dist/objectDetail.en-US-DW3mlONM.js +117 -0
  101. package/dist/objectList-D99wPtJH.js +97 -0
  102. package/dist/objectList.en-US-PBBNyVLW.js +97 -0
  103. package/dist/objectTable-0jsFFMN3.js +127 -0
  104. package/dist/objectTable.en-US-yWEs8qc_.js +127 -0
  105. package/dist/pegDiagram-ECIUJNBX-BDa5RfZt.js +95 -0
  106. package/dist/pieDiagram-GNMPY74T-DNVtzXPv.js +165 -0
  107. package/dist/pivotTable-CHmQw18-.js +102 -0
  108. package/dist/pivotTable.en-US-B4uv4P08.js +102 -0
  109. package/dist/prompt-DYrjlEFr.js +373 -0
  110. package/dist/quadrantDiagram-D57K4MC3-vK0f2OvQ.js +1023 -0
  111. package/dist/railroadDiagram-Y72NRBL7-j6ZrTmRp.js +77 -0
  112. package/dist/regionMap-Cme-JyV_.js +128 -0
  113. package/dist/regionMap.en-US-Bwr2_p32.js +128 -0
  114. package/dist/requirementDiagram-EQYSW5RA-DgfEyljA.js +886 -0
  115. package/dist/sankeyDiagram-SY24JHO5-CImx-IX0.js +1160 -0
  116. package/dist/scenarioBar-BV43p7n-.js +122 -0
  117. package/dist/scenarioBar.en-US-5KqMQ2Bg.js +122 -0
  118. package/dist/scheduleGantt-CTYO-zYP.js +180 -0
  119. package/dist/scheduleGantt.en-US-hE7mvVUW.js +180 -0
  120. package/dist/searchBox-Ca7w0f_6.js +67 -0
  121. package/dist/searchBox.en-US-ArS_XBvB.js +67 -0
  122. package/dist/segmentedFilter-MhjVcWo0.js +80 -0
  123. package/dist/segmentedFilter.en-US-BxNrQO5T.js +80 -0
  124. package/dist/sequenceDiagram-BLEHNHQU-nWmjd1ci.js +2969 -0
  125. package/dist/sizeCapture-INFHLROL-D3jlbt7h.js +46 -0
  126. package/dist/stageChain-BxBafwjD.js +74 -0
  127. package/dist/stageChain.en-US-CP0G27n8.js +74 -0
  128. package/dist/stateDiagram-v2-A6IESKWZ-DG1ZetEu.js +1514 -0
  129. package/dist/subgraph-7n4SwliR.js +71 -0
  130. package/dist/subgraph.en-US-BNvY18IW.js +71 -0
  131. package/dist/swimlanes-B3ENRKFQ-cCmJE8AU.js +4991 -0
  132. package/dist/swimlanesDiagram-AYQRV4AK-CtuhyguU.js +14 -0
  133. package/dist/taskInbox-DGWYeI2b.js +118 -0
  134. package/dist/taskInbox.en-US-B-OzDmVl.js +118 -0
  135. package/dist/text-BqSVQKS6.js +78 -0
  136. package/dist/text.en-US-BhAxy_LE.js +78 -0
  137. package/dist/timeline-definition-JXYKGLGB-Cc-INsOv.js +1057 -0
  138. package/dist/trendChart-BjEeRS5_.js +135 -0
  139. package/dist/trendChart.en-US-BBGqWUKM.js +135 -0
  140. package/dist/useLabData-Df-jEHKs.js +20470 -0
  141. package/dist/usecaseDiagram-WPOLBNNX-r8wVjopm.js +7920 -0
  142. package/dist/vennDiagram-Q3Y3IDCW-BZiOcgrj.js +1579 -0
  143. package/dist/wardleyDiagram-IVAIDKWA-16jd07C_.js +675 -0
  144. package/dist/workshop-app-DnHNjBqy.js +86038 -0
  145. package/dist/workshop-app.css +1 -0
  146. package/dist/workshop-app.js +4 -0
  147. package/dist/world-Djau1JyJ.js +9 -0
  148. package/dist/xychartDiagram-4URNHDU4-C8DwWQNh.js +1460 -0
  149. package/dist-cli/workshop.js +341 -218
  150. package/example/host.js +109 -0
  151. package/example/index.html +93 -0
  152. package/example/server.mjs +237 -0
  153. package/index.d.ts +48 -0
  154. package/lib/validate.js +47 -1
  155. package/package.json +17 -5
  156. package/runtime/frame-runtime.js +13 -1
  157. package/workshop-component.js +32 -12
  158. package/workshop.js +2 -0
@@ -0,0 +1,46 @@
1
+ import { _ as o } from "./mermaid.core-yQghUlIz.js";
2
+ var c = 1;
3
+ function i() {
4
+ if (!(typeof globalThis > "u"))
5
+ return globalThis;
6
+ }
7
+ o(i, "getCaptureGlobal");
8
+ function p() {
9
+ return !!i()?.mermaidCaptureSizes;
10
+ }
11
+ o(p, "shouldCaptureSizes");
12
+ function u() {
13
+ return typeof location > "u" ? "browser-dev" : `${location.pathname}${location.search}`;
14
+ }
15
+ o(u, "capturedFromLocation");
16
+ function d(n, r) {
17
+ const t = i();
18
+ if (!t)
19
+ return;
20
+ const e = r.node(), s = ((e && "ownerSVGElement" in e ? e.ownerSVGElement : null) ?? e)?.id ?? "(unknown)";
21
+ t.mermaidCapturedSizes ??= [];
22
+ const a = { svgId: s, sizes: n };
23
+ t.mermaidCapturedSizes.push(a), t.mermaidLastCapturedSizes = a;
24
+ }
25
+ o(d, "emitCapturedSizes");
26
+ function m(n, r) {
27
+ const t = [];
28
+ for (const e of r.nodes)
29
+ e.isGroup || t.push({ id: e.id, width: e.width ?? 0, height: e.height ?? 0 });
30
+ t.length !== 0 && d(
31
+ {
32
+ metadata: {
33
+ captureVersion: c,
34
+ capturedAt: (/* @__PURE__ */ new Date()).toISOString(),
35
+ capturedFrom: u()
36
+ },
37
+ nodes: t
38
+ },
39
+ n
40
+ );
41
+ }
42
+ o(m, "captureNodeSizes");
43
+ export {
44
+ m as captureNodeSizes,
45
+ p as shouldCaptureSizes
46
+ };
@@ -0,0 +1,74 @@
1
+ const n = `# 环节链路(stageChain)
2
+
3
+ 把几类对象按业务顺序排成一排,每个环节显示关联的对象数量,点开可看具体记录。用来看一批对象流转到各环节的数量,判断哪个环节堆积或断档。
4
+
5
+ ## 适用与不适用
6
+
7
+ - 适用:业务沿几类对象依次推进,要看每一环节有多少。例如 订单 → 工单 → 入库 → 发货,或 线索 → 商机 → 合同 → 回款。
8
+ - 不适用:
9
+ - 要按资源与时间排任务、检查冲突:用调度甘特(\`scheduleGantt\`)。
10
+ - 只看一批对象的起止日期分布:用甘特图(\`ganttChart\`)。
11
+ - 看对象之间具体怎么连:用关系子图(\`subgraph\`)。
12
+ - 看同一类对象按状态分布:用图表(\`trendChart\`)或透视表(\`pivotTable\`)。
13
+
14
+ ## 本体契约
15
+
16
+ | 角色 | 对象类要求 | 必要的属性 | 关系 | 必填 |
17
+ | --- | --- | --- | --- | --- |
18
+ | 数据源对象 | 链路的起点,或用来限定范围的一批对象(订单) | 标识 | — | 是 |
19
+ | 环节 | 每个环节一个对象类,1 到 9 个,按顺序排列 | 可选:展开时显示的属性 | 从数据源对象到该环节对象的关系路径,可经多跳;不配则只显示该类对象总数 | 至少 1 个环节 |
20
+
21
+ 环节显示的数量,是沿关系路径从数据源中的对象出发能到达的该环节对象数。路径必须是知识网络里真实存在的关系。
22
+
23
+ ## 组件内置的判断
24
+
25
+ - 数量:配了关系路径的环节,数的是数据源中(按页面筛选后)的对象沿路径到达的对象数;页面没有筛选时数全部。标题处显示“全部”或“按当前筛选”。
26
+ - 没配关系路径的环节,显示该对象类的总数,不随筛选变化,鼠标悬停有提示。
27
+ - 数量取不到时显示“—”,正在取时显示加载。
28
+ - 展开记录:环节配了“展开显示的属性”时,点击展开,最多列 20 条。
29
+
30
+ 不判断某个环节“多”还是“少”。
31
+
32
+ ## 扩展点
33
+
34
+ 无。哪些对象算进某个环节,由关系路径决定;要按业务状态限定,把条件做成数据源的筛选或知识网络里的关系。
35
+
36
+ ## 交互与联动
37
+
38
+ - **写入**:无筛选写入。可配置“点击时向 Agent 提问”(点到环节,问题里可用环节名称与数量),先交宿主页面(应用嵌入时),其次页面上的 Agent 对话,都没有时在抽屉里回答。
39
+ - **读取**:跟随页面的“跟随的筛选”,数量随筛选变化(配了关系路径的环节)。
40
+ - 环节既没配展开属性、也没配提问时,不能点击。
41
+
42
+ ## 场景配方
43
+
44
+ ### 订单履约:订单卡在哪一环
45
+
46
+ | 角色 | 对应 |
47
+ | --- | --- |
48
+ | 数据源对象 | 销售订单 |
49
+ | 环节 | 订单(路径为空)→ 生产工单(订单→工单)→ 入库单(订单→工单→入库单)→ 发货单(订单→发货单) |
50
+
51
+ **知识网络中要有:** 订单到工单、工单到入库单、订单到发货单的关系;各对象类的标识。
52
+
53
+ **检查项:** 页面筛选某客户后,各环节数量随之减少;某环节明显少于上一环节,点开可看到具体记录;没配路径的环节数量不变并有提示。
54
+
55
+ ## 给 AI 的指引
56
+
57
+ 1. 先问用户:链路按什么顺序、每个环节对应哪类对象、从哪类对象出发统计。顺序按业务流程,不按字母。
58
+ 2. 每个环节都要有从数据源对象出发的关系路径;知识网络里没有就列出缺的关系,不要用不相干的对象凑数。
59
+ 3. 想让数量随筛选变化,必须配关系路径;没配路径的环节只显示总数。
60
+ 4. 想点击环节后筛选别的组件:本组件不写入筛选,需要时改用带筛选写入的组件,或配“向 Agent 提问”。
61
+ 5. 常见错误:
62
+ - 路径方向写反,数量为 0。
63
+ - 环节超过 9 个。
64
+ - 展开属性选的是别的对象类的属性。
65
+
66
+ ## 限制
67
+
68
+ - 环节 1 到 9 个;展开最多 20 条。
69
+ - 一个数据源,只数关系可达的对象,不显示环节之间的转化率。
70
+ - 没配关系路径的环节不跟随筛选。
71
+ `;
72
+ export {
73
+ n as default
74
+ };
@@ -0,0 +1,74 @@
1
+ const e = `# Stage chain (stageChain)
2
+
3
+ Lines up several object types in business order and shows how many related objects each stage has; click a stage to see the records. Use it to see how many objects have reached each stage and to spot where they pile up or drop off.
4
+
5
+ ## When to use it and when not
6
+
7
+ - Use it when work moves through several object types in turn and you need the count at each stage. For example order → work order → receipt → shipment, or lead → opportunity → contract → payment.
8
+ - Do not use it:
9
+ - To schedule tasks on resources and check conflicts: use the Schedule Gantt (\`scheduleGantt\`).
10
+ - To see only the spread of start and end dates: use the Gantt chart (\`ganttChart\`).
11
+ - To see how objects are linked one by one: use the related graph (\`subgraph\`).
12
+ - To see one object type by status: use the chart (\`trendChart\`) or pivot table (\`pivotTable\`).
13
+
14
+ ## Ontology contract
15
+
16
+ | Role | Object type | Required properties | Relations | Required |
17
+ | --- | --- | --- | --- | --- |
18
+ | Source objects | The starting point of the chain, or the set that limits scope (orders) | An identifier | — | Yes |
19
+ | Stage | One object type per stage, 1 to 9, in order | Optional: properties to show when expanded | A relation path from the source objects to the stage's objects, possibly several hops; without it only the total of that type is shown | At least 1 stage |
20
+
21
+ The number at a stage is how many of its objects can be reached along the relation path from the objects in the data source. The path must be a relation that really exists in the knowledge network.
22
+
23
+ ## Built-in checks
24
+
25
+ - Count: for a stage with a relation path, it counts the objects reached from the source objects (after the page's filters); with no filter it counts all. The header says "All" or "By current filters".
26
+ - A stage without a relation path shows the total of that object type, does not follow filters, and shows a hint on hover.
27
+ - When a count cannot be read it shows "—"; while loading it shows a spinner.
28
+ - Expanding: a stage with "Properties shown when expanded" opens on click and lists up to 20 records.
29
+
30
+ It does not judge whether a stage count is too high or too low.
31
+
32
+ ## Extension points
33
+
34
+ None. Which objects count at a stage is decided by the relation path; to limit by business state, make the condition a filter of the data source or a relation in the knowledge network.
35
+
36
+ ## Interaction and links
37
+
38
+ - **Writes**: no filter. You can set "ask the Agent on click" (clicking a stage; the question can use the stage name and count), it goes first to the host page (when embedded), then to the Agent chat on the page, and with neither it is answered in a drawer.
39
+ - **Reads**: follows the page's "Filters followed"; counts change with them (for stages with a relation path).
40
+ - A stage with neither expand properties nor a question cannot be clicked.
41
+
42
+ ## Recipes
43
+
44
+ ### Order fulfilment: where orders get stuck
45
+
46
+ | Role | Maps to |
47
+ | --- | --- |
48
+ | Source objects | Sales orders |
49
+ | Stages | Order (empty path) → production work order (order → work order) → receipt (order → work order → receipt) → shipment (order → shipment) |
50
+
51
+ **What the knowledge network needs:** relations order → work order, work order → receipt, order → shipment; an identifier on each object type.
52
+
53
+ **Checks:** after filtering by one customer, every stage count drops; a stage far below the one before it opens to show the records; a stage without a path keeps its count and shows the hint.
54
+
55
+ ## Guidance for AI
56
+
57
+ 1. Ask first: in what order the chain runs, which object type each stage is, and which object type counting starts from. Follow the business flow, not the alphabet.
58
+ 2. Every stage needs a relation path from the source objects. When the knowledge network lacks one, list the missing relations; do not fill in with unrelated objects.
59
+ 3. For counts that follow filters, set a relation path; a stage without one shows only its total.
60
+ 4. To filter other components by clicking a stage: this component writes no filter; use a component that does, or set "ask the Agent".
61
+ 5. Common mistakes:
62
+ - The path runs the wrong way and the count is 0.
63
+ - More than 9 stages.
64
+ - Expand properties taken from a different object type.
65
+
66
+ ## Limits
67
+
68
+ - 1 to 9 stages; up to 20 records when expanded.
69
+ - One data source; it counts reachable objects only and shows no conversion rate between stages.
70
+ - A stage without a relation path does not follow filters.
71
+ `;
72
+ export {
73
+ e as default
74
+ };