@w6w/ui 0.2.58 → 0.2.60
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/CHANGELOG.md +16 -0
- package/dist/AddConnectionModal.d.ts +6 -0
- package/dist/StepBuilderModal.d.ts +24 -4
- package/dist/WorkflowConnections.d.ts +7 -1
- package/dist/canvas-context-menu.d.ts +8 -3
- package/dist/components/AuthFieldsForm.d.ts +6 -0
- package/dist/components/Combobox.d.ts +9 -1
- package/dist/components/CredentialPicker.d.ts +1 -1
- package/dist/connection-app-meta-BXCIgekK.cjs +24 -0
- package/dist/connection-app-meta-BXCIgekK.cjs.map +1 -0
- package/dist/{connection-app-meta-D5hNbJB5.js → connection-app-meta-CEkQSIlc.js} +5743 -5051
- package/dist/connection-app-meta-CEkQSIlc.js.map +1 -0
- package/dist/flow.cjs +5 -5
- package/dist/flow.cjs.map +1 -1
- package/dist/flow.mjs +1953 -2192
- package/dist/flow.mjs.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +297 -289
- package/dist/index.mjs.map +1 -1
- package/dist/provider.d.ts +12 -0
- package/dist/step-settings-controls.d.ts +20 -0
- package/dist/types.d.ts +5 -0
- package/package.json +2 -2
- package/src/styles/_callable-list.scss +5 -4
- package/src/styles/_connections.scss +101 -0
- package/src/styles/_empty-state.scss +16 -0
- package/src/styles/_execution-log.scss +16 -0
- package/src/styles/_step-builder.scss +22 -0
- package/src/styles.css +182 -4
- package/dist/connection-app-meta-CKTmUX08.cjs +0 -24
- package/dist/connection-app-meta-CKTmUX08.cjs.map +0 -1
- package/dist/connection-app-meta-D5hNbJB5.js.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
var Cn = Object.defineProperty;
|
|
3
3
|
var Sn = (e, n, a) => n in e ? Cn(e, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[n] = a;
|
|
4
4
|
var Ne = (e, n, a) => Sn(e, typeof n != "symbol" ? n + "" : n, a);
|
|
5
|
-
import { u as jt,
|
|
6
|
-
import {
|
|
7
|
-
import { jsx as t, jsxs as i, Fragment as
|
|
5
|
+
import { u as jt, bp as $n, J as oe, bH as Tn, aP as Ye, bT as kt, aO as $e, aJ as An, V as En, bU as Rn, aE as de, M as _n, bV as On, bW as In, a_ as Oe, bX as Te, bM as Pn, bY as ue, bZ as Ln, b_ as Be, b$ as Mn, c0 as Dn, c1 as Un } from "./connection-app-meta-CEkQSIlc.js";
|
|
6
|
+
import { bK as sl, bF as ll, aH as il, c2 as rl, c3 as ol, c4 as cl, c5 as dl, aD as ul, c6 as wl, c7 as ml, b5 as hl, bO as pl, br as fl, b6 as gl, c8 as yl, c9 as vl, aK as Nl, ca as bl, cb as kl, cc as xl, cd as Cl, ce as Sl, cf as $l, cg as Tl, ch as Al, ao as El, ci as Rl, cj as _l, ck as Ol, cl as Il, cm as Pl, cn as Ll, b4 as Ml, co as Dl, P as Ul, cp as Fl, cq as Bl, cr as Kl, cs as jl, ct as Jl, a as Wl, b3 as Vl } from "./connection-app-meta-CEkQSIlc.js";
|
|
7
|
+
import { jsx as t, jsxs as i, Fragment as R } from "react/jsx-runtime";
|
|
8
8
|
import { useMemo as Ge, useState as k, useEffect as G, useId as Fn, useRef as Jt } from "react";
|
|
9
|
-
import { u as Bn, b as Kn, c as jn, a as tt, I as Xe, C as
|
|
9
|
+
import { u as Bn, b as Kn, c as jn, a as tt, I as Xe, C as Ae } from "./CodeBlock-CPKXSNEs.js";
|
|
10
10
|
import { i as Hl } from "./CodeBlock-CPKXSNEs.js";
|
|
11
11
|
import { yaml as Jn } from "@codemirror/lang-yaml";
|
|
12
12
|
import { EditorView as Wn } from "@codemirror/view";
|
|
@@ -40,17 +40,17 @@ function ms(e) {
|
|
|
40
40
|
`Could not reach the w6w server (${(c == null ? void 0 : c.method) ?? "GET"} ${n}${l}). It may be down or unreachable. (${w.message})`
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
|
-
const
|
|
43
|
+
const g = await f.text();
|
|
44
44
|
let v = null;
|
|
45
|
-
if (
|
|
45
|
+
if (g)
|
|
46
46
|
try {
|
|
47
|
-
v = JSON.parse(
|
|
47
|
+
v = JSON.parse(g);
|
|
48
48
|
} catch {
|
|
49
49
|
if (!f.ok)
|
|
50
50
|
throw new be(
|
|
51
51
|
f.status,
|
|
52
52
|
"bad_response",
|
|
53
|
-
`Server returned a non-JSON ${f.status} response: ${
|
|
53
|
+
`Server returned a non-JSON ${f.status} response: ${g.slice(0, 200)}`
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
56
|
if (!f.ok) {
|
|
@@ -96,7 +96,7 @@ function ms(e) {
|
|
|
96
96
|
listAppsByIds: async (l) => {
|
|
97
97
|
const c = Array.from(new Set(l)), d = [];
|
|
98
98
|
for (let u = 0; u < c.length; u += 100) {
|
|
99
|
-
const
|
|
99
|
+
const g = c.slice(u, u + 100).map(encodeURIComponent).join(","), v = await o(`/apps?ids=${g}`);
|
|
100
100
|
d.push(...v.apps);
|
|
101
101
|
}
|
|
102
102
|
return d;
|
|
@@ -255,7 +255,7 @@ function Ze({
|
|
|
255
255
|
href: l,
|
|
256
256
|
ariaLabel: c
|
|
257
257
|
}) {
|
|
258
|
-
const d = /* @__PURE__ */ i(
|
|
258
|
+
const d = /* @__PURE__ */ i(R, { children: [
|
|
259
259
|
a != null && /* @__PURE__ */ t("span", { className: "w6w-list-item-icon", children: a }),
|
|
260
260
|
/* @__PURE__ */ i("span", { className: "w6w-list-item-body", children: [
|
|
261
261
|
/* @__PURE__ */ t("span", { className: "w6w-list-item-title", children: e }),
|
|
@@ -367,12 +367,12 @@ function hs({
|
|
|
367
367
|
embedded: f = !1
|
|
368
368
|
}) {
|
|
369
369
|
var Nt;
|
|
370
|
-
const
|
|
370
|
+
const g = jt(), v = Ge(() => {
|
|
371
371
|
const p = [...n];
|
|
372
372
|
return p.sort((A, F) => (A.title || A.key).localeCompare(F.title || F.key)), p;
|
|
373
|
-
}, [n]), [w, h] = k((s == null ? void 0 : s.key) ?? ""), y = s ?? n.find((p) => p.key === w) ?? null, [
|
|
373
|
+
}, [n]), [w, h] = k((s == null ? void 0 : s.key) ?? ""), y = s ?? n.find((p) => p.key === w) ?? null, [m, S] = k(!1), [x, N] = k(null), [T, C] = k(void 0), [E, P] = k([]), K = je(), O = je(), $ = je(), [I, V] = k(""), [q, Z] = k(""), J = K.invalid || O.invalid || $.invalid, W = () => {
|
|
374
374
|
const p = {};
|
|
375
|
-
return K.text.trim() !== "" && K.value !== void 0 && (p.body = K.value), O.text.trim() !== "" && O.value !== void 0 && (p.query = O.value),
|
|
375
|
+
return K.text.trim() !== "" && K.value !== void 0 && (p.body = K.value), O.text.trim() !== "" && O.value !== void 0 && (p.query = O.value), $.text.trim() !== "" && $.value !== void 0 && (p.headers = $.value), I && (p.target = I), q.trim() !== "" && (p.match = q.trim()), Object.keys(p).length > 0 ? p : void 0;
|
|
376
376
|
}, [j, Q] = k("form"), [Ie, ae] = k(""), [Pe, ee] = k(!1), [b, L] = k(!1), _ = (y == null ? void 0 : y.key) ?? null, D = r ? { ...r } : xt(y), [se, M] = k(() => ({
|
|
377
377
|
key: _,
|
|
378
378
|
values: D
|
|
@@ -403,11 +403,11 @@ function hs({
|
|
|
403
403
|
}, dn = async (p) => {
|
|
404
404
|
if (!y || J) return;
|
|
405
405
|
const A = y.key;
|
|
406
|
-
|
|
406
|
+
S(!0), N(null), C(void 0), P([]);
|
|
407
407
|
let F;
|
|
408
408
|
const ne = W();
|
|
409
409
|
try {
|
|
410
|
-
const z = await
|
|
410
|
+
const z = await g.invokeAction(e, A, p, {
|
|
411
411
|
connectionId: a,
|
|
412
412
|
...ne ? { overrides: ne } : {}
|
|
413
413
|
});
|
|
@@ -416,11 +416,11 @@ function hs({
|
|
|
416
416
|
const bt = Hn(z);
|
|
417
417
|
N(bt), P(zn(z)), F = { ok: !1, summary: bt.headline };
|
|
418
418
|
} finally {
|
|
419
|
-
|
|
419
|
+
S(!1);
|
|
420
420
|
}
|
|
421
421
|
if (a)
|
|
422
422
|
try {
|
|
423
|
-
await
|
|
423
|
+
await g.recordTestRun(a, {
|
|
424
424
|
savedTestId: U ?? null,
|
|
425
425
|
actionKey: A,
|
|
426
426
|
ok: F.ok,
|
|
@@ -436,13 +436,13 @@ function hs({
|
|
|
436
436
|
return;
|
|
437
437
|
}
|
|
438
438
|
let p = !1;
|
|
439
|
-
return ie(null),
|
|
439
|
+
return ie(null), g.listSavedTests(a).then((A) => !p && mt(A)).catch((A) => !p && ie(A.message)), () => {
|
|
440
440
|
p = !0;
|
|
441
441
|
};
|
|
442
|
-
}, [
|
|
442
|
+
}, [g, a, wn]);
|
|
443
443
|
const ht = _ ? (fe ?? []).filter((p) => p.actionKey === _) : [], [fn, Fe] = k(null), [gn, yn] = k(0), vn = () => yn((p) => p + 1);
|
|
444
444
|
G(() => {
|
|
445
|
-
const p =
|
|
445
|
+
const p = g.listTestRuns;
|
|
446
446
|
if (!a || !p) {
|
|
447
447
|
Fe(null);
|
|
448
448
|
return;
|
|
@@ -451,7 +451,7 @@ function hs({
|
|
|
451
451
|
return p(a).then((F) => !A && Fe(F)).catch(() => !A && Fe(null)), () => {
|
|
452
452
|
A = !0;
|
|
453
453
|
};
|
|
454
|
-
}, [
|
|
454
|
+
}, [g, a, gn]);
|
|
455
455
|
const pt = _ ? (fn ?? []).filter((p) => p.actionKey === _).slice().sort((p, A) => Date.parse(A.occurredAt) - Date.parse(p.occurredAt)) : [], Nn = () => {
|
|
456
456
|
!a || !y || (Me(""), ie(null), ye(!0));
|
|
457
457
|
}, bn = () => {
|
|
@@ -461,11 +461,11 @@ function hs({
|
|
|
461
461
|
try {
|
|
462
462
|
let p;
|
|
463
463
|
if (U)
|
|
464
|
-
p = await
|
|
464
|
+
p = await g.updateSavedTest(a, U, { values: H });
|
|
465
465
|
else {
|
|
466
466
|
const A = Le.trim();
|
|
467
467
|
if (!A) return;
|
|
468
|
-
p = await
|
|
468
|
+
p = await g.createSavedTest(a, {
|
|
469
469
|
actionKey: y.key,
|
|
470
470
|
name: A,
|
|
471
471
|
values: H
|
|
@@ -482,7 +482,7 @@ function hs({
|
|
|
482
482
|
if (!a || !U) return;
|
|
483
483
|
const p = U;
|
|
484
484
|
try {
|
|
485
|
-
await
|
|
485
|
+
await g.deleteSavedTest(a, p), le(null), Ue(), o == null || o(), u == null || u(p);
|
|
486
486
|
} catch (A) {
|
|
487
487
|
ie(A.message);
|
|
488
488
|
}
|
|
@@ -539,7 +539,7 @@ function hs({
|
|
|
539
539
|
onChange: ut,
|
|
540
540
|
dynamic: y ? { appId: e, actionKey: y.key, connectionId: a } : void 0
|
|
541
541
|
}
|
|
542
|
-
) : /* @__PURE__ */ i(
|
|
542
|
+
) : /* @__PURE__ */ i(R, { children: [
|
|
543
543
|
/* @__PURE__ */ t(
|
|
544
544
|
oe,
|
|
545
545
|
{
|
|
@@ -592,13 +592,13 @@ function hs({
|
|
|
592
592
|
/* @__PURE__ */ t(
|
|
593
593
|
oe,
|
|
594
594
|
{
|
|
595
|
-
value:
|
|
596
|
-
onChange:
|
|
595
|
+
value: $.text,
|
|
596
|
+
onChange: $.onChange,
|
|
597
597
|
minHeight: "80px",
|
|
598
598
|
"aria-label": "Overrides headers (JSON)"
|
|
599
599
|
}
|
|
600
600
|
),
|
|
601
|
-
|
|
601
|
+
$.invalid && /* @__PURE__ */ t("span", { className: "w6w-hint", style: { color: "var(--w6w-danger)" }, children: "Invalid JSON" })
|
|
602
602
|
] }),
|
|
603
603
|
/* @__PURE__ */ i("label", { className: "w6w-field", children: [
|
|
604
604
|
/* @__PURE__ */ t("span", { children: "Target" }),
|
|
@@ -669,7 +669,7 @@ function hs({
|
|
|
669
669
|
) }, p.id))
|
|
670
670
|
}
|
|
671
671
|
),
|
|
672
|
-
|
|
672
|
+
g.listTestRuns && pt.length > 0 && /* @__PURE__ */ i(R, { children: [
|
|
673
673
|
/* @__PURE__ */ t(
|
|
674
674
|
"div",
|
|
675
675
|
{
|
|
@@ -723,7 +723,7 @@ function hs({
|
|
|
723
723
|
)
|
|
724
724
|
] })
|
|
725
725
|
)),
|
|
726
|
-
y ? /* @__PURE__ */ i(
|
|
726
|
+
y ? /* @__PURE__ */ i(R, { children: [
|
|
727
727
|
/* @__PURE__ */ i("div", { children: [
|
|
728
728
|
/* @__PURE__ */ i("strong", { children: [
|
|
729
729
|
y.title ?? y.key,
|
|
@@ -756,7 +756,7 @@ function hs({
|
|
|
756
756
|
yt,
|
|
757
757
|
p,
|
|
758
758
|
A,
|
|
759
|
-
/* @__PURE__ */ t(kt, { calls:
|
|
759
|
+
/* @__PURE__ */ t(kt, { calls: E })
|
|
760
760
|
] }), ne = /* @__PURE__ */ i(
|
|
761
761
|
"div",
|
|
762
762
|
{
|
|
@@ -768,9 +768,9 @@ function hs({
|
|
|
768
768
|
{
|
|
769
769
|
type: "button",
|
|
770
770
|
className: "w6w-btn",
|
|
771
|
-
disabled:
|
|
771
|
+
disabled: m || J,
|
|
772
772
|
onClick: un,
|
|
773
|
-
children:
|
|
773
|
+
children: m ? "Running…" : "Run action"
|
|
774
774
|
}
|
|
775
775
|
),
|
|
776
776
|
a && /* @__PURE__ */ t("button", { type: "button", className: "w6w-btn w6w-btn-ghost", onClick: bn, children: "Save test" }),
|
|
@@ -800,11 +800,11 @@ function hs({
|
|
|
800
800
|
p
|
|
801
801
|
] })
|
|
802
802
|
] }),
|
|
803
|
-
(A ||
|
|
803
|
+
(A || E.length > 0) && /* @__PURE__ */ i("div", { className: "card", children: [
|
|
804
804
|
/* @__PURE__ */ t("div", { className: "section-head", children: /* @__PURE__ */ t("h3", { children: "Result" }) }),
|
|
805
805
|
/* @__PURE__ */ i("div", { className: "w6w-stack", style: { gap: "var(--w6w-sp-3)" }, children: [
|
|
806
806
|
T !== void 0 && /* @__PURE__ */ t(Ye, { value: T }),
|
|
807
|
-
/* @__PURE__ */ t(kt, { calls:
|
|
807
|
+
/* @__PURE__ */ t(kt, { calls: E })
|
|
808
808
|
] })
|
|
809
809
|
] }),
|
|
810
810
|
ve && /* @__PURE__ */ i("div", { className: "card", children: [
|
|
@@ -898,7 +898,7 @@ function hs({
|
|
|
898
898
|
] });
|
|
899
899
|
}
|
|
900
900
|
function ps(e) {
|
|
901
|
-
const n =
|
|
901
|
+
const n = En(e.theme), { copied: a, copy: s } = Bn(e.value), r = Ge(() => [Jn(), Wn.theme(Rn)], []);
|
|
902
902
|
function o(l) {
|
|
903
903
|
e.onChange(l);
|
|
904
904
|
}
|
|
@@ -926,7 +926,7 @@ function ps(e) {
|
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
928
|
),
|
|
929
|
-
e.copyable !== !1 && /* @__PURE__ */ i(
|
|
929
|
+
e.copyable !== !1 && /* @__PURE__ */ i(R, { children: [
|
|
930
930
|
/* @__PURE__ */ t(
|
|
931
931
|
"button",
|
|
932
932
|
{
|
|
@@ -1060,7 +1060,7 @@ function Qe({
|
|
|
1060
1060
|
function We(e) {
|
|
1061
1061
|
return e === null ? na : e.toFixed(2);
|
|
1062
1062
|
}
|
|
1063
|
-
function
|
|
1063
|
+
function Ee(e) {
|
|
1064
1064
|
let n = 1;
|
|
1065
1065
|
for (const a of e) a !== null && a > n && (n = a);
|
|
1066
1066
|
return n;
|
|
@@ -1096,7 +1096,7 @@ function fs({
|
|
|
1096
1096
|
label: "CPU",
|
|
1097
1097
|
value: X(we(s)),
|
|
1098
1098
|
values: r,
|
|
1099
|
-
max:
|
|
1099
|
+
max: Ee(r)
|
|
1100
1100
|
}
|
|
1101
1101
|
),
|
|
1102
1102
|
/* @__PURE__ */ t(
|
|
@@ -1114,7 +1114,7 @@ function fs({
|
|
|
1114
1114
|
label: "Process",
|
|
1115
1115
|
value: qt((s == null ? void 0 : s.processRss) ?? null),
|
|
1116
1116
|
values: l,
|
|
1117
|
-
max:
|
|
1117
|
+
max: Ee(l)
|
|
1118
1118
|
}
|
|
1119
1119
|
)
|
|
1120
1120
|
] }),
|
|
@@ -1135,7 +1135,7 @@ function gs({ samples: e, title: n = "Server" }) {
|
|
|
1135
1135
|
label: "CPU",
|
|
1136
1136
|
value: X(we(a)),
|
|
1137
1137
|
values: s,
|
|
1138
|
-
max:
|
|
1138
|
+
max: Ee(s)
|
|
1139
1139
|
}
|
|
1140
1140
|
),
|
|
1141
1141
|
/* @__PURE__ */ i("li", { className: "w6w-server-resources__row", children: [
|
|
@@ -1156,7 +1156,7 @@ function ys({ samples: e, onExpand: n }) {
|
|
|
1156
1156
|
{
|
|
1157
1157
|
className: "w6w-server-resources__spark",
|
|
1158
1158
|
values: s,
|
|
1159
|
-
max:
|
|
1159
|
+
max: Ee(s)
|
|
1160
1160
|
}
|
|
1161
1161
|
)
|
|
1162
1162
|
] }),
|
|
@@ -1187,7 +1187,7 @@ function la(e, n, a) {
|
|
|
1187
1187
|
if (s === void 0) return null;
|
|
1188
1188
|
const r = Date.parse(s), o = n.resolvedAt !== void 0 ? Date.parse(n.resolvedAt) : n.startedAt !== void 0 ? a : r, l = Date.parse(`${e.from}T00:00:00.000Z`), c = Date.parse(`${e.to}T00:00:00.000Z`) + sa, d = c - l;
|
|
1189
1189
|
if (o < l || r >= c) return null;
|
|
1190
|
-
const u = r < l, f = o > c,
|
|
1190
|
+
const u = r < l, f = o > c, g = Math.max(r, l), v = Math.min(o, c), w = (g - l) / d * 100, h = (v - g) / d * 100, y = Math.max(h, aa);
|
|
1191
1191
|
return { leftPct: w, widthPct: y, clippedStart: u, clippedEnd: f };
|
|
1192
1192
|
}
|
|
1193
1193
|
const ia = {
|
|
@@ -1222,17 +1222,17 @@ function Ns({
|
|
|
1222
1222
|
`${u.day}-${f}`
|
|
1223
1223
|
)) }),
|
|
1224
1224
|
/* @__PURE__ */ t("div", { className: "w6w-history-lane w6w-history-lane-vendor", children: d !== null ? /* @__PURE__ */ t("span", { className: "w6w-history-empty", title: d, children: d }) : a == null ? void 0 : a.map((u, f) => {
|
|
1225
|
-
const
|
|
1226
|
-
if (
|
|
1225
|
+
const g = la(e, u, r);
|
|
1226
|
+
if (g === null) return null;
|
|
1227
1227
|
const v = [
|
|
1228
|
-
|
|
1229
|
-
|
|
1228
|
+
g.clippedStart ? "w6w-history-bar-clip-start" : "",
|
|
1229
|
+
g.clippedEnd ? "w6w-history-bar-clip-end" : ""
|
|
1230
1230
|
].filter(Boolean).join(" ");
|
|
1231
1231
|
return /* @__PURE__ */ t(
|
|
1232
1232
|
"span",
|
|
1233
1233
|
{
|
|
1234
1234
|
className: `w6w-history-bar w6w-history-bar-${u.state}${v ? ` ${v}` : ""}`,
|
|
1235
|
-
style: { left: `${
|
|
1235
|
+
style: { left: `${g.leftPct}%`, width: `${g.widthPct}%` },
|
|
1236
1236
|
title: ca(u)
|
|
1237
1237
|
},
|
|
1238
1238
|
u.id ?? `${u.title}-${f}`
|
|
@@ -1278,11 +1278,11 @@ function ks(e) {
|
|
|
1278
1278
|
const { branch: n, shortSha: a, lastSyncLabel: s, onSyncNow: r, syncing: o, className: l, ...c } = e, [d, u] = k(!1), f = Jt(null);
|
|
1279
1279
|
return G(() => {
|
|
1280
1280
|
if (!d) return;
|
|
1281
|
-
const
|
|
1281
|
+
const g = (w) => {
|
|
1282
1282
|
f.current && !f.current.contains(w.target) && u(!1);
|
|
1283
1283
|
}, v = (w) => w.key === "Escape" && u(!1);
|
|
1284
|
-
return document.addEventListener("mousedown",
|
|
1285
|
-
document.removeEventListener("mousedown",
|
|
1284
|
+
return document.addEventListener("mousedown", g), document.addEventListener("keydown", v), () => {
|
|
1285
|
+
document.removeEventListener("mousedown", g), document.removeEventListener("keydown", v);
|
|
1286
1286
|
};
|
|
1287
1287
|
}, [d]), /* @__PURE__ */ i(
|
|
1288
1288
|
"div",
|
|
@@ -1299,7 +1299,7 @@ function ks(e) {
|
|
|
1299
1299
|
"aria-haspopup": "menu",
|
|
1300
1300
|
"aria-expanded": d,
|
|
1301
1301
|
"aria-busy": o,
|
|
1302
|
-
onClick: () => u((
|
|
1302
|
+
onClick: () => u((g) => !g),
|
|
1303
1303
|
children: [
|
|
1304
1304
|
/* @__PURE__ */ i("span", { className: "w6w-repo-sync-icon", children: [
|
|
1305
1305
|
/* @__PURE__ */ t(Xe, { name: "github" }),
|
|
@@ -1385,7 +1385,7 @@ function xs({
|
|
|
1385
1385
|
onPrev: d,
|
|
1386
1386
|
onNext: u,
|
|
1387
1387
|
onRerun: f,
|
|
1388
|
-
rerunningId:
|
|
1388
|
+
rerunningId: g = null
|
|
1389
1389
|
}) {
|
|
1390
1390
|
const v = d || u ? /* @__PURE__ */ i("div", { className: "w6w-execution-list-pager", children: [
|
|
1391
1391
|
/* @__PURE__ */ t(
|
|
@@ -1417,7 +1417,7 @@ function xs({
|
|
|
1417
1417
|
Ze,
|
|
1418
1418
|
{
|
|
1419
1419
|
icon: /* @__PURE__ */ t(st, { state: h.status }),
|
|
1420
|
-
title: /* @__PURE__ */ i(
|
|
1420
|
+
title: /* @__PURE__ */ i(R, { children: [
|
|
1421
1421
|
s ? h.callableName : Re(h.startedAt),
|
|
1422
1422
|
h.rerunOf && /* @__PURE__ */ t(
|
|
1423
1423
|
"span",
|
|
@@ -1429,10 +1429,10 @@ function xs({
|
|
|
1429
1429
|
}
|
|
1430
1430
|
)
|
|
1431
1431
|
] }),
|
|
1432
|
-
subtitle: /* @__PURE__ */ i(
|
|
1432
|
+
subtitle: /* @__PURE__ */ i(R, { children: [
|
|
1433
1433
|
s ? `${wa[h.kind]} · ${Re(h.startedAt)}` : h.id,
|
|
1434
1434
|
Tt(h) && /* @__PURE__ */ t("span", { className: "w6w-execution-trigger", "data-testid": "execution-row-trigger", children: ` · ${Tt(h)}` }),
|
|
1435
|
-
h.inputPreview && /* @__PURE__ */ i(
|
|
1435
|
+
h.inputPreview && /* @__PURE__ */ i(R, { children: [
|
|
1436
1436
|
" · ",
|
|
1437
1437
|
/* @__PURE__ */ t(
|
|
1438
1438
|
"code",
|
|
@@ -1455,10 +1455,10 @@ function xs({
|
|
|
1455
1455
|
{
|
|
1456
1456
|
icon: "sync",
|
|
1457
1457
|
label: "Re-run",
|
|
1458
|
-
title: h.id ===
|
|
1458
|
+
title: h.id === g ? "Re-running…" : "Re-run with the same input",
|
|
1459
1459
|
className: "w6w-execution-list-rerun",
|
|
1460
1460
|
"data-testid": "execution-row-rerun",
|
|
1461
|
-
disabled:
|
|
1461
|
+
disabled: g !== null,
|
|
1462
1462
|
onClick: () => f(h.id)
|
|
1463
1463
|
}
|
|
1464
1464
|
)
|
|
@@ -1494,24 +1494,24 @@ function pa({
|
|
|
1494
1494
|
}) {
|
|
1495
1495
|
const o = a ? /* @__PURE__ */ t("div", { className: "w6w-execution-log-head", children: /* @__PURE__ */ t(de, { label: "Dismiss run log", "data-testid": "execution-log-dismiss", onClick: a, children: "×" }) }) : null, l = r ?? [], c = s || l.length > 0 ? /* @__PURE__ */ i("div", { className: "w6w-execution-log-errors w6w-stack", children: [
|
|
1496
1496
|
s && /* @__PURE__ */ t(et, { error: s }),
|
|
1497
|
-
l.map((
|
|
1497
|
+
l.map((g, v) => /* @__PURE__ */ t(
|
|
1498
1498
|
et,
|
|
1499
1499
|
{
|
|
1500
|
-
label:
|
|
1501
|
-
error:
|
|
1500
|
+
label: g.label ?? g.stepId,
|
|
1501
|
+
error: g.error
|
|
1502
1502
|
},
|
|
1503
|
-
`${
|
|
1503
|
+
`${g.stepId}:${v}`
|
|
1504
1504
|
))
|
|
1505
|
-
] }) : null, d = zt(e.filter((
|
|
1506
|
-
return d.length === 0 ? /* @__PURE__ */ i(
|
|
1505
|
+
] }) : null, d = zt(e.filter((g) => !At(g))), u = e.filter(At), f = u.length > 0 ? /* @__PURE__ */ t(ga, { steps: u }) : null;
|
|
1506
|
+
return d.length === 0 ? /* @__PURE__ */ i(R, { children: [
|
|
1507
1507
|
o,
|
|
1508
1508
|
c,
|
|
1509
1509
|
/* @__PURE__ */ t("div", { className: "w6w-execution-log-empty", children: /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: n ?? "No nodes have run yet." }) }),
|
|
1510
1510
|
f
|
|
1511
|
-
] }) : /* @__PURE__ */ i(
|
|
1511
|
+
] }) : /* @__PURE__ */ i(R, { children: [
|
|
1512
1512
|
o,
|
|
1513
1513
|
c,
|
|
1514
|
-
/* @__PURE__ */ t("ol", { className: "w6w-execution-log", children: d.map((
|
|
1514
|
+
/* @__PURE__ */ t("ol", { className: "w6w-execution-log", children: d.map((g) => /* @__PURE__ */ t(Yt, { step: g }, g.id)) }),
|
|
1515
1515
|
f
|
|
1516
1516
|
] });
|
|
1517
1517
|
}
|
|
@@ -1527,77 +1527,86 @@ function ga({ steps: e }) {
|
|
|
1527
1527
|
/* @__PURE__ */ t("ul", { className: "w6w-muted w6w-small", children: e.map((a) => /* @__PURE__ */ t("li", { children: a.label ?? a.id }, a.id)) })
|
|
1528
1528
|
] });
|
|
1529
1529
|
}
|
|
1530
|
-
function Yt({
|
|
1531
|
-
|
|
1532
|
-
|
|
1530
|
+
function Yt({
|
|
1531
|
+
step: e,
|
|
1532
|
+
defaultOpen: n = !1
|
|
1533
|
+
}) {
|
|
1534
|
+
var u, f;
|
|
1535
|
+
const [a, s] = k(n), r = e.node ? ha(e.node) : null, o = /* @__PURE__ */ i("div", { className: "w6w-execution-log-row-header", children: [
|
|
1533
1536
|
/* @__PURE__ */ t(st, { state: e.status }),
|
|
1534
|
-
|
|
1537
|
+
r && /* @__PURE__ */ t(
|
|
1535
1538
|
"span",
|
|
1536
1539
|
{
|
|
1537
|
-
className: `w6w-execution-log-kind${
|
|
1540
|
+
className: `w6w-execution-log-kind${r.trigger ? " w6w-execution-log-kind-trigger" : ""}`,
|
|
1538
1541
|
"data-testid": "execution-log-kind",
|
|
1539
|
-
children:
|
|
1542
|
+
children: r.trigger ? "Trigger" : "Node"
|
|
1540
1543
|
}
|
|
1541
1544
|
),
|
|
1542
1545
|
/* @__PURE__ */ i("span", { className: "w6w-execution-log-row-title", children: [
|
|
1543
1546
|
/* @__PURE__ */ t("span", { className: "w6w-execution-log-row-label", children: e.label ?? e.id }),
|
|
1544
|
-
|
|
1547
|
+
r && /* @__PURE__ */ t("span", { className: "w6w-execution-log-row-uses", "data-testid": "execution-log-uses", children: r.appName === r.actionName ? r.appName : `${r.appName} · ${r.actionName}` })
|
|
1545
1548
|
] }),
|
|
1546
1549
|
e.status === "skipped" && e.skipReason && e.skipReason !== "not_on_path" && /* @__PURE__ */ t("span", { className: "w6w-execution-log-skip-reason", "data-testid": "execution-log-skip-reason", children: fa[e.skipReason] }),
|
|
1547
1550
|
/* @__PURE__ */ t(Na, { startedAt: e.startedAt, finishedAt: e.finishedAt })
|
|
1548
|
-
] }),
|
|
1549
|
-
return e.input === void 0 && e.output === void 0 && !e.meta && !
|
|
1550
|
-
/* @__PURE__ */ t("div", { className: "w6w-section", children:
|
|
1551
|
-
|
|
1552
|
-
|
|
1551
|
+
] }), l = e.error ? /* @__PURE__ */ t(et, { error: e.error }) : null, c = Array.isArray(e.iterations) ? /* @__PURE__ */ t(ya, { step: e }) : null, d = Ca(e) ? /* @__PURE__ */ t(Sa, { step: e }) : null;
|
|
1552
|
+
return e.input === void 0 && e.output === void 0 && !e.meta && !d && !((u = e.logs) != null && u.length) ? /* @__PURE__ */ i("li", { className: "w6w-execution-log-row", children: [
|
|
1553
|
+
/* @__PURE__ */ t("div", { className: "w6w-section", children: o }),
|
|
1554
|
+
l,
|
|
1555
|
+
c
|
|
1553
1556
|
] }) : /* @__PURE__ */ i("li", { className: "w6w-execution-log-row", children: [
|
|
1554
|
-
/* @__PURE__ */ i("details", { className: "w6w-section", open:
|
|
1555
|
-
/* @__PURE__ */ t("summary", { className: "w6w-section-summary", children:
|
|
1556
|
-
|
|
1557
|
+
/* @__PURE__ */ i("details", { className: "w6w-section", open: a, onToggle: (g) => s(g.currentTarget.open), children: [
|
|
1558
|
+
/* @__PURE__ */ t("summary", { className: "w6w-section-summary", children: o }),
|
|
1559
|
+
a && /* @__PURE__ */ i("div", { className: "w6w-execution-log-row-body w6w-section-body w6w-stack", children: [
|
|
1557
1560
|
/* @__PURE__ */ t(ka, { input: e.input }),
|
|
1558
|
-
/* @__PURE__ */ t(
|
|
1559
|
-
/* @__PURE__ */ t(
|
|
1560
|
-
!!((
|
|
1561
|
+
/* @__PURE__ */ t(Et, { title: "Input", value: e.input, defaultOpen: n }),
|
|
1562
|
+
/* @__PURE__ */ t(Et, { title: "Output", value: e.output, defaultOpen: n }),
|
|
1563
|
+
!!((f = e.logs) != null && f.length) && /* @__PURE__ */ i("div", { className: "w6w-execution-log-json w6w-stack", children: [
|
|
1561
1564
|
/* @__PURE__ */ t("strong", { className: "w6w-small", children: "Console" }),
|
|
1562
|
-
/* @__PURE__ */ t(
|
|
1565
|
+
/* @__PURE__ */ t(Ae, { code: e.logs.join(`
|
|
1563
1566
|
`), language: "plaintext" })
|
|
1564
1567
|
] }),
|
|
1565
1568
|
e.meta && /* @__PURE__ */ i("div", { className: "w6w-execution-log-json w6w-stack", children: [
|
|
1566
1569
|
/* @__PURE__ */ t("strong", { className: "w6w-small", children: "Metadata" }),
|
|
1567
|
-
/* @__PURE__ */ t(
|
|
1570
|
+
/* @__PURE__ */ t(Ae, { code: JSON.stringify(e.meta, null, 2), language: "json" })
|
|
1568
1571
|
] }),
|
|
1569
|
-
|
|
1572
|
+
d
|
|
1570
1573
|
] })
|
|
1571
1574
|
] }),
|
|
1572
|
-
|
|
1573
|
-
|
|
1575
|
+
l,
|
|
1576
|
+
c
|
|
1574
1577
|
] });
|
|
1575
1578
|
}
|
|
1576
1579
|
function ya({ step: e }) {
|
|
1577
|
-
var
|
|
1578
|
-
const n = [...e.iterations ?? []].sort((m,
|
|
1579
|
-
for (const m of zt(n.flatMap((
|
|
1580
|
-
|
|
1581
|
-
const
|
|
1580
|
+
var h, y;
|
|
1581
|
+
const n = [...e.iterations ?? []].sort((m, S) => m.index - S.index), a = e.iterationsTotal ?? n.length, s = e.iterationsFailed ?? n.filter((m) => m.status === "failed").length, r = n.find((m) => m.status === "failed"), o = (r == null ? void 0 : r.index) ?? ((h = n[n.length - 1]) == null ? void 0 : h.index), [l, c] = k(o), [d, u] = k(!1), f = n.find((m) => m.index === l), g = [], v = /* @__PURE__ */ new Map();
|
|
1582
|
+
for (const m of zt(n.flatMap((S) => S.steps)))
|
|
1583
|
+
v.has(m.id) || (g.push(m.id), v.set(m.id, m.label ?? m.id));
|
|
1584
|
+
const w = (r == null ? void 0 : r.failedNodeId) ?? ((y = r == null ? void 0 : r.steps.find((m) => m.status === "failed")) == null ? void 0 : y.id);
|
|
1582
1585
|
return /* @__PURE__ */ i("div", { className: "w6w-execution-log-foreach w6w-stack", children: [
|
|
1583
1586
|
/* @__PURE__ */ i("div", { className: "w6w-small", "data-testid": "execution-log-foreach-summary", children: [
|
|
1584
1587
|
/* @__PURE__ */ i("span", { children: [
|
|
1585
1588
|
a === 1 ? "1 item" : `${a} items`,
|
|
1586
1589
|
s > 0 ? ` · ${s} failed` : ""
|
|
1587
1590
|
] }),
|
|
1588
|
-
r &&
|
|
1589
|
-
|
|
1591
|
+
r && w !== void 0 && /* @__PURE__ */ i("div", { children: [
|
|
1592
|
+
v.get(w) ?? w,
|
|
1590
1593
|
" failed in iteration ",
|
|
1591
1594
|
r.index
|
|
1592
1595
|
] }),
|
|
1593
1596
|
e.iterationsTruncated === !0 && /* @__PURE__ */ t("div", { className: "w6w-muted", children: `showing ${n.length} of ${a}` })
|
|
1594
1597
|
] }),
|
|
1595
1598
|
/* @__PURE__ */ t("div", { className: "w6w-execution-log-iteration-chips", children: n.map((m) => /* @__PURE__ */ i(
|
|
1596
|
-
"
|
|
1599
|
+
"button",
|
|
1597
1600
|
{
|
|
1601
|
+
type: "button",
|
|
1598
1602
|
className: `w6w-execution-log-iteration-chip w6w-execution-log-iteration-chip-${m.status}`,
|
|
1599
1603
|
"data-testid": "execution-log-iteration-chip",
|
|
1600
1604
|
"data-status": m.status,
|
|
1605
|
+
"aria-pressed": l === m.index,
|
|
1606
|
+
title: `Show iteration ${m.index}'s input and output`,
|
|
1607
|
+
onClick: () => {
|
|
1608
|
+
c(m.index), u(!0);
|
|
1609
|
+
},
|
|
1601
1610
|
children: [
|
|
1602
1611
|
m.index,
|
|
1603
1612
|
" · ",
|
|
@@ -1606,13 +1615,16 @@ function ya({ step: e }) {
|
|
|
1606
1615
|
},
|
|
1607
1616
|
m.index
|
|
1608
1617
|
)) }),
|
|
1609
|
-
/* @__PURE__ */ t("
|
|
1618
|
+
f && /* @__PURE__ */ t("div", { className: "w6w-small w6w-muted", "data-testid": "execution-log-iteration-current", children: `Iteration ${f.index} · ${f.status}` }),
|
|
1619
|
+
/* @__PURE__ */ t("ul", { className: "w6w-execution-log-subrows", children: g.map((m) => /* @__PURE__ */ t(
|
|
1610
1620
|
va,
|
|
1611
1621
|
{
|
|
1612
1622
|
id: m,
|
|
1613
|
-
label:
|
|
1623
|
+
label: v.get(m) ?? m,
|
|
1614
1624
|
iterations: n,
|
|
1615
|
-
|
|
1625
|
+
selected: l,
|
|
1626
|
+
open: d,
|
|
1627
|
+
onSelect: c
|
|
1616
1628
|
},
|
|
1617
1629
|
m
|
|
1618
1630
|
)) })
|
|
@@ -1622,10 +1634,12 @@ function va({
|
|
|
1622
1634
|
id: e,
|
|
1623
1635
|
label: n,
|
|
1624
1636
|
iterations: a,
|
|
1625
|
-
|
|
1637
|
+
selected: s,
|
|
1638
|
+
open: r,
|
|
1639
|
+
onSelect: o
|
|
1626
1640
|
}) {
|
|
1627
1641
|
var c;
|
|
1628
|
-
const
|
|
1642
|
+
const l = (c = a.find((d) => d.index === s)) == null ? void 0 : c.steps.find((d) => d.id === e);
|
|
1629
1643
|
return /* @__PURE__ */ i("li", { className: "w6w-execution-log-subrow w6w-stack", children: [
|
|
1630
1644
|
/* @__PURE__ */ i("div", { className: "w6w-execution-log-subrow-head", children: [
|
|
1631
1645
|
/* @__PURE__ */ t("strong", { className: "w6w-small", children: n }),
|
|
@@ -1635,13 +1649,13 @@ function va({
|
|
|
1635
1649
|
className: "w6w-select",
|
|
1636
1650
|
"aria-label": `Iteration for ${n}`,
|
|
1637
1651
|
"data-testid": "execution-log-iteration-select",
|
|
1638
|
-
value:
|
|
1652
|
+
value: s === void 0 ? "" : String(s),
|
|
1639
1653
|
onChange: (d) => o(Number(d.currentTarget.value)),
|
|
1640
1654
|
children: a.map((d) => /* @__PURE__ */ t("option", { value: String(d.index), children: `iteration ${d.index} (${d.status})` }, d.index))
|
|
1641
1655
|
}
|
|
1642
1656
|
)
|
|
1643
1657
|
] }),
|
|
1644
|
-
l ? /* @__PURE__ */ t("ol", { className: "w6w-execution-log", children: /* @__PURE__ */ t(Yt, { step: l }, r) }) : /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Did not run in this iteration." })
|
|
1658
|
+
l ? /* @__PURE__ */ t("ol", { className: "w6w-execution-log", children: /* @__PURE__ */ t(Yt, { step: l, defaultOpen: r }, `${s}:${r}`) }) : /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Did not run in this iteration." })
|
|
1645
1659
|
] });
|
|
1646
1660
|
}
|
|
1647
1661
|
function et({ error: e, label: n }) {
|
|
@@ -1680,8 +1694,12 @@ function ba(e, n) {
|
|
|
1680
1694
|
const l = Math.floor(o / 60), c = Math.round(o % 60);
|
|
1681
1695
|
return `${l}m ${c}s`;
|
|
1682
1696
|
}
|
|
1683
|
-
function
|
|
1684
|
-
|
|
1697
|
+
function Et({
|
|
1698
|
+
title: e,
|
|
1699
|
+
value: n,
|
|
1700
|
+
defaultOpen: a = !1
|
|
1701
|
+
}) {
|
|
1702
|
+
const [s, r] = k(a);
|
|
1685
1703
|
return n === void 0 ? /* @__PURE__ */ i("div", { className: "w6w-execution-log-json w6w-stack", children: [
|
|
1686
1704
|
/* @__PURE__ */ t("strong", { className: "w6w-small", children: e }),
|
|
1687
1705
|
/* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Not available." })
|
|
@@ -1689,22 +1707,22 @@ function Rt({ title: e, value: n }) {
|
|
|
1689
1707
|
"details",
|
|
1690
1708
|
{
|
|
1691
1709
|
className: "w6w-execution-log-json",
|
|
1692
|
-
open:
|
|
1693
|
-
onToggle: (
|
|
1694
|
-
|
|
1710
|
+
open: s,
|
|
1711
|
+
onToggle: (o) => {
|
|
1712
|
+
o.target === o.currentTarget && r(o.currentTarget.open);
|
|
1695
1713
|
},
|
|
1696
1714
|
children: [
|
|
1697
1715
|
/* @__PURE__ */ t("summary", { children: /* @__PURE__ */ t("strong", { className: "w6w-small", children: e }) }),
|
|
1698
|
-
|
|
1716
|
+
s && /* @__PURE__ */ t(Ye, { value: n, format: "json" })
|
|
1699
1717
|
]
|
|
1700
1718
|
}
|
|
1701
1719
|
);
|
|
1702
1720
|
}
|
|
1703
|
-
const
|
|
1704
|
-
function
|
|
1705
|
-
if (!
|
|
1721
|
+
const _e = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
|
|
1722
|
+
function Rt(e) {
|
|
1723
|
+
if (!_e(e) || !Array.isArray(e.conditions)) return;
|
|
1706
1724
|
const n = e.conditions.filter(
|
|
1707
|
-
(a) =>
|
|
1725
|
+
(a) => _e(a) && typeof a.op == "string" && "result" in a
|
|
1708
1726
|
);
|
|
1709
1727
|
if (n.length !== 0)
|
|
1710
1728
|
return {
|
|
@@ -1714,11 +1732,11 @@ function Et(e) {
|
|
|
1714
1732
|
};
|
|
1715
1733
|
}
|
|
1716
1734
|
function ka({ input: e }) {
|
|
1717
|
-
const n = [], a =
|
|
1718
|
-
if (a && n.push({ trace: a }),
|
|
1735
|
+
const n = [], a = Rt(e);
|
|
1736
|
+
if (a && n.push({ trace: a }), _e(e) && Array.isArray(e.routes))
|
|
1719
1737
|
for (const s of e.routes) {
|
|
1720
|
-
const r =
|
|
1721
|
-
!r || !
|
|
1738
|
+
const r = Rt(s);
|
|
1739
|
+
!r || !_e(s) || n.push({ title: String(s.label ?? s.id ?? "Route"), trace: r });
|
|
1722
1740
|
}
|
|
1723
1741
|
return n.length === 0 ? null : /* @__PURE__ */ i("div", { className: "w6w-execution-log-json w6w-stack", "data-testid": "execution-log-conditions", children: [
|
|
1724
1742
|
/* @__PURE__ */ t("strong", { className: "w6w-small", children: "Condition" }),
|
|
@@ -1727,7 +1745,7 @@ function ka({ input: e }) {
|
|
|
1727
1745
|
(r.combinator && r.rows.length > 1 || r.result !== void 0) && /* @__PURE__ */ i("span", { className: "w6w-small w6w-muted", "data-testid": "execution-log-condition-summary", children: [
|
|
1728
1746
|
r.combinator && r.rows.length > 1 && On(r.combinator),
|
|
1729
1747
|
r.combinator && r.rows.length > 1 && r.result !== void 0 && " · ",
|
|
1730
|
-
r.result !== void 0 && /* @__PURE__ */ i(
|
|
1748
|
+
r.result !== void 0 && /* @__PURE__ */ i(R, { children: [
|
|
1731
1749
|
"Result:",
|
|
1732
1750
|
" ",
|
|
1733
1751
|
/* @__PURE__ */ t(
|
|
@@ -1820,7 +1838,7 @@ function Sa({ step: e }) {
|
|
|
1820
1838
|
}) }),
|
|
1821
1839
|
typeof a == "object" && a !== null && /* @__PURE__ */ i("div", { className: "w6w-stack", "data-testid": "execution-log-state-after", children: [
|
|
1822
1840
|
/* @__PURE__ */ t("span", { className: "w6w-small w6w-muted", children: "State after this step" }),
|
|
1823
|
-
/* @__PURE__ */ t(
|
|
1841
|
+
/* @__PURE__ */ t(Ae, { code: JSON.stringify(a, null, 2), language: "json" })
|
|
1824
1842
|
] })
|
|
1825
1843
|
] });
|
|
1826
1844
|
}
|
|
@@ -1931,7 +1949,7 @@ function Ss({ stats: e, label: n }) {
|
|
|
1931
1949
|
{
|
|
1932
1950
|
testid: "execution-stat-success-rate",
|
|
1933
1951
|
label: "Success rate",
|
|
1934
|
-
value:
|
|
1952
|
+
value: Ea(e == null ? void 0 : e.successRate)
|
|
1935
1953
|
},
|
|
1936
1954
|
{
|
|
1937
1955
|
testid: "execution-stat-failed",
|
|
@@ -1956,10 +1974,10 @@ function Ss({ stats: e, label: n }) {
|
|
|
1956
1974
|
] }, s.testid)) })
|
|
1957
1975
|
] });
|
|
1958
1976
|
}
|
|
1959
|
-
function
|
|
1977
|
+
function Ea(e) {
|
|
1960
1978
|
return e == null || !Number.isFinite(e) ? Se : `${Math.round(e * 100)}%`;
|
|
1961
1979
|
}
|
|
1962
|
-
const
|
|
1980
|
+
const Ra = {
|
|
1963
1981
|
function: "Function",
|
|
1964
1982
|
endpoint: "Endpoint",
|
|
1965
1983
|
workflow: "Workflow"
|
|
@@ -2023,13 +2041,13 @@ function Oa({
|
|
|
2023
2041
|
onOpenExecution: o
|
|
2024
2042
|
}) {
|
|
2025
2043
|
const l = e.rerunOf;
|
|
2026
|
-
return /* @__PURE__ */ i(
|
|
2044
|
+
return /* @__PURE__ */ i(R, { children: [
|
|
2027
2045
|
/* @__PURE__ */ i("div", { className: "w6w-execution-detail-head", children: [
|
|
2028
2046
|
/* @__PURE__ */ i("div", { className: "w6w-execution-detail-title", children: [
|
|
2029
2047
|
/* @__PURE__ */ t("h3", { className: "w6w-execution-detail-name", children: e.callableName }),
|
|
2030
2048
|
/* @__PURE__ */ i("div", { className: "w6w-execution-detail-meta", children: [
|
|
2031
2049
|
/* @__PURE__ */ t(st, { state: e.status }),
|
|
2032
|
-
/* @__PURE__ */ t("span", { className: "w6w-execution-detail-kind w6w-muted w6w-small", children:
|
|
2050
|
+
/* @__PURE__ */ t("span", { className: "w6w-execution-detail-kind w6w-muted w6w-small", children: Ra[e.kind] })
|
|
2033
2051
|
] })
|
|
2034
2052
|
] }),
|
|
2035
2053
|
(s || a || n) && /* @__PURE__ */ i("div", { className: "w6w-execution-detail-actions", children: [
|
|
@@ -2113,7 +2131,7 @@ function He({ label: e, value: n }) {
|
|
|
2113
2131
|
function ze({ title: e, testid: n, value: a }) {
|
|
2114
2132
|
return /* @__PURE__ */ i("section", { className: "w6w-execution-detail-section w6w-stack", "data-testid": n, children: [
|
|
2115
2133
|
/* @__PURE__ */ t("strong", { className: "w6w-small", children: e }),
|
|
2116
|
-
/* @__PURE__ */ t(
|
|
2134
|
+
/* @__PURE__ */ t(Ae, { code: _a(a), language: "json" })
|
|
2117
2135
|
] });
|
|
2118
2136
|
}
|
|
2119
2137
|
function Ia(e) {
|
|
@@ -2172,7 +2190,7 @@ function Ua({
|
|
|
2172
2190
|
const s = Ia(e);
|
|
2173
2191
|
if (s.length === 0)
|
|
2174
2192
|
return /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "No timed calls in this window yet." });
|
|
2175
|
-
const r = Mt(Math.max(...s.map((
|
|
2193
|
+
const r = Mt(Math.max(...s.map((m) => m.calls))), o = Mt(Math.max(...s.map((m) => m.p95Ms))), l = Math.max(1, ...s.map((m) => m.errorCount)), c = ke - B.left - B.right, d = re - B.top - B.bottom, u = (m) => B.left + m / r * c, f = (m) => B.top + m / o * d, g = (m) => 16 + m / l * 14, v = Dt(r), w = Dt(o), h = 18, y = B.top + d / 2;
|
|
2176
2194
|
return /* @__PURE__ */ i("div", { className: "w6w-rel-scatter", children: [
|
|
2177
2195
|
/* @__PURE__ */ i(
|
|
2178
2196
|
"svg",
|
|
@@ -2192,29 +2210,29 @@ function Ua({
|
|
|
2192
2210
|
className: "w6w-rel-scatter-plot-bg"
|
|
2193
2211
|
}
|
|
2194
2212
|
),
|
|
2195
|
-
w.map((
|
|
2213
|
+
w.map((m) => /* @__PURE__ */ i("g", { children: [
|
|
2196
2214
|
/* @__PURE__ */ t(
|
|
2197
2215
|
"line",
|
|
2198
2216
|
{
|
|
2199
2217
|
x1: B.left,
|
|
2200
2218
|
x2: ke - B.right,
|
|
2201
|
-
y1: f(
|
|
2202
|
-
y2: f(
|
|
2219
|
+
y1: f(m),
|
|
2220
|
+
y2: f(m),
|
|
2203
2221
|
className: "w6w-rel-scatter-grid"
|
|
2204
2222
|
}
|
|
2205
2223
|
),
|
|
2206
|
-
/* @__PURE__ */ t("text", { x: B.left - 8, y: f(
|
|
2207
|
-
] }, `y-${
|
|
2208
|
-
v.map((
|
|
2224
|
+
/* @__PURE__ */ t("text", { x: B.left - 8, y: f(m), className: "w6w-rel-scatter-axis-label", textAnchor: "end", children: m })
|
|
2225
|
+
] }, `y-${m}`)),
|
|
2226
|
+
v.map((m) => /* @__PURE__ */ t(
|
|
2209
2227
|
"text",
|
|
2210
2228
|
{
|
|
2211
|
-
x: u(
|
|
2229
|
+
x: u(m),
|
|
2212
2230
|
y: re - B.bottom + 18,
|
|
2213
2231
|
className: "w6w-rel-scatter-axis-label",
|
|
2214
2232
|
textAnchor: "middle",
|
|
2215
|
-
children:
|
|
2233
|
+
children: m
|
|
2216
2234
|
},
|
|
2217
|
-
`x-${
|
|
2235
|
+
`x-${m}`
|
|
2218
2236
|
)),
|
|
2219
2237
|
/* @__PURE__ */ t(
|
|
2220
2238
|
"text",
|
|
@@ -2237,23 +2255,23 @@ function Ua({
|
|
|
2237
2255
|
children: "calls in this window"
|
|
2238
2256
|
}
|
|
2239
2257
|
),
|
|
2240
|
-
s.map((
|
|
2241
|
-
const
|
|
2258
|
+
s.map((m) => {
|
|
2259
|
+
const S = g(m.errorCount), x = u(m.calls), N = f(m.p95Ms), T = /* @__PURE__ */ i(R, { children: [
|
|
2242
2260
|
/* @__PURE__ */ t(
|
|
2243
2261
|
"circle",
|
|
2244
2262
|
{
|
|
2245
2263
|
cx: x,
|
|
2246
2264
|
cy: N,
|
|
2247
|
-
r:
|
|
2248
|
-
className: `w6w-rel-scatter-ring w6w-rel-scatter-ring-${
|
|
2265
|
+
r: S / 2 + 2.5,
|
|
2266
|
+
className: `w6w-rel-scatter-ring w6w-rel-scatter-ring-${m.state}`,
|
|
2249
2267
|
children: /* @__PURE__ */ i("title", { children: [
|
|
2250
|
-
|
|
2268
|
+
m.displayName,
|
|
2251
2269
|
" — ",
|
|
2252
|
-
|
|
2270
|
+
m.calls,
|
|
2253
2271
|
" calls, ",
|
|
2254
|
-
|
|
2272
|
+
m.p95Ms,
|
|
2255
2273
|
" ms p95, ",
|
|
2256
|
-
|
|
2274
|
+
m.errorCount,
|
|
2257
2275
|
" errors"
|
|
2258
2276
|
] })
|
|
2259
2277
|
}
|
|
@@ -2263,27 +2281,27 @@ function Ua({
|
|
|
2263
2281
|
{
|
|
2264
2282
|
cx: x,
|
|
2265
2283
|
cy: N,
|
|
2266
|
-
r:
|
|
2267
|
-
className: `w6w-rel-scatter-point w6w-rel-scatter-point-${
|
|
2284
|
+
r: S / 2,
|
|
2285
|
+
className: `w6w-rel-scatter-point w6w-rel-scatter-point-${m.state}`
|
|
2268
2286
|
}
|
|
2269
2287
|
)
|
|
2270
2288
|
] });
|
|
2271
2289
|
return n ? /* @__PURE__ */ t(
|
|
2272
2290
|
"a",
|
|
2273
2291
|
{
|
|
2274
|
-
href: n(
|
|
2292
|
+
href: n(m.appId),
|
|
2275
2293
|
className: "w6w-rel-scatter-point-link",
|
|
2276
|
-
onClick: a ? (C) => a(
|
|
2294
|
+
onClick: a ? (C) => a(m.appId, C) : void 0,
|
|
2277
2295
|
children: T
|
|
2278
2296
|
},
|
|
2279
|
-
|
|
2297
|
+
m.appId
|
|
2280
2298
|
) : a ? /* @__PURE__ */ t(
|
|
2281
2299
|
"g",
|
|
2282
2300
|
{
|
|
2283
2301
|
role: "button",
|
|
2284
2302
|
tabIndex: 0,
|
|
2285
2303
|
className: "w6w-rel-scatter-point-link",
|
|
2286
|
-
onClick: (C) => a(
|
|
2304
|
+
onClick: (C) => a(m.appId, C),
|
|
2287
2305
|
onKeyDown: (C) => {
|
|
2288
2306
|
(C.key === "Enter" || C.key === " ") && (C.preventDefault(), C.currentTarget.dispatchEvent(
|
|
2289
2307
|
new MouseEvent("click", { bubbles: !0 })
|
|
@@ -2291,8 +2309,8 @@ function Ua({
|
|
|
2291
2309
|
},
|
|
2292
2310
|
children: T
|
|
2293
2311
|
},
|
|
2294
|
-
|
|
2295
|
-
) : /* @__PURE__ */ t("g", { children: T },
|
|
2312
|
+
m.appId
|
|
2313
|
+
) : /* @__PURE__ */ t("g", { children: T }, m.appId);
|
|
2296
2314
|
})
|
|
2297
2315
|
]
|
|
2298
2316
|
}
|
|
@@ -2419,7 +2437,7 @@ function Ba({
|
|
|
2419
2437
|
/* @__PURE__ */ t("td", { className: "w6w-rel-td-uptime", children: s ? (
|
|
2420
2438
|
// A zero-call window is one identical hatched strip — the note says it better.
|
|
2421
2439
|
/* @__PURE__ */ t("span", { className: "w6w-rel-idle-note", children: "No calls in this window" })
|
|
2422
|
-
) : /* @__PURE__ */ i(
|
|
2440
|
+
) : /* @__PURE__ */ i(R, { children: [
|
|
2423
2441
|
/* @__PURE__ */ t(
|
|
2424
2442
|
Qn,
|
|
2425
2443
|
{
|
|
@@ -2450,22 +2468,22 @@ function As({
|
|
|
2450
2468
|
onShowAll: u,
|
|
2451
2469
|
slots: f
|
|
2452
2470
|
}) {
|
|
2453
|
-
const
|
|
2471
|
+
const g = a ?? (n == null ? void 0 : n.days) ?? 30, v = e.length > 0 && e.every((E) => E.calls > 0 && E.state === "ok"), {
|
|
2454
2472
|
attentionCount: w,
|
|
2455
2473
|
shownNow: h,
|
|
2456
2474
|
shownRecent: y,
|
|
2457
|
-
hiddenAttentionCount:
|
|
2458
|
-
shownTable:
|
|
2475
|
+
hiddenAttentionCount: m,
|
|
2476
|
+
shownTable: S,
|
|
2459
2477
|
hiddenTableCount: x
|
|
2460
|
-
} = Da(e, { compact: s, limit: o }), N = r ?? !s, T = d !== void 0 || u !== void 0, C = (
|
|
2461
|
-
const P =
|
|
2462
|
-
return d !== void 0 ? /* @__PURE__ */ t("a", { href: d, className: P, onClick: u, children:
|
|
2478
|
+
} = Da(e, { compact: s, limit: o }), N = r ?? !s, T = d !== void 0 || u !== void 0, C = (E) => {
|
|
2479
|
+
const P = E.startsWith("Show") ? "w6w-muted w6w-small" : void 0;
|
|
2480
|
+
return d !== void 0 ? /* @__PURE__ */ t("a", { href: d, className: P, onClick: u, children: E }) : u ? /* @__PURE__ */ t(
|
|
2463
2481
|
"button",
|
|
2464
2482
|
{
|
|
2465
2483
|
type: "button",
|
|
2466
2484
|
className: `w6w-rel-show-all${P ? ` ${P}` : ""}`,
|
|
2467
2485
|
onClick: u,
|
|
2468
|
-
children:
|
|
2486
|
+
children: E
|
|
2469
2487
|
}
|
|
2470
2488
|
) : null;
|
|
2471
2489
|
};
|
|
@@ -2492,7 +2510,7 @@ function As({
|
|
|
2492
2510
|
/* @__PURE__ */ t("h4", { children: "All clear" }),
|
|
2493
2511
|
/* @__PURE__ */ i("p", { children: [
|
|
2494
2512
|
"Every service you called in the last ",
|
|
2495
|
-
|
|
2513
|
+
g,
|
|
2496
2514
|
" days came back",
|
|
2497
2515
|
" ",
|
|
2498
2516
|
/* @__PURE__ */ t(nt, { state: "ok" }),
|
|
@@ -2500,7 +2518,7 @@ function As({
|
|
|
2500
2518
|
] })
|
|
2501
2519
|
] }),
|
|
2502
2520
|
e.length === 0 && ((f == null ? void 0 : f.empty) ?? /* @__PURE__ */ t("div", { className: s ? void 0 : "w6w-rel-card", children: /* @__PURE__ */ t("p", { className: "w6w-muted", children: "No services yet — connect an integration or use a service in this project." }) })),
|
|
2503
|
-
e.length > 0 && /* @__PURE__ */ i(
|
|
2521
|
+
e.length > 0 && /* @__PURE__ */ i(R, { children: [
|
|
2504
2522
|
w > 0 && /* @__PURE__ */ i("div", { className: "w6w-rel-group", children: [
|
|
2505
2523
|
/* @__PURE__ */ i("h4", { className: "w6w-rel-group-head", children: [
|
|
2506
2524
|
"Needs attention",
|
|
@@ -2511,14 +2529,14 @@ function As({
|
|
|
2511
2529
|
w
|
|
2512
2530
|
] })
|
|
2513
2531
|
] }),
|
|
2514
|
-
/* @__PURE__ */ t("div", { className: "w6w-rel-issues", children: [...h, ...y].map((
|
|
2515
|
-
|
|
2516
|
-
|
|
2532
|
+
/* @__PURE__ */ t("div", { className: "w6w-rel-issues", children: [...h, ...y].map((E) => /* @__PURE__ */ t(Fa, { service: E, getHref: l, onOpen: c }, E.appId)) }),
|
|
2533
|
+
m > 0 && /* @__PURE__ */ i("p", { className: "w6w-muted w6w-small w6w-rel-more-note", children: [
|
|
2534
|
+
m,
|
|
2517
2535
|
" more ",
|
|
2518
|
-
|
|
2536
|
+
m === 1 ? "needs" : "need",
|
|
2519
2537
|
" ",
|
|
2520
2538
|
"attention",
|
|
2521
|
-
T && /* @__PURE__ */ i(
|
|
2539
|
+
T && /* @__PURE__ */ i(R, { children: [
|
|
2522
2540
|
" — ",
|
|
2523
2541
|
C("view all →")
|
|
2524
2542
|
] })
|
|
@@ -2528,11 +2546,11 @@ function As({
|
|
|
2528
2546
|
/* @__PURE__ */ t("h4", { className: "w6w-rel-group-head", children: "Performance across your APIs" }),
|
|
2529
2547
|
/* @__PURE__ */ t(Ua, { services: e, getHref: l, onOpen: c })
|
|
2530
2548
|
] }),
|
|
2531
|
-
|
|
2549
|
+
S.length > 0 && /* @__PURE__ */ i("div", { className: "w6w-rel-group", children: [
|
|
2532
2550
|
/* @__PURE__ */ i("h4", { className: "w6w-rel-group-head", children: [
|
|
2533
2551
|
s ? "Services" : "All services",
|
|
2534
2552
|
" ",
|
|
2535
|
-
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: s ? `${
|
|
2553
|
+
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: s ? `${S.length} of ${e.length}` : e.length })
|
|
2536
2554
|
] }),
|
|
2537
2555
|
/* @__PURE__ */ t("div", { className: "w6w-rel-table-wrap", children: /* @__PURE__ */ i("table", { className: "w6w-rel-table", children: [
|
|
2538
2556
|
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ i("tr", { children: [
|
|
@@ -2540,25 +2558,25 @@ function As({
|
|
|
2540
2558
|
/* @__PURE__ */ t("th", { children: "Status" }),
|
|
2541
2559
|
/* @__PURE__ */ i("th", { children: [
|
|
2542
2560
|
"Last ",
|
|
2543
|
-
|
|
2561
|
+
g,
|
|
2544
2562
|
" days"
|
|
2545
2563
|
] }),
|
|
2546
2564
|
/* @__PURE__ */ t("th", { children: "Latency" })
|
|
2547
2565
|
] }) }),
|
|
2548
|
-
/* @__PURE__ */ t("tbody", { children:
|
|
2566
|
+
/* @__PURE__ */ t("tbody", { children: S.map((E) => /* @__PURE__ */ t(
|
|
2549
2567
|
Ba,
|
|
2550
2568
|
{
|
|
2551
|
-
service:
|
|
2569
|
+
service: E,
|
|
2552
2570
|
getHref: l,
|
|
2553
2571
|
onOpen: c
|
|
2554
2572
|
},
|
|
2555
|
-
|
|
2573
|
+
E.appId
|
|
2556
2574
|
)) })
|
|
2557
2575
|
] }) }),
|
|
2558
2576
|
x > 0 && /* @__PURE__ */ i("p", { className: "w6w-muted w6w-small w6w-rel-more-note", children: [
|
|
2559
2577
|
x,
|
|
2560
2578
|
" more",
|
|
2561
|
-
T && /* @__PURE__ */ i(
|
|
2579
|
+
T && /* @__PURE__ */ i(R, { children: [
|
|
2562
2580
|
" — ",
|
|
2563
2581
|
C("view all →")
|
|
2564
2582
|
] })
|
|
@@ -2573,7 +2591,7 @@ function Ka(e, n) {
|
|
|
2573
2591
|
}
|
|
2574
2592
|
function he(e) {
|
|
2575
2593
|
const { columns: n, rows: a, rowKey: s, onRowClick: r, getRowHref: o, empty: l, loading: c, className: d, testId: u } = e;
|
|
2576
|
-
return a.length === 0 && !c && l !== void 0 && l !== null ? /* @__PURE__ */ t(
|
|
2594
|
+
return a.length === 0 && !c && l !== void 0 && l !== null ? /* @__PURE__ */ t(R, { children: l }) : /* @__PURE__ */ t("div", { className: "w6w-data-table-frame", children: /* @__PURE__ */ i(
|
|
2577
2595
|
"table",
|
|
2578
2596
|
{
|
|
2579
2597
|
className: d ? `w6w-data-table ${d}` : "w6w-data-table",
|
|
@@ -2583,7 +2601,7 @@ function he(e) {
|
|
|
2583
2601
|
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { children: n.map((f) => /* @__PURE__ */ t("th", { style: { width: f.width, textAlign: f.align }, scope: "col", children: f.header }, f.key)) }) }),
|
|
2584
2602
|
/* @__PURE__ */ t("tbody", { children: a.map((f) => {
|
|
2585
2603
|
var v;
|
|
2586
|
-
const
|
|
2604
|
+
const g = o == null ? void 0 : o(f);
|
|
2587
2605
|
return (
|
|
2588
2606
|
// biome-ignore lint/a11y/useKeyWithClickEvents: row click is a mouse convenience; keyboard users reach the row through its cell anchors (getRowHref) or the column's own controls.
|
|
2589
2607
|
/* @__PURE__ */ t(
|
|
@@ -2594,7 +2612,7 @@ function he(e) {
|
|
|
2594
2612
|
onClick: r ? (w) => r(f, w) : void 0,
|
|
2595
2613
|
children: n.map((w) => {
|
|
2596
2614
|
const h = Ka(w, f);
|
|
2597
|
-
return /* @__PURE__ */ t("td", { style: { textAlign: w.align }, children:
|
|
2615
|
+
return /* @__PURE__ */ t("td", { style: { textAlign: w.align }, children: g !== void 0 && w.link !== !1 ? /* @__PURE__ */ t("a", { className: "w6w-data-table-link", href: g, children: h }) : h }, w.key);
|
|
2598
2616
|
})
|
|
2599
2617
|
},
|
|
2600
2618
|
s(f)
|
|
@@ -2605,21 +2623,7 @@ function he(e) {
|
|
|
2605
2623
|
}
|
|
2606
2624
|
) });
|
|
2607
2625
|
}
|
|
2608
|
-
function
|
|
2609
|
-
return /* @__PURE__ */ t(
|
|
2610
|
-
"div",
|
|
2611
|
-
{
|
|
2612
|
-
className: s ? `w6w-empty-state ${s}` : "w6w-empty-state",
|
|
2613
|
-
"data-testid": r,
|
|
2614
|
-
children: /* @__PURE__ */ i("div", { className: "w6w-empty-state-inner", children: [
|
|
2615
|
-
e != null && /* @__PURE__ */ t("div", { className: "w6w-empty-state-title", children: e }),
|
|
2616
|
-
n != null && /* @__PURE__ */ t("div", { className: "w6w-empty-state-body", children: n }),
|
|
2617
|
-
a != null && /* @__PURE__ */ t("div", { className: "w6w-empty-state-action", children: a })
|
|
2618
|
-
] })
|
|
2619
|
-
}
|
|
2620
|
-
);
|
|
2621
|
-
}
|
|
2622
|
-
function Rs({
|
|
2626
|
+
function Es({
|
|
2623
2627
|
rows: e,
|
|
2624
2628
|
title: n,
|
|
2625
2629
|
description: a,
|
|
@@ -2631,23 +2635,23 @@ function Rs({
|
|
|
2631
2635
|
error: d,
|
|
2632
2636
|
onCreate: u,
|
|
2633
2637
|
creating: f,
|
|
2634
|
-
onImport:
|
|
2638
|
+
onImport: g,
|
|
2635
2639
|
onOpen: v,
|
|
2636
2640
|
getHref: w,
|
|
2637
2641
|
showArchived: h,
|
|
2638
2642
|
onShowArchivedChange: y,
|
|
2639
|
-
slots:
|
|
2643
|
+
slots: m
|
|
2640
2644
|
}) {
|
|
2641
|
-
const [
|
|
2642
|
-
N || x(
|
|
2645
|
+
const [S, x] = k(!1), N = h !== void 0, T = N ? h : S, C = T ? e : e.filter(($) => !$.archived), E = v !== void 0 || w !== void 0, P = ($) => {
|
|
2646
|
+
N || x($), y == null || y($);
|
|
2643
2647
|
}, K = [
|
|
2644
2648
|
{
|
|
2645
2649
|
key: "main",
|
|
2646
2650
|
header: "Name",
|
|
2647
|
-
render: (
|
|
2648
|
-
const I = /* @__PURE__ */ i("span", { className: "w6w-callable-list-main", title:
|
|
2649
|
-
/* @__PURE__ */ t("span", { children:
|
|
2650
|
-
|
|
2651
|
+
render: ($) => {
|
|
2652
|
+
const I = /* @__PURE__ */ i("span", { className: "w6w-callable-list-main", title: E ? o : void 0, children: [
|
|
2653
|
+
/* @__PURE__ */ t("span", { children: $.title }),
|
|
2654
|
+
$.description != null && /* @__PURE__ */ t("span", { className: "w6w-muted w6w-small w6w-callable-list-row-desc", children: $.description })
|
|
2651
2655
|
] });
|
|
2652
2656
|
return v && !w ? /* @__PURE__ */ t("button", { type: "button", className: "w6w-callable-list-open", children: I }) : I;
|
|
2653
2657
|
}
|
|
@@ -2656,17 +2660,20 @@ function Rs({
|
|
|
2656
2660
|
key: "trail",
|
|
2657
2661
|
header: "",
|
|
2658
2662
|
align: "right",
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
+
// Shrink to the badges (`1%` + the trail's `nowrap`): left unsized, the table split the
|
|
2664
|
+
// width evenly and a "draft · 0 runs" column took half of it.
|
|
2665
|
+
width: "1%",
|
|
2666
|
+
render: ($) => $.archived || $.badges != null || $.trailing != null ? /* @__PURE__ */ i("span", { className: "w6w-callable-list-trail", children: [
|
|
2667
|
+
$.badges,
|
|
2668
|
+
$.archived && /* @__PURE__ */ t("span", { className: "w6w-callable-list-badge", "data-testid": l == null ? void 0 : l.archivedBadge, children: "archived" }),
|
|
2669
|
+
$.trailing
|
|
2663
2670
|
] }) : null
|
|
2664
2671
|
}
|
|
2665
2672
|
], O = e.length > 0 && C.length === 0;
|
|
2666
2673
|
return /* @__PURE__ */ i("section", { className: "w6w-callable-list", children: [
|
|
2667
2674
|
/* @__PURE__ */ i("div", { className: "w6w-callable-list-head", children: [
|
|
2668
2675
|
/* @__PURE__ */ i("div", { className: "w6w-callable-list-heading", children: [
|
|
2669
|
-
(
|
|
2676
|
+
(m == null ? void 0 : m.header) ?? /* @__PURE__ */ i(R, { children: [
|
|
2670
2677
|
/* @__PURE__ */ t("h2", { className: "w6w-callable-list-title", children: n }),
|
|
2671
2678
|
a != null && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small w6w-callable-list-description", children: a })
|
|
2672
2679
|
] }),
|
|
@@ -2677,21 +2684,21 @@ function Rs({
|
|
|
2677
2684
|
type: "checkbox",
|
|
2678
2685
|
checked: T,
|
|
2679
2686
|
"data-testid": l == null ? void 0 : l.showArchived,
|
|
2680
|
-
onChange: (
|
|
2687
|
+
onChange: ($) => P($.target.checked)
|
|
2681
2688
|
}
|
|
2682
2689
|
),
|
|
2683
2690
|
"Show archived"
|
|
2684
2691
|
] })
|
|
2685
2692
|
] }),
|
|
2686
2693
|
/* @__PURE__ */ i("div", { className: "w6w-callable-list-actions", children: [
|
|
2687
|
-
|
|
2688
|
-
|
|
2694
|
+
m == null ? void 0 : m.actions,
|
|
2695
|
+
g && /* @__PURE__ */ t(
|
|
2689
2696
|
"button",
|
|
2690
2697
|
{
|
|
2691
2698
|
type: "button",
|
|
2692
2699
|
className: "w6w-btn w6w-btn-ghost",
|
|
2693
2700
|
"data-testid": l == null ? void 0 : l.importOpen,
|
|
2694
|
-
onClick:
|
|
2701
|
+
onClick: g,
|
|
2695
2702
|
children: "Import"
|
|
2696
2703
|
}
|
|
2697
2704
|
),
|
|
@@ -2702,7 +2709,7 @@ function Rs({
|
|
|
2702
2709
|
/* @__PURE__ */ i("div", { className: "w6w-callable-list-body", children: [
|
|
2703
2710
|
c && /* @__PURE__ */ t("p", { className: "w6w-muted", children: "Loading…" }),
|
|
2704
2711
|
C.length === 0 && !c ? O ? /* @__PURE__ */ t(
|
|
2705
|
-
|
|
2712
|
+
Te,
|
|
2706
2713
|
{
|
|
2707
2714
|
testId: "w6w-callable-list-empty",
|
|
2708
2715
|
action: /* @__PURE__ */ t(
|
|
@@ -2716,21 +2723,22 @@ function Rs({
|
|
|
2716
2723
|
),
|
|
2717
2724
|
children: e.length === 1 ? "The only item is archived." : `All ${e.length} items are archived.`
|
|
2718
2725
|
}
|
|
2719
|
-
) : /* @__PURE__ */ t(
|
|
2726
|
+
) : /* @__PURE__ */ t(Te, { testId: "w6w-callable-list-empty", children: (m == null ? void 0 : m.empty) ?? s }) : /* @__PURE__ */ t(
|
|
2720
2727
|
he,
|
|
2721
2728
|
{
|
|
2722
2729
|
columns: K,
|
|
2723
2730
|
rows: C,
|
|
2724
|
-
rowKey: (
|
|
2731
|
+
rowKey: ($) => $.id,
|
|
2732
|
+
className: "w6w-data-table-rows",
|
|
2725
2733
|
loading: c,
|
|
2726
|
-
getRowHref: w ? (
|
|
2727
|
-
onRowClick: v ? (
|
|
2734
|
+
getRowHref: w ? ($) => w($.id) : void 0,
|
|
2735
|
+
onRowClick: v ? ($, I) => v($.id, I) : void 0
|
|
2728
2736
|
}
|
|
2729
2737
|
)
|
|
2730
2738
|
] })
|
|
2731
2739
|
] });
|
|
2732
2740
|
}
|
|
2733
|
-
function
|
|
2741
|
+
function Rs({
|
|
2734
2742
|
connections: e,
|
|
2735
2743
|
appsById: n,
|
|
2736
2744
|
loading: a,
|
|
@@ -2742,7 +2750,7 @@ function Es({
|
|
|
2742
2750
|
busy: d,
|
|
2743
2751
|
slots: u
|
|
2744
2752
|
}) {
|
|
2745
|
-
const f = n ?? /* @__PURE__ */ new Map(),
|
|
2753
|
+
const f = n ?? /* @__PURE__ */ new Map(), g = l !== void 0 || c !== void 0, v = [
|
|
2746
2754
|
{
|
|
2747
2755
|
key: "name",
|
|
2748
2756
|
header: "Name",
|
|
@@ -2767,7 +2775,7 @@ function Es({
|
|
|
2767
2775
|
{
|
|
2768
2776
|
key: "status",
|
|
2769
2777
|
header: "Status",
|
|
2770
|
-
render: (w) => /* @__PURE__ */ i(
|
|
2778
|
+
render: (w) => /* @__PURE__ */ i(R, { children: [
|
|
2771
2779
|
"auth ",
|
|
2772
2780
|
/* @__PURE__ */ t("code", { children: w.authKey }),
|
|
2773
2781
|
" ·",
|
|
@@ -2790,7 +2798,7 @@ function Es({
|
|
|
2790
2798
|
] })
|
|
2791
2799
|
}
|
|
2792
2800
|
];
|
|
2793
|
-
return
|
|
2801
|
+
return g && v.push({
|
|
2794
2802
|
key: "actions",
|
|
2795
2803
|
header: "",
|
|
2796
2804
|
align: "right",
|
|
@@ -2825,7 +2833,7 @@ function Es({
|
|
|
2825
2833
|
] }),
|
|
2826
2834
|
s && /* @__PURE__ */ t("div", { className: "w6w-error", children: s }),
|
|
2827
2835
|
a && /* @__PURE__ */ t("p", { className: "w6w-muted", children: "Loading…" }),
|
|
2828
|
-
e.length === 0 && !a ? /* @__PURE__ */ t(
|
|
2836
|
+
e.length === 0 && !a ? /* @__PURE__ */ t(Te, { testId: "w6w-connection-list-empty", children: (u == null ? void 0 : u.empty) ?? "No connections yet." }) : /* @__PURE__ */ t(
|
|
2829
2837
|
he,
|
|
2830
2838
|
{
|
|
2831
2839
|
columns: v,
|
|
@@ -2839,11 +2847,11 @@ function Es({
|
|
|
2839
2847
|
] });
|
|
2840
2848
|
}
|
|
2841
2849
|
function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
2842
|
-
const s = jt(), r = s.updateConnection, o = e.builtIn === !0, l = !o && typeof r == "function", [c, d] = k(e.displayName ?? ""), [u, f] = k(e.authKey), [
|
|
2850
|
+
const s = jt(), r = s.updateConnection, o = e.builtIn === !0, l = !o && typeof r == "function", [c, d] = k(e.displayName ?? ""), [u, f] = k(e.authKey), [g, v] = k({}), [w, h] = k(null), [y, m] = k(null), [S, x] = k(!1), [N, T] = k({}), [C, E] = k(null), [P, K] = k(null), [O, $] = k(null);
|
|
2843
2851
|
G(() => {
|
|
2844
2852
|
if (!l) return;
|
|
2845
2853
|
let b = !1;
|
|
2846
|
-
return h(null), s.getAppAuth(e.appId).then((L) => !b && h(L)).catch((L) => !b &&
|
|
2854
|
+
return h(null), s.getAppAuth(e.appId).then((L) => !b && h(L)).catch((L) => !b && m(L.message)), () => {
|
|
2847
2855
|
b = !0;
|
|
2848
2856
|
};
|
|
2849
2857
|
}, [s, l, e.appId]);
|
|
@@ -2855,7 +2863,7 @@ function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
|
2855
2863
|
return;
|
|
2856
2864
|
let b = !1;
|
|
2857
2865
|
return s.getCredential(W).then((L) => {
|
|
2858
|
-
b || (
|
|
2866
|
+
b || (E(L.connectionCount), K(L.contract));
|
|
2859
2867
|
}).catch(() => {
|
|
2860
2868
|
}), () => {
|
|
2861
2869
|
b = !0;
|
|
@@ -2870,42 +2878,42 @@ function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
|
2870
2878
|
}
|
|
2871
2879
|
const b = {};
|
|
2872
2880
|
for (const _ of J) {
|
|
2873
|
-
const D =
|
|
2881
|
+
const D = g[_.key];
|
|
2874
2882
|
D !== void 0 && D !== "" && (b[_.key] = D);
|
|
2875
2883
|
}
|
|
2876
2884
|
const L = {};
|
|
2877
2885
|
return V && (L.authKey = u, L.credential = b), c !== (e.displayName ?? "") && (L.displayName = c), Object.keys(b).length > 0 && (L.credential = b), L.displayName === void 0 && L.credential === void 0 ? null : L;
|
|
2878
2886
|
}
|
|
2879
2887
|
async function ae() {
|
|
2880
|
-
if (!l || !r ||
|
|
2881
|
-
|
|
2888
|
+
if (!l || !r || S) return;
|
|
2889
|
+
m(null);
|
|
2882
2890
|
const b = Ie(), L = Object.fromEntries(
|
|
2883
|
-
J.filter((M) =>
|
|
2891
|
+
J.filter((M) => g[M.key] !== void 0 && g[M.key] !== "").map((M) => [M.key, g[M.key]])
|
|
2884
2892
|
), _ = Object.keys(L).length > 0;
|
|
2885
2893
|
if (!b && !_) {
|
|
2886
|
-
|
|
2894
|
+
m("Nothing to update — change the name or a credential or binding field.");
|
|
2887
2895
|
return;
|
|
2888
2896
|
}
|
|
2889
2897
|
if (V || j && _) {
|
|
2890
2898
|
const M = J.filter((U) => U.required && !(U.key in L));
|
|
2891
2899
|
if (M.length > 0) {
|
|
2892
|
-
|
|
2900
|
+
m(`Enter the full new credential: ${M.map((U) => U.label).join(", ")}.`);
|
|
2893
2901
|
return;
|
|
2894
2902
|
}
|
|
2895
2903
|
}
|
|
2896
2904
|
const D = Dn(J, L);
|
|
2897
2905
|
if ("error" in D) {
|
|
2898
|
-
|
|
2906
|
+
m(D.error);
|
|
2899
2907
|
return;
|
|
2900
2908
|
}
|
|
2901
2909
|
x(!0);
|
|
2902
2910
|
let se = !1;
|
|
2903
2911
|
try {
|
|
2904
|
-
j && _ && W && s.rotateCredential ? (await s.rotateCredential(W, { source: D.values }), se = !0, v({}),
|
|
2912
|
+
j && _ && W && s.rotateCredential ? (await s.rotateCredential(W, { source: D.values }), se = !0, v({}), $(null)) : b != null && b.credential && (b.credential = D.values);
|
|
2905
2913
|
const M = b ? await r.call(s, e.id, b) : e;
|
|
2906
2914
|
v({}), a(M);
|
|
2907
2915
|
} catch (M) {
|
|
2908
|
-
|
|
2916
|
+
m(
|
|
2909
2917
|
se ? `The credential was saved, but the other changes failed. Click Save to retry them. ${M.message}` : M.message
|
|
2910
2918
|
);
|
|
2911
2919
|
} finally {
|
|
@@ -2914,20 +2922,20 @@ function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
|
2914
2922
|
}
|
|
2915
2923
|
async function Pe() {
|
|
2916
2924
|
if (!(!W || !s.testCredential)) {
|
|
2917
|
-
|
|
2925
|
+
m(null);
|
|
2918
2926
|
try {
|
|
2919
|
-
|
|
2927
|
+
$(await s.testCredential(W));
|
|
2920
2928
|
} catch (b) {
|
|
2921
|
-
|
|
2929
|
+
m(b.message);
|
|
2922
2930
|
}
|
|
2923
2931
|
}
|
|
2924
2932
|
}
|
|
2925
|
-
const ee = Mn(ae, { enabled: l &&
|
|
2933
|
+
const ee = Mn(ae, { enabled: l && !S });
|
|
2926
2934
|
return /* @__PURE__ */ t($e, { title: "Edit connection", onClose: n, children: /* @__PURE__ */ i("div", { className: "w6w-stepconfig", children: [
|
|
2927
2935
|
/* @__PURE__ */ t("div", { className: "w6w-modal-body", children: /* @__PURE__ */ i("div", { className: "w6w-stack", children: [
|
|
2928
2936
|
o && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "This connection is built in — it has no stored credential to edit." }),
|
|
2929
2937
|
!o && !l && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Editing connections is not available here." }),
|
|
2930
|
-
l && /* @__PURE__ */ i(
|
|
2938
|
+
l && /* @__PURE__ */ i(R, { children: [
|
|
2931
2939
|
/* @__PURE__ */ i("label", { className: "w6w-field", children: [
|
|
2932
2940
|
/* @__PURE__ */ t("span", { children: "Display name" }),
|
|
2933
2941
|
/* @__PURE__ */ t(
|
|
@@ -2955,9 +2963,9 @@ function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
|
2955
2963
|
{
|
|
2956
2964
|
name: "w6w-connection-auth",
|
|
2957
2965
|
value: u,
|
|
2958
|
-
disabled:
|
|
2966
|
+
disabled: S,
|
|
2959
2967
|
onChange: (b) => {
|
|
2960
|
-
f(b.target.value), v({}), T({}),
|
|
2968
|
+
f(b.target.value), v({}), T({}), $(null), m(null);
|
|
2961
2969
|
},
|
|
2962
2970
|
children: [
|
|
2963
2971
|
!q.some((b) => b.key === e.authKey) && /* @__PURE__ */ t("option", { value: e.authKey, children: e.authKey }),
|
|
@@ -2969,7 +2977,7 @@ function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
|
2969
2977
|
V && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Enter the new credential and click Save. This connection stays linked to your existing workflows." }),
|
|
2970
2978
|
w === null && !y && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Loading auth fields…" }),
|
|
2971
2979
|
Z && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: q.some((b) => b.key !== e.authKey) ? "This connection uses OAuth. Choose another authentication method above to use a key or token." : "This is an OAuth connection. You can rename it here; its credential is renewed by re-authorizing it." }),
|
|
2972
|
-
j && Q.length > 0 && /* @__PURE__ */ i(
|
|
2980
|
+
j && Q.length > 0 && /* @__PURE__ */ i(R, { children: [
|
|
2973
2981
|
/* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Leave a binding field blank to keep it unchanged." }),
|
|
2974
2982
|
/* @__PURE__ */ t(
|
|
2975
2983
|
Be,
|
|
@@ -3003,7 +3011,7 @@ function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
|
3003
3011
|
" ",
|
|
3004
3012
|
e.lastTestOk === !0 ? "passed" : e.lastTestOk === !1 ? "failed" : "never tested"
|
|
3005
3013
|
] }),
|
|
3006
|
-
J.length > 0 && /* @__PURE__ */ i(
|
|
3014
|
+
J.length > 0 && /* @__PURE__ */ i(R, { children: [
|
|
3007
3015
|
/* @__PURE__ */ i("p", { className: "w6w-muted w6w-small", children: [
|
|
3008
3016
|
"Leave the credential blank to keep it unchanged. To replace it, enter the full new credential and click Save.",
|
|
3009
3017
|
C !== null && C > 1 && ` This credential is used by ${C} connections; saving a new credential updates all of them.`
|
|
@@ -3013,21 +3021,21 @@ function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
|
3013
3021
|
{
|
|
3014
3022
|
mode: "edit",
|
|
3015
3023
|
fields: J,
|
|
3016
|
-
values:
|
|
3024
|
+
values: g,
|
|
3017
3025
|
onChange: v,
|
|
3018
3026
|
enterSubmitProps: ee
|
|
3019
3027
|
}
|
|
3020
3028
|
)
|
|
3021
3029
|
] })
|
|
3022
3030
|
] }),
|
|
3023
|
-
!j && J.length > 0 && /* @__PURE__ */ i(
|
|
3031
|
+
!j && J.length > 0 && /* @__PURE__ */ i(R, { children: [
|
|
3024
3032
|
!V && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Leave a field blank to keep it unchanged. Filled fields replace the stored credential." }),
|
|
3025
3033
|
/* @__PURE__ */ t(
|
|
3026
3034
|
Be,
|
|
3027
3035
|
{
|
|
3028
3036
|
mode: "edit",
|
|
3029
3037
|
fields: J,
|
|
3030
|
-
values:
|
|
3038
|
+
values: g,
|
|
3031
3039
|
onChange: v,
|
|
3032
3040
|
enterSubmitProps: ee
|
|
3033
3041
|
}
|
|
@@ -3038,7 +3046,7 @@ function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
|
3038
3046
|
] }) }),
|
|
3039
3047
|
/* @__PURE__ */ i("div", { className: "w6w-modal-actions", children: [
|
|
3040
3048
|
/* @__PURE__ */ t("button", { type: "button", className: "w6w-btn w6w-btn-ghost", onClick: n, children: "Cancel" }),
|
|
3041
|
-
l && /* @__PURE__ */ t("button", { type: "button", className: "w6w-btn", disabled:
|
|
3049
|
+
l && /* @__PURE__ */ t("button", { type: "button", className: "w6w-btn", disabled: S, onClick: ae, children: S ? "Saving…" : "Save" })
|
|
3042
3050
|
] })
|
|
3043
3051
|
] }) });
|
|
3044
3052
|
}
|
|
@@ -3099,8 +3107,8 @@ function Is({
|
|
|
3099
3107
|
className: o,
|
|
3100
3108
|
testId: l
|
|
3101
3109
|
}) {
|
|
3102
|
-
const c = r ?? ja, d = Number.isFinite(s) && s > 0, u = a > 0 ? Ft(n / a * 100) : 100, f = d && a > 0 ? Ft(Math.min(100 - u, s / a * 100)) : 0,
|
|
3103
|
-
return
|
|
3110
|
+
const c = r ?? ja, d = Number.isFinite(s) && s > 0, u = a > 0 ? Ft(n / a * 100) : 100, f = d && a > 0 ? Ft(Math.min(100 - u, s / a * 100)) : 0, g = n >= a, v = `${c(n)} / ${c(a)}`, w = ["w6w-budget-meter"];
|
|
3111
|
+
return g && w.push("w6w-budget-meter-over"), o && w.push(o), /* @__PURE__ */ i(
|
|
3104
3112
|
"div",
|
|
3105
3113
|
{
|
|
3106
3114
|
role: "meter",
|
|
@@ -3393,7 +3401,7 @@ function Gs({
|
|
|
3393
3401
|
formatSize: d,
|
|
3394
3402
|
slots: u
|
|
3395
3403
|
}) {
|
|
3396
|
-
const f = d ?? qt,
|
|
3404
|
+
const f = d ?? qt, g = o !== void 0 || l !== void 0, v = [
|
|
3397
3405
|
{ key: "name", header: "Name", render: (w) => /* @__PURE__ */ t("strong", { children: w.name }) },
|
|
3398
3406
|
{ key: "kind", header: "Kind", render: (w) => Ja[w.kind] },
|
|
3399
3407
|
{ key: "entries", header: "Entries", align: "right", render: (w) => String(w.entryCount) },
|
|
@@ -3404,7 +3412,7 @@ function Gs({
|
|
|
3404
3412
|
render: (w) => new Date(w.updatedAt).toLocaleString()
|
|
3405
3413
|
}
|
|
3406
3414
|
];
|
|
3407
|
-
return
|
|
3415
|
+
return g && v.push({
|
|
3408
3416
|
key: "actions",
|
|
3409
3417
|
header: "",
|
|
3410
3418
|
align: "right",
|
|
@@ -3439,7 +3447,7 @@ function Gs({
|
|
|
3439
3447
|
] }),
|
|
3440
3448
|
a && /* @__PURE__ */ t("div", { className: "w6w-error", children: a }),
|
|
3441
3449
|
n && /* @__PURE__ */ t("p", { className: "w6w-muted", children: "Loading…" }),
|
|
3442
|
-
e.length === 0 && !n ? /* @__PURE__ */ t(
|
|
3450
|
+
e.length === 0 && !n ? /* @__PURE__ */ t(Te, { testId: "w6w-data-store-list-empty", children: (u == null ? void 0 : u.empty) ?? "No data stores yet." }) : /* @__PURE__ */ t(
|
|
3443
3451
|
he,
|
|
3444
3452
|
{
|
|
3445
3453
|
columns: v,
|
|
@@ -3467,22 +3475,22 @@ function Xs(e) {
|
|
|
3467
3475
|
function f() {
|
|
3468
3476
|
a([...n, { name: "", type: "string", required: !1 }]);
|
|
3469
3477
|
}
|
|
3470
|
-
function
|
|
3471
|
-
a(n.map((
|
|
3478
|
+
function g(h, y) {
|
|
3479
|
+
a(n.map((m, S) => S === h ? { ...m, ...y } : m));
|
|
3472
3480
|
}
|
|
3473
|
-
function v(h, y,
|
|
3474
|
-
const x = { ...n[h],
|
|
3475
|
-
c((C) => ({ ...C, [h]: T === void 0 ? { text:
|
|
3481
|
+
function v(h, y, m, S) {
|
|
3482
|
+
const x = { ...n[h], ...S, type: y }, { column: N, error: T } = ss(x, m);
|
|
3483
|
+
c((C) => ({ ...C, [h]: T === void 0 ? { text: m } : { text: m, error: T } })), a(n.map((C, E) => E === h ? N : C));
|
|
3476
3484
|
}
|
|
3477
3485
|
function w(h) {
|
|
3478
3486
|
c((y) => {
|
|
3479
|
-
const
|
|
3480
|
-
for (const [
|
|
3481
|
-
const N = Number(
|
|
3482
|
-
N < h ?
|
|
3487
|
+
const m = {};
|
|
3488
|
+
for (const [S, x] of Object.entries(y)) {
|
|
3489
|
+
const N = Number(S);
|
|
3490
|
+
N < h ? m[N] = x : N > h && (m[N - 1] = x);
|
|
3483
3491
|
}
|
|
3484
|
-
return
|
|
3485
|
-
}), a(n.filter((y,
|
|
3492
|
+
return m;
|
|
3493
|
+
}), a(n.filter((y, m) => m !== h));
|
|
3486
3494
|
}
|
|
3487
3495
|
return /* @__PURE__ */ i("div", { className: "w6w-data-columns", children: [
|
|
3488
3496
|
/* @__PURE__ */ i("div", { className: "w6w-data-columns-head", children: [
|
|
@@ -3499,7 +3507,7 @@ function Xs(e) {
|
|
|
3499
3507
|
/* @__PURE__ */ t("span", {})
|
|
3500
3508
|
] }),
|
|
3501
3509
|
/* @__PURE__ */ t("ul", { className: "w6w-data-columns-list", "data-testid": "data-columns", children: n.map((h, y) => {
|
|
3502
|
-
const
|
|
3510
|
+
const m = l[y], S = (m == null ? void 0 : m.text) ?? ot(h.type, h.default);
|
|
3503
3511
|
return (
|
|
3504
3512
|
// biome-ignore lint/suspicious/noArrayIndexKey: rows are positional and reorderable
|
|
3505
3513
|
/* @__PURE__ */ i("li", { className: "w6w-data-columns-row", children: [
|
|
@@ -3510,7 +3518,7 @@ function Xs(e) {
|
|
|
3510
3518
|
value: h.name,
|
|
3511
3519
|
placeholder: "name",
|
|
3512
3520
|
"aria-label": "Column name",
|
|
3513
|
-
onChange: (x) =>
|
|
3521
|
+
onChange: (x) => g(y, { name: x.target.value })
|
|
3514
3522
|
}
|
|
3515
3523
|
),
|
|
3516
3524
|
/* @__PURE__ */ t(
|
|
@@ -3518,7 +3526,7 @@ function Xs(e) {
|
|
|
3518
3526
|
{
|
|
3519
3527
|
value: h.type,
|
|
3520
3528
|
"aria-label": "Column type",
|
|
3521
|
-
onChange: (x) => v(y, x.target.value,
|
|
3529
|
+
onChange: (x) => v(y, x.target.value, S),
|
|
3522
3530
|
children: Qt.map((x) => /* @__PURE__ */ t("option", { value: x, children: x }, x))
|
|
3523
3531
|
}
|
|
3524
3532
|
),
|
|
@@ -3529,7 +3537,7 @@ function Xs(e) {
|
|
|
3529
3537
|
type: "checkbox",
|
|
3530
3538
|
checked: h.required,
|
|
3531
3539
|
"aria-label": "Required",
|
|
3532
|
-
onChange: (x) =>
|
|
3540
|
+
onChange: (x) => g(y, { required: x.target.checked })
|
|
3533
3541
|
}
|
|
3534
3542
|
),
|
|
3535
3543
|
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: "required" })
|
|
@@ -3538,7 +3546,7 @@ function Xs(e) {
|
|
|
3538
3546
|
"input",
|
|
3539
3547
|
{
|
|
3540
3548
|
type: "text",
|
|
3541
|
-
value:
|
|
3549
|
+
value: S,
|
|
3542
3550
|
placeholder: "default",
|
|
3543
3551
|
"aria-label": "Column default",
|
|
3544
3552
|
onChange: (x) => v(y, h.type, x.target.value)
|
|
@@ -3551,12 +3559,12 @@ function Xs(e) {
|
|
|
3551
3559
|
onClick: () => w(y)
|
|
3552
3560
|
}
|
|
3553
3561
|
),
|
|
3554
|
-
(
|
|
3562
|
+
(m == null ? void 0 : m.error) !== void 0 && /* @__PURE__ */ t(
|
|
3555
3563
|
"div",
|
|
3556
3564
|
{
|
|
3557
3565
|
className: "w6w-result w6w-error w6w-data-columns-error",
|
|
3558
3566
|
"data-testid": `data-store-column-default-error-${y}`,
|
|
3559
|
-
children:
|
|
3567
|
+
children: m.error
|
|
3560
3568
|
}
|
|
3561
3569
|
),
|
|
3562
3570
|
h.name !== "" && o[h.name] !== void 0 && /* @__PURE__ */ t(
|
|
@@ -3720,17 +3728,17 @@ function el({
|
|
|
3720
3728
|
saving: d,
|
|
3721
3729
|
onTextChange: u,
|
|
3722
3730
|
onKeyChange: f,
|
|
3723
|
-
onDelete:
|
|
3731
|
+
onDelete: g,
|
|
3724
3732
|
onSave: v,
|
|
3725
3733
|
onCancel: w,
|
|
3726
3734
|
onReload: h
|
|
3727
3735
|
}) {
|
|
3728
|
-
const [y,
|
|
3736
|
+
const [y, m] = k(n), [S, x] = k(!1), N = Jt(null);
|
|
3729
3737
|
G(() => {
|
|
3730
3738
|
var O;
|
|
3731
3739
|
n || (O = N.current) == null || O.focus();
|
|
3732
3740
|
}, [n]);
|
|
3733
|
-
const T = e === "doc" ? "document" : "entry", C = e === "doc" ? ns(o) : void 0,
|
|
3741
|
+
const T = e === "doc" ? "document" : "entry", C = e === "doc" ? ns(o) : void 0, E = C !== void 0 && !C.ok, P = l || (S && C && !C.ok ? C.message : null), K = /* @__PURE__ */ i(R, { children: [
|
|
3734
3742
|
n ? /* @__PURE__ */ i("label", { className: "w6w-field", children: [
|
|
3735
3743
|
/* @__PURE__ */ t("span", { children: "Key" }),
|
|
3736
3744
|
/* @__PURE__ */ t(
|
|
@@ -3757,7 +3765,7 @@ function el({
|
|
|
3757
3765
|
},
|
|
3758
3766
|
onFocus: () => x(!1),
|
|
3759
3767
|
onBlur: () => x(!0),
|
|
3760
|
-
showDiagnostics:
|
|
3768
|
+
showDiagnostics: S,
|
|
3761
3769
|
minHeight: "min(50vh, 400px)",
|
|
3762
3770
|
maxHeight: "60vh"
|
|
3763
3771
|
}
|
|
@@ -3799,13 +3807,13 @@ function el({
|
|
|
3799
3807
|
children: [
|
|
3800
3808
|
/* @__PURE__ */ t("div", { className: "w6w-modal-body", "data-testid": "entry-editor", children: K }),
|
|
3801
3809
|
/* @__PURE__ */ i("div", { className: "w6w-modal-actions", children: [
|
|
3802
|
-
!n &&
|
|
3810
|
+
!n && g && /* @__PURE__ */ t(
|
|
3803
3811
|
ue,
|
|
3804
3812
|
{
|
|
3805
3813
|
label: "Delete entry",
|
|
3806
3814
|
className: "w6w-data-entry-delete",
|
|
3807
3815
|
disabled: d,
|
|
3808
|
-
onClick:
|
|
3816
|
+
onClick: g
|
|
3809
3817
|
}
|
|
3810
3818
|
),
|
|
3811
3819
|
/* @__PURE__ */ t(
|
|
@@ -3825,7 +3833,7 @@ function el({
|
|
|
3825
3833
|
className: "w6w-btn",
|
|
3826
3834
|
type: "button",
|
|
3827
3835
|
"data-testid": "entry-save",
|
|
3828
|
-
disabled: !!c || !!d ||
|
|
3836
|
+
disabled: !!c || !!d || E || n && !(s != null && s.trim()),
|
|
3829
3837
|
onClick: v,
|
|
3830
3838
|
children: "Save"
|
|
3831
3839
|
}
|
|
@@ -3835,7 +3843,7 @@ function el({
|
|
|
3835
3843
|
className: "w6w-btn",
|
|
3836
3844
|
type: "button",
|
|
3837
3845
|
disabled: d,
|
|
3838
|
-
onClick: () =>
|
|
3846
|
+
onClick: () => m(!0),
|
|
3839
3847
|
children: "Edit"
|
|
3840
3848
|
}
|
|
3841
3849
|
)
|
|
@@ -3857,24 +3865,24 @@ function tl({
|
|
|
3857
3865
|
onCellChange: d,
|
|
3858
3866
|
onSave: u,
|
|
3859
3867
|
onDelete: f,
|
|
3860
|
-
onReload:
|
|
3868
|
+
onReload: g,
|
|
3861
3869
|
onAddRow: v,
|
|
3862
3870
|
onLoadMore: w,
|
|
3863
3871
|
onSearch: h
|
|
3864
3872
|
}) {
|
|
3865
|
-
const [y,
|
|
3873
|
+
const [y, m] = k(l ?? ""), S = (N) => {
|
|
3866
3874
|
N.preventDefault(), h(y);
|
|
3867
3875
|
}, x = [
|
|
3868
3876
|
...e.map((N) => ({
|
|
3869
3877
|
key: N.name,
|
|
3870
|
-
header: /* @__PURE__ */ i(
|
|
3878
|
+
header: /* @__PURE__ */ i(R, { children: [
|
|
3871
3879
|
N.name,
|
|
3872
3880
|
" ",
|
|
3873
3881
|
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: N.type })
|
|
3874
3882
|
] }),
|
|
3875
3883
|
render: (T) => {
|
|
3876
|
-
var
|
|
3877
|
-
const C = (
|
|
3884
|
+
var E;
|
|
3885
|
+
const C = (E = T.cellErrors) == null ? void 0 : E[N.name];
|
|
3878
3886
|
return /* @__PURE__ */ i("div", { className: "w6w-data-cell", children: [
|
|
3879
3887
|
/* @__PURE__ */ t(
|
|
3880
3888
|
"input",
|
|
@@ -3926,7 +3934,7 @@ function tl({
|
|
|
3926
3934
|
className: "w6w-btn w6w-btn-ghost",
|
|
3927
3935
|
type: "button",
|
|
3928
3936
|
"data-testid": "row-reload",
|
|
3929
|
-
onClick: () =>
|
|
3937
|
+
onClick: () => g(N.id),
|
|
3930
3938
|
children: "Reload"
|
|
3931
3939
|
}
|
|
3932
3940
|
)
|
|
@@ -3936,7 +3944,7 @@ function tl({
|
|
|
3936
3944
|
];
|
|
3937
3945
|
return /* @__PURE__ */ i("div", { children: [
|
|
3938
3946
|
s != null && s !== "" && /* @__PURE__ */ t("div", { className: "w6w-error", "data-testid": "grid-error", children: s }),
|
|
3939
|
-
/* @__PURE__ */ i("form", { className: "w6w-data-entries-toolbar", "data-testid": "entry-search", onSubmit:
|
|
3947
|
+
/* @__PURE__ */ i("form", { className: "w6w-data-entries-toolbar", "data-testid": "entry-search", onSubmit: S, children: [
|
|
3940
3948
|
/* @__PURE__ */ t(
|
|
3941
3949
|
"input",
|
|
3942
3950
|
{
|
|
@@ -3945,7 +3953,7 @@ function tl({
|
|
|
3945
3953
|
value: y,
|
|
3946
3954
|
placeholder: "Key prefix",
|
|
3947
3955
|
"aria-label": "Key prefix",
|
|
3948
|
-
onChange: (N) =>
|
|
3956
|
+
onChange: (N) => m(N.target.value)
|
|
3949
3957
|
}
|
|
3950
3958
|
),
|
|
3951
3959
|
/* @__PURE__ */ t("button", { className: "w6w-btn w6w-btn-ghost", type: "submit", children: "Search" }),
|
|
@@ -3997,15 +4005,15 @@ export {
|
|
|
3997
4005
|
Va as CELL_PROBLEM_COPY,
|
|
3998
4006
|
Wa as CSV_MAX_BYTES,
|
|
3999
4007
|
es as CSV_TOO_LARGE_COPY,
|
|
4000
|
-
|
|
4008
|
+
Es as CallableList,
|
|
4001
4009
|
il as CanvasLayer,
|
|
4002
|
-
|
|
4010
|
+
Ae as CodeBlock,
|
|
4003
4011
|
rl as CodeEditor,
|
|
4004
4012
|
Xs as ColumnsEditor,
|
|
4005
4013
|
Tn as Combobox,
|
|
4006
4014
|
An as ConfirmModal,
|
|
4007
4015
|
Os as ConnectionHeader,
|
|
4008
|
-
|
|
4016
|
+
Rs as ConnectionList,
|
|
4009
4017
|
tt as Copyable,
|
|
4010
4018
|
Gn as CopyableText,
|
|
4011
4019
|
ol as CredentialPicker,
|
|
@@ -4023,7 +4031,7 @@ export {
|
|
|
4023
4031
|
ue as DeleteButton,
|
|
4024
4032
|
Ht as EditButton,
|
|
4025
4033
|
_s as EditConnectionModal,
|
|
4026
|
-
|
|
4034
|
+
Te as EmptyState,
|
|
4027
4035
|
$s as ExecutionDetail,
|
|
4028
4036
|
Cs as ExecutionFilters,
|
|
4029
4037
|
xs as ExecutionList,
|
|
@@ -4087,9 +4095,9 @@ export {
|
|
|
4087
4095
|
Re as formatExecutionTime,
|
|
4088
4096
|
Al as htmlPreviewSrcDoc,
|
|
4089
4097
|
Hl as iconNames,
|
|
4090
|
-
|
|
4098
|
+
El as indexNodeSamples,
|
|
4091
4099
|
Us as isCellValue,
|
|
4092
|
-
|
|
4100
|
+
Rl as isExprValue,
|
|
4093
4101
|
_l as isFormResolvedOptions,
|
|
4094
4102
|
Ol as isSecretValue,
|
|
4095
4103
|
Il as isTestRequired,
|