@w6w/ui 0.2.55 → 0.2.57
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 +12 -0
- package/dist/CallTargetForm.d.ts +10 -0
- package/dist/{CodeBlock-CymlfyeA.cjs → CodeBlock-BSX1pi6W.cjs} +2 -2
- package/dist/{CodeBlock-CymlfyeA.cjs.map → CodeBlock-BSX1pi6W.cjs.map} +1 -1
- package/dist/{CodeBlock-C-oIIYfC.js → CodeBlock-CPKXSNEs.js} +7 -3
- package/dist/{CodeBlock-C-oIIYfC.js.map → CodeBlock-CPKXSNEs.js.map} +1 -1
- package/dist/CodeEditor.d.ts +2 -0
- package/dist/EditConnectionModal.d.ts +7 -6
- package/dist/JsonEditor.d.ts +1 -3
- package/dist/Markdown.d.ts +3 -1
- package/dist/StepBuilderModal.d.ts +2 -3
- package/dist/TriggerSampleButton.d.ts +11 -0
- package/dist/WorkflowFlowEditor.d.ts +48 -0
- package/dist/YamlEditor.d.ts +1 -2
- package/dist/callable-fields.d.ts +4 -0
- package/dist/code.cjs +1 -1
- package/dist/code.mjs +1 -1
- package/dist/components/ConfirmModal.d.ts +7 -1
- package/dist/components/DataEntryList.d.ts +2 -0
- package/dist/components/ResultViewer.d.ts +1 -2
- package/dist/connection-app-meta-BeYDm-cs.cjs +24 -0
- package/dist/connection-app-meta-BeYDm-cs.cjs.map +1 -0
- package/dist/{connection-app-meta-ZCPakGjD.js → connection-app-meta-aURFNTx_.js} +6115 -5806
- package/dist/connection-app-meta-aURFNTx_.js.map +1 -0
- package/dist/flow.cjs +4 -3
- package/dist/flow.cjs.map +1 -1
- package/dist/flow.mjs +1820 -1753
- package/dist/flow.mjs.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +859 -869
- package/dist/index.mjs.map +1 -1
- package/dist/provider.d.ts +5 -0
- package/package.json +2 -1
- package/src/code.css +24 -0
- package/src/styles/_code-editor.scss +16 -0
- package/src/styles/_copyable.scss +22 -0
- package/src/styles/_data-vars.scss +11 -0
- package/src/styles/_tester.scss +2 -3
- package/src/styles.css +56 -3
- package/dist/connection-app-meta-BEXlKBgV.cjs +0 -22
- package/dist/connection-app-meta-BEXlKBgV.cjs.map +0 -1
- package/dist/connection-app-meta-ZCPakGjD.js.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var Ne = (e, n, a) =>
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
var Cn = Object.defineProperty;
|
|
3
|
+
var Sn = (e, n, a) => n in e ? Cn(e, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[n] = a;
|
|
4
|
+
var Ne = (e, n, a) => Sn(e, typeof n != "symbol" ? n + "" : n, a);
|
|
5
|
+
import { u as jt, bn as $n, J as oe, bB as Tn, aN as Ye, bO as kt, aM as $e, aH as An, X as Rn, bP as En, aC as de, O as _n, bQ as On, bR as In, aY as Oe, bH as Pn, bD as ue, bS as Ln, bT as Be, bU as Mn, bV as Dn, bW as Un } from "./connection-app-meta-aURFNTx_.js";
|
|
6
|
+
import { bF as sl, bz as ll, aF as il, bX as rl, bY as ol, bZ as cl, b_ as dl, aB as ul, b$ as wl, c0 as ml, b3 as hl, bJ as pl, bp as fl, b4 as gl, c1 as yl, c2 as vl, aI as Nl, c3 as bl, c4 as kl, c5 as xl, c6 as Cl, c7 as Sl, c8 as $l, c9 as Tl, ca as Al, an as Rl, cb as El, cc as _l, cd as Ol, ce as Il, cf as Pl, cg as Ll, b2 as Ml, ch as Dl, R as Ul, ci as Fl, cj as Bl, ck as Kl, cl as jl, cm as Jl, a as Wl, b1 as Vl } from "./connection-app-meta-aURFNTx_.js";
|
|
7
7
|
import { jsx as t, jsxs as i, Fragment as E } from "react/jsx-runtime";
|
|
8
|
-
import { useMemo as
|
|
9
|
-
import { u as
|
|
10
|
-
import { i as Hl } from "./CodeBlock-
|
|
11
|
-
import { yaml as
|
|
8
|
+
import { useMemo as Ge, useState as k, useEffect as G, useId as Fn, useRef as Jt } from "react";
|
|
9
|
+
import { u as Bn, b as Kn, c as jn, a as tt, I as Xe, C as Te } from "./CodeBlock-CPKXSNEs.js";
|
|
10
|
+
import { i as Hl } from "./CodeBlock-CPKXSNEs.js";
|
|
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
|
},
|
|
@@ -241,11 +241,11 @@ function ms(e) {
|
|
|
241
241
|
// are 2xx successes; `rawReq` already throws on a non-2xx.
|
|
242
242
|
runWorkflow: (l, c = {}) => r(`/workflows/${encodeURIComponent(l)}/run?wait=true`, {
|
|
243
243
|
method: "POST",
|
|
244
|
-
body: JSON.stringify({ variables: c.variables, input: c.input })
|
|
244
|
+
body: JSON.stringify({ variables: c.variables, input: c.input, entry: c.entry })
|
|
245
245
|
}).then(({ status: d, data: u }) => ({ ...u ?? {}, terminal: d === 200 }))
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function Ze({
|
|
249
249
|
title: e,
|
|
250
250
|
subtitle: n,
|
|
251
251
|
icon: a,
|
|
@@ -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));
|
|
@@ -297,7 +297,7 @@ function Be(e) {
|
|
|
297
297
|
const o = Math.round(r / 24);
|
|
298
298
|
return o < 7 ? `${o}d ago` : new Date(n).toLocaleDateString();
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function xt(e) {
|
|
301
301
|
const n = {};
|
|
302
302
|
for (const a of (e == null ? void 0 : e.params) ?? [])
|
|
303
303
|
a.key && a.default !== void 0 && (n[a.key] = a.default);
|
|
@@ -317,11 +317,11 @@ function qn(e) {
|
|
|
317
317
|
}
|
|
318
318
|
return e;
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function Wt(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 (!Wt(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 = Wt(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();
|
|
@@ -367,126 +367,126 @@ function hs({
|
|
|
367
367
|
embedded: f = !1
|
|
368
368
|
}) {
|
|
369
369
|
var Nt;
|
|
370
|
-
const
|
|
370
|
+
const m = jt(), 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), [R, P] = k([]), K = je(), O = je(), S = je(), [I, V] = k(""), [q, Z] = k(""), J = K.invalid || O.invalid || S.invalid, W = () => {
|
|
374
374
|
const p = {};
|
|
375
|
-
return
|
|
376
|
-
}, [
|
|
377
|
-
key:
|
|
378
|
-
values:
|
|
379
|
-
})), [
|
|
380
|
-
if (
|
|
381
|
-
const p =
|
|
382
|
-
|
|
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, Q] = k("form"), [Ie, ae] = k(""), [Pe, ee] = k(!1), [b, L] = k(!1), _ = (y == null ? void 0 : y.key) ?? null, D = r ? { ...r } : xt(y), [se, M] = k(() => ({
|
|
377
|
+
key: _,
|
|
378
|
+
values: D
|
|
379
|
+
})), [U, le] = k(l ?? null), [ct, pe] = k(D);
|
|
380
|
+
if (se.key !== _) {
|
|
381
|
+
const p = xt(y);
|
|
382
|
+
M({ key: _, values: p }), pe(p), le(l ?? null), N(null), C(void 0), P([]);
|
|
383
383
|
}
|
|
384
|
-
const [
|
|
385
|
-
l !==
|
|
386
|
-
const [
|
|
387
|
-
if (r !==
|
|
388
|
-
const p = JSON.stringify(r ?? null) !== JSON.stringify(
|
|
389
|
-
if (
|
|
390
|
-
const
|
|
391
|
-
|
|
384
|
+
const [ln, rn] = k(l);
|
|
385
|
+
l !== ln && (rn(l), le(l ?? null));
|
|
386
|
+
const [dt, on] = k(r);
|
|
387
|
+
if (r !== dt) {
|
|
388
|
+
const p = JSON.stringify(r ?? null) !== JSON.stringify(dt ?? null);
|
|
389
|
+
if (on(r), r && p) {
|
|
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, ut = (p) => M({ key: _, values: p }), wt = Ge(
|
|
395
|
+
() => JSON.stringify(H) !== JSON.stringify(ct),
|
|
396
|
+
[H, ct]
|
|
397
397
|
);
|
|
398
|
-
|
|
399
|
-
c == null || c(
|
|
400
|
-
}, [
|
|
401
|
-
const
|
|
402
|
-
|
|
403
|
-
},
|
|
404
|
-
if (!y ||
|
|
405
|
-
const
|
|
406
|
-
|
|
407
|
-
let
|
|
408
|
-
const
|
|
398
|
+
G(() => {
|
|
399
|
+
c == null || c(wt);
|
|
400
|
+
}, [wt]);
|
|
401
|
+
const cn = () => {
|
|
402
|
+
ae(JSON.stringify(H, null, 2)), ee(!1), Q("json");
|
|
403
|
+
}, dn = async (p) => {
|
|
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 bt = Hn(z);
|
|
417
|
+
N(bt), P(zn(z)), F = { ok: !1, summary: bt.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(), vn(), o == null || o();
|
|
430
430
|
} catch {
|
|
431
431
|
}
|
|
432
|
-
},
|
|
433
|
-
|
|
432
|
+
}, un = () => dn(H), [fe, mt] = k(null), [ge, ie] = k(null), [wn, mn] = k(0), [hn, ye] = k(!1), [Le, Me] = k(""), [pn, De] = k(!1), Ue = () => mn((p) => p + 1);
|
|
433
|
+
G(() => {
|
|
434
434
|
if (!a) {
|
|
435
|
-
|
|
435
|
+
mt(null);
|
|
436
436
|
return;
|
|
437
437
|
}
|
|
438
438
|
let p = !1;
|
|
439
|
-
return
|
|
439
|
+
return ie(null), m.listSavedTests(a).then((A) => !p && mt(A)).catch((A) => !p && ie(A.message)), () => {
|
|
440
440
|
p = !0;
|
|
441
441
|
};
|
|
442
|
-
}, [
|
|
443
|
-
const
|
|
444
|
-
|
|
445
|
-
const p =
|
|
442
|
+
}, [m, a, wn]);
|
|
443
|
+
const ht = _ ? (fe ?? []).filter((p) => p.actionKey === _) : [], [fn, Fe] = k(null), [gn, yn] = k(0), vn = () => yn((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
|
|
456
|
-
!a || !y || (Me(""),
|
|
457
|
-
},
|
|
458
|
-
!a || !y || (
|
|
459
|
-
},
|
|
454
|
+
}, [m, a, gn]);
|
|
455
|
+
const pt = _ ? (fn ?? []).filter((p) => p.actionKey === _).slice().sort((p, A) => Date.parse(A.occurredAt) - Date.parse(p.occurredAt)) : [], Nn = () => {
|
|
456
|
+
!a || !y || (Me(""), ie(null), ye(!0));
|
|
457
|
+
}, bn = () => {
|
|
458
|
+
!a || !y || (U ? ft() : Nn());
|
|
459
|
+
}, ft = 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
|
-
},
|
|
479
|
-
const
|
|
480
|
-
|
|
481
|
-
},
|
|
482
|
-
if (!a || !
|
|
483
|
-
const p =
|
|
478
|
+
}, kn = (p) => {
|
|
479
|
+
const A = { ...p.values };
|
|
480
|
+
M({ key: _, values: A }), pe(A), le(p.id), Q("form"), N(null), C(void 0), P([]);
|
|
481
|
+
}, xn = async () => {
|
|
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
|
+
}, gt = /* @__PURE__ */ i("div", { className: "w6w-stack", style: { gap: "var(--w6w-sp-1-5)" }, children: [
|
|
490
490
|
/* @__PURE__ */ i(
|
|
491
491
|
"div",
|
|
492
492
|
{
|
|
@@ -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: () => Q("form"),
|
|
505
505
|
children: "Form"
|
|
506
506
|
}
|
|
507
507
|
),
|
|
@@ -509,9 +509,9 @@ function hs({
|
|
|
509
509
|
"button",
|
|
510
510
|
{
|
|
511
511
|
type: "button",
|
|
512
|
-
className: `w6w-btn w6w-btn-sm w6w-btn-ghost${
|
|
513
|
-
"aria-pressed":
|
|
514
|
-
onClick:
|
|
512
|
+
className: `w6w-btn w6w-btn-sm w6w-btn-ghost${j === "json" ? " active" : ""}`,
|
|
513
|
+
"aria-pressed": j === "json",
|
|
514
|
+
onClick: cn,
|
|
515
515
|
children: "JSON"
|
|
516
516
|
}
|
|
517
517
|
),
|
|
@@ -520,42 +520,42 @@ 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
|
-
|
|
535
|
-
|
|
534
|
+
j === "form" ? /* @__PURE__ */ t(
|
|
535
|
+
$n,
|
|
536
536
|
{
|
|
537
537
|
params: (y == null ? void 0 : y.params) ?? [],
|
|
538
|
-
values:
|
|
539
|
-
onChange:
|
|
538
|
+
values: H,
|
|
539
|
+
onChange: ut,
|
|
540
540
|
dynamic: y ? { appId: e, actionKey: y.key, connectionId: a } : void 0
|
|
541
541
|
}
|
|
542
542
|
) : /* @__PURE__ */ i(E, { 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
|
-
p !== null && typeof p == "object" && !Array.isArray(p) &&
|
|
551
|
+
p !== null && typeof p == "object" && !Array.isArray(p) && ut(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
|
+
] }), yt = /* @__PURE__ */ i("details", { className: "w6w-section", "data-testid": "overrides-region", children: [
|
|
559
559
|
/* @__PURE__ */ i("summary", { className: "w6w-section-summary", children: [
|
|
560
560
|
/* @__PURE__ */ t("span", { className: "w6w-section-title", children: "Overrides" }),
|
|
561
561
|
/* @__PURE__ */ t("span", { className: "w6w-section-subtitle", children: "Reach a vendor field this action's own params don't declare" })
|
|
@@ -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) => Z(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
|
-
|
|
645
|
-
|
|
644
|
+
ge && /* @__PURE__ */ t("span", { className: "w6w-hint", style: { color: "var(--w6w-danger)" }, children: ge }),
|
|
645
|
+
ht.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
|
-
children:
|
|
651
|
-
|
|
650
|
+
children: ht.map((p) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
|
|
651
|
+
Ze,
|
|
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 ===
|
|
667
|
-
onClick: () =>
|
|
664
|
+
Ke(p.lastRunAt)
|
|
665
|
+
] }) : `saved ${Ke(p.updatedAt)}`,
|
|
666
|
+
active: p.id === U,
|
|
667
|
+
onClick: () => kn(p)
|
|
668
668
|
}
|
|
669
669
|
) }, p.id))
|
|
670
670
|
}
|
|
671
671
|
),
|
|
672
|
-
|
|
672
|
+
m.listTestRuns && pt.length > 0 && /* @__PURE__ */ i(E, { children: [
|
|
673
673
|
/* @__PURE__ */ t(
|
|
674
674
|
"div",
|
|
675
675
|
{
|
|
@@ -683,8 +683,8 @@ function hs({
|
|
|
683
683
|
{
|
|
684
684
|
className: "w6w-stack",
|
|
685
685
|
style: { listStyle: "none", margin: 0, padding: 0, gap: "var(--w6w-sp-1-5)" },
|
|
686
|
-
children:
|
|
687
|
-
|
|
686
|
+
children: pt.map((p) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
|
|
687
|
+
Ze,
|
|
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,
|
|
703
|
+
] }) : null, vt = (Nt = fe == null ? void 0 : fe.find((p) => p.id === U)) == null ? void 0 : Nt.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
|
+
Tn,
|
|
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
|
}))
|
|
@@ -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,
|
|
755
|
-
ft,
|
|
753
|
+
/* @__PURE__ */ t(Ye, { value: T })
|
|
754
|
+
] }) : null, F = /* @__PURE__ */ i("div", { className: "w6w-stack", style: { gap: "var(--w6w-sp-3)" }, children: [
|
|
756
755
|
gt,
|
|
756
|
+
yt,
|
|
757
757
|
p,
|
|
758
|
-
|
|
759
|
-
/* @__PURE__ */ t(
|
|
760
|
-
] }),
|
|
758
|
+
A,
|
|
759
|
+
/* @__PURE__ */ t(kt, { calls: R })
|
|
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,59 +768,59 @@ function hs({
|
|
|
768
768
|
{
|
|
769
769
|
type: "button",
|
|
770
770
|
className: "w6w-btn",
|
|
771
|
-
disabled: g ||
|
|
772
|
-
onClick:
|
|
771
|
+
disabled: g || J,
|
|
772
|
+
onClick: un,
|
|
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: bn, 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: [
|
|
795
795
|
/* @__PURE__ */ i("div", { className: "card", children: [
|
|
796
796
|
/* @__PURE__ */ t("div", { className: "section-head", children: /* @__PURE__ */ t("h3", { children: "Parameters" }) }),
|
|
797
797
|
/* @__PURE__ */ i("div", { className: "w6w-stack", style: { gap: "var(--w6w-sp-3)" }, children: [
|
|
798
|
-
ft,
|
|
799
798
|
gt,
|
|
799
|
+
yt,
|
|
800
800
|
p
|
|
801
801
|
] })
|
|
802
802
|
] }),
|
|
803
|
-
(
|
|
803
|
+
(A || R.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(
|
|
806
|
+
T !== void 0 && /* @__PURE__ */ t(Ye, { value: T }),
|
|
807
|
+
/* @__PURE__ */ t(kt, { calls: R })
|
|
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,23 +829,23 @@ 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
|
-
|
|
842
|
+
hn && /* @__PURE__ */ t($e, { title: "Save test", onClose: () => ye(!1), children: /* @__PURE__ */ i(
|
|
843
843
|
"form",
|
|
844
844
|
{
|
|
845
845
|
className: "w6w-stack",
|
|
846
846
|
style: { gap: "var(--w6w-sp-3)" },
|
|
847
847
|
onSubmit: (p) => {
|
|
848
|
-
p.preventDefault(),
|
|
848
|
+
p.preventDefault(), ft();
|
|
849
849
|
},
|
|
850
850
|
children: [
|
|
851
851
|
/* @__PURE__ */ i("label", { className: "w6w-field", children: [
|
|
@@ -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,34 +871,34 @@ 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
|
)
|
|
882
882
|
]
|
|
883
883
|
}
|
|
884
884
|
) }),
|
|
885
|
-
|
|
886
|
-
|
|
885
|
+
pn && /* @__PURE__ */ t(
|
|
886
|
+
An,
|
|
887
887
|
{
|
|
888
888
|
title: "Delete saved test",
|
|
889
|
-
message:
|
|
889
|
+
message: vt ? `Delete "${vt}"? This cannot be undone.` : "Delete this saved test? This cannot be undone.",
|
|
890
890
|
confirmLabel: "Delete",
|
|
891
891
|
onConfirm: () => {
|
|
892
|
-
|
|
892
|
+
De(!1), xn();
|
|
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 =
|
|
901
|
+
const n = Rn(e.theme), { copied: a, copy: s } = Bn(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(E, { children: [
|
|
929
|
+
e.copyable !== !1 && /* @__PURE__ */ i(E, { 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(
|
|
937
|
+
children: a ? /* @__PURE__ */ t(Kn, {}) : /* @__PURE__ */ t(jn, {})
|
|
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(tt, { 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,20 +961,20 @@ const Xn = {
|
|
|
961
961
|
down: "Down",
|
|
962
962
|
unknown: "Unknown"
|
|
963
963
|
};
|
|
964
|
-
function
|
|
964
|
+
function nt({ 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" }),
|
|
968
968
|
/* @__PURE__ */ t("span", { className: "w6w-health-pill-label", children: s })
|
|
969
969
|
] });
|
|
970
970
|
}
|
|
971
|
-
const
|
|
971
|
+
const Zn = {
|
|
972
972
|
ok: "Operational",
|
|
973
973
|
degraded: "Degraded",
|
|
974
974
|
down: "Down",
|
|
975
975
|
unknown: "Unknown"
|
|
976
976
|
};
|
|
977
|
-
function
|
|
977
|
+
function Qn({ days: e, ariaLabel: n }) {
|
|
978
978
|
return e.length === 0 ? null : /* @__PURE__ */ t(
|
|
979
979
|
"div",
|
|
980
980
|
{
|
|
@@ -985,31 +985,31 @@ function Zn({ days: e, ariaLabel: n }) {
|
|
|
985
985
|
"span",
|
|
986
986
|
{
|
|
987
987
|
className: `w6w-uptime-cell w6w-uptime-cell-${a.state}`,
|
|
988
|
-
title: a.label ?? `${a.day} — ${
|
|
988
|
+
title: a.label ?? `${a.day} — ${Zn[a.state]}`
|
|
989
989
|
},
|
|
990
990
|
`${a.day}-${s}`
|
|
991
991
|
))
|
|
992
992
|
}
|
|
993
993
|
);
|
|
994
994
|
}
|
|
995
|
-
const
|
|
996
|
-
function
|
|
997
|
-
if (e === null || !Number.isFinite(e)) return
|
|
995
|
+
const Vt = "—", Ct = ["B", "KiB", "MiB", "GiB", "TiB", "PiB"];
|
|
996
|
+
function qt(e) {
|
|
997
|
+
if (e === null || !Number.isFinite(e)) return Vt;
|
|
998
998
|
if (e < 1024) return `${Math.round(e)} B`;
|
|
999
999
|
let n = e, a = 0;
|
|
1000
|
-
for (; n >= 1024 && a <
|
|
1000
|
+
for (; n >= 1024 && a < Ct.length - 1; )
|
|
1001
1001
|
n /= 1024, a += 1;
|
|
1002
|
-
return `${n.toFixed(1)} ${
|
|
1002
|
+
return `${n.toFixed(1)} ${Ct[a]}`;
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1005
|
-
return e === null || !Number.isFinite(e) ?
|
|
1004
|
+
function X(e) {
|
|
1005
|
+
return e === null || !Number.isFinite(e) ? Vt : `${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;
|
|
@@ -1029,18 +1029,18 @@ function ta(e, n, a, s) {
|
|
|
1029
1029
|
}
|
|
1030
1030
|
return o.join(" ");
|
|
1031
1031
|
}
|
|
1032
|
-
const na = "—",
|
|
1032
|
+
const na = "—", St = 100, $t = 24;
|
|
1033
1033
|
function Qe({
|
|
1034
1034
|
values: e,
|
|
1035
1035
|
max: n,
|
|
1036
1036
|
className: a
|
|
1037
1037
|
}) {
|
|
1038
|
-
const s = ta(e,
|
|
1038
|
+
const s = ta(e, St, $t, n);
|
|
1039
1039
|
return s === "" ? null : /* @__PURE__ */ t(
|
|
1040
1040
|
"svg",
|
|
1041
1041
|
{
|
|
1042
1042
|
className: a,
|
|
1043
|
-
viewBox: `0 0 ${
|
|
1043
|
+
viewBox: `0 0 ${St} ${$t}`,
|
|
1044
1044
|
preserveAspectRatio: "none",
|
|
1045
1045
|
"aria-hidden": "true",
|
|
1046
1046
|
focusable: "false",
|
|
@@ -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,
|
|
@@ -1077,8 +1077,8 @@ function xe({
|
|
|
1077
1077
|
/* @__PURE__ */ t(Qe, { 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 at(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,83 +1086,83 @@ 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 } = at(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
|
-
value:
|
|
1115
|
+
value: qt((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 } = at(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 } = at(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
|
Qe,
|
|
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:
|
|
1165
|
+
/* @__PURE__ */ t("span", { className: "w6w-server-resources__value", children: X(me(a)) }),
|
|
1166
1166
|
/* @__PURE__ */ t(Qe, { className: "w6w-server-resources__spark", values: r, max: 1 })
|
|
1167
1167
|
] }),
|
|
1168
1168
|
n !== void 0 && /* @__PURE__ */ t(
|
|
@@ -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 = Fn();
|
|
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",
|
|
@@ -1260,10 +1260,10 @@ function bs({ label: e, children: n, className: a }) {
|
|
|
1260
1260
|
s && /* @__PURE__ */ t("span", { id: o, className: "w6w-info-tip-body w6w-muted w6w-small", children: n })
|
|
1261
1261
|
] });
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1263
|
+
function Ht(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 st({ 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 lt(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 Re(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
|
}
|
|
@@ -1368,7 +1368,7 @@ const wa = {
|
|
|
1368
1368
|
event: "Event",
|
|
1369
1369
|
replay: "Replay"
|
|
1370
1370
|
};
|
|
1371
|
-
function
|
|
1371
|
+
function Tt(e) {
|
|
1372
1372
|
if (!e.trigger) return null;
|
|
1373
1373
|
const n = ma[e.trigger] ?? e.trigger;
|
|
1374
1374
|
return e.triggerNodeId ? `${n} · ${e.triggerNodeId}` : n;
|
|
@@ -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,70 +1412,70 @@ 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
|
+
Ze,
|
|
1418
1418
|
{
|
|
1419
|
-
icon: /* @__PURE__ */ t(
|
|
1419
|
+
icon: /* @__PURE__ */ t(st, { state: h.status }),
|
|
1420
1420
|
title: /* @__PURE__ */ i(E, { children: [
|
|
1421
|
-
s ?
|
|
1422
|
-
|
|
1421
|
+
s ? h.callableName : Re(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
1432
|
subtitle: /* @__PURE__ */ i(E, { children: [
|
|
1433
|
-
s ? `${wa[
|
|
1434
|
-
|
|
1435
|
-
|
|
1433
|
+
s ? `${wa[h.kind]} · ${Re(h.startedAt)}` : h.id,
|
|
1434
|
+
Tt(h) && /* @__PURE__ */ t("span", { className: "w6w-execution-trigger", "data-testid": "execution-row-trigger", children: ` · ${Tt(h)}` }),
|
|
1435
|
+
h.inputPreview && /* @__PURE__ */ i(E, { 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: lt(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 = _n(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,
|
|
1475
1475
|
actionName: e.actionName ?? (n == null ? void 0 : n.label) ?? e.action
|
|
1476
1476
|
};
|
|
1477
1477
|
}
|
|
1478
|
-
function
|
|
1478
|
+
function zt(e) {
|
|
1479
1479
|
const n = (a) => {
|
|
1480
1480
|
for (const s of [a.startedAt, a.finishedAt]) {
|
|
1481
1481
|
const r = Date.parse(s ?? "");
|
|
@@ -1492,17 +1492,17 @@ 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 =
|
|
1505
|
+
] }) : null, d = zt(e.filter((m) => !At(m))), u = e.filter(At), f = u.length > 0 ? /* @__PURE__ */ t(ga, { steps: u }) : null;
|
|
1506
1506
|
return d.length === 0 ? /* @__PURE__ */ i(E, { children: [
|
|
1507
1507
|
o,
|
|
1508
1508
|
c,
|
|
@@ -1511,11 +1511,11 @@ function pa({
|
|
|
1511
1511
|
] }) : /* @__PURE__ */ i(E, { 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(Yt, { step: m }, m.id)) }),
|
|
1515
1515
|
f
|
|
1516
1516
|
] });
|
|
1517
1517
|
}
|
|
1518
|
-
const
|
|
1518
|
+
const At = (e) => e.status === "skipped" && e.skipReason === "not_on_path", fa = {
|
|
1519
1519
|
condition: "condition false",
|
|
1520
1520
|
stopped: "run stopped",
|
|
1521
1521
|
disabled: "disabled"
|
|
@@ -1527,10 +1527,10 @@ function ga({ steps: e }) {
|
|
|
1527
1527
|
/* @__PURE__ */ t("ul", { className: "w6w-muted w6w-small", children: e.map((a) => /* @__PURE__ */ t("li", { children: a.label ?? a.id }, a.id)) })
|
|
1528
1528
|
] });
|
|
1529
1529
|
}
|
|
1530
|
-
function
|
|
1530
|
+
function Yt({ 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(st, { 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,
|
|
@@ -1555,16 +1555,16 @@ function zt({ step: e }) {
|
|
|
1555
1555
|
/* @__PURE__ */ t("summary", { className: "w6w-section-summary", children: r }),
|
|
1556
1556
|
n && /* @__PURE__ */ i("div", { className: "w6w-execution-log-row-body w6w-section-body w6w-stack", children: [
|
|
1557
1557
|
/* @__PURE__ */ t(ka, { input: e.input }),
|
|
1558
|
-
/* @__PURE__ */ t(
|
|
1559
|
-
/* @__PURE__ */ t(
|
|
1558
|
+
/* @__PURE__ */ t(Rt, { title: "Input", value: e.input }),
|
|
1559
|
+
/* @__PURE__ */ t(Rt, { 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 zt(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 }),
|
|
@@ -1641,17 +1641,17 @@ function Na({
|
|
|
1641
1641
|
}
|
|
1642
1642
|
)
|
|
1643
1643
|
] }),
|
|
1644
|
-
l ? /* @__PURE__ */ t("ol", { className: "w6w-execution-log", children: /* @__PURE__ */ t(
|
|
1644
|
+
l ? /* @__PURE__ */ t("ol", { className: "w6w-execution-log", children: /* @__PURE__ */ t(Yt, { step: l }, r) }) : /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Did not run in this iteration." })
|
|
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: [
|
|
@@ -1680,8 +1680,8 @@ function ba(e, n) {
|
|
|
1680
1680
|
const l = Math.floor(o / 60), c = Math.round(o % 60);
|
|
1681
1681
|
return `${l}m ${c}s`;
|
|
1682
1682
|
}
|
|
1683
|
-
function
|
|
1684
|
-
const [a, s] =
|
|
1683
|
+
function Rt({ title: e, value: n }) {
|
|
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,16 +1695,16 @@ 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
|
-
const
|
|
1704
|
-
function
|
|
1705
|
-
if (!
|
|
1703
|
+
const Ee = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
|
|
1704
|
+
function Et(e) {
|
|
1705
|
+
if (!Ee(e) || !Array.isArray(e.conditions)) return;
|
|
1706
1706
|
const n = e.conditions.filter(
|
|
1707
|
-
(a) =>
|
|
1707
|
+
(a) => Ee(a) && typeof a.op == "string" && "result" in a
|
|
1708
1708
|
);
|
|
1709
1709
|
if (n.length !== 0)
|
|
1710
1710
|
return {
|
|
@@ -1714,18 +1714,18 @@ function Rt(e) {
|
|
|
1714
1714
|
};
|
|
1715
1715
|
}
|
|
1716
1716
|
function ka({ input: e }) {
|
|
1717
|
-
const n = [], a =
|
|
1718
|
-
if (a && n.push({ trace: a }),
|
|
1717
|
+
const n = [], a = Et(e);
|
|
1718
|
+
if (a && n.push({ trace: a }), Ee(e) && Array.isArray(e.routes))
|
|
1719
1719
|
for (const s of e.routes) {
|
|
1720
|
-
const r =
|
|
1721
|
-
!r || !
|
|
1720
|
+
const r = Et(s);
|
|
1721
|
+
!r || !Ee(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: [
|
|
1724
1724
|
/* @__PURE__ */ t("strong", { className: "w6w-small", children: "Condition" }),
|
|
1725
1725
|
n.map(({ title: s, trace: r }, o) => /* @__PURE__ */ i("div", { className: "w6w-stack", children: [
|
|
1726
1726
|
s && /* @__PURE__ */ t("span", { className: "w6w-small w6w-muted", children: s }),
|
|
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
|
-
r.combinator && r.rows.length > 1 &&
|
|
1728
|
+
r.combinator && r.rows.length > 1 && On(r.combinator),
|
|
1729
1729
|
r.combinator && r.rows.length > 1 && r.result !== void 0 && " · ",
|
|
1730
1730
|
r.result !== void 0 && /* @__PURE__ */ i(E, { children: [
|
|
1731
1731
|
"Result:",
|
|
@@ -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:
|
|
1753
|
-
/* @__PURE__ */ t("td", { children:
|
|
1754
|
-
/* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("code", { children:
|
|
1752
|
+
/* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("code", { children: _t(l.left) }) }),
|
|
1753
|
+
/* @__PURE__ */ t("td", { children: In(l.op) }),
|
|
1754
|
+
/* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("code", { children: _t(l.right) }) }),
|
|
1755
1755
|
/* @__PURE__ */ t(
|
|
1756
1756
|
"td",
|
|
1757
1757
|
{
|
|
@@ -1765,10 +1765,10 @@ function ka({ input: e }) {
|
|
|
1765
1765
|
] }, s ?? o))
|
|
1766
1766
|
] });
|
|
1767
1767
|
}
|
|
1768
|
-
function
|
|
1768
|
+
function _t(e) {
|
|
1769
1769
|
return JSON.stringify(e) ?? "undefined";
|
|
1770
1770
|
}
|
|
1771
|
-
const
|
|
1771
|
+
const Ot = {
|
|
1772
1772
|
not_object: "Not written — the output isn't an object, so it can't be merged at the root",
|
|
1773
1773
|
missing_source: "Not written — the output has no value at that field",
|
|
1774
1774
|
null_append: "Not appended — the value was null",
|
|
@@ -1781,17 +1781,17 @@ const _t = {
|
|
|
1781
1781
|
log_truncated: "Later state changes aren't shown — the run's state log reached its limit"
|
|
1782
1782
|
};
|
|
1783
1783
|
function xa(e) {
|
|
1784
|
-
return Object.hasOwn(
|
|
1784
|
+
return Object.hasOwn(Ot, e) ? Ot[e] : e;
|
|
1785
1785
|
}
|
|
1786
1786
|
function Ca(e) {
|
|
1787
1787
|
const n = Array.isArray(e.stateWrites) && e.stateWrites.length > 0, a = e.stateAfter;
|
|
1788
1788
|
return n || typeof a == "object" && a !== null && Object.keys(a).length > 0;
|
|
1789
1789
|
}
|
|
1790
|
-
const
|
|
1791
|
-
function
|
|
1790
|
+
const It = 120;
|
|
1791
|
+
function Pt(e) {
|
|
1792
1792
|
if (e === void 0) return "(not set)";
|
|
1793
1793
|
const n = JSON.stringify(e) ?? String(e);
|
|
1794
|
-
return n.length >
|
|
1794
|
+
return n.length > It ? `${n.slice(0, It)}…` : n;
|
|
1795
1795
|
}
|
|
1796
1796
|
function Sa({ step: e }) {
|
|
1797
1797
|
const n = Array.isArray(e.stateWrites) ? e.stateWrites : [], a = e.stateAfter;
|
|
@@ -1813,14 +1813,14 @@ function Sa({ step: e }) {
|
|
|
1813
1813
|
{
|
|
1814
1814
|
className: "w6w-execution-log-state-write w6w-small",
|
|
1815
1815
|
"data-testid": "execution-log-state-write",
|
|
1816
|
-
children: `${l}: ${
|
|
1816
|
+
children: `${l}: ${Pt(s.old)} → ${Pt(s.new)}`
|
|
1817
1817
|
},
|
|
1818
1818
|
r
|
|
1819
1819
|
);
|
|
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,13 +1920,13 @@ 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",
|
|
@@ -1936,12 +1936,12 @@ function Ss({ stats: e, label: n }) {
|
|
|
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 ? lt(e.avgDurationMs) : Se
|
|
1945
1945
|
}
|
|
1946
1946
|
];
|
|
1947
1947
|
return e && e.inFlight > 0 && a.push({
|
|
@@ -1957,7 +1957,7 @@ function Ss({ stats: e, label: n }) {
|
|
|
1957
1957
|
] });
|
|
1958
1958
|
}
|
|
1959
1959
|
function Ra(e) {
|
|
1960
|
-
return e == null || !Number.isFinite(e) ?
|
|
1960
|
+
return e == null || !Number.isFinite(e) ? Se : `${Math.round(e * 100)}%`;
|
|
1961
1961
|
}
|
|
1962
1962
|
const Ea = {
|
|
1963
1963
|
function: "Function",
|
|
@@ -2028,7 +2028,7 @@ function Oa({
|
|
|
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(
|
|
2031
|
+
/* @__PURE__ */ t(st, { state: e.status }),
|
|
2032
2032
|
/* @__PURE__ */ t("span", { className: "w6w-execution-detail-kind w6w-muted w6w-small", children: Ea[e.kind] })
|
|
2033
2033
|
] })
|
|
2034
2034
|
] }),
|
|
@@ -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: Re(e.startedAt) }),
|
|
2082
2082
|
/* @__PURE__ */ t(
|
|
2083
|
-
|
|
2083
|
+
He,
|
|
2084
2084
|
{
|
|
2085
2085
|
label: "Finished",
|
|
2086
|
-
value: e.finishedAt ?
|
|
2086
|
+
value: e.finishedAt ? Re(e.finishedAt) : "—"
|
|
2087
2087
|
}
|
|
2088
2088
|
),
|
|
2089
|
-
/* @__PURE__ */ t(
|
|
2089
|
+
/* @__PURE__ */ t(He, { label: "Duration", value: lt(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
|
|
2144
|
+
const Lt = 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,
|
|
2146
|
+
const a = n.compact ?? !1, { now: s, recent: r } = Pa(e), o = s.length + r.length, l = a ? s.slice(0, Lt) : s, c = a ? r.slice(0, Math.max(0, Lt - l.length)) : r, d = a ? e.slice(0, n.limit ?? Ma) : [...e];
|
|
2147
2147
|
return {
|
|
2148
2148
|
attentionCount: o,
|
|
2149
2149
|
shownNow: l,
|
|
@@ -2153,7 +2153,7 @@ function Da(e, n = {}) {
|
|
|
2153
2153
|
hiddenTableCount: e.length - d.length
|
|
2154
2154
|
};
|
|
2155
2155
|
}
|
|
2156
|
-
const
|
|
2156
|
+
const ke = 640, re = 340, B = { top: 16, right: 24, bottom: 40, left: 56 };
|
|
2157
2157
|
function Mt(e) {
|
|
2158
2158
|
if (e <= 0) return 1;
|
|
2159
2159
|
const n = 10 ** Math.floor(Math.log10(e)), a = [1, 2, 5, 10];
|
|
@@ -2161,7 +2161,7 @@ function Mt(e) {
|
|
|
2161
2161
|
if (e <= s * n) return s * n;
|
|
2162
2162
|
return 10 * n;
|
|
2163
2163
|
}
|
|
2164
|
-
function
|
|
2164
|
+
function Dt(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 = Mt(Math.max(...s.map((g) => g.calls))), o = Mt(Math.max(...s.map((g) => g.p95Ms))), l = Math.max(1, ...s.map((g) => g.errorCount)), c =
|
|
2175
|
+
const r = Mt(Math.max(...s.map((g) => g.calls))), o = Mt(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 = Dt(r), w = Dt(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(E, { 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
|
}
|
|
@@ -2300,11 +2300,11 @@ function Ua({
|
|
|
2300
2300
|
/* @__PURE__ */ t("p", { className: "w6w-muted w6w-small w6w-rel-scatter-note", children: "Up is faster, right is more calls — top-right is the best outcome. Icon size is the error count in this window; ring colour is exec status." })
|
|
2301
2301
|
] });
|
|
2302
2302
|
}
|
|
2303
|
-
function
|
|
2303
|
+
function Ut(e) {
|
|
2304
2304
|
const n = new Date(e);
|
|
2305
2305
|
return Number.isNaN(n.getTime()) ? e : n.toLocaleDateString(void 0, { month: "short", day: "numeric" });
|
|
2306
2306
|
}
|
|
2307
|
-
function
|
|
2307
|
+
function Gt({
|
|
2308
2308
|
appId: e,
|
|
2309
2309
|
className: n,
|
|
2310
2310
|
title: a,
|
|
@@ -2323,24 +2323,24 @@ function Yt({
|
|
|
2323
2323
|
}
|
|
2324
2324
|
) : r ? /* @__PURE__ */ t("button", { type: "button", className: n, title: a, onClick: (l) => r(e, l), children: o }) : /* @__PURE__ */ t("div", { className: n, title: a, children: o });
|
|
2325
2325
|
}
|
|
2326
|
-
function
|
|
2326
|
+
function Xt({ service: e }) {
|
|
2327
2327
|
return /* @__PURE__ */ i("span", { className: "w6w-rel-signal", children: [
|
|
2328
|
-
/* @__PURE__ */ t(
|
|
2328
|
+
/* @__PURE__ */ t(nt, { 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
|
] });
|
|
2332
2332
|
}
|
|
2333
|
-
function
|
|
2333
|
+
function Zt({ 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(nt, { 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
|
}
|
|
2341
2341
|
function Fa({ service: e, getHref: n, onOpen: a }) {
|
|
2342
2342
|
return /* @__PURE__ */ i(
|
|
2343
|
-
|
|
2343
|
+
Gt,
|
|
2344
2344
|
{
|
|
2345
2345
|
appId: e.appId,
|
|
2346
2346
|
className: "w6w-rel-issue-card",
|
|
@@ -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,
|
|
@@ -2367,11 +2367,11 @@ function Fa({ service: e, getHref: n, onOpen: a }) {
|
|
|
2367
2367
|
/* @__PURE__ */ i("span", { className: "w6w-rel-issue-signals", children: [
|
|
2368
2368
|
/* @__PURE__ */ i("span", { className: "w6w-rel-issue-signal", children: [
|
|
2369
2369
|
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: "w6w exec" }),
|
|
2370
|
-
/* @__PURE__ */ t(
|
|
2370
|
+
/* @__PURE__ */ t(Xt, { service: e })
|
|
2371
2371
|
] }),
|
|
2372
2372
|
/* @__PURE__ */ i("span", { className: "w6w-rel-issue-signal", children: [
|
|
2373
2373
|
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: "API status" }),
|
|
2374
|
-
/* @__PURE__ */ t(
|
|
2374
|
+
/* @__PURE__ */ t(Zt, { vendor: e.vendorStatus })
|
|
2375
2375
|
] })
|
|
2376
2376
|
] })
|
|
2377
2377
|
]
|
|
@@ -2390,9 +2390,9 @@ function Ba({
|
|
|
2390
2390
|
className: `w6w-rel-tr${e.attention !== "none" ? " w6w-rel-attention" : ""}`,
|
|
2391
2391
|
"data-attention": e.attention === "none" ? void 0 : e.attention,
|
|
2392
2392
|
children: [
|
|
2393
|
-
/* @__PURE__ */ t("td", { className: "w6w-rel-td-service", children: /* @__PURE__ */ i(
|
|
2393
|
+
/* @__PURE__ */ t("td", { className: "w6w-rel-td-service", children: /* @__PURE__ */ i(Gt, { 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,
|
|
@@ -2409,11 +2409,11 @@ function Ba({
|
|
|
2409
2409
|
/* @__PURE__ */ i("td", { className: "w6w-rel-td-status", children: [
|
|
2410
2410
|
/* @__PURE__ */ i("span", { className: "w6w-rel-status-row", children: [
|
|
2411
2411
|
/* @__PURE__ */ t("span", { className: "w6w-rel-status-label w6w-muted w6w-small", children: "Ops" }),
|
|
2412
|
-
/* @__PURE__ */ t(
|
|
2412
|
+
/* @__PURE__ */ t(Xt, { service: e })
|
|
2413
2413
|
] }),
|
|
2414
2414
|
/* @__PURE__ */ i("span", { className: "w6w-rel-status-row", children: [
|
|
2415
2415
|
/* @__PURE__ */ t("span", { className: "w6w-rel-status-label w6w-muted w6w-small", children: "API" }),
|
|
2416
|
-
/* @__PURE__ */ t(
|
|
2416
|
+
/* @__PURE__ */ t(Zt, { vendor: e.vendorStatus })
|
|
2417
2417
|
] })
|
|
2418
2418
|
] }),
|
|
2419
2419
|
/* @__PURE__ */ t("td", { className: "w6w-rel-td-uptime", children: s ? (
|
|
@@ -2421,9 +2421,9 @@ function Ba({
|
|
|
2421
2421
|
/* @__PURE__ */ t("span", { className: "w6w-rel-idle-note", children: "No calls in this window" })
|
|
2422
2422
|
) : /* @__PURE__ */ i(E, { children: [
|
|
2423
2423
|
/* @__PURE__ */ t(
|
|
2424
|
-
|
|
2424
|
+
Qn,
|
|
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,20 +2450,20 @@ 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((R) => R.calls > 0 && R.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 = (R) => {
|
|
2461
|
+
const P = R.startsWith("Show") ? "w6w-muted w6w-small" : void 0;
|
|
2462
|
+
return d !== void 0 ? /* @__PURE__ */ t("a", { href: d, className: P, onClick: u, children: R }) : 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
2468
|
children: R
|
|
2469
2469
|
}
|
|
@@ -2475,27 +2475,27 @@ function As({
|
|
|
2475
2475
|
(f == null ? void 0 : f.header) ?? "Service reliability",
|
|
2476
2476
|
" ",
|
|
2477
2477
|
n && /* @__PURE__ */ i("span", { className: "w6w-muted w6w-small", children: [
|
|
2478
|
-
|
|
2478
|
+
Ut(n.from),
|
|
2479
2479
|
" – ",
|
|
2480
|
-
|
|
2480
|
+
Ut(n.to),
|
|
2481
2481
|
" · ",
|
|
2482
2482
|
n.days,
|
|
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(nt, { state: "ok" }),
|
|
2499
2499
|
" — no degraded stretches, no outages."
|
|
2500
2500
|
] })
|
|
2501
2501
|
] }),
|
|
@@ -2506,33 +2506,33 @@ function As({
|
|
|
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((R) => /* @__PURE__ */ t(Fa, { service: R, getHref: l, onOpen: c }, R.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(E, { 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,12 +2540,12 @@ 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((R) => /* @__PURE__ */ t(
|
|
2549
2549
|
Ba,
|
|
2550
2550
|
{
|
|
2551
2551
|
service: R,
|
|
@@ -2555,12 +2555,12 @@ function As({
|
|
|
2555
2555
|
R.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(E, { children: [
|
|
2562
2562
|
" — ",
|
|
2563
|
-
|
|
2563
|
+
C("view all →")
|
|
2564
2564
|
] })
|
|
2565
2565
|
] })
|
|
2566
2566
|
] })
|
|
@@ -2568,10 +2568,10 @@ 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
2576
|
return a.length === 0 && !c && l !== void 0 && l !== null ? /* @__PURE__ */ t(E, { children: l }) : /* @__PURE__ */ t("div", { className: "w6w-data-table-frame", children: /* @__PURE__ */ i(
|
|
2577
2577
|
"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
|
{
|
|
@@ -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), R = 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: R ? 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,7 +2662,7 @@ 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: [
|
|
@@ -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,21 +2710,21 @@ 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
|
] })
|
|
@@ -2742,25 +2742,25 @@ 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 = Pn(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
|
},
|
|
@@ -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,9 +2798,9 @@ 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
|
+
Ht,
|
|
2804
2804
|
{
|
|
2805
2805
|
label: "Edit",
|
|
2806
2806
|
onClick: () => l(w),
|
|
@@ -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,104 +2825,105 @@ 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 = jt(), r = s.updateConnection, o = e.builtIn === !0, l = !o && typeof r == "function", [c, d] =
|
|
2843
|
-
|
|
2842
|
+
const s = jt(), r = s.updateConnection, o = e.builtIn === !0, l = !o && typeof r == "function", [c, d] = k(e.displayName ?? ""), [u, f] = k(e.authKey), [m, v] = k({}), [w, h] = k(null), [y, g] = k(null), [$, x] = k(!1), [N, T] = k({}), [C, R] = 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
|
+
)) ?? [], Z = (I == null ? void 0 : I.type) === "oauth2", J = Z ? [] : (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") && !Z, Q = j && (I != null && I.serviceAccount) ? Ln(I.serviceAccount) : [];
|
|
2853
|
+
G(() => {
|
|
2854
|
+
if (!l || V || Z || !W || typeof s.getCredential != "function")
|
|
2855
|
+
return;
|
|
2856
|
+
let b = !1;
|
|
2857
|
+
return s.getCredential(W).then((L) => {
|
|
2858
|
+
b || (R(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, Z, W]);
|
|
2864
|
+
function Ie() {
|
|
2865
|
+
if (j) {
|
|
2866
|
+
const _ = {};
|
|
2867
|
+
c !== (e.displayName ?? "") && (_.displayName = c);
|
|
2868
|
+
const D = Un(Q, 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 = Dn(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 = Mn(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." }),
|
|
@@ -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
|
|
2947
2948
|
}
|
|
2948
2949
|
)
|
|
2949
2950
|
] }),
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
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
|
+
]
|
|
2966
|
+
}
|
|
2967
|
+
)
|
|
2968
|
+
] }),
|
|
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
|
+
Z && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: q.some((b) => b.key !== e.authKey) ? "This connection uses OAuth. Choose another authentication method above to use a key or token." : "This is an OAuth connection. You can rename it here; its credential is renewed by re-authorizing it." }),
|
|
2972
|
+
j && Q.length > 0 && /* @__PURE__ */ i(E, { 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: Q,
|
|
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(E, { 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(E, { 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,8 +3085,8 @@ 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
|
|
3100
|
-
function
|
|
3088
|
+
const ja = (e) => String(e);
|
|
3089
|
+
function Ft(e) {
|
|
3101
3090
|
const n = Math.min(100, Math.max(0, e));
|
|
3102
3091
|
return Number(n.toFixed(4));
|
|
3103
3092
|
}
|
|
@@ -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 ? Ft(n / a * 100) : 100, f = d && a > 0 ? Ft(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 it(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 rt(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 it(s) === null ? Y("not_a_date") : { ok: !0, value: s };
|
|
3200
3189
|
case "datetime":
|
|
3201
|
-
return
|
|
3190
|
+
return en(s) ? { ok: !0, value: s } : Y("not_a_datetime");
|
|
3202
3191
|
}
|
|
3203
3192
|
}
|
|
3204
|
-
function
|
|
3205
|
-
if (!Ya.test(e) ||
|
|
3193
|
+
function en(e) {
|
|
3194
|
+
if (!Ya.test(e) || it(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 ot(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" && it(n) !== null;
|
|
3233
3222
|
case "datetime":
|
|
3234
|
-
return typeof n == "string" &&
|
|
3223
|
+
return typeof n == "string" && en(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
|
-
function
|
|
3230
|
+
function tn(e) {
|
|
3242
3231
|
return Number.isInteger(e) && e >= 0 ? e : void 0;
|
|
3243
3232
|
}
|
|
3244
|
-
function
|
|
3245
|
-
const s = { message:
|
|
3233
|
+
function nn(e, n, a) {
|
|
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
|
-
const u =
|
|
3244
|
+
const u = tn(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;
|
|
@@ -3270,12 +3259,12 @@ function tn(e, n, a) {
|
|
|
3270
3259
|
function Fs(e) {
|
|
3271
3260
|
try {
|
|
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
|
-
return
|
|
3262
|
+
return nn(a, [s], n == null ? void 0 : n.status);
|
|
3274
3263
|
} catch {
|
|
3275
|
-
return { message:
|
|
3264
|
+
return { message: ce };
|
|
3276
3265
|
}
|
|
3277
3266
|
}
|
|
3278
|
-
function
|
|
3267
|
+
function Za(e) {
|
|
3279
3268
|
try {
|
|
3280
3269
|
if (e.status === 0)
|
|
3281
3270
|
return {
|
|
@@ -3287,51 +3276,51 @@ 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
|
-
return
|
|
3281
|
+
return nn(n, [], e.status);
|
|
3293
3282
|
} catch {
|
|
3294
|
-
return { message:
|
|
3283
|
+
return { message: ce };
|
|
3295
3284
|
}
|
|
3296
3285
|
}
|
|
3297
|
-
function
|
|
3298
|
-
const n =
|
|
3286
|
+
function Qa(e) {
|
|
3287
|
+
const n = te(e.column);
|
|
3299
3288
|
if (n !== void 0) {
|
|
3300
|
-
const s =
|
|
3289
|
+
const s = tn(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
|
-
function
|
|
3295
|
+
function Bt(e) {
|
|
3307
3296
|
return e + 2;
|
|
3308
3297
|
}
|
|
3309
|
-
const
|
|
3298
|
+
const an = "\0new", sn = "Changed by someone else since you loaded it.", Kt = "Enter a JSON object or array.", es = "The file is larger than 5 MB.";
|
|
3310
3299
|
function ts(e) {
|
|
3311
3300
|
const n = e.value;
|
|
3312
3301
|
return n !== null && typeof n == "object" && !Array.isArray(n) ? n : {};
|
|
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] = ot(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 ? "" :
|
|
3323
|
-
return { id:
|
|
3311
|
+
n[a.name] = a.default === void 0 ? "" : ot(a.type, a.default);
|
|
3312
|
+
return { id: an, 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 = rt(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 };
|
|
@@ -3344,7 +3333,7 @@ function Ws(e, n) {
|
|
|
3344
3333
|
return s > 0 ? s : void 0;
|
|
3345
3334
|
}
|
|
3346
3335
|
function Vs(e, n, a) {
|
|
3347
|
-
if (e.id ===
|
|
3336
|
+
if (e.id === an)
|
|
3348
3337
|
return a === void 0 ? { kind: "insert", value: n } : { kind: "insert", value: n, ttlSeconds: a };
|
|
3349
3338
|
const s = {
|
|
3350
3339
|
kind: "put",
|
|
@@ -3355,7 +3344,7 @@ function Vs(e, n, a) {
|
|
|
3355
3344
|
return a === void 0 ? s : { ...s, ttlSeconds: a };
|
|
3356
3345
|
}
|
|
3357
3346
|
function qs(e, n) {
|
|
3358
|
-
const a =
|
|
3347
|
+
const a = Qa(e);
|
|
3359
3348
|
return a.kind !== "cell" || !n.some((s) => s.name === a.column) ? null : { [a.column]: e.message };
|
|
3360
3349
|
}
|
|
3361
3350
|
function Hs(e) {
|
|
@@ -3366,13 +3355,13 @@ function ns(e) {
|
|
|
3366
3355
|
try {
|
|
3367
3356
|
n = JSON.parse(e);
|
|
3368
3357
|
} catch {
|
|
3369
|
-
return { ok: !1, message:
|
|
3358
|
+
return { ok: !1, message: Kt };
|
|
3370
3359
|
}
|
|
3371
|
-
return n === null || typeof n != "object" ? { ok: !1, message:
|
|
3360
|
+
return n === null || typeof n != "object" ? { ok: !1, message: Kt } : { ok: !0, value: n };
|
|
3372
3361
|
}
|
|
3373
3362
|
function zs(e, n) {
|
|
3374
3363
|
if (e === "string") return { ok: !0, value: n };
|
|
3375
|
-
const a =
|
|
3364
|
+
const a = rt(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) {
|
|
@@ -3389,8 +3378,8 @@ function Ys(e) {
|
|
|
3389
3378
|
message: `Imported ${s} row${s === 1 ? "" : "s"}.`
|
|
3390
3379
|
};
|
|
3391
3380
|
}
|
|
3392
|
-
const n =
|
|
3393
|
-
return n.row === void 0 ? { ok: !1, message: n.message } : { ok: !1, message: `${n.column ? `Line ${
|
|
3381
|
+
const n = Za(e);
|
|
3382
|
+
return n.row === void 0 ? { ok: !1, message: n.message } : { ok: !1, message: `${n.column ? `Line ${Bt(n.row)}, column ${n.column}` : `Line ${Bt(n.row)}`}: ${n.message}` };
|
|
3394
3383
|
}
|
|
3395
3384
|
function Gs({
|
|
3396
3385
|
stores: e,
|
|
@@ -3404,9 +3393,9 @@ function Gs({
|
|
|
3404
3393
|
formatSize: d,
|
|
3405
3394
|
slots: u
|
|
3406
3395
|
}) {
|
|
3407
|
-
const f = d ??
|
|
3396
|
+
const f = d ?? qt, 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,9 +3412,9 @@ 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
|
+
Ht,
|
|
3429
3418
|
{
|
|
3430
3419
|
label: "Edit",
|
|
3431
3420
|
onClick: () => o(w),
|
|
@@ -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 = rt(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, R) => R === 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) ?? ot(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,15 +3565,15 @@ 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
|
] })
|
|
3585
3574
|
] });
|
|
3586
3575
|
}
|
|
3587
|
-
function
|
|
3576
|
+
function Zs({ result: e, busy: n, onImport: a, onRefuse: s, onExport: r }) {
|
|
3588
3577
|
function o(l) {
|
|
3589
3578
|
var u;
|
|
3590
3579
|
const c = l.target, d = (u = c.files) == null ? void 0 : u[0];
|
|
@@ -3623,7 +3612,7 @@ function Qs({ result: e, busy: n, onImport: a, onRefuse: s, onExport: r }) {
|
|
|
3623
3612
|
e !== null && /* @__PURE__ */ t("div", { className: e.ok ? "w6w-result" : "w6w-result w6w-error", "data-testid": "csv-result", children: e.message })
|
|
3624
3613
|
] });
|
|
3625
3614
|
}
|
|
3626
|
-
function
|
|
3615
|
+
function Qs({
|
|
3627
3616
|
rows: e,
|
|
3628
3617
|
empty: n,
|
|
3629
3618
|
loading: a,
|
|
@@ -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
|
}
|
|
@@ -3689,7 +3678,7 @@ function Zs({
|
|
|
3689
3678
|
{
|
|
3690
3679
|
key: "value",
|
|
3691
3680
|
header: "Value",
|
|
3692
|
-
render: (w) => /* @__PURE__ */ t("span", { className: "w6w-muted w6w-small w6w-data-entry-preview", children: w.preview })
|
|
3681
|
+
render: (w) => w.copyText !== void 0 ? /* @__PURE__ */ t(tt, { value: w.copyText, label: "Copy value", className: "w6w-copyable--bare", children: /* @__PURE__ */ t("span", { className: "w6w-muted w6w-small w6w-data-entry-preview", children: w.preview }) }) : /* @__PURE__ */ t("span", { className: "w6w-muted w6w-small w6w-data-entry-preview", children: w.preview })
|
|
3693
3682
|
}
|
|
3694
3683
|
],
|
|
3695
3684
|
rows: e,
|
|
@@ -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, R = C !== void 0 && !C.ok, P = l || ($ && C && !C.ok ? C.message : null), K = /* @__PURE__ */ i(E, { children: [
|
|
3738
3727
|
n ? /* @__PURE__ */ i("label", { className: "w6w-field", children: [
|
|
3739
3728
|
/* @__PURE__ */ t("span", { children: "Key" }),
|
|
3740
3729
|
/* @__PURE__ */ t(
|
|
@@ -3752,32 +3741,33 @@ 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
|
}
|
|
3768
|
-
) : /* @__PURE__ */ t(
|
|
3757
|
+
) : /* @__PURE__ */ t(tt, { value: o, label: "Copy value", children: /* @__PURE__ */ t(
|
|
3769
3758
|
"input",
|
|
3770
3759
|
{
|
|
3760
|
+
type: "text",
|
|
3771
3761
|
"data-testid": "entry-value",
|
|
3772
3762
|
value: o,
|
|
3773
3763
|
"aria-label": "Value",
|
|
3774
3764
|
readOnly: !y,
|
|
3775
3765
|
onChange: (O) => u(O.target.value)
|
|
3776
3766
|
}
|
|
3777
|
-
),
|
|
3778
|
-
|
|
3767
|
+
) }),
|
|
3768
|
+
P && /* @__PURE__ */ t("div", { className: "w6w-field-error", role: "alert", "data-testid": "entry-value-error", children: P }),
|
|
3779
3769
|
c && /* @__PURE__ */ i("div", { className: "w6w-error", "data-testid": "entry-conflict", children: [
|
|
3780
|
-
|
|
3770
|
+
sn,
|
|
3781
3771
|
" ",
|
|
3782
3772
|
/* @__PURE__ */ t(
|
|
3783
3773
|
"button",
|
|
@@ -3785,36 +3775,36 @@ function el({
|
|
|
3785
3775
|
className: "w6w-btn w6w-btn-ghost",
|
|
3786
3776
|
type: "button",
|
|
3787
3777
|
"data-testid": "entry-reload",
|
|
3788
|
-
onClick:
|
|
3778
|
+
onClick: h,
|
|
3789
3779
|
children: "Reload"
|
|
3790
3780
|
}
|
|
3791
3781
|
)
|
|
3792
3782
|
] })
|
|
3793
3783
|
] });
|
|
3794
3784
|
return /* @__PURE__ */ i(
|
|
3795
|
-
|
|
3785
|
+
$e,
|
|
3796
3786
|
{
|
|
3797
|
-
title: n ? `New ${
|
|
3787
|
+
title: n ? `New ${T}` : y ? `Edit ${T}` : e === "doc" ? "Document" : "Entry",
|
|
3798
3788
|
subtitle: n ? void 0 : a,
|
|
3799
3789
|
size: e === "doc" ? "wide" : "default",
|
|
3800
3790
|
onClose: d ? () => {
|
|
3801
3791
|
} : w,
|
|
3802
3792
|
children: [
|
|
3803
|
-
/* @__PURE__ */ t("div", { className: "w6w-modal-body", "data-testid": "entry-editor", children:
|
|
3793
|
+
/* @__PURE__ */ t("div", { className: "w6w-modal-body", "data-testid": "entry-editor", children: K }),
|
|
3804
3794
|
/* @__PURE__ */ i("div", { className: "w6w-modal-actions", children: [
|
|
3805
|
-
!n &&
|
|
3806
|
-
|
|
3795
|
+
!n && m && /* @__PURE__ */ t(
|
|
3796
|
+
ue,
|
|
3807
3797
|
{
|
|
3808
3798
|
label: "Delete entry",
|
|
3809
3799
|
className: "w6w-data-entry-delete",
|
|
3810
3800
|
disabled: d,
|
|
3811
|
-
onClick:
|
|
3801
|
+
onClick: m
|
|
3812
3802
|
}
|
|
3813
3803
|
),
|
|
3814
3804
|
/* @__PURE__ */ t(
|
|
3815
3805
|
"button",
|
|
3816
3806
|
{
|
|
3817
|
-
ref:
|
|
3807
|
+
ref: N,
|
|
3818
3808
|
className: "w6w-btn w6w-btn-ghost",
|
|
3819
3809
|
type: "button",
|
|
3820
3810
|
disabled: d,
|
|
@@ -3829,7 +3819,7 @@ function el({
|
|
|
3829
3819
|
type: "button",
|
|
3830
3820
|
"data-testid": "entry-save",
|
|
3831
3821
|
disabled: !!c || !!d || R || n && !(s != null && s.trim()),
|
|
3832
|
-
onClick:
|
|
3822
|
+
onClick: v,
|
|
3833
3823
|
children: "Save"
|
|
3834
3824
|
}
|
|
3835
3825
|
) : /* @__PURE__ */ t(
|
|
@@ -3847,7 +3837,7 @@ function el({
|
|
|
3847
3837
|
}
|
|
3848
3838
|
);
|
|
3849
3839
|
}
|
|
3850
|
-
const
|
|
3840
|
+
const xe = (e) => e.isNew ? "new" : e.id;
|
|
3851
3841
|
function tl({
|
|
3852
3842
|
columns: e,
|
|
3853
3843
|
keyColumn: n,
|
|
@@ -3860,43 +3850,43 @@ function tl({
|
|
|
3860
3850
|
onCellChange: d,
|
|
3861
3851
|
onSave: u,
|
|
3862
3852
|
onDelete: f,
|
|
3863
|
-
onReload:
|
|
3864
|
-
onAddRow:
|
|
3853
|
+
onReload: m,
|
|
3854
|
+
onAddRow: v,
|
|
3865
3855
|
onLoadMore: w,
|
|
3866
|
-
onSearch:
|
|
3856
|
+
onSearch: h
|
|
3867
3857
|
}) {
|
|
3868
|
-
const [y, g] =
|
|
3869
|
-
|
|
3870
|
-
},
|
|
3871
|
-
...e.map((
|
|
3872
|
-
key:
|
|
3858
|
+
const [y, g] = k(l ?? ""), $ = (N) => {
|
|
3859
|
+
N.preventDefault(), h(y);
|
|
3860
|
+
}, x = [
|
|
3861
|
+
...e.map((N) => ({
|
|
3862
|
+
key: N.name,
|
|
3873
3863
|
header: /* @__PURE__ */ i(E, { children: [
|
|
3874
|
-
|
|
3864
|
+
N.name,
|
|
3875
3865
|
" ",
|
|
3876
|
-
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children:
|
|
3866
|
+
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: N.type })
|
|
3877
3867
|
] }),
|
|
3878
|
-
render: (
|
|
3868
|
+
render: (T) => {
|
|
3879
3869
|
var R;
|
|
3880
|
-
const
|
|
3870
|
+
const C = (R = T.cellErrors) == null ? void 0 : R[N.name];
|
|
3881
3871
|
return /* @__PURE__ */ i("div", { className: "w6w-data-cell", children: [
|
|
3882
3872
|
/* @__PURE__ */ t(
|
|
3883
3873
|
"input",
|
|
3884
3874
|
{
|
|
3885
|
-
"data-row":
|
|
3886
|
-
"data-column":
|
|
3887
|
-
value:
|
|
3888
|
-
readOnly:
|
|
3889
|
-
"aria-label": `${
|
|
3890
|
-
onChange: (
|
|
3875
|
+
"data-row": xe(T),
|
|
3876
|
+
"data-column": N.name,
|
|
3877
|
+
value: T.cells[N.name] ?? "",
|
|
3878
|
+
readOnly: N.name === n && !T.isNew,
|
|
3879
|
+
"aria-label": `${N.name} (${N.type})`,
|
|
3880
|
+
onChange: (P) => d(T.id, N.name, P.target.value)
|
|
3891
3881
|
}
|
|
3892
3882
|
),
|
|
3893
|
-
|
|
3883
|
+
C !== void 0 && /* @__PURE__ */ t(
|
|
3894
3884
|
"div",
|
|
3895
3885
|
{
|
|
3896
3886
|
className: "w6w-data-cell-error",
|
|
3897
|
-
"data-row":
|
|
3898
|
-
"data-column":
|
|
3899
|
-
children:
|
|
3887
|
+
"data-row": xe(T),
|
|
3888
|
+
"data-column": N.name,
|
|
3889
|
+
children: C
|
|
3900
3890
|
}
|
|
3901
3891
|
)
|
|
3902
3892
|
] });
|
|
@@ -3905,23 +3895,23 @@ function tl({
|
|
|
3905
3895
|
{
|
|
3906
3896
|
key: "actions",
|
|
3907
3897
|
header: "",
|
|
3908
|
-
render: (
|
|
3909
|
-
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children:
|
|
3898
|
+
render: (N) => /* @__PURE__ */ i("div", { className: "w6w-data-row-actions", children: [
|
|
3899
|
+
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: N.version === null ? "" : `v${N.version}` }),
|
|
3910
3900
|
/* @__PURE__ */ t(
|
|
3911
3901
|
"button",
|
|
3912
3902
|
{
|
|
3913
3903
|
className: "w6w-btn",
|
|
3914
3904
|
type: "button",
|
|
3915
|
-
"data-row":
|
|
3905
|
+
"data-row": xe(N),
|
|
3916
3906
|
"data-testid": "row-save",
|
|
3917
|
-
disabled: !
|
|
3918
|
-
onClick: () => u(
|
|
3907
|
+
disabled: !N.isNew && !N.dirty || !!N.conflict,
|
|
3908
|
+
onClick: () => u(N.id),
|
|
3919
3909
|
children: "Save"
|
|
3920
3910
|
}
|
|
3921
3911
|
),
|
|
3922
|
-
/* @__PURE__ */ t(
|
|
3923
|
-
|
|
3924
|
-
|
|
3912
|
+
/* @__PURE__ */ t(ue, { label: "Delete entry", onClick: () => f(N.id) }),
|
|
3913
|
+
N.conflict && /* @__PURE__ */ i("div", { className: "w6w-error", "data-row": xe(N), "data-testid": "row-conflict", children: [
|
|
3914
|
+
sn,
|
|
3925
3915
|
" ",
|
|
3926
3916
|
/* @__PURE__ */ t(
|
|
3927
3917
|
"button",
|
|
@@ -3929,7 +3919,7 @@ function tl({
|
|
|
3929
3919
|
className: "w6w-btn w6w-btn-ghost",
|
|
3930
3920
|
type: "button",
|
|
3931
3921
|
"data-testid": "row-reload",
|
|
3932
|
-
onClick: () =>
|
|
3922
|
+
onClick: () => m(N.id),
|
|
3933
3923
|
children: "Reload"
|
|
3934
3924
|
}
|
|
3935
3925
|
)
|
|
@@ -3939,7 +3929,7 @@ function tl({
|
|
|
3939
3929
|
];
|
|
3940
3930
|
return /* @__PURE__ */ i("div", { children: [
|
|
3941
3931
|
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:
|
|
3932
|
+
/* @__PURE__ */ i("form", { className: "w6w-data-entries-toolbar", "data-testid": "entry-search", onSubmit: $, children: [
|
|
3943
3933
|
/* @__PURE__ */ t(
|
|
3944
3934
|
"input",
|
|
3945
3935
|
{
|
|
@@ -3948,7 +3938,7 @@ function tl({
|
|
|
3948
3938
|
value: y,
|
|
3949
3939
|
placeholder: "Key prefix",
|
|
3950
3940
|
"aria-label": "Key prefix",
|
|
3951
|
-
onChange: (
|
|
3941
|
+
onChange: (N) => g(N.target.value)
|
|
3952
3942
|
}
|
|
3953
3943
|
),
|
|
3954
3944
|
/* @__PURE__ */ t("button", { className: "w6w-btn w6w-btn-ghost", type: "submit", children: "Search" }),
|
|
@@ -3958,17 +3948,17 @@ function tl({
|
|
|
3958
3948
|
className: "w6w-btn w6w-btn-ghost",
|
|
3959
3949
|
type: "button",
|
|
3960
3950
|
"data-testid": "grid-add-row",
|
|
3961
|
-
onClick:
|
|
3951
|
+
onClick: v,
|
|
3962
3952
|
children: "Add row"
|
|
3963
3953
|
}
|
|
3964
3954
|
)
|
|
3965
3955
|
] }),
|
|
3966
3956
|
/* @__PURE__ */ t("div", { className: "w6w-data-grid-scroll", "data-testid": "data-grid-scroll", children: /* @__PURE__ */ t(
|
|
3967
|
-
|
|
3957
|
+
he,
|
|
3968
3958
|
{
|
|
3969
|
-
columns:
|
|
3959
|
+
columns: x,
|
|
3970
3960
|
rows: a,
|
|
3971
|
-
rowKey: (
|
|
3961
|
+
rowKey: (N) => N.id,
|
|
3972
3962
|
empty: (
|
|
3973
3963
|
// A div, not a <p>: `empty` is any node and callers often pass a <p>.
|
|
3974
3964
|
/* @__PURE__ */ t("div", { className: "w6w-muted w6w-small", children: r ? "Loading…" : o ?? "No rows match this key prefix." })
|
|
@@ -3988,45 +3978,45 @@ function tl({
|
|
|
3988
3978
|
] });
|
|
3989
3979
|
}
|
|
3990
3980
|
export {
|
|
3991
|
-
|
|
3981
|
+
Lt as ATTENTION_DISPLAY_CAP,
|
|
3992
3982
|
hs as ActionTestForm,
|
|
3993
3983
|
sl as AddConnectionModal,
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3984
|
+
kt as ApiCallsPanel,
|
|
3985
|
+
be as ApiError,
|
|
3986
|
+
Oe as AppIcon,
|
|
3997
3987
|
ll as AppPicker,
|
|
3998
|
-
|
|
3988
|
+
Be as AuthFieldsForm,
|
|
3999
3989
|
Is as BudgetMeter,
|
|
4000
3990
|
Va as CELL_PROBLEM_COPY,
|
|
4001
3991
|
Wa as CSV_MAX_BYTES,
|
|
4002
3992
|
es as CSV_TOO_LARGE_COPY,
|
|
4003
3993
|
Rs as CallableList,
|
|
4004
3994
|
il as CanvasLayer,
|
|
4005
|
-
|
|
3995
|
+
Te as CodeBlock,
|
|
4006
3996
|
rl as CodeEditor,
|
|
4007
3997
|
Xs as ColumnsEditor,
|
|
4008
|
-
|
|
4009
|
-
|
|
3998
|
+
Tn as Combobox,
|
|
3999
|
+
An as ConfirmModal,
|
|
4010
4000
|
Os as ConnectionHeader,
|
|
4011
4001
|
Es as ConnectionList,
|
|
4012
|
-
|
|
4002
|
+
tt as Copyable,
|
|
4013
4003
|
Gn as CopyableText,
|
|
4014
4004
|
ol as CredentialPicker,
|
|
4015
|
-
|
|
4016
|
-
|
|
4005
|
+
Zs as CsvPanel,
|
|
4006
|
+
ce as DATA_STORE_ERROR_FALLBACK,
|
|
4017
4007
|
Ps as DATA_STORE_KINDS,
|
|
4018
|
-
|
|
4008
|
+
Ja as DATA_STORE_KIND_LABEL,
|
|
4019
4009
|
Xa as DATA_STORE_NETWORK_ERROR,
|
|
4020
|
-
|
|
4010
|
+
Kt as DOC_VALUE_COPY,
|
|
4021
4011
|
el as DataEntryEditor,
|
|
4022
|
-
|
|
4012
|
+
Qs as DataEntryList,
|
|
4023
4013
|
Gs as DataStoreList,
|
|
4024
|
-
|
|
4014
|
+
he as DataTable,
|
|
4025
4015
|
tl as DataTableGrid,
|
|
4026
|
-
|
|
4027
|
-
|
|
4016
|
+
ue as DeleteButton,
|
|
4017
|
+
Ht as EditButton,
|
|
4028
4018
|
_s as EditConnectionModal,
|
|
4029
|
-
|
|
4019
|
+
_e as EmptyState,
|
|
4030
4020
|
$s as ExecutionDetail,
|
|
4031
4021
|
Cs as ExecutionFilters,
|
|
4032
4022
|
xs as ExecutionList,
|
|
@@ -4036,58 +4026,58 @@ export {
|
|
|
4036
4026
|
dl as ExpressionInput,
|
|
4037
4027
|
ul as ExpressionOptionsProvider,
|
|
4038
4028
|
wl as HTML_PREVIEW_CSP,
|
|
4039
|
-
|
|
4040
|
-
|
|
4029
|
+
nt as HealthStatusPill,
|
|
4030
|
+
Ns as HistoryTimeline,
|
|
4041
4031
|
ml as HtmlPreview,
|
|
4042
|
-
|
|
4043
|
-
|
|
4032
|
+
Xe as Icon,
|
|
4033
|
+
de as IconButton,
|
|
4044
4034
|
bs as InfoTip,
|
|
4045
|
-
|
|
4035
|
+
oe as JsonEditor,
|
|
4046
4036
|
hl as LastUsedNote,
|
|
4047
|
-
|
|
4037
|
+
Ze as ListItem,
|
|
4048
4038
|
pl as Markdown,
|
|
4049
|
-
|
|
4050
|
-
|
|
4039
|
+
$e as Modal,
|
|
4040
|
+
an as NEW_ROW_ID,
|
|
4051
4041
|
fl as NodeConfigForm,
|
|
4052
|
-
|
|
4042
|
+
$n as ParamsForm,
|
|
4053
4043
|
gl as PropertyEntryForm,
|
|
4054
|
-
|
|
4044
|
+
Ma as RECENT_DISPLAY_CAP,
|
|
4055
4045
|
yl as RESULT_RENDER_MAX_CHARS,
|
|
4056
4046
|
Ua as ReliabilityChart,
|
|
4057
4047
|
As as ReliabilityList,
|
|
4058
4048
|
ks as RepoSyncIndicator,
|
|
4059
|
-
|
|
4060
|
-
|
|
4049
|
+
Ye as ResultViewer,
|
|
4050
|
+
vl as RetryPolicyFields,
|
|
4061
4051
|
Qt as SCALAR_TYPES,
|
|
4062
|
-
|
|
4052
|
+
vs as ServerResourcesBadge,
|
|
4063
4053
|
fs as ServerResourcesCard,
|
|
4064
4054
|
gs as ServerResourcesCardSmall,
|
|
4065
4055
|
ys as ServerResourcesRail,
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4056
|
+
Nl as StepBuilderModal,
|
|
4057
|
+
st as StepStatusPill,
|
|
4058
|
+
Qn as UptimeStrip,
|
|
4059
|
+
sn as VERSION_CONFLICT_COPY,
|
|
4070
4060
|
bl as W6WUIProvider,
|
|
4071
4061
|
ps as YamlEditor,
|
|
4072
|
-
|
|
4062
|
+
Js as buildRowValue,
|
|
4073
4063
|
qs as cellErrorsOf,
|
|
4074
4064
|
kl as connectionAppIdsToLookUp,
|
|
4075
4065
|
ms as createW6WApi,
|
|
4076
4066
|
Yn as cropText,
|
|
4077
4067
|
Ds as csvFilenameOf,
|
|
4078
4068
|
Ys as csvImportMessage,
|
|
4079
|
-
|
|
4069
|
+
Bt as csvLineOf,
|
|
4080
4070
|
xl as detectResultFormat,
|
|
4081
|
-
|
|
4071
|
+
js as dirtyColumns,
|
|
4082
4072
|
Da as displayBoard,
|
|
4083
4073
|
Bs as draftFromEntry,
|
|
4084
4074
|
Cl as effectiveNodeOutput,
|
|
4085
4075
|
Sl as effectiveNodeOutputs,
|
|
4086
|
-
|
|
4076
|
+
Qa as errorPlacement,
|
|
4087
4077
|
$l as filterOptions,
|
|
4088
4078
|
Tl as findTestInput,
|
|
4089
|
-
|
|
4090
|
-
|
|
4079
|
+
lt as formatDurationMs,
|
|
4080
|
+
Re as formatExecutionTime,
|
|
4091
4081
|
Al as htmlPreviewSrcDoc,
|
|
4092
4082
|
Hl as iconNames,
|
|
4093
4083
|
Rl as indexNodeSamples,
|
|
@@ -4098,32 +4088,32 @@ export {
|
|
|
4098
4088
|
Il as isTestRequired,
|
|
4099
4089
|
Hs as isVersionConflict,
|
|
4100
4090
|
zs as kvValueOf,
|
|
4101
|
-
|
|
4091
|
+
Ls as kvValueTypeOf,
|
|
4102
4092
|
Fs as locateDataStoreError,
|
|
4103
|
-
|
|
4093
|
+
Za as locateRawResponseError,
|
|
4104
4094
|
Ts as needsAttention,
|
|
4105
|
-
|
|
4106
|
-
|
|
4095
|
+
Ks as newRowDraft,
|
|
4096
|
+
rt as parseCell,
|
|
4107
4097
|
ns as parseDocText,
|
|
4108
4098
|
Pa as partitionBoard,
|
|
4109
4099
|
Ia as performancePoints,
|
|
4110
4100
|
Pl as previewNodeOutputs,
|
|
4111
4101
|
Ws as remainingTtlSeconds,
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4102
|
+
Ll as rememberableInput,
|
|
4103
|
+
Ml as requiredParamsFilled,
|
|
4104
|
+
Pn as resolveConnectionAppMeta,
|
|
4115
4105
|
Dl as resultCopyText,
|
|
4116
4106
|
ts as rowValueOf,
|
|
4117
4107
|
Vs as rowWriteOf,
|
|
4118
|
-
|
|
4108
|
+
ot as serializeCell,
|
|
4119
4109
|
Ul as shapeToSkeleton,
|
|
4120
4110
|
Fl as shouldUseCombobox,
|
|
4121
4111
|
Bl as splitFrontmatter,
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4112
|
+
Kl as startOAuthPopup,
|
|
4113
|
+
Ms as tableSchemaOf,
|
|
4114
|
+
jl as testInputSavesSettled,
|
|
4115
|
+
Jl as trackTestInputSave,
|
|
4116
|
+
La as uptimeDays,
|
|
4127
4117
|
Mn as useEnterSubmit,
|
|
4128
4118
|
Wl as useExpressionOptions,
|
|
4129
4119
|
Vl as useRememberedTestInput,
|