@w6w/ui 0.2.59 → 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 +6 -0
- package/dist/StepBuilderModal.d.ts +16 -2
- package/dist/connection-app-meta-BXCIgekK.cjs +24 -0
- package/dist/connection-app-meta-BXCIgekK.cjs.map +1 -0
- package/dist/{connection-app-meta-Cl6mUAMF.js → connection-app-meta-CEkQSIlc.js} +3460 -3346
- package/dist/connection-app-meta-CEkQSIlc.js.map +1 -0
- package/dist/flow.cjs +1 -1
- package/dist/flow.mjs +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +221 -203
- package/dist/index.mjs.map +1 -1
- package/dist/provider.d.ts +12 -0
- package/package.json +1 -1
- package/src/styles/_execution-log.scss +16 -0
- package/src/styles.css +19 -0
- package/dist/connection-app-meta-CNEwLsL3.cjs +0 -24
- package/dist/connection-app-meta-CNEwLsL3.cjs.map +0 -1
- package/dist/connection-app-meta-Cl6mUAMF.js.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
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, 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-
|
|
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-
|
|
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
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
9
|
import { u as Bn, b as Kn, c as jn, a as tt, I as Xe, C as Ae } from "./CodeBlock-CPKXSNEs.js";
|
|
@@ -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;
|
|
@@ -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
|
}
|
|
@@ -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
|
{
|
|
@@ -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" }),
|
|
@@ -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(
|
|
@@ -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,15 +1494,15 @@ 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((
|
|
1505
|
+
] }) : null, d = zt(e.filter((g) => !At(g))), u = e.filter(At), f = u.length > 0 ? /* @__PURE__ */ t(ga, { steps: u }) : null;
|
|
1506
1506
|
return d.length === 0 ? /* @__PURE__ */ i(R, { children: [
|
|
1507
1507
|
o,
|
|
1508
1508
|
c,
|
|
@@ -1511,7 +1511,7 @@ function pa({
|
|
|
1511
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,37 +1527,40 @@ 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(Et, { title: "Input", value: e.input }),
|
|
1559
|
-
/* @__PURE__ */ t(Et, { title: "Output", value: e.output }),
|
|
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
1565
|
/* @__PURE__ */ t(Ae, { code: e.logs.join(`
|
|
1563
1566
|
`), language: "plaintext" })
|
|
@@ -1566,38 +1569,44 @@ function Yt({ step: e }) {
|
|
|
1566
1569
|
/* @__PURE__ */ t("strong", { className: "w6w-small", children: "Metadata" }),
|
|
1567
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 Et({
|
|
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,13 +1707,13 @@ function Et({ 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
|
);
|
|
@@ -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
|
}
|
|
@@ -2450,12 +2468,12 @@ 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
2478
|
} = Da(e, { compact: s, limit: o }), N = r ?? !s, T = d !== void 0 || u !== void 0, C = (E) => {
|
|
2461
2479
|
const P = E.startsWith("Show") ? "w6w-muted w6w-small" : void 0;
|
|
@@ -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" }),
|
|
@@ -2512,10 +2530,10 @@ function As({
|
|
|
2512
2530
|
] })
|
|
2513
2531
|
] }),
|
|
2514
2532
|
/* @__PURE__ */ t("div", { className: "w6w-rel-issues", children: [...h, ...y].map((E) => /* @__PURE__ */ t(Fa, { service: E, getHref: l, onOpen: c }, E.appId)) }),
|
|
2515
|
-
|
|
2516
|
-
|
|
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
2539
|
T && /* @__PURE__ */ i(R, { children: [
|
|
@@ -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,12 +2558,12 @@ 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
2569
|
service: E,
|
|
@@ -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)
|
|
@@ -2617,23 +2635,23 @@ function Es({
|
|
|
2617
2635
|
error: d,
|
|
2618
2636
|
onCreate: u,
|
|
2619
2637
|
creating: f,
|
|
2620
|
-
onImport:
|
|
2638
|
+
onImport: g,
|
|
2621
2639
|
onOpen: v,
|
|
2622
2640
|
getHref: w,
|
|
2623
2641
|
showArchived: h,
|
|
2624
2642
|
onShowArchivedChange: y,
|
|
2625
|
-
slots:
|
|
2643
|
+
slots: m
|
|
2626
2644
|
}) {
|
|
2627
|
-
const [
|
|
2628
|
-
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($);
|
|
2629
2647
|
}, K = [
|
|
2630
2648
|
{
|
|
2631
2649
|
key: "main",
|
|
2632
2650
|
header: "Name",
|
|
2633
|
-
render: (
|
|
2651
|
+
render: ($) => {
|
|
2634
2652
|
const I = /* @__PURE__ */ i("span", { className: "w6w-callable-list-main", title: E ? o : void 0, children: [
|
|
2635
|
-
/* @__PURE__ */ t("span", { children:
|
|
2636
|
-
|
|
2653
|
+
/* @__PURE__ */ t("span", { children: $.title }),
|
|
2654
|
+
$.description != null && /* @__PURE__ */ t("span", { className: "w6w-muted w6w-small w6w-callable-list-row-desc", children: $.description })
|
|
2637
2655
|
] });
|
|
2638
2656
|
return v && !w ? /* @__PURE__ */ t("button", { type: "button", className: "w6w-callable-list-open", children: I }) : I;
|
|
2639
2657
|
}
|
|
@@ -2645,17 +2663,17 @@ function Es({
|
|
|
2645
2663
|
// Shrink to the badges (`1%` + the trail's `nowrap`): left unsized, the table split the
|
|
2646
2664
|
// width evenly and a "draft · 0 runs" column took half of it.
|
|
2647
2665
|
width: "1%",
|
|
2648
|
-
render: (
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
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
|
|
2652
2670
|
] }) : null
|
|
2653
2671
|
}
|
|
2654
2672
|
], O = e.length > 0 && C.length === 0;
|
|
2655
2673
|
return /* @__PURE__ */ i("section", { className: "w6w-callable-list", children: [
|
|
2656
2674
|
/* @__PURE__ */ i("div", { className: "w6w-callable-list-head", children: [
|
|
2657
2675
|
/* @__PURE__ */ i("div", { className: "w6w-callable-list-heading", children: [
|
|
2658
|
-
(
|
|
2676
|
+
(m == null ? void 0 : m.header) ?? /* @__PURE__ */ i(R, { children: [
|
|
2659
2677
|
/* @__PURE__ */ t("h2", { className: "w6w-callable-list-title", children: n }),
|
|
2660
2678
|
a != null && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small w6w-callable-list-description", children: a })
|
|
2661
2679
|
] }),
|
|
@@ -2666,21 +2684,21 @@ function Es({
|
|
|
2666
2684
|
type: "checkbox",
|
|
2667
2685
|
checked: T,
|
|
2668
2686
|
"data-testid": l == null ? void 0 : l.showArchived,
|
|
2669
|
-
onChange: (
|
|
2687
|
+
onChange: ($) => P($.target.checked)
|
|
2670
2688
|
}
|
|
2671
2689
|
),
|
|
2672
2690
|
"Show archived"
|
|
2673
2691
|
] })
|
|
2674
2692
|
] }),
|
|
2675
2693
|
/* @__PURE__ */ i("div", { className: "w6w-callable-list-actions", children: [
|
|
2676
|
-
|
|
2677
|
-
|
|
2694
|
+
m == null ? void 0 : m.actions,
|
|
2695
|
+
g && /* @__PURE__ */ t(
|
|
2678
2696
|
"button",
|
|
2679
2697
|
{
|
|
2680
2698
|
type: "button",
|
|
2681
2699
|
className: "w6w-btn w6w-btn-ghost",
|
|
2682
2700
|
"data-testid": l == null ? void 0 : l.importOpen,
|
|
2683
|
-
onClick:
|
|
2701
|
+
onClick: g,
|
|
2684
2702
|
children: "Import"
|
|
2685
2703
|
}
|
|
2686
2704
|
),
|
|
@@ -2705,16 +2723,16 @@ function Es({
|
|
|
2705
2723
|
),
|
|
2706
2724
|
children: e.length === 1 ? "The only item is archived." : `All ${e.length} items are archived.`
|
|
2707
2725
|
}
|
|
2708
|
-
) : /* @__PURE__ */ t(Te, { testId: "w6w-callable-list-empty", children: (
|
|
2726
|
+
) : /* @__PURE__ */ t(Te, { testId: "w6w-callable-list-empty", children: (m == null ? void 0 : m.empty) ?? s }) : /* @__PURE__ */ t(
|
|
2709
2727
|
he,
|
|
2710
2728
|
{
|
|
2711
2729
|
columns: K,
|
|
2712
2730
|
rows: C,
|
|
2713
|
-
rowKey: (
|
|
2731
|
+
rowKey: ($) => $.id,
|
|
2714
2732
|
className: "w6w-data-table-rows",
|
|
2715
2733
|
loading: c,
|
|
2716
|
-
getRowHref: w ? (
|
|
2717
|
-
onRowClick: v ? (
|
|
2734
|
+
getRowHref: w ? ($) => w($.id) : void 0,
|
|
2735
|
+
onRowClick: v ? ($, I) => v($.id, I) : void 0
|
|
2718
2736
|
}
|
|
2719
2737
|
)
|
|
2720
2738
|
] })
|
|
@@ -2732,7 +2750,7 @@ function Rs({
|
|
|
2732
2750
|
busy: d,
|
|
2733
2751
|
slots: u
|
|
2734
2752
|
}) {
|
|
2735
|
-
const f = n ?? /* @__PURE__ */ new Map(),
|
|
2753
|
+
const f = n ?? /* @__PURE__ */ new Map(), g = l !== void 0 || c !== void 0, v = [
|
|
2736
2754
|
{
|
|
2737
2755
|
key: "name",
|
|
2738
2756
|
header: "Name",
|
|
@@ -2780,7 +2798,7 @@ function Rs({
|
|
|
2780
2798
|
] })
|
|
2781
2799
|
}
|
|
2782
2800
|
];
|
|
2783
|
-
return
|
|
2801
|
+
return g && v.push({
|
|
2784
2802
|
key: "actions",
|
|
2785
2803
|
header: "",
|
|
2786
2804
|
align: "right",
|
|
@@ -2829,11 +2847,11 @@ function Rs({
|
|
|
2829
2847
|
] });
|
|
2830
2848
|
}
|
|
2831
2849
|
function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
2832
|
-
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);
|
|
2833
2851
|
G(() => {
|
|
2834
2852
|
if (!l) return;
|
|
2835
2853
|
let b = !1;
|
|
2836
|
-
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)), () => {
|
|
2837
2855
|
b = !0;
|
|
2838
2856
|
};
|
|
2839
2857
|
}, [s, l, e.appId]);
|
|
@@ -2860,42 +2878,42 @@ function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
|
2860
2878
|
}
|
|
2861
2879
|
const b = {};
|
|
2862
2880
|
for (const _ of J) {
|
|
2863
|
-
const D =
|
|
2881
|
+
const D = g[_.key];
|
|
2864
2882
|
D !== void 0 && D !== "" && (b[_.key] = D);
|
|
2865
2883
|
}
|
|
2866
2884
|
const L = {};
|
|
2867
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;
|
|
2868
2886
|
}
|
|
2869
2887
|
async function ae() {
|
|
2870
|
-
if (!l || !r ||
|
|
2871
|
-
|
|
2888
|
+
if (!l || !r || S) return;
|
|
2889
|
+
m(null);
|
|
2872
2890
|
const b = Ie(), L = Object.fromEntries(
|
|
2873
|
-
J.filter((M) =>
|
|
2891
|
+
J.filter((M) => g[M.key] !== void 0 && g[M.key] !== "").map((M) => [M.key, g[M.key]])
|
|
2874
2892
|
), _ = Object.keys(L).length > 0;
|
|
2875
2893
|
if (!b && !_) {
|
|
2876
|
-
|
|
2894
|
+
m("Nothing to update — change the name or a credential or binding field.");
|
|
2877
2895
|
return;
|
|
2878
2896
|
}
|
|
2879
2897
|
if (V || j && _) {
|
|
2880
2898
|
const M = J.filter((U) => U.required && !(U.key in L));
|
|
2881
2899
|
if (M.length > 0) {
|
|
2882
|
-
|
|
2900
|
+
m(`Enter the full new credential: ${M.map((U) => U.label).join(", ")}.`);
|
|
2883
2901
|
return;
|
|
2884
2902
|
}
|
|
2885
2903
|
}
|
|
2886
2904
|
const D = Dn(J, L);
|
|
2887
2905
|
if ("error" in D) {
|
|
2888
|
-
|
|
2906
|
+
m(D.error);
|
|
2889
2907
|
return;
|
|
2890
2908
|
}
|
|
2891
2909
|
x(!0);
|
|
2892
2910
|
let se = !1;
|
|
2893
2911
|
try {
|
|
2894
|
-
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);
|
|
2895
2913
|
const M = b ? await r.call(s, e.id, b) : e;
|
|
2896
2914
|
v({}), a(M);
|
|
2897
2915
|
} catch (M) {
|
|
2898
|
-
|
|
2916
|
+
m(
|
|
2899
2917
|
se ? `The credential was saved, but the other changes failed. Click Save to retry them. ${M.message}` : M.message
|
|
2900
2918
|
);
|
|
2901
2919
|
} finally {
|
|
@@ -2904,15 +2922,15 @@ function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
|
2904
2922
|
}
|
|
2905
2923
|
async function Pe() {
|
|
2906
2924
|
if (!(!W || !s.testCredential)) {
|
|
2907
|
-
|
|
2925
|
+
m(null);
|
|
2908
2926
|
try {
|
|
2909
|
-
|
|
2927
|
+
$(await s.testCredential(W));
|
|
2910
2928
|
} catch (b) {
|
|
2911
|
-
|
|
2929
|
+
m(b.message);
|
|
2912
2930
|
}
|
|
2913
2931
|
}
|
|
2914
2932
|
}
|
|
2915
|
-
const ee = Mn(ae, { enabled: l &&
|
|
2933
|
+
const ee = Mn(ae, { enabled: l && !S });
|
|
2916
2934
|
return /* @__PURE__ */ t($e, { title: "Edit connection", onClose: n, children: /* @__PURE__ */ i("div", { className: "w6w-stepconfig", children: [
|
|
2917
2935
|
/* @__PURE__ */ t("div", { className: "w6w-modal-body", children: /* @__PURE__ */ i("div", { className: "w6w-stack", children: [
|
|
2918
2936
|
o && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "This connection is built in — it has no stored credential to edit." }),
|
|
@@ -2945,9 +2963,9 @@ function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
|
2945
2963
|
{
|
|
2946
2964
|
name: "w6w-connection-auth",
|
|
2947
2965
|
value: u,
|
|
2948
|
-
disabled:
|
|
2966
|
+
disabled: S,
|
|
2949
2967
|
onChange: (b) => {
|
|
2950
|
-
f(b.target.value), v({}), T({}),
|
|
2968
|
+
f(b.target.value), v({}), T({}), $(null), m(null);
|
|
2951
2969
|
},
|
|
2952
2970
|
children: [
|
|
2953
2971
|
!q.some((b) => b.key === e.authKey) && /* @__PURE__ */ t("option", { value: e.authKey, children: e.authKey }),
|
|
@@ -3003,7 +3021,7 @@ function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
|
3003
3021
|
{
|
|
3004
3022
|
mode: "edit",
|
|
3005
3023
|
fields: J,
|
|
3006
|
-
values:
|
|
3024
|
+
values: g,
|
|
3007
3025
|
onChange: v,
|
|
3008
3026
|
enterSubmitProps: ee
|
|
3009
3027
|
}
|
|
@@ -3017,7 +3035,7 @@ function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
|
3017
3035
|
{
|
|
3018
3036
|
mode: "edit",
|
|
3019
3037
|
fields: J,
|
|
3020
|
-
values:
|
|
3038
|
+
values: g,
|
|
3021
3039
|
onChange: v,
|
|
3022
3040
|
enterSubmitProps: ee
|
|
3023
3041
|
}
|
|
@@ -3028,7 +3046,7 @@ function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
|
3028
3046
|
] }) }),
|
|
3029
3047
|
/* @__PURE__ */ i("div", { className: "w6w-modal-actions", children: [
|
|
3030
3048
|
/* @__PURE__ */ t("button", { type: "button", className: "w6w-btn w6w-btn-ghost", onClick: n, children: "Cancel" }),
|
|
3031
|
-
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" })
|
|
3032
3050
|
] })
|
|
3033
3051
|
] }) });
|
|
3034
3052
|
}
|
|
@@ -3089,8 +3107,8 @@ function Is({
|
|
|
3089
3107
|
className: o,
|
|
3090
3108
|
testId: l
|
|
3091
3109
|
}) {
|
|
3092
|
-
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,
|
|
3093
|
-
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(
|
|
3094
3112
|
"div",
|
|
3095
3113
|
{
|
|
3096
3114
|
role: "meter",
|
|
@@ -3383,7 +3401,7 @@ function Gs({
|
|
|
3383
3401
|
formatSize: d,
|
|
3384
3402
|
slots: u
|
|
3385
3403
|
}) {
|
|
3386
|
-
const f = d ?? qt,
|
|
3404
|
+
const f = d ?? qt, g = o !== void 0 || l !== void 0, v = [
|
|
3387
3405
|
{ key: "name", header: "Name", render: (w) => /* @__PURE__ */ t("strong", { children: w.name }) },
|
|
3388
3406
|
{ key: "kind", header: "Kind", render: (w) => Ja[w.kind] },
|
|
3389
3407
|
{ key: "entries", header: "Entries", align: "right", render: (w) => String(w.entryCount) },
|
|
@@ -3394,7 +3412,7 @@ function Gs({
|
|
|
3394
3412
|
render: (w) => new Date(w.updatedAt).toLocaleString()
|
|
3395
3413
|
}
|
|
3396
3414
|
];
|
|
3397
|
-
return
|
|
3415
|
+
return g && v.push({
|
|
3398
3416
|
key: "actions",
|
|
3399
3417
|
header: "",
|
|
3400
3418
|
align: "right",
|
|
@@ -3457,22 +3475,22 @@ function Xs(e) {
|
|
|
3457
3475
|
function f() {
|
|
3458
3476
|
a([...n, { name: "", type: "string", required: !1 }]);
|
|
3459
3477
|
}
|
|
3460
|
-
function
|
|
3461
|
-
a(n.map((
|
|
3478
|
+
function g(h, y) {
|
|
3479
|
+
a(n.map((m, S) => S === h ? { ...m, ...y } : m));
|
|
3462
3480
|
}
|
|
3463
|
-
function v(h, y,
|
|
3464
|
-
const x = { ...n[h],
|
|
3465
|
-
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));
|
|
3466
3484
|
}
|
|
3467
3485
|
function w(h) {
|
|
3468
3486
|
c((y) => {
|
|
3469
|
-
const
|
|
3470
|
-
for (const [
|
|
3471
|
-
const N = Number(
|
|
3472
|
-
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);
|
|
3473
3491
|
}
|
|
3474
|
-
return
|
|
3475
|
-
}), a(n.filter((y,
|
|
3492
|
+
return m;
|
|
3493
|
+
}), a(n.filter((y, m) => m !== h));
|
|
3476
3494
|
}
|
|
3477
3495
|
return /* @__PURE__ */ i("div", { className: "w6w-data-columns", children: [
|
|
3478
3496
|
/* @__PURE__ */ i("div", { className: "w6w-data-columns-head", children: [
|
|
@@ -3489,7 +3507,7 @@ function Xs(e) {
|
|
|
3489
3507
|
/* @__PURE__ */ t("span", {})
|
|
3490
3508
|
] }),
|
|
3491
3509
|
/* @__PURE__ */ t("ul", { className: "w6w-data-columns-list", "data-testid": "data-columns", children: n.map((h, y) => {
|
|
3492
|
-
const
|
|
3510
|
+
const m = l[y], S = (m == null ? void 0 : m.text) ?? ot(h.type, h.default);
|
|
3493
3511
|
return (
|
|
3494
3512
|
// biome-ignore lint/suspicious/noArrayIndexKey: rows are positional and reorderable
|
|
3495
3513
|
/* @__PURE__ */ i("li", { className: "w6w-data-columns-row", children: [
|
|
@@ -3500,7 +3518,7 @@ function Xs(e) {
|
|
|
3500
3518
|
value: h.name,
|
|
3501
3519
|
placeholder: "name",
|
|
3502
3520
|
"aria-label": "Column name",
|
|
3503
|
-
onChange: (x) =>
|
|
3521
|
+
onChange: (x) => g(y, { name: x.target.value })
|
|
3504
3522
|
}
|
|
3505
3523
|
),
|
|
3506
3524
|
/* @__PURE__ */ t(
|
|
@@ -3508,7 +3526,7 @@ function Xs(e) {
|
|
|
3508
3526
|
{
|
|
3509
3527
|
value: h.type,
|
|
3510
3528
|
"aria-label": "Column type",
|
|
3511
|
-
onChange: (x) => v(y, x.target.value,
|
|
3529
|
+
onChange: (x) => v(y, x.target.value, S),
|
|
3512
3530
|
children: Qt.map((x) => /* @__PURE__ */ t("option", { value: x, children: x }, x))
|
|
3513
3531
|
}
|
|
3514
3532
|
),
|
|
@@ -3519,7 +3537,7 @@ function Xs(e) {
|
|
|
3519
3537
|
type: "checkbox",
|
|
3520
3538
|
checked: h.required,
|
|
3521
3539
|
"aria-label": "Required",
|
|
3522
|
-
onChange: (x) =>
|
|
3540
|
+
onChange: (x) => g(y, { required: x.target.checked })
|
|
3523
3541
|
}
|
|
3524
3542
|
),
|
|
3525
3543
|
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: "required" })
|
|
@@ -3528,7 +3546,7 @@ function Xs(e) {
|
|
|
3528
3546
|
"input",
|
|
3529
3547
|
{
|
|
3530
3548
|
type: "text",
|
|
3531
|
-
value:
|
|
3549
|
+
value: S,
|
|
3532
3550
|
placeholder: "default",
|
|
3533
3551
|
"aria-label": "Column default",
|
|
3534
3552
|
onChange: (x) => v(y, h.type, x.target.value)
|
|
@@ -3541,12 +3559,12 @@ function Xs(e) {
|
|
|
3541
3559
|
onClick: () => w(y)
|
|
3542
3560
|
}
|
|
3543
3561
|
),
|
|
3544
|
-
(
|
|
3562
|
+
(m == null ? void 0 : m.error) !== void 0 && /* @__PURE__ */ t(
|
|
3545
3563
|
"div",
|
|
3546
3564
|
{
|
|
3547
3565
|
className: "w6w-result w6w-error w6w-data-columns-error",
|
|
3548
3566
|
"data-testid": `data-store-column-default-error-${y}`,
|
|
3549
|
-
children:
|
|
3567
|
+
children: m.error
|
|
3550
3568
|
}
|
|
3551
3569
|
),
|
|
3552
3570
|
h.name !== "" && o[h.name] !== void 0 && /* @__PURE__ */ t(
|
|
@@ -3710,17 +3728,17 @@ function el({
|
|
|
3710
3728
|
saving: d,
|
|
3711
3729
|
onTextChange: u,
|
|
3712
3730
|
onKeyChange: f,
|
|
3713
|
-
onDelete:
|
|
3731
|
+
onDelete: g,
|
|
3714
3732
|
onSave: v,
|
|
3715
3733
|
onCancel: w,
|
|
3716
3734
|
onReload: h
|
|
3717
3735
|
}) {
|
|
3718
|
-
const [y,
|
|
3736
|
+
const [y, m] = k(n), [S, x] = k(!1), N = Jt(null);
|
|
3719
3737
|
G(() => {
|
|
3720
3738
|
var O;
|
|
3721
3739
|
n || (O = N.current) == null || O.focus();
|
|
3722
3740
|
}, [n]);
|
|
3723
|
-
const T = e === "doc" ? "document" : "entry", C = e === "doc" ? ns(o) : void 0, E = C !== void 0 && !C.ok, P = l || (
|
|
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: [
|
|
3724
3742
|
n ? /* @__PURE__ */ i("label", { className: "w6w-field", children: [
|
|
3725
3743
|
/* @__PURE__ */ t("span", { children: "Key" }),
|
|
3726
3744
|
/* @__PURE__ */ t(
|
|
@@ -3747,7 +3765,7 @@ function el({
|
|
|
3747
3765
|
},
|
|
3748
3766
|
onFocus: () => x(!1),
|
|
3749
3767
|
onBlur: () => x(!0),
|
|
3750
|
-
showDiagnostics:
|
|
3768
|
+
showDiagnostics: S,
|
|
3751
3769
|
minHeight: "min(50vh, 400px)",
|
|
3752
3770
|
maxHeight: "60vh"
|
|
3753
3771
|
}
|
|
@@ -3789,13 +3807,13 @@ function el({
|
|
|
3789
3807
|
children: [
|
|
3790
3808
|
/* @__PURE__ */ t("div", { className: "w6w-modal-body", "data-testid": "entry-editor", children: K }),
|
|
3791
3809
|
/* @__PURE__ */ i("div", { className: "w6w-modal-actions", children: [
|
|
3792
|
-
!n &&
|
|
3810
|
+
!n && g && /* @__PURE__ */ t(
|
|
3793
3811
|
ue,
|
|
3794
3812
|
{
|
|
3795
3813
|
label: "Delete entry",
|
|
3796
3814
|
className: "w6w-data-entry-delete",
|
|
3797
3815
|
disabled: d,
|
|
3798
|
-
onClick:
|
|
3816
|
+
onClick: g
|
|
3799
3817
|
}
|
|
3800
3818
|
),
|
|
3801
3819
|
/* @__PURE__ */ t(
|
|
@@ -3825,7 +3843,7 @@ function el({
|
|
|
3825
3843
|
className: "w6w-btn",
|
|
3826
3844
|
type: "button",
|
|
3827
3845
|
disabled: d,
|
|
3828
|
-
onClick: () =>
|
|
3846
|
+
onClick: () => m(!0),
|
|
3829
3847
|
children: "Edit"
|
|
3830
3848
|
}
|
|
3831
3849
|
)
|
|
@@ -3847,12 +3865,12 @@ function tl({
|
|
|
3847
3865
|
onCellChange: d,
|
|
3848
3866
|
onSave: u,
|
|
3849
3867
|
onDelete: f,
|
|
3850
|
-
onReload:
|
|
3868
|
+
onReload: g,
|
|
3851
3869
|
onAddRow: v,
|
|
3852
3870
|
onLoadMore: w,
|
|
3853
3871
|
onSearch: h
|
|
3854
3872
|
}) {
|
|
3855
|
-
const [y,
|
|
3873
|
+
const [y, m] = k(l ?? ""), S = (N) => {
|
|
3856
3874
|
N.preventDefault(), h(y);
|
|
3857
3875
|
}, x = [
|
|
3858
3876
|
...e.map((N) => ({
|
|
@@ -3916,7 +3934,7 @@ function tl({
|
|
|
3916
3934
|
className: "w6w-btn w6w-btn-ghost",
|
|
3917
3935
|
type: "button",
|
|
3918
3936
|
"data-testid": "row-reload",
|
|
3919
|
-
onClick: () =>
|
|
3937
|
+
onClick: () => g(N.id),
|
|
3920
3938
|
children: "Reload"
|
|
3921
3939
|
}
|
|
3922
3940
|
)
|
|
@@ -3926,7 +3944,7 @@ function tl({
|
|
|
3926
3944
|
];
|
|
3927
3945
|
return /* @__PURE__ */ i("div", { children: [
|
|
3928
3946
|
s != null && s !== "" && /* @__PURE__ */ t("div", { className: "w6w-error", "data-testid": "grid-error", children: s }),
|
|
3929
|
-
/* @__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: [
|
|
3930
3948
|
/* @__PURE__ */ t(
|
|
3931
3949
|
"input",
|
|
3932
3950
|
{
|
|
@@ -3935,7 +3953,7 @@ function tl({
|
|
|
3935
3953
|
value: y,
|
|
3936
3954
|
placeholder: "Key prefix",
|
|
3937
3955
|
"aria-label": "Key prefix",
|
|
3938
|
-
onChange: (N) =>
|
|
3956
|
+
onChange: (N) => m(N.target.value)
|
|
3939
3957
|
}
|
|
3940
3958
|
),
|
|
3941
3959
|
/* @__PURE__ */ t("button", { className: "w6w-btn w6w-btn-ghost", type: "submit", children: "Search" }),
|