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