@w6w/ui 0.2.55 → 0.2.56
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 +4 -0
- package/dist/EditConnectionModal.d.ts +7 -6
- package/dist/connection-app-meta-BEXlKBgV.cjs.map +1 -1
- package/dist/connection-app-meta-ZCPakGjD.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +769 -780
- package/dist/index.mjs.map +1 -1
- package/dist/provider.d.ts +2 -0
- package/package.json +1 -1
- package/src/styles/_tester.scss +2 -3
- package/src/styles.css +2 -3
package/dist/index.mjs
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
var xn = Object.defineProperty;
|
|
3
3
|
var Cn = (e, n, a) => n in e ? xn(e, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[n] = a;
|
|
4
4
|
var Ne = (e, n, a) => Cn(e, typeof n != "symbol" ? n + "" : n, a);
|
|
5
|
-
import { U as
|
|
6
|
-
import { bE as sl, by as ll, aF as il, bW as rl, bX as ol, bY as cl, bZ as dl, aB as ul, b_ as wl, b$ as ml, b3 as hl, bI as pl, bn as fl, b4 as gl, c0 as yl, c1 as
|
|
7
|
-
import { jsx as t, jsxs as i, Fragment as
|
|
8
|
-
import { useMemo as
|
|
9
|
-
import { u as Fn, b as Bn, c as
|
|
5
|
+
import { U as Kt, bl as Sn, J as oe, bA as $n, aN as Ye, bN as bt, aM as $e, aH as Tn, X as An, bO as En, aC as de, N as Rn, bP as _n, bQ as On, aY as Oe, bG as In, bC as ue, bR as Pn, bS as Be, bT as Ln, bU as Mn, bV as Dn } from "./connection-app-meta-ZCPakGjD.js";
|
|
6
|
+
import { bE as sl, by as ll, aF as il, bW as rl, bX as ol, bY as cl, bZ as dl, aB as ul, b_ as wl, b$ as ml, b3 as hl, bI as pl, bn as fl, b4 as gl, c0 as yl, c1 as vl, aI as Nl, c2 as bl, c3 as kl, c4 as xl, c5 as Cl, c6 as Sl, c7 as $l, c8 as Tl, c9 as Al, an as El, ca as Rl, cb as _l, cc as Ol, cd as Il, ce as Pl, cf as Ll, b2 as Ml, cg as Dl, Q as Ul, ch as Fl, ci as Bl, cj as Kl, ck as jl, cl as Jl, u as Wl, b1 as Vl } from "./connection-app-meta-ZCPakGjD.js";
|
|
7
|
+
import { jsx as t, jsxs as i, Fragment as R } from "react/jsx-runtime";
|
|
8
|
+
import { useMemo as Ge, useState as k, useEffect as G, useId as Un, useRef as jt } from "react";
|
|
9
|
+
import { u as Fn, b as Bn, c as Kn, a as jn, I as Xe, C as Te } from "./CodeBlock-C-oIIYfC.js";
|
|
10
10
|
import { i as Hl } from "./CodeBlock-C-oIIYfC.js";
|
|
11
|
-
import { yaml as
|
|
11
|
+
import { yaml as Jn } from "@codemirror/lang-yaml";
|
|
12
12
|
import { EditorView as Wn } from "@codemirror/view";
|
|
13
13
|
import Vn from "@uiw/react-codemirror";
|
|
14
|
-
class
|
|
14
|
+
class be extends Error {
|
|
15
15
|
constructor(a, s, r, o) {
|
|
16
16
|
super(r);
|
|
17
17
|
Ne(this, "status");
|
|
@@ -34,30 +34,30 @@ function ms(e) {
|
|
|
34
34
|
try {
|
|
35
35
|
f = await a(`${n}${l}`, { ...c, headers: d });
|
|
36
36
|
} catch (w) {
|
|
37
|
-
throw new
|
|
37
|
+
throw new be(
|
|
38
38
|
0,
|
|
39
39
|
"network_error",
|
|
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
|
|
44
|
-
let
|
|
45
|
-
if (
|
|
43
|
+
const m = await f.text();
|
|
44
|
+
let v = null;
|
|
45
|
+
if (m)
|
|
46
46
|
try {
|
|
47
|
-
|
|
47
|
+
v = JSON.parse(m);
|
|
48
48
|
} catch {
|
|
49
49
|
if (!f.ok)
|
|
50
|
-
throw new
|
|
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: ${m.slice(0, 200)}`
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
56
|
if (!f.ok) {
|
|
57
|
-
const w = (
|
|
58
|
-
throw new
|
|
57
|
+
const w = (v == null ? void 0 : v.error) ?? {};
|
|
58
|
+
throw new be(f.status, w.code ?? "error", w.message ?? f.statusText, v);
|
|
59
59
|
}
|
|
60
|
-
return { status: f.status, data:
|
|
60
|
+
return { status: f.status, data: v };
|
|
61
61
|
}
|
|
62
62
|
async function o(l, c) {
|
|
63
63
|
const { data: d } = await r(l, c);
|
|
@@ -86,7 +86,7 @@ function ms(e) {
|
|
|
86
86
|
try {
|
|
87
87
|
return await l();
|
|
88
88
|
} catch (c) {
|
|
89
|
-
if (c instanceof
|
|
89
|
+
if (c instanceof be && (c.code === "snapshot_expired" || c.code === "unknown_snapshot"))
|
|
90
90
|
return await l();
|
|
91
91
|
throw c;
|
|
92
92
|
}
|
|
@@ -96,8 +96,8 @@ 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
|
|
100
|
-
d.push(...
|
|
99
|
+
const m = c.slice(u, u + 100).map(encodeURIComponent).join(","), v = await o(`/apps?ids=${m}`);
|
|
100
|
+
d.push(...v.apps);
|
|
101
101
|
}
|
|
102
102
|
return d;
|
|
103
103
|
},
|
|
@@ -245,7 +245,7 @@ function ms(e) {
|
|
|
245
245
|
}).then(({ status: d, data: u }) => ({ ...u ?? {}, terminal: d === 200 }))
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function Qe({
|
|
249
249
|
title: e,
|
|
250
250
|
subtitle: n,
|
|
251
251
|
icon: a,
|
|
@@ -255,7 +255,7 @@ function Xe({
|
|
|
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 }),
|
|
@@ -285,7 +285,7 @@ function Xe({
|
|
|
285
285
|
}
|
|
286
286
|
) : /* @__PURE__ */ t("div", { className: u, "aria-label": c, children: d });
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function Ke(e) {
|
|
289
289
|
const n = Date.parse(e);
|
|
290
290
|
if (Number.isNaN(n)) return "";
|
|
291
291
|
const a = Math.max(0, Math.round((Date.now() - n) / 1e3));
|
|
@@ -317,11 +317,11 @@ function qn(e) {
|
|
|
317
317
|
}
|
|
318
318
|
return e;
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function Jt(e) {
|
|
321
321
|
return typeof e == "object" && e !== null && typeof e.status == "number" && typeof e.code == "string";
|
|
322
322
|
}
|
|
323
323
|
function Hn(e) {
|
|
324
|
-
if (!
|
|
324
|
+
if (!Jt(e))
|
|
325
325
|
return { headline: (e == null ? void 0 : e.message) ?? "The action failed to run." };
|
|
326
326
|
const n = qn(e.message ?? ""), a = `${e.status} ${e.code} ${e.message ?? ""}`.toLowerCase();
|
|
327
327
|
return e.status === 401 || e.status === 403 || /\b(401|403)\b|forbidden|unauthorized|not authorized|permission|scope|access denied|invalid api key|invalid credential/.test(
|
|
@@ -333,11 +333,11 @@ function Hn(e) {
|
|
|
333
333
|
} : { headline: "The action returned an error.", detail: n };
|
|
334
334
|
}
|
|
335
335
|
function zn(e) {
|
|
336
|
-
const n =
|
|
336
|
+
const n = Jt(e) ? e.body ?? e.raw : null;
|
|
337
337
|
return (n == null ? void 0 : n.apiCalls) ?? [];
|
|
338
338
|
}
|
|
339
339
|
function je() {
|
|
340
|
-
const [e, n] =
|
|
340
|
+
const [e, n] = k(""), [a, s] = k(void 0), [r, o] = k(!1);
|
|
341
341
|
return { text: e, value: a, invalid: r, onChange: (c) => {
|
|
342
342
|
n(c);
|
|
343
343
|
const d = c.trim();
|
|
@@ -366,125 +366,125 @@ function hs({
|
|
|
366
366
|
onDeleted: u,
|
|
367
367
|
embedded: f = !1
|
|
368
368
|
}) {
|
|
369
|
-
var
|
|
370
|
-
const
|
|
369
|
+
var vt;
|
|
370
|
+
const m = Kt(), v = Ge(() => {
|
|
371
371
|
const p = [...n];
|
|
372
|
-
return p.sort((
|
|
373
|
-
}, [n]), [w,
|
|
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, [g, $] = k(!1), [x, N] = k(null), [T, C] = k(void 0), [E, P] = k([]), K = je(), O = je(), S = je(), [I, V] = k(""), [q, Q] = k(""), J = K.invalid || O.invalid || S.invalid, W = () => {
|
|
374
374
|
const p = {};
|
|
375
|
-
return
|
|
376
|
-
}, [
|
|
377
|
-
key:
|
|
378
|
-
values:
|
|
379
|
-
})), [
|
|
380
|
-
if (
|
|
375
|
+
return K.text.trim() !== "" && K.value !== void 0 && (p.body = K.value), O.text.trim() !== "" && O.value !== void 0 && (p.query = O.value), S.text.trim() !== "" && S.value !== void 0 && (p.headers = S.value), I && (p.target = I), q.trim() !== "" && (p.match = q.trim()), Object.keys(p).length > 0 ? p : void 0;
|
|
376
|
+
}, [j, Z] = k("form"), [Ie, ae] = k(""), [Pe, ee] = k(!1), [b, L] = k(!1), _ = (y == null ? void 0 : y.key) ?? null, D = r ? { ...r } : kt(y), [se, M] = k(() => ({
|
|
377
|
+
key: _,
|
|
378
|
+
values: D
|
|
379
|
+
})), [U, le] = k(l ?? null), [ot, pe] = k(D);
|
|
380
|
+
if (se.key !== _) {
|
|
381
381
|
const p = kt(y);
|
|
382
|
-
|
|
382
|
+
M({ key: _, values: p }), pe(p), le(l ?? null), N(null), C(void 0), P([]);
|
|
383
383
|
}
|
|
384
|
-
const [sn, ln] =
|
|
385
|
-
l !== sn && (ln(l),
|
|
386
|
-
const [ct, rn] =
|
|
384
|
+
const [sn, ln] = k(l);
|
|
385
|
+
l !== sn && (ln(l), le(l ?? null));
|
|
386
|
+
const [ct, rn] = k(r);
|
|
387
387
|
if (r !== ct) {
|
|
388
388
|
const p = JSON.stringify(r ?? null) !== JSON.stringify(ct ?? null);
|
|
389
389
|
if (rn(r), r && p) {
|
|
390
|
-
const
|
|
391
|
-
|
|
390
|
+
const A = { ...r };
|
|
391
|
+
M({ key: _, values: A }), pe(A), N(null), C(void 0), P([]);
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
-
const
|
|
395
|
-
() => JSON.stringify(
|
|
396
|
-
[
|
|
394
|
+
const H = se.values, dt = (p) => M({ key: _, values: p }), ut = Ge(
|
|
395
|
+
() => JSON.stringify(H) !== JSON.stringify(ot),
|
|
396
|
+
[H, ot]
|
|
397
397
|
);
|
|
398
|
-
|
|
398
|
+
G(() => {
|
|
399
399
|
c == null || c(ut);
|
|
400
400
|
}, [ut]);
|
|
401
401
|
const on = () => {
|
|
402
|
-
|
|
402
|
+
ae(JSON.stringify(H, null, 2)), ee(!1), Z("json");
|
|
403
403
|
}, cn = async (p) => {
|
|
404
|
-
if (!y ||
|
|
405
|
-
const
|
|
406
|
-
|
|
407
|
-
let
|
|
408
|
-
const
|
|
404
|
+
if (!y || J) return;
|
|
405
|
+
const A = y.key;
|
|
406
|
+
$(!0), N(null), C(void 0), P([]);
|
|
407
|
+
let F;
|
|
408
|
+
const ne = W();
|
|
409
409
|
try {
|
|
410
|
-
const
|
|
410
|
+
const z = await m.invokeAction(e, A, p, {
|
|
411
411
|
connectionId: a,
|
|
412
|
-
...
|
|
412
|
+
...ne ? { overrides: ne } : {}
|
|
413
413
|
});
|
|
414
|
-
|
|
415
|
-
} catch (
|
|
416
|
-
const
|
|
417
|
-
|
|
414
|
+
C(z.value), P(z.apiCalls ?? []), F = { ok: !0, summary: "OK", result: z.value };
|
|
415
|
+
} catch (z) {
|
|
416
|
+
const Nt = Hn(z);
|
|
417
|
+
N(Nt), P(zn(z)), F = { ok: !1, summary: Nt.headline };
|
|
418
418
|
} finally {
|
|
419
|
-
|
|
419
|
+
$(!1);
|
|
420
420
|
}
|
|
421
421
|
if (a)
|
|
422
422
|
try {
|
|
423
|
-
await
|
|
424
|
-
savedTestId:
|
|
425
|
-
actionKey:
|
|
426
|
-
ok:
|
|
427
|
-
summary:
|
|
428
|
-
result:
|
|
429
|
-
}),
|
|
423
|
+
await m.recordTestRun(a, {
|
|
424
|
+
savedTestId: U ?? null,
|
|
425
|
+
actionKey: A,
|
|
426
|
+
ok: F.ok,
|
|
427
|
+
summary: F.summary.slice(0, 200),
|
|
428
|
+
result: F.result
|
|
429
|
+
}), Ue(), yn(), o == null || o();
|
|
430
430
|
} catch {
|
|
431
431
|
}
|
|
432
|
-
}, dn = () => cn(
|
|
433
|
-
|
|
432
|
+
}, dn = () => cn(H), [fe, wt] = k(null), [ge, ie] = k(null), [un, wn] = k(0), [mn, ye] = k(!1), [Le, Me] = k(""), [hn, De] = k(!1), Ue = () => wn((p) => p + 1);
|
|
433
|
+
G(() => {
|
|
434
434
|
if (!a) {
|
|
435
435
|
wt(null);
|
|
436
436
|
return;
|
|
437
437
|
}
|
|
438
438
|
let p = !1;
|
|
439
|
-
return
|
|
439
|
+
return ie(null), m.listSavedTests(a).then((A) => !p && wt(A)).catch((A) => !p && ie(A.message)), () => {
|
|
440
440
|
p = !0;
|
|
441
441
|
};
|
|
442
|
-
}, [
|
|
443
|
-
const mt =
|
|
444
|
-
|
|
445
|
-
const p =
|
|
442
|
+
}, [m, a, un]);
|
|
443
|
+
const mt = _ ? (fe ?? []).filter((p) => p.actionKey === _) : [], [pn, Fe] = k(null), [fn, gn] = k(0), yn = () => gn((p) => p + 1);
|
|
444
|
+
G(() => {
|
|
445
|
+
const p = m.listTestRuns;
|
|
446
446
|
if (!a || !p) {
|
|
447
|
-
|
|
447
|
+
Fe(null);
|
|
448
448
|
return;
|
|
449
449
|
}
|
|
450
|
-
let
|
|
451
|
-
return p(a).then((
|
|
452
|
-
|
|
450
|
+
let A = !1;
|
|
451
|
+
return p(a).then((F) => !A && Fe(F)).catch(() => !A && Fe(null)), () => {
|
|
452
|
+
A = !0;
|
|
453
453
|
};
|
|
454
|
-
}, [
|
|
455
|
-
const ht =
|
|
456
|
-
!a || !y || (Me(""),
|
|
457
|
-
},
|
|
458
|
-
!a || !y || (
|
|
454
|
+
}, [m, a, fn]);
|
|
455
|
+
const ht = _ ? (pn ?? []).filter((p) => p.actionKey === _).slice().sort((p, A) => Date.parse(A.occurredAt) - Date.parse(p.occurredAt)) : [], vn = () => {
|
|
456
|
+
!a || !y || (Me(""), ie(null), ye(!0));
|
|
457
|
+
}, Nn = () => {
|
|
458
|
+
!a || !y || (U ? pt() : vn());
|
|
459
459
|
}, pt = async () => {
|
|
460
460
|
if (!(!a || !y))
|
|
461
461
|
try {
|
|
462
462
|
let p;
|
|
463
|
-
if (
|
|
464
|
-
p = await
|
|
463
|
+
if (U)
|
|
464
|
+
p = await m.updateSavedTest(a, U, { values: H });
|
|
465
465
|
else {
|
|
466
|
-
const
|
|
467
|
-
if (!
|
|
468
|
-
p = await
|
|
466
|
+
const A = Le.trim();
|
|
467
|
+
if (!A) return;
|
|
468
|
+
p = await m.createSavedTest(a, {
|
|
469
469
|
actionKey: y.key,
|
|
470
|
-
name:
|
|
471
|
-
values:
|
|
472
|
-
}),
|
|
470
|
+
name: A,
|
|
471
|
+
values: H
|
|
472
|
+
}), le(p.id);
|
|
473
473
|
}
|
|
474
|
-
|
|
474
|
+
pe({ ...H }), ye(!1), Me(""), Ue(), o == null || o(), d == null || d(p);
|
|
475
475
|
} catch (p) {
|
|
476
|
-
|
|
476
|
+
ie(p.message);
|
|
477
477
|
}
|
|
478
478
|
}, bn = (p) => {
|
|
479
|
-
const
|
|
480
|
-
|
|
479
|
+
const A = { ...p.values };
|
|
480
|
+
M({ key: _, values: A }), pe(A), le(p.id), Z("form"), N(null), C(void 0), P([]);
|
|
481
481
|
}, kn = async () => {
|
|
482
|
-
if (!a || !
|
|
483
|
-
const p =
|
|
482
|
+
if (!a || !U) return;
|
|
483
|
+
const p = U;
|
|
484
484
|
try {
|
|
485
|
-
await
|
|
486
|
-
} catch (
|
|
487
|
-
|
|
485
|
+
await m.deleteSavedTest(a, p), le(null), Ue(), o == null || o(), u == null || u(p);
|
|
486
|
+
} catch (A) {
|
|
487
|
+
ie(A.message);
|
|
488
488
|
}
|
|
489
489
|
}, ft = /* @__PURE__ */ i("div", { className: "w6w-stack", style: { gap: "var(--w6w-sp-1-5)" }, children: [
|
|
490
490
|
/* @__PURE__ */ i(
|
|
@@ -499,9 +499,9 @@ function hs({
|
|
|
499
499
|
"button",
|
|
500
500
|
{
|
|
501
501
|
type: "button",
|
|
502
|
-
className: `w6w-btn w6w-btn-sm w6w-btn-ghost${
|
|
503
|
-
"aria-pressed":
|
|
504
|
-
onClick: () =>
|
|
502
|
+
className: `w6w-btn w6w-btn-sm w6w-btn-ghost${j === "form" ? " active" : ""}`,
|
|
503
|
+
"aria-pressed": j === "form",
|
|
504
|
+
onClick: () => Z("form"),
|
|
505
505
|
children: "Form"
|
|
506
506
|
}
|
|
507
507
|
),
|
|
@@ -509,8 +509,8 @@ function hs({
|
|
|
509
509
|
"button",
|
|
510
510
|
{
|
|
511
511
|
type: "button",
|
|
512
|
-
className: `w6w-btn w6w-btn-sm w6w-btn-ghost${
|
|
513
|
-
"aria-pressed":
|
|
512
|
+
className: `w6w-btn w6w-btn-sm w6w-btn-ghost${j === "json" ? " active" : ""}`,
|
|
513
|
+
"aria-pressed": j === "json",
|
|
514
514
|
onClick: on,
|
|
515
515
|
children: "JSON"
|
|
516
516
|
}
|
|
@@ -520,40 +520,40 @@ function hs({
|
|
|
520
520
|
{
|
|
521
521
|
type: "button",
|
|
522
522
|
className: "w6w-btn w6w-btn-sm w6w-btn-ghost",
|
|
523
|
-
"aria-pressed":
|
|
524
|
-
title:
|
|
525
|
-
"aria-label":
|
|
526
|
-
onClick: () =>
|
|
527
|
-
children:
|
|
523
|
+
"aria-pressed": b,
|
|
524
|
+
title: b ? "Collapse the params editor" : "Open the params editor in a larger view",
|
|
525
|
+
"aria-label": b ? "Collapse the params editor" : "Open the params editor in a larger view",
|
|
526
|
+
onClick: () => L((p) => !p),
|
|
527
|
+
children: b ? "⤡" : "⤢"
|
|
528
528
|
}
|
|
529
529
|
)
|
|
530
530
|
] })
|
|
531
531
|
]
|
|
532
532
|
}
|
|
533
533
|
),
|
|
534
|
-
|
|
534
|
+
j === "form" ? /* @__PURE__ */ t(
|
|
535
535
|
Sn,
|
|
536
536
|
{
|
|
537
537
|
params: (y == null ? void 0 : y.params) ?? [],
|
|
538
|
-
values:
|
|
538
|
+
values: H,
|
|
539
539
|
onChange: dt,
|
|
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
|
{
|
|
546
|
-
value:
|
|
547
|
-
onChange:
|
|
548
|
-
minHeight:
|
|
546
|
+
value: Ie,
|
|
547
|
+
onChange: ae,
|
|
548
|
+
minHeight: b ? "50vh" : "200px",
|
|
549
549
|
"aria-label": "Params JSON",
|
|
550
550
|
onValidChange: (p) => {
|
|
551
551
|
p !== null && typeof p == "object" && !Array.isArray(p) && dt(p);
|
|
552
552
|
},
|
|
553
|
-
onValidityChange: ({ valid: p }) =>
|
|
553
|
+
onValidityChange: ({ valid: p }) => ee(!p)
|
|
554
554
|
}
|
|
555
555
|
),
|
|
556
|
-
|
|
556
|
+
Pe && /* @__PURE__ */ t("span", { className: "w6w-hint", style: { color: "var(--w6w-danger)" }, children: "Invalid JSON" })
|
|
557
557
|
] })
|
|
558
558
|
] }), gt = /* @__PURE__ */ i("details", { className: "w6w-section", "data-testid": "overrides-region", children: [
|
|
559
559
|
/* @__PURE__ */ i("summary", { className: "w6w-section-summary", children: [
|
|
@@ -564,20 +564,20 @@ function hs({
|
|
|
564
564
|
/* @__PURE__ */ i("div", { className: "w6w-field", children: [
|
|
565
565
|
/* @__PURE__ */ t("span", { children: "Body" }),
|
|
566
566
|
/* @__PURE__ */ t(
|
|
567
|
-
|
|
567
|
+
oe,
|
|
568
568
|
{
|
|
569
|
-
value:
|
|
570
|
-
onChange:
|
|
569
|
+
value: K.text,
|
|
570
|
+
onChange: K.onChange,
|
|
571
571
|
minHeight: "80px",
|
|
572
572
|
"aria-label": "Overrides body (JSON)"
|
|
573
573
|
}
|
|
574
574
|
),
|
|
575
|
-
|
|
575
|
+
K.invalid && /* @__PURE__ */ t("span", { className: "w6w-hint", style: { color: "var(--w6w-danger)" }, children: "Invalid JSON" })
|
|
576
576
|
] }),
|
|
577
577
|
/* @__PURE__ */ i("div", { className: "w6w-field", children: [
|
|
578
578
|
/* @__PURE__ */ t("span", { children: "Query" }),
|
|
579
579
|
/* @__PURE__ */ t(
|
|
580
|
-
|
|
580
|
+
oe,
|
|
581
581
|
{
|
|
582
582
|
value: O.text,
|
|
583
583
|
onChange: O.onChange,
|
|
@@ -590,7 +590,7 @@ function hs({
|
|
|
590
590
|
/* @__PURE__ */ i("div", { className: "w6w-field", children: [
|
|
591
591
|
/* @__PURE__ */ t("span", { children: "Headers" }),
|
|
592
592
|
/* @__PURE__ */ t(
|
|
593
|
-
|
|
593
|
+
oe,
|
|
594
594
|
{
|
|
595
595
|
value: S.text,
|
|
596
596
|
onChange: S.onChange,
|
|
@@ -606,8 +606,8 @@ function hs({
|
|
|
606
606
|
"select",
|
|
607
607
|
{
|
|
608
608
|
"aria-label": "Overrides target",
|
|
609
|
-
value:
|
|
610
|
-
onChange: (p) =>
|
|
609
|
+
value: I,
|
|
610
|
+
onChange: (p) => V(p.target.value),
|
|
611
611
|
children: [
|
|
612
612
|
/* @__PURE__ */ t("option", { value: "", children: "— default (first) —" }),
|
|
613
613
|
/* @__PURE__ */ t("option", { value: "first", children: "first" }),
|
|
@@ -624,15 +624,15 @@ function hs({
|
|
|
624
624
|
{
|
|
625
625
|
type: "text",
|
|
626
626
|
"aria-label": "Overrides match",
|
|
627
|
-
value:
|
|
627
|
+
value: q,
|
|
628
628
|
placeholder: "Restrict to requests whose URL contains…",
|
|
629
|
-
onChange: (p) =>
|
|
629
|
+
onChange: (p) => Q(p.target.value)
|
|
630
630
|
}
|
|
631
631
|
)
|
|
632
632
|
] }),
|
|
633
633
|
/* @__PURE__ */ t("span", { className: "w6w-hint", children: "Merged onto the outbound request at the wire, never into the params above — name a field the way the vendor's own API documents it." })
|
|
634
634
|
] })
|
|
635
|
-
] }),
|
|
635
|
+
] }), ve = a ? /* @__PURE__ */ i("div", { className: "w6w-stack", style: { gap: "var(--w6w-sp-1-5)" }, children: [
|
|
636
636
|
/* @__PURE__ */ t(
|
|
637
637
|
"div",
|
|
638
638
|
{
|
|
@@ -641,14 +641,14 @@ function hs({
|
|
|
641
641
|
children: /* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: "Saved tests" })
|
|
642
642
|
}
|
|
643
643
|
),
|
|
644
|
-
|
|
644
|
+
ge && /* @__PURE__ */ t("span", { className: "w6w-hint", style: { color: "var(--w6w-danger)" }, children: ge }),
|
|
645
645
|
mt.length === 0 ? /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "No saved tests for this action yet." }) : /* @__PURE__ */ t(
|
|
646
646
|
"ul",
|
|
647
647
|
{
|
|
648
648
|
className: "w6w-stack",
|
|
649
649
|
style: { listStyle: "none", margin: 0, padding: 0, gap: "var(--w6w-sp-1-5)" },
|
|
650
650
|
children: mt.map((p) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
|
|
651
|
-
|
|
651
|
+
Qe,
|
|
652
652
|
{
|
|
653
653
|
title: p.name,
|
|
654
654
|
subtitle: p.lastRunAt ? /* @__PURE__ */ i("span", { children: [
|
|
@@ -661,15 +661,15 @@ function hs({
|
|
|
661
661
|
),
|
|
662
662
|
" ",
|
|
663
663
|
p.lastRunSummary ? `${p.lastRunSummary} · ` : "",
|
|
664
|
-
|
|
665
|
-
] }) : `saved ${
|
|
666
|
-
active: p.id ===
|
|
664
|
+
Ke(p.lastRunAt)
|
|
665
|
+
] }) : `saved ${Ke(p.updatedAt)}`,
|
|
666
|
+
active: p.id === U,
|
|
667
667
|
onClick: () => bn(p)
|
|
668
668
|
}
|
|
669
669
|
) }, p.id))
|
|
670
670
|
}
|
|
671
671
|
),
|
|
672
|
-
|
|
672
|
+
m.listTestRuns && ht.length > 0 && /* @__PURE__ */ i(R, { children: [
|
|
673
673
|
/* @__PURE__ */ t(
|
|
674
674
|
"div",
|
|
675
675
|
{
|
|
@@ -684,7 +684,7 @@ function hs({
|
|
|
684
684
|
className: "w6w-stack",
|
|
685
685
|
style: { listStyle: "none", margin: 0, padding: 0, gap: "var(--w6w-sp-1-5)" },
|
|
686
686
|
children: ht.map((p) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
|
|
687
|
-
|
|
687
|
+
Qe,
|
|
688
688
|
{
|
|
689
689
|
title: /* @__PURE__ */ i("span", { children: [
|
|
690
690
|
/* @__PURE__ */ t("span", { style: { color: p.ok ? "var(--w6w-success)" : "var(--w6w-danger)" }, children: p.ok ? "✓" : "✗" }),
|
|
@@ -693,29 +693,29 @@ function hs({
|
|
|
693
693
|
] }),
|
|
694
694
|
subtitle: /* @__PURE__ */ i("span", { children: [
|
|
695
695
|
p.summary ? `${p.summary} · ` : "",
|
|
696
|
-
|
|
696
|
+
Ke(p.occurredAt)
|
|
697
697
|
] })
|
|
698
698
|
}
|
|
699
699
|
) }, p.id))
|
|
700
700
|
}
|
|
701
701
|
)
|
|
702
702
|
] })
|
|
703
|
-
] }) : null, yt = (
|
|
703
|
+
] }) : null, yt = (vt = fe == null ? void 0 : fe.find((p) => p.id === U)) == null ? void 0 : vt.name;
|
|
704
704
|
return /* @__PURE__ */ i("div", { className: `w6w-stack${f ? " w6w-tester-embedded-root" : ""}`, children: [
|
|
705
705
|
!s && (n.length === 0 ? /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "This app exposes no actions." }) : (
|
|
706
706
|
// biome-ignore lint/a11y/noLabelWithoutControl: Combobox renders its own <select>/<input> INSIDE this label, so the field text labels the control at runtime; the rule cannot see through the component boundary.
|
|
707
707
|
/* @__PURE__ */ i("label", { className: "w6w-field", children: [
|
|
708
708
|
/* @__PURE__ */ i("span", { children: [
|
|
709
709
|
"Action",
|
|
710
|
-
|
|
710
|
+
_ ? "" : " *"
|
|
711
711
|
] }),
|
|
712
712
|
/* @__PURE__ */ t(
|
|
713
713
|
$n,
|
|
714
714
|
{
|
|
715
715
|
value: w,
|
|
716
716
|
placeholder: "— pick an action —",
|
|
717
|
-
onChange:
|
|
718
|
-
options:
|
|
717
|
+
onChange: h,
|
|
718
|
+
options: v.map((p) => ({
|
|
719
719
|
value: p.key,
|
|
720
720
|
label: `${p.title ?? p.key} (${p.key})`
|
|
721
721
|
}))
|
|
@@ -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,
|
|
@@ -733,10 +733,10 @@ function hs({
|
|
|
733
733
|
y.description && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", style: { margin: "var(--w6w-sp-0-5) 0 0" }, children: y.description })
|
|
734
734
|
] }),
|
|
735
735
|
(() => {
|
|
736
|
-
const p =
|
|
737
|
-
/* @__PURE__ */ t("strong", { children:
|
|
738
|
-
|
|
739
|
-
|
|
736
|
+
const p = x ? /* @__PURE__ */ i("div", { className: "w6w-result w6w-error", children: [
|
|
737
|
+
/* @__PURE__ */ t("strong", { children: x.headline }),
|
|
738
|
+
x.hint && /* @__PURE__ */ t("div", { style: { marginTop: "var(--w6w-sp-1-5)" }, children: x.hint }),
|
|
739
|
+
x.detail && /* @__PURE__ */ t(
|
|
740
740
|
"div",
|
|
741
741
|
{
|
|
742
742
|
className: "w6w-muted w6w-small",
|
|
@@ -745,22 +745,22 @@ function hs({
|
|
|
745
745
|
whiteSpace: "pre-wrap",
|
|
746
746
|
wordBreak: "break-word"
|
|
747
747
|
},
|
|
748
|
-
children:
|
|
748
|
+
children: x.detail
|
|
749
749
|
}
|
|
750
750
|
)
|
|
751
|
-
] }) : null,
|
|
751
|
+
] }) : null, A = T !== void 0 ? /* @__PURE__ */ i("div", { className: "w6w-stack", style: { gap: "var(--w6w-sp-1)" }, children: [
|
|
752
752
|
/* @__PURE__ */ t("strong", { className: "w6w-small", children: "Result" }),
|
|
753
|
-
/* @__PURE__ */ t(
|
|
754
|
-
] }) : null,
|
|
753
|
+
/* @__PURE__ */ t(Ye, { value: T })
|
|
754
|
+
] }) : null, F = /* @__PURE__ */ i("div", { className: "w6w-stack", style: { gap: "var(--w6w-sp-3)" }, children: [
|
|
755
755
|
ft,
|
|
756
756
|
gt,
|
|
757
757
|
p,
|
|
758
|
-
|
|
759
|
-
/* @__PURE__ */ t(bt, { calls:
|
|
760
|
-
] }),
|
|
758
|
+
A,
|
|
759
|
+
/* @__PURE__ */ t(bt, { calls: E })
|
|
760
|
+
] }), ne = /* @__PURE__ */ i(
|
|
761
761
|
"div",
|
|
762
762
|
{
|
|
763
|
-
className: `w6w-tester-actions${f ||
|
|
763
|
+
className: `w6w-tester-actions${f || b ? " w6w-tester-actions-footer" : ""}`,
|
|
764
764
|
style: { display: "flex", gap: "var(--w6w-sp-2)" },
|
|
765
765
|
children: [
|
|
766
766
|
/* @__PURE__ */ t(
|
|
@@ -768,27 +768,27 @@ function hs({
|
|
|
768
768
|
{
|
|
769
769
|
type: "button",
|
|
770
770
|
className: "w6w-btn",
|
|
771
|
-
disabled: g ||
|
|
771
|
+
disabled: g || J,
|
|
772
772
|
onClick: dn,
|
|
773
773
|
children: g ? "Running…" : "Run action"
|
|
774
774
|
}
|
|
775
775
|
),
|
|
776
|
-
a && /* @__PURE__ */ t("button", { type: "button", className: "w6w-btn w6w-btn-ghost", onClick:
|
|
777
|
-
a &&
|
|
776
|
+
a && /* @__PURE__ */ t("button", { type: "button", className: "w6w-btn w6w-btn-ghost", onClick: Nn, children: "Save test" }),
|
|
777
|
+
a && U && /* @__PURE__ */ t(
|
|
778
778
|
"button",
|
|
779
779
|
{
|
|
780
780
|
type: "button",
|
|
781
781
|
className: "w6w-btn w6w-btn-ghost",
|
|
782
782
|
style: { marginLeft: "auto", color: "var(--w6w-danger)" },
|
|
783
|
-
onClick: () =>
|
|
783
|
+
onClick: () => De(!0),
|
|
784
784
|
children: "Delete"
|
|
785
785
|
}
|
|
786
786
|
)
|
|
787
787
|
]
|
|
788
788
|
}
|
|
789
|
-
),
|
|
790
|
-
|
|
791
|
-
|
|
789
|
+
), z = /* @__PURE__ */ i("div", { className: "w6w-stack", style: { gap: "var(--w6w-sp-3)" }, children: [
|
|
790
|
+
F,
|
|
791
|
+
ne
|
|
792
792
|
] });
|
|
793
793
|
return f ? /* @__PURE__ */ i("div", { className: "w6w-tester-embedded", children: [
|
|
794
794
|
/* @__PURE__ */ t("div", { className: "w6w-tester-embedded-scroll", children: /* @__PURE__ */ i("div", { className: "w6w-card-stack", children: [
|
|
@@ -800,27 +800,27 @@ function hs({
|
|
|
800
800
|
p
|
|
801
801
|
] })
|
|
802
802
|
] }),
|
|
803
|
-
(
|
|
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
|
-
|
|
807
|
-
/* @__PURE__ */ t(bt, { calls:
|
|
806
|
+
T !== void 0 && /* @__PURE__ */ t(Ye, { value: T }),
|
|
807
|
+
/* @__PURE__ */ t(bt, { calls: E })
|
|
808
808
|
] })
|
|
809
809
|
] }),
|
|
810
|
-
|
|
810
|
+
ve && /* @__PURE__ */ i("div", { className: "card", children: [
|
|
811
811
|
/* @__PURE__ */ t("div", { className: "section-head", children: /* @__PURE__ */ t("h3", { children: "Saved tests and history" }) }),
|
|
812
|
-
|
|
812
|
+
ve
|
|
813
813
|
] })
|
|
814
814
|
] }) }),
|
|
815
|
-
|
|
816
|
-
] }) :
|
|
817
|
-
|
|
815
|
+
ne
|
|
816
|
+
] }) : b ? /* @__PURE__ */ t(
|
|
817
|
+
$e,
|
|
818
818
|
{
|
|
819
819
|
title: `Edit params — ${y.title ?? y.key}`,
|
|
820
|
-
onClose: () =>
|
|
820
|
+
onClose: () => L(!1),
|
|
821
821
|
size: "full",
|
|
822
822
|
children: /* @__PURE__ */ i("div", { className: "w6w-tester-popout", children: [
|
|
823
|
-
/* @__PURE__ */ t("div", { className: "w6w-tester-popout-scroll", children:
|
|
823
|
+
/* @__PURE__ */ t("div", { className: "w6w-tester-popout-scroll", children: ve ? /* @__PURE__ */ i(
|
|
824
824
|
"div",
|
|
825
825
|
{
|
|
826
826
|
style: {
|
|
@@ -829,17 +829,17 @@ function hs({
|
|
|
829
829
|
alignItems: "flex-start"
|
|
830
830
|
},
|
|
831
831
|
children: [
|
|
832
|
-
/* @__PURE__ */ t("div", { style: { flex: 1, minWidth: 0 }, children:
|
|
833
|
-
/* @__PURE__ */ t("div", { style: { width: 260, flexShrink: 0 }, children:
|
|
832
|
+
/* @__PURE__ */ t("div", { style: { flex: 1, minWidth: 0 }, children: F }),
|
|
833
|
+
/* @__PURE__ */ t("div", { style: { width: 260, flexShrink: 0 }, children: ve })
|
|
834
834
|
]
|
|
835
835
|
}
|
|
836
|
-
) :
|
|
837
|
-
|
|
836
|
+
) : F }),
|
|
837
|
+
ne
|
|
838
838
|
] })
|
|
839
839
|
}
|
|
840
|
-
) :
|
|
840
|
+
) : z;
|
|
841
841
|
})(),
|
|
842
|
-
mn && /* @__PURE__ */ t(
|
|
842
|
+
mn && /* @__PURE__ */ t($e, { title: "Save test", onClose: () => ye(!1), children: /* @__PURE__ */ i(
|
|
843
843
|
"form",
|
|
844
844
|
{
|
|
845
845
|
className: "w6w-stack",
|
|
@@ -854,13 +854,13 @@ function hs({
|
|
|
854
854
|
"input",
|
|
855
855
|
{
|
|
856
856
|
type: "text",
|
|
857
|
-
value:
|
|
857
|
+
value: Le,
|
|
858
858
|
placeholder: "e.g. valid sender",
|
|
859
859
|
onChange: (p) => Me(p.target.value)
|
|
860
860
|
}
|
|
861
861
|
)
|
|
862
862
|
] }),
|
|
863
|
-
|
|
863
|
+
ge && /* @__PURE__ */ t("span", { className: "w6w-hint", style: { color: "var(--w6w-danger)" }, children: ge }),
|
|
864
864
|
/* @__PURE__ */ i(
|
|
865
865
|
"div",
|
|
866
866
|
{
|
|
@@ -871,11 +871,11 @@ function hs({
|
|
|
871
871
|
{
|
|
872
872
|
type: "button",
|
|
873
873
|
className: "w6w-btn w6w-btn-ghost",
|
|
874
|
-
onClick: () =>
|
|
874
|
+
onClick: () => ye(!1),
|
|
875
875
|
children: "Cancel"
|
|
876
876
|
}
|
|
877
877
|
),
|
|
878
|
-
/* @__PURE__ */ t("button", { type: "submit", className: "w6w-btn", disabled: !
|
|
878
|
+
/* @__PURE__ */ t("button", { type: "submit", className: "w6w-btn", disabled: !Le.trim(), children: "Save" })
|
|
879
879
|
]
|
|
880
880
|
}
|
|
881
881
|
)
|
|
@@ -889,16 +889,16 @@ function hs({
|
|
|
889
889
|
message: yt ? `Delete "${yt}"? This cannot be undone.` : "Delete this saved test? This cannot be undone.",
|
|
890
890
|
confirmLabel: "Delete",
|
|
891
891
|
onConfirm: () => {
|
|
892
|
-
|
|
892
|
+
De(!1), kn();
|
|
893
893
|
},
|
|
894
|
-
onClose: () =>
|
|
894
|
+
onClose: () => De(!1)
|
|
895
895
|
}
|
|
896
896
|
)
|
|
897
897
|
] }) : !s && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Pick an action above to test it." })
|
|
898
898
|
] });
|
|
899
899
|
}
|
|
900
900
|
function ps(e) {
|
|
901
|
-
const n = An(e.theme), { copied: a, copy: s } = Fn(e.value), r =
|
|
901
|
+
const n = An(e.theme), { copied: a, copy: s } = Fn(e.value), r = Ge(() => [Jn(), Wn.theme(En)], []);
|
|
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 && /* @__PURE__ */ i(
|
|
929
|
+
e.copyable && /* @__PURE__ */ i(R, { children: [
|
|
930
930
|
/* @__PURE__ */ t(
|
|
931
931
|
"button",
|
|
932
932
|
{
|
|
@@ -934,7 +934,7 @@ function ps(e) {
|
|
|
934
934
|
className: `w6w-icon-btn w6w-copyable-btn${a ? " is-copied" : ""}`,
|
|
935
935
|
"aria-label": "Copy",
|
|
936
936
|
onClick: () => void s(),
|
|
937
|
-
children: a ? /* @__PURE__ */ t(Bn, {}) : /* @__PURE__ */ t(
|
|
937
|
+
children: a ? /* @__PURE__ */ t(Bn, {}) : /* @__PURE__ */ t(Kn, {})
|
|
938
938
|
}
|
|
939
939
|
),
|
|
940
940
|
/* @__PURE__ */ t("span", { className: "w6w-copyable-status", "aria-live": "polite", children: a ? "Copied" : "" })
|
|
@@ -953,7 +953,7 @@ function Yn(e, n, a = "end") {
|
|
|
953
953
|
}
|
|
954
954
|
function Gn(e) {
|
|
955
955
|
const { value: n, chars: a, crop: s = "end", label: r, className: o, copiedMs: l } = e, c = Yn(n, a, s), d = ["w6w-copyable--bare", o].filter(Boolean).join(" ");
|
|
956
|
-
return /* @__PURE__ */ t(
|
|
956
|
+
return /* @__PURE__ */ t(jn, { value: n, readOnly: !0, label: r, className: d, copiedMs: l, children: /* @__PURE__ */ t("span", { children: c }) });
|
|
957
957
|
}
|
|
958
958
|
const Xn = {
|
|
959
959
|
ok: "Operational",
|
|
@@ -961,7 +961,7 @@ const Xn = {
|
|
|
961
961
|
down: "Down",
|
|
962
962
|
unknown: "Unknown"
|
|
963
963
|
};
|
|
964
|
-
function
|
|
964
|
+
function tt({ state: e, label: n, ariaLabel: a }) {
|
|
965
965
|
const s = n ?? Xn[e];
|
|
966
966
|
return /* @__PURE__ */ i("span", { className: `w6w-health-pill w6w-health-pill-${e}`, "aria-label": a, children: [
|
|
967
967
|
/* @__PURE__ */ t("span", { className: "w6w-health-pill-dot", "aria-hidden": "true" }),
|
|
@@ -1001,15 +1001,15 @@ function Vt(e) {
|
|
|
1001
1001
|
n /= 1024, a += 1;
|
|
1002
1002
|
return `${n.toFixed(1)} ${xt[a]}`;
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1004
|
+
function X(e) {
|
|
1005
1005
|
return e === null || !Number.isFinite(e) ? Wt : `${Math.round(e * 100)}%`;
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1007
|
+
function we(e) {
|
|
1008
1008
|
if (e === void 0 || e.load1 === null) return null;
|
|
1009
1009
|
const n = e.cpuLimit ?? e.cpus;
|
|
1010
1010
|
return n === null || n <= 0 ? null : e.load1 / n;
|
|
1011
1011
|
}
|
|
1012
|
-
function
|
|
1012
|
+
function me(e) {
|
|
1013
1013
|
if (e === void 0) return null;
|
|
1014
1014
|
const { memoryTotal: n, memoryAvailable: a } = e;
|
|
1015
1015
|
return n === null || a === null || n <= 0 ? null : (n - a) / n;
|
|
@@ -1030,7 +1030,7 @@ function ta(e, n, a, s) {
|
|
|
1030
1030
|
return o.join(" ");
|
|
1031
1031
|
}
|
|
1032
1032
|
const na = "—", Ct = 100, St = 24;
|
|
1033
|
-
function
|
|
1033
|
+
function Ze({
|
|
1034
1034
|
values: e,
|
|
1035
1035
|
max: n,
|
|
1036
1036
|
className: a
|
|
@@ -1057,15 +1057,15 @@ function Qe({
|
|
|
1057
1057
|
}
|
|
1058
1058
|
);
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1060
|
+
function We(e) {
|
|
1061
1061
|
return e === null ? na : e.toFixed(2);
|
|
1062
1062
|
}
|
|
1063
|
-
function
|
|
1063
|
+
function Ae(e) {
|
|
1064
1064
|
let n = 1;
|
|
1065
1065
|
for (const a of e) a !== null && a > n && (n = a);
|
|
1066
1066
|
return n;
|
|
1067
1067
|
}
|
|
1068
|
-
function
|
|
1068
|
+
function Ce({
|
|
1069
1069
|
label: e,
|
|
1070
1070
|
value: n,
|
|
1071
1071
|
values: a,
|
|
@@ -1074,11 +1074,11 @@ function xe({
|
|
|
1074
1074
|
return /* @__PURE__ */ i("li", { className: "w6w-server-resources__row", children: [
|
|
1075
1075
|
/* @__PURE__ */ t("span", { className: "w6w-server-resources__label", children: e }),
|
|
1076
1076
|
/* @__PURE__ */ t("span", { className: "w6w-server-resources__value", children: n }),
|
|
1077
|
-
/* @__PURE__ */ t(
|
|
1077
|
+
/* @__PURE__ */ t(Ze, { className: "w6w-server-resources__spark", values: a, max: s })
|
|
1078
1078
|
] });
|
|
1079
1079
|
}
|
|
1080
|
-
function
|
|
1081
|
-
const n = e[e.length - 1], a = e.map((o) =>
|
|
1080
|
+
function nt(e) {
|
|
1081
|
+
const n = e[e.length - 1], a = e.map((o) => we(o)), s = e.map((o) => me(o)), r = e.map((o) => o.processRss);
|
|
1082
1082
|
return { last: n, cpuValues: a, memoryValues: s, rssValues: r };
|
|
1083
1083
|
}
|
|
1084
1084
|
function fs({
|
|
@@ -1086,84 +1086,84 @@ function fs({
|
|
|
1086
1086
|
title: n = "Server resources",
|
|
1087
1087
|
intervalMs: a
|
|
1088
1088
|
}) {
|
|
1089
|
-
const { last: s, cpuValues: r, memoryValues: o, rssValues: l } =
|
|
1089
|
+
const { last: s, cpuValues: r, memoryValues: o, rssValues: l } = nt(e);
|
|
1090
1090
|
return /* @__PURE__ */ i("section", { className: "w6w-server-resources w6w-server-resources--card", "aria-label": n, children: [
|
|
1091
1091
|
/* @__PURE__ */ t("h3", { className: "w6w-server-resources__title", children: n }),
|
|
1092
1092
|
/* @__PURE__ */ i("ul", { className: "w6w-server-resources__rows", children: [
|
|
1093
1093
|
/* @__PURE__ */ t(
|
|
1094
|
-
|
|
1094
|
+
Ce,
|
|
1095
1095
|
{
|
|
1096
1096
|
label: "CPU",
|
|
1097
|
-
value:
|
|
1097
|
+
value: X(we(s)),
|
|
1098
1098
|
values: r,
|
|
1099
|
-
max:
|
|
1099
|
+
max: Ae(r)
|
|
1100
1100
|
}
|
|
1101
1101
|
),
|
|
1102
1102
|
/* @__PURE__ */ t(
|
|
1103
|
-
|
|
1103
|
+
Ce,
|
|
1104
1104
|
{
|
|
1105
1105
|
label: "Memory",
|
|
1106
|
-
value:
|
|
1106
|
+
value: X(me(s)),
|
|
1107
1107
|
values: o,
|
|
1108
1108
|
max: 1
|
|
1109
1109
|
}
|
|
1110
1110
|
),
|
|
1111
1111
|
/* @__PURE__ */ t(
|
|
1112
|
-
|
|
1112
|
+
Ce,
|
|
1113
1113
|
{
|
|
1114
1114
|
label: "Process",
|
|
1115
1115
|
value: Vt((s == null ? void 0 : s.processRss) ?? null),
|
|
1116
1116
|
values: l,
|
|
1117
|
-
max:
|
|
1117
|
+
max: Ae(l)
|
|
1118
1118
|
}
|
|
1119
1119
|
)
|
|
1120
1120
|
] }),
|
|
1121
|
-
/* @__PURE__ */ t("p", { className: "w6w-server-resources__meta", children: `Load ${
|
|
1121
|
+
/* @__PURE__ */ t("p", { className: "w6w-server-resources__meta", children: `Load ${We((s == null ? void 0 : s.load1) ?? null)} / ${We((s == null ? void 0 : s.load5) ?? null)} / ${We(
|
|
1122
1122
|
(s == null ? void 0 : s.load15) ?? null
|
|
1123
1123
|
)}` }),
|
|
1124
1124
|
a !== void 0 && /* @__PURE__ */ t("p", { className: "w6w-server-resources__meta", children: `Sampled every ${a / 1e3}s` })
|
|
1125
1125
|
] });
|
|
1126
1126
|
}
|
|
1127
1127
|
function gs({ samples: e, title: n = "Server" }) {
|
|
1128
|
-
const { last: a, cpuValues: s } =
|
|
1128
|
+
const { last: a, cpuValues: s } = nt(e);
|
|
1129
1129
|
return /* @__PURE__ */ i("section", { className: "w6w-server-resources w6w-server-resources--small", "aria-label": n, children: [
|
|
1130
1130
|
/* @__PURE__ */ t("h3", { className: "w6w-server-resources__title", children: n }),
|
|
1131
1131
|
/* @__PURE__ */ i("ul", { className: "w6w-server-resources__rows", children: [
|
|
1132
1132
|
/* @__PURE__ */ t(
|
|
1133
|
-
|
|
1133
|
+
Ce,
|
|
1134
1134
|
{
|
|
1135
1135
|
label: "CPU",
|
|
1136
|
-
value:
|
|
1136
|
+
value: X(we(a)),
|
|
1137
1137
|
values: s,
|
|
1138
|
-
max:
|
|
1138
|
+
max: Ae(s)
|
|
1139
1139
|
}
|
|
1140
1140
|
),
|
|
1141
1141
|
/* @__PURE__ */ i("li", { className: "w6w-server-resources__row", children: [
|
|
1142
1142
|
/* @__PURE__ */ t("span", { className: "w6w-server-resources__label", children: "Memory" }),
|
|
1143
|
-
/* @__PURE__ */ t("span", { className: "w6w-server-resources__value", children:
|
|
1143
|
+
/* @__PURE__ */ t("span", { className: "w6w-server-resources__value", children: X(me(a)) })
|
|
1144
1144
|
] })
|
|
1145
1145
|
] })
|
|
1146
1146
|
] });
|
|
1147
1147
|
}
|
|
1148
1148
|
function ys({ samples: e, onExpand: n }) {
|
|
1149
|
-
const { last: a, cpuValues: s, memoryValues: r } =
|
|
1149
|
+
const { last: a, cpuValues: s, memoryValues: r } = nt(e);
|
|
1150
1150
|
return /* @__PURE__ */ i("aside", { className: "w6w-server-resources w6w-server-resources--rail", children: [
|
|
1151
1151
|
/* @__PURE__ */ i("div", { className: "w6w-server-resources__rail-row", children: [
|
|
1152
1152
|
/* @__PURE__ */ t("span", { className: "w6w-server-resources__label", children: "CPU" }),
|
|
1153
|
-
/* @__PURE__ */ t("span", { className: "w6w-server-resources__value", children:
|
|
1153
|
+
/* @__PURE__ */ t("span", { className: "w6w-server-resources__value", children: X(we(a)) }),
|
|
1154
1154
|
/* @__PURE__ */ t(
|
|
1155
|
-
|
|
1155
|
+
Ze,
|
|
1156
1156
|
{
|
|
1157
1157
|
className: "w6w-server-resources__spark",
|
|
1158
1158
|
values: s,
|
|
1159
|
-
max:
|
|
1159
|
+
max: Ae(s)
|
|
1160
1160
|
}
|
|
1161
1161
|
)
|
|
1162
1162
|
] }),
|
|
1163
1163
|
/* @__PURE__ */ i("div", { className: "w6w-server-resources__rail-row", children: [
|
|
1164
1164
|
/* @__PURE__ */ t("span", { className: "w6w-server-resources__label", children: "MEM" }),
|
|
1165
|
-
/* @__PURE__ */ t("span", { className: "w6w-server-resources__value", children:
|
|
1166
|
-
/* @__PURE__ */ t(
|
|
1165
|
+
/* @__PURE__ */ t("span", { className: "w6w-server-resources__value", children: X(me(a)) }),
|
|
1166
|
+
/* @__PURE__ */ t(Ze, { className: "w6w-server-resources__spark", values: r, max: 1 })
|
|
1167
1167
|
] }),
|
|
1168
1168
|
n !== void 0 && /* @__PURE__ */ t(
|
|
1169
1169
|
"button",
|
|
@@ -1177,8 +1177,8 @@ function ys({ samples: e, onExpand: n }) {
|
|
|
1177
1177
|
)
|
|
1178
1178
|
] });
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1181
|
-
const n = e[e.length - 1], a =
|
|
1180
|
+
function vs({ samples: e }) {
|
|
1181
|
+
const n = e[e.length - 1], a = X(we(n)), s = X(me(n));
|
|
1182
1182
|
return /* @__PURE__ */ t("span", { className: "w6w-server-resources w6w-server-resources--badge", children: `CPU ${a} · MEM ${s}` });
|
|
1183
1183
|
}
|
|
1184
1184
|
const aa = 1, sa = 1440 * 60 * 1e3;
|
|
@@ -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, m = Math.max(r, l), v = Math.min(o, c), w = (m - l) / d * 100, h = (v - m) / d * 100, y = Math.max(h, aa);
|
|
1191
1191
|
return { leftPct: w, widthPct: y, clippedStart: u, clippedEnd: f };
|
|
1192
1192
|
}
|
|
1193
1193
|
const ia = {
|
|
@@ -1202,7 +1202,7 @@ function ca(e) {
|
|
|
1202
1202
|
e.resolvedAt !== void 0 ? `${n} – ${e.resolvedAt}` : `${n} – ongoing`
|
|
1203
1203
|
), a.join(" ");
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1205
|
+
function Ns({
|
|
1206
1206
|
window: e,
|
|
1207
1207
|
days: n,
|
|
1208
1208
|
incidents: a,
|
|
@@ -1222,17 +1222,17 @@ function vs({
|
|
|
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 (
|
|
1227
|
-
const
|
|
1228
|
-
|
|
1229
|
-
|
|
1225
|
+
const m = la(e, u, r);
|
|
1226
|
+
if (m === null) return null;
|
|
1227
|
+
const v = [
|
|
1228
|
+
m.clippedStart ? "w6w-history-bar-clip-start" : "",
|
|
1229
|
+
m.clippedEnd ? "w6w-history-bar-clip-end" : ""
|
|
1230
1230
|
].filter(Boolean).join(" ");
|
|
1231
1231
|
return /* @__PURE__ */ t(
|
|
1232
1232
|
"span",
|
|
1233
1233
|
{
|
|
1234
|
-
className: `w6w-history-bar w6w-history-bar-${u.state}${
|
|
1235
|
-
style: { left: `${
|
|
1234
|
+
className: `w6w-history-bar w6w-history-bar-${u.state}${v ? ` ${v}` : ""}`,
|
|
1235
|
+
style: { left: `${m.leftPct}%`, width: `${m.widthPct}%` },
|
|
1236
1236
|
title: ca(u)
|
|
1237
1237
|
},
|
|
1238
1238
|
u.id ?? `${u.title}-${f}`
|
|
@@ -1245,10 +1245,10 @@ function vs({
|
|
|
1245
1245
|
] }) });
|
|
1246
1246
|
}
|
|
1247
1247
|
function bs({ label: e, children: n, className: a }) {
|
|
1248
|
-
const [s, r] =
|
|
1248
|
+
const [s, r] = k(!1), o = Un();
|
|
1249
1249
|
return /* @__PURE__ */ i("span", { className: ["w6w-info-tip", a ?? ""].filter(Boolean).join(" "), children: [
|
|
1250
1250
|
/* @__PURE__ */ t(
|
|
1251
|
-
|
|
1251
|
+
de,
|
|
1252
1252
|
{
|
|
1253
1253
|
label: e,
|
|
1254
1254
|
icon: "info",
|
|
@@ -1263,7 +1263,7 @@ function bs({ label: e, children: n, className: a }) {
|
|
|
1263
1263
|
function qt(e) {
|
|
1264
1264
|
const { label: n, onClick: a, disabled: s, className: r, ...o } = e;
|
|
1265
1265
|
return /* @__PURE__ */ t(
|
|
1266
|
-
|
|
1266
|
+
de,
|
|
1267
1267
|
{
|
|
1268
1268
|
label: n,
|
|
1269
1269
|
onClick: a,
|
|
@@ -1275,14 +1275,14 @@ function qt(e) {
|
|
|
1275
1275
|
);
|
|
1276
1276
|
}
|
|
1277
1277
|
function ks(e) {
|
|
1278
|
-
const { branch: n, shortSha: a, lastSyncLabel: s, onSyncNow: r, syncing: o, className: l, ...c } = e, [d, u] =
|
|
1279
|
-
return
|
|
1278
|
+
const { branch: n, shortSha: a, lastSyncLabel: s, onSyncNow: r, syncing: o, className: l, ...c } = e, [d, u] = k(!1), f = jt(null);
|
|
1279
|
+
return G(() => {
|
|
1280
1280
|
if (!d) return;
|
|
1281
|
-
const
|
|
1281
|
+
const m = (w) => {
|
|
1282
1282
|
f.current && !f.current.contains(w.target) && u(!1);
|
|
1283
|
-
},
|
|
1284
|
-
return document.addEventListener("mousedown",
|
|
1285
|
-
document.removeEventListener("mousedown",
|
|
1283
|
+
}, v = (w) => w.key === "Escape" && u(!1);
|
|
1284
|
+
return document.addEventListener("mousedown", m), document.addEventListener("keydown", v), () => {
|
|
1285
|
+
document.removeEventListener("mousedown", m), document.removeEventListener("keydown", v);
|
|
1286
1286
|
};
|
|
1287
1287
|
}, [d]), /* @__PURE__ */ i(
|
|
1288
1288
|
"div",
|
|
@@ -1299,11 +1299,11 @@ function ks(e) {
|
|
|
1299
1299
|
"aria-haspopup": "menu",
|
|
1300
1300
|
"aria-expanded": d,
|
|
1301
1301
|
"aria-busy": o,
|
|
1302
|
-
onClick: () => u((
|
|
1302
|
+
onClick: () => u((m) => !m),
|
|
1303
1303
|
children: [
|
|
1304
1304
|
/* @__PURE__ */ i("span", { className: "w6w-repo-sync-icon", children: [
|
|
1305
|
-
/* @__PURE__ */ t(
|
|
1306
|
-
o && /* @__PURE__ */ t(
|
|
1305
|
+
/* @__PURE__ */ t(Xe, { name: "github" }),
|
|
1306
|
+
o && /* @__PURE__ */ t(Xe, { name: "sync", size: 10, className: "w6w-repo-sync-spin" })
|
|
1307
1307
|
] }),
|
|
1308
1308
|
/* @__PURE__ */ t("span", { className: "w6w-repo-sync-branch", children: n }),
|
|
1309
1309
|
a != null && /* @__PURE__ */ t("code", { className: "w6w-repo-sync-sha", children: a })
|
|
@@ -1342,18 +1342,18 @@ const da = {
|
|
|
1342
1342
|
queued: "Queued",
|
|
1343
1343
|
canceled: "Canceled"
|
|
1344
1344
|
};
|
|
1345
|
-
function
|
|
1345
|
+
function at({ state: e, label: n, ariaLabel: a }) {
|
|
1346
1346
|
const s = n ?? da[e];
|
|
1347
1347
|
return /* @__PURE__ */ i("span", { className: `w6w-step-pill w6w-step-pill-${e}`, "aria-label": a, children: [
|
|
1348
1348
|
/* @__PURE__ */ t("span", { className: "w6w-step-pill-dot", "aria-hidden": "true" }),
|
|
1349
1349
|
/* @__PURE__ */ t("span", { className: "w6w-step-pill-label", children: s })
|
|
1350
1350
|
] });
|
|
1351
1351
|
}
|
|
1352
|
-
const ua = "—",
|
|
1353
|
-
function
|
|
1354
|
-
return e == null || !Number.isFinite(e) || e < 0 ? ua : e <
|
|
1352
|
+
const ua = "—", Ve = 1e3, qe = 6e4;
|
|
1353
|
+
function st(e) {
|
|
1354
|
+
return e == null || !Number.isFinite(e) || e < 0 ? ua : e < Ve ? `${Math.round(e)} ms` : e < qe ? `${(e / Ve).toFixed(1)} s` : `${Math.floor(e / qe)}m ${Math.round(e % qe / Ve)}s`;
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1356
|
+
function Ee(e) {
|
|
1357
1357
|
const n = new Date(e);
|
|
1358
1358
|
return Number.isNaN(n.getTime()) ? e : n.toLocaleString(void 0, { dateStyle: "medium", timeStyle: "short" });
|
|
1359
1359
|
}
|
|
@@ -1385,9 +1385,9 @@ function xs({
|
|
|
1385
1385
|
onPrev: d,
|
|
1386
1386
|
onNext: u,
|
|
1387
1387
|
onRerun: f,
|
|
1388
|
-
rerunningId:
|
|
1388
|
+
rerunningId: m = null
|
|
1389
1389
|
}) {
|
|
1390
|
-
const
|
|
1390
|
+
const v = d || u ? /* @__PURE__ */ i("div", { className: "w6w-execution-list-pager", children: [
|
|
1391
1391
|
/* @__PURE__ */ t(
|
|
1392
1392
|
"button",
|
|
1393
1393
|
{
|
|
@@ -1412,63 +1412,63 @@ function xs({
|
|
|
1412
1412
|
)
|
|
1413
1413
|
] }) : null;
|
|
1414
1414
|
let w;
|
|
1415
|
-
return r && e.length === 0 ? w = /* @__PURE__ */ t("p", { "data-testid": "execution-list-loading", children: "Loading…" }) : e.length === 0 ? w = /* @__PURE__ */ t("p", { "data-testid": "execution-list-empty", children: o ?? "No executions yet." }) : w = /* @__PURE__ */ t("ul", { className: "w6w-execution-list-rows", children: e.map((
|
|
1415
|
+
return r && e.length === 0 ? w = /* @__PURE__ */ t("p", { "data-testid": "execution-list-loading", children: "Loading…" }) : e.length === 0 ? w = /* @__PURE__ */ t("p", { "data-testid": "execution-list-empty", children: o ?? "No executions yet." }) : w = /* @__PURE__ */ t("ul", { className: "w6w-execution-list-rows", children: e.map((h) => /* @__PURE__ */ i("li", { "data-testid": "execution-row", "data-execution-id": h.id, children: [
|
|
1416
1416
|
/* @__PURE__ */ t(
|
|
1417
|
-
|
|
1417
|
+
Qe,
|
|
1418
1418
|
{
|
|
1419
|
-
icon: /* @__PURE__ */ t(
|
|
1420
|
-
title: /* @__PURE__ */ i(
|
|
1421
|
-
s ?
|
|
1422
|
-
|
|
1419
|
+
icon: /* @__PURE__ */ t(at, { state: h.status }),
|
|
1420
|
+
title: /* @__PURE__ */ i(R, { children: [
|
|
1421
|
+
s ? h.callableName : Ee(h.startedAt),
|
|
1422
|
+
h.rerunOf && /* @__PURE__ */ t(
|
|
1423
1423
|
"span",
|
|
1424
1424
|
{
|
|
1425
1425
|
className: "w6w-execution-rerun-tag",
|
|
1426
1426
|
"data-testid": "execution-row-rerun-tag",
|
|
1427
|
-
title: `Re-run of ${
|
|
1427
|
+
title: `Re-run of ${h.rerunOf}`,
|
|
1428
1428
|
children: "Re-run"
|
|
1429
1429
|
}
|
|
1430
1430
|
)
|
|
1431
1431
|
] }),
|
|
1432
|
-
subtitle: /* @__PURE__ */ i(
|
|
1433
|
-
s ? `${wa[
|
|
1434
|
-
$t(
|
|
1435
|
-
|
|
1432
|
+
subtitle: /* @__PURE__ */ i(R, { children: [
|
|
1433
|
+
s ? `${wa[h.kind]} · ${Ee(h.startedAt)}` : h.id,
|
|
1434
|
+
$t(h) && /* @__PURE__ */ t("span", { className: "w6w-execution-trigger", "data-testid": "execution-row-trigger", children: ` · ${$t(h)}` }),
|
|
1435
|
+
h.inputPreview && /* @__PURE__ */ i(R, { children: [
|
|
1436
1436
|
" · ",
|
|
1437
1437
|
/* @__PURE__ */ t(
|
|
1438
1438
|
"code",
|
|
1439
1439
|
{
|
|
1440
1440
|
className: "w6w-execution-input-preview",
|
|
1441
1441
|
"data-testid": "execution-row-input",
|
|
1442
|
-
title:
|
|
1443
|
-
children:
|
|
1442
|
+
title: h.inputPreview,
|
|
1443
|
+
children: h.inputPreview
|
|
1444
1444
|
}
|
|
1445
1445
|
)
|
|
1446
1446
|
] })
|
|
1447
1447
|
] }),
|
|
1448
|
-
trailing:
|
|
1449
|
-
active:
|
|
1450
|
-
onClick: a ? () => a(
|
|
1448
|
+
trailing: st(h.durationMs),
|
|
1449
|
+
active: h.id === n,
|
|
1450
|
+
onClick: a ? () => a(h.id) : void 0
|
|
1451
1451
|
}
|
|
1452
1452
|
),
|
|
1453
1453
|
f && /* @__PURE__ */ t(
|
|
1454
|
-
|
|
1454
|
+
de,
|
|
1455
1455
|
{
|
|
1456
1456
|
icon: "sync",
|
|
1457
1457
|
label: "Re-run",
|
|
1458
|
-
title:
|
|
1458
|
+
title: h.id === m ? "Re-running…" : "Re-run with the same input",
|
|
1459
1459
|
className: "w6w-execution-list-rerun",
|
|
1460
1460
|
"data-testid": "execution-row-rerun",
|
|
1461
|
-
disabled:
|
|
1462
|
-
onClick: () => f(
|
|
1461
|
+
disabled: m !== null,
|
|
1462
|
+
onClick: () => f(h.id)
|
|
1463
1463
|
}
|
|
1464
1464
|
)
|
|
1465
|
-
] },
|
|
1465
|
+
] }, h.id)) }), /* @__PURE__ */ i("div", { className: "w6w-execution-list", "data-testid": "execution-list", children: [
|
|
1466
1466
|
w,
|
|
1467
|
-
|
|
1467
|
+
v
|
|
1468
1468
|
] });
|
|
1469
1469
|
}
|
|
1470
1470
|
function ha(e) {
|
|
1471
|
-
const n =
|
|
1471
|
+
const n = Rn(e.app, e.action);
|
|
1472
1472
|
return {
|
|
1473
1473
|
trigger: e.trigger === !0 || (n == null ? void 0 : n.group) === "trigger",
|
|
1474
1474
|
appName: e.appName ?? (n == null ? void 0 : n.displayName) ?? e.app,
|
|
@@ -1492,26 +1492,26 @@ function pa({
|
|
|
1492
1492
|
runError: s,
|
|
1493
1493
|
stepErrors: r
|
|
1494
1494
|
}) {
|
|
1495
|
-
const o = a ? /* @__PURE__ */ t("div", { className: "w6w-execution-log-head", children: /* @__PURE__ */ t(
|
|
1496
|
-
s && /* @__PURE__ */ t(
|
|
1497
|
-
l.map((
|
|
1498
|
-
|
|
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
|
+
s && /* @__PURE__ */ t(et, { error: s }),
|
|
1497
|
+
l.map((m, v) => /* @__PURE__ */ t(
|
|
1498
|
+
et,
|
|
1499
1499
|
{
|
|
1500
|
-
label:
|
|
1501
|
-
error:
|
|
1500
|
+
label: m.label ?? m.stepId,
|
|
1501
|
+
error: m.error
|
|
1502
1502
|
},
|
|
1503
|
-
`${
|
|
1503
|
+
`${m.stepId}:${v}`
|
|
1504
1504
|
))
|
|
1505
|
-
] }) : null, d = Ht(e.filter((
|
|
1506
|
-
return d.length === 0 ? /* @__PURE__ */ i(
|
|
1505
|
+
] }) : null, d = Ht(e.filter((m) => !Tt(m))), u = e.filter(Tt), 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((m) => /* @__PURE__ */ t(zt, { step: m }, m.id)) }),
|
|
1515
1515
|
f
|
|
1516
1516
|
] });
|
|
1517
1517
|
}
|
|
@@ -1529,8 +1529,8 @@ function ga({ steps: e }) {
|
|
|
1529
1529
|
}
|
|
1530
1530
|
function zt({ step: e }) {
|
|
1531
1531
|
var d, u;
|
|
1532
|
-
const [n, a] =
|
|
1533
|
-
/* @__PURE__ */ t(
|
|
1532
|
+
const [n, a] = k(!1), s = e.node ? ha(e.node) : null, r = /* @__PURE__ */ i("div", { className: "w6w-execution-log-row-header", children: [
|
|
1533
|
+
/* @__PURE__ */ t(at, { state: e.status }),
|
|
1534
1534
|
s && /* @__PURE__ */ t(
|
|
1535
1535
|
"span",
|
|
1536
1536
|
{
|
|
@@ -1544,8 +1544,8 @@ function zt({ step: e }) {
|
|
|
1544
1544
|
s && /* @__PURE__ */ t("span", { className: "w6w-execution-log-row-uses", "data-testid": "execution-log-uses", children: s.appName === s.actionName ? s.appName : `${s.appName} · ${s.actionName}` })
|
|
1545
1545
|
] }),
|
|
1546
1546
|
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
|
-
/* @__PURE__ */ t(
|
|
1548
|
-
] }), o = e.error ? /* @__PURE__ */ t(
|
|
1547
|
+
/* @__PURE__ */ t(Na, { startedAt: e.startedAt, finishedAt: e.finishedAt })
|
|
1548
|
+
] }), o = e.error ? /* @__PURE__ */ t(et, { error: e.error }) : null, l = Array.isArray(e.iterations) ? /* @__PURE__ */ t(ya, { step: e }) : null, c = Ca(e) ? /* @__PURE__ */ t(Sa, { step: e }) : null;
|
|
1549
1549
|
return e.input === void 0 && e.output === void 0 && !e.meta && !c && !((d = e.logs) != null && d.length) ? /* @__PURE__ */ i("li", { className: "w6w-execution-log-row", children: [
|
|
1550
1550
|
/* @__PURE__ */ t("div", { className: "w6w-section", children: r }),
|
|
1551
1551
|
o,
|
|
@@ -1559,12 +1559,12 @@ function zt({ step: e }) {
|
|
|
1559
1559
|
/* @__PURE__ */ t(At, { title: "Output", value: e.output }),
|
|
1560
1560
|
!!((u = e.logs) != null && u.length) && /* @__PURE__ */ i("div", { className: "w6w-execution-log-json w6w-stack", children: [
|
|
1561
1561
|
/* @__PURE__ */ t("strong", { className: "w6w-small", children: "Console" }),
|
|
1562
|
-
/* @__PURE__ */ t(
|
|
1562
|
+
/* @__PURE__ */ t(Te, { code: e.logs.join(`
|
|
1563
1563
|
`), language: "plaintext" })
|
|
1564
1564
|
] }),
|
|
1565
1565
|
e.meta && /* @__PURE__ */ i("div", { className: "w6w-execution-log-json w6w-stack", children: [
|
|
1566
1566
|
/* @__PURE__ */ t("strong", { className: "w6w-small", children: "Metadata" }),
|
|
1567
|
-
/* @__PURE__ */ t(
|
|
1567
|
+
/* @__PURE__ */ t(Te, { code: JSON.stringify(e.meta, null, 2), language: "json" })
|
|
1568
1568
|
] }),
|
|
1569
1569
|
c
|
|
1570
1570
|
] })
|
|
@@ -1575,10 +1575,10 @@ function zt({ step: e }) {
|
|
|
1575
1575
|
}
|
|
1576
1576
|
function ya({ step: e }) {
|
|
1577
1577
|
var u, f;
|
|
1578
|
-
const n = [...e.iterations ?? []].sort((
|
|
1579
|
-
for (const
|
|
1580
|
-
c.has(
|
|
1581
|
-
const d = (r == null ? void 0 : r.failedNodeId) ?? ((f = r == null ? void 0 : r.steps.find((
|
|
1578
|
+
const n = [...e.iterations ?? []].sort((m, v) => m.index - v.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) ?? ((u = n[n.length - 1]) == null ? void 0 : u.index), l = [], c = /* @__PURE__ */ new Map();
|
|
1579
|
+
for (const m of Ht(n.flatMap((v) => v.steps)))
|
|
1580
|
+
c.has(m.id) || (l.push(m.id), c.set(m.id, m.label ?? m.id));
|
|
1581
|
+
const d = (r == null ? void 0 : r.failedNodeId) ?? ((f = r == null ? void 0 : r.steps.find((m) => m.status === "failed")) == null ? void 0 : f.id);
|
|
1582
1582
|
return /* @__PURE__ */ i("div", { className: "w6w-execution-log-foreach w6w-stack", children: [
|
|
1583
1583
|
/* @__PURE__ */ i("div", { className: "w6w-small", "data-testid": "execution-log-foreach-summary", children: [
|
|
1584
1584
|
/* @__PURE__ */ i("span", { children: [
|
|
@@ -1592,40 +1592,40 @@ function ya({ step: e }) {
|
|
|
1592
1592
|
] }),
|
|
1593
1593
|
e.iterationsTruncated === !0 && /* @__PURE__ */ t("div", { className: "w6w-muted", children: `showing ${n.length} of ${a}` })
|
|
1594
1594
|
] }),
|
|
1595
|
-
/* @__PURE__ */ t("div", { className: "w6w-execution-log-iteration-chips", children: n.map((
|
|
1595
|
+
/* @__PURE__ */ t("div", { className: "w6w-execution-log-iteration-chips", children: n.map((m) => /* @__PURE__ */ i(
|
|
1596
1596
|
"span",
|
|
1597
1597
|
{
|
|
1598
|
-
className: `w6w-execution-log-iteration-chip w6w-execution-log-iteration-chip-${
|
|
1598
|
+
className: `w6w-execution-log-iteration-chip w6w-execution-log-iteration-chip-${m.status}`,
|
|
1599
1599
|
"data-testid": "execution-log-iteration-chip",
|
|
1600
|
-
"data-status":
|
|
1600
|
+
"data-status": m.status,
|
|
1601
1601
|
children: [
|
|
1602
|
-
|
|
1602
|
+
m.index,
|
|
1603
1603
|
" · ",
|
|
1604
|
-
|
|
1604
|
+
m.status
|
|
1605
1605
|
]
|
|
1606
1606
|
},
|
|
1607
|
-
|
|
1607
|
+
m.index
|
|
1608
1608
|
)) }),
|
|
1609
|
-
/* @__PURE__ */ t("ul", { className: "w6w-execution-log-subrows", children: l.map((
|
|
1610
|
-
|
|
1609
|
+
/* @__PURE__ */ t("ul", { className: "w6w-execution-log-subrows", children: l.map((m) => /* @__PURE__ */ t(
|
|
1610
|
+
va,
|
|
1611
1611
|
{
|
|
1612
|
-
id:
|
|
1613
|
-
label: c.get(
|
|
1612
|
+
id: m,
|
|
1613
|
+
label: c.get(m) ?? m,
|
|
1614
1614
|
iterations: n,
|
|
1615
1615
|
initial: o
|
|
1616
1616
|
},
|
|
1617
|
-
|
|
1617
|
+
m
|
|
1618
1618
|
)) })
|
|
1619
1619
|
] });
|
|
1620
1620
|
}
|
|
1621
|
-
function
|
|
1621
|
+
function va({
|
|
1622
1622
|
id: e,
|
|
1623
1623
|
label: n,
|
|
1624
1624
|
iterations: a,
|
|
1625
1625
|
initial: s
|
|
1626
1626
|
}) {
|
|
1627
1627
|
var c;
|
|
1628
|
-
const [r, o] =
|
|
1628
|
+
const [r, o] = k(s), l = (c = a.find((d) => d.index === r)) == null ? void 0 : c.steps.find((d) => d.id === e);
|
|
1629
1629
|
return /* @__PURE__ */ i("li", { className: "w6w-execution-log-subrow w6w-stack", children: [
|
|
1630
1630
|
/* @__PURE__ */ i("div", { className: "w6w-execution-log-subrow-head", children: [
|
|
1631
1631
|
/* @__PURE__ */ t("strong", { className: "w6w-small", children: n }),
|
|
@@ -1644,14 +1644,14 @@ function Na({
|
|
|
1644
1644
|
l ? /* @__PURE__ */ t("ol", { className: "w6w-execution-log", children: /* @__PURE__ */ t(zt, { step: l }, r) }) : /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Did not run in this iteration." })
|
|
1645
1645
|
] });
|
|
1646
1646
|
}
|
|
1647
|
-
function
|
|
1647
|
+
function et({ error: e, label: n }) {
|
|
1648
1648
|
return /* @__PURE__ */ i("div", { className: "w6w-result w6w-error", children: [
|
|
1649
1649
|
n !== void 0 && /* @__PURE__ */ t("strong", { className: "w6w-execution-log-error-label", children: n }),
|
|
1650
1650
|
e.code && /* @__PURE__ */ t("div", { className: "w6w-small w6w-execution-log-error-code", children: /* @__PURE__ */ t("code", { children: e.code }) }),
|
|
1651
1651
|
e.message
|
|
1652
1652
|
] });
|
|
1653
1653
|
}
|
|
1654
|
-
function
|
|
1654
|
+
function Na({ startedAt: e, finishedAt: n }) {
|
|
1655
1655
|
if (e && n) {
|
|
1656
1656
|
const a = ba(e, n);
|
|
1657
1657
|
return /* @__PURE__ */ i("span", { className: "w6w-execution-log-timing", children: [
|
|
@@ -1681,7 +1681,7 @@ function ba(e, n) {
|
|
|
1681
1681
|
return `${l}m ${c}s`;
|
|
1682
1682
|
}
|
|
1683
1683
|
function At({ title: e, value: n }) {
|
|
1684
|
-
const [a, s] =
|
|
1684
|
+
const [a, s] = k(!1);
|
|
1685
1685
|
return n === void 0 ? /* @__PURE__ */ i("div", { className: "w6w-execution-log-json w6w-stack", children: [
|
|
1686
1686
|
/* @__PURE__ */ t("strong", { className: "w6w-small", children: e }),
|
|
1687
1687
|
/* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Not available." })
|
|
@@ -1695,13 +1695,13 @@ function At({ title: e, value: n }) {
|
|
|
1695
1695
|
},
|
|
1696
1696
|
children: [
|
|
1697
1697
|
/* @__PURE__ */ t("summary", { children: /* @__PURE__ */ t("strong", { className: "w6w-small", children: e }) }),
|
|
1698
|
-
a && /* @__PURE__ */ t(
|
|
1698
|
+
a && /* @__PURE__ */ t(Ye, { value: n, format: "json" })
|
|
1699
1699
|
]
|
|
1700
1700
|
}
|
|
1701
1701
|
);
|
|
1702
1702
|
}
|
|
1703
1703
|
const Re = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
|
|
1704
|
-
function
|
|
1704
|
+
function Et(e) {
|
|
1705
1705
|
if (!Re(e) || !Array.isArray(e.conditions)) return;
|
|
1706
1706
|
const n = e.conditions.filter(
|
|
1707
1707
|
(a) => Re(a) && typeof a.op == "string" && "result" in a
|
|
@@ -1714,10 +1714,10 @@ function Rt(e) {
|
|
|
1714
1714
|
};
|
|
1715
1715
|
}
|
|
1716
1716
|
function ka({ input: e }) {
|
|
1717
|
-
const n = [], a =
|
|
1717
|
+
const n = [], a = Et(e);
|
|
1718
1718
|
if (a && n.push({ trace: a }), Re(e) && Array.isArray(e.routes))
|
|
1719
1719
|
for (const s of e.routes) {
|
|
1720
|
-
const r =
|
|
1720
|
+
const r = Et(s);
|
|
1721
1721
|
!r || !Re(s) || n.push({ title: String(s.label ?? s.id ?? "Route"), trace: r });
|
|
1722
1722
|
}
|
|
1723
1723
|
return n.length === 0 ? null : /* @__PURE__ */ i("div", { className: "w6w-execution-log-json w6w-stack", "data-testid": "execution-log-conditions", children: [
|
|
@@ -1727,7 +1727,7 @@ function ka({ input: e }) {
|
|
|
1727
1727
|
(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
1728
|
r.combinator && r.rows.length > 1 && _n(r.combinator),
|
|
1729
1729
|
r.combinator && r.rows.length > 1 && r.result !== void 0 && " · ",
|
|
1730
|
-
r.result !== void 0 && /* @__PURE__ */ i(
|
|
1730
|
+
r.result !== void 0 && /* @__PURE__ */ i(R, { children: [
|
|
1731
1731
|
"Result:",
|
|
1732
1732
|
" ",
|
|
1733
1733
|
/* @__PURE__ */ t(
|
|
@@ -1749,9 +1749,9 @@ function ka({ input: e }) {
|
|
|
1749
1749
|
/* @__PURE__ */ t("tbody", { children: r.rows.map((l, c) => (
|
|
1750
1750
|
// biome-ignore lint/suspicious/noArrayIndexKey: rows are positional and never reorder.
|
|
1751
1751
|
/* @__PURE__ */ i("tr", { children: [
|
|
1752
|
-
/* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("code", { children:
|
|
1752
|
+
/* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("code", { children: Rt(l.left) }) }),
|
|
1753
1753
|
/* @__PURE__ */ t("td", { children: On(l.op) }),
|
|
1754
|
-
/* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("code", { children:
|
|
1754
|
+
/* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("code", { children: Rt(l.right) }) }),
|
|
1755
1755
|
/* @__PURE__ */ t(
|
|
1756
1756
|
"td",
|
|
1757
1757
|
{
|
|
@@ -1765,7 +1765,7 @@ function ka({ input: e }) {
|
|
|
1765
1765
|
] }, s ?? o))
|
|
1766
1766
|
] });
|
|
1767
1767
|
}
|
|
1768
|
-
function
|
|
1768
|
+
function Rt(e) {
|
|
1769
1769
|
return JSON.stringify(e) ?? "undefined";
|
|
1770
1770
|
}
|
|
1771
1771
|
const _t = {
|
|
@@ -1820,7 +1820,7 @@ function Sa({ step: e }) {
|
|
|
1820
1820
|
}) }),
|
|
1821
1821
|
typeof a == "object" && a !== null && /* @__PURE__ */ i("div", { className: "w6w-stack", "data-testid": "execution-log-state-after", children: [
|
|
1822
1822
|
/* @__PURE__ */ t("span", { className: "w6w-small w6w-muted", children: "State after this step" }),
|
|
1823
|
-
/* @__PURE__ */ t(
|
|
1823
|
+
/* @__PURE__ */ t(Te, { code: JSON.stringify(a, null, 2), language: "json" })
|
|
1824
1824
|
] })
|
|
1825
1825
|
] });
|
|
1826
1826
|
}
|
|
@@ -1920,28 +1920,28 @@ function Cs({
|
|
|
1920
1920
|
)
|
|
1921
1921
|
] });
|
|
1922
1922
|
}
|
|
1923
|
-
const
|
|
1923
|
+
const Se = "—";
|
|
1924
1924
|
function Ss({ stats: e, label: n }) {
|
|
1925
1925
|
const a = [
|
|
1926
1926
|
{
|
|
1927
1927
|
testid: "execution-stat-total",
|
|
1928
1928
|
label: "Executions",
|
|
1929
|
-
value: e ? String(e.total) :
|
|
1929
|
+
value: e ? String(e.total) : Se
|
|
1930
1930
|
},
|
|
1931
1931
|
{
|
|
1932
1932
|
testid: "execution-stat-success-rate",
|
|
1933
1933
|
label: "Success rate",
|
|
1934
|
-
value:
|
|
1934
|
+
value: Ea(e == null ? void 0 : e.successRate)
|
|
1935
1935
|
},
|
|
1936
1936
|
{
|
|
1937
1937
|
testid: "execution-stat-failed",
|
|
1938
1938
|
label: "Failed",
|
|
1939
|
-
value: e ? String(e.failed) :
|
|
1939
|
+
value: e ? String(e.failed) : Se
|
|
1940
1940
|
},
|
|
1941
1941
|
{
|
|
1942
1942
|
testid: "execution-stat-avg-duration",
|
|
1943
1943
|
label: "Avg duration",
|
|
1944
|
-
value: e ?
|
|
1944
|
+
value: e ? st(e.avgDurationMs) : Se
|
|
1945
1945
|
}
|
|
1946
1946
|
];
|
|
1947
1947
|
return e && e.inFlight > 0 && a.push({
|
|
@@ -1956,10 +1956,10 @@ function Ss({ stats: e, label: n }) {
|
|
|
1956
1956
|
] }, s.testid)) })
|
|
1957
1957
|
] });
|
|
1958
1958
|
}
|
|
1959
|
-
function
|
|
1960
|
-
return e == null || !Number.isFinite(e) ?
|
|
1959
|
+
function Ea(e) {
|
|
1960
|
+
return e == null || !Number.isFinite(e) ? Se : `${Math.round(e * 100)}%`;
|
|
1961
1961
|
}
|
|
1962
|
-
const
|
|
1962
|
+
const Ra = {
|
|
1963
1963
|
function: "Function",
|
|
1964
1964
|
endpoint: "Endpoint",
|
|
1965
1965
|
workflow: "Workflow"
|
|
@@ -2023,13 +2023,13 @@ function Oa({
|
|
|
2023
2023
|
onOpenExecution: o
|
|
2024
2024
|
}) {
|
|
2025
2025
|
const l = e.rerunOf;
|
|
2026
|
-
return /* @__PURE__ */ i(
|
|
2026
|
+
return /* @__PURE__ */ i(R, { children: [
|
|
2027
2027
|
/* @__PURE__ */ i("div", { className: "w6w-execution-detail-head", children: [
|
|
2028
2028
|
/* @__PURE__ */ i("div", { className: "w6w-execution-detail-title", children: [
|
|
2029
2029
|
/* @__PURE__ */ t("h3", { className: "w6w-execution-detail-name", children: e.callableName }),
|
|
2030
2030
|
/* @__PURE__ */ i("div", { className: "w6w-execution-detail-meta", children: [
|
|
2031
|
-
/* @__PURE__ */ t(
|
|
2032
|
-
/* @__PURE__ */ t("span", { className: "w6w-execution-detail-kind w6w-muted w6w-small", children:
|
|
2031
|
+
/* @__PURE__ */ t(at, { state: e.status }),
|
|
2032
|
+
/* @__PURE__ */ t("span", { className: "w6w-execution-detail-kind w6w-muted w6w-small", children: Ra[e.kind] })
|
|
2033
2033
|
] })
|
|
2034
2034
|
] }),
|
|
2035
2035
|
(s || a || n) && /* @__PURE__ */ i("div", { className: "w6w-execution-detail-actions", children: [
|
|
@@ -2043,7 +2043,7 @@ function Oa({
|
|
|
2043
2043
|
disabled: r,
|
|
2044
2044
|
onClick: s,
|
|
2045
2045
|
children: [
|
|
2046
|
-
/* @__PURE__ */ t(
|
|
2046
|
+
/* @__PURE__ */ t(Xe, { name: "sync", size: 14 }),
|
|
2047
2047
|
" ",
|
|
2048
2048
|
r ? "Re-running…" : "Re-run"
|
|
2049
2049
|
]
|
|
@@ -2059,7 +2059,7 @@ function Oa({
|
|
|
2059
2059
|
children: "Open in visual editor"
|
|
2060
2060
|
}
|
|
2061
2061
|
),
|
|
2062
|
-
n && /* @__PURE__ */ t(
|
|
2062
|
+
n && /* @__PURE__ */ t(de, { label: "Close", "data-testid": "execution-detail-close", onClick: n, children: "×" })
|
|
2063
2063
|
] })
|
|
2064
2064
|
] }),
|
|
2065
2065
|
/* @__PURE__ */ t("p", { className: "w6w-execution-detail-id-line", children: /* @__PURE__ */ t("code", { className: "w6w-execution-detail-id", "data-testid": "execution-detail-id", children: e.id }) }),
|
|
@@ -2078,15 +2078,15 @@ function Oa({
|
|
|
2078
2078
|
) : /* @__PURE__ */ t("code", { children: l })
|
|
2079
2079
|
] }),
|
|
2080
2080
|
/* @__PURE__ */ i("dl", { className: "w6w-execution-detail-timing", children: [
|
|
2081
|
-
/* @__PURE__ */ t(
|
|
2081
|
+
/* @__PURE__ */ t(He, { label: "Started", value: Ee(e.startedAt) }),
|
|
2082
2082
|
/* @__PURE__ */ t(
|
|
2083
|
-
|
|
2083
|
+
He,
|
|
2084
2084
|
{
|
|
2085
2085
|
label: "Finished",
|
|
2086
|
-
value: e.finishedAt ?
|
|
2086
|
+
value: e.finishedAt ? Ee(e.finishedAt) : "—"
|
|
2087
2087
|
}
|
|
2088
2088
|
),
|
|
2089
|
-
/* @__PURE__ */ t(
|
|
2089
|
+
/* @__PURE__ */ t(He, { label: "Duration", value: st(e.durationMs) })
|
|
2090
2090
|
] }),
|
|
2091
2091
|
e.steps !== void 0 && /* @__PURE__ */ i(
|
|
2092
2092
|
"section",
|
|
@@ -2099,21 +2099,21 @@ function Oa({
|
|
|
2099
2099
|
]
|
|
2100
2100
|
}
|
|
2101
2101
|
),
|
|
2102
|
-
e.input !== void 0 && /* @__PURE__ */ t(
|
|
2103
|
-
e.output !== void 0 && /* @__PURE__ */ t(
|
|
2104
|
-
e.error != null && /* @__PURE__ */ t(
|
|
2102
|
+
e.input !== void 0 && /* @__PURE__ */ t(ze, { title: "Input", testid: "execution-detail-input", value: e.input }),
|
|
2103
|
+
e.output !== void 0 && /* @__PURE__ */ t(ze, { title: "Output", testid: "execution-detail-output", value: e.output }),
|
|
2104
|
+
e.error != null && /* @__PURE__ */ t(ze, { title: "Error", testid: "execution-detail-error", value: e.error })
|
|
2105
2105
|
] });
|
|
2106
2106
|
}
|
|
2107
|
-
function
|
|
2107
|
+
function He({ label: e, value: n }) {
|
|
2108
2108
|
return /* @__PURE__ */ i("div", { className: "w6w-execution-detail-timing-item", children: [
|
|
2109
2109
|
/* @__PURE__ */ t("dt", { children: e }),
|
|
2110
2110
|
/* @__PURE__ */ t("dd", { children: n })
|
|
2111
2111
|
] });
|
|
2112
2112
|
}
|
|
2113
|
-
function
|
|
2113
|
+
function ze({ title: e, testid: n, value: a }) {
|
|
2114
2114
|
return /* @__PURE__ */ i("section", { className: "w6w-execution-detail-section w6w-stack", "data-testid": n, children: [
|
|
2115
2115
|
/* @__PURE__ */ t("strong", { className: "w6w-small", children: e }),
|
|
2116
|
-
/* @__PURE__ */ t(
|
|
2116
|
+
/* @__PURE__ */ t(Te, { code: _a(a), language: "json" })
|
|
2117
2117
|
] });
|
|
2118
2118
|
}
|
|
2119
2119
|
function Ia(e) {
|
|
@@ -2138,12 +2138,12 @@ function Pa(e) {
|
|
|
2138
2138
|
a.attention === "now" ? n.now.push(a) : a.attention === "recent" ? n.recent.push(a) : n.clear.push(a);
|
|
2139
2139
|
return n;
|
|
2140
2140
|
}
|
|
2141
|
-
function
|
|
2141
|
+
function La(e) {
|
|
2142
2142
|
return e.uptime.map((n) => ({ day: n.day, state: n.state }));
|
|
2143
2143
|
}
|
|
2144
|
-
const Pt = 3,
|
|
2144
|
+
const Pt = 3, Ma = 5;
|
|
2145
2145
|
function Da(e, n = {}) {
|
|
2146
|
-
const a = n.compact ?? !1, { now: s, recent: r } = Pa(e), o = s.length + r.length, l = a ? s.slice(0, Pt) : s, c = a ? r.slice(0, Math.max(0, Pt - l.length)) : r, d = a ? e.slice(0, n.limit ??
|
|
2146
|
+
const a = n.compact ?? !1, { now: s, recent: r } = Pa(e), o = s.length + r.length, l = a ? s.slice(0, Pt) : s, c = a ? r.slice(0, Math.max(0, Pt - l.length)) : r, d = a ? e.slice(0, n.limit ?? Ma) : [...e];
|
|
2147
2147
|
return {
|
|
2148
2148
|
attentionCount: o,
|
|
2149
2149
|
shownNow: l,
|
|
@@ -2153,15 +2153,15 @@ function Da(e, n = {}) {
|
|
|
2153
2153
|
hiddenTableCount: e.length - d.length
|
|
2154
2154
|
};
|
|
2155
2155
|
}
|
|
2156
|
-
const
|
|
2157
|
-
function
|
|
2156
|
+
const ke = 640, re = 340, B = { top: 16, right: 24, bottom: 40, left: 56 };
|
|
2157
|
+
function Lt(e) {
|
|
2158
2158
|
if (e <= 0) return 1;
|
|
2159
2159
|
const n = 10 ** Math.floor(Math.log10(e)), a = [1, 2, 5, 10];
|
|
2160
2160
|
for (const s of a)
|
|
2161
2161
|
if (e <= s * n) return s * n;
|
|
2162
2162
|
return 10 * n;
|
|
2163
2163
|
}
|
|
2164
|
-
function
|
|
2164
|
+
function Mt(e, n = 5) {
|
|
2165
2165
|
return Array.from({ length: n + 1 }, (a, s) => Math.round(e * s / n));
|
|
2166
2166
|
}
|
|
2167
2167
|
function Ua({
|
|
@@ -2172,21 +2172,21 @@ function Ua({
|
|
|
2172
2172
|
const s = Ia(e);
|
|
2173
2173
|
if (s.length === 0)
|
|
2174
2174
|
return /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "No timed calls in this window yet." });
|
|
2175
|
-
const r =
|
|
2175
|
+
const r = Lt(Math.max(...s.map((g) => g.calls))), o = Lt(Math.max(...s.map((g) => g.p95Ms))), l = Math.max(1, ...s.map((g) => g.errorCount)), c = ke - B.left - B.right, d = re - B.top - B.bottom, u = (g) => B.left + g / r * c, f = (g) => B.top + g / o * d, m = (g) => 16 + g / l * 14, v = Mt(r), w = Mt(o), h = 18, y = B.top + d / 2;
|
|
2176
2176
|
return /* @__PURE__ */ i("div", { className: "w6w-rel-scatter", children: [
|
|
2177
2177
|
/* @__PURE__ */ i(
|
|
2178
2178
|
"svg",
|
|
2179
2179
|
{
|
|
2180
|
-
viewBox: `0 0 ${
|
|
2181
|
-
style: { aspectRatio: `${
|
|
2180
|
+
viewBox: `0 0 ${ke} ${re}`,
|
|
2181
|
+
style: { aspectRatio: `${ke} / ${re}` },
|
|
2182
2182
|
role: "img",
|
|
2183
2183
|
"aria-label": "API performance: calls versus p95 latency, one point per API",
|
|
2184
2184
|
children: [
|
|
2185
2185
|
/* @__PURE__ */ t(
|
|
2186
2186
|
"rect",
|
|
2187
2187
|
{
|
|
2188
|
-
x:
|
|
2189
|
-
y:
|
|
2188
|
+
x: B.left,
|
|
2189
|
+
y: B.top,
|
|
2190
2190
|
width: c,
|
|
2191
2191
|
height: d,
|
|
2192
2192
|
className: "w6w-rel-scatter-plot-bg"
|
|
@@ -2196,20 +2196,20 @@ function Ua({
|
|
|
2196
2196
|
/* @__PURE__ */ t(
|
|
2197
2197
|
"line",
|
|
2198
2198
|
{
|
|
2199
|
-
x1:
|
|
2200
|
-
x2:
|
|
2199
|
+
x1: B.left,
|
|
2200
|
+
x2: ke - B.right,
|
|
2201
2201
|
y1: f(g),
|
|
2202
2202
|
y2: f(g),
|
|
2203
2203
|
className: "w6w-rel-scatter-grid"
|
|
2204
2204
|
}
|
|
2205
2205
|
),
|
|
2206
|
-
/* @__PURE__ */ t("text", { x:
|
|
2206
|
+
/* @__PURE__ */ t("text", { x: B.left - 8, y: f(g), className: "w6w-rel-scatter-axis-label", textAnchor: "end", children: g })
|
|
2207
2207
|
] }, `y-${g}`)),
|
|
2208
|
-
|
|
2208
|
+
v.map((g) => /* @__PURE__ */ t(
|
|
2209
2209
|
"text",
|
|
2210
2210
|
{
|
|
2211
2211
|
x: u(g),
|
|
2212
|
-
y:
|
|
2212
|
+
y: re - B.bottom + 18,
|
|
2213
2213
|
className: "w6w-rel-scatter-axis-label",
|
|
2214
2214
|
textAnchor: "middle",
|
|
2215
2215
|
children: g
|
|
@@ -2219,32 +2219,32 @@ function Ua({
|
|
|
2219
2219
|
/* @__PURE__ */ t(
|
|
2220
2220
|
"text",
|
|
2221
2221
|
{
|
|
2222
|
-
x:
|
|
2222
|
+
x: h,
|
|
2223
2223
|
y,
|
|
2224
2224
|
className: "w6w-rel-scatter-axis-title",
|
|
2225
2225
|
textAnchor: "middle",
|
|
2226
|
-
transform: `rotate(-90, ${
|
|
2226
|
+
transform: `rotate(-90, ${h}, ${y})`,
|
|
2227
2227
|
children: "p95 (ms)"
|
|
2228
2228
|
}
|
|
2229
2229
|
),
|
|
2230
2230
|
/* @__PURE__ */ t(
|
|
2231
2231
|
"text",
|
|
2232
2232
|
{
|
|
2233
|
-
x:
|
|
2234
|
-
y:
|
|
2233
|
+
x: B.left + c / 2,
|
|
2234
|
+
y: re - 4,
|
|
2235
2235
|
className: "w6w-rel-scatter-axis-title",
|
|
2236
2236
|
textAnchor: "middle",
|
|
2237
2237
|
children: "calls in this window"
|
|
2238
2238
|
}
|
|
2239
2239
|
),
|
|
2240
2240
|
s.map((g) => {
|
|
2241
|
-
const
|
|
2241
|
+
const $ = m(g.errorCount), x = u(g.calls), N = f(g.p95Ms), T = /* @__PURE__ */ i(R, { children: [
|
|
2242
2242
|
/* @__PURE__ */ t(
|
|
2243
2243
|
"circle",
|
|
2244
2244
|
{
|
|
2245
|
-
cx:
|
|
2246
|
-
cy:
|
|
2247
|
-
r:
|
|
2245
|
+
cx: x,
|
|
2246
|
+
cy: N,
|
|
2247
|
+
r: $ / 2 + 2.5,
|
|
2248
2248
|
className: `w6w-rel-scatter-ring w6w-rel-scatter-ring-${g.state}`,
|
|
2249
2249
|
children: /* @__PURE__ */ i("title", { children: [
|
|
2250
2250
|
g.displayName,
|
|
@@ -2261,9 +2261,9 @@ function Ua({
|
|
|
2261
2261
|
/* @__PURE__ */ t(
|
|
2262
2262
|
"circle",
|
|
2263
2263
|
{
|
|
2264
|
-
cx:
|
|
2265
|
-
cy:
|
|
2266
|
-
r:
|
|
2264
|
+
cx: x,
|
|
2265
|
+
cy: N,
|
|
2266
|
+
r: $ / 2,
|
|
2267
2267
|
className: `w6w-rel-scatter-point w6w-rel-scatter-point-${g.state}`
|
|
2268
2268
|
}
|
|
2269
2269
|
)
|
|
@@ -2273,8 +2273,8 @@ function Ua({
|
|
|
2273
2273
|
{
|
|
2274
2274
|
href: n(g.appId),
|
|
2275
2275
|
className: "w6w-rel-scatter-point-link",
|
|
2276
|
-
onClick: a ? (
|
|
2277
|
-
children:
|
|
2276
|
+
onClick: a ? (C) => a(g.appId, C) : void 0,
|
|
2277
|
+
children: T
|
|
2278
2278
|
},
|
|
2279
2279
|
g.appId
|
|
2280
2280
|
) : a ? /* @__PURE__ */ t(
|
|
@@ -2283,16 +2283,16 @@ function Ua({
|
|
|
2283
2283
|
role: "button",
|
|
2284
2284
|
tabIndex: 0,
|
|
2285
2285
|
className: "w6w-rel-scatter-point-link",
|
|
2286
|
-
onClick: (
|
|
2287
|
-
onKeyDown: (
|
|
2288
|
-
(
|
|
2286
|
+
onClick: (C) => a(g.appId, C),
|
|
2287
|
+
onKeyDown: (C) => {
|
|
2288
|
+
(C.key === "Enter" || C.key === " ") && (C.preventDefault(), C.currentTarget.dispatchEvent(
|
|
2289
2289
|
new MouseEvent("click", { bubbles: !0 })
|
|
2290
2290
|
));
|
|
2291
2291
|
},
|
|
2292
|
-
children:
|
|
2292
|
+
children: T
|
|
2293
2293
|
},
|
|
2294
2294
|
g.appId
|
|
2295
|
-
) : /* @__PURE__ */ t("g", { children:
|
|
2295
|
+
) : /* @__PURE__ */ t("g", { children: T }, g.appId);
|
|
2296
2296
|
})
|
|
2297
2297
|
]
|
|
2298
2298
|
}
|
|
@@ -2325,7 +2325,7 @@ function Yt({
|
|
|
2325
2325
|
}
|
|
2326
2326
|
function Gt({ service: e }) {
|
|
2327
2327
|
return /* @__PURE__ */ i("span", { className: "w6w-rel-signal", children: [
|
|
2328
|
-
/* @__PURE__ */ t(
|
|
2328
|
+
/* @__PURE__ */ t(tt, { state: e.state }),
|
|
2329
2329
|
e.ongoingOutageId && /* @__PURE__ */ t("span", { className: "w6w-rel-tag", children: "outage open" }),
|
|
2330
2330
|
e.calls === 0 && /* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: "no calls" })
|
|
2331
2331
|
] });
|
|
@@ -2334,7 +2334,7 @@ function Xt({ vendor: e }) {
|
|
|
2334
2334
|
if (!e) return /* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: "not published" });
|
|
2335
2335
|
const n = e.state === "unknown";
|
|
2336
2336
|
return /* @__PURE__ */ i("span", { className: "w6w-rel-signal", title: e.message ?? void 0, children: [
|
|
2337
|
-
/* @__PURE__ */ t(
|
|
2337
|
+
/* @__PURE__ */ t(tt, { state: e.state, label: n ? "Unavailable" : void 0 }),
|
|
2338
2338
|
!n && e.message && /* @__PURE__ */ t("span", { className: "w6w-rel-vendor-msg w6w-small", children: e.message })
|
|
2339
2339
|
] });
|
|
2340
2340
|
}
|
|
@@ -2350,7 +2350,7 @@ function Fa({ service: e, getHref: n, onOpen: a }) {
|
|
|
2350
2350
|
children: [
|
|
2351
2351
|
/* @__PURE__ */ i("span", { className: "w6w-rel-issue-head", children: [
|
|
2352
2352
|
/* @__PURE__ */ t(
|
|
2353
|
-
|
|
2353
|
+
Oe,
|
|
2354
2354
|
{
|
|
2355
2355
|
src: e.iconSrc,
|
|
2356
2356
|
srcDark: e.iconSrcDark,
|
|
@@ -2392,7 +2392,7 @@ function Ba({
|
|
|
2392
2392
|
children: [
|
|
2393
2393
|
/* @__PURE__ */ t("td", { className: "w6w-rel-td-service", children: /* @__PURE__ */ i(Yt, { appId: e.appId, className: "w6w-rel-open", getHref: n, onOpen: a, children: [
|
|
2394
2394
|
/* @__PURE__ */ t(
|
|
2395
|
-
|
|
2395
|
+
Oe,
|
|
2396
2396
|
{
|
|
2397
2397
|
src: e.iconSrc,
|
|
2398
2398
|
srcDark: e.iconSrcDark,
|
|
@@ -2419,11 +2419,11 @@ function Ba({
|
|
|
2419
2419
|
/* @__PURE__ */ t("td", { className: "w6w-rel-td-uptime", children: s ? (
|
|
2420
2420
|
// A zero-call window is one identical hatched strip — the note says it better.
|
|
2421
2421
|
/* @__PURE__ */ t("span", { className: "w6w-rel-idle-note", children: "No calls in this window" })
|
|
2422
|
-
) : /* @__PURE__ */ i(
|
|
2422
|
+
) : /* @__PURE__ */ i(R, { children: [
|
|
2423
2423
|
/* @__PURE__ */ t(
|
|
2424
2424
|
Zn,
|
|
2425
2425
|
{
|
|
2426
|
-
days:
|
|
2426
|
+
days: La(e),
|
|
2427
2427
|
ariaLabel: `${e.displayName}, ${e.uptime.length}-day status, oldest day first`
|
|
2428
2428
|
}
|
|
2429
2429
|
),
|
|
@@ -2450,22 +2450,22 @@ function As({
|
|
|
2450
2450
|
onShowAll: u,
|
|
2451
2451
|
slots: f
|
|
2452
2452
|
}) {
|
|
2453
|
-
const
|
|
2453
|
+
const m = a ?? (n == null ? void 0 : n.days) ?? 30, v = e.length > 0 && e.every((E) => E.calls > 0 && E.state === "ok"), {
|
|
2454
2454
|
attentionCount: w,
|
|
2455
|
-
shownNow:
|
|
2455
|
+
shownNow: h,
|
|
2456
2456
|
shownRecent: y,
|
|
2457
2457
|
hiddenAttentionCount: g,
|
|
2458
|
-
shownTable:
|
|
2459
|
-
hiddenTableCount:
|
|
2460
|
-
} = Da(e, { compact: s, limit: o }),
|
|
2461
|
-
const
|
|
2462
|
-
return d !== void 0 ? /* @__PURE__ */ t("a", { href: d, className:
|
|
2458
|
+
shownTable: $,
|
|
2459
|
+
hiddenTableCount: x
|
|
2460
|
+
} = Da(e, { compact: s, limit: o }), N = r ?? !s, T = d !== void 0 || u !== void 0, C = (E) => {
|
|
2461
|
+
const P = E.startsWith("Show") ? "w6w-muted w6w-small" : void 0;
|
|
2462
|
+
return d !== void 0 ? /* @__PURE__ */ t("a", { href: d, className: P, onClick: u, children: E }) : u ? /* @__PURE__ */ t(
|
|
2463
2463
|
"button",
|
|
2464
2464
|
{
|
|
2465
2465
|
type: "button",
|
|
2466
|
-
className: `w6w-rel-show-all${
|
|
2466
|
+
className: `w6w-rel-show-all${P ? ` ${P}` : ""}`,
|
|
2467
2467
|
onClick: u,
|
|
2468
|
-
children:
|
|
2468
|
+
children: E
|
|
2469
2469
|
}
|
|
2470
2470
|
) : null;
|
|
2471
2471
|
};
|
|
@@ -2483,56 +2483,56 @@ function As({
|
|
|
2483
2483
|
" days"
|
|
2484
2484
|
] })
|
|
2485
2485
|
] }),
|
|
2486
|
-
s &&
|
|
2486
|
+
s && C("Show all services →"),
|
|
2487
2487
|
f == null ? void 0 : f.actions
|
|
2488
2488
|
] }),
|
|
2489
2489
|
/* @__PURE__ */ i("div", { className: s ? "w6w-rel-card" : void 0, children: [
|
|
2490
2490
|
/* @__PURE__ */ t("p", { className: "w6w-muted w6w-small w6w-rel-intro", children: "Connected services across your account. Performance for the selected project." }),
|
|
2491
|
-
|
|
2491
|
+
v && /* @__PURE__ */ i("div", { className: s ? "w6w-rel-allclear" : "w6w-rel-card w6w-rel-allclear", children: [
|
|
2492
2492
|
/* @__PURE__ */ t("h4", { children: "All clear" }),
|
|
2493
2493
|
/* @__PURE__ */ i("p", { children: [
|
|
2494
2494
|
"Every service you called in the last ",
|
|
2495
|
-
|
|
2495
|
+
m,
|
|
2496
2496
|
" days came back",
|
|
2497
2497
|
" ",
|
|
2498
|
-
/* @__PURE__ */ t(
|
|
2498
|
+
/* @__PURE__ */ t(tt, { state: "ok" }),
|
|
2499
2499
|
" — no degraded stretches, no outages."
|
|
2500
2500
|
] })
|
|
2501
2501
|
] }),
|
|
2502
2502
|
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(
|
|
2503
|
+
e.length > 0 && /* @__PURE__ */ i(R, { children: [
|
|
2504
2504
|
w > 0 && /* @__PURE__ */ i("div", { className: "w6w-rel-group", children: [
|
|
2505
2505
|
/* @__PURE__ */ i("h4", { className: "w6w-rel-group-head", children: [
|
|
2506
2506
|
"Needs attention",
|
|
2507
2507
|
" ",
|
|
2508
2508
|
/* @__PURE__ */ i("span", { className: "w6w-muted w6w-small", children: [
|
|
2509
|
-
|
|
2509
|
+
h.length + y.length,
|
|
2510
2510
|
" of ",
|
|
2511
2511
|
w
|
|
2512
2512
|
] })
|
|
2513
2513
|
] }),
|
|
2514
|
-
/* @__PURE__ */ t("div", { className: "w6w-rel-issues", children: [...
|
|
2514
|
+
/* @__PURE__ */ t("div", { className: "w6w-rel-issues", children: [...h, ...y].map((E) => /* @__PURE__ */ t(Fa, { service: E, getHref: l, onOpen: c }, E.appId)) }),
|
|
2515
2515
|
g > 0 && /* @__PURE__ */ i("p", { className: "w6w-muted w6w-small w6w-rel-more-note", children: [
|
|
2516
2516
|
g,
|
|
2517
2517
|
" more ",
|
|
2518
2518
|
g === 1 ? "needs" : "need",
|
|
2519
2519
|
" ",
|
|
2520
2520
|
"attention",
|
|
2521
|
-
|
|
2521
|
+
T && /* @__PURE__ */ i(R, { children: [
|
|
2522
2522
|
" — ",
|
|
2523
|
-
|
|
2523
|
+
C("view all →")
|
|
2524
2524
|
] })
|
|
2525
2525
|
] })
|
|
2526
2526
|
] }),
|
|
2527
|
-
|
|
2527
|
+
N && /* @__PURE__ */ i("div", { className: "w6w-rel-group", children: [
|
|
2528
2528
|
/* @__PURE__ */ t("h4", { className: "w6w-rel-group-head", children: "Performance across your APIs" }),
|
|
2529
2529
|
/* @__PURE__ */ t(Ua, { services: e, getHref: l, onOpen: c })
|
|
2530
2530
|
] }),
|
|
2531
|
-
|
|
2531
|
+
$.length > 0 && /* @__PURE__ */ i("div", { className: "w6w-rel-group", children: [
|
|
2532
2532
|
/* @__PURE__ */ i("h4", { className: "w6w-rel-group-head", children: [
|
|
2533
2533
|
s ? "Services" : "All services",
|
|
2534
2534
|
" ",
|
|
2535
|
-
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: s ? `${
|
|
2535
|
+
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: s ? `${$.length} of ${e.length}` : e.length })
|
|
2536
2536
|
] }),
|
|
2537
2537
|
/* @__PURE__ */ t("div", { className: "w6w-rel-table-wrap", children: /* @__PURE__ */ i("table", { className: "w6w-rel-table", children: [
|
|
2538
2538
|
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ i("tr", { children: [
|
|
@@ -2540,27 +2540,27 @@ function As({
|
|
|
2540
2540
|
/* @__PURE__ */ t("th", { children: "Status" }),
|
|
2541
2541
|
/* @__PURE__ */ i("th", { children: [
|
|
2542
2542
|
"Last ",
|
|
2543
|
-
|
|
2543
|
+
m,
|
|
2544
2544
|
" days"
|
|
2545
2545
|
] }),
|
|
2546
2546
|
/* @__PURE__ */ t("th", { children: "Latency" })
|
|
2547
2547
|
] }) }),
|
|
2548
|
-
/* @__PURE__ */ t("tbody", { children:
|
|
2548
|
+
/* @__PURE__ */ t("tbody", { children: $.map((E) => /* @__PURE__ */ t(
|
|
2549
2549
|
Ba,
|
|
2550
2550
|
{
|
|
2551
|
-
service:
|
|
2551
|
+
service: E,
|
|
2552
2552
|
getHref: l,
|
|
2553
2553
|
onOpen: c
|
|
2554
2554
|
},
|
|
2555
|
-
|
|
2555
|
+
E.appId
|
|
2556
2556
|
)) })
|
|
2557
2557
|
] }) }),
|
|
2558
|
-
|
|
2559
|
-
|
|
2558
|
+
x > 0 && /* @__PURE__ */ i("p", { className: "w6w-muted w6w-small w6w-rel-more-note", children: [
|
|
2559
|
+
x,
|
|
2560
2560
|
" more",
|
|
2561
|
-
|
|
2561
|
+
T && /* @__PURE__ */ i(R, { children: [
|
|
2562
2562
|
" — ",
|
|
2563
|
-
|
|
2563
|
+
C("view all →")
|
|
2564
2564
|
] })
|
|
2565
2565
|
] })
|
|
2566
2566
|
] })
|
|
@@ -2568,12 +2568,12 @@ function As({
|
|
|
2568
2568
|
] })
|
|
2569
2569
|
] });
|
|
2570
2570
|
}
|
|
2571
|
-
function
|
|
2571
|
+
function Ka(e, n) {
|
|
2572
2572
|
return e.render ? e.render(n) : String(n[e.key] ?? "");
|
|
2573
2573
|
}
|
|
2574
|
-
function
|
|
2574
|
+
function he(e) {
|
|
2575
2575
|
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(
|
|
2576
|
+
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
2577
|
"table",
|
|
2578
2578
|
{
|
|
2579
2579
|
className: d ? `w6w-data-table ${d}` : "w6w-data-table",
|
|
@@ -2582,19 +2582,19 @@ function ue(e) {
|
|
|
2582
2582
|
children: [
|
|
2583
2583
|
/* @__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
2584
|
/* @__PURE__ */ t("tbody", { children: a.map((f) => {
|
|
2585
|
-
var
|
|
2586
|
-
const
|
|
2585
|
+
var v;
|
|
2586
|
+
const m = o == null ? void 0 : o(f);
|
|
2587
2587
|
return (
|
|
2588
2588
|
// 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
2589
|
/* @__PURE__ */ t(
|
|
2590
2590
|
"tr",
|
|
2591
2591
|
{
|
|
2592
|
-
"data-testid": (
|
|
2592
|
+
"data-testid": (v = e.rowTestId) == null ? void 0 : v.call(e, f),
|
|
2593
2593
|
className: r ? "w6w-data-table-row-clickable" : void 0,
|
|
2594
2594
|
onClick: r ? (w) => r(f, w) : void 0,
|
|
2595
2595
|
children: n.map((w) => {
|
|
2596
|
-
const
|
|
2597
|
-
return /* @__PURE__ */ t("td", { style: { textAlign: w.align }, children:
|
|
2596
|
+
const h = Ka(w, f);
|
|
2597
|
+
return /* @__PURE__ */ t("td", { style: { textAlign: w.align }, children: m !== void 0 && w.link !== !1 ? /* @__PURE__ */ t("a", { className: "w6w-data-table-link", href: m, children: h }) : h }, w.key);
|
|
2598
2598
|
})
|
|
2599
2599
|
},
|
|
2600
2600
|
s(f)
|
|
@@ -2605,7 +2605,7 @@ function ue(e) {
|
|
|
2605
2605
|
}
|
|
2606
2606
|
) });
|
|
2607
2607
|
}
|
|
2608
|
-
function
|
|
2608
|
+
function _e({ title: e, children: n, action: a, className: s, testId: r }) {
|
|
2609
2609
|
return /* @__PURE__ */ t(
|
|
2610
2610
|
"div",
|
|
2611
2611
|
{
|
|
@@ -2619,7 +2619,7 @@ function Ee({ title: e, children: n, action: a, className: s, testId: r }) {
|
|
|
2619
2619
|
}
|
|
2620
2620
|
);
|
|
2621
2621
|
}
|
|
2622
|
-
function
|
|
2622
|
+
function Es({
|
|
2623
2623
|
rows: e,
|
|
2624
2624
|
title: n,
|
|
2625
2625
|
description: a,
|
|
@@ -2631,25 +2631,25 @@ function Rs({
|
|
|
2631
2631
|
error: d,
|
|
2632
2632
|
onCreate: u,
|
|
2633
2633
|
creating: f,
|
|
2634
|
-
onImport:
|
|
2635
|
-
onOpen:
|
|
2634
|
+
onImport: m,
|
|
2635
|
+
onOpen: v,
|
|
2636
2636
|
getHref: w,
|
|
2637
|
-
showArchived:
|
|
2637
|
+
showArchived: h,
|
|
2638
2638
|
onShowArchivedChange: y,
|
|
2639
2639
|
slots: g
|
|
2640
2640
|
}) {
|
|
2641
|
-
const [
|
|
2642
|
-
|
|
2643
|
-
},
|
|
2641
|
+
const [$, x] = k(!1), N = h !== void 0, T = N ? h : $, C = T ? e : e.filter((S) => !S.archived), E = v !== void 0 || w !== void 0, P = (S) => {
|
|
2642
|
+
N || x(S), y == null || y(S);
|
|
2643
|
+
}, K = [
|
|
2644
2644
|
{
|
|
2645
2645
|
key: "main",
|
|
2646
2646
|
header: "Name",
|
|
2647
2647
|
render: (S) => {
|
|
2648
|
-
const
|
|
2648
|
+
const I = /* @__PURE__ */ i("span", { className: "w6w-callable-list-main", title: E ? o : void 0, children: [
|
|
2649
2649
|
/* @__PURE__ */ t("span", { children: S.title }),
|
|
2650
2650
|
S.description != null && /* @__PURE__ */ t("span", { className: "w6w-muted w6w-small w6w-callable-list-row-desc", children: S.description })
|
|
2651
2651
|
] });
|
|
2652
|
-
return
|
|
2652
|
+
return v && !w ? /* @__PURE__ */ t("button", { type: "button", className: "w6w-callable-list-open", children: I }) : I;
|
|
2653
2653
|
}
|
|
2654
2654
|
},
|
|
2655
2655
|
{
|
|
@@ -2662,11 +2662,11 @@ function Rs({
|
|
|
2662
2662
|
S.trailing
|
|
2663
2663
|
] }) : null
|
|
2664
2664
|
}
|
|
2665
|
-
], O = e.length > 0 &&
|
|
2665
|
+
], O = e.length > 0 && C.length === 0;
|
|
2666
2666
|
return /* @__PURE__ */ i("section", { className: "w6w-callable-list", children: [
|
|
2667
2667
|
/* @__PURE__ */ i("div", { className: "w6w-callable-list-head", children: [
|
|
2668
2668
|
/* @__PURE__ */ i("div", { className: "w6w-callable-list-heading", children: [
|
|
2669
|
-
(g == null ? void 0 : g.header) ?? /* @__PURE__ */ i(
|
|
2669
|
+
(g == null ? void 0 : g.header) ?? /* @__PURE__ */ i(R, { children: [
|
|
2670
2670
|
/* @__PURE__ */ t("h2", { className: "w6w-callable-list-title", children: n }),
|
|
2671
2671
|
a != null && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small w6w-callable-list-description", children: a })
|
|
2672
2672
|
] }),
|
|
@@ -2675,9 +2675,9 @@ function Rs({
|
|
|
2675
2675
|
"input",
|
|
2676
2676
|
{
|
|
2677
2677
|
type: "checkbox",
|
|
2678
|
-
checked:
|
|
2678
|
+
checked: T,
|
|
2679
2679
|
"data-testid": l == null ? void 0 : l.showArchived,
|
|
2680
|
-
onChange: (S) =>
|
|
2680
|
+
onChange: (S) => P(S.target.checked)
|
|
2681
2681
|
}
|
|
2682
2682
|
),
|
|
2683
2683
|
"Show archived"
|
|
@@ -2685,13 +2685,13 @@ function Rs({
|
|
|
2685
2685
|
] }),
|
|
2686
2686
|
/* @__PURE__ */ i("div", { className: "w6w-callable-list-actions", children: [
|
|
2687
2687
|
g == null ? void 0 : g.actions,
|
|
2688
|
-
|
|
2688
|
+
m && /* @__PURE__ */ t(
|
|
2689
2689
|
"button",
|
|
2690
2690
|
{
|
|
2691
2691
|
type: "button",
|
|
2692
2692
|
className: "w6w-btn w6w-btn-ghost",
|
|
2693
2693
|
"data-testid": l == null ? void 0 : l.importOpen,
|
|
2694
|
-
onClick:
|
|
2694
|
+
onClick: m,
|
|
2695
2695
|
children: "Import"
|
|
2696
2696
|
}
|
|
2697
2697
|
),
|
|
@@ -2701,8 +2701,8 @@ function Rs({
|
|
|
2701
2701
|
d && /* @__PURE__ */ t("div", { className: "w6w-error", children: d }),
|
|
2702
2702
|
/* @__PURE__ */ i("div", { className: "w6w-callable-list-body", children: [
|
|
2703
2703
|
c && /* @__PURE__ */ t("p", { className: "w6w-muted", children: "Loading…" }),
|
|
2704
|
-
|
|
2705
|
-
|
|
2704
|
+
C.length === 0 && !c ? O ? /* @__PURE__ */ t(
|
|
2705
|
+
_e,
|
|
2706
2706
|
{
|
|
2707
2707
|
testId: "w6w-callable-list-empty",
|
|
2708
2708
|
action: /* @__PURE__ */ t(
|
|
@@ -2710,27 +2710,27 @@ function Rs({
|
|
|
2710
2710
|
{
|
|
2711
2711
|
type: "button",
|
|
2712
2712
|
className: "w6w-btn w6w-btn-ghost",
|
|
2713
|
-
onClick: () =>
|
|
2713
|
+
onClick: () => P(!0),
|
|
2714
2714
|
children: "Show archived"
|
|
2715
2715
|
}
|
|
2716
2716
|
),
|
|
2717
2717
|
children: e.length === 1 ? "The only item is archived." : `All ${e.length} items are archived.`
|
|
2718
2718
|
}
|
|
2719
|
-
) : /* @__PURE__ */ t(
|
|
2720
|
-
|
|
2719
|
+
) : /* @__PURE__ */ t(_e, { testId: "w6w-callable-list-empty", children: (g == null ? void 0 : g.empty) ?? s }) : /* @__PURE__ */ t(
|
|
2720
|
+
he,
|
|
2721
2721
|
{
|
|
2722
|
-
columns:
|
|
2723
|
-
rows:
|
|
2722
|
+
columns: K,
|
|
2723
|
+
rows: C,
|
|
2724
2724
|
rowKey: (S) => S.id,
|
|
2725
2725
|
loading: c,
|
|
2726
2726
|
getRowHref: w ? (S) => w(S.id) : void 0,
|
|
2727
|
-
onRowClick:
|
|
2727
|
+
onRowClick: v ? (S, I) => v(S.id, I) : void 0
|
|
2728
2728
|
}
|
|
2729
2729
|
)
|
|
2730
2730
|
] })
|
|
2731
2731
|
] });
|
|
2732
2732
|
}
|
|
2733
|
-
function
|
|
2733
|
+
function Rs({
|
|
2734
2734
|
connections: e,
|
|
2735
2735
|
appsById: n,
|
|
2736
2736
|
loading: a,
|
|
@@ -2742,32 +2742,32 @@ function Es({
|
|
|
2742
2742
|
busy: d,
|
|
2743
2743
|
slots: u
|
|
2744
2744
|
}) {
|
|
2745
|
-
const f = n ?? /* @__PURE__ */ new Map(),
|
|
2745
|
+
const f = n ?? /* @__PURE__ */ new Map(), m = l !== void 0 || c !== void 0, v = [
|
|
2746
2746
|
{
|
|
2747
2747
|
key: "name",
|
|
2748
2748
|
header: "Name",
|
|
2749
2749
|
render: (w) => {
|
|
2750
|
-
const
|
|
2750
|
+
const h = In(w, f), y = w.displayName || w.id;
|
|
2751
2751
|
return /* @__PURE__ */ i("span", { className: "w6w-connection-cell-name", children: [
|
|
2752
2752
|
/* @__PURE__ */ t(
|
|
2753
|
-
|
|
2753
|
+
Oe,
|
|
2754
2754
|
{
|
|
2755
|
-
src:
|
|
2756
|
-
srcDark:
|
|
2757
|
-
brandColor:
|
|
2758
|
-
name: (
|
|
2755
|
+
src: h == null ? void 0 : h.iconSvg,
|
|
2756
|
+
srcDark: h == null ? void 0 : h.iconSvgDark,
|
|
2757
|
+
brandColor: h == null ? void 0 : h.brandColor,
|
|
2758
|
+
name: (h == null ? void 0 : h.displayName) ?? w.appId
|
|
2759
2759
|
}
|
|
2760
2760
|
),
|
|
2761
2761
|
/* @__PURE__ */ t("strong", { className: "w6w-connection-name", title: y, children: y }),
|
|
2762
2762
|
" ",
|
|
2763
|
-
/* @__PURE__ */ t("span", { className: "w6w-muted", children: (
|
|
2763
|
+
/* @__PURE__ */ t("span", { className: "w6w-muted", children: (h == null ? void 0 : h.displayName) ?? w.appId })
|
|
2764
2764
|
] });
|
|
2765
2765
|
}
|
|
2766
2766
|
},
|
|
2767
2767
|
{
|
|
2768
2768
|
key: "status",
|
|
2769
2769
|
header: "Status",
|
|
2770
|
-
render: (w) => /* @__PURE__ */ i(
|
|
2770
|
+
render: (w) => /* @__PURE__ */ i(R, { children: [
|
|
2771
2771
|
"auth ",
|
|
2772
2772
|
/* @__PURE__ */ t("code", { children: w.authKey }),
|
|
2773
2773
|
" ·",
|
|
@@ -2790,7 +2790,7 @@ function Es({
|
|
|
2790
2790
|
] })
|
|
2791
2791
|
}
|
|
2792
2792
|
];
|
|
2793
|
-
return
|
|
2793
|
+
return m && v.push({
|
|
2794
2794
|
key: "actions",
|
|
2795
2795
|
header: "",
|
|
2796
2796
|
align: "right",
|
|
@@ -2798,7 +2798,7 @@ function Es({
|
|
|
2798
2798
|
render: (w) => w.builtIn === !0 ? null : (
|
|
2799
2799
|
// Clicks here must not reach the row's onOpen.
|
|
2800
2800
|
// biome-ignore lint/a11y/useKeyWithClickEvents: propagation guard only; the buttons inside are the controls.
|
|
2801
|
-
/* @__PURE__ */ i("div", { className: "w6w-connection-row-actions", onClick: (
|
|
2801
|
+
/* @__PURE__ */ i("div", { className: "w6w-connection-row-actions", onClick: (h) => h.stopPropagation(), children: [
|
|
2802
2802
|
l && /* @__PURE__ */ t(
|
|
2803
2803
|
qt,
|
|
2804
2804
|
{
|
|
@@ -2808,7 +2808,7 @@ function Es({
|
|
|
2808
2808
|
}
|
|
2809
2809
|
),
|
|
2810
2810
|
c && /* @__PURE__ */ t(
|
|
2811
|
-
|
|
2811
|
+
ue,
|
|
2812
2812
|
{
|
|
2813
2813
|
label: "Delete",
|
|
2814
2814
|
onClick: () => c(w),
|
|
@@ -2825,108 +2825,109 @@ function Es({
|
|
|
2825
2825
|
] }),
|
|
2826
2826
|
s && /* @__PURE__ */ t("div", { className: "w6w-error", children: s }),
|
|
2827
2827
|
a && /* @__PURE__ */ t("p", { className: "w6w-muted", children: "Loading…" }),
|
|
2828
|
-
e.length === 0 && !a ? /* @__PURE__ */ t(
|
|
2829
|
-
|
|
2828
|
+
e.length === 0 && !a ? /* @__PURE__ */ t(_e, { testId: "w6w-connection-list-empty", children: (u == null ? void 0 : u.empty) ?? "No connections yet." }) : /* @__PURE__ */ t(
|
|
2829
|
+
he,
|
|
2830
2830
|
{
|
|
2831
|
-
columns:
|
|
2831
|
+
columns: v,
|
|
2832
2832
|
rows: e,
|
|
2833
2833
|
rowKey: (w) => w.id,
|
|
2834
2834
|
loading: a,
|
|
2835
2835
|
getRowHref: o ? (w) => w.builtIn === !0 ? void 0 : o(w.id) : void 0,
|
|
2836
|
-
onRowClick: r ? (w,
|
|
2836
|
+
onRowClick: r ? (w, h) => w.builtIn === !0 ? void 0 : r(w.id, h) : void 0
|
|
2837
2837
|
}
|
|
2838
2838
|
)
|
|
2839
2839
|
] });
|
|
2840
2840
|
}
|
|
2841
2841
|
function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
2842
|
-
const s =
|
|
2843
|
-
|
|
2842
|
+
const s = Kt(), r = s.updateConnection, o = e.builtIn === !0, l = !o && typeof r == "function", [c, d] = k(e.displayName ?? ""), [u, f] = k(e.authKey), [m, v] = k({}), [w, h] = k(null), [y, g] = k(null), [$, x] = k(!1), [N, T] = k({}), [C, E] = k(null), [P, K] = k(null), [O, S] = k(null);
|
|
2843
|
+
G(() => {
|
|
2844
2844
|
if (!l) return;
|
|
2845
|
-
let
|
|
2846
|
-
return
|
|
2847
|
-
|
|
2845
|
+
let b = !1;
|
|
2846
|
+
return h(null), s.getAppAuth(e.appId).then((L) => !b && h(L)).catch((L) => !b && g(L.message)), () => {
|
|
2847
|
+
b = !0;
|
|
2848
2848
|
};
|
|
2849
2849
|
}, [s, l, e.appId]);
|
|
2850
|
-
const
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2850
|
+
const I = w == null ? void 0 : w.find((b) => b.key === u), V = u !== e.authKey, q = (w == null ? void 0 : w.filter(
|
|
2851
|
+
(b) => b.key === e.authKey || b.available !== !1 && !b.autoSatisfied && ["apiKey", "bearer", "basic", "custom"].includes(b.type)
|
|
2852
|
+
)) ?? [], Q = (I == null ? void 0 : I.type) === "oauth2", J = Q ? [] : (I == null ? void 0 : I.fields) ?? [], W = e.credentialId, j = !V && !!W && typeof s.rotateCredential == "function" && (P !== null ? !P.startsWith("legacy:") : (I == null ? void 0 : I.type) === "serviceAccount") && !Q, Z = j && (I != null && I.serviceAccount) ? Pn(I.serviceAccount) : [];
|
|
2853
|
+
G(() => {
|
|
2854
|
+
if (!l || V || Q || !W || typeof s.getCredential != "function")
|
|
2855
|
+
return;
|
|
2856
|
+
let b = !1;
|
|
2857
|
+
return s.getCredential(W).then((L) => {
|
|
2858
|
+
b || (E(L.connectionCount), K(L.contract));
|
|
2859
|
+
}).catch(() => {
|
|
2855
2860
|
}), () => {
|
|
2856
|
-
|
|
2861
|
+
b = !0;
|
|
2857
2862
|
};
|
|
2858
|
-
}, [s, l,
|
|
2859
|
-
function
|
|
2860
|
-
if (
|
|
2861
|
-
const
|
|
2862
|
-
c !== (e.displayName ?? "") && (
|
|
2863
|
-
const
|
|
2864
|
-
return
|
|
2863
|
+
}, [s, l, V, Q, W]);
|
|
2864
|
+
function Ie() {
|
|
2865
|
+
if (j) {
|
|
2866
|
+
const _ = {};
|
|
2867
|
+
c !== (e.displayName ?? "") && (_.displayName = c);
|
|
2868
|
+
const D = Dn(Z, N);
|
|
2869
|
+
return D && (_.binding = D), _.displayName === void 0 && _.binding === void 0 ? null : _;
|
|
2865
2870
|
}
|
|
2866
|
-
const
|
|
2867
|
-
for (const
|
|
2868
|
-
const
|
|
2869
|
-
|
|
2871
|
+
const b = {};
|
|
2872
|
+
for (const _ of J) {
|
|
2873
|
+
const D = m[_.key];
|
|
2874
|
+
D !== void 0 && D !== "" && (b[_.key] = D);
|
|
2870
2875
|
}
|
|
2871
|
-
const
|
|
2872
|
-
return c !== (e.displayName ?? "") && (
|
|
2876
|
+
const L = {};
|
|
2877
|
+
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;
|
|
2873
2878
|
}
|
|
2874
|
-
async function
|
|
2875
|
-
if (!l || !r ||
|
|
2876
|
-
|
|
2877
|
-
const
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
);
|
|
2879
|
+
async function ae() {
|
|
2880
|
+
if (!l || !r || $) return;
|
|
2881
|
+
g(null);
|
|
2882
|
+
const b = Ie(), L = Object.fromEntries(
|
|
2883
|
+
J.filter((M) => m[M.key] !== void 0 && m[M.key] !== "").map((M) => [M.key, m[M.key]])
|
|
2884
|
+
), _ = Object.keys(L).length > 0;
|
|
2885
|
+
if (!b && !_) {
|
|
2886
|
+
g("Nothing to update — change the name or a credential or binding field.");
|
|
2882
2887
|
return;
|
|
2883
2888
|
}
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
} finally {
|
|
2891
|
-
g(!1);
|
|
2889
|
+
if (V || j && _) {
|
|
2890
|
+
const M = J.filter((U) => U.required && !(U.key in L));
|
|
2891
|
+
if (M.length > 0) {
|
|
2892
|
+
g(`Enter the full new credential: ${M.map((U) => U.label).join(", ")}.`);
|
|
2893
|
+
return;
|
|
2894
|
+
}
|
|
2892
2895
|
}
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
);
|
|
2897
|
-
async function we() {
|
|
2898
|
-
if (!j || !s.rotateCredential || y) return;
|
|
2899
|
-
m(null);
|
|
2900
|
-
const C = Ln(B, u);
|
|
2901
|
-
if ("error" in C) {
|
|
2902
|
-
m(C.error);
|
|
2896
|
+
const D = Mn(J, L);
|
|
2897
|
+
if ("error" in D) {
|
|
2898
|
+
g(D.error);
|
|
2903
2899
|
return;
|
|
2904
2900
|
}
|
|
2905
|
-
|
|
2901
|
+
x(!0);
|
|
2902
|
+
let se = !1;
|
|
2906
2903
|
try {
|
|
2907
|
-
await s.rotateCredential(
|
|
2908
|
-
|
|
2909
|
-
|
|
2904
|
+
j && _ && W && s.rotateCredential ? (await s.rotateCredential(W, { source: D.values }), se = !0, v({}), S(null)) : b != null && b.credential && (b.credential = D.values);
|
|
2905
|
+
const M = b ? await r.call(s, e.id, b) : e;
|
|
2906
|
+
v({}), a(M);
|
|
2907
|
+
} catch (M) {
|
|
2908
|
+
g(
|
|
2909
|
+
se ? `The credential was saved, but the other changes failed. Click Save to retry them. ${M.message}` : M.message
|
|
2910
|
+
);
|
|
2910
2911
|
} finally {
|
|
2911
|
-
|
|
2912
|
+
x(!1);
|
|
2912
2913
|
}
|
|
2913
2914
|
}
|
|
2914
|
-
async function
|
|
2915
|
-
if (!(!
|
|
2916
|
-
|
|
2915
|
+
async function Pe() {
|
|
2916
|
+
if (!(!W || !s.testCredential)) {
|
|
2917
|
+
g(null);
|
|
2917
2918
|
try {
|
|
2918
|
-
S(await s.testCredential(
|
|
2919
|
-
} catch (
|
|
2920
|
-
|
|
2919
|
+
S(await s.testCredential(W));
|
|
2920
|
+
} catch (b) {
|
|
2921
|
+
g(b.message);
|
|
2921
2922
|
}
|
|
2922
2923
|
}
|
|
2923
2924
|
}
|
|
2924
|
-
const
|
|
2925
|
-
return /* @__PURE__ */ t(
|
|
2925
|
+
const ee = Ln(ae, { enabled: l && !$ });
|
|
2926
|
+
return /* @__PURE__ */ t($e, { title: "Edit connection", onClose: n, children: /* @__PURE__ */ i("div", { className: "w6w-stepconfig", children: [
|
|
2926
2927
|
/* @__PURE__ */ t("div", { className: "w6w-modal-body", children: /* @__PURE__ */ i("div", { className: "w6w-stack", children: [
|
|
2927
2928
|
o && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "This connection is built in — it has no stored credential to edit." }),
|
|
2928
2929
|
!o && !l && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Editing connections is not available here." }),
|
|
2929
|
-
l && /* @__PURE__ */ i(
|
|
2930
|
+
l && /* @__PURE__ */ i(R, { children: [
|
|
2930
2931
|
/* @__PURE__ */ i("label", { className: "w6w-field", children: [
|
|
2931
2932
|
/* @__PURE__ */ t("span", { children: "Display name" }),
|
|
2932
2933
|
/* @__PURE__ */ t(
|
|
@@ -2934,7 +2935,7 @@ function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
|
2934
2935
|
{
|
|
2935
2936
|
type: "text",
|
|
2936
2937
|
value: c,
|
|
2937
|
-
onChange: (
|
|
2938
|
+
onChange: (b) => d(b.target.value),
|
|
2938
2939
|
placeholder: "Connection name",
|
|
2939
2940
|
maxLength: 80,
|
|
2940
2941
|
name: "w6w-connection-label",
|
|
@@ -2943,33 +2944,52 @@ function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
|
2943
2944
|
"data-lpignore": "true",
|
|
2944
2945
|
"data-bwignore": "true",
|
|
2945
2946
|
"data-form-type": "other",
|
|
2946
|
-
...
|
|
2947
|
+
...ee
|
|
2948
|
+
}
|
|
2949
|
+
)
|
|
2950
|
+
] }),
|
|
2951
|
+
q.some((b) => b.key !== e.authKey) && /* @__PURE__ */ i("label", { className: "w6w-field", children: [
|
|
2952
|
+
/* @__PURE__ */ t("span", { children: "Authentication method" }),
|
|
2953
|
+
/* @__PURE__ */ i(
|
|
2954
|
+
"select",
|
|
2955
|
+
{
|
|
2956
|
+
name: "w6w-connection-auth",
|
|
2957
|
+
value: u,
|
|
2958
|
+
disabled: $,
|
|
2959
|
+
onChange: (b) => {
|
|
2960
|
+
f(b.target.value), v({}), T({}), S(null), g(null);
|
|
2961
|
+
},
|
|
2962
|
+
children: [
|
|
2963
|
+
!q.some((b) => b.key === e.authKey) && /* @__PURE__ */ t("option", { value: e.authKey, children: e.authKey }),
|
|
2964
|
+
q.map((b) => /* @__PURE__ */ t("option", { value: b.key, children: b.displayName ?? b.key }, b.key))
|
|
2965
|
+
]
|
|
2947
2966
|
}
|
|
2948
2967
|
)
|
|
2949
2968
|
] }),
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2969
|
+
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
|
+
w === null && !y && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Loading auth fields…" }),
|
|
2971
|
+
Q && /* @__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 && Z.length > 0 && /* @__PURE__ */ i(R, { children: [
|
|
2953
2973
|
/* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Leave a binding field blank to keep it unchanged." }),
|
|
2954
2974
|
/* @__PURE__ */ t(
|
|
2955
|
-
|
|
2975
|
+
Be,
|
|
2956
2976
|
{
|
|
2957
2977
|
mode: "edit",
|
|
2958
|
-
fields:
|
|
2959
|
-
values:
|
|
2960
|
-
onChange:
|
|
2961
|
-
enterSubmitProps:
|
|
2978
|
+
fields: Z,
|
|
2979
|
+
values: N,
|
|
2980
|
+
onChange: T,
|
|
2981
|
+
enterSubmitProps: ee
|
|
2962
2982
|
}
|
|
2963
2983
|
)
|
|
2964
2984
|
] }),
|
|
2965
|
-
|
|
2985
|
+
j && /* @__PURE__ */ i("div", { className: "w6w-stack", "data-w6w": "credential-section", children: [
|
|
2966
2986
|
typeof s.testCredential == "function" && /* @__PURE__ */ i("div", { children: [
|
|
2967
2987
|
/* @__PURE__ */ t(
|
|
2968
2988
|
"button",
|
|
2969
2989
|
{
|
|
2970
2990
|
type: "button",
|
|
2971
2991
|
className: "w6w-btn w6w-btn-ghost",
|
|
2972
|
-
onClick:
|
|
2992
|
+
onClick: Pe,
|
|
2973
2993
|
children: "Test credential"
|
|
2974
2994
|
}
|
|
2975
2995
|
),
|
|
@@ -2983,80 +3003,49 @@ function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
|
2983
3003
|
" ",
|
|
2984
3004
|
e.lastTestOk === !0 ? "passed" : e.lastTestOk === !1 ? "failed" : "never tested"
|
|
2985
3005
|
] }),
|
|
2986
|
-
|
|
2987
|
-
v ? /* @__PURE__ */ i(E, { children: [
|
|
3006
|
+
J.length > 0 && /* @__PURE__ */ i(R, { children: [
|
|
2988
3007
|
/* @__PURE__ */ i("p", { className: "w6w-muted w6w-small", children: [
|
|
2989
|
-
"
|
|
2990
|
-
|
|
3008
|
+
"Leave the credential blank to keep it unchanged. To replace it, enter the full new credential and click Save.",
|
|
3009
|
+
C !== null && C > 1 && ` This credential is used by ${C} connections; saving a new credential updates all of them.`
|
|
2991
3010
|
] }),
|
|
2992
3011
|
/* @__PURE__ */ t(
|
|
2993
|
-
|
|
3012
|
+
Be,
|
|
2994
3013
|
{
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
3014
|
+
mode: "edit",
|
|
3015
|
+
fields: J,
|
|
3016
|
+
values: m,
|
|
3017
|
+
onChange: v,
|
|
3018
|
+
enterSubmitProps: ee
|
|
2998
3019
|
}
|
|
2999
|
-
)
|
|
3000
|
-
|
|
3001
|
-
/* @__PURE__ */ t(
|
|
3002
|
-
"button",
|
|
3003
|
-
{
|
|
3004
|
-
type: "button",
|
|
3005
|
-
className: "w6w-btn",
|
|
3006
|
-
disabled: y || Oe,
|
|
3007
|
-
onClick: we,
|
|
3008
|
-
children: "Rotate"
|
|
3009
|
-
}
|
|
3010
|
-
),
|
|
3011
|
-
" ",
|
|
3012
|
-
/* @__PURE__ */ t(
|
|
3013
|
-
"button",
|
|
3014
|
-
{
|
|
3015
|
-
type: "button",
|
|
3016
|
-
className: "w6w-btn w6w-btn-ghost",
|
|
3017
|
-
onClick: () => {
|
|
3018
|
-
$(!1), f({});
|
|
3019
|
-
},
|
|
3020
|
-
children: "Cancel rotation"
|
|
3021
|
-
}
|
|
3022
|
-
)
|
|
3023
|
-
] })
|
|
3024
|
-
] }) : /* @__PURE__ */ t(
|
|
3025
|
-
"button",
|
|
3026
|
-
{
|
|
3027
|
-
type: "button",
|
|
3028
|
-
className: "w6w-btn w6w-btn-ghost",
|
|
3029
|
-
onClick: () => $(!0),
|
|
3030
|
-
children: "Rotate credential"
|
|
3031
|
-
}
|
|
3032
|
-
)
|
|
3020
|
+
)
|
|
3021
|
+
] })
|
|
3033
3022
|
] }),
|
|
3034
|
-
!
|
|
3035
|
-
/* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Leave a field blank to keep it unchanged. Filled fields replace the stored credential." }),
|
|
3023
|
+
!j && J.length > 0 && /* @__PURE__ */ i(R, { children: [
|
|
3024
|
+
!V && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Leave a field blank to keep it unchanged. Filled fields replace the stored credential." }),
|
|
3036
3025
|
/* @__PURE__ */ t(
|
|
3037
|
-
|
|
3026
|
+
Be,
|
|
3038
3027
|
{
|
|
3039
3028
|
mode: "edit",
|
|
3040
|
-
fields:
|
|
3041
|
-
values:
|
|
3042
|
-
onChange:
|
|
3043
|
-
enterSubmitProps:
|
|
3029
|
+
fields: J,
|
|
3030
|
+
values: m,
|
|
3031
|
+
onChange: v,
|
|
3032
|
+
enterSubmitProps: ee
|
|
3044
3033
|
}
|
|
3045
3034
|
)
|
|
3046
3035
|
] })
|
|
3047
3036
|
] }),
|
|
3048
|
-
|
|
3037
|
+
y && /* @__PURE__ */ t("div", { className: "w6w-result w6w-error", children: y })
|
|
3049
3038
|
] }) }),
|
|
3050
3039
|
/* @__PURE__ */ i("div", { className: "w6w-modal-actions", children: [
|
|
3051
3040
|
/* @__PURE__ */ t("button", { type: "button", className: "w6w-btn w6w-btn-ghost", onClick: n, children: "Cancel" }),
|
|
3052
|
-
l && /* @__PURE__ */ t("button", { type: "button", className: "w6w-btn", disabled:
|
|
3041
|
+
l && /* @__PURE__ */ t("button", { type: "button", className: "w6w-btn", disabled: $, onClick: ae, children: $ ? "Saving…" : "Save" })
|
|
3053
3042
|
] })
|
|
3054
3043
|
] }) });
|
|
3055
3044
|
}
|
|
3056
3045
|
function Os({ conn: e, app: n, children: a }) {
|
|
3057
3046
|
return /* @__PURE__ */ i("div", { className: "w6w-connection-header", "data-testid": "connection-header", children: [
|
|
3058
3047
|
/* @__PURE__ */ t(
|
|
3059
|
-
|
|
3048
|
+
Oe,
|
|
3060
3049
|
{
|
|
3061
3050
|
src: n == null ? void 0 : n.iconSvg,
|
|
3062
3051
|
srcDark: n == null ? void 0 : n.iconSvgDark,
|
|
@@ -3096,7 +3085,7 @@ function Os({ conn: e, app: n, children: a }) {
|
|
|
3096
3085
|
a && /* @__PURE__ */ t("div", { className: "w6w-connection-header-actions", children: a })
|
|
3097
3086
|
] });
|
|
3098
3087
|
}
|
|
3099
|
-
const
|
|
3088
|
+
const ja = (e) => String(e);
|
|
3100
3089
|
function Ut(e) {
|
|
3101
3090
|
const n = Math.min(100, Math.max(0, e));
|
|
3102
3091
|
return Number(n.toFixed(4));
|
|
@@ -3110,8 +3099,8 @@ function Is({
|
|
|
3110
3099
|
className: o,
|
|
3111
3100
|
testId: l
|
|
3112
3101
|
}) {
|
|
3113
|
-
const c = r ??
|
|
3114
|
-
return
|
|
3102
|
+
const c = r ?? ja, d = Number.isFinite(s) && s > 0, u = a > 0 ? Ut(n / a * 100) : 100, f = d && a > 0 ? Ut(Math.min(100 - u, s / a * 100)) : 0, m = n >= a, v = `${c(n)} / ${c(a)}`, w = ["w6w-budget-meter"];
|
|
3103
|
+
return m && w.push("w6w-budget-meter-over"), o && w.push(o), /* @__PURE__ */ i(
|
|
3115
3104
|
"div",
|
|
3116
3105
|
{
|
|
3117
3106
|
role: "meter",
|
|
@@ -3120,12 +3109,12 @@ function Is({
|
|
|
3120
3109
|
"aria-valuemin": 0,
|
|
3121
3110
|
"aria-valuenow": n,
|
|
3122
3111
|
"aria-valuemax": a,
|
|
3123
|
-
"aria-valuetext":
|
|
3112
|
+
"aria-valuetext": v,
|
|
3124
3113
|
"data-testid": l,
|
|
3125
3114
|
children: [
|
|
3126
3115
|
/* @__PURE__ */ i("div", { className: "w6w-budget-meter-head", children: [
|
|
3127
3116
|
/* @__PURE__ */ t("span", { className: "w6w-budget-meter-label", children: e }),
|
|
3128
|
-
/* @__PURE__ */ t("span", { className: "w6w-budget-meter-value", children:
|
|
3117
|
+
/* @__PURE__ */ t("span", { className: "w6w-budget-meter-value", children: v })
|
|
3129
3118
|
] }),
|
|
3130
3119
|
/* @__PURE__ */ i("div", { className: "w6w-budget-meter-track", children: [
|
|
3131
3120
|
/* @__PURE__ */ t("div", { className: "w6w-budget-meter-used", style: { width: `${u}%` } }),
|
|
@@ -3135,17 +3124,17 @@ function Is({
|
|
|
3135
3124
|
}
|
|
3136
3125
|
);
|
|
3137
3126
|
}
|
|
3138
|
-
const
|
|
3127
|
+
const Ja = {
|
|
3139
3128
|
kv: "Key-value",
|
|
3140
3129
|
doc: "Document",
|
|
3141
3130
|
table: "Table"
|
|
3142
3131
|
}, Ps = ["kv", "doc", "table"], Qt = ["string", "number", "integer", "boolean", "date", "datetime"], Wa = 5242880;
|
|
3143
|
-
function
|
|
3132
|
+
function Ls(e) {
|
|
3144
3133
|
var a;
|
|
3145
3134
|
const n = (a = e.schema) == null ? void 0 : a.valueType;
|
|
3146
3135
|
return typeof n == "string" && Qt.includes(n) ? n : "string";
|
|
3147
3136
|
}
|
|
3148
|
-
function
|
|
3137
|
+
function Ms(e) {
|
|
3149
3138
|
var s, r;
|
|
3150
3139
|
if (e.kind !== "table") return null;
|
|
3151
3140
|
const n = (s = e.schema) == null ? void 0 : s.columns;
|
|
@@ -3168,47 +3157,47 @@ const Va = {
|
|
|
3168
3157
|
function Ga(e, n) {
|
|
3169
3158
|
return n === 2 ? e % 4 === 0 && e % 100 !== 0 || e % 400 === 0 ? 29 : 28 : [31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][n - 1];
|
|
3170
3159
|
}
|
|
3171
|
-
function
|
|
3160
|
+
function lt(e) {
|
|
3172
3161
|
if (!za.test(e)) return null;
|
|
3173
3162
|
const n = Number(e.slice(0, 4)), a = Number(e.slice(5, 7)), s = Number(e.slice(8, 10));
|
|
3174
3163
|
return a < 1 || a > 12 || s < 1 || s > Ga(n, a) ? null : { year: n, month: a, day: s };
|
|
3175
3164
|
}
|
|
3176
|
-
function
|
|
3165
|
+
function Y(e) {
|
|
3177
3166
|
return { ok: !1, problem: e, message: Va[e] };
|
|
3178
3167
|
}
|
|
3179
|
-
function
|
|
3168
|
+
function it(e, n, a) {
|
|
3180
3169
|
const s = n.trim();
|
|
3181
3170
|
if (s === "")
|
|
3182
|
-
return a ?
|
|
3171
|
+
return a ? Y("required") : { ok: !0, value: void 0 };
|
|
3183
3172
|
switch (e) {
|
|
3184
3173
|
case "string":
|
|
3185
3174
|
return { ok: !0, value: n };
|
|
3186
3175
|
case "number": {
|
|
3187
|
-
if (!qa.test(s)) return
|
|
3176
|
+
if (!qa.test(s)) return Y("not_a_number");
|
|
3188
3177
|
const r = Number(s);
|
|
3189
|
-
return Number.isFinite(r) ? { ok: !0, value: r } :
|
|
3178
|
+
return Number.isFinite(r) ? { ok: !0, value: r } : Y("not_a_number");
|
|
3190
3179
|
}
|
|
3191
3180
|
case "integer": {
|
|
3192
|
-
if (!Ha.test(s)) return
|
|
3181
|
+
if (!Ha.test(s)) return Y("not_an_integer");
|
|
3193
3182
|
const r = Number(s);
|
|
3194
|
-
return Number.isSafeInteger(r) ? { ok: !0, value: r } :
|
|
3183
|
+
return Number.isSafeInteger(r) ? { ok: !0, value: r } : Y("not_an_integer");
|
|
3195
3184
|
}
|
|
3196
3185
|
case "boolean":
|
|
3197
|
-
return s === "true" ? { ok: !0, value: !0 } : s === "false" ? { ok: !0, value: !1 } :
|
|
3186
|
+
return s === "true" ? { ok: !0, value: !0 } : s === "false" ? { ok: !0, value: !1 } : Y("not_a_boolean");
|
|
3198
3187
|
case "date":
|
|
3199
|
-
return
|
|
3188
|
+
return lt(s) === null ? Y("not_a_date") : { ok: !0, value: s };
|
|
3200
3189
|
case "datetime":
|
|
3201
|
-
return Zt(s) ? { ok: !0, value: s } :
|
|
3190
|
+
return Zt(s) ? { ok: !0, value: s } : Y("not_a_datetime");
|
|
3202
3191
|
}
|
|
3203
3192
|
}
|
|
3204
3193
|
function Zt(e) {
|
|
3205
|
-
if (!Ya.test(e) ||
|
|
3194
|
+
if (!Ya.test(e) || lt(e.slice(0, 10)) === null) return !1;
|
|
3206
3195
|
const n = Number(e.slice(11, 13)), a = Number(e.slice(14, 16)), s = Number(e.slice(17, 19));
|
|
3207
3196
|
if (n > 23 || a > 59 || s > 59) return !1;
|
|
3208
3197
|
const o = e.slice(19).match(/(Z|([+-])(\d{2}):(\d{2}))$/);
|
|
3209
3198
|
return o === null || o[1] === "Z" ? !0 : Number(o[3]) <= 23 && Number(o[4]) <= 59;
|
|
3210
3199
|
}
|
|
3211
|
-
function
|
|
3200
|
+
function rt(e, n) {
|
|
3212
3201
|
if (n == null) return "";
|
|
3213
3202
|
if ((e === "string" || e === "date" || e === "datetime") && typeof n == "string")
|
|
3214
3203
|
return n;
|
|
@@ -3229,37 +3218,37 @@ function Us(e, n) {
|
|
|
3229
3218
|
case "boolean":
|
|
3230
3219
|
return typeof n == "boolean";
|
|
3231
3220
|
case "date":
|
|
3232
|
-
return typeof n == "string" &&
|
|
3221
|
+
return typeof n == "string" && lt(n) !== null;
|
|
3233
3222
|
case "datetime":
|
|
3234
3223
|
return typeof n == "string" && Zt(n);
|
|
3235
3224
|
}
|
|
3236
3225
|
}
|
|
3237
|
-
const
|
|
3238
|
-
function
|
|
3226
|
+
const ce = "The request failed.", Xa = "Could not reach the server.";
|
|
3227
|
+
function te(e) {
|
|
3239
3228
|
return typeof e == "string" && e.length > 0 ? e : void 0;
|
|
3240
3229
|
}
|
|
3241
3230
|
function en(e) {
|
|
3242
3231
|
return Number.isInteger(e) && e >= 0 ? e : void 0;
|
|
3243
3232
|
}
|
|
3244
3233
|
function tn(e, n, a) {
|
|
3245
|
-
const s = { message:
|
|
3234
|
+
const s = { message: ce };
|
|
3246
3235
|
typeof a == "number" && (s.status = a);
|
|
3247
3236
|
const r = e !== null && typeof e == "object" ? e.error : void 0;
|
|
3248
3237
|
if (r !== null && typeof r == "object") {
|
|
3249
|
-
const o = r, l =
|
|
3238
|
+
const o = r, l = te(o.code);
|
|
3250
3239
|
l !== void 0 && (s.code = l);
|
|
3251
|
-
const c =
|
|
3240
|
+
const c = te(o.field);
|
|
3252
3241
|
c !== void 0 && (s.field = c);
|
|
3253
|
-
const d =
|
|
3242
|
+
const d = te(o.column);
|
|
3254
3243
|
d !== void 0 && (s.column = d);
|
|
3255
3244
|
const u = en(o.row);
|
|
3256
3245
|
u !== void 0 && (s.row = u);
|
|
3257
|
-
const f =
|
|
3246
|
+
const f = te(o.message);
|
|
3258
3247
|
f !== void 0 && (s.message = f);
|
|
3259
3248
|
}
|
|
3260
|
-
if (s.message ===
|
|
3249
|
+
if (s.message === ce)
|
|
3261
3250
|
for (const o of n) {
|
|
3262
|
-
const l =
|
|
3251
|
+
const l = te(o);
|
|
3263
3252
|
if (l !== void 0) {
|
|
3264
3253
|
s.message = l;
|
|
3265
3254
|
break;
|
|
@@ -3272,7 +3261,7 @@ function Fs(e) {
|
|
|
3272
3261
|
const n = e !== null && typeof e == "object" ? e : void 0, a = n == null ? void 0 : n.raw, s = n == null ? void 0 : n.message;
|
|
3273
3262
|
return tn(a, [s], n == null ? void 0 : n.status);
|
|
3274
3263
|
} catch {
|
|
3275
|
-
return { message:
|
|
3264
|
+
return { message: ce };
|
|
3276
3265
|
}
|
|
3277
3266
|
}
|
|
3278
3267
|
function Qa(e) {
|
|
@@ -3287,20 +3276,20 @@ function Qa(e) {
|
|
|
3287
3276
|
try {
|
|
3288
3277
|
n = JSON.parse(e.text);
|
|
3289
3278
|
} catch {
|
|
3290
|
-
return { status: e.status, message:
|
|
3279
|
+
return { status: e.status, message: ce };
|
|
3291
3280
|
}
|
|
3292
3281
|
return tn(n, [], e.status);
|
|
3293
3282
|
} catch {
|
|
3294
|
-
return { message:
|
|
3283
|
+
return { message: ce };
|
|
3295
3284
|
}
|
|
3296
3285
|
}
|
|
3297
3286
|
function Za(e) {
|
|
3298
|
-
const n =
|
|
3287
|
+
const n = te(e.column);
|
|
3299
3288
|
if (n !== void 0) {
|
|
3300
3289
|
const s = en(e.row);
|
|
3301
3290
|
return s === void 0 ? { kind: "cell", column: n } : { kind: "cell", column: n, row: s };
|
|
3302
3291
|
}
|
|
3303
|
-
const a =
|
|
3292
|
+
const a = te(e.field);
|
|
3304
3293
|
return a !== void 0 ? { kind: "field", field: a } : { kind: "form" };
|
|
3305
3294
|
}
|
|
3306
3295
|
function Ft(e) {
|
|
@@ -3313,25 +3302,25 @@ function ts(e) {
|
|
|
3313
3302
|
}
|
|
3314
3303
|
function Bs(e, n) {
|
|
3315
3304
|
const a = ts(e), s = {};
|
|
3316
|
-
for (const r of n) s[r.name] =
|
|
3305
|
+
for (const r of n) s[r.name] = rt(r.type, a[r.name]);
|
|
3317
3306
|
return { id: e.key, version: e.version, cells: s };
|
|
3318
3307
|
}
|
|
3319
|
-
function
|
|
3308
|
+
function Ks(e) {
|
|
3320
3309
|
const n = {};
|
|
3321
3310
|
for (const a of e)
|
|
3322
|
-
n[a.name] = a.default === void 0 ? "" :
|
|
3311
|
+
n[a.name] = a.default === void 0 ? "" : rt(a.type, a.default);
|
|
3323
3312
|
return { id: nn, version: null, cells: n };
|
|
3324
3313
|
}
|
|
3325
|
-
function
|
|
3314
|
+
function js(e, n, a) {
|
|
3326
3315
|
const s = [];
|
|
3327
3316
|
for (const r of a)
|
|
3328
3317
|
(e.cells[r.name] ?? "") !== (n.cells[r.name] ?? "") && s.push(r.name);
|
|
3329
3318
|
return s;
|
|
3330
3319
|
}
|
|
3331
|
-
function
|
|
3320
|
+
function Js(e, n) {
|
|
3332
3321
|
const a = {}, s = {};
|
|
3333
3322
|
for (const r of n) {
|
|
3334
|
-
const o =
|
|
3323
|
+
const o = it(r.type, e.cells[r.name] ?? "", r.required);
|
|
3335
3324
|
o.ok ? o.value !== void 0 && (a[r.name] = o.value) : s[r.name] = o.message;
|
|
3336
3325
|
}
|
|
3337
3326
|
return Object.keys(s).length > 0 ? { ok: !1, errors: s } : { ok: !0, value: a };
|
|
@@ -3372,7 +3361,7 @@ function ns(e) {
|
|
|
3372
3361
|
}
|
|
3373
3362
|
function zs(e, n) {
|
|
3374
3363
|
if (e === "string") return { ok: !0, value: n };
|
|
3375
|
-
const a =
|
|
3364
|
+
const a = it(e, n, !0);
|
|
3376
3365
|
return a.ok ? { ok: !0, value: a.value } : { ok: !1, message: a.message };
|
|
3377
3366
|
}
|
|
3378
3367
|
function Ys(e) {
|
|
@@ -3404,9 +3393,9 @@ function Gs({
|
|
|
3404
3393
|
formatSize: d,
|
|
3405
3394
|
slots: u
|
|
3406
3395
|
}) {
|
|
3407
|
-
const f = d ?? Vt,
|
|
3396
|
+
const f = d ?? Vt, m = o !== void 0 || l !== void 0, v = [
|
|
3408
3397
|
{ key: "name", header: "Name", render: (w) => /* @__PURE__ */ t("strong", { children: w.name }) },
|
|
3409
|
-
{ key: "kind", header: "Kind", render: (w) =>
|
|
3398
|
+
{ key: "kind", header: "Kind", render: (w) => Ja[w.kind] },
|
|
3410
3399
|
{ key: "entries", header: "Entries", align: "right", render: (w) => String(w.entryCount) },
|
|
3411
3400
|
{ key: "size", header: "Size", align: "right", render: (w) => f(w.sizeBytes) },
|
|
3412
3401
|
{
|
|
@@ -3415,7 +3404,7 @@ function Gs({
|
|
|
3415
3404
|
render: (w) => new Date(w.updatedAt).toLocaleString()
|
|
3416
3405
|
}
|
|
3417
3406
|
];
|
|
3418
|
-
return
|
|
3407
|
+
return m && v.push({
|
|
3419
3408
|
key: "actions",
|
|
3420
3409
|
header: "",
|
|
3421
3410
|
align: "right",
|
|
@@ -3423,7 +3412,7 @@ function Gs({
|
|
|
3423
3412
|
render: (w) => (
|
|
3424
3413
|
// Clicks here must not reach the row's onOpen.
|
|
3425
3414
|
// biome-ignore lint/a11y/useKeyWithClickEvents: propagation guard only; the buttons inside are the controls.
|
|
3426
|
-
/* @__PURE__ */ i("div", { className: "w6w-data-row-actions", onClick: (
|
|
3415
|
+
/* @__PURE__ */ i("div", { className: "w6w-data-row-actions", onClick: (h) => h.stopPropagation(), children: [
|
|
3427
3416
|
o && /* @__PURE__ */ t(
|
|
3428
3417
|
qt,
|
|
3429
3418
|
{
|
|
@@ -3433,7 +3422,7 @@ function Gs({
|
|
|
3433
3422
|
}
|
|
3434
3423
|
),
|
|
3435
3424
|
l && /* @__PURE__ */ t(
|
|
3436
|
-
|
|
3425
|
+
ue,
|
|
3437
3426
|
{
|
|
3438
3427
|
label: "Archive",
|
|
3439
3428
|
onClick: () => l(w),
|
|
@@ -3450,15 +3439,15 @@ function Gs({
|
|
|
3450
3439
|
] }),
|
|
3451
3440
|
a && /* @__PURE__ */ t("div", { className: "w6w-error", children: a }),
|
|
3452
3441
|
n && /* @__PURE__ */ t("p", { className: "w6w-muted", children: "Loading…" }),
|
|
3453
|
-
e.length === 0 && !n ? /* @__PURE__ */ t(
|
|
3454
|
-
|
|
3442
|
+
e.length === 0 && !n ? /* @__PURE__ */ t(_e, { testId: "w6w-data-store-list-empty", children: (u == null ? void 0 : u.empty) ?? "No data stores yet." }) : /* @__PURE__ */ t(
|
|
3443
|
+
he,
|
|
3455
3444
|
{
|
|
3456
|
-
columns:
|
|
3445
|
+
columns: v,
|
|
3457
3446
|
rows: e,
|
|
3458
3447
|
rowKey: (w) => w.id,
|
|
3459
3448
|
loading: n,
|
|
3460
3449
|
getRowHref: r ? (w) => r(w.id) : void 0,
|
|
3461
|
-
onRowClick: s ? (w,
|
|
3450
|
+
onRowClick: s ? (w, h) => s(w.id, h) : void 0
|
|
3462
3451
|
}
|
|
3463
3452
|
)
|
|
3464
3453
|
] });
|
|
@@ -3467,33 +3456,33 @@ function as(e) {
|
|
|
3467
3456
|
return e.name !== "" && e.required === !0 && (e.type === "string" || e.type === "integer");
|
|
3468
3457
|
}
|
|
3469
3458
|
function ss(e, n) {
|
|
3470
|
-
const { default: a, ...s } = e, r =
|
|
3459
|
+
const { default: a, ...s } = e, r = it(e.type, n, !1);
|
|
3471
3460
|
return r.ok ? r.value === void 0 ? { column: s } : { column: { ...s, default: r.value } } : { column: s, error: r.message };
|
|
3472
3461
|
}
|
|
3473
3462
|
function Xs(e) {
|
|
3474
|
-
const { columns: n, onChange: a, keyColumn: s, onKeyColumnChange: r, columnErrors: o } = e, [l, c] =
|
|
3475
|
-
|
|
3463
|
+
const { columns: n, onChange: a, keyColumn: s, onKeyColumnChange: r, columnErrors: o } = e, [l, c] = k({}), d = n.filter(as), u = d.some((h) => h.name === s) ? s : "";
|
|
3464
|
+
G(() => {
|
|
3476
3465
|
s !== "" && u === "" && r("");
|
|
3477
3466
|
}, [s, u, r]);
|
|
3478
3467
|
function f() {
|
|
3479
3468
|
a([...n, { name: "", type: "string", required: !1 }]);
|
|
3480
3469
|
}
|
|
3481
|
-
function h
|
|
3482
|
-
a(n.map((g,
|
|
3470
|
+
function m(h, y) {
|
|
3471
|
+
a(n.map((g, $) => $ === h ? { ...g, ...y } : g));
|
|
3483
3472
|
}
|
|
3484
|
-
function
|
|
3485
|
-
const
|
|
3486
|
-
c((
|
|
3473
|
+
function v(h, y, g, $) {
|
|
3474
|
+
const x = { ...n[h], ...$, type: y }, { column: N, error: T } = ss(x, g);
|
|
3475
|
+
c((C) => ({ ...C, [h]: T === void 0 ? { text: g } : { text: g, error: T } })), a(n.map((C, E) => E === h ? N : C));
|
|
3487
3476
|
}
|
|
3488
|
-
function w(
|
|
3477
|
+
function w(h) {
|
|
3489
3478
|
c((y) => {
|
|
3490
3479
|
const g = {};
|
|
3491
|
-
for (const [
|
|
3492
|
-
const
|
|
3493
|
-
|
|
3480
|
+
for (const [$, x] of Object.entries(y)) {
|
|
3481
|
+
const N = Number($);
|
|
3482
|
+
N < h ? g[N] = x : N > h && (g[N - 1] = x);
|
|
3494
3483
|
}
|
|
3495
3484
|
return g;
|
|
3496
|
-
}), a(n.filter((y, g) => g !==
|
|
3485
|
+
}), a(n.filter((y, g) => g !== h));
|
|
3497
3486
|
}
|
|
3498
3487
|
return /* @__PURE__ */ i("div", { className: "w6w-data-columns", children: [
|
|
3499
3488
|
/* @__PURE__ */ i("div", { className: "w6w-data-columns-head", children: [
|
|
@@ -3502,8 +3491,8 @@ function Xs(e) {
|
|
|
3502
3491
|
] }),
|
|
3503
3492
|
/* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Each column has a name, a scalar type, whether it must be set, and an optional default." }),
|
|
3504
3493
|
n.length === 0 && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "No columns yet." }),
|
|
3505
|
-
/* @__PURE__ */ t("ul", { className: "w6w-data-columns-list", "data-testid": "data-columns", children: n.map((
|
|
3506
|
-
const g = l[y],
|
|
3494
|
+
/* @__PURE__ */ t("ul", { className: "w6w-data-columns-list", "data-testid": "data-columns", children: n.map((h, y) => {
|
|
3495
|
+
const g = l[y], $ = (g == null ? void 0 : g.text) ?? rt(h.type, h.default);
|
|
3507
3496
|
return (
|
|
3508
3497
|
// biome-ignore lint/suspicious/noArrayIndexKey: rows are positional and reorderable
|
|
3509
3498
|
/* @__PURE__ */ i("li", { className: "w6w-data-columns-row", children: [
|
|
@@ -3511,19 +3500,19 @@ function Xs(e) {
|
|
|
3511
3500
|
"input",
|
|
3512
3501
|
{
|
|
3513
3502
|
type: "text",
|
|
3514
|
-
value:
|
|
3503
|
+
value: h.name,
|
|
3515
3504
|
placeholder: "name",
|
|
3516
3505
|
"aria-label": "Column name",
|
|
3517
|
-
onChange: (
|
|
3506
|
+
onChange: (x) => m(y, { name: x.target.value })
|
|
3518
3507
|
}
|
|
3519
3508
|
),
|
|
3520
3509
|
/* @__PURE__ */ t(
|
|
3521
3510
|
"select",
|
|
3522
3511
|
{
|
|
3523
|
-
value:
|
|
3512
|
+
value: h.type,
|
|
3524
3513
|
"aria-label": "Column type",
|
|
3525
|
-
onChange: (
|
|
3526
|
-
children: Qt.map((
|
|
3514
|
+
onChange: (x) => v(y, x.target.value, $),
|
|
3515
|
+
children: Qt.map((x) => /* @__PURE__ */ t("option", { value: x, children: x }, x))
|
|
3527
3516
|
}
|
|
3528
3517
|
),
|
|
3529
3518
|
/* @__PURE__ */ i("label", { className: "w6w-data-columns-required", children: [
|
|
@@ -3531,9 +3520,9 @@ function Xs(e) {
|
|
|
3531
3520
|
"input",
|
|
3532
3521
|
{
|
|
3533
3522
|
type: "checkbox",
|
|
3534
|
-
checked:
|
|
3523
|
+
checked: h.required,
|
|
3535
3524
|
"aria-label": "Required",
|
|
3536
|
-
onChange: (
|
|
3525
|
+
onChange: (x) => m(y, { required: x.target.checked })
|
|
3537
3526
|
}
|
|
3538
3527
|
),
|
|
3539
3528
|
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: "required" })
|
|
@@ -3542,16 +3531,16 @@ function Xs(e) {
|
|
|
3542
3531
|
"input",
|
|
3543
3532
|
{
|
|
3544
3533
|
type: "text",
|
|
3545
|
-
value:
|
|
3534
|
+
value: $,
|
|
3546
3535
|
placeholder: "default",
|
|
3547
3536
|
"aria-label": "Column default",
|
|
3548
|
-
onChange: (
|
|
3537
|
+
onChange: (x) => v(y, h.type, x.target.value)
|
|
3549
3538
|
}
|
|
3550
3539
|
),
|
|
3551
3540
|
/* @__PURE__ */ t(
|
|
3552
|
-
|
|
3541
|
+
ue,
|
|
3553
3542
|
{
|
|
3554
|
-
label: `Remove column ${
|
|
3543
|
+
label: `Remove column ${h.name || y + 1}`,
|
|
3555
3544
|
onClick: () => w(y)
|
|
3556
3545
|
}
|
|
3557
3546
|
),
|
|
@@ -3563,12 +3552,12 @@ function Xs(e) {
|
|
|
3563
3552
|
children: g.error
|
|
3564
3553
|
}
|
|
3565
3554
|
),
|
|
3566
|
-
|
|
3555
|
+
h.name !== "" && o[h.name] !== void 0 && /* @__PURE__ */ t(
|
|
3567
3556
|
"div",
|
|
3568
3557
|
{
|
|
3569
3558
|
className: "w6w-result w6w-error w6w-data-columns-error",
|
|
3570
|
-
"data-testid": `data-store-column-error-${
|
|
3571
|
-
children: o[
|
|
3559
|
+
"data-testid": `data-store-column-error-${h.name}`,
|
|
3560
|
+
children: o[h.name]
|
|
3572
3561
|
}
|
|
3573
3562
|
)
|
|
3574
3563
|
] }, y)
|
|
@@ -3576,9 +3565,9 @@ function Xs(e) {
|
|
|
3576
3565
|
}) }),
|
|
3577
3566
|
/* @__PURE__ */ i("label", { className: "w6w-field", children: [
|
|
3578
3567
|
/* @__PURE__ */ t("span", { children: "Key column" }),
|
|
3579
|
-
/* @__PURE__ */ i("select", { value: u, onChange: (
|
|
3568
|
+
/* @__PURE__ */ i("select", { value: u, onChange: (h) => r(h.target.value), children: [
|
|
3580
3569
|
/* @__PURE__ */ t("option", { value: "", children: "(none — rows get generated keys)" }),
|
|
3581
|
-
d.map((
|
|
3570
|
+
d.map((h) => /* @__PURE__ */ t("option", { value: h.name, children: h.name }, h.name))
|
|
3582
3571
|
] }),
|
|
3583
3572
|
/* @__PURE__ */ t("span", { className: "w6w-hint", children: "Only a required, string or integer column can name a row's key." })
|
|
3584
3573
|
] })
|
|
@@ -3634,7 +3623,7 @@ function Zs({
|
|
|
3634
3623
|
onNew: c,
|
|
3635
3624
|
onLoadMore: d
|
|
3636
3625
|
}) {
|
|
3637
|
-
const [u, f] =
|
|
3626
|
+
const [u, f] = k(s ?? "");
|
|
3638
3627
|
return /* @__PURE__ */ i("div", { children: [
|
|
3639
3628
|
/* @__PURE__ */ i("form", { className: "w6w-data-entries-toolbar", "data-testid": "entry-search", onSubmit: (w) => {
|
|
3640
3629
|
w.preventDefault(), l(u);
|
|
@@ -3663,7 +3652,7 @@ function Zs({
|
|
|
3663
3652
|
)
|
|
3664
3653
|
] }),
|
|
3665
3654
|
/* @__PURE__ */ t(
|
|
3666
|
-
|
|
3655
|
+
he,
|
|
3667
3656
|
{
|
|
3668
3657
|
className: "w6w-data-entry-list",
|
|
3669
3658
|
onRowClick: (w) => o(w.key),
|
|
@@ -3679,8 +3668,8 @@ function Zs({
|
|
|
3679
3668
|
className: "w6w-data-entry-key",
|
|
3680
3669
|
title: w.key,
|
|
3681
3670
|
"data-testid": "entry-key",
|
|
3682
|
-
onClick: (
|
|
3683
|
-
|
|
3671
|
+
onClick: (h) => {
|
|
3672
|
+
h.stopPropagation(), o(w.key);
|
|
3684
3673
|
},
|
|
3685
3674
|
children: w.key
|
|
3686
3675
|
}
|
|
@@ -3724,17 +3713,17 @@ function el({
|
|
|
3724
3713
|
saving: d,
|
|
3725
3714
|
onTextChange: u,
|
|
3726
3715
|
onKeyChange: f,
|
|
3727
|
-
onDelete:
|
|
3728
|
-
onSave:
|
|
3716
|
+
onDelete: m,
|
|
3717
|
+
onSave: v,
|
|
3729
3718
|
onCancel: w,
|
|
3730
|
-
onReload:
|
|
3719
|
+
onReload: h
|
|
3731
3720
|
}) {
|
|
3732
|
-
const [y, g] =
|
|
3733
|
-
|
|
3721
|
+
const [y, g] = k(n), [$, x] = k(!1), N = jt(null);
|
|
3722
|
+
G(() => {
|
|
3734
3723
|
var O;
|
|
3735
|
-
n || (O =
|
|
3724
|
+
n || (O = N.current) == null || O.focus();
|
|
3736
3725
|
}, [n]);
|
|
3737
|
-
const
|
|
3726
|
+
const T = e === "doc" ? "document" : "entry", C = e === "doc" ? ns(o) : void 0, E = C !== void 0 && !C.ok, P = l || ($ && C && !C.ok ? C.message : null), K = /* @__PURE__ */ i(R, { children: [
|
|
3738
3727
|
n ? /* @__PURE__ */ i("label", { className: "w6w-field", children: [
|
|
3739
3728
|
/* @__PURE__ */ t("span", { children: "Key" }),
|
|
3740
3729
|
/* @__PURE__ */ t(
|
|
@@ -3752,16 +3741,16 @@ function el({
|
|
|
3752
3741
|
r
|
|
3753
3742
|
] }) : null,
|
|
3754
3743
|
e === "doc" ? /* @__PURE__ */ t(
|
|
3755
|
-
|
|
3744
|
+
oe,
|
|
3756
3745
|
{
|
|
3757
3746
|
value: o,
|
|
3758
3747
|
readOnly: !y,
|
|
3759
3748
|
onChange: (O) => {
|
|
3760
|
-
|
|
3749
|
+
x(!1), u(O);
|
|
3761
3750
|
},
|
|
3762
|
-
onFocus: () =>
|
|
3763
|
-
onBlur: () =>
|
|
3764
|
-
showDiagnostics:
|
|
3751
|
+
onFocus: () => x(!1),
|
|
3752
|
+
onBlur: () => x(!0),
|
|
3753
|
+
showDiagnostics: $,
|
|
3765
3754
|
minHeight: "min(50vh, 400px)",
|
|
3766
3755
|
maxHeight: "60vh"
|
|
3767
3756
|
}
|
|
@@ -3775,7 +3764,7 @@ function el({
|
|
|
3775
3764
|
onChange: (O) => u(O.target.value)
|
|
3776
3765
|
}
|
|
3777
3766
|
),
|
|
3778
|
-
|
|
3767
|
+
P && /* @__PURE__ */ t("div", { className: "w6w-field-error", role: "alert", "data-testid": "entry-value-error", children: P }),
|
|
3779
3768
|
c && /* @__PURE__ */ i("div", { className: "w6w-error", "data-testid": "entry-conflict", children: [
|
|
3780
3769
|
an,
|
|
3781
3770
|
" ",
|
|
@@ -3785,36 +3774,36 @@ function el({
|
|
|
3785
3774
|
className: "w6w-btn w6w-btn-ghost",
|
|
3786
3775
|
type: "button",
|
|
3787
3776
|
"data-testid": "entry-reload",
|
|
3788
|
-
onClick:
|
|
3777
|
+
onClick: h,
|
|
3789
3778
|
children: "Reload"
|
|
3790
3779
|
}
|
|
3791
3780
|
)
|
|
3792
3781
|
] })
|
|
3793
3782
|
] });
|
|
3794
3783
|
return /* @__PURE__ */ i(
|
|
3795
|
-
|
|
3784
|
+
$e,
|
|
3796
3785
|
{
|
|
3797
|
-
title: n ? `New ${
|
|
3786
|
+
title: n ? `New ${T}` : y ? `Edit ${T}` : e === "doc" ? "Document" : "Entry",
|
|
3798
3787
|
subtitle: n ? void 0 : a,
|
|
3799
3788
|
size: e === "doc" ? "wide" : "default",
|
|
3800
3789
|
onClose: d ? () => {
|
|
3801
3790
|
} : w,
|
|
3802
3791
|
children: [
|
|
3803
|
-
/* @__PURE__ */ t("div", { className: "w6w-modal-body", "data-testid": "entry-editor", children:
|
|
3792
|
+
/* @__PURE__ */ t("div", { className: "w6w-modal-body", "data-testid": "entry-editor", children: K }),
|
|
3804
3793
|
/* @__PURE__ */ i("div", { className: "w6w-modal-actions", children: [
|
|
3805
|
-
!n &&
|
|
3806
|
-
|
|
3794
|
+
!n && m && /* @__PURE__ */ t(
|
|
3795
|
+
ue,
|
|
3807
3796
|
{
|
|
3808
3797
|
label: "Delete entry",
|
|
3809
3798
|
className: "w6w-data-entry-delete",
|
|
3810
3799
|
disabled: d,
|
|
3811
|
-
onClick:
|
|
3800
|
+
onClick: m
|
|
3812
3801
|
}
|
|
3813
3802
|
),
|
|
3814
3803
|
/* @__PURE__ */ t(
|
|
3815
3804
|
"button",
|
|
3816
3805
|
{
|
|
3817
|
-
ref:
|
|
3806
|
+
ref: N,
|
|
3818
3807
|
className: "w6w-btn w6w-btn-ghost",
|
|
3819
3808
|
type: "button",
|
|
3820
3809
|
disabled: d,
|
|
@@ -3828,8 +3817,8 @@ function el({
|
|
|
3828
3817
|
className: "w6w-btn",
|
|
3829
3818
|
type: "button",
|
|
3830
3819
|
"data-testid": "entry-save",
|
|
3831
|
-
disabled: !!c || !!d ||
|
|
3832
|
-
onClick:
|
|
3820
|
+
disabled: !!c || !!d || E || n && !(s != null && s.trim()),
|
|
3821
|
+
onClick: v,
|
|
3833
3822
|
children: "Save"
|
|
3834
3823
|
}
|
|
3835
3824
|
) : /* @__PURE__ */ t(
|
|
@@ -3847,7 +3836,7 @@ function el({
|
|
|
3847
3836
|
}
|
|
3848
3837
|
);
|
|
3849
3838
|
}
|
|
3850
|
-
const
|
|
3839
|
+
const xe = (e) => e.isNew ? "new" : e.id;
|
|
3851
3840
|
function tl({
|
|
3852
3841
|
columns: e,
|
|
3853
3842
|
keyColumn: n,
|
|
@@ -3860,43 +3849,43 @@ function tl({
|
|
|
3860
3849
|
onCellChange: d,
|
|
3861
3850
|
onSave: u,
|
|
3862
3851
|
onDelete: f,
|
|
3863
|
-
onReload:
|
|
3864
|
-
onAddRow:
|
|
3852
|
+
onReload: m,
|
|
3853
|
+
onAddRow: v,
|
|
3865
3854
|
onLoadMore: w,
|
|
3866
|
-
onSearch:
|
|
3855
|
+
onSearch: h
|
|
3867
3856
|
}) {
|
|
3868
|
-
const [y, g] =
|
|
3869
|
-
|
|
3870
|
-
},
|
|
3871
|
-
...e.map((
|
|
3872
|
-
key:
|
|
3873
|
-
header: /* @__PURE__ */ i(
|
|
3874
|
-
|
|
3857
|
+
const [y, g] = k(l ?? ""), $ = (N) => {
|
|
3858
|
+
N.preventDefault(), h(y);
|
|
3859
|
+
}, x = [
|
|
3860
|
+
...e.map((N) => ({
|
|
3861
|
+
key: N.name,
|
|
3862
|
+
header: /* @__PURE__ */ i(R, { children: [
|
|
3863
|
+
N.name,
|
|
3875
3864
|
" ",
|
|
3876
|
-
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children:
|
|
3865
|
+
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: N.type })
|
|
3877
3866
|
] }),
|
|
3878
|
-
render: (
|
|
3879
|
-
var
|
|
3880
|
-
const
|
|
3867
|
+
render: (T) => {
|
|
3868
|
+
var E;
|
|
3869
|
+
const C = (E = T.cellErrors) == null ? void 0 : E[N.name];
|
|
3881
3870
|
return /* @__PURE__ */ i("div", { className: "w6w-data-cell", children: [
|
|
3882
3871
|
/* @__PURE__ */ t(
|
|
3883
3872
|
"input",
|
|
3884
3873
|
{
|
|
3885
|
-
"data-row":
|
|
3886
|
-
"data-column":
|
|
3887
|
-
value:
|
|
3888
|
-
readOnly:
|
|
3889
|
-
"aria-label": `${
|
|
3890
|
-
onChange: (
|
|
3874
|
+
"data-row": xe(T),
|
|
3875
|
+
"data-column": N.name,
|
|
3876
|
+
value: T.cells[N.name] ?? "",
|
|
3877
|
+
readOnly: N.name === n && !T.isNew,
|
|
3878
|
+
"aria-label": `${N.name} (${N.type})`,
|
|
3879
|
+
onChange: (P) => d(T.id, N.name, P.target.value)
|
|
3891
3880
|
}
|
|
3892
3881
|
),
|
|
3893
|
-
|
|
3882
|
+
C !== void 0 && /* @__PURE__ */ t(
|
|
3894
3883
|
"div",
|
|
3895
3884
|
{
|
|
3896
3885
|
className: "w6w-data-cell-error",
|
|
3897
|
-
"data-row":
|
|
3898
|
-
"data-column":
|
|
3899
|
-
children:
|
|
3886
|
+
"data-row": xe(T),
|
|
3887
|
+
"data-column": N.name,
|
|
3888
|
+
children: C
|
|
3900
3889
|
}
|
|
3901
3890
|
)
|
|
3902
3891
|
] });
|
|
@@ -3905,22 +3894,22 @@ function tl({
|
|
|
3905
3894
|
{
|
|
3906
3895
|
key: "actions",
|
|
3907
3896
|
header: "",
|
|
3908
|
-
render: (
|
|
3909
|
-
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children:
|
|
3897
|
+
render: (N) => /* @__PURE__ */ i("div", { className: "w6w-data-row-actions", children: [
|
|
3898
|
+
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: N.version === null ? "" : `v${N.version}` }),
|
|
3910
3899
|
/* @__PURE__ */ t(
|
|
3911
3900
|
"button",
|
|
3912
3901
|
{
|
|
3913
3902
|
className: "w6w-btn",
|
|
3914
3903
|
type: "button",
|
|
3915
|
-
"data-row":
|
|
3904
|
+
"data-row": xe(N),
|
|
3916
3905
|
"data-testid": "row-save",
|
|
3917
|
-
disabled: !
|
|
3918
|
-
onClick: () => u(
|
|
3906
|
+
disabled: !N.isNew && !N.dirty || !!N.conflict,
|
|
3907
|
+
onClick: () => u(N.id),
|
|
3919
3908
|
children: "Save"
|
|
3920
3909
|
}
|
|
3921
3910
|
),
|
|
3922
|
-
/* @__PURE__ */ t(
|
|
3923
|
-
|
|
3911
|
+
/* @__PURE__ */ t(ue, { label: "Delete entry", onClick: () => f(N.id) }),
|
|
3912
|
+
N.conflict && /* @__PURE__ */ i("div", { className: "w6w-error", "data-row": xe(N), "data-testid": "row-conflict", children: [
|
|
3924
3913
|
an,
|
|
3925
3914
|
" ",
|
|
3926
3915
|
/* @__PURE__ */ t(
|
|
@@ -3929,7 +3918,7 @@ function tl({
|
|
|
3929
3918
|
className: "w6w-btn w6w-btn-ghost",
|
|
3930
3919
|
type: "button",
|
|
3931
3920
|
"data-testid": "row-reload",
|
|
3932
|
-
onClick: () =>
|
|
3921
|
+
onClick: () => m(N.id),
|
|
3933
3922
|
children: "Reload"
|
|
3934
3923
|
}
|
|
3935
3924
|
)
|
|
@@ -3939,7 +3928,7 @@ function tl({
|
|
|
3939
3928
|
];
|
|
3940
3929
|
return /* @__PURE__ */ i("div", { children: [
|
|
3941
3930
|
s != null && s !== "" && /* @__PURE__ */ t("div", { className: "w6w-error", "data-testid": "grid-error", children: s }),
|
|
3942
|
-
/* @__PURE__ */ i("form", { className: "w6w-data-entries-toolbar", "data-testid": "entry-search", onSubmit:
|
|
3931
|
+
/* @__PURE__ */ i("form", { className: "w6w-data-entries-toolbar", "data-testid": "entry-search", onSubmit: $, children: [
|
|
3943
3932
|
/* @__PURE__ */ t(
|
|
3944
3933
|
"input",
|
|
3945
3934
|
{
|
|
@@ -3948,7 +3937,7 @@ function tl({
|
|
|
3948
3937
|
value: y,
|
|
3949
3938
|
placeholder: "Key prefix",
|
|
3950
3939
|
"aria-label": "Key prefix",
|
|
3951
|
-
onChange: (
|
|
3940
|
+
onChange: (N) => g(N.target.value)
|
|
3952
3941
|
}
|
|
3953
3942
|
),
|
|
3954
3943
|
/* @__PURE__ */ t("button", { className: "w6w-btn w6w-btn-ghost", type: "submit", children: "Search" }),
|
|
@@ -3958,17 +3947,17 @@ function tl({
|
|
|
3958
3947
|
className: "w6w-btn w6w-btn-ghost",
|
|
3959
3948
|
type: "button",
|
|
3960
3949
|
"data-testid": "grid-add-row",
|
|
3961
|
-
onClick:
|
|
3950
|
+
onClick: v,
|
|
3962
3951
|
children: "Add row"
|
|
3963
3952
|
}
|
|
3964
3953
|
)
|
|
3965
3954
|
] }),
|
|
3966
3955
|
/* @__PURE__ */ t("div", { className: "w6w-data-grid-scroll", "data-testid": "data-grid-scroll", children: /* @__PURE__ */ t(
|
|
3967
|
-
|
|
3956
|
+
he,
|
|
3968
3957
|
{
|
|
3969
|
-
columns:
|
|
3958
|
+
columns: x,
|
|
3970
3959
|
rows: a,
|
|
3971
|
-
rowKey: (
|
|
3960
|
+
rowKey: (N) => N.id,
|
|
3972
3961
|
empty: (
|
|
3973
3962
|
// A div, not a <p>: `empty` is any node and callers often pass a <p>.
|
|
3974
3963
|
/* @__PURE__ */ t("div", { className: "w6w-muted w6w-small", children: r ? "Loading…" : o ?? "No rows match this key prefix." })
|
|
@@ -3992,41 +3981,41 @@ export {
|
|
|
3992
3981
|
hs as ActionTestForm,
|
|
3993
3982
|
sl as AddConnectionModal,
|
|
3994
3983
|
bt as ApiCallsPanel,
|
|
3995
|
-
|
|
3996
|
-
|
|
3984
|
+
be as ApiError,
|
|
3985
|
+
Oe as AppIcon,
|
|
3997
3986
|
ll as AppPicker,
|
|
3998
|
-
|
|
3987
|
+
Be as AuthFieldsForm,
|
|
3999
3988
|
Is as BudgetMeter,
|
|
4000
3989
|
Va as CELL_PROBLEM_COPY,
|
|
4001
3990
|
Wa as CSV_MAX_BYTES,
|
|
4002
3991
|
es as CSV_TOO_LARGE_COPY,
|
|
4003
|
-
|
|
3992
|
+
Es as CallableList,
|
|
4004
3993
|
il as CanvasLayer,
|
|
4005
|
-
|
|
3994
|
+
Te as CodeBlock,
|
|
4006
3995
|
rl as CodeEditor,
|
|
4007
3996
|
Xs as ColumnsEditor,
|
|
4008
3997
|
$n as Combobox,
|
|
4009
3998
|
Tn as ConfirmModal,
|
|
4010
3999
|
Os as ConnectionHeader,
|
|
4011
|
-
|
|
4012
|
-
|
|
4000
|
+
Rs as ConnectionList,
|
|
4001
|
+
jn as Copyable,
|
|
4013
4002
|
Gn as CopyableText,
|
|
4014
4003
|
ol as CredentialPicker,
|
|
4015
4004
|
Qs as CsvPanel,
|
|
4016
|
-
|
|
4005
|
+
ce as DATA_STORE_ERROR_FALLBACK,
|
|
4017
4006
|
Ps as DATA_STORE_KINDS,
|
|
4018
|
-
|
|
4007
|
+
Ja as DATA_STORE_KIND_LABEL,
|
|
4019
4008
|
Xa as DATA_STORE_NETWORK_ERROR,
|
|
4020
4009
|
Bt as DOC_VALUE_COPY,
|
|
4021
4010
|
el as DataEntryEditor,
|
|
4022
4011
|
Zs as DataEntryList,
|
|
4023
4012
|
Gs as DataStoreList,
|
|
4024
|
-
|
|
4013
|
+
he as DataTable,
|
|
4025
4014
|
tl as DataTableGrid,
|
|
4026
|
-
|
|
4015
|
+
ue as DeleteButton,
|
|
4027
4016
|
qt as EditButton,
|
|
4028
4017
|
_s as EditConnectionModal,
|
|
4029
|
-
|
|
4018
|
+
_e as EmptyState,
|
|
4030
4019
|
$s as ExecutionDetail,
|
|
4031
4020
|
Cs as ExecutionFilters,
|
|
4032
4021
|
xs as ExecutionList,
|
|
@@ -4036,40 +4025,40 @@ export {
|
|
|
4036
4025
|
dl as ExpressionInput,
|
|
4037
4026
|
ul as ExpressionOptionsProvider,
|
|
4038
4027
|
wl as HTML_PREVIEW_CSP,
|
|
4039
|
-
|
|
4040
|
-
|
|
4028
|
+
tt as HealthStatusPill,
|
|
4029
|
+
Ns as HistoryTimeline,
|
|
4041
4030
|
ml as HtmlPreview,
|
|
4042
|
-
|
|
4043
|
-
|
|
4031
|
+
Xe as Icon,
|
|
4032
|
+
de as IconButton,
|
|
4044
4033
|
bs as InfoTip,
|
|
4045
|
-
|
|
4034
|
+
oe as JsonEditor,
|
|
4046
4035
|
hl as LastUsedNote,
|
|
4047
|
-
|
|
4036
|
+
Qe as ListItem,
|
|
4048
4037
|
pl as Markdown,
|
|
4049
|
-
|
|
4038
|
+
$e as Modal,
|
|
4050
4039
|
nn as NEW_ROW_ID,
|
|
4051
4040
|
fl as NodeConfigForm,
|
|
4052
4041
|
Sn as ParamsForm,
|
|
4053
4042
|
gl as PropertyEntryForm,
|
|
4054
|
-
|
|
4043
|
+
Ma as RECENT_DISPLAY_CAP,
|
|
4055
4044
|
yl as RESULT_RENDER_MAX_CHARS,
|
|
4056
4045
|
Ua as ReliabilityChart,
|
|
4057
4046
|
As as ReliabilityList,
|
|
4058
4047
|
ks as RepoSyncIndicator,
|
|
4059
|
-
|
|
4060
|
-
|
|
4048
|
+
Ye as ResultViewer,
|
|
4049
|
+
vl as RetryPolicyFields,
|
|
4061
4050
|
Qt as SCALAR_TYPES,
|
|
4062
|
-
|
|
4051
|
+
vs as ServerResourcesBadge,
|
|
4063
4052
|
fs as ServerResourcesCard,
|
|
4064
4053
|
gs as ServerResourcesCardSmall,
|
|
4065
4054
|
ys as ServerResourcesRail,
|
|
4066
|
-
|
|
4067
|
-
|
|
4055
|
+
Nl as StepBuilderModal,
|
|
4056
|
+
at as StepStatusPill,
|
|
4068
4057
|
Zn as UptimeStrip,
|
|
4069
4058
|
an as VERSION_CONFLICT_COPY,
|
|
4070
4059
|
bl as W6WUIProvider,
|
|
4071
4060
|
ps as YamlEditor,
|
|
4072
|
-
|
|
4061
|
+
Js as buildRowValue,
|
|
4073
4062
|
qs as cellErrorsOf,
|
|
4074
4063
|
kl as connectionAppIdsToLookUp,
|
|
4075
4064
|
ms as createW6WApi,
|
|
@@ -4078,7 +4067,7 @@ export {
|
|
|
4078
4067
|
Ys as csvImportMessage,
|
|
4079
4068
|
Ft as csvLineOf,
|
|
4080
4069
|
xl as detectResultFormat,
|
|
4081
|
-
|
|
4070
|
+
js as dirtyColumns,
|
|
4082
4071
|
Da as displayBoard,
|
|
4083
4072
|
Bs as draftFromEntry,
|
|
4084
4073
|
Cl as effectiveNodeOutput,
|
|
@@ -4086,47 +4075,47 @@ export {
|
|
|
4086
4075
|
Za as errorPlacement,
|
|
4087
4076
|
$l as filterOptions,
|
|
4088
4077
|
Tl as findTestInput,
|
|
4089
|
-
|
|
4090
|
-
|
|
4078
|
+
st as formatDurationMs,
|
|
4079
|
+
Ee as formatExecutionTime,
|
|
4091
4080
|
Al as htmlPreviewSrcDoc,
|
|
4092
4081
|
Hl as iconNames,
|
|
4093
|
-
|
|
4082
|
+
El as indexNodeSamples,
|
|
4094
4083
|
Us as isCellValue,
|
|
4095
|
-
|
|
4084
|
+
Rl as isExprValue,
|
|
4096
4085
|
_l as isFormResolvedOptions,
|
|
4097
4086
|
Ol as isSecretValue,
|
|
4098
4087
|
Il as isTestRequired,
|
|
4099
4088
|
Hs as isVersionConflict,
|
|
4100
4089
|
zs as kvValueOf,
|
|
4101
|
-
|
|
4090
|
+
Ls as kvValueTypeOf,
|
|
4102
4091
|
Fs as locateDataStoreError,
|
|
4103
4092
|
Qa as locateRawResponseError,
|
|
4104
4093
|
Ts as needsAttention,
|
|
4105
|
-
|
|
4106
|
-
|
|
4094
|
+
Ks as newRowDraft,
|
|
4095
|
+
it as parseCell,
|
|
4107
4096
|
ns as parseDocText,
|
|
4108
4097
|
Pa as partitionBoard,
|
|
4109
4098
|
Ia as performancePoints,
|
|
4110
4099
|
Pl as previewNodeOutputs,
|
|
4111
4100
|
Ws as remainingTtlSeconds,
|
|
4112
|
-
|
|
4113
|
-
|
|
4101
|
+
Ll as rememberableInput,
|
|
4102
|
+
Ml as requiredParamsFilled,
|
|
4114
4103
|
In as resolveConnectionAppMeta,
|
|
4115
4104
|
Dl as resultCopyText,
|
|
4116
4105
|
ts as rowValueOf,
|
|
4117
4106
|
Vs as rowWriteOf,
|
|
4118
|
-
|
|
4107
|
+
rt as serializeCell,
|
|
4119
4108
|
Ul as shapeToSkeleton,
|
|
4120
4109
|
Fl as shouldUseCombobox,
|
|
4121
4110
|
Bl as splitFrontmatter,
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4111
|
+
Kl as startOAuthPopup,
|
|
4112
|
+
Ms as tableSchemaOf,
|
|
4113
|
+
jl as testInputSavesSettled,
|
|
4114
|
+
Jl as trackTestInputSave,
|
|
4115
|
+
La as uptimeDays,
|
|
4116
|
+
Ln as useEnterSubmit,
|
|
4128
4117
|
Wl as useExpressionOptions,
|
|
4129
4118
|
Vl as useRememberedTestInput,
|
|
4130
|
-
|
|
4119
|
+
Kt as useW6WApi
|
|
4131
4120
|
};
|
|
4132
4121
|
//# sourceMappingURL=index.mjs.map
|