@openbkn/workshop 0.2.2 → 0.3.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{ActionConfirm-DJ91X3ml.js → ActionConfirm-BX1dlrAM.js} +5 -5
- package/dist/{ActionFailure-ZgPt_3B-.js → ActionFailure-xcSfKJYC.js} +2 -2
- package/dist/{AgentChat-CRYai8ge.js → AgentChat-DHdX_6W7.js} +407 -383
- package/dist/AppListPage-DsUvFo6B.js +1549 -0
- package/dist/{AskDrawer-BUMYsRnt.js → AskDrawer-j-CR4yXP.js} +4 -4
- package/dist/{ComputedView-CgYrDbx1.js → ComputedView-dWFlHngu.js} +1035 -1016
- package/dist/{ConclusionApply-sjGfoEBY.js → ConclusionApply-BAoZpxl-.js} +4 -4
- package/dist/{CypherEditor-lus6FA5L.js → CypherEditor-CZ5Z4SGH.js} +47 -47
- package/dist/{LandingList-6JI6864C.js → LandingList-BUO6-at_.js} +5 -5
- package/dist/{MenuUnfoldOutlined-Cdg24l2h.js → MenuUnfoldOutlined-DAeIeIap.js} +3 -3
- package/dist/{ModelTrial-ClHFGTpQ.js → ModelTrial-C7XvLVY7.js} +4 -4
- package/dist/{PageRenderer-DBd_g6mN.js → PageRenderer-CkmvW4aO.js} +21264 -20549
- package/dist/{ScenarioApply-DtW_hh47.js → ScenarioApply-COdlyvrC.js} +6 -6
- package/dist/{SimulateForm-C-i08Jjd.js → SimulateForm-B_9laTIl.js} +4 -4
- package/dist/{Subgraph-CnrkH9AN.js → Subgraph-CDY3wvCA.js} +3 -3
- package/dist/WorkshopLabPage-BtYnBpk4.js +12020 -0
- package/dist/{WorkshopRunPage-6hjRUf64.js → WorkshopRunPage-DHMJ3b8k.js} +24 -24
- package/dist/{abnfDiagram-WEYOIA3C-beRNhN3c.js → abnfDiagram-WEYOIA3C-Blje2Kbf.js} +3 -3
- package/dist/{action-type-tool.service-B2B74fKC.js → action-type-tool.service-BN-W_Az_.js} +1 -1
- package/dist/{architectureDiagram-ZHVYKT53-DY2l1qxx.js → architectureDiagram-ZHVYKT53-B_FkRXc3.js} +3 -3
- package/dist/{bkn-agent-execution.service-DVh-SHyl.js → bkn-agent-execution.service-CJalMVIc.js} +1 -1
- package/dist/{blockDiagram-RJAE7QA3-DR0mjN2h.js → blockDiagram-RJAE7QA3-CYJLthoI.js} +3 -3
- package/dist/{c4Diagram-XDPPPE54-DH5zsGug.js → c4Diagram-XDPPPE54-CmMaN3M4.js} +2 -2
- package/dist/{channel-B034hcOF.js → channel-Dp24Bgua.js} +1 -1
- package/dist/{chunk-2E7WHVMD-Ba3svxgx.js → chunk-2E7WHVMD-DrnpfYKB.js} +1 -1
- package/dist/{chunk-2Q5K7J3B-rT4eU6_y.js → chunk-2Q5K7J3B-BXqKcHlQ.js} +1 -1
- package/dist/{chunk-4EMNKR2T-C1kQZYHK.js → chunk-4EMNKR2T-DYgY_0_y.js} +1 -1
- package/dist/{chunk-55XCU76K-dcpLOktb.js → chunk-55XCU76K-Bja7bE8g.js} +1 -1
- package/dist/{chunk-5VM5RSS4-BdpQuzmO.js → chunk-5VM5RSS4-CGTnbRRi.js} +1 -1
- package/dist/{chunk-JWPE2WC7-CDBrSjU7.js → chunk-JWPE2WC7-2AyjxdJR.js} +1 -1
- package/dist/{chunk-VQ5W62QI-BiVKc40w.js → chunk-VQ5W62QI-B3PGCKOg.js} +1 -1
- package/dist/{chunk-XXDRQBXY-CPYrcdVW.js → chunk-XXDRQBXY-RrIsI-B5.js} +1 -1
- package/dist/{chunk-ZCHMQSOR-BG8OLpvb.js → chunk-ZCHMQSOR-COJTBW1i.js} +2 -2
- package/dist/{classDiagram-v2-4MYWR3UA-DqbpQpwI.js → classDiagram-v2-4MYWR3UA-DolLxH6t.js} +5 -5
- package/dist/{cose-bilkent-JH36ORCC-CdXk4sPf.js → cose-bilkent-JH36ORCC-DMSYgFxc.js} +2 -2
- package/dist/customComponents-DasaZ6pq.js +1 -1
- package/dist/customComponents.en-US-CkabuCXg.js +1 -1
- package/dist/{customParseFormat-C0uLEpdq.js → customParseFormat-C9WAjjqH.js} +1 -1
- package/dist/{cynefinDiagram-WF24UDRP-BYT_KpDL.js → cynefinDiagram-WF24UDRP-DrksRWCn.js} +2 -2
- package/dist/{dagre-NK4GIZVX-l-ghPdM8.js → dagre-NK4GIZVX-CFRT2dAc.js} +2 -2
- package/dist/{dayjs.min-DZ-YV8Mv.js → dayjs.min-CziT8yW9.js} +1 -1
- package/dist/{diagram-CBK3MWTC-Bt3HiwvA.js → diagram-CBK3MWTC-DzZ_sQCl.js} +3 -3
- package/dist/{diagram-I5XIIV2D-DcbqfBjx.js → diagram-I5XIIV2D-RYNBUOF4.js} +2 -2
- package/dist/{diagram-ODIL2UCW-9PC1n3n5.js → diagram-ODIL2UCW-DqJETE9R.js} +3 -3
- package/dist/{diagram-PFBEJUXE-DGhr2kc7.js → diagram-PFBEJUXE-BekIE7hh.js} +2 -2
- package/dist/{diagram-RJA3I4VV-DwzpOjZ_.js → diagram-RJA3I4VV-DAIwlMxl.js} +2 -2
- package/dist/{diagram-TYUNFSNR-B3Bd3TDU.js → diagram-TYUNFSNR-CLJ0Ou9i.js} +6 -6
- package/dist/{ebnfDiagram-V4P3TTPT-E5NN2oKc.js → ebnfDiagram-V4P3TTPT-CRs8ppfT.js} +3 -3
- package/dist/{elk-QONTBCTQ-dFjcujl_.js → elk-QONTBCTQ-Bqoh6AYY.js} +5 -5
- package/dist/{erDiagram-KYQIGQAA-BMrasBzB.js → erDiagram-KYQIGQAA-BSp8Z7uQ.js} +4 -4
- package/dist/{flowDiagram-IUGLLWBU-BGIBH0q0.js → flowDiagram-IUGLLWBU-WKILTCDc.js} +7 -7
- package/dist/{ganttDiagram-R7GPNTJY-C0tb1Lpp.js → ganttDiagram-R7GPNTJY-CaTn_Mmr.js} +4 -4
- package/dist/generateCypher-BE_4YCWB.js +1032 -0
- package/dist/{gitGraphDiagram-PDYL7XHY-DBqcOa-c.js → gitGraphDiagram-PDYL7XHY-DGPs-RF6.js} +3 -3
- package/dist/{infoDiagram-MVDRKAX5-Bwuki4JA.js → infoDiagram-MVDRKAX5-HIQg7U3R.js} +1 -1
- package/dist/{ishikawaDiagram-HPEHV2GE-Dz4d6ygx.js → ishikawaDiagram-HPEHV2GE-C84x8n2j.js} +2 -2
- package/dist/{journeyDiagram-BOSHW7O7-C99m34Bb.js → journeyDiagram-BOSHW7O7-CvYDNxSY.js} +4 -4
- package/dist/{kanban-definition-FNSA4HC5-mdqjODsT.js → kanban-definition-FNSA4HC5-B586ryFD.js} +2 -2
- package/dist/{mermaid.core-yQghUlIz.js → mermaid.core-3J01L12Z.js} +5803 -5740
- package/dist/{mindmap-definition-6OY57UG3-BZhO2wX4.js → mindmap-definition-6OY57UG3-Donc6BMy.js} +3 -3
- package/dist/{models-DekiCOuZ.js → models-Rf3LB8wS.js} +1 -1
- package/dist/{object-metric-numeric-vs3BeDkH.js → object-metric-numeric-BcgaJ6EW.js} +1 -1
- package/dist/{object-metric.service-flZgBMRX.js → object-metric.service-CKiaFYcp.js} +2 -2
- package/dist/{pegDiagram-ECIUJNBX-BDa5RfZt.js → pegDiagram-ECIUJNBX-CYVi7x6D.js} +3 -3
- package/dist/{pieDiagram-GNMPY74T-DNVtzXPv.js → pieDiagram-GNMPY74T-4iWKYTTS.js} +2 -2
- package/dist/{prompt-DYrjlEFr.js → prompt-BQzBLrua.js} +110 -100
- package/dist/{quadrantDiagram-D57K4MC3-vK0f2OvQ.js → quadrantDiagram-D57K4MC3-Bm6Cyi1I.js} +1 -1
- package/dist/{railroadDiagram-Y72NRBL7-j6ZrTmRp.js → railroadDiagram-Y72NRBL7-Du6iN-Jz.js} +3 -3
- package/dist/{requirementDiagram-EQYSW5RA-DgfEyljA.js → requirementDiagram-EQYSW5RA-BGxpuSlc.js} +3 -3
- package/dist/{sankeyDiagram-SY24JHO5-CImx-IX0.js → sankeyDiagram-SY24JHO5-CsHmu__D.js} +2 -2
- package/dist/{sequenceDiagram-BLEHNHQU-nWmjd1ci.js → sequenceDiagram-BLEHNHQU-DBNi943L.js} +3 -3
- package/dist/{sizeCapture-INFHLROL-D3jlbt7h.js → sizeCapture-INFHLROL-CcGr2ilA.js} +1 -1
- package/dist/{stateDiagram-v2-A6IESKWZ-DG1ZetEu.js → stateDiagram-v2-A6IESKWZ-C78tVzaF.js} +4 -4
- package/dist/{swimlanes-B3ENRKFQ-cCmJE8AU.js → swimlanes-B3ENRKFQ-BROc4LGM.js} +3 -3
- package/dist/{swimlanesDiagram-AYQRV4AK-CtuhyguU.js → swimlanesDiagram-AYQRV4AK-C0RDY4m2.js} +3 -3
- package/dist/{text-BqSVQKS6.js → text-CzC6K33E.js} +7 -3
- package/dist/{text.en-US-BhAxy_LE.js → text.en-US-D8mxBP0p.js} +6 -2
- package/dist/{timeline-definition-JXYKGLGB-Cc-INsOv.js → timeline-definition-JXYKGLGB-C6WGe4xl.js} +1 -1
- package/dist/toolMatchLines-DrXpUwcl.js +4675 -0
- package/dist/{useLabData-Df-jEHKs.js → useLabData-B-3UW8zF.js} +8008 -7251
- package/dist/{usecaseDiagram-WPOLBNNX-r8wVjopm.js → usecaseDiagram-WPOLBNNX-yMP7SDIg.js} +3 -3
- package/dist/{vennDiagram-Q3Y3IDCW-BZiOcgrj.js → vennDiagram-Q3Y3IDCW-bZW2LzBB.js} +2 -2
- package/dist/{wardleyDiagram-IVAIDKWA-16jd07C_.js → wardleyDiagram-IVAIDKWA-DBbog93x.js} +2 -2
- package/dist/{workshop-app-DnHNjBqy.js → workshop-app-ByYXbgcn.js} +5060 -4721
- package/dist/workshop-app.css +1 -1
- package/dist/workshop-app.js +1 -1
- package/dist/{xychartDiagram-4URNHDU4-C8DwWQNh.js → xychartDiagram-4URNHDU4-CVLJNXOt.js} +1 -1
- package/dist-cli/workshop.js +182 -140
- package/package.json +1 -1
- package/skill/SKILL.en-US.md +5 -0
- package/skill/SKILL.md +3 -0
- package/dist/AppFormModal-D73ucaHK.js +0 -4282
- package/dist/AppListPage-D87piiOw.js +0 -1364
- package/dist/WorkshopLabPage-DiVXQL9e.js +0 -11364
- package/dist/generateCypher-Ch9_lQa6.js +0 -399
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { M as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { _ as ea, a0 as Me, C as aa, u as A, j as e, i as O, a as $, I, a1 as sa, a2 as Ae, r as E, c as xe, Y as ge, a3 as ve, a4 as Y, a5 as te, a6 as _e, y as me, a7 as ye, x as oa, T as la, U as he, a8 as ta, b as na, a9 as fe, aa as q, ab as Ie, ac as je, ad as ra, ae as ia, af as ca, ag as pa, ah as da, ai as ma, z as de } from "./workshop-app-ByYXbgcn.js";
|
|
2
|
+
import { M as ha, e as Re, d as ua, w as ba } from "./generateCypher-BE_4YCWB.js";
|
|
3
|
+
import { W as n, T as G, R as Q, a6 as X, a7 as ka, a8 as ee, a9 as ja, aa as U, ab as ke, ac as wa, ad as xa, i as ga, a2 as ue, ae as fa, F as De, af as La } from "./PageRenderer-CkmvW4aO.js";
|
|
4
|
+
import { am as F, p as ne, as as va, a as be, at as ya, au as Na, M as ae, av as Be, aw as Sa, ax as Ca, ay as Ta, A as re, T as J, az as za, aA as $a, aB as Oa, aC as Fa, aD as Pa, aE as Ea, aF as Ma, aG as Aa, aH as Ne, aI as Se, aJ as _a, aK as Ia, aL as Ce, a6 as He, aM as Ra, aN as Ve, aO as Da, aP as Ba, aQ as Ha, aR as Va, aS as Ua, aT as Ga, aU as Wa, aV as Ka, u as Xa, b as Ja } from "./useLabData-B-3UW8zF.js";
|
|
5
5
|
function Za(a, i) {
|
|
6
|
-
const t = a.fields.map((
|
|
7
|
-
const p = a.samples[
|
|
8
|
-
return `- ${
|
|
6
|
+
const t = a.fields.map((k) => {
|
|
7
|
+
const p = a.samples[k.name];
|
|
8
|
+
return `- ${k.name}:${k.type}(${k.label})${p?.length ? `,取值如:${p.join("、")}` : ""}`;
|
|
9
9
|
}).join(`
|
|
10
10
|
`);
|
|
11
11
|
return `你为业务应用的数据源「${a.sourceLabel}」(对象类 ${a.context.objectType})写一个计算列。
|
|
@@ -19,7 +19,7 @@ ${i}
|
|
|
19
19
|
字段名、关系 id、属性名一律照清单原样写,不要猜;和文本值比较时用上面列出的取值。
|
|
20
20
|
关联统计(related)用下面网络里的关系:
|
|
21
21
|
|
|
22
|
-
${
|
|
22
|
+
${ua(a.context.kn)}
|
|
23
23
|
|
|
24
24
|
只输出 JSON:{"field": { name, label, kind, ... }, "explanation": "一句话说明规则"}。`;
|
|
25
25
|
}
|
|
@@ -33,41 +33,41 @@ function qa(a) {
|
|
|
33
33
|
explanation: typeof t.explanation == "string" ? t.explanation : ""
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
async function
|
|
37
|
-
const { model: i, scope: t, instruction:
|
|
36
|
+
async function Ya(a) {
|
|
37
|
+
const { model: i, scope: t, instruction: k, current: p, taken: j, signal: c, onStep: s } = a, o = a.maxAttempts ?? 3, d = p?.name || void 0, m = d ? `字段名固定为 ${d}。` : `字段名自拟(字母开头的英文标识),不能用:${j.join("、") || "(无)"}。`, r = [
|
|
38
38
|
{
|
|
39
39
|
role: "user",
|
|
40
40
|
content: p?.label ? `当前字段:
|
|
41
41
|
${JSON.stringify(p)}
|
|
42
42
|
|
|
43
|
-
修改要求:${
|
|
43
|
+
修改要求:${k}` : k
|
|
44
44
|
}
|
|
45
45
|
];
|
|
46
46
|
let u = "";
|
|
47
47
|
for (let l = 1; l <= o; l++) {
|
|
48
48
|
s?.({ kind: "generating", attempt: l });
|
|
49
|
-
const { text:
|
|
49
|
+
const { text: w } = await ea({
|
|
50
50
|
model: i,
|
|
51
|
-
system: Za(t,
|
|
51
|
+
system: Za(t, m),
|
|
52
52
|
messages: r,
|
|
53
|
-
maxOutputTokens:
|
|
53
|
+
maxOutputTokens: ha,
|
|
54
54
|
maxRetries: 0,
|
|
55
55
|
abortSignal: c
|
|
56
56
|
});
|
|
57
57
|
try {
|
|
58
|
-
const
|
|
59
|
-
...
|
|
58
|
+
const f = qa(w), h = {
|
|
59
|
+
...f.field,
|
|
60
60
|
...d ? { name: d } : {}
|
|
61
61
|
};
|
|
62
|
-
if (!d &&
|
|
63
|
-
throw new Error(`字段名 ${
|
|
64
|
-
const
|
|
65
|
-
if (
|
|
66
|
-
return { ok: !0, field:
|
|
67
|
-
} catch (
|
|
68
|
-
if (c?.aborted) throw
|
|
69
|
-
u = Re(
|
|
70
|
-
{ role: "assistant", content:
|
|
62
|
+
if (!d && j.includes(h.name))
|
|
63
|
+
throw new Error(`字段名 ${h.name} 已被占用`);
|
|
64
|
+
const C = Me([h], t.fields, "field", t.context);
|
|
65
|
+
if (C.length > 0) throw new Error(C.slice(0, 6).join(";"));
|
|
66
|
+
return { ok: !0, field: h, explanation: f.explanation, attempts: l };
|
|
67
|
+
} catch (f) {
|
|
68
|
+
if (c?.aborted) throw f;
|
|
69
|
+
u = Re(f), s?.({ kind: "failed", error: u }), r.push(
|
|
70
|
+
{ role: "assistant", content: w },
|
|
71
71
|
{ role: "user", content: `校验未通过:${u}
|
|
72
72
|
请对照字段清单修正,仍只输出 JSON。` }
|
|
73
73
|
);
|
|
@@ -75,38 +75,38 @@ ${JSON.stringify(p)}
|
|
|
75
75
|
}
|
|
76
76
|
return { ok: !1, error: u, attempts: o };
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
const
|
|
78
|
+
function Qa(a, i, t = 12) {
|
|
79
|
+
const k = {};
|
|
80
80
|
for (const p of i) {
|
|
81
81
|
if (p.type !== "text") continue;
|
|
82
|
-
const
|
|
82
|
+
const j = /* @__PURE__ */ new Set();
|
|
83
83
|
for (const c of a) {
|
|
84
84
|
const s = c[p.name];
|
|
85
|
-
if (!(s == null || s === "") && (
|
|
85
|
+
if (!(s == null || s === "") && (j.add(String(s)), j.size > t))
|
|
86
86
|
break;
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
j.size > 0 && j.size <= t && (k[p.name] = [...j]);
|
|
89
89
|
}
|
|
90
|
-
return
|
|
90
|
+
return k;
|
|
91
91
|
}
|
|
92
|
-
function es({ source: a, fields: i, save: t, onClose:
|
|
93
|
-
const { t: p } =
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
}, r = (l,
|
|
97
|
-
const
|
|
98
|
-
for (const
|
|
99
|
-
(
|
|
100
|
-
|
|
101
|
-
}, u = (l,
|
|
102
|
-
const
|
|
103
|
-
|
|
92
|
+
function es({ source: a, fields: i, save: t, onClose: k }) {
|
|
93
|
+
const { t: p } = A(), j = a.formats ?? {}, c = Object.keys(j), s = i.filter((l) => !c.includes(l.name)), o = (l) => i.find((w) => w.name === l)?.label ?? l, d = (l) => i.find((w) => w.name === l)?.type, m = (l, w) => {
|
|
94
|
+
const f = { ...j };
|
|
95
|
+
w === null ? delete f[l] : f[l] = w, t({ ...a, formats: Object.keys(f).length > 0 ? f : void 0 });
|
|
96
|
+
}, r = (l, w) => {
|
|
97
|
+
const f = { ...j[l], ...w };
|
|
98
|
+
for (const h of Object.keys(f))
|
|
99
|
+
(f[h] === void 0 || Array.isArray(f[h]) && f[h].length === 0) && delete f[h];
|
|
100
|
+
m(l, f);
|
|
101
|
+
}, u = (l, w) => {
|
|
102
|
+
const f = w.trim() || void 0;
|
|
103
|
+
f !== j[l]?.unit && r(l, { unit: f });
|
|
104
104
|
};
|
|
105
105
|
return /* @__PURE__ */ e.jsxs("div", { className: n.formats, children: [
|
|
106
106
|
/* @__PURE__ */ e.jsxs("div", { className: n.formatsHead, children: [
|
|
107
107
|
/* @__PURE__ */ e.jsx("span", { className: n.fieldLabel, children: p("workshopLab.formats.title") }),
|
|
108
108
|
/* @__PURE__ */ e.jsx(
|
|
109
|
-
|
|
109
|
+
O,
|
|
110
110
|
{
|
|
111
111
|
size: "small",
|
|
112
112
|
showSearch: !0,
|
|
@@ -115,15 +115,15 @@ function es({ source: a, fields: i, save: t, onClose: w }) {
|
|
|
115
115
|
value: null,
|
|
116
116
|
placeholder: p("workshopLab.formats.add"),
|
|
117
117
|
options: s.map((l) => ({ value: l.name, label: l.label })),
|
|
118
|
-
onChange: (l) =>
|
|
118
|
+
onChange: (l) => m(l, {})
|
|
119
119
|
}
|
|
120
120
|
),
|
|
121
|
-
c.length === 0 &&
|
|
121
|
+
c.length === 0 && k && /* @__PURE__ */ e.jsx($, { size: "small", type: "link", onClick: k, children: p("workshopLab.blocks.cancel") })
|
|
122
122
|
] }),
|
|
123
123
|
c.map((l) => {
|
|
124
|
-
const
|
|
124
|
+
const w = j[l], f = w.colors ?? [];
|
|
125
125
|
return /* @__PURE__ */ e.jsxs("div", { className: n.formatItem, children: [
|
|
126
|
-
/* @__PURE__ */ e.jsxs(
|
|
126
|
+
/* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
127
127
|
/* @__PURE__ */ e.jsx("b", { children: o(l) }),
|
|
128
128
|
/* @__PURE__ */ e.jsx("span", { className: n.mono, children: l }),
|
|
129
129
|
d(l) === "number" && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
@@ -134,11 +134,11 @@ function es({ source: a, fields: i, save: t, onClose: w }) {
|
|
|
134
134
|
size: "small",
|
|
135
135
|
className: n.unitInput,
|
|
136
136
|
maxLength: 8,
|
|
137
|
-
defaultValue:
|
|
138
|
-
onBlur: (
|
|
139
|
-
onPressEnter: (
|
|
137
|
+
defaultValue: w.unit ?? "",
|
|
138
|
+
onBlur: (h) => u(l, h.target.value),
|
|
139
|
+
onPressEnter: (h) => !h.nativeEvent.isComposing && u(l, h.currentTarget.value)
|
|
140
140
|
},
|
|
141
|
-
|
|
141
|
+
w.unit ?? ""
|
|
142
142
|
),
|
|
143
143
|
/* @__PURE__ */ e.jsx("span", { children: p("workshopLab.formats.decimals") }),
|
|
144
144
|
/* @__PURE__ */ e.jsx(
|
|
@@ -147,8 +147,8 @@ function es({ source: a, fields: i, save: t, onClose: w }) {
|
|
|
147
147
|
size: "small",
|
|
148
148
|
min: 0,
|
|
149
149
|
max: sa,
|
|
150
|
-
value:
|
|
151
|
-
onChange: (
|
|
150
|
+
value: w.decimals ?? null,
|
|
151
|
+
onChange: (h) => r(l, { decimals: h ?? void 0 })
|
|
152
152
|
}
|
|
153
153
|
)
|
|
154
154
|
] }),
|
|
@@ -159,26 +159,26 @@ function es({ source: a, fields: i, save: t, onClose: w }) {
|
|
|
159
159
|
size: "small",
|
|
160
160
|
type: "link",
|
|
161
161
|
icon: /* @__PURE__ */ e.jsx(ne, {}),
|
|
162
|
-
onClick: () => r(l, { colors: [...
|
|
162
|
+
onClick: () => r(l, { colors: [...f, { when: [], tone: "danger" }] }),
|
|
163
163
|
children: p("workshopLab.formats.addColor")
|
|
164
164
|
}
|
|
165
165
|
),
|
|
166
|
-
/* @__PURE__ */ e.jsx($, { size: "small", type: "link", danger: !0, onClick: () =>
|
|
166
|
+
/* @__PURE__ */ e.jsx($, { size: "small", type: "link", danger: !0, onClick: () => m(l, null), children: p("workshopLab.formats.remove") })
|
|
167
167
|
] }),
|
|
168
|
-
|
|
169
|
-
/* @__PURE__ */ e.jsxs(
|
|
168
|
+
f.map((h, C) => /* @__PURE__ */ e.jsxs("div", { className: n.colorRule, children: [
|
|
169
|
+
/* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
170
170
|
/* @__PURE__ */ e.jsx("span", { children: p("workshopLab.formats.when") }),
|
|
171
171
|
/* @__PURE__ */ e.jsx(
|
|
172
|
-
|
|
172
|
+
O,
|
|
173
173
|
{
|
|
174
174
|
size: "small",
|
|
175
|
-
value:
|
|
176
|
-
options: Ae.map((
|
|
177
|
-
value:
|
|
178
|
-
label: p(`workshopLab.computed.tones.${
|
|
175
|
+
value: h.tone,
|
|
176
|
+
options: Ae.map((L) => ({
|
|
177
|
+
value: L,
|
|
178
|
+
label: p(`workshopLab.computed.tones.${L}`)
|
|
179
179
|
})),
|
|
180
|
-
onChange: (
|
|
181
|
-
colors:
|
|
180
|
+
onChange: (L) => r(l, {
|
|
181
|
+
colors: f.map((N, S) => S === C ? { ...N, tone: L } : N)
|
|
182
182
|
})
|
|
183
183
|
}
|
|
184
184
|
),
|
|
@@ -187,40 +187,100 @@ function es({ source: a, fields: i, save: t, onClose: w }) {
|
|
|
187
187
|
{
|
|
188
188
|
size: "small",
|
|
189
189
|
type: "text",
|
|
190
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
190
|
+
icon: /* @__PURE__ */ e.jsx(Q, {}),
|
|
191
191
|
"aria-label": p("workshopLab.formats.removeColor"),
|
|
192
|
-
onClick: () => r(l, { colors:
|
|
192
|
+
onClick: () => r(l, { colors: f.filter((L, N) => N !== C) })
|
|
193
193
|
}
|
|
194
194
|
)
|
|
195
195
|
] }),
|
|
196
196
|
/* @__PURE__ */ e.jsx(
|
|
197
|
-
|
|
197
|
+
X,
|
|
198
198
|
{
|
|
199
|
-
value:
|
|
199
|
+
value: h.when,
|
|
200
200
|
fields: i,
|
|
201
201
|
source: a,
|
|
202
|
-
onChange: (
|
|
203
|
-
colors:
|
|
202
|
+
onChange: (L) => r(l, {
|
|
203
|
+
colors: f.map((N, S) => S === C ? { ...N, when: L } : N)
|
|
204
204
|
})
|
|
205
205
|
}
|
|
206
206
|
)
|
|
207
|
-
] },
|
|
207
|
+
] }, C))
|
|
208
208
|
] }, l);
|
|
209
209
|
})
|
|
210
210
|
] });
|
|
211
211
|
}
|
|
212
|
+
function as({
|
|
213
|
+
value: a,
|
|
214
|
+
onChange: i
|
|
215
|
+
}) {
|
|
216
|
+
const { t } = A(), { boxes: k, tools: p } = ka(a.box), j = (o) => k?.find((d) => d.boxId === o)?.boxName, c = k?.some((o) => o.boxId === a.box) ?? !0, s = !!a.tool && k !== null && (!c || p !== null && !p.some((o) => o.toolId === a.tool));
|
|
217
|
+
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
218
|
+
/* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
219
|
+
/* @__PURE__ */ e.jsx(
|
|
220
|
+
O,
|
|
221
|
+
{
|
|
222
|
+
size: "small",
|
|
223
|
+
showSearch: !0,
|
|
224
|
+
optionFilterProp: "label",
|
|
225
|
+
className: n.fieldSelect,
|
|
226
|
+
"aria-label": t("workshopLab.models.box"),
|
|
227
|
+
placeholder: t("workshopLab.models.box"),
|
|
228
|
+
loading: k === null,
|
|
229
|
+
value: a.box || void 0,
|
|
230
|
+
options: [
|
|
231
|
+
...(k ?? []).map((o) => ({ value: o.boxId, label: o.boxName })),
|
|
232
|
+
// A box saved before but not listed now still shows, by the name it was saved with.
|
|
233
|
+
...a.box && !c ? [{ value: a.box, label: a.boxName ?? a.box }] : []
|
|
234
|
+
],
|
|
235
|
+
onChange: (o) => {
|
|
236
|
+
const d = j(o);
|
|
237
|
+
i({ box: o, tool: "", ...d ? { boxName: d } : {} });
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
),
|
|
241
|
+
/* @__PURE__ */ e.jsx(
|
|
242
|
+
O,
|
|
243
|
+
{
|
|
244
|
+
size: "small",
|
|
245
|
+
showSearch: !0,
|
|
246
|
+
optionFilterProp: "label",
|
|
247
|
+
className: n.fieldSelect,
|
|
248
|
+
"aria-label": t("workshopLab.models.toolName"),
|
|
249
|
+
placeholder: t("workshopLab.models.toolName"),
|
|
250
|
+
disabled: !a.box,
|
|
251
|
+
loading: !!a.box && p === null,
|
|
252
|
+
value: a.tool || void 0,
|
|
253
|
+
options: [
|
|
254
|
+
...(p ?? []).map((o) => ({ value: o.toolId, label: o.toolName })),
|
|
255
|
+
...a.tool && p && !p.some((o) => o.toolId === a.tool) ? [{ value: a.tool, label: a.name ?? a.tool }] : []
|
|
256
|
+
],
|
|
257
|
+
onChange: (o) => {
|
|
258
|
+
const d = p?.find((r) => r.toolId === o)?.toolName, m = j(a.box) ?? a.boxName;
|
|
259
|
+
i({
|
|
260
|
+
box: a.box,
|
|
261
|
+
tool: o,
|
|
262
|
+
...d ? { name: d } : {},
|
|
263
|
+
...m ? { boxName: m } : {}
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
)
|
|
268
|
+
] }),
|
|
269
|
+
s && /* @__PURE__ */ e.jsx("span", { className: n.error, children: t("workshopLab.models.toolGone") })
|
|
270
|
+
] });
|
|
271
|
+
}
|
|
212
272
|
const Te = ["number", "date", "text"], ze = /* @__PURE__ */ new Set(["sum", "avg", "min", "max"]), we = (a, i) => {
|
|
213
273
|
for (let t = 1; ; t++) if (!a.includes(`${i}${t}`)) return `${i}${t}`;
|
|
214
274
|
};
|
|
215
|
-
function
|
|
275
|
+
function ss({
|
|
216
276
|
source: a,
|
|
217
277
|
network: i,
|
|
218
278
|
scenarioParams: t = [],
|
|
219
|
-
save:
|
|
279
|
+
save: k,
|
|
220
280
|
adding: p = !1,
|
|
221
|
-
onClose:
|
|
281
|
+
onClose: j
|
|
222
282
|
}) {
|
|
223
|
-
const { t: c } =
|
|
283
|
+
const { t: c } = A(), s = a.models ?? [], o = () => ({
|
|
224
284
|
index: s.length,
|
|
225
285
|
model: {
|
|
226
286
|
id: we(
|
|
@@ -234,9 +294,9 @@ function as({
|
|
|
234
294
|
outputs: [{ name: "result", label: "", type: "number" }],
|
|
235
295
|
measures: []
|
|
236
296
|
}
|
|
237
|
-
}), [d,
|
|
297
|
+
}), [d, m] = E.useState(
|
|
238
298
|
() => p && s.length === 0 ? o() : null
|
|
239
|
-
), r = (u) =>
|
|
299
|
+
), r = (u) => k({ ...a, models: u.length > 0 ? u : void 0 });
|
|
240
300
|
return /* @__PURE__ */ e.jsxs("div", { className: n.computedItem, children: [
|
|
241
301
|
/* @__PURE__ */ e.jsxs("div", { className: n.computedHead, children: [
|
|
242
302
|
/* @__PURE__ */ e.jsx("b", { children: c("workshopLab.models.title") }),
|
|
@@ -246,14 +306,14 @@ function as({
|
|
|
246
306
|
{
|
|
247
307
|
size: "small",
|
|
248
308
|
icon: /* @__PURE__ */ e.jsx(ne, {}),
|
|
249
|
-
disabled: s.length >=
|
|
250
|
-
onClick: () =>
|
|
309
|
+
disabled: s.length >= va,
|
|
310
|
+
onClick: () => m(o()),
|
|
251
311
|
children: c("workshopLab.models.add")
|
|
252
312
|
}
|
|
253
313
|
)
|
|
254
314
|
] }),
|
|
255
315
|
s.map((u, l) => {
|
|
256
|
-
const
|
|
316
|
+
const w = u.action ? be(i, u.action.id) : void 0;
|
|
257
317
|
return /* @__PURE__ */ e.jsxs("div", { className: n.operationItem, children: [
|
|
258
318
|
/* @__PURE__ */ e.jsxs("span", { children: [
|
|
259
319
|
/* @__PURE__ */ e.jsx("b", { children: u.label }),
|
|
@@ -261,18 +321,18 @@ function as({
|
|
|
261
321
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: u.tool.name ?? u.tool.tool })
|
|
262
322
|
] }),
|
|
263
323
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: c("workshopLab.models.summary", {
|
|
264
|
-
params: u.params.map((
|
|
265
|
-
outputs: u.outputs.map((
|
|
266
|
-
measures: u.measures.map((
|
|
324
|
+
params: u.params.map((f) => f.label).join("、") || "—",
|
|
325
|
+
outputs: u.outputs.map((f) => f.label).join("、"),
|
|
326
|
+
measures: u.measures.map((f) => f.label).join("、")
|
|
267
327
|
}) }),
|
|
268
|
-
/* @__PURE__ */ e.jsx("span", { className: n.muted, children:
|
|
269
|
-
/* @__PURE__ */ e.jsxs(
|
|
270
|
-
/* @__PURE__ */ e.jsx($, { size: "small", type: "link", onClick: () =>
|
|
328
|
+
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: w ? c("workshopLab.models.actionText", { name: w.name }) : c("workshopLab.models.noAction") }),
|
|
329
|
+
/* @__PURE__ */ e.jsxs(F, { size: 4, children: [
|
|
330
|
+
/* @__PURE__ */ e.jsx($, { size: "small", type: "link", onClick: () => m({ index: l, model: u }), children: c("workshopLab.computed.edit") }),
|
|
271
331
|
/* @__PURE__ */ e.jsx(
|
|
272
332
|
ee,
|
|
273
333
|
{
|
|
274
334
|
title: c("workshopLab.models.removeConfirm", { name: u.label }),
|
|
275
|
-
onConfirm: () => r(s.filter((
|
|
335
|
+
onConfirm: () => r(s.filter((f, h) => h !== l)),
|
|
276
336
|
children: /* @__PURE__ */ e.jsx($, { size: "small", type: "link", danger: !0, children: c("workshopLab.computed.remove") })
|
|
277
337
|
}
|
|
278
338
|
)
|
|
@@ -280,7 +340,7 @@ function as({
|
|
|
280
340
|
] }, u.id);
|
|
281
341
|
}),
|
|
282
342
|
d && /* @__PURE__ */ e.jsx(
|
|
283
|
-
|
|
343
|
+
os,
|
|
284
344
|
{
|
|
285
345
|
initial: d.model,
|
|
286
346
|
source: a,
|
|
@@ -288,44 +348,44 @@ function as({
|
|
|
288
348
|
scenarioParams: t,
|
|
289
349
|
others: s.filter((u, l) => l !== d.index),
|
|
290
350
|
onCancel: () => {
|
|
291
|
-
|
|
351
|
+
m(null), s.length === 0 && j?.();
|
|
292
352
|
},
|
|
293
353
|
onSave: (u) => {
|
|
294
354
|
const l = [...s];
|
|
295
|
-
l[d.index] = u, r(l) &&
|
|
355
|
+
l[d.index] = u, r(l) && m(null);
|
|
296
356
|
}
|
|
297
357
|
}
|
|
298
358
|
)
|
|
299
359
|
] });
|
|
300
360
|
}
|
|
301
|
-
function
|
|
361
|
+
function os({
|
|
302
362
|
initial: a,
|
|
303
363
|
source: i,
|
|
304
364
|
network: t,
|
|
305
|
-
scenarioParams:
|
|
365
|
+
scenarioParams: k,
|
|
306
366
|
others: p,
|
|
307
|
-
onCancel:
|
|
367
|
+
onCancel: j,
|
|
308
368
|
onSave: c
|
|
309
369
|
}) {
|
|
310
|
-
const { t: s } =
|
|
311
|
-
(
|
|
312
|
-
),
|
|
370
|
+
const { t: s } = A(), [o, d] = E.useState(a), m = (x) => d({ ...o, ...x }), r = xe(i, t), u = t.objectTypes[i.objectType]?.properties ?? [], l = ya(i, t, o), w = (t.actionTypes ?? []).filter(
|
|
371
|
+
(x) => x.objectType === i.objectType
|
|
372
|
+
), f = o.action ? be(t, o.action.id) : void 0, h = {
|
|
313
373
|
...o,
|
|
314
374
|
label: o.label.trim(),
|
|
315
375
|
...o.description?.trim() ? { description: o.description.trim() } : {}
|
|
316
376
|
};
|
|
317
|
-
|
|
318
|
-
const C =
|
|
319
|
-
(
|
|
320
|
-
) : [s("workshopLab.models.needLabel")],
|
|
321
|
-
[
|
|
322
|
-
(
|
|
377
|
+
h.description || delete h.description;
|
|
378
|
+
const C = h.label ? Na([...p, h], i, t, "model").filter(
|
|
379
|
+
(x) => x.startsWith(`model[${p.length}]`)
|
|
380
|
+
) : [s("workshopLab.models.needLabel")], L = (x, b, g) => m({
|
|
381
|
+
[x]: o[x].map(
|
|
382
|
+
(T, _) => _ === b ? { ...T, ...g } : T
|
|
323
383
|
)
|
|
324
|
-
}), N = (
|
|
384
|
+
}), N = (x, b) => m({ [x]: o[x].filter((g, T) => T !== b) }), S = (x, b) => {
|
|
325
385
|
if (!o.action) return;
|
|
326
|
-
const
|
|
327
|
-
|
|
328
|
-
},
|
|
386
|
+
const g = { ...o.action.params };
|
|
387
|
+
b ? g[x] = b : delete g[x], m({ action: { ...o.action, params: g } });
|
|
388
|
+
}, y = (x) => x ? x.from === "const" ? "const" : `${x.from}:${x.name}` : void 0;
|
|
329
389
|
return /* @__PURE__ */ e.jsx(
|
|
330
390
|
ae,
|
|
331
391
|
{
|
|
@@ -334,11 +394,11 @@ function ss({
|
|
|
334
394
|
title: a.label ? s("workshopLab.models.editTitle", { name: a.label }) : s("workshopLab.models.newTitle"),
|
|
335
395
|
okText: s("workshopLab.computed.save"),
|
|
336
396
|
okButtonProps: { disabled: C.length > 0 },
|
|
337
|
-
onOk: () => c(
|
|
338
|
-
onCancel:
|
|
397
|
+
onOk: () => c(h),
|
|
398
|
+
onCancel: j,
|
|
339
399
|
children: /* @__PURE__ */ e.jsxs("div", { className: n.computedForm, children: [
|
|
340
400
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: s("workshopLab.models.hint") }),
|
|
341
|
-
/* @__PURE__ */ e.jsxs(
|
|
401
|
+
/* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
342
402
|
/* @__PURE__ */ e.jsx("span", { children: s("workshopLab.models.label") }),
|
|
343
403
|
/* @__PURE__ */ e.jsx(
|
|
344
404
|
I,
|
|
@@ -348,7 +408,7 @@ function ss({
|
|
|
348
408
|
maxLength: 30,
|
|
349
409
|
placeholder: s("workshopLab.models.labelHint"),
|
|
350
410
|
value: o.label,
|
|
351
|
-
onChange: (
|
|
411
|
+
onChange: (x) => m({ label: x.target.value })
|
|
352
412
|
}
|
|
353
413
|
)
|
|
354
414
|
] }),
|
|
@@ -358,70 +418,28 @@ function ss({
|
|
|
358
418
|
size: "small",
|
|
359
419
|
placeholder: s("workshopLab.models.description"),
|
|
360
420
|
value: o.description ?? "",
|
|
361
|
-
onChange: (
|
|
421
|
+
onChange: (x) => m({ description: x.target.value })
|
|
362
422
|
}
|
|
363
423
|
),
|
|
364
424
|
/* @__PURE__ */ e.jsx("b", { children: s("workshopLab.models.tool") }),
|
|
365
425
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: s("workshopLab.models.toolHint") }),
|
|
366
|
-
/* @__PURE__ */ e.
|
|
367
|
-
/* @__PURE__ */ e.jsx(
|
|
368
|
-
F,
|
|
369
|
-
{
|
|
370
|
-
size: "small",
|
|
371
|
-
showSearch: !0,
|
|
372
|
-
optionFilterProp: "label",
|
|
373
|
-
className: n.fieldSelect,
|
|
374
|
-
"aria-label": s("workshopLab.models.box"),
|
|
375
|
-
placeholder: s("workshopLab.models.box"),
|
|
376
|
-
loading: r === null,
|
|
377
|
-
value: o.tool.box || void 0,
|
|
378
|
-
options: [
|
|
379
|
-
...(r ?? []).map((m) => ({ value: m.boxId, label: m.boxName })),
|
|
380
|
-
// A box saved before but not listed now still shows, by its id.
|
|
381
|
-
...o.tool.box && r && !r.some((m) => m.boxId === o.tool.box) ? [{ value: o.tool.box, label: o.tool.box }] : []
|
|
382
|
-
],
|
|
383
|
-
onChange: (m) => h({ tool: { box: m, tool: "" } })
|
|
384
|
-
}
|
|
385
|
-
),
|
|
386
|
-
/* @__PURE__ */ e.jsx(
|
|
387
|
-
F,
|
|
388
|
-
{
|
|
389
|
-
size: "small",
|
|
390
|
-
showSearch: !0,
|
|
391
|
-
optionFilterProp: "label",
|
|
392
|
-
className: n.fieldSelect,
|
|
393
|
-
"aria-label": s("workshopLab.models.toolName"),
|
|
394
|
-
placeholder: s("workshopLab.models.toolName"),
|
|
395
|
-
disabled: !o.tool.box,
|
|
396
|
-
loading: !!o.tool.box && u === null,
|
|
397
|
-
value: o.tool.tool || void 0,
|
|
398
|
-
options: [
|
|
399
|
-
...(u ?? []).map((m) => ({ value: m.toolId, label: m.toolName })),
|
|
400
|
-
...o.tool.tool && u && !u.some((m) => m.toolId === o.tool.tool) ? [{ value: o.tool.tool, label: o.tool.name ?? o.tool.tool }] : []
|
|
401
|
-
],
|
|
402
|
-
onChange: (m) => {
|
|
403
|
-
const x = u?.find((y) => y.toolId === m)?.toolName;
|
|
404
|
-
h({ tool: { box: o.tool.box, tool: m, ...x ? { name: x } : {} } });
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
)
|
|
408
|
-
] }),
|
|
426
|
+
/* @__PURE__ */ e.jsx(as, { value: o.tool, onChange: (x) => m({ tool: x }) }),
|
|
409
427
|
/* @__PURE__ */ e.jsx("b", { children: s("workshopLab.models.inputs") }),
|
|
410
428
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: s("workshopLab.models.inputsHint") }),
|
|
411
429
|
/* @__PURE__ */ e.jsx(
|
|
412
|
-
|
|
430
|
+
O,
|
|
413
431
|
{
|
|
414
432
|
size: "small",
|
|
415
433
|
mode: "multiple",
|
|
416
434
|
"aria-label": s("workshopLab.models.inputs"),
|
|
417
435
|
value: o.inputs,
|
|
418
|
-
options:
|
|
419
|
-
onChange: (
|
|
436
|
+
options: r.map((x) => ({ value: x.name, label: x.label })),
|
|
437
|
+
onChange: (x) => m({ inputs: x })
|
|
420
438
|
}
|
|
421
439
|
),
|
|
422
440
|
/* @__PURE__ */ e.jsx("b", { children: s("workshopLab.models.params") }),
|
|
423
441
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: s("workshopLab.models.paramsHint") }),
|
|
424
|
-
o.params.map((
|
|
442
|
+
o.params.map((x, b) => /* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
425
443
|
/* @__PURE__ */ e.jsx(
|
|
426
444
|
I,
|
|
427
445
|
{
|
|
@@ -429,8 +447,8 @@ function ss({
|
|
|
429
447
|
className: n.fieldSelect,
|
|
430
448
|
"aria-label": s("workshopLab.models.paramName"),
|
|
431
449
|
placeholder: s("workshopLab.models.paramName"),
|
|
432
|
-
value:
|
|
433
|
-
onChange: (
|
|
450
|
+
value: x.name,
|
|
451
|
+
onChange: (g) => L("params", b, { name: g.target.value.trim() })
|
|
434
452
|
}
|
|
435
453
|
),
|
|
436
454
|
/* @__PURE__ */ e.jsx(
|
|
@@ -440,22 +458,22 @@ function ss({
|
|
|
440
458
|
className: n.fieldSelect,
|
|
441
459
|
"aria-label": s("workshopLab.models.paramLabel"),
|
|
442
460
|
placeholder: s("workshopLab.models.paramLabel"),
|
|
443
|
-
value:
|
|
444
|
-
onChange: (
|
|
461
|
+
value: x.label,
|
|
462
|
+
onChange: (g) => L("params", b, { label: g.target.value })
|
|
445
463
|
}
|
|
446
464
|
),
|
|
447
465
|
/* @__PURE__ */ e.jsx(
|
|
448
|
-
|
|
466
|
+
O,
|
|
449
467
|
{
|
|
450
468
|
size: "small",
|
|
451
469
|
"aria-label": s("workshopLab.models.paramType"),
|
|
452
|
-
value:
|
|
453
|
-
options: Te.map((
|
|
454
|
-
value:
|
|
455
|
-
label: s(`workshopLab.operations.types.${
|
|
470
|
+
value: x.type,
|
|
471
|
+
options: Te.map((g) => ({
|
|
472
|
+
value: g,
|
|
473
|
+
label: s(`workshopLab.operations.types.${g}`)
|
|
456
474
|
})),
|
|
457
|
-
onChange: (
|
|
458
|
-
type:
|
|
475
|
+
onChange: (g) => L("params", b, {
|
|
476
|
+
type: g,
|
|
459
477
|
min: void 0,
|
|
460
478
|
max: void 0,
|
|
461
479
|
default: void 0,
|
|
@@ -464,26 +482,26 @@ function ss({
|
|
|
464
482
|
}
|
|
465
483
|
),
|
|
466
484
|
/* @__PURE__ */ e.jsx(
|
|
467
|
-
|
|
485
|
+
O,
|
|
468
486
|
{
|
|
469
487
|
size: "small",
|
|
470
488
|
allowClear: !0,
|
|
471
489
|
className: n.fieldSelect,
|
|
472
490
|
"aria-label": s("workshopLab.models.scenarioParam"),
|
|
473
491
|
placeholder: s("workshopLab.models.scenarioParam"),
|
|
474
|
-
value:
|
|
475
|
-
options:
|
|
476
|
-
onChange: (
|
|
492
|
+
value: x.scenarioParam,
|
|
493
|
+
options: k.filter((g) => g.type === x.type).map((g) => ({ value: g.name, label: g.label })),
|
|
494
|
+
onChange: (g) => L("params", b, { scenarioParam: g })
|
|
477
495
|
}
|
|
478
496
|
),
|
|
479
|
-
|
|
497
|
+
x.type === "number" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
480
498
|
/* @__PURE__ */ e.jsx(
|
|
481
499
|
G,
|
|
482
500
|
{
|
|
483
501
|
size: "small",
|
|
484
502
|
placeholder: s("workshopLab.operations.min"),
|
|
485
|
-
value:
|
|
486
|
-
onChange: (
|
|
503
|
+
value: x.min ?? null,
|
|
504
|
+
onChange: (g) => L("params", b, { min: g ?? void 0 })
|
|
487
505
|
}
|
|
488
506
|
),
|
|
489
507
|
/* @__PURE__ */ e.jsx(
|
|
@@ -491,8 +509,8 @@ function ss({
|
|
|
491
509
|
{
|
|
492
510
|
size: "small",
|
|
493
511
|
placeholder: s("workshopLab.operations.max"),
|
|
494
|
-
value:
|
|
495
|
-
onChange: (
|
|
512
|
+
value: x.max ?? null,
|
|
513
|
+
onChange: (g) => L("params", b, { max: g ?? void 0 })
|
|
496
514
|
}
|
|
497
515
|
),
|
|
498
516
|
/* @__PURE__ */ e.jsx(
|
|
@@ -500,8 +518,8 @@ function ss({
|
|
|
500
518
|
{
|
|
501
519
|
size: "small",
|
|
502
520
|
placeholder: s("workshopLab.operations.default"),
|
|
503
|
-
value: typeof
|
|
504
|
-
onChange: (
|
|
521
|
+
value: typeof x.default == "number" ? x.default : null,
|
|
522
|
+
onChange: (g) => L("params", b, { default: g ?? void 0 })
|
|
505
523
|
}
|
|
506
524
|
)
|
|
507
525
|
] }) : /* @__PURE__ */ e.jsx(
|
|
@@ -509,10 +527,10 @@ function ss({
|
|
|
509
527
|
{
|
|
510
528
|
size: "small",
|
|
511
529
|
className: n.fieldSelect,
|
|
512
|
-
type:
|
|
530
|
+
type: x.type === "date" ? "date" : "text",
|
|
513
531
|
placeholder: s("workshopLab.operations.default"),
|
|
514
|
-
value: typeof
|
|
515
|
-
onChange: (
|
|
532
|
+
value: typeof x.default == "string" ? x.default : "",
|
|
533
|
+
onChange: (g) => L("params", b, { default: g.target.value || void 0 })
|
|
516
534
|
}
|
|
517
535
|
),
|
|
518
536
|
/* @__PURE__ */ e.jsx(
|
|
@@ -521,23 +539,23 @@ function ss({
|
|
|
521
539
|
size: "small",
|
|
522
540
|
type: "text",
|
|
523
541
|
danger: !0,
|
|
524
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
542
|
+
icon: /* @__PURE__ */ e.jsx(Q, {}),
|
|
525
543
|
"aria-label": s("workshopLab.config.removeItem"),
|
|
526
|
-
onClick: () => N("params",
|
|
544
|
+
onClick: () => N("params", b)
|
|
527
545
|
}
|
|
528
546
|
)
|
|
529
|
-
] },
|
|
547
|
+
] }, b)),
|
|
530
548
|
/* @__PURE__ */ e.jsx(
|
|
531
549
|
$,
|
|
532
550
|
{
|
|
533
551
|
size: "small",
|
|
534
552
|
disabled: o.params.length >= Be,
|
|
535
|
-
onClick: () =>
|
|
553
|
+
onClick: () => m({
|
|
536
554
|
params: [
|
|
537
555
|
...o.params,
|
|
538
556
|
{
|
|
539
557
|
name: we(
|
|
540
|
-
o.params.map((
|
|
558
|
+
o.params.map((x) => x.name),
|
|
541
559
|
"p"
|
|
542
560
|
),
|
|
543
561
|
label: "",
|
|
@@ -550,7 +568,7 @@ function ss({
|
|
|
550
568
|
),
|
|
551
569
|
/* @__PURE__ */ e.jsx("b", { children: s("workshopLab.models.outputs") }),
|
|
552
570
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: s("workshopLab.models.outputsHint") }),
|
|
553
|
-
o.outputs.map((
|
|
571
|
+
o.outputs.map((x, b) => /* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
554
572
|
/* @__PURE__ */ e.jsx(
|
|
555
573
|
I,
|
|
556
574
|
{
|
|
@@ -558,8 +576,8 @@ function ss({
|
|
|
558
576
|
className: n.fieldSelect,
|
|
559
577
|
"aria-label": s("workshopLab.models.outputName"),
|
|
560
578
|
placeholder: s("workshopLab.models.outputName"),
|
|
561
|
-
value:
|
|
562
|
-
onChange: (
|
|
579
|
+
value: x.name,
|
|
580
|
+
onChange: (g) => L("outputs", b, { name: g.target.value.trim() })
|
|
563
581
|
}
|
|
564
582
|
),
|
|
565
583
|
/* @__PURE__ */ e.jsx(
|
|
@@ -569,21 +587,21 @@ function ss({
|
|
|
569
587
|
className: n.fieldSelect,
|
|
570
588
|
"aria-label": s("workshopLab.models.outputLabel"),
|
|
571
589
|
placeholder: s("workshopLab.models.outputLabel"),
|
|
572
|
-
value:
|
|
573
|
-
onChange: (
|
|
590
|
+
value: x.label,
|
|
591
|
+
onChange: (g) => L("outputs", b, { label: g.target.value })
|
|
574
592
|
}
|
|
575
593
|
),
|
|
576
594
|
/* @__PURE__ */ e.jsx(
|
|
577
|
-
|
|
595
|
+
O,
|
|
578
596
|
{
|
|
579
597
|
size: "small",
|
|
580
598
|
"aria-label": s("workshopLab.models.outputType"),
|
|
581
|
-
value:
|
|
582
|
-
options: Te.map((
|
|
583
|
-
value:
|
|
584
|
-
label: s(`workshopLab.operations.types.${
|
|
599
|
+
value: x.type,
|
|
600
|
+
options: Te.map((g) => ({
|
|
601
|
+
value: g,
|
|
602
|
+
label: s(`workshopLab.operations.types.${g}`)
|
|
585
603
|
})),
|
|
586
|
-
onChange: (
|
|
604
|
+
onChange: (g) => L("outputs", b, { type: g })
|
|
587
605
|
}
|
|
588
606
|
),
|
|
589
607
|
/* @__PURE__ */ e.jsx(
|
|
@@ -592,24 +610,24 @@ function ss({
|
|
|
592
610
|
size: "small",
|
|
593
611
|
type: "text",
|
|
594
612
|
danger: !0,
|
|
595
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
613
|
+
icon: /* @__PURE__ */ e.jsx(Q, {}),
|
|
596
614
|
"aria-label": s("workshopLab.config.removeItem"),
|
|
597
615
|
disabled: o.outputs.length <= 1,
|
|
598
|
-
onClick: () => N("outputs",
|
|
616
|
+
onClick: () => N("outputs", b)
|
|
599
617
|
}
|
|
600
618
|
)
|
|
601
|
-
] },
|
|
619
|
+
] }, b)),
|
|
602
620
|
/* @__PURE__ */ e.jsx(
|
|
603
621
|
$,
|
|
604
622
|
{
|
|
605
623
|
size: "small",
|
|
606
624
|
disabled: o.outputs.length >= Sa,
|
|
607
|
-
onClick: () =>
|
|
625
|
+
onClick: () => m({
|
|
608
626
|
outputs: [
|
|
609
627
|
...o.outputs,
|
|
610
628
|
{
|
|
611
629
|
name: we(
|
|
612
|
-
o.outputs.map((
|
|
630
|
+
o.outputs.map((x) => x.name),
|
|
613
631
|
"result"
|
|
614
632
|
),
|
|
615
633
|
label: "",
|
|
@@ -622,8 +640,8 @@ function ss({
|
|
|
622
640
|
),
|
|
623
641
|
/* @__PURE__ */ e.jsx("b", { children: s("workshopLab.models.measures") }),
|
|
624
642
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: s("workshopLab.models.measuresHint") }),
|
|
625
|
-
o.measures.map((
|
|
626
|
-
/* @__PURE__ */ e.jsxs(
|
|
643
|
+
o.measures.map((x, b) => /* @__PURE__ */ e.jsxs("div", { className: n.computedItem, children: [
|
|
644
|
+
/* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
627
645
|
/* @__PURE__ */ e.jsx(
|
|
628
646
|
I,
|
|
629
647
|
{
|
|
@@ -631,36 +649,36 @@ function ss({
|
|
|
631
649
|
className: n.fieldSelect,
|
|
632
650
|
"aria-label": s("workshopLab.models.measureLabel"),
|
|
633
651
|
placeholder: s("workshopLab.models.measureLabel"),
|
|
634
|
-
value:
|
|
635
|
-
onChange: (
|
|
652
|
+
value: x.label,
|
|
653
|
+
onChange: (g) => L("measures", b, { label: g.target.value })
|
|
636
654
|
}
|
|
637
655
|
),
|
|
638
656
|
/* @__PURE__ */ e.jsx(
|
|
639
|
-
|
|
657
|
+
O,
|
|
640
658
|
{
|
|
641
659
|
size: "small",
|
|
642
660
|
"aria-label": s("workshopLab.models.measureAggregate"),
|
|
643
|
-
value:
|
|
644
|
-
options: Ca.map((
|
|
645
|
-
value:
|
|
646
|
-
label: s(`workshopLab.models.aggregates.${
|
|
661
|
+
value: x.aggregate,
|
|
662
|
+
options: Ca.map((g) => ({
|
|
663
|
+
value: g,
|
|
664
|
+
label: s(`workshopLab.models.aggregates.${g}`)
|
|
647
665
|
})),
|
|
648
|
-
onChange: (
|
|
649
|
-
aggregate:
|
|
650
|
-
...ze.has(
|
|
666
|
+
onChange: (g) => L("measures", b, {
|
|
667
|
+
aggregate: g,
|
|
668
|
+
...ze.has(g) ? {} : { valueField: void 0 }
|
|
651
669
|
})
|
|
652
670
|
}
|
|
653
671
|
),
|
|
654
|
-
ze.has(
|
|
655
|
-
|
|
672
|
+
ze.has(x.aggregate) && /* @__PURE__ */ e.jsx(
|
|
673
|
+
O,
|
|
656
674
|
{
|
|
657
675
|
size: "small",
|
|
658
676
|
className: n.fieldSelect,
|
|
659
677
|
"aria-label": s("workshopLab.models.valueField"),
|
|
660
678
|
placeholder: s("workshopLab.models.valueField"),
|
|
661
|
-
value:
|
|
662
|
-
options:
|
|
663
|
-
onChange: (
|
|
679
|
+
value: x.valueField,
|
|
680
|
+
options: l.filter((g) => g.type === "number").map((g) => ({ value: g.name, label: g.label || g.name })),
|
|
681
|
+
onChange: (g) => L("measures", b, { valueField: g })
|
|
664
682
|
}
|
|
665
683
|
),
|
|
666
684
|
/* @__PURE__ */ e.jsx(
|
|
@@ -669,102 +687,102 @@ function ss({
|
|
|
669
687
|
size: "small",
|
|
670
688
|
type: "text",
|
|
671
689
|
danger: !0,
|
|
672
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
690
|
+
icon: /* @__PURE__ */ e.jsx(Q, {}),
|
|
673
691
|
"aria-label": s("workshopLab.config.removeItem"),
|
|
674
|
-
onClick: () => N("measures",
|
|
692
|
+
onClick: () => N("measures", b)
|
|
675
693
|
}
|
|
676
694
|
)
|
|
677
695
|
] }),
|
|
678
696
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: s("workshopLab.models.measureWhen") }),
|
|
679
697
|
/* @__PURE__ */ e.jsx(
|
|
680
|
-
|
|
698
|
+
X,
|
|
681
699
|
{
|
|
682
|
-
value:
|
|
683
|
-
onChange: (
|
|
684
|
-
fields:
|
|
700
|
+
value: x.when,
|
|
701
|
+
onChange: (g) => L("measures", b, { when: g.length ? g : void 0 }),
|
|
702
|
+
fields: l,
|
|
685
703
|
source: i
|
|
686
704
|
}
|
|
687
705
|
)
|
|
688
|
-
] },
|
|
706
|
+
] }, b)),
|
|
689
707
|
/* @__PURE__ */ e.jsx(
|
|
690
708
|
$,
|
|
691
709
|
{
|
|
692
710
|
size: "small",
|
|
693
711
|
disabled: o.measures.length >= Ta,
|
|
694
|
-
onClick: () =>
|
|
712
|
+
onClick: () => m({ measures: [...o.measures, { label: "", aggregate: "count" }] }),
|
|
695
713
|
children: s("workshopLab.models.addMeasure")
|
|
696
714
|
}
|
|
697
715
|
),
|
|
698
716
|
/* @__PURE__ */ e.jsx("b", { children: s("workshopLab.models.action") }),
|
|
699
717
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: s("workshopLab.models.actionHint") }),
|
|
700
718
|
/* @__PURE__ */ e.jsx(
|
|
701
|
-
|
|
719
|
+
O,
|
|
702
720
|
{
|
|
703
721
|
size: "small",
|
|
704
722
|
allowClear: !0,
|
|
705
723
|
"aria-label": s("workshopLab.models.action"),
|
|
706
724
|
placeholder: s("workshopLab.models.noAction"),
|
|
707
725
|
value: o.action?.id,
|
|
708
|
-
options:
|
|
709
|
-
onChange: (
|
|
710
|
-
const
|
|
711
|
-
|
|
726
|
+
options: w.map((x) => ({ value: x.id, label: x.name })),
|
|
727
|
+
onChange: (x) => {
|
|
728
|
+
const b = { ...o };
|
|
729
|
+
x ? b.action = { id: x, params: {} } : delete b.action, d(b);
|
|
712
730
|
}
|
|
713
731
|
}
|
|
714
732
|
),
|
|
715
|
-
|
|
716
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
733
|
+
f?.inputs.map((x) => /* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
734
|
+
/* @__PURE__ */ e.jsx("span", { children: x.name }),
|
|
717
735
|
/* @__PURE__ */ e.jsx(
|
|
718
|
-
|
|
736
|
+
O,
|
|
719
737
|
{
|
|
720
738
|
size: "small",
|
|
721
739
|
className: n.fieldSelect,
|
|
722
740
|
allowClear: !0,
|
|
723
|
-
"aria-label":
|
|
741
|
+
"aria-label": x.name,
|
|
724
742
|
placeholder: s("workshopLab.models.sameName"),
|
|
725
|
-
value:
|
|
743
|
+
value: y(o.action?.params?.[x.name]),
|
|
726
744
|
options: [
|
|
727
|
-
...o.outputs.map((
|
|
728
|
-
value: `output:${
|
|
729
|
-
label: s("workshopLab.models.fromOutput", { name:
|
|
745
|
+
...o.outputs.map((b) => ({
|
|
746
|
+
value: `output:${b.name}`,
|
|
747
|
+
label: s("workshopLab.models.fromOutput", { name: b.label || b.name })
|
|
730
748
|
})),
|
|
731
|
-
...o.params.map((
|
|
732
|
-
value: `param:${
|
|
733
|
-
label: s("workshopLab.operations.fromParam", { name:
|
|
749
|
+
...o.params.map((b) => ({
|
|
750
|
+
value: `param:${b.name}`,
|
|
751
|
+
label: s("workshopLab.operations.fromParam", { name: b.label || b.name })
|
|
734
752
|
})),
|
|
735
|
-
...
|
|
736
|
-
value: `field:${
|
|
737
|
-
label: s("workshopLab.models.fromField", { name:
|
|
753
|
+
...u.map((b) => ({
|
|
754
|
+
value: `field:${b.name}`,
|
|
755
|
+
label: s("workshopLab.models.fromField", { name: b.label })
|
|
738
756
|
})),
|
|
739
757
|
{ value: "const", label: s("workshopLab.operations.fromConst") }
|
|
740
758
|
],
|
|
741
|
-
onChange: (
|
|
742
|
-
if (!
|
|
743
|
-
if (
|
|
744
|
-
const [
|
|
745
|
-
|
|
759
|
+
onChange: (b) => {
|
|
760
|
+
if (!b) return S(x.name, void 0);
|
|
761
|
+
if (b === "const") return S(x.name, { from: "const", value: "" });
|
|
762
|
+
const [g, T] = b.split(/:(.*)/s);
|
|
763
|
+
S(x.name, { from: g, name: T });
|
|
746
764
|
}
|
|
747
765
|
}
|
|
748
766
|
),
|
|
749
|
-
o.action?.params?.[
|
|
767
|
+
o.action?.params?.[x.name]?.from === "const" && /* @__PURE__ */ e.jsx(
|
|
750
768
|
I,
|
|
751
769
|
{
|
|
752
770
|
size: "small",
|
|
753
771
|
className: n.fieldSelect,
|
|
754
|
-
"aria-label": `${
|
|
772
|
+
"aria-label": `${x.name} ${s("workshopLab.operations.fromConst")}`,
|
|
755
773
|
value: String(
|
|
756
|
-
o.action.params[
|
|
774
|
+
o.action.params[x.name].value ?? ""
|
|
757
775
|
),
|
|
758
|
-
onChange: (
|
|
776
|
+
onChange: (b) => S(x.name, { from: "const", value: b.target.value })
|
|
759
777
|
}
|
|
760
778
|
)
|
|
761
|
-
] },
|
|
762
|
-
C.length > 0 &&
|
|
779
|
+
] }, x.name)),
|
|
780
|
+
C.length > 0 && h.label && /* @__PURE__ */ e.jsx(
|
|
763
781
|
re,
|
|
764
782
|
{
|
|
765
783
|
type: "warning",
|
|
766
784
|
showIcon: !0,
|
|
767
|
-
message: C.slice(0, 3).map((
|
|
785
|
+
message: C.slice(0, 3).map((x) => x.replace(/^model\[\d+\]\.?/, "")).join(";")
|
|
768
786
|
}
|
|
769
787
|
)
|
|
770
788
|
] })
|
|
@@ -772,110 +790,110 @@ function ss({
|
|
|
772
790
|
);
|
|
773
791
|
}
|
|
774
792
|
function $e() {
|
|
775
|
-
const { t: a } =
|
|
776
|
-
return /* @__PURE__ */ e.jsx(
|
|
793
|
+
const { t: a } = A();
|
|
794
|
+
return /* @__PURE__ */ e.jsx(ge, { title: a("workshopLab.generated.tagHint"), children: /* @__PURE__ */ e.jsx(J, { color: "blue", children: a("workshopLab.generated.tag") }) });
|
|
777
795
|
}
|
|
778
796
|
function Ue(a, i, t) {
|
|
779
797
|
if (!a?.length) return t("workshopLab.dataView.allObjects");
|
|
780
|
-
const
|
|
798
|
+
const k = (p) => p === Y ? t("workshopLab.computed.asOf") : i.find((j) => j.name === p)?.label ?? p;
|
|
781
799
|
return a.map((p) => {
|
|
782
|
-
const
|
|
783
|
-
return [
|
|
800
|
+
const j = p.ref !== void 0 ? k(p.ref) : p.values ? p.values.map((c) => ve(p.field, c)).join("、") : p.value !== void 0 ? ve(p.field, String(p.value)) : "";
|
|
801
|
+
return [k(p.field), t(`workshopLab.computed.ops.${p.op}`), j].filter(Boolean).join(" ");
|
|
784
802
|
}).join(",");
|
|
785
803
|
}
|
|
786
804
|
const Oe = { sources: /* @__PURE__ */ new Map(), columns: /* @__PURE__ */ new Map() };
|
|
787
|
-
function
|
|
788
|
-
const
|
|
789
|
-
if (!
|
|
805
|
+
function ls(a, i, t) {
|
|
806
|
+
const k = a.scheduleModel;
|
|
807
|
+
if (!k) return Oe;
|
|
790
808
|
let p;
|
|
791
809
|
try {
|
|
792
|
-
p = ja(
|
|
810
|
+
p = ja(k, i);
|
|
793
811
|
} catch {
|
|
794
812
|
return Oe;
|
|
795
813
|
}
|
|
796
|
-
const
|
|
797
|
-
...i.objectTypes[
|
|
798
|
-
...(
|
|
799
|
-
] : [], d = (
|
|
800
|
-
for (const
|
|
801
|
-
const
|
|
802
|
-
if (!
|
|
803
|
-
const
|
|
814
|
+
const j = new Map(a.sources.map((h) => [h.id, h])), c = (h) => i.objectTypes[h]?.name ?? h, s = (h) => j.get(h)?.label ?? p.sources.find((C) => C.id === h)?.label ?? h, o = (h) => h ? [
|
|
815
|
+
...i.objectTypes[h.objectType]?.properties ?? [],
|
|
816
|
+
...(h.computed ?? []).map(te)
|
|
817
|
+
] : [], d = (h, C) => o(h).find((L) => L.name === C)?.label ?? C, m = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), u = k.result === "record" ? k.record : void 0, l = j.get(U.task(0)), w = u?.active?.length ? U.activePlan : U.plan;
|
|
818
|
+
for (const h of p.sources) {
|
|
819
|
+
const C = j.get(h.id);
|
|
820
|
+
if (!C) continue;
|
|
821
|
+
const L = c(h.objectType), N = /^scheduleTask(\d+)$/.exec(h.id);
|
|
804
822
|
let S;
|
|
805
|
-
|
|
806
|
-
l?.computed?.some((
|
|
807
|
-
{ type:
|
|
808
|
-
) :
|
|
823
|
+
N && u ? S = t("workshopLab.generated.sources.demand", { type: L }) : N ? S = t("workshopLab.generated.sources.task", { type: L }) : h.id === U.unplanned ? S = t(
|
|
824
|
+
l?.computed?.some((x) => x.name === ke.open) ? "workshopLab.generated.sources.unplannedOpen" : "workshopLab.generated.sources.unplanned",
|
|
825
|
+
{ type: L }
|
|
826
|
+
) : h.id === U.plan ? S = t("workshopLab.generated.sources.plan", { type: L }) : h.id === U.activePlan ? S = t("workshopLab.generated.sources.activePlan", {
|
|
809
827
|
plan: s(U.plan),
|
|
810
|
-
when: Ue(
|
|
811
|
-
}) :
|
|
812
|
-
const
|
|
813
|
-
for (const
|
|
814
|
-
const
|
|
815
|
-
if (!
|
|
816
|
-
const
|
|
817
|
-
|
|
828
|
+
when: Ue(C.from?.where, o(j.get(U.plan)), t)
|
|
829
|
+
}) : h.id === U.resource ? S = t("workshopLab.generated.sources.resource", { type: L }) : h.id.startsWith("scheduleCalendar") && (S = t("workshopLab.generated.sources.calendar", { type: L })), S && m.set(h.id, S);
|
|
830
|
+
const y = /* @__PURE__ */ new Map();
|
|
831
|
+
for (const x of h.computed ?? []) {
|
|
832
|
+
const b = C.computed?.find((T) => T.name === x.name);
|
|
833
|
+
if (!b) continue;
|
|
834
|
+
const g = f(b, C);
|
|
835
|
+
g && y.set(b.name, g);
|
|
818
836
|
}
|
|
819
|
-
|
|
837
|
+
y.size > 0 && r.set(h.id, y);
|
|
820
838
|
}
|
|
821
|
-
return { sources:
|
|
822
|
-
function
|
|
823
|
-
if (
|
|
824
|
-
const
|
|
825
|
-
|
|
839
|
+
return { sources: m, columns: r };
|
|
840
|
+
function f(h, C) {
|
|
841
|
+
if (h.kind === "matched") {
|
|
842
|
+
const L = h.pairs.map((S) => d(C, S.field)).join(t("workshopLab.scheduleModel.wizard.listJoiner")), N = s(
|
|
843
|
+
h.source === U.plan && h.where?.length ? w : h.source
|
|
826
844
|
);
|
|
827
|
-
return
|
|
845
|
+
return h.field ? t("workshopLab.generated.columns.matchedValue", { label: h.label, pairs: L, from: N }) : t("workshopLab.generated.columns.matchedCount", { label: h.label, pairs: L, from: N });
|
|
828
846
|
}
|
|
829
|
-
if (
|
|
830
|
-
const
|
|
847
|
+
if (h.kind === "classify" && h.name === ke.scheduled) {
|
|
848
|
+
const L = h.cases.map((N) => N.value);
|
|
831
849
|
return t("workshopLab.generated.columns.planned", {
|
|
832
|
-
label:
|
|
833
|
-
yes:
|
|
834
|
-
unknown:
|
|
835
|
-
no:
|
|
850
|
+
label: h.label,
|
|
851
|
+
yes: L[0] ?? "",
|
|
852
|
+
unknown: L[1] ?? "",
|
|
853
|
+
no: h.otherwise.value
|
|
836
854
|
});
|
|
837
855
|
}
|
|
838
|
-
if (
|
|
856
|
+
if (h.kind === "classify" && h.name === ke.open)
|
|
839
857
|
return t("workshopLab.generated.columns.open", {
|
|
840
|
-
label:
|
|
841
|
-
done:
|
|
842
|
-
open:
|
|
858
|
+
label: h.label,
|
|
859
|
+
done: h.cases[0]?.value ?? "",
|
|
860
|
+
open: h.otherwise.value
|
|
843
861
|
});
|
|
844
|
-
if (
|
|
845
|
-
return t("workshopLab.generated.columns.groupName", { label:
|
|
862
|
+
if (h.kind === "related" && h.name === U.groupName)
|
|
863
|
+
return t("workshopLab.generated.columns.groupName", { label: h.label });
|
|
846
864
|
}
|
|
847
865
|
}
|
|
848
866
|
const Fe = {
|
|
849
867
|
date: ["shiftDays", "fromAsOf", "set"],
|
|
850
868
|
number: ["add", "set"],
|
|
851
869
|
text: ["set"]
|
|
852
|
-
},
|
|
870
|
+
}, ts = (a, i) => a !== "set" ? ["number"] : i === "date" ? ["date", "datetime"] : [i === "number" ? "number" : "text"], Ge = (a, i) => {
|
|
853
871
|
for (let t = 1; ; t++) if (!a.includes(`${i}${t}`)) return `${i}${t}`;
|
|
854
872
|
};
|
|
855
|
-
function
|
|
873
|
+
function ns({
|
|
856
874
|
source: a,
|
|
857
875
|
network: i,
|
|
858
876
|
save: t,
|
|
859
|
-
adding:
|
|
877
|
+
adding: k = !1,
|
|
860
878
|
onClose: p
|
|
861
879
|
}) {
|
|
862
|
-
const { t:
|
|
880
|
+
const { t: j } = A(), c = a.operations ?? [], s = () => ({
|
|
863
881
|
index: c.length,
|
|
864
882
|
operation: {
|
|
865
883
|
id: Ge(
|
|
866
|
-
c.map((
|
|
884
|
+
c.map((w) => w.id),
|
|
867
885
|
"op"
|
|
868
886
|
),
|
|
869
887
|
label: "",
|
|
870
888
|
params: [{ name: "p1", label: "", type: "number" }],
|
|
871
889
|
effects: []
|
|
872
890
|
}
|
|
873
|
-
}), [o, d] =
|
|
874
|
-
() =>
|
|
875
|
-
),
|
|
891
|
+
}), [o, d] = E.useState(
|
|
892
|
+
() => k && c.length === 0 ? s() : null
|
|
893
|
+
), m = i.objectTypes[a.objectType]?.properties ?? [], r = xe(a, i), u = (w) => r.find((f) => f.name === w)?.label ?? w, l = (w) => t({ ...a, operations: w.length > 0 ? w : void 0 });
|
|
876
894
|
return /* @__PURE__ */ e.jsxs("div", { className: n.computedItem, children: [
|
|
877
895
|
/* @__PURE__ */ e.jsxs("div", { className: n.computedHead, children: [
|
|
878
|
-
/* @__PURE__ */ e.jsx("b", { children:
|
|
896
|
+
/* @__PURE__ */ e.jsx("b", { children: j("workshopLab.operations.title") }),
|
|
879
897
|
/* @__PURE__ */ e.jsx("span", { className: n.spacer }),
|
|
880
898
|
/* @__PURE__ */ e.jsx(
|
|
881
899
|
$,
|
|
@@ -884,89 +902,89 @@ function ts({
|
|
|
884
902
|
icon: /* @__PURE__ */ e.jsx(ne, {}),
|
|
885
903
|
disabled: c.length >= za,
|
|
886
904
|
onClick: () => d(s()),
|
|
887
|
-
children:
|
|
905
|
+
children: j("workshopLab.operations.add")
|
|
888
906
|
}
|
|
889
907
|
)
|
|
890
908
|
] }),
|
|
891
|
-
c.map((
|
|
892
|
-
const
|
|
909
|
+
c.map((w, f) => {
|
|
910
|
+
const h = w.action ? be(i, w.action.id) : void 0;
|
|
893
911
|
return /* @__PURE__ */ e.jsxs("div", { className: n.operationItem, children: [
|
|
894
912
|
/* @__PURE__ */ e.jsxs("span", { children: [
|
|
895
|
-
/* @__PURE__ */ e.jsx("b", { children:
|
|
913
|
+
/* @__PURE__ */ e.jsx("b", { children: w.label }),
|
|
896
914
|
" ",
|
|
897
|
-
/* @__PURE__ */ e.jsx("span", { className: n.muted, children:
|
|
898
|
-
conditions: Ue(
|
|
915
|
+
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: j("workshopLab.operations.on", {
|
|
916
|
+
conditions: Ue(w.when, r, j)
|
|
899
917
|
}) })
|
|
900
918
|
] }),
|
|
901
|
-
/* @__PURE__ */ e.jsx("span", { className: n.muted, children:
|
|
902
|
-
(
|
|
903
|
-
field: u(
|
|
904
|
-
param:
|
|
919
|
+
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: w.effects.map(
|
|
920
|
+
(C) => j(`workshopLab.operations.effectText.${C.kind}`, {
|
|
921
|
+
field: u(C.field),
|
|
922
|
+
param: w.params.find((L) => L.name === C.param)?.label ?? C.param
|
|
905
923
|
})
|
|
906
924
|
).join(";") }),
|
|
907
|
-
/* @__PURE__ */ e.jsx("span", { className: n.muted, children:
|
|
908
|
-
/* @__PURE__ */ e.jsxs(
|
|
909
|
-
/* @__PURE__ */ e.jsx($, { size: "small", type: "link", onClick: () => d({ index:
|
|
925
|
+
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: h ? j("workshopLab.operations.actionText", { name: h.name }) : j("workshopLab.operations.noAction") }),
|
|
926
|
+
/* @__PURE__ */ e.jsxs(F, { size: 4, children: [
|
|
927
|
+
/* @__PURE__ */ e.jsx($, { size: "small", type: "link", onClick: () => d({ index: f, operation: w }), children: j("workshopLab.computed.edit") }),
|
|
910
928
|
/* @__PURE__ */ e.jsx(
|
|
911
929
|
ee,
|
|
912
930
|
{
|
|
913
|
-
title:
|
|
914
|
-
onConfirm: () => l(c.filter((
|
|
915
|
-
children: /* @__PURE__ */ e.jsx($, { size: "small", type: "link", danger: !0, children:
|
|
931
|
+
title: j("workshopLab.operations.removeConfirm", { name: w.label }),
|
|
932
|
+
onConfirm: () => l(c.filter((C, L) => L !== f)),
|
|
933
|
+
children: /* @__PURE__ */ e.jsx($, { size: "small", type: "link", danger: !0, children: j("workshopLab.computed.remove") })
|
|
916
934
|
}
|
|
917
935
|
)
|
|
918
936
|
] })
|
|
919
|
-
] },
|
|
937
|
+
] }, w.id);
|
|
920
938
|
}),
|
|
921
939
|
o && /* @__PURE__ */ e.jsx(
|
|
922
|
-
|
|
940
|
+
rs,
|
|
923
941
|
{
|
|
924
942
|
initial: o.operation,
|
|
925
943
|
source: a,
|
|
926
944
|
network: i,
|
|
927
|
-
properties:
|
|
928
|
-
others: c.filter((
|
|
945
|
+
properties: m,
|
|
946
|
+
others: c.filter((w, f) => f !== o.index),
|
|
929
947
|
onCancel: () => {
|
|
930
948
|
d(null), c.length === 0 && p?.();
|
|
931
949
|
},
|
|
932
|
-
onSave: (
|
|
933
|
-
const
|
|
934
|
-
|
|
950
|
+
onSave: (w) => {
|
|
951
|
+
const f = [...c];
|
|
952
|
+
f[o.index] = w, l(f) && d(null);
|
|
935
953
|
}
|
|
936
954
|
}
|
|
937
955
|
)
|
|
938
956
|
] });
|
|
939
957
|
}
|
|
940
|
-
function
|
|
958
|
+
function rs({
|
|
941
959
|
initial: a,
|
|
942
960
|
source: i,
|
|
943
961
|
network: t,
|
|
944
|
-
properties:
|
|
962
|
+
properties: k,
|
|
945
963
|
others: p,
|
|
946
|
-
onCancel:
|
|
964
|
+
onCancel: j,
|
|
947
965
|
onSave: c
|
|
948
966
|
}) {
|
|
949
|
-
const { t: s } =
|
|
950
|
-
(
|
|
951
|
-
),
|
|
952
|
-
(
|
|
953
|
-
),
|
|
967
|
+
const { t: s } = A(), [o, d] = E.useState(a), m = (b) => d({ ...o, ...b }), r = xe(i, t), u = (b) => k.find((g) => g.name === b)?.type, l = (t.actionTypes ?? []).filter(
|
|
968
|
+
(b) => b.objectType === i.objectType
|
|
969
|
+
), w = o.action ? be(t, o.action.id) : void 0, f = t.objectTypes[i.objectType]?.primaryKeys ?? [], h = k.filter(
|
|
970
|
+
(b) => b.name !== i.key && !f.includes(b.name)
|
|
971
|
+
), C = {
|
|
954
972
|
...o,
|
|
955
973
|
label: o.label.trim(),
|
|
956
974
|
...o.when?.length ? { when: o.when } : { when: void 0 }
|
|
957
975
|
};
|
|
958
|
-
|
|
959
|
-
const
|
|
960
|
-
(
|
|
961
|
-
) : [s("workshopLab.operations.needLabel")],
|
|
962
|
-
params: o.params.map((
|
|
963
|
-
}), S = (
|
|
964
|
-
effects: o.effects.map((
|
|
965
|
-
}),
|
|
976
|
+
C.when || delete C.when;
|
|
977
|
+
const L = C.label ? $a([...p, C], i, t, "operation").filter(
|
|
978
|
+
(b) => b.startsWith(`operation[${p.length}]`)
|
|
979
|
+
) : [s("workshopLab.operations.needLabel")], N = (b, g) => m({
|
|
980
|
+
params: o.params.map((T, _) => _ === b ? { ...T, ...g } : T)
|
|
981
|
+
}), S = (b, g) => m({
|
|
982
|
+
effects: o.effects.map((T, _) => _ === b ? { ...T, ...g } : T)
|
|
983
|
+
}), y = (b, g) => {
|
|
966
984
|
if (!o.action) return;
|
|
967
|
-
const
|
|
968
|
-
|
|
969
|
-
},
|
|
985
|
+
const T = { ...o.action.params };
|
|
986
|
+
g ? T[b] = g : delete T[b], m({ action: { ...o.action, params: T } });
|
|
987
|
+
}, x = (b) => b ? b.from === "const" ? "const" : `${b.from}:${b.name}` : void 0;
|
|
970
988
|
return /* @__PURE__ */ e.jsx(
|
|
971
989
|
ae,
|
|
972
990
|
{
|
|
@@ -974,12 +992,12 @@ function ns({
|
|
|
974
992
|
width: 720,
|
|
975
993
|
title: a.label ? s("workshopLab.operations.editTitle", { name: a.label }) : s("workshopLab.operations.newTitle"),
|
|
976
994
|
okText: s("workshopLab.computed.save"),
|
|
977
|
-
okButtonProps: { disabled:
|
|
978
|
-
onOk: () => c(
|
|
979
|
-
onCancel:
|
|
995
|
+
okButtonProps: { disabled: L.length > 0 },
|
|
996
|
+
onOk: () => c(C),
|
|
997
|
+
onCancel: j,
|
|
980
998
|
children: /* @__PURE__ */ e.jsxs("div", { className: n.computedForm, children: [
|
|
981
999
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: s("workshopLab.operations.hint") }),
|
|
982
|
-
/* @__PURE__ */ e.jsxs(
|
|
1000
|
+
/* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
983
1001
|
/* @__PURE__ */ e.jsx("span", { children: s("workshopLab.operations.label") }),
|
|
984
1002
|
/* @__PURE__ */ e.jsx(
|
|
985
1003
|
I,
|
|
@@ -989,52 +1007,52 @@ function ns({
|
|
|
989
1007
|
maxLength: 30,
|
|
990
1008
|
placeholder: s("workshopLab.operations.labelHint"),
|
|
991
1009
|
value: o.label,
|
|
992
|
-
onChange: (
|
|
1010
|
+
onChange: (b) => m({ label: b.target.value })
|
|
993
1011
|
}
|
|
994
1012
|
)
|
|
995
1013
|
] }),
|
|
996
1014
|
/* @__PURE__ */ e.jsx("b", { children: s("workshopLab.operations.when") }),
|
|
997
1015
|
/* @__PURE__ */ e.jsx(
|
|
998
|
-
|
|
1016
|
+
X,
|
|
999
1017
|
{
|
|
1000
1018
|
value: o.when,
|
|
1001
|
-
onChange: (
|
|
1019
|
+
onChange: (b) => m({ when: b }),
|
|
1002
1020
|
fields: r,
|
|
1003
1021
|
source: i
|
|
1004
1022
|
}
|
|
1005
1023
|
),
|
|
1006
1024
|
/* @__PURE__ */ e.jsx("b", { children: s("workshopLab.operations.params") }),
|
|
1007
|
-
o.params.map((
|
|
1025
|
+
o.params.map((b, g) => /* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
1008
1026
|
/* @__PURE__ */ e.jsx(
|
|
1009
1027
|
I,
|
|
1010
1028
|
{
|
|
1011
1029
|
size: "small",
|
|
1012
1030
|
className: n.fieldSelect,
|
|
1013
1031
|
placeholder: s("workshopLab.operations.paramLabel"),
|
|
1014
|
-
value:
|
|
1015
|
-
onChange: (
|
|
1032
|
+
value: b.label,
|
|
1033
|
+
onChange: (T) => N(g, { label: T.target.value })
|
|
1016
1034
|
}
|
|
1017
1035
|
),
|
|
1018
1036
|
/* @__PURE__ */ e.jsx(
|
|
1019
|
-
|
|
1037
|
+
O,
|
|
1020
1038
|
{
|
|
1021
1039
|
size: "small",
|
|
1022
|
-
value:
|
|
1023
|
-
options: Oa.map((
|
|
1024
|
-
value:
|
|
1025
|
-
label: s(`workshopLab.operations.types.${
|
|
1040
|
+
value: b.type,
|
|
1041
|
+
options: Oa.map((T) => ({
|
|
1042
|
+
value: T,
|
|
1043
|
+
label: s(`workshopLab.operations.types.${T}`)
|
|
1026
1044
|
})),
|
|
1027
|
-
onChange: (
|
|
1045
|
+
onChange: (T) => N(g, { type: T })
|
|
1028
1046
|
}
|
|
1029
1047
|
),
|
|
1030
|
-
|
|
1048
|
+
b.type === "number" && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1031
1049
|
/* @__PURE__ */ e.jsx(
|
|
1032
1050
|
G,
|
|
1033
1051
|
{
|
|
1034
1052
|
size: "small",
|
|
1035
1053
|
placeholder: s("workshopLab.operations.min"),
|
|
1036
|
-
value:
|
|
1037
|
-
onChange: (
|
|
1054
|
+
value: b.min ?? null,
|
|
1055
|
+
onChange: (T) => N(g, { min: T ?? void 0 })
|
|
1038
1056
|
}
|
|
1039
1057
|
),
|
|
1040
1058
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1042,8 +1060,8 @@ function ns({
|
|
|
1042
1060
|
{
|
|
1043
1061
|
size: "small",
|
|
1044
1062
|
placeholder: s("workshopLab.operations.max"),
|
|
1045
|
-
value:
|
|
1046
|
-
onChange: (
|
|
1063
|
+
value: b.max ?? null,
|
|
1064
|
+
onChange: (T) => N(g, { max: T ?? void 0 })
|
|
1047
1065
|
}
|
|
1048
1066
|
),
|
|
1049
1067
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1051,8 +1069,8 @@ function ns({
|
|
|
1051
1069
|
{
|
|
1052
1070
|
size: "small",
|
|
1053
1071
|
placeholder: s("workshopLab.operations.default"),
|
|
1054
|
-
value: typeof
|
|
1055
|
-
onChange: (
|
|
1072
|
+
value: typeof b.default == "number" ? b.default : null,
|
|
1073
|
+
onChange: (T) => N(g, { default: T ?? void 0 })
|
|
1056
1074
|
}
|
|
1057
1075
|
)
|
|
1058
1076
|
] }),
|
|
@@ -1062,27 +1080,27 @@ function ns({
|
|
|
1062
1080
|
size: "small",
|
|
1063
1081
|
type: "text",
|
|
1064
1082
|
danger: !0,
|
|
1065
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1083
|
+
icon: /* @__PURE__ */ e.jsx(Q, {}),
|
|
1066
1084
|
"aria-label": s("workshopLab.config.removeItem"),
|
|
1067
1085
|
disabled: o.params.length <= 1,
|
|
1068
|
-
onClick: () =>
|
|
1069
|
-
params: o.params.filter((
|
|
1070
|
-
effects: o.effects.filter((
|
|
1086
|
+
onClick: () => m({
|
|
1087
|
+
params: o.params.filter((T, _) => _ !== g),
|
|
1088
|
+
effects: o.effects.filter((T) => T.param !== b.name)
|
|
1071
1089
|
})
|
|
1072
1090
|
}
|
|
1073
1091
|
)
|
|
1074
|
-
] },
|
|
1092
|
+
] }, b.name)),
|
|
1075
1093
|
/* @__PURE__ */ e.jsx(
|
|
1076
1094
|
$,
|
|
1077
1095
|
{
|
|
1078
1096
|
size: "small",
|
|
1079
1097
|
disabled: o.params.length >= Be,
|
|
1080
|
-
onClick: () =>
|
|
1098
|
+
onClick: () => m({
|
|
1081
1099
|
params: [
|
|
1082
1100
|
...o.params,
|
|
1083
1101
|
{
|
|
1084
1102
|
name: Ge(
|
|
1085
|
-
o.params.map((
|
|
1103
|
+
o.params.map((b) => b.name),
|
|
1086
1104
|
"p"
|
|
1087
1105
|
),
|
|
1088
1106
|
label: "",
|
|
@@ -1095,47 +1113,47 @@ function ns({
|
|
|
1095
1113
|
),
|
|
1096
1114
|
/* @__PURE__ */ e.jsx("b", { children: s("workshopLab.operations.effects") }),
|
|
1097
1115
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: s("workshopLab.operations.effectsHint") }),
|
|
1098
|
-
o.effects.map((
|
|
1099
|
-
const
|
|
1100
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1116
|
+
o.effects.map((b, g) => {
|
|
1117
|
+
const T = u(b.field) ?? "text", _ = Fe[T] ?? ["set"], H = ts(b.kind, T);
|
|
1118
|
+
return /* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
1101
1119
|
/* @__PURE__ */ e.jsx(
|
|
1102
|
-
|
|
1120
|
+
O,
|
|
1103
1121
|
{
|
|
1104
1122
|
size: "small",
|
|
1105
1123
|
className: n.fieldSelect,
|
|
1106
|
-
value:
|
|
1124
|
+
value: b.field || void 0,
|
|
1107
1125
|
placeholder: s("workshopLab.operations.field"),
|
|
1108
|
-
options:
|
|
1126
|
+
options: h.map((M) => ({
|
|
1109
1127
|
value: M.name,
|
|
1110
1128
|
label: M.label
|
|
1111
1129
|
})),
|
|
1112
1130
|
onChange: (M) => {
|
|
1113
|
-
const
|
|
1114
|
-
S(
|
|
1131
|
+
const D = (Fe[u(M) ?? "text"] ?? ["set"])[0];
|
|
1132
|
+
S(g, { field: M, kind: D });
|
|
1115
1133
|
}
|
|
1116
1134
|
}
|
|
1117
1135
|
),
|
|
1118
1136
|
/* @__PURE__ */ e.jsx(
|
|
1119
|
-
|
|
1137
|
+
O,
|
|
1120
1138
|
{
|
|
1121
1139
|
size: "small",
|
|
1122
|
-
value:
|
|
1123
|
-
options:
|
|
1140
|
+
value: b.kind,
|
|
1141
|
+
options: _.map((M) => ({
|
|
1124
1142
|
value: M,
|
|
1125
1143
|
label: s(`workshopLab.operations.kinds.${M}`)
|
|
1126
1144
|
})),
|
|
1127
|
-
onChange: (M) => S(
|
|
1145
|
+
onChange: (M) => S(g, { kind: M })
|
|
1128
1146
|
}
|
|
1129
1147
|
),
|
|
1130
1148
|
/* @__PURE__ */ e.jsx(
|
|
1131
|
-
|
|
1149
|
+
O,
|
|
1132
1150
|
{
|
|
1133
1151
|
size: "small",
|
|
1134
1152
|
className: n.fieldSelect,
|
|
1135
|
-
value:
|
|
1153
|
+
value: b.param || void 0,
|
|
1136
1154
|
placeholder: s("workshopLab.operations.param"),
|
|
1137
|
-
options: o.params.filter((M) =>
|
|
1138
|
-
onChange: (M) => S(
|
|
1155
|
+
options: o.params.filter((M) => H.includes(M.type)).map((M) => ({ value: M.name, label: M.label || M.name })),
|
|
1156
|
+
onChange: (M) => S(g, { param: M })
|
|
1139
1157
|
}
|
|
1140
1158
|
),
|
|
1141
1159
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1144,19 +1162,19 @@ function ns({
|
|
|
1144
1162
|
size: "small",
|
|
1145
1163
|
type: "text",
|
|
1146
1164
|
danger: !0,
|
|
1147
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1165
|
+
icon: /* @__PURE__ */ e.jsx(Q, {}),
|
|
1148
1166
|
"aria-label": s("workshopLab.config.removeItem"),
|
|
1149
|
-
onClick: () =>
|
|
1167
|
+
onClick: () => m({ effects: o.effects.filter((M, D) => D !== g) })
|
|
1150
1168
|
}
|
|
1151
1169
|
)
|
|
1152
|
-
] },
|
|
1170
|
+
] }, g);
|
|
1153
1171
|
}),
|
|
1154
1172
|
/* @__PURE__ */ e.jsx(
|
|
1155
1173
|
$,
|
|
1156
1174
|
{
|
|
1157
1175
|
size: "small",
|
|
1158
1176
|
disabled: o.effects.length >= Fa,
|
|
1159
|
-
onClick: () =>
|
|
1177
|
+
onClick: () => m({
|
|
1160
1178
|
effects: [...o.effects, { field: "", kind: "set", param: "" }]
|
|
1161
1179
|
}),
|
|
1162
1180
|
children: s("workshopLab.operations.addEffect")
|
|
@@ -1165,66 +1183,66 @@ function ns({
|
|
|
1165
1183
|
/* @__PURE__ */ e.jsx("b", { children: s("workshopLab.operations.action") }),
|
|
1166
1184
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: s("workshopLab.operations.actionHint") }),
|
|
1167
1185
|
/* @__PURE__ */ e.jsx(
|
|
1168
|
-
|
|
1186
|
+
O,
|
|
1169
1187
|
{
|
|
1170
1188
|
size: "small",
|
|
1171
1189
|
allowClear: !0,
|
|
1172
1190
|
placeholder: s("workshopLab.operations.noAction"),
|
|
1173
1191
|
value: o.action?.id,
|
|
1174
|
-
options: l.map((
|
|
1175
|
-
onChange: (
|
|
1176
|
-
const
|
|
1177
|
-
|
|
1192
|
+
options: l.map((b) => ({ value: b.id, label: b.name })),
|
|
1193
|
+
onChange: (b) => {
|
|
1194
|
+
const g = { ...o };
|
|
1195
|
+
b ? g.action = { id: b, params: {} } : delete g.action, d(g);
|
|
1178
1196
|
}
|
|
1179
1197
|
}
|
|
1180
1198
|
),
|
|
1181
|
-
|
|
1182
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
1199
|
+
w?.inputs.map((b) => /* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
1200
|
+
/* @__PURE__ */ e.jsx("span", { children: b.name }),
|
|
1183
1201
|
/* @__PURE__ */ e.jsx(
|
|
1184
|
-
|
|
1202
|
+
O,
|
|
1185
1203
|
{
|
|
1186
1204
|
size: "small",
|
|
1187
1205
|
className: n.fieldSelect,
|
|
1188
1206
|
allowClear: !0,
|
|
1189
1207
|
placeholder: s("workshopLab.operations.sameName"),
|
|
1190
|
-
value:
|
|
1208
|
+
value: x(o.action?.params[b.name]),
|
|
1191
1209
|
options: [
|
|
1192
|
-
...o.params.map((
|
|
1193
|
-
value: `param:${
|
|
1194
|
-
label: s("workshopLab.operations.fromParam", { name:
|
|
1210
|
+
...o.params.map((g) => ({
|
|
1211
|
+
value: `param:${g.name}`,
|
|
1212
|
+
label: s("workshopLab.operations.fromParam", { name: g.label || g.name })
|
|
1195
1213
|
})),
|
|
1196
|
-
...
|
|
1197
|
-
value: `field:${
|
|
1198
|
-
label: s("workshopLab.operations.fromField", { name:
|
|
1214
|
+
...k.map((g) => ({
|
|
1215
|
+
value: `field:${g.name}`,
|
|
1216
|
+
label: s("workshopLab.operations.fromField", { name: g.label })
|
|
1199
1217
|
})),
|
|
1200
1218
|
{ value: "const", label: s("workshopLab.operations.fromConst") }
|
|
1201
1219
|
],
|
|
1202
|
-
onChange: (
|
|
1203
|
-
if (!
|
|
1204
|
-
if (
|
|
1205
|
-
const [
|
|
1206
|
-
|
|
1220
|
+
onChange: (g) => {
|
|
1221
|
+
if (!g) return y(b.name, void 0);
|
|
1222
|
+
if (g === "const") return y(b.name, { from: "const", value: "" });
|
|
1223
|
+
const [T, _] = g.split(/:(.*)/s);
|
|
1224
|
+
y(b.name, { from: T, name: _ });
|
|
1207
1225
|
}
|
|
1208
1226
|
}
|
|
1209
1227
|
),
|
|
1210
|
-
o.action?.params[
|
|
1228
|
+
o.action?.params[b.name]?.from === "const" && /* @__PURE__ */ e.jsx(
|
|
1211
1229
|
I,
|
|
1212
1230
|
{
|
|
1213
1231
|
size: "small",
|
|
1214
1232
|
className: n.fieldSelect,
|
|
1215
1233
|
value: String(
|
|
1216
|
-
o.action.params[
|
|
1234
|
+
o.action.params[b.name].value ?? ""
|
|
1217
1235
|
),
|
|
1218
|
-
onChange: (
|
|
1236
|
+
onChange: (g) => y(b.name, { from: "const", value: g.target.value })
|
|
1219
1237
|
}
|
|
1220
1238
|
)
|
|
1221
|
-
] },
|
|
1222
|
-
|
|
1239
|
+
] }, b.name)),
|
|
1240
|
+
L.length > 0 && C.label && /* @__PURE__ */ e.jsx(
|
|
1223
1241
|
re,
|
|
1224
1242
|
{
|
|
1225
1243
|
type: "warning",
|
|
1226
1244
|
showIcon: !0,
|
|
1227
|
-
message:
|
|
1245
|
+
message: L.slice(0, 3).map((b) => b.replace(/^operation\[\d+\]\.?/, "")).join(";")
|
|
1228
1246
|
}
|
|
1229
1247
|
)
|
|
1230
1248
|
] })
|
|
@@ -1234,11 +1252,11 @@ function ns({
|
|
|
1234
1252
|
const Pe = (a, i) => {
|
|
1235
1253
|
for (let t = 1; ; t++) if (!a.includes(`${i}${t}`)) return `${i}${t}`;
|
|
1236
1254
|
};
|
|
1237
|
-
function
|
|
1238
|
-
const { t: s } =
|
|
1239
|
-
const
|
|
1240
|
-
return
|
|
1241
|
-
},
|
|
1255
|
+
function is({ source: a, network: i, sources: t, states: k, run: p, save: j, onClose: c }) {
|
|
1256
|
+
const { t: s } = A(), o = a.follows ?? [], d = a.relatedTo ?? [], [m, r] = E.useState(null), [u, l] = E.useState(null), w = Pa(t), f = (y, x) => i.objectTypes[y]?.properties.find((b) => b.name === x)?.label ?? x, h = (y) => t.find((x) => x.id === y), C = (y, x) => {
|
|
1257
|
+
const b = h(y);
|
|
1258
|
+
return b ? _e(i, b.objectType, x) : x.join(" → ");
|
|
1259
|
+
}, L = (y) => j({ ...a, follows: y.length > 0 ? y : void 0 }), N = (y) => j({ ...a, relatedTo: y.length > 0 ? y : void 0 }), S = o.length + d.length === 0;
|
|
1242
1260
|
return /* @__PURE__ */ e.jsxs("div", { className: n.computedItem, children: [
|
|
1243
1261
|
/* @__PURE__ */ e.jsxs("div", { className: n.computedHead, children: [
|
|
1244
1262
|
/* @__PURE__ */ e.jsx("b", { children: s("workshopLab.links.title") }),
|
|
@@ -1253,7 +1271,7 @@ function rs({ source: a, network: i, sources: t, states: w, run: p, save: k, onC
|
|
|
1253
1271
|
index: o.length,
|
|
1254
1272
|
rule: {
|
|
1255
1273
|
id: Pe(
|
|
1256
|
-
o.map((
|
|
1274
|
+
o.map((y) => y.id),
|
|
1257
1275
|
"follow"
|
|
1258
1276
|
),
|
|
1259
1277
|
field: "",
|
|
@@ -1275,7 +1293,7 @@ function rs({ source: a, network: i, sources: t, states: w, run: p, save: k, onC
|
|
|
1275
1293
|
index: d.length,
|
|
1276
1294
|
link: {
|
|
1277
1295
|
id: Pe(
|
|
1278
|
-
d.map((
|
|
1296
|
+
d.map((y) => y.id),
|
|
1279
1297
|
"related"
|
|
1280
1298
|
),
|
|
1281
1299
|
from: "",
|
|
@@ -1286,139 +1304,139 @@ function rs({ source: a, network: i, sources: t, states: w, run: p, save: k, onC
|
|
|
1286
1304
|
}
|
|
1287
1305
|
)
|
|
1288
1306
|
] }),
|
|
1289
|
-
o.map((
|
|
1290
|
-
const
|
|
1307
|
+
o.map((y, x) => {
|
|
1308
|
+
const b = h(y.from);
|
|
1291
1309
|
return /* @__PURE__ */ e.jsxs("div", { className: n.operationItem, children: [
|
|
1292
1310
|
/* @__PURE__ */ e.jsxs("span", { children: [
|
|
1293
1311
|
s(
|
|
1294
|
-
|
|
1312
|
+
y.gapMinutes ? "workshopLab.links.ruleTextMinutes" : "workshopLab.links.ruleText",
|
|
1295
1313
|
{
|
|
1296
|
-
field:
|
|
1297
|
-
from:
|
|
1298
|
-
fromField:
|
|
1299
|
-
gap:
|
|
1300
|
-
minutes:
|
|
1314
|
+
field: f(a.objectType, y.field),
|
|
1315
|
+
from: b?.label ?? y.from,
|
|
1316
|
+
fromField: b ? f(b.objectType, y.fromField) : y.fromField,
|
|
1317
|
+
gap: y.gapDays,
|
|
1318
|
+
minutes: y.gapMinutes
|
|
1301
1319
|
}
|
|
1302
1320
|
),
|
|
1303
|
-
|
|
1304
|
-
field:
|
|
1321
|
+
y.keepDuration && s("workshopLab.links.keepText", {
|
|
1322
|
+
field: f(a.objectType, y.keepDuration)
|
|
1305
1323
|
})
|
|
1306
1324
|
] }),
|
|
1307
|
-
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: s("workshopLab.links.via", { path:
|
|
1325
|
+
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: s("workshopLab.links.via", { path: C(y.from, y.path) }) }),
|
|
1308
1326
|
/* @__PURE__ */ e.jsx(
|
|
1309
|
-
|
|
1327
|
+
ds,
|
|
1310
1328
|
{
|
|
1311
|
-
rule:
|
|
1329
|
+
rule: y,
|
|
1312
1330
|
source: a,
|
|
1313
1331
|
network: i,
|
|
1314
1332
|
sources: t,
|
|
1315
|
-
states:
|
|
1333
|
+
states: k,
|
|
1316
1334
|
run: p
|
|
1317
1335
|
},
|
|
1318
|
-
JSON.stringify(
|
|
1336
|
+
JSON.stringify(y)
|
|
1319
1337
|
),
|
|
1320
|
-
/* @__PURE__ */ e.jsxs(
|
|
1321
|
-
/* @__PURE__ */ e.jsx($, { size: "small", type: "link", onClick: () => r({ index:
|
|
1338
|
+
/* @__PURE__ */ e.jsxs(F, { size: 4, children: [
|
|
1339
|
+
/* @__PURE__ */ e.jsx($, { size: "small", type: "link", onClick: () => r({ index: x, rule: y }), children: s("workshopLab.computed.edit") }),
|
|
1322
1340
|
/* @__PURE__ */ e.jsx(
|
|
1323
1341
|
ee,
|
|
1324
1342
|
{
|
|
1325
1343
|
title: s("workshopLab.links.removeConfirm"),
|
|
1326
|
-
onConfirm: () =>
|
|
1344
|
+
onConfirm: () => L(o.filter((g, T) => T !== x)),
|
|
1327
1345
|
children: /* @__PURE__ */ e.jsx($, { size: "small", type: "link", danger: !0, children: s("workshopLab.computed.remove") })
|
|
1328
1346
|
}
|
|
1329
1347
|
)
|
|
1330
1348
|
] })
|
|
1331
|
-
] },
|
|
1349
|
+
] }, y.id);
|
|
1332
1350
|
}),
|
|
1333
|
-
d.map((
|
|
1351
|
+
d.map((y, x) => /* @__PURE__ */ e.jsxs("div", { className: n.operationItem, children: [
|
|
1334
1352
|
/* @__PURE__ */ e.jsx("span", { children: s("workshopLab.links.relatedText", {
|
|
1335
|
-
from:
|
|
1353
|
+
from: h(y.from)?.label ?? y.from
|
|
1336
1354
|
}) }),
|
|
1337
|
-
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: s("workshopLab.links.via", { path:
|
|
1338
|
-
/* @__PURE__ */ e.jsxs(
|
|
1339
|
-
/* @__PURE__ */ e.jsx($, { size: "small", type: "link", onClick: () => l({ index:
|
|
1355
|
+
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: s("workshopLab.links.via", { path: C(y.from, y.path) }) }),
|
|
1356
|
+
/* @__PURE__ */ e.jsxs(F, { size: 4, children: [
|
|
1357
|
+
/* @__PURE__ */ e.jsx($, { size: "small", type: "link", onClick: () => l({ index: x, link: y }), children: s("workshopLab.computed.edit") }),
|
|
1340
1358
|
/* @__PURE__ */ e.jsx(
|
|
1341
1359
|
ee,
|
|
1342
1360
|
{
|
|
1343
1361
|
title: s("workshopLab.links.removeConfirm"),
|
|
1344
|
-
onConfirm: () =>
|
|
1362
|
+
onConfirm: () => N(d.filter((b, g) => g !== x)),
|
|
1345
1363
|
children: /* @__PURE__ */ e.jsx($, { size: "small", type: "link", danger: !0, children: s("workshopLab.computed.remove") })
|
|
1346
1364
|
}
|
|
1347
1365
|
)
|
|
1348
1366
|
] })
|
|
1349
|
-
] },
|
|
1350
|
-
|
|
1351
|
-
|
|
1367
|
+
] }, y.id)),
|
|
1368
|
+
m && /* @__PURE__ */ e.jsx(
|
|
1369
|
+
cs,
|
|
1352
1370
|
{
|
|
1353
|
-
initial:
|
|
1371
|
+
initial: m.rule,
|
|
1354
1372
|
source: a,
|
|
1355
1373
|
network: i,
|
|
1356
|
-
starts:
|
|
1374
|
+
starts: w,
|
|
1357
1375
|
sources: t,
|
|
1358
|
-
others: o.filter((
|
|
1376
|
+
others: o.filter((y, x) => x !== m.index),
|
|
1359
1377
|
onCancel: () => r(null),
|
|
1360
|
-
onSave: (
|
|
1361
|
-
const
|
|
1362
|
-
|
|
1378
|
+
onSave: (y) => {
|
|
1379
|
+
const x = [...o];
|
|
1380
|
+
x[m.index] = y, L(x) && r(null);
|
|
1363
1381
|
}
|
|
1364
1382
|
}
|
|
1365
1383
|
),
|
|
1366
1384
|
u && /* @__PURE__ */ e.jsx(
|
|
1367
|
-
|
|
1385
|
+
ps,
|
|
1368
1386
|
{
|
|
1369
1387
|
initial: u.link,
|
|
1370
1388
|
source: a,
|
|
1371
1389
|
network: i,
|
|
1372
|
-
starts:
|
|
1390
|
+
starts: w,
|
|
1373
1391
|
sources: t,
|
|
1374
|
-
others: d.filter((
|
|
1392
|
+
others: d.filter((y, x) => x !== u.index),
|
|
1375
1393
|
onCancel: () => l(null),
|
|
1376
|
-
onSave: (
|
|
1377
|
-
const
|
|
1378
|
-
|
|
1394
|
+
onSave: (y) => {
|
|
1395
|
+
const x = [...d];
|
|
1396
|
+
x[u.index] = y, N(x) && l(null);
|
|
1379
1397
|
}
|
|
1380
1398
|
}
|
|
1381
1399
|
)
|
|
1382
1400
|
] });
|
|
1383
1401
|
}
|
|
1384
|
-
function
|
|
1402
|
+
function We({
|
|
1385
1403
|
from: a,
|
|
1386
1404
|
path: i,
|
|
1387
1405
|
source: t,
|
|
1388
|
-
network:
|
|
1406
|
+
network: k,
|
|
1389
1407
|
starts: p,
|
|
1390
|
-
onChange:
|
|
1408
|
+
onChange: j
|
|
1391
1409
|
}) {
|
|
1392
|
-
const { t: c } =
|
|
1393
|
-
(
|
|
1394
|
-
) : [], d = (
|
|
1395
|
-
(r, u) => oa(
|
|
1410
|
+
const { t: c } = A(), s = p.find((m) => m.id === a), o = s ? ye(k, s.objectType, t.objectType, Ce).filter(
|
|
1411
|
+
(m) => m.length > 0
|
|
1412
|
+
) : [], d = (m) => `${_e(k, s?.objectType ?? "", m)}(${(me(k, s?.objectType ?? "", m) ?? []).map(
|
|
1413
|
+
(r, u) => oa(m[u]).reversed ? c("workshopLab.config.pathReversed", { name: r.relation.name }) : r.relation.name
|
|
1396
1414
|
).join("、")})`;
|
|
1397
1415
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1398
|
-
/* @__PURE__ */ e.jsxs(
|
|
1416
|
+
/* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
1399
1417
|
/* @__PURE__ */ e.jsx("span", { children: c("workshopLab.links.from") }),
|
|
1400
1418
|
/* @__PURE__ */ e.jsx(
|
|
1401
|
-
|
|
1419
|
+
O,
|
|
1402
1420
|
{
|
|
1403
1421
|
size: "small",
|
|
1404
1422
|
className: n.fieldSelect,
|
|
1405
1423
|
"aria-label": c("workshopLab.links.from"),
|
|
1406
1424
|
value: a || void 0,
|
|
1407
1425
|
placeholder: c("workshopLab.links.fromHint"),
|
|
1408
|
-
options: p.map((
|
|
1409
|
-
onChange: (
|
|
1410
|
-
const r = p.find((l) => l.id ===
|
|
1426
|
+
options: p.map((m) => ({ value: m.id, label: m.label })),
|
|
1427
|
+
onChange: (m) => {
|
|
1428
|
+
const r = p.find((l) => l.id === m), u = r ? ye(k, r.objectType, t.objectType, Ce).find(
|
|
1411
1429
|
(l) => l.length > 0
|
|
1412
1430
|
) : void 0;
|
|
1413
|
-
|
|
1431
|
+
j({ from: m, path: u ?? [] });
|
|
1414
1432
|
}
|
|
1415
1433
|
}
|
|
1416
1434
|
)
|
|
1417
1435
|
] }),
|
|
1418
|
-
/* @__PURE__ */ e.jsxs(
|
|
1436
|
+
/* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
1419
1437
|
/* @__PURE__ */ e.jsx("span", { children: c("workshopLab.links.path") }),
|
|
1420
1438
|
/* @__PURE__ */ e.jsx(
|
|
1421
|
-
|
|
1439
|
+
O,
|
|
1422
1440
|
{
|
|
1423
1441
|
size: "small",
|
|
1424
1442
|
className: n.pathSelect,
|
|
@@ -1426,26 +1444,26 @@ function Xe({
|
|
|
1426
1444
|
value: i.length > 0 ? i.join(">") : void 0,
|
|
1427
1445
|
placeholder: s && o.length === 0 ? c("workshopLab.links.noPath") : c("workshopLab.links.path"),
|
|
1428
1446
|
disabled: !s || o.length === 0,
|
|
1429
|
-
options: o.map((
|
|
1430
|
-
onChange: (
|
|
1447
|
+
options: o.map((m) => ({ value: m.join(">"), label: d(m) })),
|
|
1448
|
+
onChange: (m) => j({ path: m.split(">") })
|
|
1431
1449
|
}
|
|
1432
1450
|
)
|
|
1433
1451
|
] })
|
|
1434
1452
|
] });
|
|
1435
1453
|
}
|
|
1436
|
-
const
|
|
1437
|
-
function
|
|
1454
|
+
const Ke = (a) => a.slice(0, 3).map((i) => i.replace(/^item\[\d+\]\.?/, "")).join(";");
|
|
1455
|
+
function cs({
|
|
1438
1456
|
initial: a,
|
|
1439
1457
|
source: i,
|
|
1440
1458
|
network: t,
|
|
1441
|
-
starts:
|
|
1459
|
+
starts: k,
|
|
1442
1460
|
sources: p,
|
|
1443
|
-
others:
|
|
1461
|
+
others: j,
|
|
1444
1462
|
onCancel: c,
|
|
1445
1463
|
onSave: s
|
|
1446
1464
|
}) {
|
|
1447
|
-
const { t: o } =
|
|
1448
|
-
(
|
|
1465
|
+
const { t: o } = A(), [d, m] = E.useState(a), r = (h) => m({ ...d, ...h }), u = t.objectTypes[i.objectType]?.primaryKeys ?? [], l = (h) => (t.objectTypes[h]?.properties ?? []).filter((C) => C.type === "date"), w = k.find((h) => h.id === d.from), f = Aa([...j, d], i, p, t, "item").filter(
|
|
1466
|
+
(h) => h.startsWith(`item[${j.length}]`)
|
|
1449
1467
|
);
|
|
1450
1468
|
return /* @__PURE__ */ e.jsx(
|
|
1451
1469
|
ae,
|
|
@@ -1454,54 +1472,54 @@ function is({
|
|
|
1454
1472
|
width: 640,
|
|
1455
1473
|
title: o("workshopLab.links.ruleTitle"),
|
|
1456
1474
|
okText: o("workshopLab.computed.save"),
|
|
1457
|
-
okButtonProps: { disabled:
|
|
1475
|
+
okButtonProps: { disabled: f.length > 0 },
|
|
1458
1476
|
onOk: () => s(d),
|
|
1459
1477
|
onCancel: c,
|
|
1460
1478
|
children: /* @__PURE__ */ e.jsxs("div", { className: n.computedForm, children: [
|
|
1461
1479
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: o("workshopLab.links.ruleHint") }),
|
|
1462
|
-
/* @__PURE__ */ e.jsxs(
|
|
1480
|
+
/* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
1463
1481
|
/* @__PURE__ */ e.jsx("span", { children: o("workshopLab.links.field") }),
|
|
1464
1482
|
/* @__PURE__ */ e.jsx(
|
|
1465
|
-
|
|
1483
|
+
O,
|
|
1466
1484
|
{
|
|
1467
1485
|
size: "small",
|
|
1468
1486
|
className: n.fieldSelect,
|
|
1469
1487
|
"aria-label": o("workshopLab.links.fieldLabel"),
|
|
1470
1488
|
value: d.field || void 0,
|
|
1471
|
-
options: l(i.objectType).filter((
|
|
1472
|
-
onChange: (
|
|
1489
|
+
options: l(i.objectType).filter((h) => h.name !== i.key && !u.includes(h.name)).map((h) => ({ value: h.name, label: h.label })),
|
|
1490
|
+
onChange: (h) => r(h === d.keepDuration ? { field: h, keepDuration: void 0 } : { field: h })
|
|
1473
1491
|
}
|
|
1474
1492
|
),
|
|
1475
1493
|
/* @__PURE__ */ e.jsx("span", { children: o("workshopLab.links.notBefore") })
|
|
1476
1494
|
] }),
|
|
1477
1495
|
/* @__PURE__ */ e.jsx(
|
|
1478
|
-
|
|
1496
|
+
We,
|
|
1479
1497
|
{
|
|
1480
1498
|
from: d.from,
|
|
1481
1499
|
path: d.path,
|
|
1482
1500
|
source: i,
|
|
1483
1501
|
network: t,
|
|
1484
|
-
starts:
|
|
1485
|
-
onChange: (
|
|
1486
|
-
|
|
1502
|
+
starts: k,
|
|
1503
|
+
onChange: (h) => r(
|
|
1504
|
+
h.from !== void 0 && h.from !== d.from ? { ...h, fromField: "" } : h
|
|
1487
1505
|
)
|
|
1488
1506
|
}
|
|
1489
1507
|
),
|
|
1490
|
-
/* @__PURE__ */ e.jsxs(
|
|
1508
|
+
/* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
1491
1509
|
/* @__PURE__ */ e.jsx("span", { children: o("workshopLab.links.fromField") }),
|
|
1492
1510
|
/* @__PURE__ */ e.jsx(
|
|
1493
|
-
|
|
1511
|
+
O,
|
|
1494
1512
|
{
|
|
1495
1513
|
size: "small",
|
|
1496
1514
|
className: n.fieldSelect,
|
|
1497
1515
|
"aria-label": o("workshopLab.links.fromFieldLabel"),
|
|
1498
1516
|
value: d.fromField || void 0,
|
|
1499
|
-
disabled: !
|
|
1500
|
-
options: (
|
|
1501
|
-
value:
|
|
1502
|
-
label:
|
|
1517
|
+
disabled: !w,
|
|
1518
|
+
options: (w ? l(w.objectType) : []).map((h) => ({
|
|
1519
|
+
value: h.name,
|
|
1520
|
+
label: h.label
|
|
1503
1521
|
})),
|
|
1504
|
-
onChange: (
|
|
1522
|
+
onChange: (h) => r({ fromField: h })
|
|
1505
1523
|
}
|
|
1506
1524
|
),
|
|
1507
1525
|
/* @__PURE__ */ e.jsx("span", { children: o("workshopLab.links.plus") }),
|
|
@@ -1514,7 +1532,7 @@ function is({
|
|
|
1514
1532
|
max: Ne,
|
|
1515
1533
|
precision: 0,
|
|
1516
1534
|
value: d.gapDays,
|
|
1517
|
-
onChange: (
|
|
1535
|
+
onChange: (h) => r({ gapDays: h ?? 0 })
|
|
1518
1536
|
}
|
|
1519
1537
|
),
|
|
1520
1538
|
/* @__PURE__ */ e.jsx("span", { children: o("workshopLab.links.days") }),
|
|
@@ -1527,15 +1545,15 @@ function is({
|
|
|
1527
1545
|
max: Se,
|
|
1528
1546
|
precision: 0,
|
|
1529
1547
|
value: d.gapMinutes ?? 0,
|
|
1530
|
-
onChange: (
|
|
1548
|
+
onChange: (h) => r({ gapMinutes: h || void 0 })
|
|
1531
1549
|
}
|
|
1532
1550
|
),
|
|
1533
1551
|
/* @__PURE__ */ e.jsx("span", { children: o("workshopLab.links.minutes") })
|
|
1534
1552
|
] }),
|
|
1535
|
-
/* @__PURE__ */ e.jsxs(
|
|
1553
|
+
/* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
1536
1554
|
/* @__PURE__ */ e.jsx("span", { children: o("workshopLab.links.keepDuration") }),
|
|
1537
1555
|
/* @__PURE__ */ e.jsx(
|
|
1538
|
-
|
|
1556
|
+
O,
|
|
1539
1557
|
{
|
|
1540
1558
|
size: "small",
|
|
1541
1559
|
allowClear: !0,
|
|
@@ -1544,29 +1562,29 @@ function is({
|
|
|
1544
1562
|
placeholder: o("workshopLab.links.keepNone"),
|
|
1545
1563
|
value: d.keepDuration,
|
|
1546
1564
|
disabled: !d.field,
|
|
1547
|
-
options: l(i.objectType).filter((
|
|
1548
|
-
onChange: (
|
|
1565
|
+
options: l(i.objectType).filter((h) => h.name !== d.field && !u.includes(h.name)).map((h) => ({ value: h.name, label: h.label })),
|
|
1566
|
+
onChange: (h) => r({ keepDuration: h })
|
|
1549
1567
|
}
|
|
1550
1568
|
)
|
|
1551
1569
|
] }),
|
|
1552
1570
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: o("workshopLab.links.minutesHint") }),
|
|
1553
|
-
|
|
1571
|
+
f.length > 0 && d.field && d.from && d.fromField && /* @__PURE__ */ e.jsx(re, { type: "warning", showIcon: !0, message: Ke(f) })
|
|
1554
1572
|
] })
|
|
1555
1573
|
}
|
|
1556
1574
|
);
|
|
1557
1575
|
}
|
|
1558
|
-
function
|
|
1576
|
+
function ps({
|
|
1559
1577
|
initial: a,
|
|
1560
1578
|
source: i,
|
|
1561
1579
|
network: t,
|
|
1562
|
-
starts:
|
|
1580
|
+
starts: k,
|
|
1563
1581
|
sources: p,
|
|
1564
|
-
others:
|
|
1582
|
+
others: j,
|
|
1565
1583
|
onCancel: c,
|
|
1566
1584
|
onSave: s
|
|
1567
1585
|
}) {
|
|
1568
|
-
const { t: o } =
|
|
1569
|
-
(u) => u.startsWith(`item[${
|
|
1586
|
+
const { t: o } = A(), [d, m] = E.useState(a), r = _a([...j, d], i, p, t, "item").filter(
|
|
1587
|
+
(u) => u.startsWith(`item[${j.length}]`)
|
|
1570
1588
|
);
|
|
1571
1589
|
return /* @__PURE__ */ e.jsx(
|
|
1572
1590
|
ae,
|
|
@@ -1581,42 +1599,42 @@ function cs({
|
|
|
1581
1599
|
children: /* @__PURE__ */ e.jsxs("div", { className: n.computedForm, children: [
|
|
1582
1600
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: o("workshopLab.links.relatedHint") }),
|
|
1583
1601
|
/* @__PURE__ */ e.jsx(
|
|
1584
|
-
|
|
1602
|
+
We,
|
|
1585
1603
|
{
|
|
1586
1604
|
from: d.from,
|
|
1587
1605
|
path: d.path,
|
|
1588
1606
|
source: i,
|
|
1589
1607
|
network: t,
|
|
1590
|
-
starts:
|
|
1591
|
-
onChange: (u) =>
|
|
1608
|
+
starts: k,
|
|
1609
|
+
onChange: (u) => m({ ...d, ...u })
|
|
1592
1610
|
}
|
|
1593
1611
|
),
|
|
1594
|
-
r.length > 0 && d.from && /* @__PURE__ */ e.jsx(re, { type: "warning", showIcon: !0, message:
|
|
1612
|
+
r.length > 0 && d.from && /* @__PURE__ */ e.jsx(re, { type: "warning", showIcon: !0, message: Ke(r) })
|
|
1595
1613
|
] })
|
|
1596
1614
|
}
|
|
1597
1615
|
);
|
|
1598
1616
|
}
|
|
1599
|
-
function
|
|
1617
|
+
function ds({
|
|
1600
1618
|
rule: a,
|
|
1601
1619
|
source: i,
|
|
1602
1620
|
network: t,
|
|
1603
|
-
sources:
|
|
1621
|
+
sources: k,
|
|
1604
1622
|
states: p,
|
|
1605
|
-
run:
|
|
1623
|
+
run: j
|
|
1606
1624
|
}) {
|
|
1607
|
-
const { t: c } =
|
|
1608
|
-
if (!(!d ||
|
|
1625
|
+
const { t: c } = A(), [s, o] = E.useState(null), d = k.find((w) => w.id === a.from), m = d ? p[d.id] : void 0, r = p[i.id], u = m?.status === "ready" && r?.status === "ready", l = async () => {
|
|
1626
|
+
if (!(!d || m?.status !== "ready" || r?.status !== "ready")) {
|
|
1609
1627
|
o({ status: "running" });
|
|
1610
1628
|
try {
|
|
1611
|
-
const
|
|
1612
|
-
|
|
1629
|
+
const w = me(t, d.objectType, a.path) ?? [], f = await Ia(
|
|
1630
|
+
j,
|
|
1613
1631
|
t,
|
|
1614
1632
|
d,
|
|
1615
1633
|
i,
|
|
1616
|
-
|
|
1617
|
-
|
|
1634
|
+
w,
|
|
1635
|
+
m.rows.map((h) => h.$key)
|
|
1618
1636
|
);
|
|
1619
|
-
o({ status: "done", ...wa(a, r.rows,
|
|
1637
|
+
o({ status: "done", ...wa(a, r.rows, m.rows, f) });
|
|
1620
1638
|
} catch {
|
|
1621
1639
|
o({ status: "error" });
|
|
1622
1640
|
}
|
|
@@ -1640,48 +1658,48 @@ function ps({
|
|
|
1640
1658
|
s?.status === "done" && (s.covered === 0 ? c("workshopLab.links.checkNone") : c("workshopLab.links.checkResult", {
|
|
1641
1659
|
covered: s.covered,
|
|
1642
1660
|
holds: s.holds,
|
|
1643
|
-
diffs: s.diffs.map(([
|
|
1661
|
+
diffs: s.diffs.map(([w, f]) => c("workshopLab.links.checkDiff", { days: w, count: f })).join("、")
|
|
1644
1662
|
}))
|
|
1645
1663
|
] });
|
|
1646
1664
|
}
|
|
1647
|
-
const
|
|
1665
|
+
const Xe = /^[A-Za-z][A-Za-z0-9_]*$/, ms = 4;
|
|
1648
1666
|
function Je(a, i) {
|
|
1649
|
-
const
|
|
1650
|
-
(
|
|
1651
|
-
).join(""), p =
|
|
1667
|
+
const k = (a.match(/[A-Za-z][A-Za-z0-9]*|[0-9]+/g) ?? []).map(
|
|
1668
|
+
(j, c) => c === 0 ? j.charAt(0).toLowerCase() + j.slice(1) : j.charAt(0).toUpperCase() + j.slice(1)
|
|
1669
|
+
).join(""), p = Xe.test(k) ? k.slice(0, 40) : "column";
|
|
1652
1670
|
if (!i.includes(p) && p !== "column") return p;
|
|
1653
|
-
for (let
|
|
1654
|
-
if (!i.includes(`${p}${
|
|
1671
|
+
for (let j = p === "column" ? 1 : 2; ; j += 1)
|
|
1672
|
+
if (!i.includes(`${p}${j}`)) return `${p}${j}`;
|
|
1655
1673
|
}
|
|
1656
|
-
const
|
|
1657
|
-
function
|
|
1674
|
+
const hs = 3, us = 6;
|
|
1675
|
+
function bs() {
|
|
1658
1676
|
const { message: a } = na();
|
|
1659
1677
|
return (i) => (i.length > 0 && a.error(i.slice(0, 3).join(";")), i.length === 0);
|
|
1660
1678
|
}
|
|
1661
|
-
function
|
|
1662
|
-
const
|
|
1679
|
+
function ks(a, i, t) {
|
|
1680
|
+
const k = bs(), p = E.useMemo(() => Ve(i, a.sources), [i, a.sources]), j = E.useMemo(() => {
|
|
1663
1681
|
const s = a.variables.find((d) => d.kind === "asOf"), o = s ? He(a.variables, {})[s.name] : void 0;
|
|
1664
1682
|
return typeof o == "string" ? o : la();
|
|
1665
1683
|
}, [a.variables]);
|
|
1666
|
-
return { network: p, asOf:
|
|
1684
|
+
return { network: p, asOf: j, save: (s, o) => {
|
|
1667
1685
|
const d = {
|
|
1668
1686
|
...a,
|
|
1669
|
-
sources: a.sources.map((
|
|
1687
|
+
sources: a.sources.map((m) => m.id === s.id ? s : m)
|
|
1670
1688
|
};
|
|
1671
|
-
return
|
|
1689
|
+
return k(
|
|
1672
1690
|
t(o ? Ha(d, s.id, o.field, o.renames) : d)
|
|
1673
1691
|
);
|
|
1674
1692
|
} };
|
|
1675
1693
|
}
|
|
1676
|
-
function
|
|
1677
|
-
const { t: c } =
|
|
1694
|
+
function js({ app: a, kn: i, sources: t, run: k, chatModel: p = () => null, apply: j }) {
|
|
1695
|
+
const { t: c } = A(), { network: s, asOf: o, save: d } = ks(a, i, j), m = E.useMemo(() => He(a.variables, {}), [a.variables]), r = xa(a.sources, i, k, m, t), u = E.useMemo(() => ls(a, i, c), [a, i, c]);
|
|
1678
1696
|
return /* @__PURE__ */ e.jsxs("div", { className: n.library, children: [
|
|
1679
1697
|
/* @__PURE__ */ e.jsx("header", { className: n.listHeader, children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
1680
1698
|
/* @__PURE__ */ e.jsx("h3", { className: n.sectionTitle, children: c("workshopLab.computed.title") }),
|
|
1681
1699
|
/* @__PURE__ */ e.jsx("p", { className: n.muted, children: c("workshopLab.computed.hint", { date: o }) })
|
|
1682
1700
|
] }) }),
|
|
1683
1701
|
a.sources.filter((l) => !l.from).map((l) => /* @__PURE__ */ e.jsx(
|
|
1684
|
-
|
|
1702
|
+
fs,
|
|
1685
1703
|
{
|
|
1686
1704
|
source: l,
|
|
1687
1705
|
properties: s.objectTypes[l.objectType]?.properties ?? [],
|
|
@@ -1690,7 +1708,7 @@ function ks({ app: a, kn: i, sources: t, run: w, chatModel: p = () => null, appl
|
|
|
1690
1708
|
sources: a.sources,
|
|
1691
1709
|
asOf: o,
|
|
1692
1710
|
usage: Ra(a, l.id),
|
|
1693
|
-
tools: { network: s, run:
|
|
1711
|
+
tools: { network: s, run: k, chatModel: p },
|
|
1694
1712
|
generatedSource: u.sources.get(l.id),
|
|
1695
1713
|
generatedColumns: u.columns.get(l.id),
|
|
1696
1714
|
scenarioParams: a.scenarioParams ?? gs,
|
|
@@ -1700,50 +1718,50 @@ function ks({ app: a, kn: i, sources: t, run: w, chatModel: p = () => null, appl
|
|
|
1700
1718
|
))
|
|
1701
1719
|
] });
|
|
1702
1720
|
}
|
|
1703
|
-
const
|
|
1704
|
-
function
|
|
1721
|
+
const ws = ["operations", "links", "models"], xs = ["operations"], gs = [];
|
|
1722
|
+
function fs({
|
|
1705
1723
|
source: a,
|
|
1706
1724
|
properties: i,
|
|
1707
1725
|
state: t,
|
|
1708
|
-
states:
|
|
1726
|
+
states: k,
|
|
1709
1727
|
sources: p,
|
|
1710
|
-
asOf:
|
|
1728
|
+
asOf: j,
|
|
1711
1729
|
usage: c,
|
|
1712
1730
|
tools: s,
|
|
1713
1731
|
scenarioParams: o,
|
|
1714
1732
|
generatedSource: d,
|
|
1715
|
-
generatedColumns:
|
|
1733
|
+
generatedColumns: m,
|
|
1716
1734
|
save: r
|
|
1717
1735
|
}) {
|
|
1718
|
-
const { t: u } =
|
|
1719
|
-
() => S ?
|
|
1720
|
-
[S, a,
|
|
1721
|
-
),
|
|
1736
|
+
const { t: u } = A(), l = a.computed ?? [], [w, f] = E.useState(null), [h, C] = E.useState(!1), [L, N] = E.useState([]), S = t?.status === "ready" ? t.rows : null, y = E.useMemo(
|
|
1737
|
+
() => S ? he(S, a, j) : null,
|
|
1738
|
+
[S, a, j]
|
|
1739
|
+
), x = (z) => [
|
|
1722
1740
|
...i,
|
|
1723
1741
|
...fe(a.progress),
|
|
1724
|
-
...l.filter((
|
|
1725
|
-
],
|
|
1726
|
-
const
|
|
1727
|
-
return
|
|
1728
|
-
},
|
|
1742
|
+
...l.filter((v, P) => P !== z).map(te)
|
|
1743
|
+
], b = (z, v, P) => {
|
|
1744
|
+
const R = [...l];
|
|
1745
|
+
return v === null ? R.splice(z, 1) : R[z] = v, r({ ...a, computed: R.length > 0 ? R : void 0 }, P);
|
|
1746
|
+
}, g = !a.cypher && !a.events, T = {
|
|
1729
1747
|
formats: Object.keys(a.formats ?? {}).length > 0,
|
|
1730
1748
|
operations: (a.operations ?? []).length > 0,
|
|
1731
1749
|
links: (a.follows ?? []).length + (a.relatedTo ?? []).length > 0,
|
|
1732
1750
|
models: (a.models ?? []).length > 0
|
|
1733
|
-
},
|
|
1734
|
-
const
|
|
1735
|
-
return
|
|
1736
|
-
},
|
|
1751
|
+
}, _ = (z) => T[z] || L.includes(z), H = (z) => N((v) => v.filter((P) => P !== z)), M = (z) => (v) => {
|
|
1752
|
+
const P = r(v);
|
|
1753
|
+
return P && H(z), P;
|
|
1754
|
+
}, D = (z) => ({
|
|
1737
1755
|
key: z,
|
|
1738
1756
|
label: /* @__PURE__ */ e.jsxs("span", { className: n.addItem, children: [
|
|
1739
1757
|
/* @__PURE__ */ e.jsx("span", { children: u(`workshopLab.blocks.items.${z}.label`) }),
|
|
1740
1758
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: u(`workshopLab.blocks.items.${z}.description`) })
|
|
1741
1759
|
] })
|
|
1742
|
-
}),
|
|
1743
|
-
...a.progress ||
|
|
1744
|
-
...
|
|
1745
|
-
...
|
|
1746
|
-
], se =
|
|
1760
|
+
}), W = !!a.model, ie = W ? xs : ws, ce = [
|
|
1761
|
+
...a.progress || W ? [] : [D("progress")],
|
|
1762
|
+
...W ? [] : [D("computed")],
|
|
1763
|
+
..._("formats") ? [] : [D("formats")]
|
|
1764
|
+
], se = g ? ie.filter((z) => !_(z)).map(D) : [], pe = [
|
|
1747
1765
|
{
|
|
1748
1766
|
type: "group",
|
|
1749
1767
|
key: "columns",
|
|
@@ -1758,18 +1776,18 @@ function xs({
|
|
|
1758
1776
|
children: se
|
|
1759
1777
|
}
|
|
1760
1778
|
] : []
|
|
1761
|
-
],
|
|
1762
|
-
z === "progress" ?
|
|
1779
|
+
], K = (z) => {
|
|
1780
|
+
z === "progress" ? C(!0) : z === "computed" ? f({
|
|
1763
1781
|
index: l.length,
|
|
1764
1782
|
field: { name: "", label: "", kind: "classify", cases: [], otherwise: { value: "" } }
|
|
1765
|
-
}) :
|
|
1766
|
-
}, Z = !!a.progress || l.length > 0 ||
|
|
1783
|
+
}) : N((v) => [...v, z]);
|
|
1784
|
+
}, Z = !!a.progress || l.length > 0 || _("formats"), oe = g && ie.some(_);
|
|
1767
1785
|
return /* @__PURE__ */ e.jsxs("section", { className: n.entry, "aria-label": a.label, children: [
|
|
1768
1786
|
/* @__PURE__ */ e.jsxs("header", { className: n.entryHeader, children: [
|
|
1769
1787
|
/* @__PURE__ */ e.jsx("b", { children: a.label }),
|
|
1770
1788
|
d !== void 0 && /* @__PURE__ */ e.jsx($e, {}),
|
|
1771
1789
|
/* @__PURE__ */ e.jsx("span", { className: n.spacer }),
|
|
1772
|
-
/* @__PURE__ */ e.jsx(Da, { trigger: ["click"], menu: { items: pe, onClick: ({ key: z }) =>
|
|
1790
|
+
/* @__PURE__ */ e.jsx(Da, { trigger: ["click"], menu: { items: pe, onClick: ({ key: z }) => K(z) }, children: /* @__PURE__ */ e.jsxs($, { size: "small", type: "primary", icon: /* @__PURE__ */ e.jsx(ne, {}), children: [
|
|
1773
1791
|
u("workshopLab.blocks.add"),
|
|
1774
1792
|
" ",
|
|
1775
1793
|
/* @__PURE__ */ e.jsx(ta, {})
|
|
@@ -1779,30 +1797,30 @@ function xs({
|
|
|
1779
1797
|
!Z && !oe && /* @__PURE__ */ e.jsx("span", { className: n.muted, children: u("workshopLab.blocks.empty") }),
|
|
1780
1798
|
Z && /* @__PURE__ */ e.jsx("span", { className: n.blockGroup, children: u("workshopLab.blocks.groups.columns") }),
|
|
1781
1799
|
/* @__PURE__ */ e.jsx(
|
|
1782
|
-
|
|
1800
|
+
Es,
|
|
1783
1801
|
{
|
|
1784
1802
|
source: a,
|
|
1785
1803
|
properties: i,
|
|
1786
|
-
rows:
|
|
1804
|
+
rows: y,
|
|
1787
1805
|
usage: c,
|
|
1788
|
-
onEdit: () =>
|
|
1806
|
+
onEdit: () => C(!0),
|
|
1789
1807
|
onRemove: () => r({ ...a, progress: void 0 })
|
|
1790
1808
|
}
|
|
1791
1809
|
),
|
|
1792
|
-
l.length > 0 && /* @__PURE__ */ e.jsx("ul", { className: n.computedList, children: l.map((z,
|
|
1793
|
-
const
|
|
1810
|
+
l.length > 0 && /* @__PURE__ */ e.jsx("ul", { className: n.computedList, children: l.map((z, v) => {
|
|
1811
|
+
const P = c.get(z.name) ?? [];
|
|
1794
1812
|
return /* @__PURE__ */ e.jsxs("li", { className: n.computedItem, children: [
|
|
1795
1813
|
/* @__PURE__ */ e.jsxs("div", { className: n.computedHead, children: [
|
|
1796
1814
|
/* @__PURE__ */ e.jsx("b", { children: z.label }),
|
|
1797
1815
|
/* @__PURE__ */ e.jsx(J, { children: u(`workshopLab.computed.kinds.${z.kind}`) }),
|
|
1798
|
-
|
|
1816
|
+
m?.has(z.name) && /* @__PURE__ */ e.jsx($e, {}),
|
|
1799
1817
|
/* @__PURE__ */ e.jsx("span", { className: n.spacer }),
|
|
1800
|
-
/* @__PURE__ */ e.jsx($, { size: "small", type: "link", onClick: () =>
|
|
1801
|
-
|
|
1802
|
-
|
|
1818
|
+
/* @__PURE__ */ e.jsx($, { size: "small", type: "link", onClick: () => f({ index: v, field: z }), children: u("workshopLab.computed.edit") }),
|
|
1819
|
+
P.length > 0 ? /* @__PURE__ */ e.jsx(
|
|
1820
|
+
ge,
|
|
1803
1821
|
{
|
|
1804
1822
|
title: u("workshopLab.computed.removeBlocked", {
|
|
1805
|
-
names:
|
|
1823
|
+
names: P.map((R) => R.label).join("、")
|
|
1806
1824
|
}),
|
|
1807
1825
|
children: /* @__PURE__ */ e.jsx($, { size: "small", type: "link", danger: !0, disabled: !0, children: u("workshopLab.computed.remove") })
|
|
1808
1826
|
}
|
|
@@ -1810,131 +1828,131 @@ function xs({
|
|
|
1810
1828
|
ee,
|
|
1811
1829
|
{
|
|
1812
1830
|
title: u("workshopLab.computed.removeConfirm", { name: z.label }),
|
|
1813
|
-
onConfirm: () =>
|
|
1831
|
+
onConfirm: () => b(v, null),
|
|
1814
1832
|
children: /* @__PURE__ */ e.jsx($, { size: "small", type: "link", danger: !0, children: u("workshopLab.computed.remove") })
|
|
1815
1833
|
}
|
|
1816
1834
|
)
|
|
1817
1835
|
] }),
|
|
1818
|
-
|
|
1819
|
-
/* @__PURE__ */ e.jsx("span", { className: n.muted, children:
|
|
1820
|
-
/* @__PURE__ */ e.jsx(qe, { field: z, rows:
|
|
1821
|
-
/* @__PURE__ */ e.jsx("span", { className: n.muted, children:
|
|
1822
|
-
names:
|
|
1836
|
+
m?.has(z.name) && /* @__PURE__ */ e.jsx("span", { className: n.muted, children: m.get(z.name) }),
|
|
1837
|
+
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: ys(z, x(v), u, s.network, a.objectType, p) }),
|
|
1838
|
+
/* @__PURE__ */ e.jsx(qe, { field: z, rows: y }),
|
|
1839
|
+
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: P.length > 0 ? u("workshopLab.computed.usedBy", {
|
|
1840
|
+
names: P.map((R) => R.label).join("、")
|
|
1823
1841
|
}) : u("workshopLab.computed.unused") })
|
|
1824
1842
|
] }, z.name);
|
|
1825
1843
|
}) }),
|
|
1826
|
-
|
|
1844
|
+
_("formats") && /* @__PURE__ */ e.jsx(
|
|
1827
1845
|
es,
|
|
1828
1846
|
{
|
|
1829
1847
|
source: a,
|
|
1830
|
-
fields:
|
|
1848
|
+
fields: x(l.length),
|
|
1831
1849
|
save: M("formats"),
|
|
1832
|
-
onClose: () =>
|
|
1850
|
+
onClose: () => H("formats")
|
|
1833
1851
|
}
|
|
1834
1852
|
),
|
|
1835
1853
|
oe && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1836
1854
|
/* @__PURE__ */ e.jsx("span", { className: n.blockGroup, children: u("workshopLab.blocks.groups.scenario") }),
|
|
1837
|
-
|
|
1838
|
-
|
|
1855
|
+
_("operations") && /* @__PURE__ */ e.jsx(
|
|
1856
|
+
ns,
|
|
1839
1857
|
{
|
|
1840
1858
|
source: a,
|
|
1841
1859
|
network: s.network,
|
|
1842
1860
|
save: M("operations"),
|
|
1843
|
-
adding:
|
|
1844
|
-
onClose: () =>
|
|
1861
|
+
adding: L.includes("operations"),
|
|
1862
|
+
onClose: () => H("operations")
|
|
1845
1863
|
}
|
|
1846
1864
|
),
|
|
1847
|
-
|
|
1848
|
-
|
|
1865
|
+
_("links") && /* @__PURE__ */ e.jsx(
|
|
1866
|
+
is,
|
|
1849
1867
|
{
|
|
1850
1868
|
source: a,
|
|
1851
1869
|
network: s.network,
|
|
1852
1870
|
sources: p,
|
|
1853
|
-
states:
|
|
1871
|
+
states: k,
|
|
1854
1872
|
run: s.run,
|
|
1855
1873
|
save: M("links"),
|
|
1856
|
-
onClose: () =>
|
|
1874
|
+
onClose: () => H("links")
|
|
1857
1875
|
}
|
|
1858
1876
|
),
|
|
1859
|
-
|
|
1860
|
-
|
|
1877
|
+
_("models") && /* @__PURE__ */ e.jsx(
|
|
1878
|
+
ss,
|
|
1861
1879
|
{
|
|
1862
1880
|
source: a,
|
|
1863
1881
|
network: s.network,
|
|
1864
1882
|
scenarioParams: o,
|
|
1865
1883
|
save: M("models"),
|
|
1866
|
-
adding:
|
|
1867
|
-
onClose: () =>
|
|
1884
|
+
adding: L.includes("models"),
|
|
1885
|
+
onClose: () => H("models")
|
|
1868
1886
|
}
|
|
1869
1887
|
)
|
|
1870
1888
|
] }),
|
|
1871
|
-
|
|
1872
|
-
|
|
1889
|
+
w && /* @__PURE__ */ e.jsx(
|
|
1890
|
+
Ye,
|
|
1873
1891
|
{
|
|
1874
|
-
field:
|
|
1875
|
-
isNew:
|
|
1876
|
-
fields:
|
|
1892
|
+
field: w.field,
|
|
1893
|
+
isNew: w.index === l.length,
|
|
1894
|
+
fields: x(w.index),
|
|
1877
1895
|
source: a,
|
|
1878
1896
|
rows: S,
|
|
1879
|
-
asOf:
|
|
1897
|
+
asOf: j,
|
|
1880
1898
|
tools: s,
|
|
1881
|
-
others: { sources: p, states:
|
|
1882
|
-
taken:
|
|
1883
|
-
onCancel: () =>
|
|
1899
|
+
others: { sources: p, states: k },
|
|
1900
|
+
taken: x(w.index).map((z) => z.name),
|
|
1901
|
+
onCancel: () => f(null),
|
|
1884
1902
|
onSave: (z) => {
|
|
1885
|
-
const
|
|
1886
|
-
|
|
1903
|
+
const v = Ba(w.field, z), P = v.size > 0 ? { field: z.name, renames: v } : void 0;
|
|
1904
|
+
b(w.index, z, P) && f(null);
|
|
1887
1905
|
}
|
|
1888
1906
|
}
|
|
1889
1907
|
),
|
|
1890
|
-
|
|
1891
|
-
|
|
1908
|
+
h && /* @__PURE__ */ e.jsx(
|
|
1909
|
+
As,
|
|
1892
1910
|
{
|
|
1893
1911
|
initial: a.progress,
|
|
1894
1912
|
source: a,
|
|
1895
|
-
asOf:
|
|
1913
|
+
asOf: j,
|
|
1896
1914
|
properties: i,
|
|
1897
1915
|
rows: S,
|
|
1898
|
-
onCancel: () =>
|
|
1916
|
+
onCancel: () => C(!1),
|
|
1899
1917
|
onSave: (z) => {
|
|
1900
|
-
r({ ...a, progress: z }) &&
|
|
1918
|
+
r({ ...a, progress: z }) && C(!1);
|
|
1901
1919
|
}
|
|
1902
1920
|
}
|
|
1903
1921
|
)
|
|
1904
1922
|
] });
|
|
1905
1923
|
}
|
|
1906
|
-
function
|
|
1924
|
+
function Ls({
|
|
1907
1925
|
source: a,
|
|
1908
1926
|
spec: i,
|
|
1909
1927
|
onCancel: t,
|
|
1910
|
-
onSave:
|
|
1928
|
+
onSave: k
|
|
1911
1929
|
}) {
|
|
1912
|
-
return /* @__PURE__ */ e.jsx(Ze, { source: a, spec: i, onCancel: t, onSave:
|
|
1930
|
+
return /* @__PURE__ */ e.jsx(Ze, { source: a, spec: i, onCancel: t, onSave: k });
|
|
1913
1931
|
}
|
|
1914
1932
|
function vs({
|
|
1915
1933
|
source: a,
|
|
1916
1934
|
spec: i,
|
|
1917
1935
|
name: t,
|
|
1918
|
-
onCancel:
|
|
1936
|
+
onCancel: k,
|
|
1919
1937
|
onSave: p
|
|
1920
1938
|
}) {
|
|
1921
|
-
const
|
|
1922
|
-
return
|
|
1939
|
+
const j = a.computed?.find((c) => c.name === t);
|
|
1940
|
+
return j ? /* @__PURE__ */ e.jsx(Ze, { source: a, spec: i, field: j, onCancel: k, onSave: p }) : null;
|
|
1923
1941
|
}
|
|
1924
1942
|
function Ze({
|
|
1925
1943
|
source: a,
|
|
1926
1944
|
spec: i,
|
|
1927
1945
|
field: t,
|
|
1928
|
-
onCancel:
|
|
1946
|
+
onCancel: k,
|
|
1929
1947
|
onSave: p
|
|
1930
1948
|
}) {
|
|
1931
|
-
const { kn:
|
|
1932
|
-
...
|
|
1949
|
+
const { kn: j, sources: c, run: s, values: o } = Xa(), d = La(), m = E.useMemo(() => Ve(j, i.sources), [j, i.sources]), r = c[a.id], u = [
|
|
1950
|
+
...m.objectTypes[a.objectType]?.properties ?? [],
|
|
1933
1951
|
...fe(a.progress),
|
|
1934
1952
|
...(a.computed ?? []).filter((l) => l.name !== t?.name).map(te)
|
|
1935
1953
|
];
|
|
1936
1954
|
return /* @__PURE__ */ e.jsx(
|
|
1937
|
-
|
|
1955
|
+
Ye,
|
|
1938
1956
|
{
|
|
1939
1957
|
field: t ?? { name: "", label: "", kind: "classify", cases: [], otherwise: { value: "" } },
|
|
1940
1958
|
isNew: !t,
|
|
@@ -1942,16 +1960,16 @@ function Ze({
|
|
|
1942
1960
|
source: a,
|
|
1943
1961
|
rows: r?.status === "ready" ? r.rows : null,
|
|
1944
1962
|
asOf: Ja(i, o),
|
|
1945
|
-
tools: { network:
|
|
1963
|
+
tools: { network: m, run: s, chatModel: d?.chatModel ?? (() => null) },
|
|
1946
1964
|
others: { sources: i.sources, states: c },
|
|
1947
1965
|
taken: u.map((l) => l.name),
|
|
1948
|
-
onCancel:
|
|
1966
|
+
onCancel: k,
|
|
1949
1967
|
onSave: p
|
|
1950
1968
|
}
|
|
1951
1969
|
);
|
|
1952
1970
|
}
|
|
1953
|
-
function
|
|
1954
|
-
const c = (s) => s ===
|
|
1971
|
+
function ys(a, i, t, k, p, j = []) {
|
|
1972
|
+
const c = (s) => s === Y ? t("workshopLab.computed.asOf") : i.find((o) => o.name === s)?.label ?? s;
|
|
1955
1973
|
switch (a.kind) {
|
|
1956
1974
|
case "classify":
|
|
1957
1975
|
return [
|
|
@@ -1976,19 +1994,19 @@ function Ls(a, i, t, w, p, k = []) {
|
|
|
1976
1994
|
expr: a.expr.replace(/[A-Za-z_][A-Za-z0-9_]*/g, (s) => c(s))
|
|
1977
1995
|
});
|
|
1978
1996
|
case "related": {
|
|
1979
|
-
const s = me(
|
|
1997
|
+
const s = me(k, p, a.path) ?? [], o = s.length > 0 ? k.objectTypes[s[s.length - 1].to] : void 0, d = (m) => o?.properties.find((r) => r.name === m)?.label ?? m ?? "";
|
|
1980
1998
|
return t("workshopLab.computed.relatedLine", {
|
|
1981
|
-
path: s.map((
|
|
1999
|
+
path: s.map((m) => m.relation.name).join(" → ") || "—",
|
|
1982
2000
|
target: o?.name ?? "—",
|
|
1983
2001
|
what: t(`workshopLab.computed.aggregates.${a.aggregate}`, {
|
|
1984
2002
|
field: d(a.field)
|
|
1985
2003
|
}),
|
|
1986
2004
|
where: a.where?.length ? t("workshopLab.computed.relatedWhere", {
|
|
1987
2005
|
when: a.where.map(
|
|
1988
|
-
(
|
|
1989
|
-
d(
|
|
1990
|
-
t(`workshopLab.computed.ops.${
|
|
1991
|
-
|
|
2006
|
+
(m) => [
|
|
2007
|
+
d(m.field),
|
|
2008
|
+
t(`workshopLab.computed.ops.${m.op}`),
|
|
2009
|
+
m.values?.join("、") ?? String(m.value ?? "")
|
|
1992
2010
|
].filter(Boolean).join(" ")
|
|
1993
2011
|
).join(t("workshopLab.computed.and"))
|
|
1994
2012
|
}) : ""
|
|
@@ -2000,27 +2018,27 @@ function Ls(a, i, t, w, p, k = []) {
|
|
|
2000
2018
|
scope: t(`workshopLab.basemaps.${a.scope ?? "china"}`)
|
|
2001
2019
|
});
|
|
2002
2020
|
case "matched": {
|
|
2003
|
-
const s =
|
|
2004
|
-
...
|
|
2021
|
+
const s = j.find((m) => m.id === a.source), o = s ? [
|
|
2022
|
+
...k.objectTypes[s.objectType]?.properties ?? [],
|
|
2005
2023
|
...(s.computed ?? []).map(te)
|
|
2006
|
-
] : [], d = (
|
|
2024
|
+
] : [], d = (m) => o.find((r) => r.name === m)?.label ?? m;
|
|
2007
2025
|
return t(
|
|
2008
2026
|
a.field ? "workshopLab.computed.matchedValueLine" : "workshopLab.computed.matchedCountLine",
|
|
2009
2027
|
{
|
|
2010
2028
|
source: s?.label ?? t("workshopLab.computed.matchedMissing"),
|
|
2011
2029
|
pairs: a.pairs.map(
|
|
2012
|
-
(
|
|
2013
|
-
own: c(
|
|
2014
|
-
other: d(
|
|
2030
|
+
(m) => t("workshopLab.computed.matchedPair", {
|
|
2031
|
+
own: c(m.field),
|
|
2032
|
+
other: d(m.other)
|
|
2015
2033
|
})
|
|
2016
2034
|
).join("、"),
|
|
2017
2035
|
field: a.field ? d(a.field) : "",
|
|
2018
2036
|
where: a.where?.length ? t("workshopLab.computed.relatedWhere", {
|
|
2019
2037
|
when: a.where.map(
|
|
2020
|
-
(
|
|
2021
|
-
d(
|
|
2022
|
-
t(`workshopLab.computed.ops.${
|
|
2023
|
-
|
|
2038
|
+
(m) => [
|
|
2039
|
+
d(m.field),
|
|
2040
|
+
t(`workshopLab.computed.ops.${m.op}`),
|
|
2041
|
+
m.ref !== void 0 ? d(m.ref) : m.values?.join("、") ?? String(m.value ?? "")
|
|
2024
2042
|
].filter(Boolean).join(" ")
|
|
2025
2043
|
).join(t("workshopLab.computed.and"))
|
|
2026
2044
|
}) : ""
|
|
@@ -2037,20 +2055,20 @@ function Ls(a, i, t, w, p, k = []) {
|
|
|
2037
2055
|
}
|
|
2038
2056
|
}
|
|
2039
2057
|
function qe({ field: a, rows: i }) {
|
|
2040
|
-
const { t } =
|
|
2058
|
+
const { t } = A();
|
|
2041
2059
|
if (!i) return /* @__PURE__ */ e.jsx("span", { className: n.muted, children: t("workshopLab.computed.notLoaded") });
|
|
2042
|
-
const
|
|
2060
|
+
const k = i.map((o) => o[a.name]);
|
|
2043
2061
|
if (a.kind === "classify") {
|
|
2044
2062
|
const o = /* @__PURE__ */ new Map();
|
|
2045
|
-
for (const d of
|
|
2046
|
-
return /* @__PURE__ */ e.jsx("span", { className: n.computedPreview, children: [...a.cases, a.otherwise].map((d,
|
|
2063
|
+
for (const d of k) o.set(String(d), (o.get(String(d)) ?? 0) + 1);
|
|
2064
|
+
return /* @__PURE__ */ e.jsx("span", { className: n.computedPreview, children: [...a.cases, a.otherwise].map((d, m) => /* @__PURE__ */ e.jsxs(J, { color: Le(d.tone), children: [
|
|
2047
2065
|
d.value,
|
|
2048
2066
|
" ",
|
|
2049
2067
|
o.get(d.value) ?? 0
|
|
2050
|
-
] },
|
|
2068
|
+
] }, m)) });
|
|
2051
2069
|
}
|
|
2052
|
-
const p =
|
|
2053
|
-
if (a.kind === "text" ||
|
|
2070
|
+
const p = k.filter((o) => o != null && o !== ""), j = a.kind === "matched" && a.field !== void 0 && a.type !== "number" || a.kind === "related" && (a.aggregate === "list" || a.aggregate === "one" && a.type !== "number");
|
|
2071
|
+
if (a.kind === "text" || j) {
|
|
2054
2072
|
const o = [...new Set(p.map(String))].slice(0, 3).join("、");
|
|
2055
2073
|
return /* @__PURE__ */ e.jsx("span", { className: n.muted, children: t("workshopLab.computed.textPreview", {
|
|
2056
2074
|
count: p.length,
|
|
@@ -2059,7 +2077,7 @@ function qe({ field: a, rows: i }) {
|
|
|
2059
2077
|
}) });
|
|
2060
2078
|
}
|
|
2061
2079
|
if (a.kind !== "region") {
|
|
2062
|
-
const o = p.map(Number), d = (
|
|
2080
|
+
const o = p.map(Number), d = (m) => m.toLocaleString(void 0, { maximumFractionDigits: 2 });
|
|
2063
2081
|
return /* @__PURE__ */ e.jsx("span", { className: n.muted, children: o.length === 0 ? t("workshopLab.computed.daysNone", { total: i.length }) : t("workshopLab.computed.numberPreview", {
|
|
2064
2082
|
count: o.length,
|
|
2065
2083
|
total: i.length,
|
|
@@ -2070,19 +2088,19 @@ function qe({ field: a, rows: i }) {
|
|
|
2070
2088
|
}
|
|
2071
2089
|
const c = /* @__PURE__ */ new Map();
|
|
2072
2090
|
for (const o of p) c.set(String(o), (c.get(String(o)) ?? 0) + 1);
|
|
2073
|
-
const s = [...c].sort((o, d) => d[1] - o[1]).slice(0,
|
|
2091
|
+
const s = [...c].sort((o, d) => d[1] - o[1]).slice(0, hs).map(([o, d]) => `${o} ${d}`).join("、");
|
|
2074
2092
|
return /* @__PURE__ */ e.jsx("span", { className: n.muted, children: t("workshopLab.computed.regionPreview", {
|
|
2075
2093
|
count: p.length,
|
|
2076
2094
|
missing: i.length - p.length,
|
|
2077
2095
|
top: s || "—"
|
|
2078
2096
|
}) });
|
|
2079
2097
|
}
|
|
2080
|
-
function
|
|
2098
|
+
function Ns({
|
|
2081
2099
|
field: a,
|
|
2082
2100
|
rows: i,
|
|
2083
2101
|
fields: t
|
|
2084
2102
|
}) {
|
|
2085
|
-
const { t:
|
|
2103
|
+
const { t: k } = A(), [p, j] = E.useState(null);
|
|
2086
2104
|
if (!i) return null;
|
|
2087
2105
|
const c = (r) => r == null || r === "", s = a.kind === "classify" ? [...a.cases, a.otherwise].map((r) => ({
|
|
2088
2106
|
key: r.value,
|
|
@@ -2091,22 +2109,22 @@ function ys({
|
|
|
2091
2109
|
})) : [
|
|
2092
2110
|
{
|
|
2093
2111
|
key: "set",
|
|
2094
|
-
label:
|
|
2112
|
+
label: k("workshopLab.computed.withValue"),
|
|
2095
2113
|
test: (r) => !c(r[a.name])
|
|
2096
2114
|
},
|
|
2097
2115
|
{
|
|
2098
2116
|
key: "empty",
|
|
2099
|
-
label:
|
|
2117
|
+
label: k("workshopLab.computed.withoutValue"),
|
|
2100
2118
|
test: (r) => c(r[a.name])
|
|
2101
2119
|
}
|
|
2102
|
-
], o = s.find((r) => r.key === p), d = [...new Set(ma(a))],
|
|
2120
|
+
], o = s.find((r) => r.key === p), d = [...new Set(ma(a))], m = (r) => t.find((u) => u.name === r)?.label ?? r;
|
|
2103
2121
|
return /* @__PURE__ */ e.jsxs("div", { className: n.computedSamples, children: [
|
|
2104
|
-
/* @__PURE__ */ e.jsx("span", { className: n.muted, children:
|
|
2105
|
-
/* @__PURE__ */ e.jsx(
|
|
2122
|
+
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: k("workshopLab.computed.samplesHint") }),
|
|
2123
|
+
/* @__PURE__ */ e.jsx(F, { size: 4, wrap: !0, children: s.map((r) => /* @__PURE__ */ e.jsx(
|
|
2106
2124
|
J.CheckableTag,
|
|
2107
2125
|
{
|
|
2108
2126
|
checked: p === r.key,
|
|
2109
|
-
onChange: (u) =>
|
|
2127
|
+
onChange: (u) => j(u ? r.key : null),
|
|
2110
2128
|
children: r.label
|
|
2111
2129
|
},
|
|
2112
2130
|
r.key
|
|
@@ -2120,10 +2138,10 @@ function ys({
|
|
|
2120
2138
|
scroll: { x: "max-content" },
|
|
2121
2139
|
dataSource: i.filter(o.test).slice(0, us),
|
|
2122
2140
|
columns: [
|
|
2123
|
-
{ key: "$key", title:
|
|
2141
|
+
{ key: "$key", title: k("workshopLab.computed.object"), dataIndex: "$key" },
|
|
2124
2142
|
...d.map((r) => ({
|
|
2125
2143
|
key: r,
|
|
2126
|
-
title:
|
|
2144
|
+
title: m(r),
|
|
2127
2145
|
dataIndex: r,
|
|
2128
2146
|
render: (u) => c(u) ? "—" : String(u).slice(0, 24)
|
|
2129
2147
|
})),
|
|
@@ -2138,119 +2156,119 @@ function ys({
|
|
|
2138
2156
|
)
|
|
2139
2157
|
] });
|
|
2140
2158
|
}
|
|
2141
|
-
function
|
|
2159
|
+
function Le(a) {
|
|
2142
2160
|
return a === "danger" ? "error" : a === "success" ? "success" : a === "warning" ? "warning" : a === "info" ? "processing" : "default";
|
|
2143
2161
|
}
|
|
2144
|
-
function
|
|
2162
|
+
function Ye({
|
|
2145
2163
|
field: a,
|
|
2146
2164
|
isNew: i,
|
|
2147
2165
|
fields: t,
|
|
2148
|
-
source:
|
|
2166
|
+
source: k,
|
|
2149
2167
|
rows: p,
|
|
2150
|
-
asOf:
|
|
2168
|
+
asOf: j,
|
|
2151
2169
|
tools: c,
|
|
2152
2170
|
others: s,
|
|
2153
2171
|
taken: o,
|
|
2154
2172
|
onCancel: d,
|
|
2155
|
-
onSave:
|
|
2173
|
+
onSave: m
|
|
2156
2174
|
}) {
|
|
2157
|
-
const { t: r } =
|
|
2158
|
-
|
|
2159
|
-
), S = t.filter((
|
|
2160
|
-
{ value:
|
|
2161
|
-
...S.map((
|
|
2162
|
-
],
|
|
2175
|
+
const { t: r } = A(), { network: u } = c, [l, w] = E.useState(a), [f, h] = E.useState(!i || !!a.name), [C, L] = E.useState(!1), N = (v) => w(
|
|
2176
|
+
f || v.label === l.label ? v : { ...v, name: v.label.trim() ? Je(v.label, o) : "" }
|
|
2177
|
+
), S = t.filter((v) => v.type === "date"), y = t.filter((v) => v.type === "text"), x = [
|
|
2178
|
+
{ value: Y, label: r("workshopLab.computed.asOf") },
|
|
2179
|
+
...S.map((v) => ({ value: v.name, label: v.label }))
|
|
2180
|
+
], b = {
|
|
2163
2181
|
kn: u,
|
|
2164
|
-
objectType:
|
|
2165
|
-
cypher:
|
|
2166
|
-
progress: !!
|
|
2182
|
+
objectType: k.objectType,
|
|
2183
|
+
cypher: k.cypher !== void 0,
|
|
2184
|
+
progress: !!k.progress,
|
|
2167
2185
|
sources: s.sources.map(
|
|
2168
|
-
(
|
|
2169
|
-
...
|
|
2186
|
+
(v) => v.id === k.id ? {
|
|
2187
|
+
...v,
|
|
2170
2188
|
computed: [
|
|
2171
|
-
...(
|
|
2172
|
-
(
|
|
2189
|
+
...(v.computed ?? []).filter(
|
|
2190
|
+
(P) => P.name !== a.name && P.name !== l.name
|
|
2173
2191
|
),
|
|
2174
2192
|
l
|
|
2175
2193
|
]
|
|
2176
|
-
} :
|
|
2194
|
+
} : v
|
|
2177
2195
|
),
|
|
2178
|
-
source:
|
|
2179
|
-
},
|
|
2180
|
-
|
|
2181
|
-
(
|
|
2196
|
+
source: k.id
|
|
2197
|
+
}, g = l.name ? Me([l], t, "field", b) : [], T = l.kind === "related" && g.length === 0 ? l : null, _ = T ? `${Va(u, k, T)}|${p?.length}` : null, H = ga(
|
|
2198
|
+
_,
|
|
2199
|
+
(v) => Ka(
|
|
2182
2200
|
c.run,
|
|
2183
2201
|
u,
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
p?.map((
|
|
2202
|
+
k,
|
|
2203
|
+
T,
|
|
2204
|
+
v,
|
|
2205
|
+
p?.map((P) => P.$key)
|
|
2188
2206
|
)
|
|
2189
|
-
), M =
|
|
2207
|
+
), M = E.useMemo(() => {
|
|
2190
2208
|
if (!p || !l.name) return null;
|
|
2191
|
-
let
|
|
2209
|
+
let v = p;
|
|
2192
2210
|
if (l.kind === "matched") {
|
|
2193
|
-
const
|
|
2194
|
-
if (!
|
|
2211
|
+
const R = Ts(l, s, j);
|
|
2212
|
+
if (!R || !l.pairs.length || l.pairs.some((V) => !V.field || !V.other))
|
|
2195
2213
|
return null;
|
|
2196
|
-
const
|
|
2197
|
-
|
|
2214
|
+
const B = Ua(p, R, l, j);
|
|
2215
|
+
v = p.map((V) => ({
|
|
2198
2216
|
...V,
|
|
2199
|
-
[l.name]: Ga(l,
|
|
2217
|
+
[l.name]: Ga(l, B.get(V.$key))
|
|
2200
2218
|
}));
|
|
2201
2219
|
}
|
|
2202
2220
|
if (l.kind === "related") {
|
|
2203
|
-
if (
|
|
2204
|
-
const { values:
|
|
2205
|
-
|
|
2221
|
+
if (H.status !== "ready") return null;
|
|
2222
|
+
const { values: R, fallback: B } = H.value;
|
|
2223
|
+
v = p.map((V) => ({ ...V, [l.name]: R.get(V.$key) ?? B }));
|
|
2206
2224
|
}
|
|
2207
|
-
const
|
|
2208
|
-
(
|
|
2225
|
+
const P = (k.computed ?? []).filter(
|
|
2226
|
+
(R) => R.name !== l.name && R.name !== a.name
|
|
2209
2227
|
);
|
|
2210
|
-
return
|
|
2211
|
-
}, [p, l, a.name,
|
|
2212
|
-
const
|
|
2213
|
-
if (!
|
|
2214
|
-
const
|
|
2215
|
-
Z.current =
|
|
2216
|
-
const
|
|
2228
|
+
return he(v, { ...k, computed: [...P, l] }, j);
|
|
2229
|
+
}, [p, l, a.name, k, j, H, s]), D = l.name && (!Xe.test(l.name) || i && o.includes(l.name)) ? r("workshopLab.computed.nameError") : null, [W, ie] = E.useState(""), [ce, se] = E.useState(!1), [pe, K] = E.useState(null), Z = E.useRef(null), oe = async () => {
|
|
2230
|
+
const v = c.chatModel();
|
|
2231
|
+
if (!v) return K(r("workshopLab.computed.noModel"));
|
|
2232
|
+
const P = new AbortController();
|
|
2233
|
+
Z.current = P, se(!0), K(r("workshopLab.computed.generating"));
|
|
2234
|
+
const R = performance.now();
|
|
2217
2235
|
try {
|
|
2218
|
-
const
|
|
2219
|
-
model:
|
|
2236
|
+
const B = await Ya({
|
|
2237
|
+
model: v,
|
|
2220
2238
|
scope: {
|
|
2221
|
-
sourceLabel:
|
|
2239
|
+
sourceLabel: k.label,
|
|
2222
2240
|
fields: t,
|
|
2223
|
-
samples: p ?
|
|
2224
|
-
context:
|
|
2241
|
+
samples: p ? Qa(p, t) : {},
|
|
2242
|
+
context: b
|
|
2225
2243
|
},
|
|
2226
|
-
instruction:
|
|
2244
|
+
instruction: W,
|
|
2227
2245
|
current: i && !l.label ? void 0 : l,
|
|
2228
2246
|
taken: o,
|
|
2229
|
-
signal:
|
|
2230
|
-
onStep: (V) =>
|
|
2247
|
+
signal: P.signal,
|
|
2248
|
+
onStep: (V) => K(
|
|
2231
2249
|
V.kind === "generating" ? r("workshopLab.computed.attempt", { attempt: V.attempt }) : r("workshopLab.computed.retry", { error: V.error })
|
|
2232
2250
|
)
|
|
2233
2251
|
});
|
|
2234
|
-
|
|
2235
|
-
...
|
|
2236
|
-
name: l.name ||
|
|
2237
|
-
label: l.label ||
|
|
2238
|
-
}),
|
|
2252
|
+
B.ok ? (N({
|
|
2253
|
+
...B.field,
|
|
2254
|
+
name: l.name || B.field.name,
|
|
2255
|
+
label: l.label || B.field.label
|
|
2256
|
+
}), K(
|
|
2239
2257
|
r("workshopLab.computed.generated", {
|
|
2240
|
-
seconds: ((performance.now() -
|
|
2241
|
-
explanation:
|
|
2258
|
+
seconds: ((performance.now() - R) / 1e3).toFixed(1),
|
|
2259
|
+
explanation: B.explanation
|
|
2242
2260
|
})
|
|
2243
|
-
)) :
|
|
2244
|
-
r("workshopLab.computed.gaveUp", { attempts:
|
|
2261
|
+
)) : K(
|
|
2262
|
+
r("workshopLab.computed.gaveUp", { attempts: B.attempts, error: B.error })
|
|
2245
2263
|
);
|
|
2246
|
-
} catch (
|
|
2247
|
-
|
|
2264
|
+
} catch (B) {
|
|
2265
|
+
K(P.signal.aborted ? null : Re(B));
|
|
2248
2266
|
} finally {
|
|
2249
2267
|
se(!1);
|
|
2250
2268
|
}
|
|
2251
|
-
}, z = (
|
|
2252
|
-
const
|
|
2253
|
-
|
|
2269
|
+
}, z = (v) => {
|
|
2270
|
+
const P = { name: l.name, label: l.label };
|
|
2271
|
+
v === "classify" && N({ ...P, kind: v, cases: [], otherwise: { value: "" } }), v === "days" && N({ ...P, kind: v, from: S[0]?.name ?? Y, to: Y }), v === "formula" && N({ ...P, kind: v, expr: "" }), v === "related" && N({ ...P, kind: v, path: [], aggregate: "count" }), v === "region" && N({ ...P, kind: v, from: y[0]?.name ?? "" }), v === "text" && N({ ...P, kind: v, template: "" }), v === "matched" && N({ ...P, kind: v, source: "", pairs: [] });
|
|
2254
2272
|
};
|
|
2255
2273
|
return /* @__PURE__ */ e.jsx(
|
|
2256
2274
|
ae,
|
|
@@ -2259,8 +2277,8 @@ function Qe({
|
|
|
2259
2277
|
width: 800,
|
|
2260
2278
|
title: r(i ? "workshopLab.computed.newTitle" : "workshopLab.computed.editTitle"),
|
|
2261
2279
|
okText: r("workshopLab.computed.save"),
|
|
2262
|
-
okButtonProps: { disabled: !l.name || !l.label || !!
|
|
2263
|
-
onOk: () =>
|
|
2280
|
+
okButtonProps: { disabled: !l.name || !l.label || !!D },
|
|
2281
|
+
onOk: () => m(l),
|
|
2264
2282
|
onCancel: () => {
|
|
2265
2283
|
Z.current?.abort(), d();
|
|
2266
2284
|
},
|
|
@@ -2271,9 +2289,9 @@ function Qe({
|
|
|
2271
2289
|
{
|
|
2272
2290
|
variant: "borderless",
|
|
2273
2291
|
placeholder: r("workshopLab.computed.askPlaceholder"),
|
|
2274
|
-
value:
|
|
2275
|
-
onChange: (
|
|
2276
|
-
onPressEnter: (
|
|
2292
|
+
value: W,
|
|
2293
|
+
onChange: (v) => ie(v.target.value),
|
|
2294
|
+
onPressEnter: (v) => !v.nativeEvent.isComposing && W.trim() && !ce && void oe()
|
|
2277
2295
|
}
|
|
2278
2296
|
),
|
|
2279
2297
|
ce ? /* @__PURE__ */ e.jsx($, { size: "small", onClick: () => Z.current?.abort(), children: r("workshopLab.computed.stop") }) : /* @__PURE__ */ e.jsx(
|
|
@@ -2281,7 +2299,7 @@ function Qe({
|
|
|
2281
2299
|
{
|
|
2282
2300
|
size: "small",
|
|
2283
2301
|
type: "primary",
|
|
2284
|
-
disabled: !
|
|
2302
|
+
disabled: !W.trim(),
|
|
2285
2303
|
onClick: () => {
|
|
2286
2304
|
oe();
|
|
2287
2305
|
},
|
|
@@ -2292,14 +2310,14 @@ function Qe({
|
|
|
2292
2310
|
)
|
|
2293
2311
|
] }),
|
|
2294
2312
|
pe && /* @__PURE__ */ e.jsx("span", { className: n.muted, children: pe }),
|
|
2295
|
-
/* @__PURE__ */ e.jsxs(
|
|
2313
|
+
/* @__PURE__ */ e.jsxs(F, { wrap: !0, align: "end", children: [
|
|
2296
2314
|
/* @__PURE__ */ e.jsxs("label", { className: n.field, children: [
|
|
2297
2315
|
/* @__PURE__ */ e.jsx("span", { className: n.fieldLabel, children: r("workshopLab.computed.label") }),
|
|
2298
2316
|
/* @__PURE__ */ e.jsx(
|
|
2299
2317
|
I,
|
|
2300
2318
|
{
|
|
2301
2319
|
value: l.label,
|
|
2302
|
-
onChange: (
|
|
2320
|
+
onChange: (v) => N({ ...l, label: v.target.value })
|
|
2303
2321
|
}
|
|
2304
2322
|
)
|
|
2305
2323
|
] }),
|
|
@@ -2308,172 +2326,172 @@ function Qe({
|
|
|
2308
2326
|
{
|
|
2309
2327
|
size: "small",
|
|
2310
2328
|
type: "link",
|
|
2311
|
-
"aria-expanded":
|
|
2312
|
-
onClick: () =>
|
|
2313
|
-
children: r(
|
|
2329
|
+
"aria-expanded": C,
|
|
2330
|
+
onClick: () => L(!C),
|
|
2331
|
+
children: r(C ? "workshopLab.computed.hideAdvanced" : "workshopLab.computed.advanced")
|
|
2314
2332
|
}
|
|
2315
2333
|
)
|
|
2316
2334
|
] }),
|
|
2317
|
-
|
|
2335
|
+
C && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2318
2336
|
/* @__PURE__ */ e.jsxs("label", { className: n.field, children: [
|
|
2319
2337
|
/* @__PURE__ */ e.jsx("span", { className: n.fieldLabel, children: r("workshopLab.computed.name") }),
|
|
2320
2338
|
/* @__PURE__ */ e.jsx(
|
|
2321
2339
|
I,
|
|
2322
2340
|
{
|
|
2323
2341
|
disabled: !i,
|
|
2324
|
-
status:
|
|
2342
|
+
status: D ? "error" : void 0,
|
|
2325
2343
|
value: l.name,
|
|
2326
|
-
onChange: (
|
|
2327
|
-
|
|
2344
|
+
onChange: (v) => {
|
|
2345
|
+
h(!0), w({ ...l, name: v.target.value.trim() });
|
|
2328
2346
|
}
|
|
2329
2347
|
}
|
|
2330
2348
|
)
|
|
2331
2349
|
] }),
|
|
2332
2350
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: r(i ? "workshopLab.computed.nameHint" : "workshopLab.computed.nameKept") })
|
|
2333
2351
|
] }),
|
|
2334
|
-
|
|
2352
|
+
D && /* @__PURE__ */ e.jsx("span", { className: n.error, children: D }),
|
|
2335
2353
|
/* @__PURE__ */ e.jsx(
|
|
2336
|
-
|
|
2354
|
+
ue.Group,
|
|
2337
2355
|
{
|
|
2338
2356
|
optionType: "button",
|
|
2339
2357
|
size: "small",
|
|
2340
2358
|
value: l.kind,
|
|
2341
|
-
onChange: (
|
|
2342
|
-
options: ra.map((
|
|
2343
|
-
value:
|
|
2344
|
-
label: r(`workshopLab.computed.kinds.${
|
|
2359
|
+
onChange: (v) => z(v.target.value),
|
|
2360
|
+
options: ra.map((v) => ({
|
|
2361
|
+
value: v,
|
|
2362
|
+
label: r(`workshopLab.computed.kinds.${v}`)
|
|
2345
2363
|
}))
|
|
2346
2364
|
}
|
|
2347
2365
|
),
|
|
2348
2366
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: r(`workshopLab.computed.kindHints.${l.kind}`) }),
|
|
2349
2367
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: r(`workshopLab.computed.kindExamples.${l.kind}`) }),
|
|
2350
|
-
l.kind === "classify" && /* @__PURE__ */ e.jsx(
|
|
2368
|
+
l.kind === "classify" && /* @__PURE__ */ e.jsx(Ps, { field: l, fields: t, source: k, onChange: N }),
|
|
2351
2369
|
l.kind === "days" && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2352
|
-
/* @__PURE__ */ e.jsxs(
|
|
2370
|
+
/* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
2353
2371
|
/* @__PURE__ */ e.jsx("span", { children: r("workshopLab.computed.from") }),
|
|
2354
2372
|
/* @__PURE__ */ e.jsx(
|
|
2355
|
-
|
|
2373
|
+
O,
|
|
2356
2374
|
{
|
|
2357
2375
|
size: "small",
|
|
2358
2376
|
className: n.fieldSelect,
|
|
2359
2377
|
value: l.from,
|
|
2360
|
-
options:
|
|
2361
|
-
onChange: (
|
|
2378
|
+
options: x,
|
|
2379
|
+
onChange: (v) => N({ ...l, from: v })
|
|
2362
2380
|
}
|
|
2363
2381
|
),
|
|
2364
2382
|
/* @__PURE__ */ e.jsx("span", { children: r("workshopLab.computed.to") }),
|
|
2365
2383
|
/* @__PURE__ */ e.jsx(
|
|
2366
|
-
|
|
2384
|
+
O,
|
|
2367
2385
|
{
|
|
2368
2386
|
size: "small",
|
|
2369
2387
|
className: n.fieldSelect,
|
|
2370
2388
|
value: l.to,
|
|
2371
|
-
options:
|
|
2372
|
-
onChange: (
|
|
2389
|
+
options: x,
|
|
2390
|
+
onChange: (v) => N({ ...l, to: v })
|
|
2373
2391
|
}
|
|
2374
2392
|
)
|
|
2375
2393
|
] }),
|
|
2376
2394
|
/* @__PURE__ */ e.jsx("span", { className: n.fieldLabel, children: r("workshopLab.computed.onlyWhen") }),
|
|
2377
2395
|
/* @__PURE__ */ e.jsx(
|
|
2378
|
-
|
|
2396
|
+
X,
|
|
2379
2397
|
{
|
|
2380
2398
|
value: l.when,
|
|
2381
2399
|
fields: t,
|
|
2382
|
-
source:
|
|
2383
|
-
onChange: (
|
|
2400
|
+
source: k,
|
|
2401
|
+
onChange: (v) => N({ ...l, when: v.length > 0 ? v : void 0 })
|
|
2384
2402
|
}
|
|
2385
2403
|
)
|
|
2386
2404
|
] }),
|
|
2387
|
-
l.kind === "formula" && /* @__PURE__ */ e.jsx(
|
|
2388
|
-
l.kind === "text" && /* @__PURE__ */ e.jsx(
|
|
2405
|
+
l.kind === "formula" && /* @__PURE__ */ e.jsx(Os, { field: l, fields: t, onChange: N }),
|
|
2406
|
+
l.kind === "text" && /* @__PURE__ */ e.jsx($s, { field: l, fields: t, onChange: N }),
|
|
2389
2407
|
l.kind === "matched" && /* @__PURE__ */ e.jsx(
|
|
2390
|
-
|
|
2408
|
+
zs,
|
|
2391
2409
|
{
|
|
2392
2410
|
field: l,
|
|
2393
2411
|
fields: t,
|
|
2394
|
-
source:
|
|
2412
|
+
source: k,
|
|
2395
2413
|
others: s,
|
|
2396
2414
|
kn: u,
|
|
2397
|
-
onChange:
|
|
2415
|
+
onChange: N
|
|
2398
2416
|
}
|
|
2399
2417
|
),
|
|
2400
|
-
l.kind === "related" && /* @__PURE__ */ e.jsx(
|
|
2401
|
-
l.kind === "region" && /* @__PURE__ */ e.jsxs(
|
|
2418
|
+
l.kind === "related" && /* @__PURE__ */ e.jsx(Fs, { field: l, source: k, kn: u, onChange: N }),
|
|
2419
|
+
l.kind === "region" && /* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
2402
2420
|
/* @__PURE__ */ e.jsx("span", { children: r("workshopLab.computed.regionFrom") }),
|
|
2403
2421
|
/* @__PURE__ */ e.jsx(
|
|
2404
|
-
|
|
2422
|
+
O,
|
|
2405
2423
|
{
|
|
2406
2424
|
size: "small",
|
|
2407
2425
|
className: n.fieldSelect,
|
|
2408
2426
|
value: l.from || void 0,
|
|
2409
|
-
options:
|
|
2410
|
-
onChange: (
|
|
2427
|
+
options: y.map((v) => ({ value: v.name, label: v.label })),
|
|
2428
|
+
onChange: (v) => N({ ...l, from: v })
|
|
2411
2429
|
}
|
|
2412
2430
|
),
|
|
2413
2431
|
/* @__PURE__ */ e.jsx("span", { children: r("workshopLab.computed.regionScope") }),
|
|
2414
2432
|
/* @__PURE__ */ e.jsx(
|
|
2415
|
-
|
|
2433
|
+
O,
|
|
2416
2434
|
{
|
|
2417
2435
|
size: "small",
|
|
2418
2436
|
value: l.scope ?? "china",
|
|
2419
|
-
options: ia.map((
|
|
2420
|
-
value:
|
|
2421
|
-
label: r(`workshopLab.basemaps.${
|
|
2437
|
+
options: ia.map((v) => ({
|
|
2438
|
+
value: v,
|
|
2439
|
+
label: r(`workshopLab.basemaps.${v}`)
|
|
2422
2440
|
})),
|
|
2423
|
-
onChange: (
|
|
2424
|
-
|
|
2441
|
+
onChange: (v) => N(
|
|
2442
|
+
v === "china" ? { name: l.name, label: l.label, kind: "region", from: l.from } : { ...l, scope: v }
|
|
2425
2443
|
)
|
|
2426
2444
|
}
|
|
2427
2445
|
)
|
|
2428
2446
|
] }),
|
|
2429
|
-
|
|
2447
|
+
g.length > 0 && /* @__PURE__ */ e.jsx("ul", { className: n.computedProblems, children: g.slice(0, 4).map((v) => /* @__PURE__ */ e.jsx("li", { children: v.replace(/^field\[0\]\.?/, "") }, v)) }),
|
|
2430
2448
|
/* @__PURE__ */ e.jsxs("div", { className: n.computedPreviewBox, children: [
|
|
2431
|
-
/* @__PURE__ */ e.jsx("span", { className: n.fieldLabel, children: r("workshopLab.computed.previewTitle", { date:
|
|
2432
|
-
l.name ? l.kind === "matched" &&
|
|
2449
|
+
/* @__PURE__ */ e.jsx("span", { className: n.fieldLabel, children: r("workshopLab.computed.previewTitle", { date: j }) }),
|
|
2450
|
+
l.name ? l.kind === "matched" && g.length > 0 ? /* @__PURE__ */ e.jsx("span", { className: n.muted, children: r("workshopLab.computed.fixFirst") }) : l.kind === "matched" && !M ? /* @__PURE__ */ e.jsx("span", { className: n.muted, children: r("workshopLab.computed.matchedNotLoaded") }) : l.kind === "related" && H.status === "error" ? /* @__PURE__ */ e.jsx("span", { className: n.error, children: r("workshopLab.computed.relatedFailed") }) : l.kind === "related" && g.length > 0 ? /* @__PURE__ */ e.jsx("span", { className: n.muted, children: r("workshopLab.computed.fixFirst") }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2433
2451
|
/* @__PURE__ */ e.jsx(qe, { field: l, rows: M }),
|
|
2434
|
-
/* @__PURE__ */ e.jsx(
|
|
2452
|
+
/* @__PURE__ */ e.jsx(Ns, { field: l, rows: M, fields: t })
|
|
2435
2453
|
] }) : /* @__PURE__ */ e.jsx("span", { className: n.muted, children: r("workshopLab.computed.needName") })
|
|
2436
2454
|
] })
|
|
2437
2455
|
] })
|
|
2438
2456
|
}
|
|
2439
2457
|
);
|
|
2440
2458
|
}
|
|
2441
|
-
function
|
|
2459
|
+
function Ss(a, i) {
|
|
2442
2460
|
return a.sources.filter(
|
|
2443
2461
|
(t) => t.id !== i.id && !t.from && !t.cypher && !t.events && !t.model
|
|
2444
2462
|
);
|
|
2445
2463
|
}
|
|
2446
|
-
function
|
|
2464
|
+
function Cs(a, i) {
|
|
2447
2465
|
return a ? [
|
|
2448
2466
|
...i.objectTypes[a.objectType]?.properties ?? [],
|
|
2449
2467
|
...(a.computed ?? []).map(te)
|
|
2450
2468
|
] : [];
|
|
2451
2469
|
}
|
|
2452
|
-
function
|
|
2453
|
-
const
|
|
2454
|
-
return !
|
|
2470
|
+
function Ts(a, i, t) {
|
|
2471
|
+
const k = i.sources.find((j) => j.id === a.source), p = i.states[a.source];
|
|
2472
|
+
return !k || p?.status !== "ready" || p.truncated ? null : he(p.rows, k, t);
|
|
2455
2473
|
}
|
|
2456
|
-
function
|
|
2474
|
+
function zs({
|
|
2457
2475
|
field: a,
|
|
2458
2476
|
fields: i,
|
|
2459
2477
|
source: t,
|
|
2460
|
-
others:
|
|
2478
|
+
others: k,
|
|
2461
2479
|
kn: p,
|
|
2462
|
-
onChange:
|
|
2480
|
+
onChange: j
|
|
2463
2481
|
}) {
|
|
2464
|
-
const { t: c } =
|
|
2465
|
-
const
|
|
2466
|
-
|
|
2482
|
+
const { t: c } = A(), s = Ss(k, t), o = s.find((l) => l.id === a.source), d = Cs(o, p), m = i.filter((l) => l.type !== "date" || l.name !== Y), r = (l, w) => {
|
|
2483
|
+
const f = [...a.pairs];
|
|
2484
|
+
w === null ? f.splice(l, 1) : f[l] = w, j({ ...a, pairs: f });
|
|
2467
2485
|
}, u = (l) => {
|
|
2468
|
-
const
|
|
2469
|
-
delete
|
|
2470
|
-
const
|
|
2471
|
-
|
|
2486
|
+
const w = { ...a };
|
|
2487
|
+
delete w.field, delete w.type;
|
|
2488
|
+
const f = d.find((h) => h.name === l)?.type;
|
|
2489
|
+
j(l ? { ...w, field: l, ...f ? { type: f } : {} } : w);
|
|
2472
2490
|
};
|
|
2473
2491
|
return /* @__PURE__ */ e.jsxs("div", { className: n.matchedForm, children: [
|
|
2474
2492
|
/* @__PURE__ */ e.jsx("span", { className: n.fieldLabel, children: c("workshopLab.computed.matchedFrom") }),
|
|
2475
2493
|
/* @__PURE__ */ e.jsx(
|
|
2476
|
-
|
|
2494
|
+
O,
|
|
2477
2495
|
{
|
|
2478
2496
|
size: "small",
|
|
2479
2497
|
className: n.fieldSelect,
|
|
@@ -2483,7 +2501,7 @@ function Ts({
|
|
|
2483
2501
|
options: s.map((l) => ({ value: l.id, label: l.label })),
|
|
2484
2502
|
onChange: (l) => (
|
|
2485
2503
|
// Another source has other fields: the pairs, conditions and value start again.
|
|
2486
|
-
|
|
2504
|
+
j({
|
|
2487
2505
|
name: a.name,
|
|
2488
2506
|
label: a.label,
|
|
2489
2507
|
kind: "matched",
|
|
@@ -2496,45 +2514,45 @@ function Ts({
|
|
|
2496
2514
|
o && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2497
2515
|
/* @__PURE__ */ e.jsx("span", { className: n.fieldLabel, children: c("workshopLab.computed.matchedPairs") }),
|
|
2498
2516
|
/* @__PURE__ */ e.jsxs("div", { className: n.matchedPairs, children: [
|
|
2499
|
-
a.pairs.map((l,
|
|
2517
|
+
a.pairs.map((l, w) => /* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
2500
2518
|
/* @__PURE__ */ e.jsx(
|
|
2501
|
-
|
|
2519
|
+
O,
|
|
2502
2520
|
{
|
|
2503
2521
|
size: "small",
|
|
2504
2522
|
showSearch: !0,
|
|
2505
2523
|
optionFilterProp: "label",
|
|
2506
2524
|
className: n.fieldSelect,
|
|
2507
|
-
"aria-label": c("workshopLab.computed.matchedOwn", { n:
|
|
2525
|
+
"aria-label": c("workshopLab.computed.matchedOwn", { n: w + 1 }),
|
|
2508
2526
|
placeholder: c("workshopLab.computed.matchedOwnField", { source: t.label }),
|
|
2509
2527
|
value: l.field || void 0,
|
|
2510
|
-
options:
|
|
2511
|
-
onChange: (
|
|
2528
|
+
options: m.map((f) => ({ value: f.name, label: f.label })),
|
|
2529
|
+
onChange: (f) => r(w, { ...l, field: f })
|
|
2512
2530
|
}
|
|
2513
2531
|
),
|
|
2514
2532
|
/* @__PURE__ */ e.jsx("span", { children: "=" }),
|
|
2515
2533
|
/* @__PURE__ */ e.jsx(
|
|
2516
|
-
|
|
2534
|
+
O,
|
|
2517
2535
|
{
|
|
2518
2536
|
size: "small",
|
|
2519
2537
|
showSearch: !0,
|
|
2520
2538
|
optionFilterProp: "label",
|
|
2521
2539
|
className: n.fieldSelect,
|
|
2522
|
-
"aria-label": c("workshopLab.computed.matchedOther", { n:
|
|
2540
|
+
"aria-label": c("workshopLab.computed.matchedOther", { n: w + 1 }),
|
|
2523
2541
|
placeholder: c("workshopLab.computed.matchedOwnField", { source: o.label }),
|
|
2524
2542
|
value: l.other || void 0,
|
|
2525
|
-
options: d.map((
|
|
2526
|
-
onChange: (
|
|
2543
|
+
options: d.map((f) => ({ value: f.name, label: f.label })),
|
|
2544
|
+
onChange: (f) => r(w, { ...l, other: f })
|
|
2527
2545
|
}
|
|
2528
2546
|
),
|
|
2529
|
-
a.pairs.length > 1 && /* @__PURE__ */ e.jsx($, { size: "small", type: "link", danger: !0, onClick: () => r(
|
|
2530
|
-
] },
|
|
2531
|
-
a.pairs.length <
|
|
2547
|
+
a.pairs.length > 1 && /* @__PURE__ */ e.jsx($, { size: "small", type: "link", danger: !0, onClick: () => r(w, null), children: c("workshopLab.computed.removeCondition") })
|
|
2548
|
+
] }, w)),
|
|
2549
|
+
a.pairs.length < ms && /* @__PURE__ */ e.jsx(
|
|
2532
2550
|
$,
|
|
2533
2551
|
{
|
|
2534
2552
|
size: "small",
|
|
2535
2553
|
type: "dashed",
|
|
2536
2554
|
icon: /* @__PURE__ */ e.jsx(ne, {}),
|
|
2537
|
-
onClick: () =>
|
|
2555
|
+
onClick: () => j({ ...a, pairs: [...a.pairs, { field: "", other: "" }] }),
|
|
2538
2556
|
children: c("workshopLab.computed.matchedAddPair")
|
|
2539
2557
|
}
|
|
2540
2558
|
)
|
|
@@ -2542,18 +2560,18 @@ function Ts({
|
|
|
2542
2560
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: c("workshopLab.computed.matchedPairsHint") }),
|
|
2543
2561
|
/* @__PURE__ */ e.jsx("span", { className: n.fieldLabel, children: c("workshopLab.computed.matchedOnly", { source: o.label }) }),
|
|
2544
2562
|
/* @__PURE__ */ e.jsx(
|
|
2545
|
-
|
|
2563
|
+
X,
|
|
2546
2564
|
{
|
|
2547
2565
|
value: a.where,
|
|
2548
2566
|
fields: d,
|
|
2549
2567
|
source: o,
|
|
2550
|
-
onChange: (l) =>
|
|
2568
|
+
onChange: (l) => j({ ...a, where: l.length > 0 ? l : void 0 })
|
|
2551
2569
|
}
|
|
2552
2570
|
),
|
|
2553
2571
|
/* @__PURE__ */ e.jsx("span", { className: n.fieldLabel, children: c("workshopLab.computed.matchedTake") }),
|
|
2554
|
-
/* @__PURE__ */ e.jsxs(
|
|
2572
|
+
/* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
2555
2573
|
/* @__PURE__ */ e.jsx(
|
|
2556
|
-
|
|
2574
|
+
ue.Group,
|
|
2557
2575
|
{
|
|
2558
2576
|
size: "small",
|
|
2559
2577
|
optionType: "button",
|
|
@@ -2566,7 +2584,7 @@ function Ts({
|
|
|
2566
2584
|
}
|
|
2567
2585
|
),
|
|
2568
2586
|
a.field !== void 0 && /* @__PURE__ */ e.jsx(
|
|
2569
|
-
|
|
2587
|
+
O,
|
|
2570
2588
|
{
|
|
2571
2589
|
size: "small",
|
|
2572
2590
|
showSearch: !0,
|
|
@@ -2583,12 +2601,12 @@ function Ts({
|
|
|
2583
2601
|
] })
|
|
2584
2602
|
] });
|
|
2585
2603
|
}
|
|
2586
|
-
function
|
|
2604
|
+
function $s({
|
|
2587
2605
|
field: a,
|
|
2588
2606
|
fields: i,
|
|
2589
2607
|
onChange: t
|
|
2590
2608
|
}) {
|
|
2591
|
-
const { t:
|
|
2609
|
+
const { t: k } = A();
|
|
2592
2610
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2593
2611
|
/* @__PURE__ */ e.jsx(
|
|
2594
2612
|
I,
|
|
@@ -2600,17 +2618,17 @@ function zs({
|
|
|
2600
2618
|
onChange: (p) => t({ ...a, template: p.target.value })
|
|
2601
2619
|
}
|
|
2602
2620
|
),
|
|
2603
|
-
/* @__PURE__ */ e.jsxs(
|
|
2604
|
-
/* @__PURE__ */ e.jsx("span", { className: n.fieldLabel, children:
|
|
2621
|
+
/* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
2622
|
+
/* @__PURE__ */ e.jsx("span", { className: n.fieldLabel, children: k("workshopLab.computed.insertField") }),
|
|
2605
2623
|
/* @__PURE__ */ e.jsx(
|
|
2606
|
-
|
|
2624
|
+
O,
|
|
2607
2625
|
{
|
|
2608
2626
|
size: "small",
|
|
2609
2627
|
showSearch: !0,
|
|
2610
2628
|
optionFilterProp: "label",
|
|
2611
2629
|
className: n.fieldSelect,
|
|
2612
2630
|
value: null,
|
|
2613
|
-
placeholder:
|
|
2631
|
+
placeholder: k("workshopLab.computed.anyFields"),
|
|
2614
2632
|
options: i.map((p) => ({ value: p.name, label: p.label })),
|
|
2615
2633
|
onChange: (p) => t({
|
|
2616
2634
|
...a,
|
|
@@ -2621,12 +2639,12 @@ function zs({
|
|
|
2621
2639
|
] })
|
|
2622
2640
|
] });
|
|
2623
2641
|
}
|
|
2624
|
-
function
|
|
2642
|
+
function Os({
|
|
2625
2643
|
field: a,
|
|
2626
2644
|
fields: i,
|
|
2627
2645
|
onChange: t
|
|
2628
2646
|
}) {
|
|
2629
|
-
const { t:
|
|
2647
|
+
const { t: k } = A(), p = i.filter((s) => s.type === "number"), j = a.expr.trim() ? ca(a.expr) : null, c = j?.ok === !0 ? pa(j.node).filter((s) => !p.some((o) => o.name === s)) : [];
|
|
2630
2648
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2631
2649
|
/* @__PURE__ */ e.jsx(
|
|
2632
2650
|
I.TextArea,
|
|
@@ -2639,54 +2657,54 @@ function $s({
|
|
|
2639
2657
|
onChange: (s) => t({ ...a, expr: s.target.value })
|
|
2640
2658
|
}
|
|
2641
2659
|
),
|
|
2642
|
-
/* @__PURE__ */ e.jsxs(
|
|
2643
|
-
/* @__PURE__ */ e.jsx("span", { className: n.fieldLabel, children:
|
|
2660
|
+
/* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
2661
|
+
/* @__PURE__ */ e.jsx("span", { className: n.fieldLabel, children: k("workshopLab.computed.insertField") }),
|
|
2644
2662
|
/* @__PURE__ */ e.jsx(
|
|
2645
|
-
|
|
2663
|
+
O,
|
|
2646
2664
|
{
|
|
2647
2665
|
size: "small",
|
|
2648
2666
|
showSearch: !0,
|
|
2649
2667
|
optionFilterProp: "label",
|
|
2650
2668
|
className: n.fieldSelect,
|
|
2651
2669
|
value: null,
|
|
2652
|
-
placeholder:
|
|
2670
|
+
placeholder: k("workshopLab.computed.numberFields"),
|
|
2653
2671
|
options: p.map((s) => ({ value: s.name, label: s.label })),
|
|
2654
2672
|
onChange: (s) => t({ ...a, expr: `${a.expr}${a.expr.trim() ? " " : ""}${s}` })
|
|
2655
2673
|
}
|
|
2656
2674
|
)
|
|
2657
2675
|
] }),
|
|
2658
|
-
|
|
2659
|
-
c.length > 0 && /* @__PURE__ */ e.jsx("span", { className: n.error, children:
|
|
2676
|
+
j && !j.ok && /* @__PURE__ */ e.jsx("span", { className: n.error, children: j.error }),
|
|
2677
|
+
c.length > 0 && /* @__PURE__ */ e.jsx("span", { className: n.error, children: k("workshopLab.computed.formulaUnknown", { names: c.join("、") }) })
|
|
2660
2678
|
] });
|
|
2661
2679
|
}
|
|
2662
|
-
function
|
|
2680
|
+
function Fs({
|
|
2663
2681
|
field: a,
|
|
2664
2682
|
source: i,
|
|
2665
2683
|
kn: t,
|
|
2666
|
-
onChange:
|
|
2684
|
+
onChange: k
|
|
2667
2685
|
}) {
|
|
2668
|
-
const { t: p } =
|
|
2686
|
+
const { t: p } = A(), j = me(t, i.objectType, a.path), c = j && j.length > 0 ? j[j.length - 1].to : i.objectType, s = t.objectTypes[c], o = s?.properties ?? [], d = t.relations.filter(
|
|
2669
2687
|
(r) => r.source === c || r.target === c
|
|
2670
|
-
),
|
|
2688
|
+
), m = (r) => t.objectTypes[r]?.name ?? r;
|
|
2671
2689
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2672
|
-
/* @__PURE__ */ e.jsxs(
|
|
2690
|
+
/* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
2673
2691
|
/* @__PURE__ */ e.jsx("span", { children: p("workshopLab.computed.relatedPath") }),
|
|
2674
|
-
/* @__PURE__ */ e.jsx("span", { className: n.mono, children:
|
|
2675
|
-
(
|
|
2692
|
+
/* @__PURE__ */ e.jsx("span", { className: n.mono, children: m(i.objectType) }),
|
|
2693
|
+
(j ?? []).map((r, u) => /* @__PURE__ */ e.jsxs(
|
|
2676
2694
|
J,
|
|
2677
2695
|
{
|
|
2678
|
-
closable: u === (
|
|
2679
|
-
onClose: () =>
|
|
2696
|
+
closable: u === (j?.length ?? 0) - 1,
|
|
2697
|
+
onClose: () => k({ ...a, path: a.path.slice(0, -1), where: void 0 }),
|
|
2680
2698
|
children: [
|
|
2681
2699
|
r.relation.name,
|
|
2682
2700
|
" → ",
|
|
2683
|
-
|
|
2701
|
+
m(r.to)
|
|
2684
2702
|
]
|
|
2685
2703
|
},
|
|
2686
2704
|
u
|
|
2687
2705
|
)),
|
|
2688
2706
|
/* @__PURE__ */ e.jsx(
|
|
2689
|
-
|
|
2707
|
+
O,
|
|
2690
2708
|
{
|
|
2691
2709
|
size: "small",
|
|
2692
2710
|
showSearch: !0,
|
|
@@ -2696,24 +2714,24 @@ function Os({
|
|
|
2696
2714
|
placeholder: p("workshopLab.computed.relatedNext"),
|
|
2697
2715
|
options: d.map((r) => ({
|
|
2698
2716
|
value: r.id,
|
|
2699
|
-
label: `${r.name}(→ ${
|
|
2717
|
+
label: `${r.name}(→ ${m(r.source === c ? r.target : r.source)})`
|
|
2700
2718
|
})),
|
|
2701
|
-
onChange: (r) =>
|
|
2719
|
+
onChange: (r) => k({ ...a, path: [...a.path, r], field: void 0, where: void 0 })
|
|
2702
2720
|
}
|
|
2703
2721
|
)
|
|
2704
2722
|
] }),
|
|
2705
2723
|
a.path.length > 0 && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2706
|
-
/* @__PURE__ */ e.jsxs(
|
|
2724
|
+
/* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
2707
2725
|
/* @__PURE__ */ e.jsx("span", { children: p("workshopLab.computed.relatedHow") }),
|
|
2708
2726
|
/* @__PURE__ */ e.jsx(
|
|
2709
|
-
|
|
2727
|
+
ue.Group,
|
|
2710
2728
|
{
|
|
2711
2729
|
size: "small",
|
|
2712
2730
|
optionType: "button",
|
|
2713
2731
|
value: a.aggregate,
|
|
2714
2732
|
onChange: (r) => {
|
|
2715
|
-
const u = r.target.value, l = o.find((
|
|
2716
|
-
delete
|
|
2733
|
+
const u = r.target.value, l = o.find((f) => f.name === a.field)?.type, w = { ...a, aggregate: u };
|
|
2734
|
+
delete w.type, k({ ...w, ...u === "one" && l ? { type: l } : {} });
|
|
2717
2735
|
},
|
|
2718
2736
|
options: da.map((r) => ({
|
|
2719
2737
|
value: r,
|
|
@@ -2722,7 +2740,7 @@ function Os({
|
|
|
2722
2740
|
}
|
|
2723
2741
|
),
|
|
2724
2742
|
a.aggregate !== "count" && /* @__PURE__ */ e.jsx(
|
|
2725
|
-
|
|
2743
|
+
O,
|
|
2726
2744
|
{
|
|
2727
2745
|
size: "small",
|
|
2728
2746
|
className: n.fieldSelect,
|
|
@@ -2735,7 +2753,7 @@ function Os({
|
|
|
2735
2753
|
).map((r) => ({ value: r.name, label: r.label })),
|
|
2736
2754
|
onChange: (r) => {
|
|
2737
2755
|
const u = o.find((l) => l.name === r)?.type;
|
|
2738
|
-
|
|
2756
|
+
k({
|
|
2739
2757
|
...a,
|
|
2740
2758
|
field: r,
|
|
2741
2759
|
...a.aggregate === "one" && u ? { type: u } : {}
|
|
@@ -2746,27 +2764,27 @@ function Os({
|
|
|
2746
2764
|
] }),
|
|
2747
2765
|
/* @__PURE__ */ e.jsx("span", { className: n.fieldLabel, children: p("workshopLab.computed.relatedOnly", { target: s?.name ?? "" }) }),
|
|
2748
2766
|
/* @__PURE__ */ e.jsx(
|
|
2749
|
-
|
|
2767
|
+
X,
|
|
2750
2768
|
{
|
|
2751
2769
|
literalOnly: !0,
|
|
2752
2770
|
value: a.where,
|
|
2753
2771
|
fields: o,
|
|
2754
|
-
onChange: (r) =>
|
|
2772
|
+
onChange: (r) => k({ ...a, where: r.length > 0 ? r : void 0 })
|
|
2755
2773
|
}
|
|
2756
2774
|
),
|
|
2757
2775
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: p("workshopLab.computed.relatedNote") })
|
|
2758
2776
|
] })
|
|
2759
2777
|
] });
|
|
2760
2778
|
}
|
|
2761
|
-
function
|
|
2779
|
+
function Ps({
|
|
2762
2780
|
field: a,
|
|
2763
2781
|
fields: i,
|
|
2764
2782
|
source: t,
|
|
2765
|
-
onChange:
|
|
2783
|
+
onChange: k
|
|
2766
2784
|
}) {
|
|
2767
|
-
const { t: p } =
|
|
2785
|
+
const { t: p } = A(), j = (c, s) => {
|
|
2768
2786
|
const o = [...a.cases];
|
|
2769
|
-
s === null ? o.splice(c, 1) : o[c] = s,
|
|
2787
|
+
s === null ? o.splice(c, 1) : o[c] = s, k({ ...a, cases: o });
|
|
2770
2788
|
};
|
|
2771
2789
|
return /* @__PURE__ */ e.jsxs("div", { className: n.computedCases, children: [
|
|
2772
2790
|
a.cases.map((c, s) => /* @__PURE__ */ e.jsxs("div", { className: n.computedCase, children: [
|
|
@@ -2776,20 +2794,20 @@ function Fs({
|
|
|
2776
2794
|
Ee,
|
|
2777
2795
|
{
|
|
2778
2796
|
outcome: c,
|
|
2779
|
-
onChange: (o) =>
|
|
2797
|
+
onChange: (o) => j(s, { ...c, ...o })
|
|
2780
2798
|
}
|
|
2781
2799
|
),
|
|
2782
2800
|
/* @__PURE__ */ e.jsx("span", { className: n.spacer }),
|
|
2783
|
-
/* @__PURE__ */ e.jsx($, { size: "small", type: "link", danger: !0, onClick: () =>
|
|
2801
|
+
/* @__PURE__ */ e.jsx($, { size: "small", type: "link", danger: !0, onClick: () => j(s, null), children: p("workshopLab.computed.removeCase") })
|
|
2784
2802
|
] }),
|
|
2785
2803
|
/* @__PURE__ */ e.jsx("span", { className: n.fieldLabel, children: p("workshopLab.computed.when") }),
|
|
2786
2804
|
/* @__PURE__ */ e.jsx(
|
|
2787
|
-
|
|
2805
|
+
X,
|
|
2788
2806
|
{
|
|
2789
2807
|
value: c.when,
|
|
2790
2808
|
fields: i,
|
|
2791
2809
|
source: t,
|
|
2792
|
-
onChange: (o) =>
|
|
2810
|
+
onChange: (o) => j(s, { ...c, when: o })
|
|
2793
2811
|
}
|
|
2794
2812
|
)
|
|
2795
2813
|
] }, s)),
|
|
@@ -2798,7 +2816,7 @@ function Fs({
|
|
|
2798
2816
|
{
|
|
2799
2817
|
size: "small",
|
|
2800
2818
|
type: "dashed",
|
|
2801
|
-
onClick: () =>
|
|
2819
|
+
onClick: () => k({ ...a, cases: [...a.cases, { value: "", when: [] }] }),
|
|
2802
2820
|
children: p("workshopLab.computed.addCase")
|
|
2803
2821
|
}
|
|
2804
2822
|
),
|
|
@@ -2808,7 +2826,7 @@ function Fs({
|
|
|
2808
2826
|
Ee,
|
|
2809
2827
|
{
|
|
2810
2828
|
outcome: a.otherwise,
|
|
2811
|
-
onChange: (c) =>
|
|
2829
|
+
onChange: (c) => k({ ...a, otherwise: c })
|
|
2812
2830
|
}
|
|
2813
2831
|
)
|
|
2814
2832
|
] })
|
|
@@ -2818,45 +2836,45 @@ function Ee({
|
|
|
2818
2836
|
outcome: a,
|
|
2819
2837
|
onChange: i
|
|
2820
2838
|
}) {
|
|
2821
|
-
const { t } =
|
|
2822
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2839
|
+
const { t } = A();
|
|
2840
|
+
return /* @__PURE__ */ e.jsxs(F.Compact, { children: [
|
|
2823
2841
|
/* @__PURE__ */ e.jsx(
|
|
2824
2842
|
I,
|
|
2825
2843
|
{
|
|
2826
2844
|
size: "small",
|
|
2827
2845
|
placeholder: t("workshopLab.computed.valuePlaceholder"),
|
|
2828
2846
|
value: a.value,
|
|
2829
|
-
onChange: (
|
|
2847
|
+
onChange: (k) => i({ ...a, value: k.target.value })
|
|
2830
2848
|
}
|
|
2831
2849
|
),
|
|
2832
2850
|
/* @__PURE__ */ e.jsx(
|
|
2833
|
-
|
|
2851
|
+
O,
|
|
2834
2852
|
{
|
|
2835
2853
|
size: "small",
|
|
2836
2854
|
className: n.toneSelect,
|
|
2837
2855
|
value: a.tone ?? "neutral",
|
|
2838
|
-
options: Ae.map((
|
|
2839
|
-
value:
|
|
2840
|
-
label: t(`workshopLab.computed.tones.${
|
|
2856
|
+
options: Ae.map((k) => ({
|
|
2857
|
+
value: k,
|
|
2858
|
+
label: t(`workshopLab.computed.tones.${k}`)
|
|
2841
2859
|
})),
|
|
2842
|
-
onChange: (
|
|
2860
|
+
onChange: (k) => i({ ...a, tone: k })
|
|
2843
2861
|
}
|
|
2844
2862
|
)
|
|
2845
2863
|
] });
|
|
2846
2864
|
}
|
|
2847
|
-
function
|
|
2865
|
+
function Es({
|
|
2848
2866
|
source: a,
|
|
2849
2867
|
properties: i,
|
|
2850
2868
|
rows: t,
|
|
2851
|
-
usage:
|
|
2869
|
+
usage: k,
|
|
2852
2870
|
onEdit: p,
|
|
2853
|
-
onRemove:
|
|
2871
|
+
onRemove: j
|
|
2854
2872
|
}) {
|
|
2855
|
-
const { t: c } =
|
|
2873
|
+
const { t: c } = A(), s = a.progress;
|
|
2856
2874
|
if (!s) return null;
|
|
2857
|
-
const o = (u) => i.find((l) => l.name === u)?.label ?? u, d = fe(s),
|
|
2875
|
+
const o = (u) => i.find((l) => l.name === u)?.label ?? u, d = fe(s), m = [
|
|
2858
2876
|
...new Map(
|
|
2859
|
-
d.flatMap((u) =>
|
|
2877
|
+
d.flatMap((u) => k.get(u.name) ?? []).map((u) => [u.id, u])
|
|
2860
2878
|
).values()
|
|
2861
2879
|
], r = /* @__PURE__ */ new Map();
|
|
2862
2880
|
for (const u of t ?? []) {
|
|
@@ -2868,15 +2886,15 @@ function Ps({
|
|
|
2868
2886
|
/* @__PURE__ */ e.jsx("b", { children: c("workshopLab.progress.title") }),
|
|
2869
2887
|
/* @__PURE__ */ e.jsx("span", { className: n.spacer }),
|
|
2870
2888
|
/* @__PURE__ */ e.jsx($, { size: "small", type: "link", onClick: p, children: c("workshopLab.computed.edit") }),
|
|
2871
|
-
|
|
2872
|
-
|
|
2889
|
+
m.length > 0 ? /* @__PURE__ */ e.jsx(
|
|
2890
|
+
ge,
|
|
2873
2891
|
{
|
|
2874
2892
|
title: c("workshopLab.computed.removeBlocked", {
|
|
2875
|
-
names:
|
|
2893
|
+
names: m.map((u) => u.label).join("、")
|
|
2876
2894
|
}),
|
|
2877
2895
|
children: /* @__PURE__ */ e.jsx($, { size: "small", type: "link", danger: !0, disabled: !0, children: c("workshopLab.computed.remove") })
|
|
2878
2896
|
}
|
|
2879
|
-
) : /* @__PURE__ */ e.jsx(ee, { title: c("workshopLab.progress.removeConfirm"), onConfirm:
|
|
2897
|
+
) : /* @__PURE__ */ e.jsx(ee, { title: c("workshopLab.progress.removeConfirm"), onConfirm: j, children: /* @__PURE__ */ e.jsx($, { size: "small", type: "link", danger: !0, children: c("workshopLab.computed.remove") }) })
|
|
2880
2898
|
] }),
|
|
2881
2899
|
/* @__PURE__ */ e.jsxs("span", { children: [
|
|
2882
2900
|
s.steps.map(
|
|
@@ -2893,15 +2911,15 @@ function Ps({
|
|
|
2893
2911
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: c("workshopLab.progress.columns", {
|
|
2894
2912
|
names: d.map((u) => `${u.label}(${u.name})`).join("、")
|
|
2895
2913
|
}) }),
|
|
2896
|
-
t ? /* @__PURE__ */ e.jsx("span", { className: n.computedPreview, children: Ie.map((u) => /* @__PURE__ */ e.jsxs(J, { color:
|
|
2914
|
+
t ? /* @__PURE__ */ e.jsx("span", { className: n.computedPreview, children: Ie.map((u) => /* @__PURE__ */ e.jsxs(J, { color: Le(u.tone), children: [
|
|
2897
2915
|
je(u.value),
|
|
2898
2916
|
" ",
|
|
2899
2917
|
r.get(u.value) ?? 0
|
|
2900
2918
|
] }, u.value)) }) : /* @__PURE__ */ e.jsx("span", { className: n.muted, children: c("workshopLab.computed.notLoaded") }),
|
|
2901
|
-
/* @__PURE__ */ e.jsx("span", { className: n.muted, children:
|
|
2919
|
+
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: m.length > 0 ? c("workshopLab.computed.usedBy", { names: m.map((u) => u.label).join("、") }) : c("workshopLab.computed.unused") })
|
|
2902
2920
|
] });
|
|
2903
2921
|
}
|
|
2904
|
-
function
|
|
2922
|
+
function Ms(a) {
|
|
2905
2923
|
return a ? {
|
|
2906
2924
|
steps: a.steps.map((i) => {
|
|
2907
2925
|
const t = i.done?.[0];
|
|
@@ -2923,35 +2941,35 @@ function Es(a) {
|
|
|
2923
2941
|
dueLabel: ""
|
|
2924
2942
|
};
|
|
2925
2943
|
}
|
|
2926
|
-
function
|
|
2944
|
+
function As({
|
|
2927
2945
|
initial: a,
|
|
2928
2946
|
source: i,
|
|
2929
2947
|
asOf: t,
|
|
2930
|
-
properties:
|
|
2948
|
+
properties: k,
|
|
2931
2949
|
rows: p,
|
|
2932
|
-
onCancel:
|
|
2950
|
+
onCancel: j,
|
|
2933
2951
|
onSave: c
|
|
2934
2952
|
}) {
|
|
2935
|
-
const { t: s } =
|
|
2953
|
+
const { t: s } = A(), o = k.filter((L) => L.type === "date"), [d, m] = E.useState(() => Ms(a)), r = (L, N) => m({
|
|
2936
2954
|
...d,
|
|
2937
|
-
steps: d.steps.map((S,
|
|
2938
|
-
}), u = (
|
|
2939
|
-
if (!p || !
|
|
2940
|
-
const
|
|
2955
|
+
steps: d.steps.map((S, y) => y === L ? { ...S, ...N } : S)
|
|
2956
|
+
}), u = (L) => {
|
|
2957
|
+
if (!p || !L) return [];
|
|
2958
|
+
const N = /* @__PURE__ */ new Map();
|
|
2941
2959
|
for (const S of p) {
|
|
2942
|
-
const
|
|
2943
|
-
|
|
2960
|
+
const y = S[L];
|
|
2961
|
+
y != null && y !== "" && N.set(String(y), (N.get(String(y)) ?? 0) + 1);
|
|
2944
2962
|
}
|
|
2945
|
-
return [...
|
|
2963
|
+
return [...N].sort((S, y) => y[1] - S[1]);
|
|
2946
2964
|
}, l = d.steps.every(
|
|
2947
|
-
(
|
|
2948
|
-
),
|
|
2949
|
-
steps: d.steps.map((
|
|
2950
|
-
label:
|
|
2951
|
-
...
|
|
2952
|
-
...
|
|
2965
|
+
(L) => L.label.trim() !== "" && (L.by === "date" ? !!L.field : !!(L.doneField && L.doneValue))
|
|
2966
|
+
), w = () => ({
|
|
2967
|
+
steps: d.steps.map((L) => ({
|
|
2968
|
+
label: L.label.trim(),
|
|
2969
|
+
...L.field ? { field: L.field } : {},
|
|
2970
|
+
...L.by === "field" && L.doneField ? {
|
|
2953
2971
|
done: [
|
|
2954
|
-
{ field:
|
|
2972
|
+
{ field: L.doneField, op: "eq", value: L.doneValue ?? "" }
|
|
2955
2973
|
]
|
|
2956
2974
|
} : {}
|
|
2957
2975
|
})),
|
|
@@ -2961,11 +2979,11 @@ function Ms({
|
|
|
2961
2979
|
...d.dueLabel.trim() ? { label: d.dueLabel.trim() } : {}
|
|
2962
2980
|
}
|
|
2963
2981
|
} : {}
|
|
2964
|
-
}),
|
|
2965
|
-
() => p &&
|
|
2982
|
+
}), f = o.map((L) => ({ value: L.name, label: L.label })), h = l && d.steps.length > 0 ? w() : void 0, C = E.useMemo(
|
|
2983
|
+
() => p && h ? he(p, { ...i, progress: h }, t) : null,
|
|
2966
2984
|
// The draft is rebuilt each render; its JSON says when it really changed.
|
|
2967
2985
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2968
|
-
[p, i, t, JSON.stringify(
|
|
2986
|
+
[p, i, t, JSON.stringify(h)]
|
|
2969
2987
|
);
|
|
2970
2988
|
return /* @__PURE__ */ e.jsx(
|
|
2971
2989
|
ae,
|
|
@@ -2975,35 +2993,35 @@ function Ms({
|
|
|
2975
2993
|
title: s("workshopLab.progress.dialogTitle"),
|
|
2976
2994
|
okText: s("workshopLab.computed.save"),
|
|
2977
2995
|
okButtonProps: { disabled: !l || d.steps.length === 0 },
|
|
2978
|
-
onOk: () => c(
|
|
2979
|
-
onCancel:
|
|
2996
|
+
onOk: () => c(w()),
|
|
2997
|
+
onCancel: j,
|
|
2980
2998
|
children: /* @__PURE__ */ e.jsxs("div", { className: n.computedForm, children: [
|
|
2981
2999
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: s("workshopLab.progress.dialogHint") }),
|
|
2982
3000
|
/* @__PURE__ */ e.jsx("b", { children: s("workshopLab.progress.stepsTitle") }),
|
|
2983
3001
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: s("workshopLab.progress.stepDateHint") }),
|
|
2984
|
-
d.steps.map((
|
|
2985
|
-
/* @__PURE__ */ e.jsxs(
|
|
2986
|
-
/* @__PURE__ */ e.jsx("span", { children: s("workshopLab.progress.stepN", { n:
|
|
3002
|
+
d.steps.map((L, N) => /* @__PURE__ */ e.jsxs("div", { className: n.computedCase, children: [
|
|
3003
|
+
/* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
3004
|
+
/* @__PURE__ */ e.jsx("span", { children: s("workshopLab.progress.stepN", { n: N + 1 }) }),
|
|
2987
3005
|
/* @__PURE__ */ e.jsx(
|
|
2988
3006
|
I,
|
|
2989
3007
|
{
|
|
2990
3008
|
size: "small",
|
|
2991
3009
|
className: n.fieldSelect,
|
|
2992
3010
|
placeholder: s("workshopLab.progress.stepLabel"),
|
|
2993
|
-
value:
|
|
2994
|
-
onChange: (S) => r(
|
|
3011
|
+
value: L.label,
|
|
3012
|
+
onChange: (S) => r(N, { label: S.target.value })
|
|
2995
3013
|
}
|
|
2996
3014
|
),
|
|
2997
3015
|
/* @__PURE__ */ e.jsx("span", { children: s("workshopLab.progress.stepDate") }),
|
|
2998
3016
|
/* @__PURE__ */ e.jsx(
|
|
2999
|
-
|
|
3017
|
+
O,
|
|
3000
3018
|
{
|
|
3001
3019
|
size: "small",
|
|
3002
3020
|
className: n.fieldSelect,
|
|
3003
|
-
allowClear:
|
|
3004
|
-
value:
|
|
3005
|
-
options:
|
|
3006
|
-
onChange: (S) => r(
|
|
3021
|
+
allowClear: L.by === "field",
|
|
3022
|
+
value: L.field,
|
|
3023
|
+
options: f,
|
|
3024
|
+
onChange: (S) => r(N, { field: S })
|
|
3007
3025
|
}
|
|
3008
3026
|
),
|
|
3009
3027
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3013,34 +3031,34 @@ function Ms({
|
|
|
3013
3031
|
type: "link",
|
|
3014
3032
|
danger: !0,
|
|
3015
3033
|
disabled: d.steps.length <= 1,
|
|
3016
|
-
onClick: () =>
|
|
3034
|
+
onClick: () => m({ ...d, steps: d.steps.filter((S, y) => y !== N) }),
|
|
3017
3035
|
children: s("workshopLab.computed.removeCase")
|
|
3018
3036
|
}
|
|
3019
3037
|
)
|
|
3020
3038
|
] }),
|
|
3021
|
-
/* @__PURE__ */ e.jsxs(
|
|
3039
|
+
/* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
3022
3040
|
/* @__PURE__ */ e.jsx("span", { children: s("workshopLab.progress.doneBy") }),
|
|
3023
3041
|
/* @__PURE__ */ e.jsx(
|
|
3024
|
-
|
|
3042
|
+
ue.Group,
|
|
3025
3043
|
{
|
|
3026
3044
|
size: "small",
|
|
3027
|
-
value:
|
|
3028
|
-
onChange: (S) => r(
|
|
3045
|
+
value: L.by,
|
|
3046
|
+
onChange: (S) => r(N, { by: S.target.value }),
|
|
3029
3047
|
options: [
|
|
3030
3048
|
{ value: "date", label: s("workshopLab.progress.doneByDate") },
|
|
3031
3049
|
{ value: "field", label: s("workshopLab.progress.doneByField") }
|
|
3032
3050
|
]
|
|
3033
3051
|
}
|
|
3034
3052
|
),
|
|
3035
|
-
|
|
3053
|
+
L.by === "field" && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3036
3054
|
/* @__PURE__ */ e.jsx(
|
|
3037
|
-
|
|
3055
|
+
O,
|
|
3038
3056
|
{
|
|
3039
3057
|
size: "small",
|
|
3040
3058
|
className: n.fieldSelect,
|
|
3041
|
-
value:
|
|
3042
|
-
options:
|
|
3043
|
-
onChange: (S) => r(
|
|
3059
|
+
value: L.doneField,
|
|
3060
|
+
options: k.filter((S) => S.type !== "date").map((S) => ({ value: S.name, label: S.label })),
|
|
3061
|
+
onChange: (S) => r(N, { doneField: S, doneValue: void 0 })
|
|
3044
3062
|
}
|
|
3045
3063
|
),
|
|
3046
3064
|
/* @__PURE__ */ e.jsx("span", { children: s("workshopLab.computed.ops.eq") }),
|
|
@@ -3049,40 +3067,40 @@ function Ms({
|
|
|
3049
3067
|
{
|
|
3050
3068
|
size: "small",
|
|
3051
3069
|
className: n.fieldSelect,
|
|
3052
|
-
value:
|
|
3053
|
-
options: u(
|
|
3070
|
+
value: L.doneValue,
|
|
3071
|
+
options: u(L.doneField).map(([S, y]) => ({
|
|
3054
3072
|
value: S,
|
|
3055
|
-
label: `${S}(${
|
|
3073
|
+
label: `${S}(${y})`
|
|
3056
3074
|
})),
|
|
3057
|
-
filterOption: (S,
|
|
3058
|
-
onChange: (S) => r(
|
|
3075
|
+
filterOption: (S, y) => String(y?.value ?? "").includes(S),
|
|
3076
|
+
onChange: (S) => r(N, { doneValue: S })
|
|
3059
3077
|
}
|
|
3060
3078
|
)
|
|
3061
3079
|
] })
|
|
3062
3080
|
] })
|
|
3063
|
-
] },
|
|
3081
|
+
] }, N)),
|
|
3064
3082
|
/* @__PURE__ */ e.jsx(
|
|
3065
3083
|
$,
|
|
3066
3084
|
{
|
|
3067
3085
|
size: "small",
|
|
3068
|
-
disabled: d.steps.length >=
|
|
3069
|
-
onClick: () =>
|
|
3086
|
+
disabled: d.steps.length >= Wa,
|
|
3087
|
+
onClick: () => m({ ...d, steps: [...d.steps, { label: "", by: "date" }] }),
|
|
3070
3088
|
children: s("workshopLab.progress.addStep")
|
|
3071
3089
|
}
|
|
3072
3090
|
),
|
|
3073
3091
|
/* @__PURE__ */ e.jsx("b", { children: s("workshopLab.progress.dueTitle") }),
|
|
3074
3092
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: s("workshopLab.progress.dueHint") }),
|
|
3075
|
-
/* @__PURE__ */ e.jsxs(
|
|
3093
|
+
/* @__PURE__ */ e.jsxs(F, { wrap: !0, children: [
|
|
3076
3094
|
/* @__PURE__ */ e.jsx(
|
|
3077
|
-
|
|
3095
|
+
O,
|
|
3078
3096
|
{
|
|
3079
3097
|
size: "small",
|
|
3080
3098
|
allowClear: !0,
|
|
3081
3099
|
className: n.fieldSelect,
|
|
3082
3100
|
placeholder: s("workshopLab.progress.noDue"),
|
|
3083
3101
|
value: d.due,
|
|
3084
|
-
options:
|
|
3085
|
-
onChange: (
|
|
3102
|
+
options: f,
|
|
3103
|
+
onChange: (L) => m({ ...d, due: L })
|
|
3086
3104
|
}
|
|
3087
3105
|
),
|
|
3088
3106
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3092,19 +3110,19 @@ function Ms({
|
|
|
3092
3110
|
className: n.fieldSelect,
|
|
3093
3111
|
placeholder: s("workshopLab.progress.dueLabel"),
|
|
3094
3112
|
value: d.dueLabel,
|
|
3095
|
-
onChange: (
|
|
3113
|
+
onChange: (L) => m({ ...d, dueLabel: L.target.value })
|
|
3096
3114
|
}
|
|
3097
3115
|
)
|
|
3098
3116
|
] }),
|
|
3099
|
-
d.due && d.steps.some((
|
|
3117
|
+
d.due && d.steps.some((L) => L.by === "date" && L.field === d.due) && /* @__PURE__ */ e.jsx(re, { type: "warning", showIcon: !0, message: s("workshopLab.progress.sameAsDue") }),
|
|
3100
3118
|
/* @__PURE__ */ e.jsx("span", { className: n.muted, children: s("workshopLab.progress.makes") }),
|
|
3101
3119
|
/* @__PURE__ */ e.jsx(
|
|
3102
|
-
|
|
3120
|
+
Qe,
|
|
3103
3121
|
{
|
|
3104
|
-
rows:
|
|
3122
|
+
rows: C,
|
|
3105
3123
|
loaded: p !== null,
|
|
3106
|
-
progress:
|
|
3107
|
-
properties:
|
|
3124
|
+
progress: h,
|
|
3125
|
+
properties: k,
|
|
3108
3126
|
asOf: t
|
|
3109
3127
|
}
|
|
3110
3128
|
)
|
|
@@ -3112,52 +3130,52 @@ function Ms({
|
|
|
3112
3130
|
}
|
|
3113
3131
|
);
|
|
3114
3132
|
}
|
|
3115
|
-
const
|
|
3133
|
+
const _s = [
|
|
3116
3134
|
de.overdue.value,
|
|
3117
3135
|
de.active.value,
|
|
3118
3136
|
de.done.value
|
|
3119
|
-
],
|
|
3120
|
-
function
|
|
3137
|
+
], Is = 6;
|
|
3138
|
+
function Qe({
|
|
3121
3139
|
rows: a,
|
|
3122
3140
|
loaded: i,
|
|
3123
3141
|
progress: t,
|
|
3124
|
-
properties:
|
|
3142
|
+
properties: k,
|
|
3125
3143
|
asOf: p
|
|
3126
3144
|
}) {
|
|
3127
|
-
const { t:
|
|
3128
|
-
if (!i) return /* @__PURE__ */ e.jsx("span", { className: n.muted, children:
|
|
3145
|
+
const { t: j } = A(), [c, s] = E.useState(), o = (m) => k.find((r) => r.name === m)?.label ?? m, d = (() => {
|
|
3146
|
+
if (!i) return /* @__PURE__ */ e.jsx("span", { className: n.muted, children: j("workshopLab.computed.notLoaded") });
|
|
3129
3147
|
if (!t || !a)
|
|
3130
|
-
return /* @__PURE__ */ e.jsx("span", { className: n.muted, children:
|
|
3131
|
-
const
|
|
3132
|
-
for (const
|
|
3133
|
-
const
|
|
3134
|
-
|
|
3148
|
+
return /* @__PURE__ */ e.jsx("span", { className: n.muted, children: j("workshopLab.progress.previewIncomplete") });
|
|
3149
|
+
const m = /* @__PURE__ */ new Map();
|
|
3150
|
+
for (const w of a) {
|
|
3151
|
+
const f = String(w[le] ?? "");
|
|
3152
|
+
m.set(f, (m.get(f) ?? 0) + 1);
|
|
3135
3153
|
}
|
|
3136
|
-
const r = c ? a.filter((
|
|
3137
|
-
(
|
|
3154
|
+
const r = c ? a.filter((w) => w[le] === c).slice(0, Is) : _s.flatMap(
|
|
3155
|
+
(w) => a.filter((f) => f[le] === w).slice(0, 2)
|
|
3138
3156
|
), u = [
|
|
3139
3157
|
.../* @__PURE__ */ new Set([
|
|
3140
|
-
...t.steps.flatMap((
|
|
3158
|
+
...t.steps.flatMap((w) => w.field ? [w.field] : []),
|
|
3141
3159
|
...t.due ? [t.due.field] : []
|
|
3142
3160
|
])
|
|
3143
|
-
], l = (
|
|
3161
|
+
], l = (w) => w == null || w === "";
|
|
3144
3162
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3145
|
-
/* @__PURE__ */ e.jsx("span", { className: n.computedPreview, children: Ie.map((
|
|
3163
|
+
/* @__PURE__ */ e.jsx("span", { className: n.computedPreview, children: Ie.map((w) => /* @__PURE__ */ e.jsxs(
|
|
3146
3164
|
J,
|
|
3147
3165
|
{
|
|
3148
|
-
color:
|
|
3166
|
+
color: Le(w.tone),
|
|
3149
3167
|
className: n.previewTag,
|
|
3150
|
-
"data-dim": c !== void 0 && c !==
|
|
3151
|
-
onClick: () => s(c ===
|
|
3168
|
+
"data-dim": c !== void 0 && c !== w.value || void 0,
|
|
3169
|
+
onClick: () => s(c === w.value ? void 0 : w.value),
|
|
3152
3170
|
children: [
|
|
3153
|
-
je(
|
|
3171
|
+
je(w.value),
|
|
3154
3172
|
" ",
|
|
3155
|
-
|
|
3173
|
+
m.get(w.value) ?? 0
|
|
3156
3174
|
]
|
|
3157
3175
|
},
|
|
3158
|
-
|
|
3176
|
+
w.value
|
|
3159
3177
|
)) }),
|
|
3160
|
-
t.due && (
|
|
3178
|
+
t.due && (m.get(de.overdue.value) ?? 0) === 0 && /* @__PURE__ */ e.jsx("span", { className: n.muted, children: j("workshopLab.progress.previewNoOverdue") }),
|
|
3161
3179
|
/* @__PURE__ */ e.jsx(
|
|
3162
3180
|
De,
|
|
3163
3181
|
{
|
|
@@ -3167,31 +3185,31 @@ function Ye({
|
|
|
3167
3185
|
scroll: { x: "max-content" },
|
|
3168
3186
|
dataSource: r,
|
|
3169
3187
|
columns: [
|
|
3170
|
-
{ key: "$key", title:
|
|
3171
|
-
...u.map((
|
|
3172
|
-
key:
|
|
3173
|
-
title:
|
|
3174
|
-
dataIndex:
|
|
3175
|
-
render: (
|
|
3188
|
+
{ key: "$key", title: j("workshopLab.computed.object"), dataIndex: "$key" },
|
|
3189
|
+
...u.map((w) => ({
|
|
3190
|
+
key: w,
|
|
3191
|
+
title: w === t.due?.field ? j("workshopLab.progress.previewDue", { label: o(w) }) : o(w),
|
|
3192
|
+
dataIndex: w,
|
|
3193
|
+
render: (f) => l(f) ? "—" : String(f).slice(0, 10)
|
|
3176
3194
|
})),
|
|
3177
3195
|
{
|
|
3178
3196
|
key: q.stage,
|
|
3179
|
-
title:
|
|
3197
|
+
title: j("workshopLab.progress.previewStage"),
|
|
3180
3198
|
dataIndex: q.stage,
|
|
3181
|
-
render: (
|
|
3199
|
+
render: (w) => l(w) ? "—" : String(w)
|
|
3182
3200
|
},
|
|
3183
3201
|
{
|
|
3184
3202
|
key: le,
|
|
3185
|
-
title:
|
|
3203
|
+
title: j("workshopLab.progress.title"),
|
|
3186
3204
|
dataIndex: le,
|
|
3187
|
-
render: (
|
|
3205
|
+
render: (w) => je(String(w ?? ""))
|
|
3188
3206
|
},
|
|
3189
3207
|
...t.due ? [
|
|
3190
3208
|
{
|
|
3191
3209
|
key: q.overdueDays,
|
|
3192
|
-
title:
|
|
3210
|
+
title: j("workshopLab.progress.previewOverdue"),
|
|
3193
3211
|
dataIndex: q.overdueDays,
|
|
3194
|
-
render: (
|
|
3212
|
+
render: (w) => l(w) || w === 0 ? "—" : String(w)
|
|
3195
3213
|
}
|
|
3196
3214
|
] : []
|
|
3197
3215
|
]
|
|
@@ -3199,23 +3217,24 @@ function Ye({
|
|
|
3199
3217
|
)
|
|
3200
3218
|
] });
|
|
3201
3219
|
})();
|
|
3202
|
-
return /* @__PURE__ */ e.jsxs("div", { className: n.computedPreviewBox, "aria-label":
|
|
3203
|
-
/* @__PURE__ */ e.jsx("b", { children:
|
|
3220
|
+
return /* @__PURE__ */ e.jsxs("div", { className: n.computedPreviewBox, "aria-label": j("workshopLab.progress.previewTitle"), children: [
|
|
3221
|
+
/* @__PURE__ */ e.jsx("b", { children: j("workshopLab.progress.previewTitle", { date: p }) }),
|
|
3204
3222
|
d
|
|
3205
3223
|
] });
|
|
3206
3224
|
}
|
|
3207
|
-
const le = q.status,
|
|
3225
|
+
const le = q.status, Vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3208
3226
|
__proto__: null,
|
|
3209
|
-
ComputedView:
|
|
3227
|
+
ComputedView: js,
|
|
3210
3228
|
EditColumnDialog: vs,
|
|
3211
|
-
NewColumnDialog:
|
|
3212
|
-
ProgressPreview:
|
|
3229
|
+
NewColumnDialog: Ls,
|
|
3230
|
+
ProgressPreview: Qe,
|
|
3213
3231
|
columnName: Je
|
|
3214
3232
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3215
3233
|
export {
|
|
3216
|
-
|
|
3234
|
+
js as C,
|
|
3217
3235
|
$e as G,
|
|
3218
|
-
|
|
3236
|
+
as as M,
|
|
3237
|
+
Vs as a,
|
|
3219
3238
|
Ue as c,
|
|
3220
|
-
|
|
3239
|
+
ls as s
|
|
3221
3240
|
};
|