@openbkn/workshop 0.2.2-rc.5 → 0.2.2-rc.6
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/README.md +79 -8
- package/component.d.ts +10 -0
- package/dist/ActionConfirm-DJ91X3ml.js +236 -0
- package/dist/ActionFailure-ZgPt_3B-.js +37 -0
- package/dist/AgentChat-CRYai8ge.js +1062 -0
- package/dist/AppFormModal-D73ucaHK.js +4282 -0
- package/dist/AppListPage-D87piiOw.js +1364 -0
- package/dist/AskDrawer-BUMYsRnt.js +38 -0
- package/dist/ComputedView-CgYrDbx1.js +3221 -0
- package/dist/ConclusionApply-sjGfoEBY.js +153 -0
- package/dist/CypherEditor-lus6FA5L.js +485 -0
- package/dist/LandingList-6JI6864C.js +230 -0
- package/dist/MenuUnfoldOutlined-Cdg24l2h.js +27 -0
- package/dist/ModelTrial-ClHFGTpQ.js +359 -0
- package/dist/PageRenderer-DBd_g6mN.js +85480 -0
- package/dist/README-DjRyTQSR.js +76 -0
- package/dist/ScenarioApply-DtW_hh47.js +590 -0
- package/dist/SimulateForm-C-i08Jjd.js +153 -0
- package/dist/Subgraph-CnrkH9AN.js +32586 -0
- package/dist/WorkshopLabPage-DiVXQL9e.js +11364 -0
- package/dist/WorkshopRunPage-6hjRUf64.js +253 -0
- package/dist/abnfDiagram-WEYOIA3C-beRNhN3c.js +87 -0
- package/dist/action-type-tool.service-B2B74fKC.js +1060 -0
- package/dist/actionButton-DA5CNEzx.js +94 -0
- package/dist/actionButton.en-US-qjeqA7hs.js +94 -0
- package/dist/agentChat-EoDznd58.js +116 -0
- package/dist/agentChat.en-US-B6-pFd9Y.js +116 -0
- package/dist/alertList-DqditwM8.js +84 -0
- package/dist/alertList.en-US-BAXAgltP.js +84 -0
- package/dist/architectureDiagram-ZHVYKT53-DY2l1qxx.js +4779 -0
- package/dist/asOfSlider-QPvHWUMV.js +83 -0
- package/dist/asOfSlider.en-US-BI4jVfSn.js +83 -0
- package/dist/bkn-agent-execution.service-DVh-SHyl.js +205 -0
- package/dist/blockDiagram-RJAE7QA3-DR0mjN2h.js +1435 -0
- package/dist/c4Diagram-XDPPPE54-DH5zsGug.js +1518 -0
- package/dist/channel-B034hcOF.js +5 -0
- package/dist/china-C6m7zXIv.js +9 -0
- package/dist/chunk-2E7WHVMD-Ba3svxgx.js +664 -0
- package/dist/chunk-2Q5K7J3B-rT4eU6_y.js +15 -0
- package/dist/chunk-4EMNKR2T-C1kQZYHK.js +262 -0
- package/dist/chunk-55XCU76K-dcpLOktb.js +68 -0
- package/dist/chunk-5VM5RSS4-BdpQuzmO.js +19 -0
- package/dist/chunk-JWPE2WC7-CDBrSjU7.js +8 -0
- package/dist/chunk-VQ5W62QI-BiVKc40w.js +19 -0
- package/dist/chunk-XXDRQBXY-CPYrcdVW.js +8 -0
- package/dist/chunk-ZCHMQSOR-BG8OLpvb.js +451 -0
- package/dist/classDiagram-v2-4MYWR3UA-DqbpQpwI.js +1564 -0
- package/dist/component.d-DFoMKuUv.js +179 -0
- package/dist/cose-bilkent-JH36ORCC-CdXk4sPf.js +2609 -0
- package/dist/customComponents-DasaZ6pq.js +4 -0
- package/dist/customComponents.en-US-CkabuCXg.js +79 -0
- package/dist/customParseFormat-C0uLEpdq.js +182 -0
- package/dist/cynefin-EF2NZ3EQ-D7MVnMHu.js +21746 -0
- package/dist/cynefinDiagram-WF24UDRP-BYT_KpDL.js +299 -0
- package/dist/cytoscape.esm-BCV9V6aO.js +18760 -0
- package/dist/d3-scale-DA8IHmf0.js +1841 -0
- package/dist/dagre-NK4GIZVX-l-ghPdM8.js +2154 -0
- package/dist/dateRange-BbkLMg8L.js +79 -0
- package/dist/dateRange.en-US-CV12Q02G.js +79 -0
- package/dist/dayjs.min-DZ-YV8Mv.js +284 -0
- package/dist/diagram-CBK3MWTC-Bt3HiwvA.js +542 -0
- package/dist/diagram-I5XIIV2D-DcbqfBjx.js +150 -0
- package/dist/diagram-ODIL2UCW-9PC1n3n5.js +346 -0
- package/dist/diagram-PFBEJUXE-DGhr2kc7.js +478 -0
- package/dist/diagram-RJA3I4VV-DwzpOjZ_.js +219 -0
- package/dist/diagram-TYUNFSNR-B3Bd3TDU.js +2583 -0
- package/dist/dropdownFilter-DOi_8-ZT.js +76 -0
- package/dist/dropdownFilter.en-US-BiXpvXtF.js +76 -0
- package/dist/ebnfDiagram-V4P3TTPT-E5NN2oKc.js +109 -0
- package/dist/elk-QONTBCTQ-dFjcujl_.js +49170 -0
- package/dist/erDiagram-KYQIGQAA-BMrasBzB.js +1061 -0
- package/dist/eventList-CnsAwfDS.js +115 -0
- package/dist/eventList.en-US-Cof3rCLq.js +115 -0
- package/dist/eventReport-XS-HegnH.js +76 -0
- package/dist/eventReport.en-US-DTx4vzWT.js +76 -0
- package/dist/flowDiagram-IUGLLWBU-BGIBH0q0.js +1769 -0
- package/dist/ganttChart-DEeSvTJA.js +77 -0
- package/dist/ganttChart.en-US-SwRKrnoD.js +77 -0
- package/dist/ganttDiagram-R7GPNTJY-C0tb1Lpp.js +1741 -0
- package/dist/generateCypher-Ch9_lQa6.js +399 -0
- package/dist/gitGraphDiagram-PDYL7XHY-DBqcOa-c.js +815 -0
- package/dist/graph-CKJmgLki.js +1541 -0
- package/dist/index-BA-GzCXt.js +441 -0
- package/dist/infoDiagram-MVDRKAX5-Bwuki4JA.js +24 -0
- package/dist/ishikawaDiagram-HPEHV2GE-Dz4d6ygx.js +622 -0
- package/dist/journeyDiagram-BOSHW7O7-C99m34Bb.js +834 -0
- package/dist/kanban-definition-FNSA4HC5-mdqjODsT.js +724 -0
- package/dist/katex-BsrBVQKd.js +11314 -0
- package/dist/manifest-BjV1PJ6u.js +41 -0
- package/dist/mermaid.core-yQghUlIz.js +17642 -0
- package/dist/metricCards-CSb-_cT2.js +104 -0
- package/dist/metricCards.en-US-BLLhRsQU.js +104 -0
- package/dist/mindmap-definition-6OY57UG3-BZhO2wX4.js +834 -0
- package/dist/modelTrial-Bvb-RhGt.js +137 -0
- package/dist/modelTrial.en-US-DYcuor-G.js +137 -0
- package/dist/models-DekiCOuZ.js +6 -0
- package/dist/object-metric-numeric-vs3BeDkH.js +42 -0
- package/dist/object-metric.service-flZgBMRX.js +233 -0
- package/dist/objectDetail-SQUbp4Py.js +117 -0
- package/dist/objectDetail.en-US-DW3mlONM.js +117 -0
- package/dist/objectList-D99wPtJH.js +97 -0
- package/dist/objectList.en-US-PBBNyVLW.js +97 -0
- package/dist/objectTable-0jsFFMN3.js +127 -0
- package/dist/objectTable.en-US-yWEs8qc_.js +127 -0
- package/dist/pegDiagram-ECIUJNBX-BDa5RfZt.js +95 -0
- package/dist/pieDiagram-GNMPY74T-DNVtzXPv.js +165 -0
- package/dist/pivotTable-CHmQw18-.js +102 -0
- package/dist/pivotTable.en-US-B4uv4P08.js +102 -0
- package/dist/prompt-DYrjlEFr.js +373 -0
- package/dist/quadrantDiagram-D57K4MC3-vK0f2OvQ.js +1023 -0
- package/dist/railroadDiagram-Y72NRBL7-j6ZrTmRp.js +77 -0
- package/dist/regionMap-Cme-JyV_.js +128 -0
- package/dist/regionMap.en-US-Bwr2_p32.js +128 -0
- package/dist/requirementDiagram-EQYSW5RA-DgfEyljA.js +886 -0
- package/dist/sankeyDiagram-SY24JHO5-CImx-IX0.js +1160 -0
- package/dist/scenarioBar-BV43p7n-.js +122 -0
- package/dist/scenarioBar.en-US-5KqMQ2Bg.js +122 -0
- package/dist/scheduleGantt-CTYO-zYP.js +180 -0
- package/dist/scheduleGantt.en-US-hE7mvVUW.js +180 -0
- package/dist/searchBox-Ca7w0f_6.js +67 -0
- package/dist/searchBox.en-US-ArS_XBvB.js +67 -0
- package/dist/segmentedFilter-MhjVcWo0.js +80 -0
- package/dist/segmentedFilter.en-US-BxNrQO5T.js +80 -0
- package/dist/sequenceDiagram-BLEHNHQU-nWmjd1ci.js +2969 -0
- package/dist/sizeCapture-INFHLROL-D3jlbt7h.js +46 -0
- package/dist/stageChain-BxBafwjD.js +74 -0
- package/dist/stageChain.en-US-CP0G27n8.js +74 -0
- package/dist/stateDiagram-v2-A6IESKWZ-DG1ZetEu.js +1514 -0
- package/dist/subgraph-7n4SwliR.js +71 -0
- package/dist/subgraph.en-US-BNvY18IW.js +71 -0
- package/dist/swimlanes-B3ENRKFQ-cCmJE8AU.js +4991 -0
- package/dist/swimlanesDiagram-AYQRV4AK-CtuhyguU.js +14 -0
- package/dist/taskInbox-DGWYeI2b.js +118 -0
- package/dist/taskInbox.en-US-B-OzDmVl.js +118 -0
- package/dist/text-BqSVQKS6.js +78 -0
- package/dist/text.en-US-BhAxy_LE.js +78 -0
- package/dist/timeline-definition-JXYKGLGB-Cc-INsOv.js +1057 -0
- package/dist/trendChart-BjEeRS5_.js +135 -0
- package/dist/trendChart.en-US-BBGqWUKM.js +135 -0
- package/dist/useLabData-Df-jEHKs.js +20470 -0
- package/dist/usecaseDiagram-WPOLBNNX-r8wVjopm.js +7920 -0
- package/dist/vennDiagram-Q3Y3IDCW-BZiOcgrj.js +1579 -0
- package/dist/wardleyDiagram-IVAIDKWA-16jd07C_.js +675 -0
- package/dist/workshop-app-DnHNjBqy.js +86038 -0
- package/dist/workshop-app.css +1 -0
- package/dist/workshop-app.js +4 -0
- package/dist/world-Djau1JyJ.js +9 -0
- package/dist/xychartDiagram-4URNHDU4-C8DwWQNh.js +1460 -0
- package/dist-cli/workshop.js +340 -217
- package/example/host.js +109 -0
- package/example/index.html +93 -0
- package/example/server.mjs +237 -0
- package/index.d.ts +48 -0
- package/lib/validate.js +47 -1
- package/package.json +17 -5
- package/runtime/frame-runtime.js +13 -1
- package/workshop-component.js +32 -12
- package/workshop.js +2 -0
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import { V as M, X as T, u as S, r as v, j as s, Y as D, a as $ } from "./workshop-app-DnHNjBqy.js";
|
|
2
|
+
import { ab as I, ac as W, r as Y, ad as z, ae as G, af as A, ag as H, ah as K, ai as E, aj as U, Y as X, ak as Q, A as Z, al as q } from "./useLabData-Df-jEHKs.js";
|
|
3
|
+
import { N as J, O as ss, P as es, Q as as, U as ts, V as os, W as ns, X as _, Y as w, Z as rs, _ as is, $ as ls, a0 as ds, a1 as cs, a2 as us, d as fs } from "./PageRenderer-DBd_g6mN.js";
|
|
4
|
+
import { R as ms } from "./MenuUnfoldOutlined-Cdg24l2h.js";
|
|
5
|
+
function ps(t, o, e) {
|
|
6
|
+
const d = I(t.variables, {}), c = t.variables.find((l) => l.kind === "asOf"), u = c ? d[c.name] : void 0, n = typeof u == "string" ? u : M(), i = (l) => {
|
|
7
|
+
const m = Y(t, l), f = o[l] ?? o[m?.from?.source ?? ""];
|
|
8
|
+
if (!m || f?.status !== "ready") return null;
|
|
9
|
+
const a = T(f.rows, m, n);
|
|
10
|
+
return m.from ? z(a, m.from, t.variables, d, n) : a;
|
|
11
|
+
}, h = {};
|
|
12
|
+
for (const l of t.pages) {
|
|
13
|
+
if (l.badge === "tasks" && (h[l.id] = (e.tasks ?? []).filter(J).length), l.badge !== "alerts") continue;
|
|
14
|
+
const m = /* @__PURE__ */ new Set();
|
|
15
|
+
let f = !0;
|
|
16
|
+
for (const a of W(l)) {
|
|
17
|
+
if (a.type !== "alertList") continue;
|
|
18
|
+
const r = a.config, b = r.source ? i(r.source) : null;
|
|
19
|
+
if (!b) {
|
|
20
|
+
f = !1;
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
for (const k of r.rules ?? [])
|
|
24
|
+
if (!ss(k))
|
|
25
|
+
for (const g of es(b, k, n)) m.add(`${r.source}:${g.$key}`);
|
|
26
|
+
}
|
|
27
|
+
f && (h[l.id] = m.size);
|
|
28
|
+
}
|
|
29
|
+
return h;
|
|
30
|
+
}
|
|
31
|
+
const hs = "_item_22pyd_6", vs = "_icon_22pyd_34", bs = "_label_22pyd_39", gs = "_badge_22pyd_44", ys = "_groupName_22pyd_57", ks = "_top_22pyd_65", _s = "_topList_22pyd_70", ws = "_topGroup_22pyd_71", xs = "_divider_22pyd_84", js = "_sideFrame_22pyd_151", Ns = "_side_22pyd_151", Ls = "_sideList_22pyd_174", Ss = "_sideGroup_22pyd_182", Rs = "_fold_22pyd_226", Cs = "_sideBody_22pyd_236", p = {
|
|
32
|
+
item: hs,
|
|
33
|
+
icon: vs,
|
|
34
|
+
label: bs,
|
|
35
|
+
badge: gs,
|
|
36
|
+
groupName: ys,
|
|
37
|
+
top: ks,
|
|
38
|
+
topList: _s,
|
|
39
|
+
topGroup: ws,
|
|
40
|
+
divider: xs,
|
|
41
|
+
sideFrame: js,
|
|
42
|
+
side: Ns,
|
|
43
|
+
sideList: Ls,
|
|
44
|
+
sideGroup: Ss,
|
|
45
|
+
fold: Rs,
|
|
46
|
+
sideBody: Cs
|
|
47
|
+
};
|
|
48
|
+
function Bs({
|
|
49
|
+
app: t,
|
|
50
|
+
pageId: o,
|
|
51
|
+
onChange: e,
|
|
52
|
+
badges: d,
|
|
53
|
+
children: c
|
|
54
|
+
}) {
|
|
55
|
+
const { t: u } = S(), n = t.navigation?.style ?? "tabs", [i, h] = v.useState(!1), l = G(t.pages, o);
|
|
56
|
+
if (l.reduce((a, r) => a + r.pages.length, 0) <= 1 && n !== "side") return /* @__PURE__ */ s.jsx(s.Fragment, { children: c });
|
|
57
|
+
const f = (a) => {
|
|
58
|
+
const r = d[a.id];
|
|
59
|
+
return /* @__PURE__ */ s.jsxs(
|
|
60
|
+
"button",
|
|
61
|
+
{
|
|
62
|
+
type: "button",
|
|
63
|
+
role: "tab",
|
|
64
|
+
"aria-selected": a.id === o,
|
|
65
|
+
className: p.item,
|
|
66
|
+
title: i ? a.title : void 0,
|
|
67
|
+
onClick: () => e(a.id),
|
|
68
|
+
children: [
|
|
69
|
+
a.icon && /* @__PURE__ */ s.jsx("span", { className: p.icon, "aria-hidden": !0, children: ts[a.icon] }),
|
|
70
|
+
/* @__PURE__ */ s.jsx("span", { className: p.label, children: a.title }),
|
|
71
|
+
r !== void 0 && r > 0 && /* @__PURE__ */ s.jsx("span", { className: p.badge, "aria-label": u("workshopLab.nav.badge", { count: r }), children: r > 99 ? "99+" : r })
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
a.id
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
return n === "side" ? /* @__PURE__ */ s.jsxs("div", { className: p.sideFrame, children: [
|
|
78
|
+
/* @__PURE__ */ s.jsxs(
|
|
79
|
+
"nav",
|
|
80
|
+
{
|
|
81
|
+
className: p.side,
|
|
82
|
+
"data-folded": i || void 0,
|
|
83
|
+
"aria-label": u("workshopLab.nav.label"),
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ s.jsx("div", { role: "tablist", "aria-orientation": "vertical", className: p.sideList, children: l.map((a) => /* @__PURE__ */ s.jsxs("div", { className: p.sideGroup, children: [
|
|
86
|
+
a.name && !i && /* @__PURE__ */ s.jsx("span", { className: p.groupName, children: a.name }),
|
|
87
|
+
a.pages.map(f)
|
|
88
|
+
] }, a.name)) }),
|
|
89
|
+
/* @__PURE__ */ s.jsx(
|
|
90
|
+
"button",
|
|
91
|
+
{
|
|
92
|
+
type: "button",
|
|
93
|
+
className: p.fold,
|
|
94
|
+
"aria-label": u(i ? "workshopLab.nav.unfold" : "workshopLab.nav.fold"),
|
|
95
|
+
onClick: () => h(!i),
|
|
96
|
+
children: i ? /* @__PURE__ */ s.jsx(ms, {}) : /* @__PURE__ */ s.jsx(as, {})
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
),
|
|
102
|
+
/* @__PURE__ */ s.jsx("div", { className: p.sideBody, children: c })
|
|
103
|
+
] }) : /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
104
|
+
/* @__PURE__ */ s.jsx("nav", { className: p.top, "data-style": n, "aria-label": u("workshopLab.nav.label"), children: /* @__PURE__ */ s.jsx("div", { role: "tablist", className: p.topList, children: l.map((a, r) => /* @__PURE__ */ s.jsxs("div", { className: p.topGroup, children: [
|
|
105
|
+
r > 0 && /* @__PURE__ */ s.jsx("span", { className: p.divider, "aria-hidden": !0 }),
|
|
106
|
+
a.name && /* @__PURE__ */ s.jsx("span", { className: p.groupName, children: a.name }),
|
|
107
|
+
a.pages.map(f)
|
|
108
|
+
] }, a.name)) }) }),
|
|
109
|
+
c
|
|
110
|
+
] });
|
|
111
|
+
}
|
|
112
|
+
const Gs = 3e4;
|
|
113
|
+
class B extends Error {
|
|
114
|
+
constructor() {
|
|
115
|
+
super("access revoked"), this.name = "AccessRevoked";
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
function As(t, o, e = Date.now) {
|
|
119
|
+
let d = e(), c = null, u = !1;
|
|
120
|
+
return async () => {
|
|
121
|
+
if (u) throw new B();
|
|
122
|
+
if (!(e() - d < Gs) && (c ??= t().catch(() => {
|
|
123
|
+
}).finally(() => {
|
|
124
|
+
c = null, d = e();
|
|
125
|
+
}), await c === !1))
|
|
126
|
+
throw u || (u = !0, o?.()), new B();
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
function Es(t) {
|
|
130
|
+
const [o, e] = v.useState(!1);
|
|
131
|
+
return v.useEffect(() => e(!1), [t]), { guard: v.useMemo(
|
|
132
|
+
() => t ? As(t, () => e(!0)) : void 0,
|
|
133
|
+
[t]
|
|
134
|
+
), revoked: o };
|
|
135
|
+
}
|
|
136
|
+
async function Os(t, o) {
|
|
137
|
+
const e = await E(t), d = !o && e && e.version > 0 ? await q(t, e.version) : null;
|
|
138
|
+
return { status: "ready", stored: e, latest: d };
|
|
139
|
+
}
|
|
140
|
+
function Ds({ appId: t, preview: o = !1 }) {
|
|
141
|
+
const { t: e } = S(), { token: d } = D.useToken(), [c, u] = v.useState({ status: "loading" });
|
|
142
|
+
if (v.useEffect(() => {
|
|
143
|
+
let m = !0, f;
|
|
144
|
+
const a = (k = !1) => Os(t, o).then((g) => {
|
|
145
|
+
if (!m) return;
|
|
146
|
+
const y = g.status === "ready" ? g.stored?.revision ?? -1 : void 0;
|
|
147
|
+
k && y === f || (f = y, u(g));
|
|
148
|
+
}).catch((g) => {
|
|
149
|
+
m && u(
|
|
150
|
+
(y) => y.status === "ready" ? y : { status: "failed", message: g.message }
|
|
151
|
+
);
|
|
152
|
+
});
|
|
153
|
+
a();
|
|
154
|
+
const r = o && typeof BroadcastChannel < "u" ? new BroadcastChannel(os(t)) : null;
|
|
155
|
+
r && (r.onmessage = () => {
|
|
156
|
+
a();
|
|
157
|
+
});
|
|
158
|
+
const b = o ? ns(() => a(!0)) : void 0;
|
|
159
|
+
return () => {
|
|
160
|
+
m = !1, r?.close(), b?.();
|
|
161
|
+
};
|
|
162
|
+
}, [t, o]), c.status === "loading")
|
|
163
|
+
return /* @__PURE__ */ s.jsx(A, { className: _.notice, tip: e("workshopLab.store.loading"), children: /* @__PURE__ */ s.jsx("div", {}) });
|
|
164
|
+
if (c.status === "failed")
|
|
165
|
+
return /* @__PURE__ */ s.jsx(w, { status: "error", title: e("workshopLab.store.loadFailed"), subTitle: c.message });
|
|
166
|
+
const { stored: n, latest: i } = c;
|
|
167
|
+
if (!n) return /* @__PURE__ */ s.jsx(w, { status: "404", title: e("workshopLab.list.missing") });
|
|
168
|
+
const h = o ? n.draft : i?.spec ?? null;
|
|
169
|
+
if (!h)
|
|
170
|
+
return /* @__PURE__ */ s.jsx(
|
|
171
|
+
w,
|
|
172
|
+
{
|
|
173
|
+
status: "info",
|
|
174
|
+
title: e(o ? "workshopLab.run.noDraft" : "workshopLab.run.none")
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
const l = !!(!o && i && n.draft && !H(i.spec, n.draft));
|
|
178
|
+
return /* @__PURE__ */ s.jsx(
|
|
179
|
+
Fs,
|
|
180
|
+
{
|
|
181
|
+
stored: n,
|
|
182
|
+
preview: o,
|
|
183
|
+
spec: h,
|
|
184
|
+
release: o ? null : i?.release ?? null,
|
|
185
|
+
behind: l,
|
|
186
|
+
barColor: d.colorWarningText
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
function Fs({
|
|
191
|
+
stored: t,
|
|
192
|
+
preview: o,
|
|
193
|
+
spec: e,
|
|
194
|
+
release: d,
|
|
195
|
+
behind: c,
|
|
196
|
+
barColor: u
|
|
197
|
+
}) {
|
|
198
|
+
const { t: n } = S(), i = t.id, h = rs(i), [l, m] = v.useState(""), f = e.pages.some((L) => L.id === l) ? l : e.pages[0]?.id ?? "", a = is(t.network), r = K(a.id, a.name), b = r.status === "ready" ? r.kn : null, k = v.useCallback(
|
|
199
|
+
async () => !!(await E(i))?.operations.includes(o ? "view" : "use"),
|
|
200
|
+
[i, o]
|
|
201
|
+
), g = Es(k), y = v.useMemo(() => [], []), R = U(a.id, e.sources ?? y, b, g.guard), O = R.run, x = ls(
|
|
202
|
+
i,
|
|
203
|
+
a.id,
|
|
204
|
+
e.sources ?? y,
|
|
205
|
+
e.eventTypes,
|
|
206
|
+
R.sources
|
|
207
|
+
), j = v.useMemo(() => b ? ds(e, b) : e, [e, b]), N = v.useMemo(() => X(j, f), [j, f]), C = Q(i, a.id), F = v.useMemo(() => ps(e, x, C), [e, x, C]);
|
|
208
|
+
if (g.revoked) return /* @__PURE__ */ s.jsx(w, { status: "403", title: n("workshopLab.run.revoked") });
|
|
209
|
+
if (!N) return /* @__PURE__ */ s.jsx(w, { status: "info", title: n("workshopLab.run.noDraft") });
|
|
210
|
+
const V = e.navigation?.style === "side" || G(e.pages, f).reduce((L, P) => L + P.pages.length, 0) > 1;
|
|
211
|
+
return /* @__PURE__ */ s.jsxs("div", { className: _.runPage, style: { ...fs(e.theme, N.layout) }, children: [
|
|
212
|
+
/* @__PURE__ */ s.jsxs("div", { className: _.runBar, children: [
|
|
213
|
+
d ? n("workshopLab.run.bar", {
|
|
214
|
+
name: e.app.name,
|
|
215
|
+
version: d.version,
|
|
216
|
+
at: new Date(d.at).toLocaleString()
|
|
217
|
+
}) : n("workshopLab.run.previewBar", { name: e.app.name }),
|
|
218
|
+
c && /* @__PURE__ */ s.jsx("span", { style: { color: u }, children: n("workshopLab.run.behind") }),
|
|
219
|
+
h.count > 0 && /* @__PURE__ */ s.jsxs("span", { style: { color: u }, title: h.reason, children: [
|
|
220
|
+
n("workshopLab.run.resultsUnsaved", { n: h.count }),
|
|
221
|
+
/* @__PURE__ */ s.jsx($, { type: "link", size: "small", onClick: () => cs(i), children: n("workshopLab.run.resultsRetry") })
|
|
222
|
+
] })
|
|
223
|
+
] }),
|
|
224
|
+
/* @__PURE__ */ s.jsx(Bs, { app: e, pageId: f, onChange: m, badges: F, children: r.status === "error" ? /* @__PURE__ */ s.jsx(
|
|
225
|
+
Z,
|
|
226
|
+
{
|
|
227
|
+
className: _.notice,
|
|
228
|
+
type: "error",
|
|
229
|
+
showIcon: !0,
|
|
230
|
+
message: n("workshopLab.data.failed"),
|
|
231
|
+
description: r.message
|
|
232
|
+
}
|
|
233
|
+
) : b ? /* @__PURE__ */ s.jsx(
|
|
234
|
+
us,
|
|
235
|
+
{
|
|
236
|
+
spec: N,
|
|
237
|
+
kn: b,
|
|
238
|
+
sources: x,
|
|
239
|
+
run: O,
|
|
240
|
+
appId: i,
|
|
241
|
+
guard: g.guard,
|
|
242
|
+
pageId: f,
|
|
243
|
+
app: j,
|
|
244
|
+
onOpenPage: m,
|
|
245
|
+
showTitle: !V,
|
|
246
|
+
keepResults: !!d
|
|
247
|
+
}
|
|
248
|
+
) : /* @__PURE__ */ s.jsx(A, { className: _.notice, tip: n("workshopLab.data.loading"), children: /* @__PURE__ */ s.jsx("div", {}) }) })
|
|
249
|
+
] });
|
|
250
|
+
}
|
|
251
|
+
export {
|
|
252
|
+
Ds as WorkshopRunPage
|
|
253
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { g as p, r as u, d as a } from "./chunk-2E7WHVMD-Ba3svxgx.js";
|
|
2
|
+
import { p as f } from "./chunk-JWPE2WC7-CDBrSjU7.js";
|
|
3
|
+
import { _ as n, l as o } from "./mermaid.core-yQghUlIz.js";
|
|
4
|
+
import { M as c, b as d } from "./cynefin-EF2NZ3EQ-D7MVnMHu.js";
|
|
5
|
+
var v = d().RailroadAbnf.parser.LangiumParser, l = /* @__PURE__ */ n((e) => {
|
|
6
|
+
const r = e.alternatives.map(g);
|
|
7
|
+
return r.length === 1 ? r[0] : {
|
|
8
|
+
type: "choice",
|
|
9
|
+
alternatives: r
|
|
10
|
+
};
|
|
11
|
+
}, "transformAlternation"), g = /* @__PURE__ */ n((e) => {
|
|
12
|
+
const r = e.elements.map(y);
|
|
13
|
+
return r.length === 1 ? r[0] : {
|
|
14
|
+
type: "sequence",
|
|
15
|
+
elements: r
|
|
16
|
+
};
|
|
17
|
+
}, "transformConcatenation"), b = /* @__PURE__ */ n((e) => {
|
|
18
|
+
if (e.includes("*")) {
|
|
19
|
+
const [t, s] = e.split("*"), i = t ? parseInt(t, 10) : 0, m = s ? parseInt(s, 10) : 1 / 0;
|
|
20
|
+
return { min: i, max: m };
|
|
21
|
+
}
|
|
22
|
+
const r = parseInt(e, 10);
|
|
23
|
+
return { min: r, max: r };
|
|
24
|
+
}, "parseRepeat"), y = /* @__PURE__ */ n((e) => {
|
|
25
|
+
const r = A(e.primary);
|
|
26
|
+
if (!e.repeat)
|
|
27
|
+
return r;
|
|
28
|
+
const { min: t, max: s } = b(e.repeat);
|
|
29
|
+
return t === 0 && s === 1 ? { type: "optional", element: r } : {
|
|
30
|
+
type: "repetition",
|
|
31
|
+
element: r,
|
|
32
|
+
min: t,
|
|
33
|
+
max: s
|
|
34
|
+
};
|
|
35
|
+
}, "transformElement"), A = /* @__PURE__ */ n((e) => {
|
|
36
|
+
switch (e.$type) {
|
|
37
|
+
case "AbnfStringLiteral":
|
|
38
|
+
return {
|
|
39
|
+
type: "terminal",
|
|
40
|
+
value: e.value
|
|
41
|
+
};
|
|
42
|
+
case "AbnfNumVal":
|
|
43
|
+
return {
|
|
44
|
+
type: "terminal",
|
|
45
|
+
value: e.value
|
|
46
|
+
};
|
|
47
|
+
case "AbnfRuleName":
|
|
48
|
+
return {
|
|
49
|
+
type: "nonterminal",
|
|
50
|
+
name: e.name
|
|
51
|
+
};
|
|
52
|
+
case "AbnfGroup":
|
|
53
|
+
return l(e.element);
|
|
54
|
+
case "AbnfOptionalGroup":
|
|
55
|
+
return {
|
|
56
|
+
type: "optional",
|
|
57
|
+
element: l(e.element)
|
|
58
|
+
};
|
|
59
|
+
default:
|
|
60
|
+
throw new Error(`Unsupported ABNF primary node: ${e.$type}`);
|
|
61
|
+
}
|
|
62
|
+
}, "transformPrimary"), P = /* @__PURE__ */ n((e) => ({
|
|
63
|
+
name: e.name,
|
|
64
|
+
definition: l(e.definition)
|
|
65
|
+
}), "transformRule"), h = /* @__PURE__ */ n((e) => {
|
|
66
|
+
f(e, a), e.title && a.setTitle(e.title), e.rules.map((r) => a.addRule(P(r)));
|
|
67
|
+
}, "populateDb"), R = {
|
|
68
|
+
parse: /* @__PURE__ */ n((e) => {
|
|
69
|
+
a.clear(), o.debug("[ABNF Parser] Starting Langium parse");
|
|
70
|
+
const r = v.parse(e);
|
|
71
|
+
if (r.lexerErrors.length > 0 || r.parserErrors.length > 0)
|
|
72
|
+
throw new c(r);
|
|
73
|
+
const t = r.value;
|
|
74
|
+
o.debug("[ABNF Parser] Parsed rules:", t.rules.length), h(t), o.debug("[ABNF Parser] Parse complete");
|
|
75
|
+
}, "parse"),
|
|
76
|
+
parser: {
|
|
77
|
+
yy: a
|
|
78
|
+
}
|
|
79
|
+
}, w = {
|
|
80
|
+
parser: R,
|
|
81
|
+
db: a,
|
|
82
|
+
renderer: u,
|
|
83
|
+
styles: p
|
|
84
|
+
};
|
|
85
|
+
export {
|
|
86
|
+
w as diagram
|
|
87
|
+
};
|