@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,104 @@
1
+ const n = `# 指标卡组(metricCards)
2
+
3
+ 一排数字卡片,每张统计一项指标,可显示同比环比与趋势;点击卡片可以筛选页面。用来回答“现在有多少、多少已超期、比上月涨了还是降了”。
4
+
5
+ ## 适用与不适用
6
+
7
+ - 适用:页面顶部的关键数字,例如订单总数、已超期数、金额合计、逾期占比。每张卡可以只算满足条件的对象。
8
+ - 不适用:
9
+ - 看变化趋势、按维度分布:用图表(\`trendChart\`)。
10
+ - 按取值分段并带数量的筛选按钮:用分段筛选(\`segmentedFilter\`)。
11
+ - 看明细:用对象表(\`objectTable\`)。
12
+
13
+ ## 本体契约
14
+
15
+ | 角色 | 对象类要求 | 必要的属性 | 关系 | 必填 |
16
+ | --- | --- | --- | --- | --- |
17
+ | 被统计的对象 | 页面数据源对应的对象类 | 条件里用到的属性;求和、平均、最大、最小要一个数字属性 | 无 | 是 |
18
+ | 分期日期 | 同一对象类 | 一个日期属性:按期统计、同比环比按它归期;不选时取进度第一步的日期 | 无 | 否:只在“基准日期所在期”口径下需要 |
19
+ | 对象指标 | 知识网络里已发布的对象指标 | 指标自己定义口径、时间维度与可跟随的分析维度 | 指标挂在对象类上 | 否:只在一张卡改用平台算时需要 |
20
+
21
+ ## 组件内置的判断
22
+
23
+ 与行业无关,组件自己计算:
24
+
25
+ - 统计方式:计数、求和、平均、最小、最大、去重计数、占比(满足条件的数量除以全部)。占比的同环比以百分点显示。
26
+ - 统计口径:
27
+ - “截至基准日期”(默认):算基准日期那天处于各状态的对象,与告警、表格一致,适合已超期、进行中;同比对比去年的同一天,环比对比上一期的同一天。
28
+ - “基准日期所在期”:只算日期落在这一期的对象,适合本月签约数;同比环比按相同天数对比。
29
+ - 周期:日、周、月、季度、年,默认月。
30
+ - 同环比与变化方向:整组可设,单张卡可覆盖;涨跌的红绿由“变化方向”决定,不填时按色调推断(危险、警示越低越好,成功越高越好)。对比期没有数据时默认不显示,打开“对比期无数据时显示「无对比数据」”才显示。
31
+ - 趋势:显示了同环比的页面内统计卡,会画最近 6 期的小趋势线,至少有两期有数据时才画。
32
+ - 危险色调的卡片数值大于 0 时自动强调。
33
+ - 页面处于方案中时,卡片显示方案改动带来的变化(相对现状的差值)。
34
+
35
+ ## 扩展点
36
+
37
+ ### 对象指标
38
+
39
+ - **用途**:口径复杂、或不能受页面读取行数限制的指标,例如“按全部对象算的逾期率”。口径在知识网络里定义,组件只显示。
40
+ - **在哪里配**:指标卡组每张卡的“数值来源”:选“页面内统计”或一个对象指标。
41
+ - **接什么**:知识网络里已发布的对象指标;只能用在对象类数据源或它的子集上。
42
+ - **输入**:指标的编号与版本、基准日期、统计口径与周期、这张卡的条件、组件跟随的取值筛选。条件和筛选只能用指标开放的属性;指标没有时间维度时不随基准日期,没有开放的分析维度时不随取值筛选。
43
+ - **输出**:平台算好的数值,以及同环比的对比值、不随哪些筛选的提示、数据不完整的标记。
44
+ - **失败与超时**:无权查看、数据量超出平台上限、结果已变化需刷新、指标不可用、当前环境不提供对象指标,分别在卡片上说明,数值显示“—”。条件用了指标没开放的属性时,保存前就会报错。
45
+ - **结果怎样显示**:悬停显示口径(时间窗、跟随与不随的筛选、计算时间)。这类卡**不写入筛选**:点击时,若卡组配置了向 Agent 提问,就提问;否则列出参与计算的对象;两者都没有时点击无效。
46
+
47
+ 指标卡的口径、条件里的业务判断,都放在知识网络的指标和属性里,不要在组件配置里重写。
48
+
49
+ ## 交互与联动
50
+
51
+ - **写入**:“点击写入”选一个变量。选取值筛选时,写这张卡统计的取值(卡的条件只能是“某字段为某些值”);选对象集合筛选时,写它算到的那批对象。再点一次,或点没有条件的卡,清空筛选。不选变量时卡片不可点击(除非配了向 Agent 提问)。
52
+ - **读取**:跟随“联动”页勾选的筛选,只统计留下的对象。
53
+ - **提问与动作**:卡片点击可以配置向 Agent 提问,问题里可引用卡的名称与数值。
54
+
55
+ ## 场景配方
56
+
57
+ ### 合同管理:签约与回款概览
58
+
59
+ | 角色 | 对应 |
60
+ | --- | --- |
61
+ | 被统计的对象 | 合同 |
62
+ | 分期日期 | 签约日期 |
63
+
64
+ **知识网络中要有:** 合同的状态(进度)、金额、签约日期。
65
+
66
+ **做法:** 口径选“基准日期所在期”,周期选月,配“本月签约数”(计数)、“本月签约金额”(求和);另配“已超期”(条件:进度状态为超期,色调危险),打开环比。
67
+
68
+ **检查项:** 拖动基准日期到上月,数字随之变化;点“已超期”卡,对象表只剩超期合同;再点一次恢复。
69
+
70
+ ### 生产:按全部工单算的良品率
71
+
72
+ | 角色 | 对应 |
73
+ | --- | --- |
74
+ | 被统计的对象 | 工单 |
75
+ | 对象指标 | 良品率(知识网络中定义) |
76
+
77
+ **知识网络中要有:** 已发布的“良品率”对象指标,开放产线、班次等分析维度与一个时间维度。
78
+
79
+ **做法:** 一张卡的“数值来源”选这个指标;其他卡仍用页面内统计。
80
+
81
+ **检查项:** 悬停能看到口径与时间窗;点击卡片列出参与计算的工单;按产线筛选时数值随之变化。
82
+
83
+ ## 给 AI 的指引
84
+
85
+ 1. 先问用户:要看哪几个数字?每个数字怎么算(计数、求和、占比)、算哪些对象?要不要同比环比?按“截至某天”还是“这一期”看?
86
+ 2. 点击是否要筛选页面:要,则“点击写入”选取值或对象集合筛选变量;不要,就不选。
87
+ 3. 口径复杂、或对象很多时,先看知识网络里有没有对象指标;有就用,没有就列出要建的指标,不要在页面里堆条件。
88
+ 4. 常见错误:
89
+ - 写入取值筛选,却给卡配了复杂条件(多个条件、数值比较):取值筛选只能保存“某字段为某些值”,复杂的改写入对象集合;并且写入同一个取值筛选的卡必须按同一个字段取值。
90
+ - 求和、平均、最大、最小没选数字属性:结果不是数字,要选数字列。
91
+ - 想看“已超期”却用“基准日期所在期”口径:超期是状态,用“截至基准日期”。
92
+ - 在对象指标卡的条件里用指标没开放的属性:被拒绝。
93
+ - 把占比当计数用:占比是满足条件的数量除以全部,显示为百分比。
94
+
95
+ ## 限制
96
+
97
+ - 一组最多 8 张卡,至少 1 张。
98
+ - 页面内统计读入的对象有行数上限(对象类数据源最多 5000 行,Cypher 数据源最多 10000 行,查询没写 LIMIT 时 1000 行),超过时只统计读到的部分;对象指标由平台算,不受此限。
99
+ - 对象指标卡不写入筛选。
100
+ - 同比环比的趋势线最多画最近 6 期。
101
+ `;
102
+ export {
103
+ n as default
104
+ };
@@ -0,0 +1,104 @@
1
+ const e = `# Metric cards (metricCards)
2
+
3
+ A row of number cards, each counting one metric, with optional year-over-year and period-over-period change and a trend; clicking a card can filter the page. Use it to answer "how many are there now, how many are overdue, and is that up or down on last month".
4
+
5
+ ## When to use it and when not
6
+
7
+ - Use it for the key numbers at the top of a page, for example total orders, overdue count, total amount, overdue share. Each card can count only the objects that meet a condition.
8
+ - Do not use it:
9
+ - To see a trend or a breakdown by dimension: use the chart (\`trendChart\`).
10
+ - For filter buttons that split by value with counts: use the segmented filter (\`segmentedFilter\`).
11
+ - To see details: use the object table (\`objectTable\`).
12
+
13
+ ## Ontology contract
14
+
15
+ | Role | Object type requirement | Required properties | Relations | Required |
16
+ | --- | --- | --- | --- | --- |
17
+ | Counted object | The object type of the page's data source | The properties used in conditions; a number property for sum, average, max or min | None | Yes |
18
+ | Period date | The same object type | A date property that assigns objects to periods for period counts and comparisons; when empty, the date of the first progress step | None | No: needed only with the "period of the base date" basis |
19
+ | Object metric | A published object metric in the knowledge network | The metric defines its own definition, time dimension and the analysis dimensions it can follow | The metric hangs on an object type | No: needed only when a card is computed by the platform |
20
+
21
+ ## Built-in checks
22
+
23
+ The component computes these itself, whatever the industry:
24
+
25
+ - Aggregates: count, sum, average, min, max, distinct count, share (matching objects divided by all). Changes in a share show in percentage points.
26
+ - Counting basis:
27
+ - "As of the base date" (default): counts the objects in each state on the base date, consistent with alerts and tables; suited to overdue and in progress. Year-over-year compares the same day last year, period-over-period the same day in the previous period.
28
+ - "Period of the base date": counts only objects whose date falls in this period, suited to signed this month; comparisons use the same number of days.
29
+ - Period: day, week, month, quarter, year; month by default.
30
+ - Comparison and direction: set for the group, overridable per card. The red or green of a change comes from "direction"; when empty it follows the tone (danger and warning: lower is better; success: higher is better). A comparison period with no data is hidden unless "show no-data note when the comparison period has no data" is on.
31
+ - Trend: page-counted cards that show a comparison draw a small trend of the last 6 periods, only when at least two periods have data.
32
+ - A danger-tone card is emphasized automatically when its value is above 0.
33
+ - Inside a scenario, cards show how much the scenario's changes moved the value from the current data.
34
+
35
+ ## Extension points
36
+
37
+ ### Object metric
38
+
39
+ - **Purpose**: metrics whose definition is complex or that must not be limited by the number of rows the page reads, such as an overdue rate over all objects. The definition lives in the knowledge network; the component only displays it.
40
+ - **Where to configure**: the "value source" of each card: "counted on the page" or an object metric.
41
+ - **What to connect**: a published object metric in the knowledge network; usable only on an object type data source or a subset of one.
42
+ - **Input**: the metric's id and version, the base date, the counting basis and period, the card's conditions, and the value filters the group follows. Conditions and filters may only use the properties the metric opens. A metric with no time dimension does not follow the base date; one with no open analysis dimensions does not follow value filters.
43
+ - **Output**: the value computed by the platform, the compared values, notes on which filters it does not follow, and a mark when the data is incomplete.
44
+ - **Failure and timeout**: no permission, data volume over the platform's limit, result changed (refresh needed), metric unavailable, or object metrics not offered in this environment are each explained on the card, and the value shows a dash. A condition using a property the metric does not open is rejected before saving.
45
+ - **How the result shows**: hovering shows the definition (time window, followed and unfollowed filters, time of computation). These cards **write no filter**: a click asks the Agent when the group is set to ask, otherwise lists the objects behind the value; with neither, a click does nothing.
46
+
47
+ Business rules in a metric's definition or conditions belong in the knowledge network's metrics and properties; do not rewrite them in the component's config.
48
+
49
+ ## Interaction and links
50
+
51
+ - **Writes**: choose a variable under "write on click". With a value filter, a card writes the values it counts (its condition can only be "a field is one of some values"). With an object set filter, it writes the objects it counted. Clicking again, or a card with no condition, clears the filter. With no variable chosen a card cannot be clicked (unless it is set to ask the Agent).
52
+ - **Reads**: it follows the filters ticked on its link tab and counts only the objects left.
53
+ - **Questions and actions**: a card click can be set to ask the Agent, and the question can refer to the card's name and value.
54
+
55
+ ## Recipes
56
+
57
+ ### Contract management: signing and collection overview
58
+
59
+ | Role | Maps to |
60
+ | --- | --- |
61
+ | Counted object | Contract |
62
+ | Period date | Signing date |
63
+
64
+ **Needed in the knowledge network:** the contract's status (progress), amount and signing date.
65
+
66
+ **How:** choose "period of the base date" with month as the period. Add "signed this month" (count) and "signed amount this month" (sum). Add "overdue" (condition: progress state is overdue, danger tone) and turn on period-over-period.
67
+
68
+ **Checks:** drag the base date to last month and the numbers change; click the "overdue" card and the object table keeps only overdue contracts; click again to restore.
69
+
70
+ ### Production: yield over all work orders
71
+
72
+ | Role | Maps to |
73
+ | --- | --- |
74
+ | Counted object | Work order |
75
+ | Object metric | Yield (defined in the knowledge network) |
76
+
77
+ **Needed in the knowledge network:** a published "yield" object metric that opens line and shift as analysis dimensions and has a time dimension.
78
+
79
+ **How:** set one card's "value source" to this metric; the other cards stay counted on the page.
80
+
81
+ **Checks:** hovering shows the definition and time window; clicking lists the work orders behind the value; filtering by line changes the value.
82
+
83
+ ## Guidance for AI
84
+
85
+ 1. Ask the user first: which numbers, how each is counted (count, sum, share) and over which objects, whether to compare year over year or period over period, and whether to look "as of a day" or "this period".
86
+ 2. Decide whether a click should filter the page: if so, point "write on click" to a value or object set filter variable; if not, leave it empty.
87
+ 3. When the definition is complex or the object count is large, check first whether the knowledge network has an object metric. Use it if so; if not, list the metric to create instead of piling conditions into the page.
88
+ 4. Common mistakes:
89
+ - Writing a value filter while a card has a complex condition (several conditions, number comparisons): a value filter can only hold "a field is one of some values". Use an object set filter for complex ones; cards that write the same value filter must also use the same field.
90
+ - Sum, average, max or min without a number property: choose a number column.
91
+ - Using "period of the base date" for something like overdue: overdue is a state, so use "as of the base date".
92
+ - A condition on an object metric card using a property the metric does not open: it is rejected.
93
+ - Treating share as a count: a share is matching objects divided by all, shown as a percentage.
94
+
95
+ ## Limits
96
+
97
+ - 1 to 8 cards in a group.
98
+ - Page-counted cards use the rows read; an object type data source reads at most 5000 rows and a Cypher data source 10,000 (1,000 when its query sets no LIMIT); beyond that only what was read is counted. Object metrics are computed by the platform and are not limited this way.
99
+ - Object metric cards write no filter.
100
+ - The trend line covers at most the last 6 periods.
101
+ `;
102
+ export {
103
+ e as default
104
+ };