@w6w/ui 0.2.59 → 0.2.62
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 +13 -0
- package/dist/AddConnectionModal.d.ts +7 -6
- package/dist/StepBuilderModal.d.ts +16 -2
- package/dist/components/CredentialPicker.d.ts +15 -6
- package/dist/components/ExpressionOptions.d.ts +8 -0
- package/dist/{connection-app-meta-Cl6mUAMF.js → connection-app-meta-CIfXp2O-.js} +5849 -5214
- package/dist/connection-app-meta-CIfXp2O-.js.map +1 -0
- package/dist/connection-app-meta-Cn39S3ED.cjs +24 -0
- package/dist/connection-app-meta-Cn39S3ED.cjs.map +1 -0
- package/dist/credentialLinkContext.d.ts +8 -0
- package/dist/flow-loop.d.ts +7 -2
- package/dist/flow-types.d.ts +12 -0
- package/dist/flow.cjs +5 -5
- package/dist/flow.cjs.map +1 -1
- package/dist/flow.mjs +1270 -1208
- package/dist/flow.mjs.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +942 -957
- package/dist/index.mjs.map +1 -1
- package/dist/provider.d.ts +17 -0
- package/dist/resolve-params.d.ts +4 -0
- package/dist/step-preview-state.d.ts +13 -7
- package/dist/types.d.ts +6 -0
- package/package.json +1 -1
- package/src/styles/_execution-log.scss +16 -0
- package/src/styles/_tester.scss +8 -0
- package/src/styles.css +29 -0
- package/dist/connection-app-meta-CNEwLsL3.cjs +0 -24
- package/dist/connection-app-meta-CNEwLsL3.cjs.map +0 -1
- package/dist/connection-app-meta-Cl6mUAMF.js.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
var Cn = Object.defineProperty;
|
|
3
3
|
var Sn = (e, n, a) => n in e ? Cn(e, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[n] = a;
|
|
4
|
-
var
|
|
5
|
-
import { u as
|
|
6
|
-
import { bK as
|
|
7
|
-
import { jsx as t, jsxs as i, Fragment as
|
|
8
|
-
import { useMemo as
|
|
9
|
-
import { u as Bn, b as Kn, c as jn, a as
|
|
4
|
+
var Se = (e, n, a) => Sn(e, typeof n != "symbol" ? n + "" : n, a);
|
|
5
|
+
import { u as Wt, bp as $n, J as we, bH as Tn, aP as Ze, bT as Ct, aO as _e, aJ as An, V as En, bU as Rn, aE as he, M as _n, bV as On, bW as In, a_ as De, bX as Oe, bY as pe, bM as Pn, bZ as fe, b_ as Ln, b$ as Je, c0 as Mn, c1 as Dn, c2 as Un } from "./connection-app-meta-CIfXp2O-.js";
|
|
6
|
+
import { bK as al, bF as sl, aH as ll, c3 as il, c4 as rl, c5 as ol, c6 as cl, c7 as dl, aD as ul, c8 as wl, c9 as ml, b5 as hl, bO as pl, br as fl, b6 as gl, ca as yl, cb as vl, aK as Nl, cc as bl, cd as kl, ce as xl, cf as Cl, cg as Sl, ch as $l, ci as Tl, cj as Al, ao as El, ck as Rl, cl as _l, cm as Ol, cn as Il, co as Pl, cp as Ll, b4 as Ml, cq as Dl, P as Ul, cr as Fl, cs as Bl, ct as Kl, cu as jl, cv as Jl, a as Wl, b3 as Vl } from "./connection-app-meta-CIfXp2O-.js";
|
|
7
|
+
import { jsx as t, jsxs as i, Fragment as _ } from "react/jsx-runtime";
|
|
8
|
+
import { useMemo as Qe, useState as b, useEffect as Q, useId as Fn, useRef as Vt } from "react";
|
|
9
|
+
import { u as Bn, b as Kn, c as jn, a as st, I as et, C as Ie } from "./CodeBlock-CPKXSNEs.js";
|
|
10
10
|
import { i as Hl } from "./CodeBlock-CPKXSNEs.js";
|
|
11
11
|
import { yaml as Jn } from "@codemirror/lang-yaml";
|
|
12
12
|
import { EditorView as Wn } from "@codemirror/view";
|
|
13
13
|
import Vn from "@uiw/react-codemirror";
|
|
14
|
-
class
|
|
14
|
+
class $e extends Error {
|
|
15
15
|
constructor(a, s, r, o) {
|
|
16
16
|
super(r);
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
Se(this, "status");
|
|
18
|
+
Se(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
|
+
Se(this, "body");
|
|
25
25
|
this.name = "ApiError", this.status = a, this.code = s, this.body = o;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function ws(e) {
|
|
29
29
|
const n = e.baseUrl.replace(/\/$/, ""), a = e.fetch ?? globalThis.fetch, s = async () => typeof e.token == "function" ? await e.token() : e.token;
|
|
30
30
|
async function r(l, c) {
|
|
31
31
|
const d = new Headers(c == null ? void 0 : c.headers), u = await s();
|
|
@@ -33,29 +33,29 @@ function ms(e) {
|
|
|
33
33
|
let f;
|
|
34
34
|
try {
|
|
35
35
|
f = await a(`${n}${l}`, { ...c, headers: d });
|
|
36
|
-
} catch (
|
|
37
|
-
throw new
|
|
36
|
+
} catch (m) {
|
|
37
|
+
throw new $e(
|
|
38
38
|
0,
|
|
39
39
|
"network_error",
|
|
40
|
-
`Could not reach the w6w server (${(c == null ? void 0 : c.method) ?? "GET"} ${n}${l}). It may be down or unreachable. (${
|
|
40
|
+
`Could not reach the w6w server (${(c == null ? void 0 : c.method) ?? "GET"} ${n}${l}). It may be down or unreachable. (${m.message})`
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
|
-
const
|
|
43
|
+
const g = await f.text();
|
|
44
44
|
let v = null;
|
|
45
|
-
if (
|
|
45
|
+
if (g)
|
|
46
46
|
try {
|
|
47
|
-
v = JSON.parse(
|
|
47
|
+
v = JSON.parse(g);
|
|
48
48
|
} catch {
|
|
49
49
|
if (!f.ok)
|
|
50
|
-
throw new
|
|
50
|
+
throw new $e(
|
|
51
51
|
f.status,
|
|
52
52
|
"bad_response",
|
|
53
|
-
`Server returned a non-JSON ${f.status} response: ${
|
|
53
|
+
`Server returned a non-JSON ${f.status} response: ${g.slice(0, 200)}`
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
56
|
if (!f.ok) {
|
|
57
|
-
const
|
|
58
|
-
throw new
|
|
57
|
+
const m = (v == null ? void 0 : v.error) ?? {};
|
|
58
|
+
throw new $e(f.status, m.code ?? "error", m.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 $e && (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 g = c.slice(u, u + 100).map(encodeURIComponent).join(","), v = await o(`/apps?ids=${g}`);
|
|
100
100
|
d.push(...v.apps);
|
|
101
101
|
}
|
|
102
102
|
return d;
|
|
@@ -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 tt({
|
|
249
249
|
title: e,
|
|
250
250
|
subtitle: n,
|
|
251
251
|
icon: a,
|
|
@@ -255,7 +255,7 @@ function Ze({
|
|
|
255
255
|
href: l,
|
|
256
256
|
ariaLabel: c
|
|
257
257
|
}) {
|
|
258
|
-
const d = /* @__PURE__ */ i(
|
|
258
|
+
const d = /* @__PURE__ */ i(_, { 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 Ze({
|
|
|
285
285
|
}
|
|
286
286
|
) : /* @__PURE__ */ t("div", { className: u, "aria-label": c, children: d });
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function We(e) {
|
|
289
289
|
const n = Date.parse(e);
|
|
290
290
|
if (Number.isNaN(n)) return "";
|
|
291
291
|
const a = Math.max(0, Math.round((Date.now() - n) / 1e3));
|
|
@@ -297,7 +297,7 @@ function Ke(e) {
|
|
|
297
297
|
const o = Math.round(r / 24);
|
|
298
298
|
return o < 7 ? `${o}d ago` : new Date(n).toLocaleDateString();
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function St(e) {
|
|
301
301
|
const n = {};
|
|
302
302
|
for (const a of (e == null ? void 0 : e.params) ?? [])
|
|
303
303
|
a.key && a.default !== void 0 && (n[a.key] = a.default);
|
|
@@ -317,11 +317,11 @@ function qn(e) {
|
|
|
317
317
|
}
|
|
318
318
|
return e;
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function qt(e) {
|
|
321
321
|
return typeof e == "object" && e !== null && typeof e.status == "number" && typeof e.code == "string";
|
|
322
322
|
}
|
|
323
323
|
function Hn(e) {
|
|
324
|
-
if (!
|
|
324
|
+
if (!qt(e))
|
|
325
325
|
return { headline: (e == null ? void 0 : e.message) ?? "The action failed to run." };
|
|
326
326
|
const n = qn(e.message ?? ""), a = `${e.status} ${e.code} ${e.message ?? ""}`.toLowerCase();
|
|
327
327
|
return e.status === 401 || e.status === 403 || /\b(401|403)\b|forbidden|unauthorized|not authorized|permission|scope|access denied|invalid api key|invalid credential/.test(
|
|
@@ -333,11 +333,11 @@ function Hn(e) {
|
|
|
333
333
|
} : { headline: "The action returned an error.", detail: n };
|
|
334
334
|
}
|
|
335
335
|
function zn(e) {
|
|
336
|
-
const n =
|
|
336
|
+
const n = qt(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 Ve() {
|
|
340
|
+
const [e, n] = b(""), [a, s] = b(void 0), [r, o] = b(!1);
|
|
341
341
|
return { text: e, value: a, invalid: r, onChange: (c) => {
|
|
342
342
|
n(c);
|
|
343
343
|
const d = c.trim();
|
|
@@ -353,7 +353,7 @@ function je() {
|
|
|
353
353
|
}
|
|
354
354
|
} };
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function ms({
|
|
357
357
|
appId: e,
|
|
358
358
|
actions: n,
|
|
359
359
|
connectionId: a,
|
|
@@ -366,127 +366,127 @@ function hs({
|
|
|
366
366
|
onDeleted: u,
|
|
367
367
|
embedded: f = !1
|
|
368
368
|
}) {
|
|
369
|
-
var
|
|
370
|
-
const
|
|
369
|
+
var kt;
|
|
370
|
+
const g = Wt(), v = Qe(() => {
|
|
371
371
|
const p = [...n];
|
|
372
|
-
return p.sort((
|
|
373
|
-
}, [n]), [
|
|
372
|
+
return p.sort((E, B) => (E.title || E.key).localeCompare(B.title || B.key)), p;
|
|
373
|
+
}, [n]), [m, h] = b((s == null ? void 0 : s.key) ?? ""), y = s ?? n.find((p) => p.key === m) ?? null, [w, S] = b(!1), [x, N] = b(null), [T, C] = b(void 0), [R, I] = b([]), j = Ve(), O = Ve(), $ = Ve(), [W, re] = b(""), [P, q] = b(""), te = j.invalid || O.invalid || $.invalid, Y = () => {
|
|
374
374
|
const p = {};
|
|
375
|
-
return
|
|
376
|
-
}, [
|
|
377
|
-
key:
|
|
378
|
-
values:
|
|
379
|
-
})), [
|
|
380
|
-
if (
|
|
381
|
-
const p =
|
|
382
|
-
|
|
375
|
+
return j.text.trim() !== "" && j.value !== void 0 && (p.body = j.value), O.text.trim() !== "" && O.value !== void 0 && (p.query = O.value), $.text.trim() !== "" && $.value !== void 0 && (p.headers = $.value), W && (p.target = W), P.trim() !== "" && (p.match = P.trim()), Object.keys(p).length > 0 ? p : void 0;
|
|
376
|
+
}, [D, J] = b("form"), [oe, H] = b(""), [z, ce] = b(!1), [V, ve] = b(!1), U = (y == null ? void 0 : y.key) ?? null, Ne = r ? { ...r } : St(y), [ne, k] = b(() => ({
|
|
377
|
+
key: U,
|
|
378
|
+
values: Ne
|
|
379
|
+
})), [A, L] = b(l ?? null), [F, ae] = b(Ne);
|
|
380
|
+
if (ne.key !== U) {
|
|
381
|
+
const p = St(y);
|
|
382
|
+
k({ key: U, values: p }), ae(p), L(l ?? null), N(null), C(void 0), I([]);
|
|
383
383
|
}
|
|
384
|
-
const [
|
|
385
|
-
l !==
|
|
386
|
-
const [
|
|
387
|
-
if (r !==
|
|
388
|
-
const p = JSON.stringify(r ?? null) !== JSON.stringify(
|
|
384
|
+
const [M, le] = b(l);
|
|
385
|
+
l !== M && (le(l), L(l ?? null));
|
|
386
|
+
const [wt, on] = b(r);
|
|
387
|
+
if (r !== wt) {
|
|
388
|
+
const p = JSON.stringify(r ?? null) !== JSON.stringify(wt ?? null);
|
|
389
389
|
if (on(r), r && p) {
|
|
390
|
-
const
|
|
391
|
-
|
|
390
|
+
const E = { ...r };
|
|
391
|
+
k({ key: U, values: E }), ae(E), N(null), C(void 0), I([]);
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
-
const
|
|
395
|
-
() => JSON.stringify(
|
|
396
|
-
[
|
|
394
|
+
const G = ne.values, mt = (p) => k({ key: U, values: p }), ht = Qe(
|
|
395
|
+
() => JSON.stringify(G) !== JSON.stringify(F),
|
|
396
|
+
[G, F]
|
|
397
397
|
);
|
|
398
|
-
|
|
399
|
-
c == null || c(
|
|
400
|
-
}, [
|
|
398
|
+
Q(() => {
|
|
399
|
+
c == null || c(ht);
|
|
400
|
+
}, [ht]);
|
|
401
401
|
const cn = () => {
|
|
402
|
-
|
|
402
|
+
H(JSON.stringify(G, null, 2)), ce(!1), J("json");
|
|
403
403
|
}, dn = async (p) => {
|
|
404
|
-
if (!y ||
|
|
405
|
-
const
|
|
406
|
-
|
|
407
|
-
let
|
|
408
|
-
const
|
|
404
|
+
if (!y || te) return;
|
|
405
|
+
const E = y.key;
|
|
406
|
+
S(!0), N(null), C(void 0), I([]);
|
|
407
|
+
let B;
|
|
408
|
+
const ie = Y();
|
|
409
409
|
try {
|
|
410
|
-
const
|
|
410
|
+
const X = await g.invokeAction(e, E, p, {
|
|
411
411
|
connectionId: a,
|
|
412
|
-
...
|
|
412
|
+
...ie ? { overrides: ie } : {}
|
|
413
413
|
});
|
|
414
|
-
C(
|
|
415
|
-
} catch (
|
|
416
|
-
const
|
|
417
|
-
N(
|
|
414
|
+
C(X.value), I(X.apiCalls ?? []), B = { ok: !0, summary: "OK", result: X.value };
|
|
415
|
+
} catch (X) {
|
|
416
|
+
const xt = Hn(X);
|
|
417
|
+
N(xt), I(zn(X)), B = { ok: !1, summary: xt.headline };
|
|
418
418
|
} finally {
|
|
419
|
-
|
|
419
|
+
S(!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 g.recordTestRun(a, {
|
|
424
|
+
savedTestId: A ?? null,
|
|
425
|
+
actionKey: E,
|
|
426
|
+
ok: B.ok,
|
|
427
|
+
summary: B.summary.slice(0, 200),
|
|
428
|
+
result: B.result
|
|
429
|
+
}), Ke(), vn(), o == null || o();
|
|
430
430
|
} catch {
|
|
431
431
|
}
|
|
432
|
-
}, un = () => dn(
|
|
433
|
-
|
|
432
|
+
}, un = () => dn(G), [be, pt] = b(null), [ke, de] = b(null), [wn, mn] = b(0), [hn, xe] = b(!1), [Ue, Fe] = b(""), [pn, Be] = b(!1), Ke = () => mn((p) => p + 1);
|
|
433
|
+
Q(() => {
|
|
434
434
|
if (!a) {
|
|
435
|
-
|
|
435
|
+
pt(null);
|
|
436
436
|
return;
|
|
437
437
|
}
|
|
438
438
|
let p = !1;
|
|
439
|
-
return
|
|
439
|
+
return de(null), g.listSavedTests(a).then((E) => !p && pt(E)).catch((E) => !p && de(E.message)), () => {
|
|
440
440
|
p = !0;
|
|
441
441
|
};
|
|
442
|
-
}, [
|
|
443
|
-
const
|
|
444
|
-
|
|
445
|
-
const p =
|
|
442
|
+
}, [g, a, wn]);
|
|
443
|
+
const ft = U ? (be ?? []).filter((p) => p.actionKey === U) : [], [fn, je] = b(null), [gn, yn] = b(0), vn = () => yn((p) => p + 1);
|
|
444
|
+
Q(() => {
|
|
445
|
+
const p = g.listTestRuns;
|
|
446
446
|
if (!a || !p) {
|
|
447
|
-
|
|
447
|
+
je(null);
|
|
448
448
|
return;
|
|
449
449
|
}
|
|
450
|
-
let
|
|
451
|
-
return p(a).then((
|
|
452
|
-
|
|
450
|
+
let E = !1;
|
|
451
|
+
return p(a).then((B) => !E && je(B)).catch(() => !E && je(null)), () => {
|
|
452
|
+
E = !0;
|
|
453
453
|
};
|
|
454
|
-
}, [
|
|
455
|
-
const
|
|
456
|
-
!a || !y || (
|
|
454
|
+
}, [g, a, gn]);
|
|
455
|
+
const gt = U ? (fn ?? []).filter((p) => p.actionKey === U).slice().sort((p, E) => Date.parse(E.occurredAt) - Date.parse(p.occurredAt)) : [], Nn = () => {
|
|
456
|
+
!a || !y || (Fe(""), de(null), xe(!0));
|
|
457
457
|
}, bn = () => {
|
|
458
|
-
!a || !y || (
|
|
459
|
-
},
|
|
458
|
+
!a || !y || (A ? yt() : Nn());
|
|
459
|
+
}, yt = async () => {
|
|
460
460
|
if (!(!a || !y))
|
|
461
461
|
try {
|
|
462
462
|
let p;
|
|
463
|
-
if (
|
|
464
|
-
p = await
|
|
463
|
+
if (A)
|
|
464
|
+
p = await g.updateSavedTest(a, A, { values: G });
|
|
465
465
|
else {
|
|
466
|
-
const
|
|
467
|
-
if (!
|
|
468
|
-
p = await
|
|
466
|
+
const E = Ue.trim();
|
|
467
|
+
if (!E) return;
|
|
468
|
+
p = await g.createSavedTest(a, {
|
|
469
469
|
actionKey: y.key,
|
|
470
|
-
name:
|
|
471
|
-
values:
|
|
472
|
-
}),
|
|
470
|
+
name: E,
|
|
471
|
+
values: G
|
|
472
|
+
}), L(p.id);
|
|
473
473
|
}
|
|
474
|
-
|
|
474
|
+
ae({ ...G }), xe(!1), Fe(""), Ke(), o == null || o(), d == null || d(p);
|
|
475
475
|
} catch (p) {
|
|
476
|
-
|
|
476
|
+
de(p.message);
|
|
477
477
|
}
|
|
478
478
|
}, kn = (p) => {
|
|
479
|
-
const
|
|
480
|
-
|
|
479
|
+
const E = { ...p.values };
|
|
480
|
+
k({ key: U, values: E }), ae(E), L(p.id), J("form"), N(null), C(void 0), I([]);
|
|
481
481
|
}, xn = async () => {
|
|
482
|
-
if (!a || !
|
|
483
|
-
const p =
|
|
482
|
+
if (!a || !A) return;
|
|
483
|
+
const p = A;
|
|
484
484
|
try {
|
|
485
|
-
await
|
|
486
|
-
} catch (
|
|
487
|
-
|
|
485
|
+
await g.deleteSavedTest(a, p), L(null), Ke(), o == null || o(), u == null || u(p);
|
|
486
|
+
} catch (E) {
|
|
487
|
+
de(E.message);
|
|
488
488
|
}
|
|
489
|
-
},
|
|
489
|
+
}, vt = /* @__PURE__ */ i("div", { className: "w6w-stack", style: { gap: "var(--w6w-sp-1-5)" }, children: [
|
|
490
490
|
/* @__PURE__ */ i(
|
|
491
491
|
"div",
|
|
492
492
|
{
|
|
@@ -499,9 +499,9 @@ function hs({
|
|
|
499
499
|
"button",
|
|
500
500
|
{
|
|
501
501
|
type: "button",
|
|
502
|
-
className: `w6w-btn w6w-btn-sm w6w-btn-ghost${
|
|
503
|
-
"aria-pressed":
|
|
504
|
-
onClick: () =>
|
|
502
|
+
className: `w6w-btn w6w-btn-sm w6w-btn-ghost${D === "form" ? " active" : ""}`,
|
|
503
|
+
"aria-pressed": D === "form",
|
|
504
|
+
onClick: () => J("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${D === "json" ? " active" : ""}`,
|
|
513
|
+
"aria-pressed": D === "json",
|
|
514
514
|
onClick: cn,
|
|
515
515
|
children: "JSON"
|
|
516
516
|
}
|
|
@@ -520,42 +520,42 @@ function hs({
|
|
|
520
520
|
{
|
|
521
521
|
type: "button",
|
|
522
522
|
className: "w6w-btn w6w-btn-sm w6w-btn-ghost",
|
|
523
|
-
"aria-pressed":
|
|
524
|
-
title:
|
|
525
|
-
"aria-label":
|
|
526
|
-
onClick: () =>
|
|
527
|
-
children:
|
|
523
|
+
"aria-pressed": V,
|
|
524
|
+
title: V ? "Collapse the params editor" : "Open the params editor in a larger view",
|
|
525
|
+
"aria-label": V ? "Collapse the params editor" : "Open the params editor in a larger view",
|
|
526
|
+
onClick: () => ve((p) => !p),
|
|
527
|
+
children: V ? "⤡" : "⤢"
|
|
528
528
|
}
|
|
529
529
|
)
|
|
530
530
|
] })
|
|
531
531
|
]
|
|
532
532
|
}
|
|
533
533
|
),
|
|
534
|
-
|
|
534
|
+
D === "form" ? /* @__PURE__ */ t(
|
|
535
535
|
$n,
|
|
536
536
|
{
|
|
537
537
|
params: (y == null ? void 0 : y.params) ?? [],
|
|
538
|
-
values:
|
|
539
|
-
onChange:
|
|
538
|
+
values: G,
|
|
539
|
+
onChange: mt,
|
|
540
540
|
dynamic: y ? { appId: e, actionKey: y.key, connectionId: a } : void 0
|
|
541
541
|
}
|
|
542
|
-
) : /* @__PURE__ */ i(
|
|
542
|
+
) : /* @__PURE__ */ i(_, { children: [
|
|
543
543
|
/* @__PURE__ */ t(
|
|
544
|
-
|
|
544
|
+
we,
|
|
545
545
|
{
|
|
546
|
-
value:
|
|
547
|
-
onChange:
|
|
548
|
-
minHeight:
|
|
546
|
+
value: oe,
|
|
547
|
+
onChange: H,
|
|
548
|
+
minHeight: V ? "50vh" : "200px",
|
|
549
549
|
"aria-label": "Params JSON",
|
|
550
550
|
onValidChange: (p) => {
|
|
551
|
-
p !== null && typeof p == "object" && !Array.isArray(p) &&
|
|
551
|
+
p !== null && typeof p == "object" && !Array.isArray(p) && mt(p);
|
|
552
552
|
},
|
|
553
|
-
onValidityChange: ({ valid: p }) =>
|
|
553
|
+
onValidityChange: ({ valid: p }) => ce(!p)
|
|
554
554
|
}
|
|
555
555
|
),
|
|
556
|
-
|
|
556
|
+
z && /* @__PURE__ */ t("span", { className: "w6w-hint", style: { color: "var(--w6w-danger)" }, children: "Invalid JSON" })
|
|
557
557
|
] })
|
|
558
|
-
] }),
|
|
558
|
+
] }), Nt = /* @__PURE__ */ i("details", { className: "w6w-section", "data-testid": "overrides-region", children: [
|
|
559
559
|
/* @__PURE__ */ i("summary", { className: "w6w-section-summary", children: [
|
|
560
560
|
/* @__PURE__ */ t("span", { className: "w6w-section-title", children: "Overrides" }),
|
|
561
561
|
/* @__PURE__ */ t("span", { className: "w6w-section-subtitle", children: "Reach a vendor field this action's own params don't declare" })
|
|
@@ -564,20 +564,20 @@ function hs({
|
|
|
564
564
|
/* @__PURE__ */ i("div", { className: "w6w-field", children: [
|
|
565
565
|
/* @__PURE__ */ t("span", { children: "Body" }),
|
|
566
566
|
/* @__PURE__ */ t(
|
|
567
|
-
|
|
567
|
+
we,
|
|
568
568
|
{
|
|
569
|
-
value:
|
|
570
|
-
onChange:
|
|
569
|
+
value: j.text,
|
|
570
|
+
onChange: j.onChange,
|
|
571
571
|
minHeight: "80px",
|
|
572
572
|
"aria-label": "Overrides body (JSON)"
|
|
573
573
|
}
|
|
574
574
|
),
|
|
575
|
-
|
|
575
|
+
j.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
|
+
we,
|
|
581
581
|
{
|
|
582
582
|
value: O.text,
|
|
583
583
|
onChange: O.onChange,
|
|
@@ -590,15 +590,15 @@ function hs({
|
|
|
590
590
|
/* @__PURE__ */ i("div", { className: "w6w-field", children: [
|
|
591
591
|
/* @__PURE__ */ t("span", { children: "Headers" }),
|
|
592
592
|
/* @__PURE__ */ t(
|
|
593
|
-
|
|
593
|
+
we,
|
|
594
594
|
{
|
|
595
|
-
value:
|
|
596
|
-
onChange:
|
|
595
|
+
value: $.text,
|
|
596
|
+
onChange: $.onChange,
|
|
597
597
|
minHeight: "80px",
|
|
598
598
|
"aria-label": "Overrides headers (JSON)"
|
|
599
599
|
}
|
|
600
600
|
),
|
|
601
|
-
|
|
601
|
+
$.invalid && /* @__PURE__ */ t("span", { className: "w6w-hint", style: { color: "var(--w6w-danger)" }, children: "Invalid JSON" })
|
|
602
602
|
] }),
|
|
603
603
|
/* @__PURE__ */ i("label", { className: "w6w-field", children: [
|
|
604
604
|
/* @__PURE__ */ t("span", { children: "Target" }),
|
|
@@ -606,8 +606,8 @@ function hs({
|
|
|
606
606
|
"select",
|
|
607
607
|
{
|
|
608
608
|
"aria-label": "Overrides target",
|
|
609
|
-
value:
|
|
610
|
-
onChange: (p) =>
|
|
609
|
+
value: W,
|
|
610
|
+
onChange: (p) => re(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: P,
|
|
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
|
+
] }), Ce = a ? /* @__PURE__ */ i("div", { className: "w6w-stack", style: { gap: "var(--w6w-sp-1-5)" }, children: [
|
|
636
636
|
/* @__PURE__ */ t(
|
|
637
637
|
"div",
|
|
638
638
|
{
|
|
@@ -641,14 +641,14 @@ function hs({
|
|
|
641
641
|
children: /* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: "Saved tests" })
|
|
642
642
|
}
|
|
643
643
|
),
|
|
644
|
-
|
|
645
|
-
|
|
644
|
+
ke && /* @__PURE__ */ t("span", { className: "w6w-hint", style: { color: "var(--w6w-danger)" }, children: ke }),
|
|
645
|
+
ft.length === 0 ? /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "No saved tests for this action yet." }) : /* @__PURE__ */ t(
|
|
646
646
|
"ul",
|
|
647
647
|
{
|
|
648
648
|
className: "w6w-stack",
|
|
649
649
|
style: { listStyle: "none", margin: 0, padding: 0, gap: "var(--w6w-sp-1-5)" },
|
|
650
|
-
children:
|
|
651
|
-
|
|
650
|
+
children: ft.map((p) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
|
|
651
|
+
tt,
|
|
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
|
+
We(p.lastRunAt)
|
|
665
|
+
] }) : `saved ${We(p.updatedAt)}`,
|
|
666
|
+
active: p.id === A,
|
|
667
667
|
onClick: () => kn(p)
|
|
668
668
|
}
|
|
669
669
|
) }, p.id))
|
|
670
670
|
}
|
|
671
671
|
),
|
|
672
|
-
|
|
672
|
+
g.listTestRuns && gt.length > 0 && /* @__PURE__ */ i(_, { children: [
|
|
673
673
|
/* @__PURE__ */ t(
|
|
674
674
|
"div",
|
|
675
675
|
{
|
|
@@ -683,8 +683,8 @@ function hs({
|
|
|
683
683
|
{
|
|
684
684
|
className: "w6w-stack",
|
|
685
685
|
style: { listStyle: "none", margin: 0, padding: 0, gap: "var(--w6w-sp-1-5)" },
|
|
686
|
-
children:
|
|
687
|
-
|
|
686
|
+
children: gt.map((p) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
|
|
687
|
+
tt,
|
|
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,26 +693,26 @@ function hs({
|
|
|
693
693
|
] }),
|
|
694
694
|
subtitle: /* @__PURE__ */ i("span", { children: [
|
|
695
695
|
p.summary ? `${p.summary} · ` : "",
|
|
696
|
-
|
|
696
|
+
We(p.occurredAt)
|
|
697
697
|
] })
|
|
698
698
|
}
|
|
699
699
|
) }, p.id))
|
|
700
700
|
}
|
|
701
701
|
)
|
|
702
702
|
] })
|
|
703
|
-
] }) : null,
|
|
703
|
+
] }) : null, bt = (kt = be == null ? void 0 : be.find((p) => p.id === A)) == null ? void 0 : kt.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
|
+
U ? "" : " *"
|
|
711
711
|
] }),
|
|
712
712
|
/* @__PURE__ */ t(
|
|
713
713
|
Tn,
|
|
714
714
|
{
|
|
715
|
-
value:
|
|
715
|
+
value: m,
|
|
716
716
|
placeholder: "— pick an action —",
|
|
717
717
|
onChange: h,
|
|
718
718
|
options: v.map((p) => ({
|
|
@@ -723,7 +723,7 @@ function hs({
|
|
|
723
723
|
)
|
|
724
724
|
] })
|
|
725
725
|
)),
|
|
726
|
-
y ? /* @__PURE__ */ i(
|
|
726
|
+
y ? /* @__PURE__ */ i(_, { children: [
|
|
727
727
|
/* @__PURE__ */ i("div", { children: [
|
|
728
728
|
/* @__PURE__ */ i("strong", { children: [
|
|
729
729
|
y.title ?? y.key,
|
|
@@ -748,19 +748,19 @@ function hs({
|
|
|
748
748
|
children: x.detail
|
|
749
749
|
}
|
|
750
750
|
)
|
|
751
|
-
] }) : null,
|
|
751
|
+
] }) : null, E = T !== void 0 ? /* @__PURE__ */ i("div", { className: "w6w-stack", style: { gap: "var(--w6w-sp-1)" }, children: [
|
|
752
752
|
/* @__PURE__ */ t("strong", { className: "w6w-small", children: "Result" }),
|
|
753
|
-
/* @__PURE__ */ t(
|
|
754
|
-
] }) : null,
|
|
755
|
-
|
|
756
|
-
|
|
753
|
+
/* @__PURE__ */ t(Ze, { value: T })
|
|
754
|
+
] }) : null, B = /* @__PURE__ */ i("div", { className: "w6w-stack", style: { gap: "var(--w6w-sp-3)" }, children: [
|
|
755
|
+
vt,
|
|
756
|
+
Nt,
|
|
757
757
|
p,
|
|
758
|
-
|
|
759
|
-
/* @__PURE__ */ t(
|
|
760
|
-
] }),
|
|
758
|
+
E,
|
|
759
|
+
/* @__PURE__ */ t(Ct, { calls: R })
|
|
760
|
+
] }), ie = /* @__PURE__ */ i(
|
|
761
761
|
"div",
|
|
762
762
|
{
|
|
763
|
-
className: `w6w-tester-actions${f ||
|
|
763
|
+
className: `w6w-tester-actions${f || V ? " w6w-tester-actions-footer" : ""}`,
|
|
764
764
|
style: { display: "flex", gap: "var(--w6w-sp-2)" },
|
|
765
765
|
children: [
|
|
766
766
|
/* @__PURE__ */ t(
|
|
@@ -768,59 +768,59 @@ function hs({
|
|
|
768
768
|
{
|
|
769
769
|
type: "button",
|
|
770
770
|
className: "w6w-btn",
|
|
771
|
-
disabled:
|
|
771
|
+
disabled: w || te,
|
|
772
772
|
onClick: un,
|
|
773
|
-
children:
|
|
773
|
+
children: w ? "Running…" : "Run action"
|
|
774
774
|
}
|
|
775
775
|
),
|
|
776
776
|
a && /* @__PURE__ */ t("button", { type: "button", className: "w6w-btn w6w-btn-ghost", onClick: bn, children: "Save test" }),
|
|
777
|
-
a &&
|
|
777
|
+
a && A && /* @__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: () => Be(!0),
|
|
784
784
|
children: "Delete"
|
|
785
785
|
}
|
|
786
786
|
)
|
|
787
787
|
]
|
|
788
788
|
}
|
|
789
|
-
),
|
|
790
|
-
|
|
791
|
-
|
|
789
|
+
), X = /* @__PURE__ */ i("div", { className: "w6w-stack", style: { gap: "var(--w6w-sp-3)" }, children: [
|
|
790
|
+
B,
|
|
791
|
+
ie
|
|
792
792
|
] });
|
|
793
793
|
return f ? /* @__PURE__ */ i("div", { className: "w6w-tester-embedded", children: [
|
|
794
794
|
/* @__PURE__ */ t("div", { className: "w6w-tester-embedded-scroll", children: /* @__PURE__ */ i("div", { className: "w6w-card-stack", children: [
|
|
795
795
|
/* @__PURE__ */ i("div", { className: "card", children: [
|
|
796
796
|
/* @__PURE__ */ t("div", { className: "section-head", children: /* @__PURE__ */ t("h3", { children: "Parameters" }) }),
|
|
797
797
|
/* @__PURE__ */ i("div", { className: "w6w-stack", style: { gap: "var(--w6w-sp-3)" }, children: [
|
|
798
|
-
|
|
799
|
-
|
|
798
|
+
vt,
|
|
799
|
+
Nt,
|
|
800
800
|
p
|
|
801
801
|
] })
|
|
802
802
|
] }),
|
|
803
|
-
(
|
|
803
|
+
(E || R.length > 0) && /* @__PURE__ */ i("div", { className: "card", children: [
|
|
804
804
|
/* @__PURE__ */ t("div", { className: "section-head", children: /* @__PURE__ */ t("h3", { children: "Result" }) }),
|
|
805
805
|
/* @__PURE__ */ i("div", { className: "w6w-stack", style: { gap: "var(--w6w-sp-3)" }, children: [
|
|
806
|
-
T !== void 0 && /* @__PURE__ */ t(
|
|
807
|
-
/* @__PURE__ */ t(
|
|
806
|
+
T !== void 0 && /* @__PURE__ */ t(Ze, { value: T }),
|
|
807
|
+
/* @__PURE__ */ t(Ct, { calls: R })
|
|
808
808
|
] })
|
|
809
809
|
] }),
|
|
810
|
-
|
|
810
|
+
Ce && /* @__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
|
+
Ce
|
|
813
813
|
] })
|
|
814
814
|
] }) }),
|
|
815
|
-
|
|
816
|
-
] }) :
|
|
817
|
-
|
|
815
|
+
ie
|
|
816
|
+
] }) : V ? /* @__PURE__ */ t(
|
|
817
|
+
_e,
|
|
818
818
|
{
|
|
819
819
|
title: `Edit params — ${y.title ?? y.key}`,
|
|
820
|
-
onClose: () =>
|
|
820
|
+
onClose: () => ve(!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: Ce ? /* @__PURE__ */ i(
|
|
824
824
|
"div",
|
|
825
825
|
{
|
|
826
826
|
style: {
|
|
@@ -829,23 +829,23 @@ function hs({
|
|
|
829
829
|
alignItems: "flex-start"
|
|
830
830
|
},
|
|
831
831
|
children: [
|
|
832
|
-
/* @__PURE__ */ t("div", { style: { flex: 1, minWidth: 0 }, children:
|
|
833
|
-
/* @__PURE__ */ t("div", { style: { width: 260, flexShrink: 0 }, children:
|
|
832
|
+
/* @__PURE__ */ t("div", { style: { flex: 1, minWidth: 0 }, children: B }),
|
|
833
|
+
/* @__PURE__ */ t("div", { style: { width: 260, flexShrink: 0 }, children: Ce })
|
|
834
834
|
]
|
|
835
835
|
}
|
|
836
|
-
) :
|
|
837
|
-
|
|
836
|
+
) : B }),
|
|
837
|
+
ie
|
|
838
838
|
] })
|
|
839
839
|
}
|
|
840
|
-
) :
|
|
840
|
+
) : X;
|
|
841
841
|
})(),
|
|
842
|
-
hn && /* @__PURE__ */ t(
|
|
842
|
+
hn && /* @__PURE__ */ t(_e, { title: "Save test", onClose: () => xe(!1), children: /* @__PURE__ */ i(
|
|
843
843
|
"form",
|
|
844
844
|
{
|
|
845
845
|
className: "w6w-stack",
|
|
846
846
|
style: { gap: "var(--w6w-sp-3)" },
|
|
847
847
|
onSubmit: (p) => {
|
|
848
|
-
p.preventDefault(),
|
|
848
|
+
p.preventDefault(), yt();
|
|
849
849
|
},
|
|
850
850
|
children: [
|
|
851
851
|
/* @__PURE__ */ i("label", { className: "w6w-field", children: [
|
|
@@ -854,13 +854,13 @@ function hs({
|
|
|
854
854
|
"input",
|
|
855
855
|
{
|
|
856
856
|
type: "text",
|
|
857
|
-
value:
|
|
857
|
+
value: Ue,
|
|
858
858
|
placeholder: "e.g. valid sender",
|
|
859
|
-
onChange: (p) =>
|
|
859
|
+
onChange: (p) => Fe(p.target.value)
|
|
860
860
|
}
|
|
861
861
|
)
|
|
862
862
|
] }),
|
|
863
|
-
|
|
863
|
+
ke && /* @__PURE__ */ t("span", { className: "w6w-hint", style: { color: "var(--w6w-danger)" }, children: ke }),
|
|
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: () => xe(!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: !Ue.trim(), children: "Save" })
|
|
879
879
|
]
|
|
880
880
|
}
|
|
881
881
|
)
|
|
@@ -886,19 +886,19 @@ function hs({
|
|
|
886
886
|
An,
|
|
887
887
|
{
|
|
888
888
|
title: "Delete saved test",
|
|
889
|
-
message:
|
|
889
|
+
message: bt ? `Delete "${bt}"? This cannot be undone.` : "Delete this saved test? This cannot be undone.",
|
|
890
890
|
confirmLabel: "Delete",
|
|
891
891
|
onConfirm: () => {
|
|
892
|
-
|
|
892
|
+
Be(!1), xn();
|
|
893
893
|
},
|
|
894
|
-
onClose: () =>
|
|
894
|
+
onClose: () => Be(!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
|
-
function
|
|
901
|
-
const n = En(e.theme), { copied: a, copy: s } = Bn(e.value), r =
|
|
900
|
+
function hs(e) {
|
|
901
|
+
const n = En(e.theme), { copied: a, copy: s } = Bn(e.value), r = Qe(() => [Jn(), Wn.theme(Rn)], []);
|
|
902
902
|
function o(l) {
|
|
903
903
|
e.onChange(l);
|
|
904
904
|
}
|
|
@@ -926,7 +926,7 @@ function ps(e) {
|
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
928
|
),
|
|
929
|
-
e.copyable !== !1 && /* @__PURE__ */ i(
|
|
929
|
+
e.copyable !== !1 && /* @__PURE__ */ i(_, { children: [
|
|
930
930
|
/* @__PURE__ */ t(
|
|
931
931
|
"button",
|
|
932
932
|
{
|
|
@@ -941,19 +941,19 @@ function ps(e) {
|
|
|
941
941
|
] })
|
|
942
942
|
] });
|
|
943
943
|
}
|
|
944
|
-
const
|
|
944
|
+
const qe = "…";
|
|
945
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 `${qe}${e.slice(e.length - n)}`;
|
|
949
949
|
if (a === "end")
|
|
950
|
-
return `${e.slice(0, n)}${
|
|
950
|
+
return `${e.slice(0, n)}${qe}`;
|
|
951
951
|
const s = Math.ceil(n / 2), r = n - s;
|
|
952
|
-
return `${e.slice(0, s)}${
|
|
952
|
+
return `${e.slice(0, s)}${qe}${e.slice(e.length - r)}`;
|
|
953
953
|
}
|
|
954
954
|
function Gn(e) {
|
|
955
955
|
const { value: n, chars: a, crop: s = "end", label: r, className: o, copiedMs: l } = e, c = Yn(n, a, s), d = ["w6w-copyable--bare", o].filter(Boolean).join(" ");
|
|
956
|
-
return /* @__PURE__ */ t(
|
|
956
|
+
return /* @__PURE__ */ t(st, { value: n, readOnly: !0, label: r, className: d, copiedMs: l, children: /* @__PURE__ */ t("span", { children: c }) });
|
|
957
957
|
}
|
|
958
958
|
const Xn = {
|
|
959
959
|
ok: "Operational",
|
|
@@ -961,7 +961,7 @@ const Xn = {
|
|
|
961
961
|
down: "Down",
|
|
962
962
|
unknown: "Unknown"
|
|
963
963
|
};
|
|
964
|
-
function
|
|
964
|
+
function lt({ state: e, label: n, ariaLabel: a }) {
|
|
965
965
|
const s = n ?? Xn[e];
|
|
966
966
|
return /* @__PURE__ */ i("span", { className: `w6w-health-pill w6w-health-pill-${e}`, "aria-label": a, children: [
|
|
967
967
|
/* @__PURE__ */ t("span", { className: "w6w-health-pill-dot", "aria-hidden": "true" }),
|
|
@@ -992,24 +992,24 @@ function Qn({ days: e, ariaLabel: n }) {
|
|
|
992
992
|
}
|
|
993
993
|
);
|
|
994
994
|
}
|
|
995
|
-
const
|
|
996
|
-
function
|
|
997
|
-
if (e === null || !Number.isFinite(e)) return
|
|
995
|
+
const Ht = "—", $t = ["B", "KiB", "MiB", "GiB", "TiB", "PiB"];
|
|
996
|
+
function zt(e) {
|
|
997
|
+
if (e === null || !Number.isFinite(e)) return Ht;
|
|
998
998
|
if (e < 1024) return `${Math.round(e)} B`;
|
|
999
999
|
let n = e, a = 0;
|
|
1000
|
-
for (; n >= 1024 && a <
|
|
1000
|
+
for (; n >= 1024 && a < $t.length - 1; )
|
|
1001
1001
|
n /= 1024, a += 1;
|
|
1002
|
-
return `${n.toFixed(1)} ${
|
|
1002
|
+
return `${n.toFixed(1)} ${$t[a]}`;
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1005
|
-
return e === null || !Number.isFinite(e) ?
|
|
1004
|
+
function ee(e) {
|
|
1005
|
+
return e === null || !Number.isFinite(e) ? Ht : `${Math.round(e * 100)}%`;
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1007
|
+
function ge(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 ye(e) {
|
|
1013
1013
|
if (e === void 0) return null;
|
|
1014
1014
|
const { memoryTotal: n, memoryAvailable: a } = e;
|
|
1015
1015
|
return n === null || a === null || n <= 0 ? null : (n - a) / n;
|
|
@@ -1029,18 +1029,18 @@ function ta(e, n, a, s) {
|
|
|
1029
1029
|
}
|
|
1030
1030
|
return o.join(" ");
|
|
1031
1031
|
}
|
|
1032
|
-
const na = "—",
|
|
1033
|
-
function
|
|
1032
|
+
const na = "—", Tt = 100, At = 24;
|
|
1033
|
+
function nt({
|
|
1034
1034
|
values: e,
|
|
1035
1035
|
max: n,
|
|
1036
1036
|
className: a
|
|
1037
1037
|
}) {
|
|
1038
|
-
const s = ta(e,
|
|
1038
|
+
const s = ta(e, Tt, At, n);
|
|
1039
1039
|
return s === "" ? null : /* @__PURE__ */ t(
|
|
1040
1040
|
"svg",
|
|
1041
1041
|
{
|
|
1042
1042
|
className: a,
|
|
1043
|
-
viewBox: `0 0 ${
|
|
1043
|
+
viewBox: `0 0 ${Tt} ${At}`,
|
|
1044
1044
|
preserveAspectRatio: "none",
|
|
1045
1045
|
"aria-hidden": "true",
|
|
1046
1046
|
focusable: "false",
|
|
@@ -1057,15 +1057,15 @@ function Qe({
|
|
|
1057
1057
|
}
|
|
1058
1058
|
);
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1060
|
+
function He(e) {
|
|
1061
1061
|
return e === null ? na : e.toFixed(2);
|
|
1062
1062
|
}
|
|
1063
|
-
function
|
|
1063
|
+
function Pe(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 Ee({
|
|
1069
1069
|
label: e,
|
|
1070
1070
|
value: n,
|
|
1071
1071
|
values: a,
|
|
@@ -1074,96 +1074,96 @@ function Ce({
|
|
|
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(nt, { 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 it(e) {
|
|
1081
|
+
const n = e[e.length - 1], a = e.map((o) => ge(o)), s = e.map((o) => ye(o)), r = e.map((o) => o.processRss);
|
|
1082
1082
|
return { last: n, cpuValues: a, memoryValues: s, rssValues: r };
|
|
1083
1083
|
}
|
|
1084
|
-
function
|
|
1084
|
+
function ps({
|
|
1085
1085
|
samples: e,
|
|
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 } = it(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
|
+
Ee,
|
|
1095
1095
|
{
|
|
1096
1096
|
label: "CPU",
|
|
1097
|
-
value:
|
|
1097
|
+
value: ee(ge(s)),
|
|
1098
1098
|
values: r,
|
|
1099
|
-
max:
|
|
1099
|
+
max: Pe(r)
|
|
1100
1100
|
}
|
|
1101
1101
|
),
|
|
1102
1102
|
/* @__PURE__ */ t(
|
|
1103
|
-
|
|
1103
|
+
Ee,
|
|
1104
1104
|
{
|
|
1105
1105
|
label: "Memory",
|
|
1106
|
-
value:
|
|
1106
|
+
value: ee(ye(s)),
|
|
1107
1107
|
values: o,
|
|
1108
1108
|
max: 1
|
|
1109
1109
|
}
|
|
1110
1110
|
),
|
|
1111
1111
|
/* @__PURE__ */ t(
|
|
1112
|
-
|
|
1112
|
+
Ee,
|
|
1113
1113
|
{
|
|
1114
1114
|
label: "Process",
|
|
1115
|
-
value:
|
|
1115
|
+
value: zt((s == null ? void 0 : s.processRss) ?? null),
|
|
1116
1116
|
values: l,
|
|
1117
|
-
max:
|
|
1117
|
+
max: Pe(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 ${He((s == null ? void 0 : s.load1) ?? null)} / ${He((s == null ? void 0 : s.load5) ?? null)} / ${He(
|
|
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
|
-
function
|
|
1128
|
-
const { last: a, cpuValues: s } =
|
|
1127
|
+
function fs({ samples: e, title: n = "Server" }) {
|
|
1128
|
+
const { last: a, cpuValues: s } = it(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
|
+
Ee,
|
|
1134
1134
|
{
|
|
1135
1135
|
label: "CPU",
|
|
1136
|
-
value:
|
|
1136
|
+
value: ee(ge(a)),
|
|
1137
1137
|
values: s,
|
|
1138
|
-
max:
|
|
1138
|
+
max: Pe(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: ee(ye(a)) })
|
|
1144
1144
|
] })
|
|
1145
1145
|
] })
|
|
1146
1146
|
] });
|
|
1147
1147
|
}
|
|
1148
|
-
function
|
|
1149
|
-
const { last: a, cpuValues: s, memoryValues: r } =
|
|
1148
|
+
function gs({ samples: e, onExpand: n }) {
|
|
1149
|
+
const { last: a, cpuValues: s, memoryValues: r } = it(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: ee(ge(a)) }),
|
|
1154
1154
|
/* @__PURE__ */ t(
|
|
1155
|
-
|
|
1155
|
+
nt,
|
|
1156
1156
|
{
|
|
1157
1157
|
className: "w6w-server-resources__spark",
|
|
1158
1158
|
values: s,
|
|
1159
|
-
max:
|
|
1159
|
+
max: Pe(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: ee(ye(a)) }),
|
|
1166
|
+
/* @__PURE__ */ t(nt, { className: "w6w-server-resources__spark", values: r, max: 1 })
|
|
1167
1167
|
] }),
|
|
1168
1168
|
n !== void 0 && /* @__PURE__ */ t(
|
|
1169
1169
|
"button",
|
|
@@ -1177,8 +1177,8 @@ function ys({ samples: e, onExpand: n }) {
|
|
|
1177
1177
|
)
|
|
1178
1178
|
] });
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1181
|
-
const n = e[e.length - 1], a =
|
|
1180
|
+
function ys({ samples: e }) {
|
|
1181
|
+
const n = e[e.length - 1], a = ee(ge(n)), s = ee(ye(n));
|
|
1182
1182
|
return /* @__PURE__ */ t("span", { className: "w6w-server-resources w6w-server-resources--badge", children: `CPU ${a} · MEM ${s}` });
|
|
1183
1183
|
}
|
|
1184
1184
|
const aa = 1, sa = 1440 * 60 * 1e3;
|
|
@@ -1187,8 +1187,8 @@ function la(e, n, a) {
|
|
|
1187
1187
|
if (s === void 0) return null;
|
|
1188
1188
|
const r = Date.parse(s), o = n.resolvedAt !== void 0 ? Date.parse(n.resolvedAt) : n.startedAt !== void 0 ? a : r, l = Date.parse(`${e.from}T00:00:00.000Z`), c = Date.parse(`${e.to}T00:00:00.000Z`) + sa, d = c - l;
|
|
1189
1189
|
if (o < l || r >= c) return null;
|
|
1190
|
-
const u = r < l, f = o > c,
|
|
1191
|
-
return { leftPct:
|
|
1190
|
+
const u = r < l, f = o > c, g = Math.max(r, l), v = Math.min(o, c), m = (g - l) / d * 100, h = (v - g) / d * 100, y = Math.max(h, aa);
|
|
1191
|
+
return { leftPct: m, widthPct: y, clippedStart: u, clippedEnd: f };
|
|
1192
1192
|
}
|
|
1193
1193
|
const ia = {
|
|
1194
1194
|
ok: "Operational",
|
|
@@ -1202,7 +1202,7 @@ function ca(e) {
|
|
|
1202
1202
|
e.resolvedAt !== void 0 ? `${n} – ${e.resolvedAt}` : `${n} – ongoing`
|
|
1203
1203
|
), a.join(" ");
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1205
|
+
function vs({
|
|
1206
1206
|
window: e,
|
|
1207
1207
|
days: n,
|
|
1208
1208
|
incidents: a,
|
|
@@ -1222,17 +1222,17 @@ function Ns({
|
|
|
1222
1222
|
`${u.day}-${f}`
|
|
1223
1223
|
)) }),
|
|
1224
1224
|
/* @__PURE__ */ t("div", { className: "w6w-history-lane w6w-history-lane-vendor", children: d !== null ? /* @__PURE__ */ t("span", { className: "w6w-history-empty", title: d, children: d }) : a == null ? void 0 : a.map((u, f) => {
|
|
1225
|
-
const
|
|
1226
|
-
if (
|
|
1225
|
+
const g = la(e, u, r);
|
|
1226
|
+
if (g === null) return null;
|
|
1227
1227
|
const v = [
|
|
1228
|
-
|
|
1229
|
-
|
|
1228
|
+
g.clippedStart ? "w6w-history-bar-clip-start" : "",
|
|
1229
|
+
g.clippedEnd ? "w6w-history-bar-clip-end" : ""
|
|
1230
1230
|
].filter(Boolean).join(" ");
|
|
1231
1231
|
return /* @__PURE__ */ t(
|
|
1232
1232
|
"span",
|
|
1233
1233
|
{
|
|
1234
1234
|
className: `w6w-history-bar w6w-history-bar-${u.state}${v ? ` ${v}` : ""}`,
|
|
1235
|
-
style: { left: `${
|
|
1235
|
+
style: { left: `${g.leftPct}%`, width: `${g.widthPct}%` },
|
|
1236
1236
|
title: ca(u)
|
|
1237
1237
|
},
|
|
1238
1238
|
u.id ?? `${u.title}-${f}`
|
|
@@ -1244,11 +1244,11 @@ function Ns({
|
|
|
1244
1244
|
] })
|
|
1245
1245
|
] }) });
|
|
1246
1246
|
}
|
|
1247
|
-
function
|
|
1248
|
-
const [s, r] =
|
|
1247
|
+
function Ns({ label: e, children: n, className: a }) {
|
|
1248
|
+
const [s, r] = b(!1), o = Fn();
|
|
1249
1249
|
return /* @__PURE__ */ i("span", { className: ["w6w-info-tip", a ?? ""].filter(Boolean).join(" "), children: [
|
|
1250
1250
|
/* @__PURE__ */ t(
|
|
1251
|
-
|
|
1251
|
+
he,
|
|
1252
1252
|
{
|
|
1253
1253
|
label: e,
|
|
1254
1254
|
icon: "info",
|
|
@@ -1260,10 +1260,10 @@ function bs({ label: e, children: n, className: a }) {
|
|
|
1260
1260
|
s && /* @__PURE__ */ t("span", { id: o, className: "w6w-info-tip-body w6w-muted w6w-small", children: n })
|
|
1261
1261
|
] });
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1263
|
+
function Yt(e) {
|
|
1264
1264
|
const { label: n, onClick: a, disabled: s, className: r, ...o } = e;
|
|
1265
1265
|
return /* @__PURE__ */ t(
|
|
1266
|
-
|
|
1266
|
+
he,
|
|
1267
1267
|
{
|
|
1268
1268
|
label: n,
|
|
1269
1269
|
onClick: a,
|
|
@@ -1274,15 +1274,15 @@ function Ht(e) {
|
|
|
1274
1274
|
}
|
|
1275
1275
|
);
|
|
1276
1276
|
}
|
|
1277
|
-
function
|
|
1278
|
-
const { branch: n, shortSha: a, lastSyncLabel: s, onSyncNow: r, syncing: o, className: l, ...c } = e, [d, u] =
|
|
1279
|
-
return
|
|
1277
|
+
function bs(e) {
|
|
1278
|
+
const { branch: n, shortSha: a, lastSyncLabel: s, onSyncNow: r, syncing: o, className: l, ...c } = e, [d, u] = b(!1), f = Vt(null);
|
|
1279
|
+
return Q(() => {
|
|
1280
1280
|
if (!d) return;
|
|
1281
|
-
const
|
|
1282
|
-
f.current && !f.current.contains(
|
|
1283
|
-
}, v = (
|
|
1284
|
-
return document.addEventListener("mousedown",
|
|
1285
|
-
document.removeEventListener("mousedown",
|
|
1281
|
+
const g = (m) => {
|
|
1282
|
+
f.current && !f.current.contains(m.target) && u(!1);
|
|
1283
|
+
}, v = (m) => m.key === "Escape" && u(!1);
|
|
1284
|
+
return document.addEventListener("mousedown", g), document.addEventListener("keydown", v), () => {
|
|
1285
|
+
document.removeEventListener("mousedown", g), document.removeEventListener("keydown", v);
|
|
1286
1286
|
};
|
|
1287
1287
|
}, [d]), /* @__PURE__ */ i(
|
|
1288
1288
|
"div",
|
|
@@ -1299,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((g) => !g),
|
|
1303
1303
|
children: [
|
|
1304
1304
|
/* @__PURE__ */ i("span", { className: "w6w-repo-sync-icon", children: [
|
|
1305
|
-
/* @__PURE__ */ t(
|
|
1306
|
-
o && /* @__PURE__ */ t(
|
|
1305
|
+
/* @__PURE__ */ t(et, { name: "github" }),
|
|
1306
|
+
o && /* @__PURE__ */ t(et, { name: "sync", size: 10, className: "w6w-repo-sync-spin" })
|
|
1307
1307
|
] }),
|
|
1308
1308
|
/* @__PURE__ */ t("span", { className: "w6w-repo-sync-branch", children: n }),
|
|
1309
1309
|
a != null && /* @__PURE__ */ t("code", { className: "w6w-repo-sync-sha", children: a })
|
|
@@ -1342,18 +1342,18 @@ const da = {
|
|
|
1342
1342
|
queued: "Queued",
|
|
1343
1343
|
canceled: "Canceled"
|
|
1344
1344
|
};
|
|
1345
|
-
function
|
|
1345
|
+
function rt({ state: e, label: n, ariaLabel: a }) {
|
|
1346
1346
|
const s = n ?? da[e];
|
|
1347
1347
|
return /* @__PURE__ */ i("span", { className: `w6w-step-pill w6w-step-pill-${e}`, "aria-label": a, children: [
|
|
1348
1348
|
/* @__PURE__ */ t("span", { className: "w6w-step-pill-dot", "aria-hidden": "true" }),
|
|
1349
1349
|
/* @__PURE__ */ t("span", { className: "w6w-step-pill-label", children: s })
|
|
1350
1350
|
] });
|
|
1351
1351
|
}
|
|
1352
|
-
const ua = "—",
|
|
1353
|
-
function
|
|
1354
|
-
return e == null || !Number.isFinite(e) || e < 0 ? ua : e <
|
|
1352
|
+
const ua = "—", ze = 1e3, Ye = 6e4;
|
|
1353
|
+
function ot(e) {
|
|
1354
|
+
return e == null || !Number.isFinite(e) || e < 0 ? ua : e < ze ? `${Math.round(e)} ms` : e < Ye ? `${(e / ze).toFixed(1)} s` : `${Math.floor(e / Ye)}m ${Math.round(e % Ye / ze)}s`;
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1356
|
+
function Le(e) {
|
|
1357
1357
|
const n = new Date(e);
|
|
1358
1358
|
return Number.isNaN(n.getTime()) ? e : n.toLocaleString(void 0, { dateStyle: "medium", timeStyle: "short" });
|
|
1359
1359
|
}
|
|
@@ -1368,12 +1368,12 @@ const wa = {
|
|
|
1368
1368
|
event: "Event",
|
|
1369
1369
|
replay: "Replay"
|
|
1370
1370
|
};
|
|
1371
|
-
function
|
|
1371
|
+
function Et(e) {
|
|
1372
1372
|
if (!e.trigger) return null;
|
|
1373
1373
|
const n = ma[e.trigger] ?? e.trigger;
|
|
1374
1374
|
return e.triggerNodeId ? `${n} · ${e.triggerNodeId}` : n;
|
|
1375
1375
|
}
|
|
1376
|
-
function
|
|
1376
|
+
function ks({
|
|
1377
1377
|
items: e,
|
|
1378
1378
|
selectedId: n = null,
|
|
1379
1379
|
onSelect: a,
|
|
@@ -1385,7 +1385,7 @@ function xs({
|
|
|
1385
1385
|
onPrev: d,
|
|
1386
1386
|
onNext: u,
|
|
1387
1387
|
onRerun: f,
|
|
1388
|
-
rerunningId:
|
|
1388
|
+
rerunningId: g = null
|
|
1389
1389
|
}) {
|
|
1390
1390
|
const v = d || u ? /* @__PURE__ */ i("div", { className: "w6w-execution-list-pager", children: [
|
|
1391
1391
|
/* @__PURE__ */ t(
|
|
@@ -1411,14 +1411,14 @@ function xs({
|
|
|
1411
1411
|
}
|
|
1412
1412
|
)
|
|
1413
1413
|
] }) : null;
|
|
1414
|
-
let
|
|
1415
|
-
return r && e.length === 0 ?
|
|
1414
|
+
let m;
|
|
1415
|
+
return r && e.length === 0 ? m = /* @__PURE__ */ t("p", { "data-testid": "execution-list-loading", children: "Loading…" }) : e.length === 0 ? m = /* @__PURE__ */ t("p", { "data-testid": "execution-list-empty", children: o ?? "No executions yet." }) : m = /* @__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
|
+
tt,
|
|
1418
1418
|
{
|
|
1419
|
-
icon: /* @__PURE__ */ t(
|
|
1420
|
-
title: /* @__PURE__ */ i(
|
|
1421
|
-
s ? h.callableName :
|
|
1419
|
+
icon: /* @__PURE__ */ t(rt, { state: h.status }),
|
|
1420
|
+
title: /* @__PURE__ */ i(_, { children: [
|
|
1421
|
+
s ? h.callableName : Le(h.startedAt),
|
|
1422
1422
|
h.rerunOf && /* @__PURE__ */ t(
|
|
1423
1423
|
"span",
|
|
1424
1424
|
{
|
|
@@ -1429,10 +1429,10 @@ function xs({
|
|
|
1429
1429
|
}
|
|
1430
1430
|
)
|
|
1431
1431
|
] }),
|
|
1432
|
-
subtitle: /* @__PURE__ */ i(
|
|
1433
|
-
s ? `${wa[h.kind]} · ${
|
|
1434
|
-
|
|
1435
|
-
h.inputPreview && /* @__PURE__ */ i(
|
|
1432
|
+
subtitle: /* @__PURE__ */ i(_, { children: [
|
|
1433
|
+
s ? `${wa[h.kind]} · ${Le(h.startedAt)}` : h.id,
|
|
1434
|
+
Et(h) && /* @__PURE__ */ t("span", { className: "w6w-execution-trigger", "data-testid": "execution-row-trigger", children: ` · ${Et(h)}` }),
|
|
1435
|
+
h.inputPreview && /* @__PURE__ */ i(_, { children: [
|
|
1436
1436
|
" · ",
|
|
1437
1437
|
/* @__PURE__ */ t(
|
|
1438
1438
|
"code",
|
|
@@ -1445,25 +1445,25 @@ function xs({
|
|
|
1445
1445
|
)
|
|
1446
1446
|
] })
|
|
1447
1447
|
] }),
|
|
1448
|
-
trailing:
|
|
1448
|
+
trailing: ot(h.durationMs),
|
|
1449
1449
|
active: h.id === n,
|
|
1450
1450
|
onClick: a ? () => a(h.id) : void 0
|
|
1451
1451
|
}
|
|
1452
1452
|
),
|
|
1453
1453
|
f && /* @__PURE__ */ t(
|
|
1454
|
-
|
|
1454
|
+
he,
|
|
1455
1455
|
{
|
|
1456
1456
|
icon: "sync",
|
|
1457
1457
|
label: "Re-run",
|
|
1458
|
-
title: h.id ===
|
|
1458
|
+
title: h.id === g ? "Re-running…" : "Re-run with the same input",
|
|
1459
1459
|
className: "w6w-execution-list-rerun",
|
|
1460
1460
|
"data-testid": "execution-row-rerun",
|
|
1461
|
-
disabled:
|
|
1461
|
+
disabled: g !== null,
|
|
1462
1462
|
onClick: () => f(h.id)
|
|
1463
1463
|
}
|
|
1464
1464
|
)
|
|
1465
1465
|
] }, h.id)) }), /* @__PURE__ */ i("div", { className: "w6w-execution-list", "data-testid": "execution-list", children: [
|
|
1466
|
-
|
|
1466
|
+
m,
|
|
1467
1467
|
v
|
|
1468
1468
|
] });
|
|
1469
1469
|
}
|
|
@@ -1475,7 +1475,7 @@ function ha(e) {
|
|
|
1475
1475
|
actionName: e.actionName ?? (n == null ? void 0 : n.label) ?? e.action
|
|
1476
1476
|
};
|
|
1477
1477
|
}
|
|
1478
|
-
function
|
|
1478
|
+
function Gt(e) {
|
|
1479
1479
|
const n = (a) => {
|
|
1480
1480
|
for (const s of [a.startedAt, a.finishedAt]) {
|
|
1481
1481
|
const r = Date.parse(s ?? "");
|
|
@@ -1492,30 +1492,30 @@ function pa({
|
|
|
1492
1492
|
runError: s,
|
|
1493
1493
|
stepErrors: r
|
|
1494
1494
|
}) {
|
|
1495
|
-
const o = a ? /* @__PURE__ */ t("div", { className: "w6w-execution-log-head", children: /* @__PURE__ */ t(
|
|
1496
|
-
s && /* @__PURE__ */ t(
|
|
1497
|
-
l.map((
|
|
1498
|
-
|
|
1495
|
+
const o = a ? /* @__PURE__ */ t("div", { className: "w6w-execution-log-head", children: /* @__PURE__ */ t(he, { 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(at, { error: s }),
|
|
1497
|
+
l.map((g, v) => /* @__PURE__ */ t(
|
|
1498
|
+
at,
|
|
1499
1499
|
{
|
|
1500
|
-
label:
|
|
1501
|
-
error:
|
|
1500
|
+
label: g.label ?? g.stepId,
|
|
1501
|
+
error: g.error
|
|
1502
1502
|
},
|
|
1503
|
-
`${
|
|
1503
|
+
`${g.stepId}:${v}`
|
|
1504
1504
|
))
|
|
1505
|
-
] }) : null, d =
|
|
1506
|
-
return d.length === 0 ? /* @__PURE__ */ i(
|
|
1505
|
+
] }) : null, d = Gt(e.filter((g) => !Rt(g))), u = e.filter(Rt), f = u.length > 0 ? /* @__PURE__ */ t(ga, { steps: u }) : null;
|
|
1506
|
+
return d.length === 0 ? /* @__PURE__ */ i(_, { 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(_, { children: [
|
|
1512
1512
|
o,
|
|
1513
1513
|
c,
|
|
1514
|
-
/* @__PURE__ */ t("ol", { className: "w6w-execution-log", children: d.map((
|
|
1514
|
+
/* @__PURE__ */ t("ol", { className: "w6w-execution-log", children: d.map((g) => /* @__PURE__ */ t(Xt, { step: g }, g.id)) }),
|
|
1515
1515
|
f
|
|
1516
1516
|
] });
|
|
1517
1517
|
}
|
|
1518
|
-
const
|
|
1518
|
+
const Rt = (e) => e.status === "skipped" && e.skipReason === "not_on_path", fa = {
|
|
1519
1519
|
condition: "condition false",
|
|
1520
1520
|
stopped: "run stopped",
|
|
1521
1521
|
disabled: "disabled"
|
|
@@ -1527,94 +1527,106 @@ function ga({ steps: e }) {
|
|
|
1527
1527
|
/* @__PURE__ */ t("ul", { className: "w6w-muted w6w-small", children: e.map((a) => /* @__PURE__ */ t("li", { children: a.label ?? a.id }, a.id)) })
|
|
1528
1528
|
] });
|
|
1529
1529
|
}
|
|
1530
|
-
function
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1530
|
+
function Xt({
|
|
1531
|
+
step: e,
|
|
1532
|
+
defaultOpen: n = !1
|
|
1533
|
+
}) {
|
|
1534
|
+
var u, f;
|
|
1535
|
+
const [a, s] = b(n), r = e.node ? ha(e.node) : null, o = /* @__PURE__ */ i("div", { className: "w6w-execution-log-row-header", children: [
|
|
1536
|
+
/* @__PURE__ */ t(rt, { state: e.status }),
|
|
1537
|
+
r && /* @__PURE__ */ t(
|
|
1535
1538
|
"span",
|
|
1536
1539
|
{
|
|
1537
|
-
className: `w6w-execution-log-kind${
|
|
1540
|
+
className: `w6w-execution-log-kind${r.trigger ? " w6w-execution-log-kind-trigger" : ""}`,
|
|
1538
1541
|
"data-testid": "execution-log-kind",
|
|
1539
|
-
children:
|
|
1542
|
+
children: r.trigger ? "Trigger" : "Node"
|
|
1540
1543
|
}
|
|
1541
1544
|
),
|
|
1542
1545
|
/* @__PURE__ */ i("span", { className: "w6w-execution-log-row-title", children: [
|
|
1543
1546
|
/* @__PURE__ */ t("span", { className: "w6w-execution-log-row-label", children: e.label ?? e.id }),
|
|
1544
|
-
|
|
1547
|
+
r && /* @__PURE__ */ t("span", { className: "w6w-execution-log-row-uses", "data-testid": "execution-log-uses", children: r.appName === r.actionName ? r.appName : `${r.appName} · ${r.actionName}` })
|
|
1545
1548
|
] }),
|
|
1546
1549
|
e.status === "skipped" && e.skipReason && e.skipReason !== "not_on_path" && /* @__PURE__ */ t("span", { className: "w6w-execution-log-skip-reason", "data-testid": "execution-log-skip-reason", children: fa[e.skipReason] }),
|
|
1547
1550
|
/* @__PURE__ */ t(Na, { startedAt: e.startedAt, finishedAt: e.finishedAt })
|
|
1548
|
-
] }),
|
|
1549
|
-
return e.input === void 0 && e.output === void 0 && !e.meta && !
|
|
1550
|
-
/* @__PURE__ */ t("div", { className: "w6w-section", children:
|
|
1551
|
-
|
|
1552
|
-
|
|
1551
|
+
] }), l = e.error ? /* @__PURE__ */ t(at, { error: e.error }) : null, c = Array.isArray(e.iterations) ? /* @__PURE__ */ t(ya, { step: e }) : null, d = Ca(e) ? /* @__PURE__ */ t(Sa, { step: e }) : null;
|
|
1552
|
+
return e.input === void 0 && e.output === void 0 && !e.meta && !d && !((u = e.logs) != null && u.length) ? /* @__PURE__ */ i("li", { className: "w6w-execution-log-row", children: [
|
|
1553
|
+
/* @__PURE__ */ t("div", { className: "w6w-section", children: o }),
|
|
1554
|
+
l,
|
|
1555
|
+
c
|
|
1553
1556
|
] }) : /* @__PURE__ */ i("li", { className: "w6w-execution-log-row", children: [
|
|
1554
|
-
/* @__PURE__ */ i("details", { className: "w6w-section", open:
|
|
1555
|
-
/* @__PURE__ */ t("summary", { className: "w6w-section-summary", children:
|
|
1556
|
-
|
|
1557
|
+
/* @__PURE__ */ i("details", { className: "w6w-section", open: a, onToggle: (g) => s(g.currentTarget.open), children: [
|
|
1558
|
+
/* @__PURE__ */ t("summary", { className: "w6w-section-summary", children: o }),
|
|
1559
|
+
a && /* @__PURE__ */ i("div", { className: "w6w-execution-log-row-body w6w-section-body w6w-stack", children: [
|
|
1557
1560
|
/* @__PURE__ */ t(ka, { input: e.input }),
|
|
1558
|
-
/* @__PURE__ */ t(
|
|
1559
|
-
/* @__PURE__ */ t(
|
|
1560
|
-
!!((
|
|
1561
|
+
/* @__PURE__ */ t(_t, { title: "Input", value: e.input, defaultOpen: n }),
|
|
1562
|
+
/* @__PURE__ */ t(_t, { title: "Output", value: e.output, defaultOpen: n }),
|
|
1563
|
+
!!((f = e.logs) != null && f.length) && /* @__PURE__ */ i("div", { className: "w6w-execution-log-json w6w-stack", children: [
|
|
1561
1564
|
/* @__PURE__ */ t("strong", { className: "w6w-small", children: "Console" }),
|
|
1562
|
-
/* @__PURE__ */ t(
|
|
1565
|
+
/* @__PURE__ */ t(Ie, { code: e.logs.join(`
|
|
1563
1566
|
`), language: "plaintext" })
|
|
1564
1567
|
] }),
|
|
1565
1568
|
e.meta && /* @__PURE__ */ i("div", { className: "w6w-execution-log-json w6w-stack", children: [
|
|
1566
1569
|
/* @__PURE__ */ t("strong", { className: "w6w-small", children: "Metadata" }),
|
|
1567
|
-
/* @__PURE__ */ t(
|
|
1570
|
+
/* @__PURE__ */ t(Ie, { code: JSON.stringify(e.meta, null, 2), language: "json" })
|
|
1568
1571
|
] }),
|
|
1569
|
-
|
|
1572
|
+
d
|
|
1570
1573
|
] })
|
|
1571
1574
|
] }),
|
|
1572
|
-
|
|
1573
|
-
|
|
1575
|
+
l,
|
|
1576
|
+
c
|
|
1574
1577
|
] });
|
|
1575
1578
|
}
|
|
1576
1579
|
function ya({ step: e }) {
|
|
1577
|
-
var
|
|
1578
|
-
const n = [...e.iterations ?? []].sort((
|
|
1579
|
-
for (const
|
|
1580
|
-
|
|
1581
|
-
const
|
|
1580
|
+
var h, y;
|
|
1581
|
+
const n = [...e.iterations ?? []].sort((w, S) => w.index - S.index), a = e.iterationsTotal ?? n.length, s = e.iterationsFailed ?? n.filter((w) => w.status === "failed").length, r = n.find((w) => w.status === "failed"), o = (r == null ? void 0 : r.index) ?? ((h = n[n.length - 1]) == null ? void 0 : h.index), [l, c] = b(o), [d, u] = b(!1), f = n.find((w) => w.index === l), g = [], v = /* @__PURE__ */ new Map();
|
|
1582
|
+
for (const w of Gt(n.flatMap((S) => S.steps)))
|
|
1583
|
+
v.has(w.id) || (g.push(w.id), v.set(w.id, w.label ?? w.id));
|
|
1584
|
+
const m = (r == null ? void 0 : r.failedNodeId) ?? ((y = r == null ? void 0 : r.steps.find((w) => w.status === "failed")) == null ? void 0 : y.id);
|
|
1582
1585
|
return /* @__PURE__ */ i("div", { className: "w6w-execution-log-foreach w6w-stack", children: [
|
|
1583
1586
|
/* @__PURE__ */ i("div", { className: "w6w-small", "data-testid": "execution-log-foreach-summary", children: [
|
|
1584
1587
|
/* @__PURE__ */ i("span", { children: [
|
|
1585
1588
|
a === 1 ? "1 item" : `${a} items`,
|
|
1586
1589
|
s > 0 ? ` · ${s} failed` : ""
|
|
1587
1590
|
] }),
|
|
1588
|
-
r &&
|
|
1589
|
-
|
|
1591
|
+
r && m !== void 0 && /* @__PURE__ */ i("div", { children: [
|
|
1592
|
+
v.get(m) ?? m,
|
|
1590
1593
|
" failed in iteration ",
|
|
1591
1594
|
r.index
|
|
1592
1595
|
] }),
|
|
1593
1596
|
e.iterationsTruncated === !0 && /* @__PURE__ */ t("div", { className: "w6w-muted", children: `showing ${n.length} of ${a}` })
|
|
1594
1597
|
] }),
|
|
1595
|
-
/* @__PURE__ */ t("div", { className: "w6w-execution-log-iteration-chips", children: n.map((
|
|
1596
|
-
"
|
|
1598
|
+
/* @__PURE__ */ t("div", { className: "w6w-execution-log-iteration-chips", children: n.map((w) => /* @__PURE__ */ i(
|
|
1599
|
+
"button",
|
|
1597
1600
|
{
|
|
1598
|
-
|
|
1601
|
+
type: "button",
|
|
1602
|
+
className: `w6w-execution-log-iteration-chip w6w-execution-log-iteration-chip-${w.status}`,
|
|
1599
1603
|
"data-testid": "execution-log-iteration-chip",
|
|
1600
|
-
"data-status":
|
|
1604
|
+
"data-status": w.status,
|
|
1605
|
+
"aria-pressed": l === w.index,
|
|
1606
|
+
title: `Show iteration ${w.index}'s input and output`,
|
|
1607
|
+
onClick: () => {
|
|
1608
|
+
c(w.index), u(!0);
|
|
1609
|
+
},
|
|
1601
1610
|
children: [
|
|
1602
|
-
|
|
1611
|
+
w.index,
|
|
1603
1612
|
" · ",
|
|
1604
|
-
|
|
1613
|
+
w.status
|
|
1605
1614
|
]
|
|
1606
1615
|
},
|
|
1607
|
-
|
|
1616
|
+
w.index
|
|
1608
1617
|
)) }),
|
|
1609
|
-
/* @__PURE__ */ t("
|
|
1618
|
+
f && /* @__PURE__ */ t("div", { className: "w6w-small w6w-muted", "data-testid": "execution-log-iteration-current", children: `Iteration ${f.index} · ${f.status}` }),
|
|
1619
|
+
/* @__PURE__ */ t("ul", { className: "w6w-execution-log-subrows", children: g.map((w) => /* @__PURE__ */ t(
|
|
1610
1620
|
va,
|
|
1611
1621
|
{
|
|
1612
|
-
id:
|
|
1613
|
-
label:
|
|
1622
|
+
id: w,
|
|
1623
|
+
label: v.get(w) ?? w,
|
|
1614
1624
|
iterations: n,
|
|
1615
|
-
|
|
1625
|
+
selected: l,
|
|
1626
|
+
open: d,
|
|
1627
|
+
onSelect: c
|
|
1616
1628
|
},
|
|
1617
|
-
|
|
1629
|
+
w
|
|
1618
1630
|
)) })
|
|
1619
1631
|
] });
|
|
1620
1632
|
}
|
|
@@ -1622,10 +1634,12 @@ function va({
|
|
|
1622
1634
|
id: e,
|
|
1623
1635
|
label: n,
|
|
1624
1636
|
iterations: a,
|
|
1625
|
-
|
|
1637
|
+
selected: s,
|
|
1638
|
+
open: r,
|
|
1639
|
+
onSelect: o
|
|
1626
1640
|
}) {
|
|
1627
1641
|
var c;
|
|
1628
|
-
const
|
|
1642
|
+
const l = (c = a.find((d) => d.index === s)) == null ? void 0 : c.steps.find((d) => d.id === e);
|
|
1629
1643
|
return /* @__PURE__ */ i("li", { className: "w6w-execution-log-subrow w6w-stack", children: [
|
|
1630
1644
|
/* @__PURE__ */ i("div", { className: "w6w-execution-log-subrow-head", children: [
|
|
1631
1645
|
/* @__PURE__ */ t("strong", { className: "w6w-small", children: n }),
|
|
@@ -1635,16 +1649,16 @@ function va({
|
|
|
1635
1649
|
className: "w6w-select",
|
|
1636
1650
|
"aria-label": `Iteration for ${n}`,
|
|
1637
1651
|
"data-testid": "execution-log-iteration-select",
|
|
1638
|
-
value:
|
|
1652
|
+
value: s === void 0 ? "" : String(s),
|
|
1639
1653
|
onChange: (d) => o(Number(d.currentTarget.value)),
|
|
1640
1654
|
children: a.map((d) => /* @__PURE__ */ t("option", { value: String(d.index), children: `iteration ${d.index} (${d.status})` }, d.index))
|
|
1641
1655
|
}
|
|
1642
1656
|
)
|
|
1643
1657
|
] }),
|
|
1644
|
-
l ? /* @__PURE__ */ t("ol", { className: "w6w-execution-log", children: /* @__PURE__ */ t(
|
|
1658
|
+
l ? /* @__PURE__ */ t("ol", { className: "w6w-execution-log", children: /* @__PURE__ */ t(Xt, { step: l, defaultOpen: r }, `${s}:${r}`) }) : /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Did not run in this iteration." })
|
|
1645
1659
|
] });
|
|
1646
1660
|
}
|
|
1647
|
-
function
|
|
1661
|
+
function at({ error: e, label: n }) {
|
|
1648
1662
|
return /* @__PURE__ */ i("div", { className: "w6w-result w6w-error", children: [
|
|
1649
1663
|
n !== void 0 && /* @__PURE__ */ t("strong", { className: "w6w-execution-log-error-label", children: n }),
|
|
1650
1664
|
e.code && /* @__PURE__ */ t("div", { className: "w6w-small w6w-execution-log-error-code", children: /* @__PURE__ */ t("code", { children: e.code }) }),
|
|
@@ -1680,8 +1694,12 @@ function ba(e, n) {
|
|
|
1680
1694
|
const l = Math.floor(o / 60), c = Math.round(o % 60);
|
|
1681
1695
|
return `${l}m ${c}s`;
|
|
1682
1696
|
}
|
|
1683
|
-
function
|
|
1684
|
-
|
|
1697
|
+
function _t({
|
|
1698
|
+
title: e,
|
|
1699
|
+
value: n,
|
|
1700
|
+
defaultOpen: a = !1
|
|
1701
|
+
}) {
|
|
1702
|
+
const [s, r] = b(a);
|
|
1685
1703
|
return n === void 0 ? /* @__PURE__ */ i("div", { className: "w6w-execution-log-json w6w-stack", children: [
|
|
1686
1704
|
/* @__PURE__ */ t("strong", { className: "w6w-small", children: e }),
|
|
1687
1705
|
/* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Not available." })
|
|
@@ -1689,22 +1707,22 @@ function Et({ title: e, value: n }) {
|
|
|
1689
1707
|
"details",
|
|
1690
1708
|
{
|
|
1691
1709
|
className: "w6w-execution-log-json",
|
|
1692
|
-
open:
|
|
1693
|
-
onToggle: (
|
|
1694
|
-
|
|
1710
|
+
open: s,
|
|
1711
|
+
onToggle: (o) => {
|
|
1712
|
+
o.target === o.currentTarget && r(o.currentTarget.open);
|
|
1695
1713
|
},
|
|
1696
1714
|
children: [
|
|
1697
1715
|
/* @__PURE__ */ t("summary", { children: /* @__PURE__ */ t("strong", { className: "w6w-small", children: e }) }),
|
|
1698
|
-
|
|
1716
|
+
s && /* @__PURE__ */ t(Ze, { value: n, format: "json" })
|
|
1699
1717
|
]
|
|
1700
1718
|
}
|
|
1701
1719
|
);
|
|
1702
1720
|
}
|
|
1703
|
-
const
|
|
1704
|
-
function
|
|
1705
|
-
if (!
|
|
1721
|
+
const Me = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
|
|
1722
|
+
function Ot(e) {
|
|
1723
|
+
if (!Me(e) || !Array.isArray(e.conditions)) return;
|
|
1706
1724
|
const n = e.conditions.filter(
|
|
1707
|
-
(a) =>
|
|
1725
|
+
(a) => Me(a) && typeof a.op == "string" && "result" in a
|
|
1708
1726
|
);
|
|
1709
1727
|
if (n.length !== 0)
|
|
1710
1728
|
return {
|
|
@@ -1714,11 +1732,11 @@ function Rt(e) {
|
|
|
1714
1732
|
};
|
|
1715
1733
|
}
|
|
1716
1734
|
function ka({ input: e }) {
|
|
1717
|
-
const n = [], a =
|
|
1718
|
-
if (a && n.push({ trace: a }),
|
|
1735
|
+
const n = [], a = Ot(e);
|
|
1736
|
+
if (a && n.push({ trace: a }), Me(e) && Array.isArray(e.routes))
|
|
1719
1737
|
for (const s of e.routes) {
|
|
1720
|
-
const r =
|
|
1721
|
-
!r || !
|
|
1738
|
+
const r = Ot(s);
|
|
1739
|
+
!r || !Me(s) || n.push({ title: String(s.label ?? s.id ?? "Route"), trace: r });
|
|
1722
1740
|
}
|
|
1723
1741
|
return n.length === 0 ? null : /* @__PURE__ */ i("div", { className: "w6w-execution-log-json w6w-stack", "data-testid": "execution-log-conditions", children: [
|
|
1724
1742
|
/* @__PURE__ */ t("strong", { className: "w6w-small", children: "Condition" }),
|
|
@@ -1727,7 +1745,7 @@ function ka({ input: e }) {
|
|
|
1727
1745
|
(r.combinator && r.rows.length > 1 || r.result !== void 0) && /* @__PURE__ */ i("span", { className: "w6w-small w6w-muted", "data-testid": "execution-log-condition-summary", children: [
|
|
1728
1746
|
r.combinator && r.rows.length > 1 && On(r.combinator),
|
|
1729
1747
|
r.combinator && r.rows.length > 1 && r.result !== void 0 && " · ",
|
|
1730
|
-
r.result !== void 0 && /* @__PURE__ */ i(
|
|
1748
|
+
r.result !== void 0 && /* @__PURE__ */ i(_, { children: [
|
|
1731
1749
|
"Result:",
|
|
1732
1750
|
" ",
|
|
1733
1751
|
/* @__PURE__ */ t(
|
|
@@ -1749,9 +1767,9 @@ function ka({ input: e }) {
|
|
|
1749
1767
|
/* @__PURE__ */ t("tbody", { children: r.rows.map((l, c) => (
|
|
1750
1768
|
// biome-ignore lint/suspicious/noArrayIndexKey: rows are positional and never reorder.
|
|
1751
1769
|
/* @__PURE__ */ i("tr", { children: [
|
|
1752
|
-
/* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("code", { children:
|
|
1770
|
+
/* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("code", { children: It(l.left) }) }),
|
|
1753
1771
|
/* @__PURE__ */ t("td", { children: In(l.op) }),
|
|
1754
|
-
/* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("code", { children:
|
|
1772
|
+
/* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("code", { children: It(l.right) }) }),
|
|
1755
1773
|
/* @__PURE__ */ t(
|
|
1756
1774
|
"td",
|
|
1757
1775
|
{
|
|
@@ -1765,10 +1783,10 @@ function ka({ input: e }) {
|
|
|
1765
1783
|
] }, s ?? o))
|
|
1766
1784
|
] });
|
|
1767
1785
|
}
|
|
1768
|
-
function
|
|
1786
|
+
function It(e) {
|
|
1769
1787
|
return JSON.stringify(e) ?? "undefined";
|
|
1770
1788
|
}
|
|
1771
|
-
const
|
|
1789
|
+
const Pt = {
|
|
1772
1790
|
not_object: "Not written — the output isn't an object, so it can't be merged at the root",
|
|
1773
1791
|
missing_source: "Not written — the output has no value at that field",
|
|
1774
1792
|
null_append: "Not appended — the value was null",
|
|
@@ -1781,17 +1799,17 @@ const Ot = {
|
|
|
1781
1799
|
log_truncated: "Later state changes aren't shown — the run's state log reached its limit"
|
|
1782
1800
|
};
|
|
1783
1801
|
function xa(e) {
|
|
1784
|
-
return Object.hasOwn(
|
|
1802
|
+
return Object.hasOwn(Pt, e) ? Pt[e] : e;
|
|
1785
1803
|
}
|
|
1786
1804
|
function Ca(e) {
|
|
1787
1805
|
const n = Array.isArray(e.stateWrites) && e.stateWrites.length > 0, a = e.stateAfter;
|
|
1788
1806
|
return n || typeof a == "object" && a !== null && Object.keys(a).length > 0;
|
|
1789
1807
|
}
|
|
1790
|
-
const
|
|
1791
|
-
function
|
|
1808
|
+
const Lt = 120;
|
|
1809
|
+
function Mt(e) {
|
|
1792
1810
|
if (e === void 0) return "(not set)";
|
|
1793
1811
|
const n = JSON.stringify(e) ?? String(e);
|
|
1794
|
-
return n.length >
|
|
1812
|
+
return n.length > Lt ? `${n.slice(0, Lt)}…` : n;
|
|
1795
1813
|
}
|
|
1796
1814
|
function Sa({ step: e }) {
|
|
1797
1815
|
const n = Array.isArray(e.stateWrites) ? e.stateWrites : [], a = e.stateAfter;
|
|
@@ -1813,14 +1831,14 @@ function Sa({ step: e }) {
|
|
|
1813
1831
|
{
|
|
1814
1832
|
className: "w6w-execution-log-state-write w6w-small",
|
|
1815
1833
|
"data-testid": "execution-log-state-write",
|
|
1816
|
-
children: `${l}: ${
|
|
1834
|
+
children: `${l}: ${Mt(s.old)} → ${Mt(s.new)}`
|
|
1817
1835
|
},
|
|
1818
1836
|
r
|
|
1819
1837
|
);
|
|
1820
1838
|
}) }),
|
|
1821
1839
|
typeof a == "object" && a !== null && /* @__PURE__ */ i("div", { className: "w6w-stack", "data-testid": "execution-log-state-after", children: [
|
|
1822
1840
|
/* @__PURE__ */ t("span", { className: "w6w-small w6w-muted", children: "State after this step" }),
|
|
1823
|
-
/* @__PURE__ */ t(
|
|
1841
|
+
/* @__PURE__ */ t(Ie, { code: JSON.stringify(a, null, 2), language: "json" })
|
|
1824
1842
|
] })
|
|
1825
1843
|
] });
|
|
1826
1844
|
}
|
|
@@ -1837,7 +1855,7 @@ const $a = { status: "", kind: "", from: "", to: "", q: "" }, Ta = [
|
|
|
1837
1855
|
{ value: "endpoint", label: "Endpoint" },
|
|
1838
1856
|
{ value: "workflow", label: "Workflow" }
|
|
1839
1857
|
];
|
|
1840
|
-
function
|
|
1858
|
+
function xs({
|
|
1841
1859
|
value: e,
|
|
1842
1860
|
onChange: n,
|
|
1843
1861
|
showKind: a = !1,
|
|
@@ -1920,13 +1938,13 @@ function Cs({
|
|
|
1920
1938
|
)
|
|
1921
1939
|
] });
|
|
1922
1940
|
}
|
|
1923
|
-
const
|
|
1924
|
-
function
|
|
1941
|
+
const Re = "—";
|
|
1942
|
+
function Cs({ stats: e, label: n }) {
|
|
1925
1943
|
const a = [
|
|
1926
1944
|
{
|
|
1927
1945
|
testid: "execution-stat-total",
|
|
1928
1946
|
label: "Executions",
|
|
1929
|
-
value: e ? String(e.total) :
|
|
1947
|
+
value: e ? String(e.total) : Re
|
|
1930
1948
|
},
|
|
1931
1949
|
{
|
|
1932
1950
|
testid: "execution-stat-success-rate",
|
|
@@ -1936,12 +1954,12 @@ function Ss({ stats: e, label: n }) {
|
|
|
1936
1954
|
{
|
|
1937
1955
|
testid: "execution-stat-failed",
|
|
1938
1956
|
label: "Failed",
|
|
1939
|
-
value: e ? String(e.failed) :
|
|
1957
|
+
value: e ? String(e.failed) : Re
|
|
1940
1958
|
},
|
|
1941
1959
|
{
|
|
1942
1960
|
testid: "execution-stat-avg-duration",
|
|
1943
1961
|
label: "Avg duration",
|
|
1944
|
-
value: e ?
|
|
1962
|
+
value: e ? ot(e.avgDurationMs) : Re
|
|
1945
1963
|
}
|
|
1946
1964
|
];
|
|
1947
1965
|
return e && e.inFlight > 0 && a.push({
|
|
@@ -1957,7 +1975,7 @@ function Ss({ stats: e, label: n }) {
|
|
|
1957
1975
|
] });
|
|
1958
1976
|
}
|
|
1959
1977
|
function Ea(e) {
|
|
1960
|
-
return e == null || !Number.isFinite(e) ?
|
|
1978
|
+
return e == null || !Number.isFinite(e) ? Re : `${Math.round(e * 100)}%`;
|
|
1961
1979
|
}
|
|
1962
1980
|
const Ra = {
|
|
1963
1981
|
function: "Function",
|
|
@@ -1967,7 +1985,7 @@ const Ra = {
|
|
|
1967
1985
|
function _a(e) {
|
|
1968
1986
|
return JSON.stringify(e, null, 2) ?? "null";
|
|
1969
1987
|
}
|
|
1970
|
-
function
|
|
1988
|
+
function Ss({
|
|
1971
1989
|
execution: e,
|
|
1972
1990
|
loading: n = !1,
|
|
1973
1991
|
errorMessage: a,
|
|
@@ -2023,12 +2041,12 @@ function Oa({
|
|
|
2023
2041
|
onOpenExecution: o
|
|
2024
2042
|
}) {
|
|
2025
2043
|
const l = e.rerunOf;
|
|
2026
|
-
return /* @__PURE__ */ i(
|
|
2044
|
+
return /* @__PURE__ */ i(_, { children: [
|
|
2027
2045
|
/* @__PURE__ */ i("div", { className: "w6w-execution-detail-head", children: [
|
|
2028
2046
|
/* @__PURE__ */ i("div", { className: "w6w-execution-detail-title", children: [
|
|
2029
2047
|
/* @__PURE__ */ t("h3", { className: "w6w-execution-detail-name", children: e.callableName }),
|
|
2030
2048
|
/* @__PURE__ */ i("div", { className: "w6w-execution-detail-meta", children: [
|
|
2031
|
-
/* @__PURE__ */ t(
|
|
2049
|
+
/* @__PURE__ */ t(rt, { state: e.status }),
|
|
2032
2050
|
/* @__PURE__ */ t("span", { className: "w6w-execution-detail-kind w6w-muted w6w-small", children: Ra[e.kind] })
|
|
2033
2051
|
] })
|
|
2034
2052
|
] }),
|
|
@@ -2043,7 +2061,7 @@ function Oa({
|
|
|
2043
2061
|
disabled: r,
|
|
2044
2062
|
onClick: s,
|
|
2045
2063
|
children: [
|
|
2046
|
-
/* @__PURE__ */ t(
|
|
2064
|
+
/* @__PURE__ */ t(et, { name: "sync", size: 14 }),
|
|
2047
2065
|
" ",
|
|
2048
2066
|
r ? "Re-running…" : "Re-run"
|
|
2049
2067
|
]
|
|
@@ -2059,7 +2077,7 @@ function Oa({
|
|
|
2059
2077
|
children: "Open in visual editor"
|
|
2060
2078
|
}
|
|
2061
2079
|
),
|
|
2062
|
-
n && /* @__PURE__ */ t(
|
|
2080
|
+
n && /* @__PURE__ */ t(he, { label: "Close", "data-testid": "execution-detail-close", onClick: n, children: "×" })
|
|
2063
2081
|
] })
|
|
2064
2082
|
] }),
|
|
2065
2083
|
/* @__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 +2096,15 @@ function Oa({
|
|
|
2078
2096
|
) : /* @__PURE__ */ t("code", { children: l })
|
|
2079
2097
|
] }),
|
|
2080
2098
|
/* @__PURE__ */ i("dl", { className: "w6w-execution-detail-timing", children: [
|
|
2081
|
-
/* @__PURE__ */ t(
|
|
2099
|
+
/* @__PURE__ */ t(Ge, { label: "Started", value: Le(e.startedAt) }),
|
|
2082
2100
|
/* @__PURE__ */ t(
|
|
2083
|
-
|
|
2101
|
+
Ge,
|
|
2084
2102
|
{
|
|
2085
2103
|
label: "Finished",
|
|
2086
|
-
value: e.finishedAt ?
|
|
2104
|
+
value: e.finishedAt ? Le(e.finishedAt) : "—"
|
|
2087
2105
|
}
|
|
2088
2106
|
),
|
|
2089
|
-
/* @__PURE__ */ t(
|
|
2107
|
+
/* @__PURE__ */ t(Ge, { label: "Duration", value: ot(e.durationMs) })
|
|
2090
2108
|
] }),
|
|
2091
2109
|
e.steps !== void 0 && /* @__PURE__ */ i(
|
|
2092
2110
|
"section",
|
|
@@ -2099,21 +2117,21 @@ function Oa({
|
|
|
2099
2117
|
]
|
|
2100
2118
|
}
|
|
2101
2119
|
),
|
|
2102
|
-
e.input !== void 0 && /* @__PURE__ */ t(
|
|
2103
|
-
e.output !== void 0 && /* @__PURE__ */ t(
|
|
2104
|
-
e.error != null && /* @__PURE__ */ t(
|
|
2120
|
+
e.input !== void 0 && /* @__PURE__ */ t(Xe, { title: "Input", testid: "execution-detail-input", value: e.input }),
|
|
2121
|
+
e.output !== void 0 && /* @__PURE__ */ t(Xe, { title: "Output", testid: "execution-detail-output", value: e.output }),
|
|
2122
|
+
e.error != null && /* @__PURE__ */ t(Xe, { title: "Error", testid: "execution-detail-error", value: e.error })
|
|
2105
2123
|
] });
|
|
2106
2124
|
}
|
|
2107
|
-
function
|
|
2125
|
+
function Ge({ label: e, value: n }) {
|
|
2108
2126
|
return /* @__PURE__ */ i("div", { className: "w6w-execution-detail-timing-item", children: [
|
|
2109
2127
|
/* @__PURE__ */ t("dt", { children: e }),
|
|
2110
2128
|
/* @__PURE__ */ t("dd", { children: n })
|
|
2111
2129
|
] });
|
|
2112
2130
|
}
|
|
2113
|
-
function
|
|
2131
|
+
function Xe({ title: e, testid: n, value: a }) {
|
|
2114
2132
|
return /* @__PURE__ */ i("section", { className: "w6w-execution-detail-section w6w-stack", "data-testid": n, children: [
|
|
2115
2133
|
/* @__PURE__ */ t("strong", { className: "w6w-small", children: e }),
|
|
2116
|
-
/* @__PURE__ */ t(
|
|
2134
|
+
/* @__PURE__ */ t(Ie, { code: _a(a), language: "json" })
|
|
2117
2135
|
] });
|
|
2118
2136
|
}
|
|
2119
2137
|
function Ia(e) {
|
|
@@ -2129,7 +2147,7 @@ function Ia(e) {
|
|
|
2129
2147
|
});
|
|
2130
2148
|
return n;
|
|
2131
2149
|
}
|
|
2132
|
-
function
|
|
2150
|
+
function $s(e) {
|
|
2133
2151
|
return e.attention === "now" || e.attention === "recent";
|
|
2134
2152
|
}
|
|
2135
2153
|
function Pa(e) {
|
|
@@ -2141,9 +2159,9 @@ function Pa(e) {
|
|
|
2141
2159
|
function La(e) {
|
|
2142
2160
|
return e.uptime.map((n) => ({ day: n.day, state: n.state }));
|
|
2143
2161
|
}
|
|
2144
|
-
const
|
|
2162
|
+
const Dt = 3, Ma = 5;
|
|
2145
2163
|
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,
|
|
2164
|
+
const a = n.compact ?? !1, { now: s, recent: r } = Pa(e), o = s.length + r.length, l = a ? s.slice(0, Dt) : s, c = a ? r.slice(0, Math.max(0, Dt - l.length)) : r, d = a ? e.slice(0, n.limit ?? Ma) : [...e];
|
|
2147
2165
|
return {
|
|
2148
2166
|
attentionCount: o,
|
|
2149
2167
|
shownNow: l,
|
|
@@ -2153,15 +2171,15 @@ function Da(e, n = {}) {
|
|
|
2153
2171
|
hiddenTableCount: e.length - d.length
|
|
2154
2172
|
};
|
|
2155
2173
|
}
|
|
2156
|
-
const
|
|
2157
|
-
function
|
|
2174
|
+
const Te = 640, ue = 340, K = { top: 16, right: 24, bottom: 40, left: 56 };
|
|
2175
|
+
function Ut(e) {
|
|
2158
2176
|
if (e <= 0) return 1;
|
|
2159
2177
|
const n = 10 ** Math.floor(Math.log10(e)), a = [1, 2, 5, 10];
|
|
2160
2178
|
for (const s of a)
|
|
2161
2179
|
if (e <= s * n) return s * n;
|
|
2162
2180
|
return 10 * n;
|
|
2163
2181
|
}
|
|
2164
|
-
function
|
|
2182
|
+
function Ft(e, n = 5) {
|
|
2165
2183
|
return Array.from({ length: n + 1 }, (a, s) => Math.round(e * s / n));
|
|
2166
2184
|
}
|
|
2167
2185
|
function Ua({
|
|
@@ -2172,49 +2190,49 @@ function Ua({
|
|
|
2172
2190
|
const s = Ia(e);
|
|
2173
2191
|
if (s.length === 0)
|
|
2174
2192
|
return /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "No timed calls in this window yet." });
|
|
2175
|
-
const r =
|
|
2193
|
+
const r = Ut(Math.max(...s.map((w) => w.calls))), o = Ut(Math.max(...s.map((w) => w.p95Ms))), l = Math.max(1, ...s.map((w) => w.errorCount)), c = Te - K.left - K.right, d = ue - K.top - K.bottom, u = (w) => K.left + w / r * c, f = (w) => K.top + w / o * d, g = (w) => 16 + w / l * 14, v = Ft(r), m = Ft(o), h = 18, y = K.top + d / 2;
|
|
2176
2194
|
return /* @__PURE__ */ i("div", { className: "w6w-rel-scatter", children: [
|
|
2177
2195
|
/* @__PURE__ */ i(
|
|
2178
2196
|
"svg",
|
|
2179
2197
|
{
|
|
2180
|
-
viewBox: `0 0 ${
|
|
2181
|
-
style: { aspectRatio: `${
|
|
2198
|
+
viewBox: `0 0 ${Te} ${ue}`,
|
|
2199
|
+
style: { aspectRatio: `${Te} / ${ue}` },
|
|
2182
2200
|
role: "img",
|
|
2183
2201
|
"aria-label": "API performance: calls versus p95 latency, one point per API",
|
|
2184
2202
|
children: [
|
|
2185
2203
|
/* @__PURE__ */ t(
|
|
2186
2204
|
"rect",
|
|
2187
2205
|
{
|
|
2188
|
-
x:
|
|
2189
|
-
y:
|
|
2206
|
+
x: K.left,
|
|
2207
|
+
y: K.top,
|
|
2190
2208
|
width: c,
|
|
2191
2209
|
height: d,
|
|
2192
2210
|
className: "w6w-rel-scatter-plot-bg"
|
|
2193
2211
|
}
|
|
2194
2212
|
),
|
|
2195
|
-
|
|
2213
|
+
m.map((w) => /* @__PURE__ */ i("g", { children: [
|
|
2196
2214
|
/* @__PURE__ */ t(
|
|
2197
2215
|
"line",
|
|
2198
2216
|
{
|
|
2199
|
-
x1:
|
|
2200
|
-
x2:
|
|
2201
|
-
y1: f(
|
|
2202
|
-
y2: f(
|
|
2217
|
+
x1: K.left,
|
|
2218
|
+
x2: Te - K.right,
|
|
2219
|
+
y1: f(w),
|
|
2220
|
+
y2: f(w),
|
|
2203
2221
|
className: "w6w-rel-scatter-grid"
|
|
2204
2222
|
}
|
|
2205
2223
|
),
|
|
2206
|
-
/* @__PURE__ */ t("text", { x:
|
|
2207
|
-
] }, `y-${
|
|
2208
|
-
v.map((
|
|
2224
|
+
/* @__PURE__ */ t("text", { x: K.left - 8, y: f(w), className: "w6w-rel-scatter-axis-label", textAnchor: "end", children: w })
|
|
2225
|
+
] }, `y-${w}`)),
|
|
2226
|
+
v.map((w) => /* @__PURE__ */ t(
|
|
2209
2227
|
"text",
|
|
2210
2228
|
{
|
|
2211
|
-
x: u(
|
|
2212
|
-
y:
|
|
2229
|
+
x: u(w),
|
|
2230
|
+
y: ue - K.bottom + 18,
|
|
2213
2231
|
className: "w6w-rel-scatter-axis-label",
|
|
2214
2232
|
textAnchor: "middle",
|
|
2215
|
-
children:
|
|
2233
|
+
children: w
|
|
2216
2234
|
},
|
|
2217
|
-
`x-${
|
|
2235
|
+
`x-${w}`
|
|
2218
2236
|
)),
|
|
2219
2237
|
/* @__PURE__ */ t(
|
|
2220
2238
|
"text",
|
|
@@ -2230,30 +2248,30 @@ function Ua({
|
|
|
2230
2248
|
/* @__PURE__ */ t(
|
|
2231
2249
|
"text",
|
|
2232
2250
|
{
|
|
2233
|
-
x:
|
|
2234
|
-
y:
|
|
2251
|
+
x: K.left + c / 2,
|
|
2252
|
+
y: ue - 4,
|
|
2235
2253
|
className: "w6w-rel-scatter-axis-title",
|
|
2236
2254
|
textAnchor: "middle",
|
|
2237
2255
|
children: "calls in this window"
|
|
2238
2256
|
}
|
|
2239
2257
|
),
|
|
2240
|
-
s.map((
|
|
2241
|
-
const
|
|
2258
|
+
s.map((w) => {
|
|
2259
|
+
const S = g(w.errorCount), x = u(w.calls), N = f(w.p95Ms), T = /* @__PURE__ */ i(_, { children: [
|
|
2242
2260
|
/* @__PURE__ */ t(
|
|
2243
2261
|
"circle",
|
|
2244
2262
|
{
|
|
2245
2263
|
cx: x,
|
|
2246
2264
|
cy: N,
|
|
2247
|
-
r:
|
|
2248
|
-
className: `w6w-rel-scatter-ring w6w-rel-scatter-ring-${
|
|
2265
|
+
r: S / 2 + 2.5,
|
|
2266
|
+
className: `w6w-rel-scatter-ring w6w-rel-scatter-ring-${w.state}`,
|
|
2249
2267
|
children: /* @__PURE__ */ i("title", { children: [
|
|
2250
|
-
|
|
2268
|
+
w.displayName,
|
|
2251
2269
|
" — ",
|
|
2252
|
-
|
|
2270
|
+
w.calls,
|
|
2253
2271
|
" calls, ",
|
|
2254
|
-
|
|
2272
|
+
w.p95Ms,
|
|
2255
2273
|
" ms p95, ",
|
|
2256
|
-
|
|
2274
|
+
w.errorCount,
|
|
2257
2275
|
" errors"
|
|
2258
2276
|
] })
|
|
2259
2277
|
}
|
|
@@ -2263,27 +2281,27 @@ function Ua({
|
|
|
2263
2281
|
{
|
|
2264
2282
|
cx: x,
|
|
2265
2283
|
cy: N,
|
|
2266
|
-
r:
|
|
2267
|
-
className: `w6w-rel-scatter-point w6w-rel-scatter-point-${
|
|
2284
|
+
r: S / 2,
|
|
2285
|
+
className: `w6w-rel-scatter-point w6w-rel-scatter-point-${w.state}`
|
|
2268
2286
|
}
|
|
2269
2287
|
)
|
|
2270
2288
|
] });
|
|
2271
2289
|
return n ? /* @__PURE__ */ t(
|
|
2272
2290
|
"a",
|
|
2273
2291
|
{
|
|
2274
|
-
href: n(
|
|
2292
|
+
href: n(w.appId),
|
|
2275
2293
|
className: "w6w-rel-scatter-point-link",
|
|
2276
|
-
onClick: a ? (C) => a(
|
|
2294
|
+
onClick: a ? (C) => a(w.appId, C) : void 0,
|
|
2277
2295
|
children: T
|
|
2278
2296
|
},
|
|
2279
|
-
|
|
2297
|
+
w.appId
|
|
2280
2298
|
) : a ? /* @__PURE__ */ t(
|
|
2281
2299
|
"g",
|
|
2282
2300
|
{
|
|
2283
2301
|
role: "button",
|
|
2284
2302
|
tabIndex: 0,
|
|
2285
2303
|
className: "w6w-rel-scatter-point-link",
|
|
2286
|
-
onClick: (C) => a(
|
|
2304
|
+
onClick: (C) => a(w.appId, C),
|
|
2287
2305
|
onKeyDown: (C) => {
|
|
2288
2306
|
(C.key === "Enter" || C.key === " ") && (C.preventDefault(), C.currentTarget.dispatchEvent(
|
|
2289
2307
|
new MouseEvent("click", { bubbles: !0 })
|
|
@@ -2291,8 +2309,8 @@ function Ua({
|
|
|
2291
2309
|
},
|
|
2292
2310
|
children: T
|
|
2293
2311
|
},
|
|
2294
|
-
|
|
2295
|
-
) : /* @__PURE__ */ t("g", { children: T },
|
|
2312
|
+
w.appId
|
|
2313
|
+
) : /* @__PURE__ */ t("g", { children: T }, w.appId);
|
|
2296
2314
|
})
|
|
2297
2315
|
]
|
|
2298
2316
|
}
|
|
@@ -2300,11 +2318,11 @@ function Ua({
|
|
|
2300
2318
|
/* @__PURE__ */ t("p", { className: "w6w-muted w6w-small w6w-rel-scatter-note", children: "Up is faster, right is more calls — top-right is the best outcome. Icon size is the error count in this window; ring colour is exec status." })
|
|
2301
2319
|
] });
|
|
2302
2320
|
}
|
|
2303
|
-
function
|
|
2321
|
+
function Bt(e) {
|
|
2304
2322
|
const n = new Date(e);
|
|
2305
2323
|
return Number.isNaN(n.getTime()) ? e : n.toLocaleDateString(void 0, { month: "short", day: "numeric" });
|
|
2306
2324
|
}
|
|
2307
|
-
function
|
|
2325
|
+
function Zt({
|
|
2308
2326
|
appId: e,
|
|
2309
2327
|
className: n,
|
|
2310
2328
|
title: a,
|
|
@@ -2323,24 +2341,24 @@ function Gt({
|
|
|
2323
2341
|
}
|
|
2324
2342
|
) : r ? /* @__PURE__ */ t("button", { type: "button", className: n, title: a, onClick: (l) => r(e, l), children: o }) : /* @__PURE__ */ t("div", { className: n, title: a, children: o });
|
|
2325
2343
|
}
|
|
2326
|
-
function
|
|
2344
|
+
function Qt({ service: e }) {
|
|
2327
2345
|
return /* @__PURE__ */ i("span", { className: "w6w-rel-signal", children: [
|
|
2328
|
-
/* @__PURE__ */ t(
|
|
2346
|
+
/* @__PURE__ */ t(lt, { state: e.state }),
|
|
2329
2347
|
e.ongoingOutageId && /* @__PURE__ */ t("span", { className: "w6w-rel-tag", children: "outage open" }),
|
|
2330
2348
|
e.calls === 0 && /* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: "no calls" })
|
|
2331
2349
|
] });
|
|
2332
2350
|
}
|
|
2333
|
-
function
|
|
2351
|
+
function en({ vendor: e }) {
|
|
2334
2352
|
if (!e) return /* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: "not published" });
|
|
2335
2353
|
const n = e.state === "unknown";
|
|
2336
2354
|
return /* @__PURE__ */ i("span", { className: "w6w-rel-signal", title: e.message ?? void 0, children: [
|
|
2337
|
-
/* @__PURE__ */ t(
|
|
2355
|
+
/* @__PURE__ */ t(lt, { state: e.state, label: n ? "Unavailable" : void 0 }),
|
|
2338
2356
|
!n && e.message && /* @__PURE__ */ t("span", { className: "w6w-rel-vendor-msg w6w-small", children: e.message })
|
|
2339
2357
|
] });
|
|
2340
2358
|
}
|
|
2341
2359
|
function Fa({ service: e, getHref: n, onOpen: a }) {
|
|
2342
2360
|
return /* @__PURE__ */ i(
|
|
2343
|
-
|
|
2361
|
+
Zt,
|
|
2344
2362
|
{
|
|
2345
2363
|
appId: e.appId,
|
|
2346
2364
|
className: "w6w-rel-issue-card",
|
|
@@ -2350,7 +2368,7 @@ function Fa({ service: e, getHref: n, onOpen: a }) {
|
|
|
2350
2368
|
children: [
|
|
2351
2369
|
/* @__PURE__ */ i("span", { className: "w6w-rel-issue-head", children: [
|
|
2352
2370
|
/* @__PURE__ */ t(
|
|
2353
|
-
|
|
2371
|
+
De,
|
|
2354
2372
|
{
|
|
2355
2373
|
src: e.iconSrc,
|
|
2356
2374
|
srcDark: e.iconSrcDark,
|
|
@@ -2367,11 +2385,11 @@ function Fa({ service: e, getHref: n, onOpen: a }) {
|
|
|
2367
2385
|
/* @__PURE__ */ i("span", { className: "w6w-rel-issue-signals", children: [
|
|
2368
2386
|
/* @__PURE__ */ i("span", { className: "w6w-rel-issue-signal", children: [
|
|
2369
2387
|
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: "w6w exec" }),
|
|
2370
|
-
/* @__PURE__ */ t(
|
|
2388
|
+
/* @__PURE__ */ t(Qt, { service: e })
|
|
2371
2389
|
] }),
|
|
2372
2390
|
/* @__PURE__ */ i("span", { className: "w6w-rel-issue-signal", children: [
|
|
2373
2391
|
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: "API status" }),
|
|
2374
|
-
/* @__PURE__ */ t(
|
|
2392
|
+
/* @__PURE__ */ t(en, { vendor: e.vendorStatus })
|
|
2375
2393
|
] })
|
|
2376
2394
|
] })
|
|
2377
2395
|
]
|
|
@@ -2390,9 +2408,9 @@ function Ba({
|
|
|
2390
2408
|
className: `w6w-rel-tr${e.attention !== "none" ? " w6w-rel-attention" : ""}`,
|
|
2391
2409
|
"data-attention": e.attention === "none" ? void 0 : e.attention,
|
|
2392
2410
|
children: [
|
|
2393
|
-
/* @__PURE__ */ t("td", { className: "w6w-rel-td-service", children: /* @__PURE__ */ i(
|
|
2411
|
+
/* @__PURE__ */ t("td", { className: "w6w-rel-td-service", children: /* @__PURE__ */ i(Zt, { appId: e.appId, className: "w6w-rel-open", getHref: n, onOpen: a, children: [
|
|
2394
2412
|
/* @__PURE__ */ t(
|
|
2395
|
-
|
|
2413
|
+
De,
|
|
2396
2414
|
{
|
|
2397
2415
|
src: e.iconSrc,
|
|
2398
2416
|
srcDark: e.iconSrcDark,
|
|
@@ -2409,17 +2427,17 @@ function Ba({
|
|
|
2409
2427
|
/* @__PURE__ */ i("td", { className: "w6w-rel-td-status", children: [
|
|
2410
2428
|
/* @__PURE__ */ i("span", { className: "w6w-rel-status-row", children: [
|
|
2411
2429
|
/* @__PURE__ */ t("span", { className: "w6w-rel-status-label w6w-muted w6w-small", children: "Ops" }),
|
|
2412
|
-
/* @__PURE__ */ t(
|
|
2430
|
+
/* @__PURE__ */ t(Qt, { service: e })
|
|
2413
2431
|
] }),
|
|
2414
2432
|
/* @__PURE__ */ i("span", { className: "w6w-rel-status-row", children: [
|
|
2415
2433
|
/* @__PURE__ */ t("span", { className: "w6w-rel-status-label w6w-muted w6w-small", children: "API" }),
|
|
2416
|
-
/* @__PURE__ */ t(
|
|
2434
|
+
/* @__PURE__ */ t(en, { vendor: e.vendorStatus })
|
|
2417
2435
|
] })
|
|
2418
2436
|
] }),
|
|
2419
2437
|
/* @__PURE__ */ t("td", { className: "w6w-rel-td-uptime", children: s ? (
|
|
2420
2438
|
// A zero-call window is one identical hatched strip — the note says it better.
|
|
2421
2439
|
/* @__PURE__ */ t("span", { className: "w6w-rel-idle-note", children: "No calls in this window" })
|
|
2422
|
-
) : /* @__PURE__ */ i(
|
|
2440
|
+
) : /* @__PURE__ */ i(_, { children: [
|
|
2423
2441
|
/* @__PURE__ */ t(
|
|
2424
2442
|
Qn,
|
|
2425
2443
|
{
|
|
@@ -2437,7 +2455,7 @@ function Ba({
|
|
|
2437
2455
|
}
|
|
2438
2456
|
);
|
|
2439
2457
|
}
|
|
2440
|
-
function
|
|
2458
|
+
function Ts({
|
|
2441
2459
|
services: e,
|
|
2442
2460
|
window: n,
|
|
2443
2461
|
days: a,
|
|
@@ -2450,22 +2468,22 @@ function As({
|
|
|
2450
2468
|
onShowAll: u,
|
|
2451
2469
|
slots: f
|
|
2452
2470
|
}) {
|
|
2453
|
-
const
|
|
2454
|
-
attentionCount:
|
|
2471
|
+
const g = a ?? (n == null ? void 0 : n.days) ?? 30, v = e.length > 0 && e.every((R) => R.calls > 0 && R.state === "ok"), {
|
|
2472
|
+
attentionCount: m,
|
|
2455
2473
|
shownNow: h,
|
|
2456
2474
|
shownRecent: y,
|
|
2457
|
-
hiddenAttentionCount:
|
|
2458
|
-
shownTable:
|
|
2475
|
+
hiddenAttentionCount: w,
|
|
2476
|
+
shownTable: S,
|
|
2459
2477
|
hiddenTableCount: x
|
|
2460
|
-
} = Da(e, { compact: s, limit: o }), N = r ?? !s, T = d !== void 0 || u !== void 0, C = (
|
|
2461
|
-
const
|
|
2462
|
-
return d !== void 0 ? /* @__PURE__ */ t("a", { href: d, className:
|
|
2478
|
+
} = Da(e, { compact: s, limit: o }), N = r ?? !s, T = d !== void 0 || u !== void 0, C = (R) => {
|
|
2479
|
+
const I = R.startsWith("Show") ? "w6w-muted w6w-small" : void 0;
|
|
2480
|
+
return d !== void 0 ? /* @__PURE__ */ t("a", { href: d, className: I, onClick: u, children: R }) : u ? /* @__PURE__ */ t(
|
|
2463
2481
|
"button",
|
|
2464
2482
|
{
|
|
2465
2483
|
type: "button",
|
|
2466
|
-
className: `w6w-rel-show-all${
|
|
2484
|
+
className: `w6w-rel-show-all${I ? ` ${I}` : ""}`,
|
|
2467
2485
|
onClick: u,
|
|
2468
|
-
children:
|
|
2486
|
+
children: R
|
|
2469
2487
|
}
|
|
2470
2488
|
) : null;
|
|
2471
2489
|
};
|
|
@@ -2475,9 +2493,9 @@ function As({
|
|
|
2475
2493
|
(f == null ? void 0 : f.header) ?? "Service reliability",
|
|
2476
2494
|
" ",
|
|
2477
2495
|
n && /* @__PURE__ */ i("span", { className: "w6w-muted w6w-small", children: [
|
|
2478
|
-
|
|
2496
|
+
Bt(n.from),
|
|
2479
2497
|
" – ",
|
|
2480
|
-
|
|
2498
|
+
Bt(n.to),
|
|
2481
2499
|
" · ",
|
|
2482
2500
|
n.days,
|
|
2483
2501
|
" days"
|
|
@@ -2492,33 +2510,33 @@ function As({
|
|
|
2492
2510
|
/* @__PURE__ */ t("h4", { children: "All clear" }),
|
|
2493
2511
|
/* @__PURE__ */ i("p", { children: [
|
|
2494
2512
|
"Every service you called in the last ",
|
|
2495
|
-
|
|
2513
|
+
g,
|
|
2496
2514
|
" days came back",
|
|
2497
2515
|
" ",
|
|
2498
|
-
/* @__PURE__ */ t(
|
|
2516
|
+
/* @__PURE__ */ t(lt, { state: "ok" }),
|
|
2499
2517
|
" — no degraded stretches, no outages."
|
|
2500
2518
|
] })
|
|
2501
2519
|
] }),
|
|
2502
2520
|
e.length === 0 && ((f == null ? void 0 : f.empty) ?? /* @__PURE__ */ t("div", { className: s ? void 0 : "w6w-rel-card", children: /* @__PURE__ */ t("p", { className: "w6w-muted", children: "No services yet — connect an integration or use a service in this project." }) })),
|
|
2503
|
-
e.length > 0 && /* @__PURE__ */ i(
|
|
2504
|
-
|
|
2521
|
+
e.length > 0 && /* @__PURE__ */ i(_, { children: [
|
|
2522
|
+
m > 0 && /* @__PURE__ */ i("div", { className: "w6w-rel-group", children: [
|
|
2505
2523
|
/* @__PURE__ */ i("h4", { className: "w6w-rel-group-head", children: [
|
|
2506
2524
|
"Needs attention",
|
|
2507
2525
|
" ",
|
|
2508
2526
|
/* @__PURE__ */ i("span", { className: "w6w-muted w6w-small", children: [
|
|
2509
2527
|
h.length + y.length,
|
|
2510
2528
|
" of ",
|
|
2511
|
-
|
|
2529
|
+
m
|
|
2512
2530
|
] })
|
|
2513
2531
|
] }),
|
|
2514
|
-
/* @__PURE__ */ t("div", { className: "w6w-rel-issues", children: [...h, ...y].map((
|
|
2515
|
-
|
|
2516
|
-
|
|
2532
|
+
/* @__PURE__ */ t("div", { className: "w6w-rel-issues", children: [...h, ...y].map((R) => /* @__PURE__ */ t(Fa, { service: R, getHref: l, onOpen: c }, R.appId)) }),
|
|
2533
|
+
w > 0 && /* @__PURE__ */ i("p", { className: "w6w-muted w6w-small w6w-rel-more-note", children: [
|
|
2534
|
+
w,
|
|
2517
2535
|
" more ",
|
|
2518
|
-
|
|
2536
|
+
w === 1 ? "needs" : "need",
|
|
2519
2537
|
" ",
|
|
2520
2538
|
"attention",
|
|
2521
|
-
T && /* @__PURE__ */ i(
|
|
2539
|
+
T && /* @__PURE__ */ i(_, { children: [
|
|
2522
2540
|
" — ",
|
|
2523
2541
|
C("view all →")
|
|
2524
2542
|
] })
|
|
@@ -2528,11 +2546,11 @@ function As({
|
|
|
2528
2546
|
/* @__PURE__ */ t("h4", { className: "w6w-rel-group-head", children: "Performance across your APIs" }),
|
|
2529
2547
|
/* @__PURE__ */ t(Ua, { services: e, getHref: l, onOpen: c })
|
|
2530
2548
|
] }),
|
|
2531
|
-
|
|
2549
|
+
S.length > 0 && /* @__PURE__ */ i("div", { className: "w6w-rel-group", children: [
|
|
2532
2550
|
/* @__PURE__ */ i("h4", { className: "w6w-rel-group-head", children: [
|
|
2533
2551
|
s ? "Services" : "All services",
|
|
2534
2552
|
" ",
|
|
2535
|
-
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: s ? `${
|
|
2553
|
+
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: s ? `${S.length} of ${e.length}` : e.length })
|
|
2536
2554
|
] }),
|
|
2537
2555
|
/* @__PURE__ */ t("div", { className: "w6w-rel-table-wrap", children: /* @__PURE__ */ i("table", { className: "w6w-rel-table", children: [
|
|
2538
2556
|
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ i("tr", { children: [
|
|
@@ -2540,25 +2558,25 @@ function As({
|
|
|
2540
2558
|
/* @__PURE__ */ t("th", { children: "Status" }),
|
|
2541
2559
|
/* @__PURE__ */ i("th", { children: [
|
|
2542
2560
|
"Last ",
|
|
2543
|
-
|
|
2561
|
+
g,
|
|
2544
2562
|
" days"
|
|
2545
2563
|
] }),
|
|
2546
2564
|
/* @__PURE__ */ t("th", { children: "Latency" })
|
|
2547
2565
|
] }) }),
|
|
2548
|
-
/* @__PURE__ */ t("tbody", { children:
|
|
2566
|
+
/* @__PURE__ */ t("tbody", { children: S.map((R) => /* @__PURE__ */ t(
|
|
2549
2567
|
Ba,
|
|
2550
2568
|
{
|
|
2551
|
-
service:
|
|
2569
|
+
service: R,
|
|
2552
2570
|
getHref: l,
|
|
2553
2571
|
onOpen: c
|
|
2554
2572
|
},
|
|
2555
|
-
|
|
2573
|
+
R.appId
|
|
2556
2574
|
)) })
|
|
2557
2575
|
] }) }),
|
|
2558
2576
|
x > 0 && /* @__PURE__ */ i("p", { className: "w6w-muted w6w-small w6w-rel-more-note", children: [
|
|
2559
2577
|
x,
|
|
2560
2578
|
" more",
|
|
2561
|
-
T && /* @__PURE__ */ i(
|
|
2579
|
+
T && /* @__PURE__ */ i(_, { children: [
|
|
2562
2580
|
" — ",
|
|
2563
2581
|
C("view all →")
|
|
2564
2582
|
] })
|
|
@@ -2568,44 +2586,7 @@ function As({
|
|
|
2568
2586
|
] })
|
|
2569
2587
|
] });
|
|
2570
2588
|
}
|
|
2571
|
-
function
|
|
2572
|
-
return e.render ? e.render(n) : String(n[e.key] ?? "");
|
|
2573
|
-
}
|
|
2574
|
-
function he(e) {
|
|
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(R, { children: l }) : /* @__PURE__ */ t("div", { className: "w6w-data-table-frame", children: /* @__PURE__ */ i(
|
|
2577
|
-
"table",
|
|
2578
|
-
{
|
|
2579
|
-
className: d ? `w6w-data-table ${d}` : "w6w-data-table",
|
|
2580
|
-
"data-testid": u,
|
|
2581
|
-
"aria-busy": c ? !0 : void 0,
|
|
2582
|
-
children: [
|
|
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
|
-
/* @__PURE__ */ t("tbody", { children: a.map((f) => {
|
|
2585
|
-
var v;
|
|
2586
|
-
const m = o == null ? void 0 : o(f);
|
|
2587
|
-
return (
|
|
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
|
-
/* @__PURE__ */ t(
|
|
2590
|
-
"tr",
|
|
2591
|
-
{
|
|
2592
|
-
"data-testid": (v = e.rowTestId) == null ? void 0 : v.call(e, f),
|
|
2593
|
-
className: r ? "w6w-data-table-row-clickable" : void 0,
|
|
2594
|
-
onClick: r ? (w) => r(f, w) : void 0,
|
|
2595
|
-
children: n.map((w) => {
|
|
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
|
-
})
|
|
2599
|
-
},
|
|
2600
|
-
s(f)
|
|
2601
|
-
)
|
|
2602
|
-
);
|
|
2603
|
-
}) })
|
|
2604
|
-
]
|
|
2605
|
-
}
|
|
2606
|
-
) });
|
|
2607
|
-
}
|
|
2608
|
-
function Es({
|
|
2589
|
+
function As({
|
|
2609
2590
|
rows: e,
|
|
2610
2591
|
title: n,
|
|
2611
2592
|
description: a,
|
|
@@ -2617,25 +2598,25 @@ function Es({
|
|
|
2617
2598
|
error: d,
|
|
2618
2599
|
onCreate: u,
|
|
2619
2600
|
creating: f,
|
|
2620
|
-
onImport:
|
|
2601
|
+
onImport: g,
|
|
2621
2602
|
onOpen: v,
|
|
2622
|
-
getHref:
|
|
2603
|
+
getHref: m,
|
|
2623
2604
|
showArchived: h,
|
|
2624
2605
|
onShowArchivedChange: y,
|
|
2625
|
-
slots:
|
|
2606
|
+
slots: w
|
|
2626
2607
|
}) {
|
|
2627
|
-
const [
|
|
2628
|
-
N || x(
|
|
2629
|
-
},
|
|
2608
|
+
const [S, x] = b(!1), N = h !== void 0, T = N ? h : S, C = T ? e : e.filter(($) => !$.archived), R = v !== void 0 || m !== void 0, I = ($) => {
|
|
2609
|
+
N || x($), y == null || y($);
|
|
2610
|
+
}, j = [
|
|
2630
2611
|
{
|
|
2631
2612
|
key: "main",
|
|
2632
2613
|
header: "Name",
|
|
2633
|
-
render: (
|
|
2634
|
-
const
|
|
2635
|
-
/* @__PURE__ */ t("span", { children:
|
|
2636
|
-
|
|
2614
|
+
render: ($) => {
|
|
2615
|
+
const W = /* @__PURE__ */ i("span", { className: "w6w-callable-list-main", title: R ? o : void 0, children: [
|
|
2616
|
+
/* @__PURE__ */ t("span", { children: $.title }),
|
|
2617
|
+
$.description != null && /* @__PURE__ */ t("span", { className: "w6w-muted w6w-small w6w-callable-list-row-desc", children: $.description })
|
|
2637
2618
|
] });
|
|
2638
|
-
return v && !
|
|
2619
|
+
return v && !m ? /* @__PURE__ */ t("button", { type: "button", className: "w6w-callable-list-open", children: W }) : W;
|
|
2639
2620
|
}
|
|
2640
2621
|
},
|
|
2641
2622
|
{
|
|
@@ -2645,17 +2626,17 @@ function Es({
|
|
|
2645
2626
|
// Shrink to the badges (`1%` + the trail's `nowrap`): left unsized, the table split the
|
|
2646
2627
|
// width evenly and a "draft · 0 runs" column took half of it.
|
|
2647
2628
|
width: "1%",
|
|
2648
|
-
render: (
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2629
|
+
render: ($) => $.archived || $.badges != null || $.trailing != null ? /* @__PURE__ */ i("span", { className: "w6w-callable-list-trail", children: [
|
|
2630
|
+
$.badges,
|
|
2631
|
+
$.archived && /* @__PURE__ */ t("span", { className: "w6w-callable-list-badge", "data-testid": l == null ? void 0 : l.archivedBadge, children: "archived" }),
|
|
2632
|
+
$.trailing
|
|
2652
2633
|
] }) : null
|
|
2653
2634
|
}
|
|
2654
2635
|
], O = e.length > 0 && C.length === 0;
|
|
2655
2636
|
return /* @__PURE__ */ i("section", { className: "w6w-callable-list", children: [
|
|
2656
2637
|
/* @__PURE__ */ i("div", { className: "w6w-callable-list-head", children: [
|
|
2657
2638
|
/* @__PURE__ */ i("div", { className: "w6w-callable-list-heading", children: [
|
|
2658
|
-
(
|
|
2639
|
+
(w == null ? void 0 : w.header) ?? /* @__PURE__ */ i(_, { children: [
|
|
2659
2640
|
/* @__PURE__ */ t("h2", { className: "w6w-callable-list-title", children: n }),
|
|
2660
2641
|
a != null && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small w6w-callable-list-description", children: a })
|
|
2661
2642
|
] }),
|
|
@@ -2666,21 +2647,21 @@ function Es({
|
|
|
2666
2647
|
type: "checkbox",
|
|
2667
2648
|
checked: T,
|
|
2668
2649
|
"data-testid": l == null ? void 0 : l.showArchived,
|
|
2669
|
-
onChange: (
|
|
2650
|
+
onChange: ($) => I($.target.checked)
|
|
2670
2651
|
}
|
|
2671
2652
|
),
|
|
2672
2653
|
"Show archived"
|
|
2673
2654
|
] })
|
|
2674
2655
|
] }),
|
|
2675
2656
|
/* @__PURE__ */ i("div", { className: "w6w-callable-list-actions", children: [
|
|
2676
|
-
|
|
2677
|
-
|
|
2657
|
+
w == null ? void 0 : w.actions,
|
|
2658
|
+
g && /* @__PURE__ */ t(
|
|
2678
2659
|
"button",
|
|
2679
2660
|
{
|
|
2680
2661
|
type: "button",
|
|
2681
2662
|
className: "w6w-btn w6w-btn-ghost",
|
|
2682
2663
|
"data-testid": l == null ? void 0 : l.importOpen,
|
|
2683
|
-
onClick:
|
|
2664
|
+
onClick: g,
|
|
2684
2665
|
children: "Import"
|
|
2685
2666
|
}
|
|
2686
2667
|
),
|
|
@@ -2691,7 +2672,7 @@ function Es({
|
|
|
2691
2672
|
/* @__PURE__ */ i("div", { className: "w6w-callable-list-body", children: [
|
|
2692
2673
|
c && /* @__PURE__ */ t("p", { className: "w6w-muted", children: "Loading…" }),
|
|
2693
2674
|
C.length === 0 && !c ? O ? /* @__PURE__ */ t(
|
|
2694
|
-
|
|
2675
|
+
Oe,
|
|
2695
2676
|
{
|
|
2696
2677
|
testId: "w6w-callable-list-empty",
|
|
2697
2678
|
action: /* @__PURE__ */ t(
|
|
@@ -2699,28 +2680,28 @@ function Es({
|
|
|
2699
2680
|
{
|
|
2700
2681
|
type: "button",
|
|
2701
2682
|
className: "w6w-btn w6w-btn-ghost",
|
|
2702
|
-
onClick: () =>
|
|
2683
|
+
onClick: () => I(!0),
|
|
2703
2684
|
children: "Show archived"
|
|
2704
2685
|
}
|
|
2705
2686
|
),
|
|
2706
2687
|
children: e.length === 1 ? "The only item is archived." : `All ${e.length} items are archived.`
|
|
2707
2688
|
}
|
|
2708
|
-
) : /* @__PURE__ */ t(
|
|
2709
|
-
|
|
2689
|
+
) : /* @__PURE__ */ t(Oe, { testId: "w6w-callable-list-empty", children: (w == null ? void 0 : w.empty) ?? s }) : /* @__PURE__ */ t(
|
|
2690
|
+
pe,
|
|
2710
2691
|
{
|
|
2711
|
-
columns:
|
|
2692
|
+
columns: j,
|
|
2712
2693
|
rows: C,
|
|
2713
|
-
rowKey: (
|
|
2694
|
+
rowKey: ($) => $.id,
|
|
2714
2695
|
className: "w6w-data-table-rows",
|
|
2715
2696
|
loading: c,
|
|
2716
|
-
getRowHref:
|
|
2717
|
-
onRowClick: v ? (
|
|
2697
|
+
getRowHref: m ? ($) => m($.id) : void 0,
|
|
2698
|
+
onRowClick: v ? ($, W) => v($.id, W) : void 0
|
|
2718
2699
|
}
|
|
2719
2700
|
)
|
|
2720
2701
|
] })
|
|
2721
2702
|
] });
|
|
2722
2703
|
}
|
|
2723
|
-
function
|
|
2704
|
+
function Es({
|
|
2724
2705
|
connections: e,
|
|
2725
2706
|
appsById: n,
|
|
2726
2707
|
loading: a,
|
|
@@ -2732,44 +2713,44 @@ function Rs({
|
|
|
2732
2713
|
busy: d,
|
|
2733
2714
|
slots: u
|
|
2734
2715
|
}) {
|
|
2735
|
-
const f = n ?? /* @__PURE__ */ new Map(),
|
|
2716
|
+
const f = n ?? /* @__PURE__ */ new Map(), g = l !== void 0 || c !== void 0, v = [
|
|
2736
2717
|
{
|
|
2737
2718
|
key: "name",
|
|
2738
2719
|
header: "Name",
|
|
2739
|
-
render: (
|
|
2740
|
-
const h = Pn(
|
|
2720
|
+
render: (m) => {
|
|
2721
|
+
const h = Pn(m, f), y = m.displayName || m.id;
|
|
2741
2722
|
return /* @__PURE__ */ i("span", { className: "w6w-connection-cell-name", children: [
|
|
2742
2723
|
/* @__PURE__ */ t(
|
|
2743
|
-
|
|
2724
|
+
De,
|
|
2744
2725
|
{
|
|
2745
2726
|
src: h == null ? void 0 : h.iconSvg,
|
|
2746
2727
|
srcDark: h == null ? void 0 : h.iconSvgDark,
|
|
2747
2728
|
brandColor: h == null ? void 0 : h.brandColor,
|
|
2748
|
-
name: (h == null ? void 0 : h.displayName) ??
|
|
2729
|
+
name: (h == null ? void 0 : h.displayName) ?? m.appId
|
|
2749
2730
|
}
|
|
2750
2731
|
),
|
|
2751
2732
|
/* @__PURE__ */ t("strong", { className: "w6w-connection-name", title: y, children: y }),
|
|
2752
2733
|
" ",
|
|
2753
|
-
/* @__PURE__ */ t("span", { className: "w6w-muted", children: (h == null ? void 0 : h.displayName) ??
|
|
2734
|
+
/* @__PURE__ */ t("span", { className: "w6w-muted", children: (h == null ? void 0 : h.displayName) ?? m.appId })
|
|
2754
2735
|
] });
|
|
2755
2736
|
}
|
|
2756
2737
|
},
|
|
2757
2738
|
{
|
|
2758
2739
|
key: "status",
|
|
2759
2740
|
header: "Status",
|
|
2760
|
-
render: (
|
|
2741
|
+
render: (m) => /* @__PURE__ */ i(_, { children: [
|
|
2761
2742
|
"auth ",
|
|
2762
|
-
/* @__PURE__ */ t("code", { children:
|
|
2743
|
+
/* @__PURE__ */ t("code", { children: m.authKey }),
|
|
2763
2744
|
" ·",
|
|
2764
2745
|
" ",
|
|
2765
2746
|
/* @__PURE__ */ t(
|
|
2766
2747
|
"span",
|
|
2767
2748
|
{
|
|
2768
|
-
className: `w6w-connection-tag${
|
|
2769
|
-
children:
|
|
2749
|
+
className: `w6w-connection-tag${m.state === "connected" ? "" : " w6w-connection-tag-warn"}`,
|
|
2750
|
+
children: m.state
|
|
2770
2751
|
}
|
|
2771
2752
|
),
|
|
2772
|
-
|
|
2753
|
+
m.lastTestOk === !1 && /* @__PURE__ */ t(
|
|
2773
2754
|
"span",
|
|
2774
2755
|
{
|
|
2775
2756
|
className: "w6w-connection-tag w6w-connection-tag-danger",
|
|
@@ -2780,30 +2761,30 @@ function Rs({
|
|
|
2780
2761
|
] })
|
|
2781
2762
|
}
|
|
2782
2763
|
];
|
|
2783
|
-
return
|
|
2764
|
+
return g && v.push({
|
|
2784
2765
|
key: "actions",
|
|
2785
2766
|
header: "",
|
|
2786
2767
|
align: "right",
|
|
2787
2768
|
link: !1,
|
|
2788
|
-
render: (
|
|
2769
|
+
render: (m) => m.builtIn === !0 ? null : (
|
|
2789
2770
|
// Clicks here must not reach the row's onOpen.
|
|
2790
2771
|
// biome-ignore lint/a11y/useKeyWithClickEvents: propagation guard only; the buttons inside are the controls.
|
|
2791
2772
|
/* @__PURE__ */ i("div", { className: "w6w-connection-row-actions", onClick: (h) => h.stopPropagation(), children: [
|
|
2792
2773
|
l && /* @__PURE__ */ t(
|
|
2793
|
-
|
|
2774
|
+
Yt,
|
|
2794
2775
|
{
|
|
2795
2776
|
label: "Edit",
|
|
2796
|
-
onClick: () => l(
|
|
2797
|
-
"data-testid": `connection-edit-${
|
|
2777
|
+
onClick: () => l(m),
|
|
2778
|
+
"data-testid": `connection-edit-${m.id}`
|
|
2798
2779
|
}
|
|
2799
2780
|
),
|
|
2800
2781
|
c && /* @__PURE__ */ t(
|
|
2801
|
-
|
|
2782
|
+
fe,
|
|
2802
2783
|
{
|
|
2803
2784
|
label: "Delete",
|
|
2804
|
-
onClick: () => c(
|
|
2785
|
+
onClick: () => c(m),
|
|
2805
2786
|
disabled: d,
|
|
2806
|
-
"data-testid": `connection-delete-${
|
|
2787
|
+
"data-testid": `connection-delete-${m.id}`
|
|
2807
2788
|
}
|
|
2808
2789
|
)
|
|
2809
2790
|
] })
|
|
@@ -2815,109 +2796,111 @@ function Rs({
|
|
|
2815
2796
|
] }),
|
|
2816
2797
|
s && /* @__PURE__ */ t("div", { className: "w6w-error", children: s }),
|
|
2817
2798
|
a && /* @__PURE__ */ t("p", { className: "w6w-muted", children: "Loading…" }),
|
|
2818
|
-
e.length === 0 && !a ? /* @__PURE__ */ t(
|
|
2819
|
-
|
|
2799
|
+
e.length === 0 && !a ? /* @__PURE__ */ t(Oe, { testId: "w6w-connection-list-empty", children: (u == null ? void 0 : u.empty) ?? "No connections yet." }) : /* @__PURE__ */ t(
|
|
2800
|
+
pe,
|
|
2820
2801
|
{
|
|
2821
2802
|
columns: v,
|
|
2822
2803
|
rows: e,
|
|
2823
|
-
rowKey: (
|
|
2804
|
+
rowKey: (m) => m.id,
|
|
2824
2805
|
loading: a,
|
|
2825
|
-
getRowHref: o ? (
|
|
2826
|
-
onRowClick: r ? (
|
|
2806
|
+
getRowHref: o ? (m) => m.builtIn === !0 ? void 0 : o(m.id) : void 0,
|
|
2807
|
+
onRowClick: r ? (m, h) => m.builtIn === !0 ? void 0 : r(m.id, h) : void 0
|
|
2827
2808
|
}
|
|
2828
2809
|
)
|
|
2829
2810
|
] });
|
|
2830
2811
|
}
|
|
2831
|
-
function
|
|
2832
|
-
const s =
|
|
2833
|
-
|
|
2812
|
+
function Rs({ connection: e, onClose: n, onSaved: a }) {
|
|
2813
|
+
const s = Wt(), r = s.updateConnection, o = e.builtIn === !0, l = !o && typeof r == "function", [c, d] = b(e.displayName ?? ""), [u, f] = b(e.authKey), [g, v] = b({}), [m, h] = b(null), [y, w] = b(null), [S, x] = b(!1), [N, T] = b({}), [C, R] = b(null), [I, j] = b(null), [O, $] = b(null), [W, re] = b(null);
|
|
2814
|
+
Q(() => {
|
|
2834
2815
|
if (!l) return;
|
|
2835
|
-
let
|
|
2836
|
-
return h(null), s.getAppAuth(e.appId).then((
|
|
2837
|
-
|
|
2816
|
+
let k = !1;
|
|
2817
|
+
return h(null), s.getAppAuth(e.appId).then((A) => !k && h(A)).catch((A) => !k && w(A.message)), () => {
|
|
2818
|
+
k = !0;
|
|
2838
2819
|
};
|
|
2839
2820
|
}, [s, l, e.appId]);
|
|
2840
|
-
const
|
|
2841
|
-
(
|
|
2842
|
-
)) ?? [],
|
|
2843
|
-
|
|
2844
|
-
if (!l ||
|
|
2821
|
+
const P = m == null ? void 0 : m.find((k) => k.key === u), q = u !== e.authKey, te = (m == null ? void 0 : m.filter(
|
|
2822
|
+
(k) => k.key === e.authKey || k.available !== !1 && !k.autoSatisfied && ["apiKey", "bearer", "basic", "custom"].includes(k.type)
|
|
2823
|
+
)) ?? [], Y = (P == null ? void 0 : P.type) === "oauth2", D = Y ? [] : (P == null ? void 0 : P.fields) ?? [], J = e.credentialId, oe = !q && !!J && typeof s.rotateCredential == "function" && (I !== null ? !I.startsWith("legacy:") : (P == null ? void 0 : P.type) === "serviceAccount") && O !== !0 && !Y, H = oe && O === !1 && P !== void 0 && !P.serviceAccount, z = oe && !H, ce = !q && !Y && !!J && typeof s.getCredential == "function" && O === null, V = z && (P != null && P.serviceAccount) ? Ln(P.serviceAccount) : [];
|
|
2824
|
+
Q(() => {
|
|
2825
|
+
if (!l || q || Y || !J || typeof s.getCredential != "function")
|
|
2845
2826
|
return;
|
|
2846
|
-
let
|
|
2847
|
-
return s.getCredential(
|
|
2848
|
-
|
|
2827
|
+
let k = !1;
|
|
2828
|
+
return s.getCredential(J).then((A) => {
|
|
2829
|
+
k || (R(A.connectionCount), j(A.contract), $(A.private === !0));
|
|
2849
2830
|
}).catch(() => {
|
|
2850
2831
|
}), () => {
|
|
2851
|
-
|
|
2832
|
+
k = !0;
|
|
2852
2833
|
};
|
|
2853
|
-
}, [s, l,
|
|
2854
|
-
function
|
|
2855
|
-
if (
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
const
|
|
2859
|
-
|
|
2834
|
+
}, [s, l, q, Y, J]);
|
|
2835
|
+
function ve() {
|
|
2836
|
+
if (H)
|
|
2837
|
+
return c !== (e.displayName ?? "") ? { displayName: c } : null;
|
|
2838
|
+
if (z) {
|
|
2839
|
+
const L = {};
|
|
2840
|
+
c !== (e.displayName ?? "") && (L.displayName = c);
|
|
2841
|
+
const F = Un(V, N);
|
|
2842
|
+
return F && (L.binding = F), L.displayName === void 0 && L.binding === void 0 ? null : L;
|
|
2860
2843
|
}
|
|
2861
|
-
const
|
|
2862
|
-
for (const
|
|
2863
|
-
const
|
|
2864
|
-
|
|
2844
|
+
const k = {};
|
|
2845
|
+
for (const L of H ? [] : D) {
|
|
2846
|
+
const F = g[L.key];
|
|
2847
|
+
F !== void 0 && F !== "" && (k[L.key] = F);
|
|
2865
2848
|
}
|
|
2866
|
-
const
|
|
2867
|
-
return
|
|
2849
|
+
const A = {};
|
|
2850
|
+
return q && (A.authKey = u, A.credential = k), c !== (e.displayName ?? "") && (A.displayName = c), Object.keys(k).length > 0 && (A.credential = k), A.displayName === void 0 && A.credential === void 0 ? null : A;
|
|
2868
2851
|
}
|
|
2869
|
-
async function
|
|
2870
|
-
if (!l || !r ||
|
|
2871
|
-
|
|
2872
|
-
const
|
|
2873
|
-
|
|
2874
|
-
),
|
|
2875
|
-
if (!
|
|
2876
|
-
|
|
2852
|
+
async function U() {
|
|
2853
|
+
if (!l || !r || S) return;
|
|
2854
|
+
w(null);
|
|
2855
|
+
const k = ve(), A = Object.fromEntries(
|
|
2856
|
+
(H ? [] : D).filter((M) => g[M.key] !== void 0 && g[M.key] !== "").map((M) => [M.key, g[M.key]])
|
|
2857
|
+
), L = Object.keys(A).length > 0;
|
|
2858
|
+
if (!k && !L) {
|
|
2859
|
+
w("Nothing to update — change the name or a credential or binding field.");
|
|
2877
2860
|
return;
|
|
2878
2861
|
}
|
|
2879
|
-
if (
|
|
2880
|
-
const M =
|
|
2862
|
+
if (q || z && L) {
|
|
2863
|
+
const M = D.filter((le) => le.required && !(le.key in A));
|
|
2881
2864
|
if (M.length > 0) {
|
|
2882
|
-
|
|
2865
|
+
w(`Enter the full new credential: ${M.map((le) => le.label).join(", ")}.`);
|
|
2883
2866
|
return;
|
|
2884
2867
|
}
|
|
2885
2868
|
}
|
|
2886
|
-
const
|
|
2887
|
-
if ("error" in
|
|
2888
|
-
|
|
2869
|
+
const F = Dn(D, A);
|
|
2870
|
+
if ("error" in F) {
|
|
2871
|
+
w(F.error);
|
|
2889
2872
|
return;
|
|
2890
2873
|
}
|
|
2891
2874
|
x(!0);
|
|
2892
|
-
let
|
|
2875
|
+
let ae = !1;
|
|
2893
2876
|
try {
|
|
2894
|
-
|
|
2895
|
-
const M =
|
|
2877
|
+
z && L && J && s.rotateCredential ? (await s.rotateCredential(J, { source: F.values }), ae = !0, v({}), re(null)) : k != null && k.credential && (k.credential = F.values);
|
|
2878
|
+
const M = k ? await r.call(s, e.id, k) : e;
|
|
2896
2879
|
v({}), a(M);
|
|
2897
2880
|
} catch (M) {
|
|
2898
|
-
|
|
2899
|
-
|
|
2881
|
+
w(
|
|
2882
|
+
ae ? `The credential was saved, but the other changes failed. Click Save to retry them. ${M.message}` : M.message
|
|
2900
2883
|
);
|
|
2901
2884
|
} finally {
|
|
2902
2885
|
x(!1);
|
|
2903
2886
|
}
|
|
2904
2887
|
}
|
|
2905
|
-
async function
|
|
2906
|
-
if (!(!
|
|
2907
|
-
|
|
2888
|
+
async function Ne() {
|
|
2889
|
+
if (!(!J || !s.testCredential)) {
|
|
2890
|
+
w(null);
|
|
2908
2891
|
try {
|
|
2909
|
-
|
|
2910
|
-
} catch (
|
|
2911
|
-
|
|
2892
|
+
re(await s.testCredential(J));
|
|
2893
|
+
} catch (k) {
|
|
2894
|
+
w(k.message);
|
|
2912
2895
|
}
|
|
2913
2896
|
}
|
|
2914
2897
|
}
|
|
2915
|
-
const
|
|
2916
|
-
return /* @__PURE__ */ t(
|
|
2898
|
+
const ne = Mn(U, { enabled: l && !S });
|
|
2899
|
+
return /* @__PURE__ */ t(_e, { title: "Edit connection", onClose: n, children: /* @__PURE__ */ i("div", { className: "w6w-stepconfig", children: [
|
|
2917
2900
|
/* @__PURE__ */ t("div", { className: "w6w-modal-body", children: /* @__PURE__ */ i("div", { className: "w6w-stack", children: [
|
|
2918
2901
|
o && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "This connection is built in — it has no stored credential to edit." }),
|
|
2919
2902
|
!o && !l && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Editing connections is not available here." }),
|
|
2920
|
-
l && /* @__PURE__ */ i(
|
|
2903
|
+
l && /* @__PURE__ */ i(_, { children: [
|
|
2921
2904
|
/* @__PURE__ */ i("label", { className: "w6w-field", children: [
|
|
2922
2905
|
/* @__PURE__ */ t("span", { children: "Display name" }),
|
|
2923
2906
|
/* @__PURE__ */ t(
|
|
@@ -2925,7 +2908,7 @@ function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
|
2925
2908
|
{
|
|
2926
2909
|
type: "text",
|
|
2927
2910
|
value: c,
|
|
2928
|
-
onChange: (
|
|
2911
|
+
onChange: (k) => d(k.target.value),
|
|
2929
2912
|
placeholder: "Connection name",
|
|
2930
2913
|
maxLength: 80,
|
|
2931
2914
|
name: "w6w-connection-label",
|
|
@@ -2934,58 +2917,58 @@ function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
|
2934
2917
|
"data-lpignore": "true",
|
|
2935
2918
|
"data-bwignore": "true",
|
|
2936
2919
|
"data-form-type": "other",
|
|
2937
|
-
...
|
|
2920
|
+
...ne
|
|
2938
2921
|
}
|
|
2939
2922
|
)
|
|
2940
2923
|
] }),
|
|
2941
|
-
|
|
2924
|
+
te.some((k) => k.key !== e.authKey) && /* @__PURE__ */ i("label", { className: "w6w-field", children: [
|
|
2942
2925
|
/* @__PURE__ */ t("span", { children: "Authentication method" }),
|
|
2943
2926
|
/* @__PURE__ */ i(
|
|
2944
2927
|
"select",
|
|
2945
2928
|
{
|
|
2946
2929
|
name: "w6w-connection-auth",
|
|
2947
2930
|
value: u,
|
|
2948
|
-
disabled:
|
|
2949
|
-
onChange: (
|
|
2950
|
-
f(
|
|
2931
|
+
disabled: S,
|
|
2932
|
+
onChange: (k) => {
|
|
2933
|
+
f(k.target.value), v({}), T({}), re(null), w(null);
|
|
2951
2934
|
},
|
|
2952
2935
|
children: [
|
|
2953
|
-
!
|
|
2954
|
-
|
|
2936
|
+
!te.some((k) => k.key === e.authKey) && /* @__PURE__ */ t("option", { value: e.authKey, children: e.authKey }),
|
|
2937
|
+
te.map((k) => /* @__PURE__ */ t("option", { value: k.key, children: k.displayName ?? k.key }, k.key))
|
|
2955
2938
|
]
|
|
2956
2939
|
}
|
|
2957
2940
|
)
|
|
2958
2941
|
] }),
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2942
|
+
q && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Enter the new credential and click Save. This connection stays linked to your existing workflows." }),
|
|
2943
|
+
m === null && !y && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Loading auth fields…" }),
|
|
2944
|
+
Y && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: te.some((k) => k.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." }),
|
|
2945
|
+
z && V.length > 0 && /* @__PURE__ */ i(_, { children: [
|
|
2963
2946
|
/* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Leave a binding field blank to keep it unchanged." }),
|
|
2964
2947
|
/* @__PURE__ */ t(
|
|
2965
|
-
|
|
2948
|
+
Je,
|
|
2966
2949
|
{
|
|
2967
2950
|
mode: "edit",
|
|
2968
|
-
fields:
|
|
2951
|
+
fields: V,
|
|
2969
2952
|
values: N,
|
|
2970
2953
|
onChange: T,
|
|
2971
|
-
enterSubmitProps:
|
|
2954
|
+
enterSubmitProps: ne
|
|
2972
2955
|
}
|
|
2973
2956
|
)
|
|
2974
2957
|
] }),
|
|
2975
|
-
|
|
2958
|
+
oe && /* @__PURE__ */ i("div", { className: "w6w-stack", "data-w6w": "credential-section", children: [
|
|
2976
2959
|
typeof s.testCredential == "function" && /* @__PURE__ */ i("div", { children: [
|
|
2977
2960
|
/* @__PURE__ */ t(
|
|
2978
2961
|
"button",
|
|
2979
2962
|
{
|
|
2980
2963
|
type: "button",
|
|
2981
2964
|
className: "w6w-btn w6w-btn-ghost",
|
|
2982
|
-
onClick:
|
|
2965
|
+
onClick: Ne,
|
|
2983
2966
|
children: "Test credential"
|
|
2984
2967
|
}
|
|
2985
2968
|
),
|
|
2986
|
-
|
|
2969
|
+
W && /* @__PURE__ */ i("p", { className: "w6w-small", "data-w6w": "credential-health", children: [
|
|
2987
2970
|
"Credential health: ",
|
|
2988
|
-
|
|
2971
|
+
W.ok ? "ok" : W.code ?? "failed"
|
|
2989
2972
|
] })
|
|
2990
2973
|
] }),
|
|
2991
2974
|
/* @__PURE__ */ i("p", { className: "w6w-small", "data-w6w": "app-access", children: [
|
|
@@ -2993,33 +2976,34 @@ function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
|
2993
2976
|
" ",
|
|
2994
2977
|
e.lastTestOk === !0 ? "passed" : e.lastTestOk === !1 ? "failed" : "never tested"
|
|
2995
2978
|
] }),
|
|
2996
|
-
|
|
2979
|
+
z && !ce && D.length > 0 && /* @__PURE__ */ i(_, { children: [
|
|
2997
2980
|
/* @__PURE__ */ i("p", { className: "w6w-muted w6w-small", children: [
|
|
2998
2981
|
"Leave the credential blank to keep it unchanged. To replace it, enter the full new credential and click Save.",
|
|
2999
2982
|
C !== null && C > 1 && ` This credential is used by ${C} connections; saving a new credential updates all of them.`
|
|
3000
2983
|
] }),
|
|
3001
2984
|
/* @__PURE__ */ t(
|
|
3002
|
-
|
|
2985
|
+
Je,
|
|
3003
2986
|
{
|
|
3004
2987
|
mode: "edit",
|
|
3005
|
-
fields:
|
|
3006
|
-
values:
|
|
2988
|
+
fields: D,
|
|
2989
|
+
values: g,
|
|
3007
2990
|
onChange: v,
|
|
3008
|
-
enterSubmitProps:
|
|
2991
|
+
enterSubmitProps: ne
|
|
3009
2992
|
}
|
|
3010
2993
|
)
|
|
3011
|
-
] })
|
|
2994
|
+
] }),
|
|
2995
|
+
H && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", "data-w6w": "shared-credential-note", children: "Uses a shared credential. Rotate it under Integrations → Shared credentials." })
|
|
3012
2996
|
] }),
|
|
3013
|
-
!
|
|
3014
|
-
!
|
|
2997
|
+
!z && !H && !ce && D.length > 0 && /* @__PURE__ */ i(_, { children: [
|
|
2998
|
+
!q && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Leave a field blank to keep it unchanged. Filled fields replace the stored credential." }),
|
|
3015
2999
|
/* @__PURE__ */ t(
|
|
3016
|
-
|
|
3000
|
+
Je,
|
|
3017
3001
|
{
|
|
3018
3002
|
mode: "edit",
|
|
3019
|
-
fields:
|
|
3020
|
-
values:
|
|
3003
|
+
fields: D,
|
|
3004
|
+
values: g,
|
|
3021
3005
|
onChange: v,
|
|
3022
|
-
enterSubmitProps:
|
|
3006
|
+
enterSubmitProps: ne
|
|
3023
3007
|
}
|
|
3024
3008
|
)
|
|
3025
3009
|
] })
|
|
@@ -3028,14 +3012,14 @@ function _s({ connection: e, onClose: n, onSaved: a }) {
|
|
|
3028
3012
|
] }) }),
|
|
3029
3013
|
/* @__PURE__ */ i("div", { className: "w6w-modal-actions", children: [
|
|
3030
3014
|
/* @__PURE__ */ t("button", { type: "button", className: "w6w-btn w6w-btn-ghost", onClick: n, children: "Cancel" }),
|
|
3031
|
-
l && /* @__PURE__ */ t("button", { type: "button", className: "w6w-btn", disabled:
|
|
3015
|
+
l && /* @__PURE__ */ t("button", { type: "button", className: "w6w-btn", disabled: S, onClick: U, children: S ? "Saving…" : "Save" })
|
|
3032
3016
|
] })
|
|
3033
3017
|
] }) });
|
|
3034
3018
|
}
|
|
3035
|
-
function
|
|
3019
|
+
function _s({ conn: e, app: n, children: a }) {
|
|
3036
3020
|
return /* @__PURE__ */ i("div", { className: "w6w-connection-header", "data-testid": "connection-header", children: [
|
|
3037
3021
|
/* @__PURE__ */ t(
|
|
3038
|
-
|
|
3022
|
+
De,
|
|
3039
3023
|
{
|
|
3040
3024
|
src: n == null ? void 0 : n.iconSvg,
|
|
3041
3025
|
srcDark: n == null ? void 0 : n.iconSvgDark,
|
|
@@ -3075,12 +3059,12 @@ function Os({ conn: e, app: n, children: a }) {
|
|
|
3075
3059
|
a && /* @__PURE__ */ t("div", { className: "w6w-connection-header-actions", children: a })
|
|
3076
3060
|
] });
|
|
3077
3061
|
}
|
|
3078
|
-
const
|
|
3079
|
-
function
|
|
3062
|
+
const Ka = (e) => String(e);
|
|
3063
|
+
function Kt(e) {
|
|
3080
3064
|
const n = Math.min(100, Math.max(0, e));
|
|
3081
3065
|
return Number(n.toFixed(4));
|
|
3082
3066
|
}
|
|
3083
|
-
function
|
|
3067
|
+
function Os({
|
|
3084
3068
|
label: e,
|
|
3085
3069
|
used: n,
|
|
3086
3070
|
limit: a,
|
|
@@ -3089,12 +3073,12 @@ function Is({
|
|
|
3089
3073
|
className: o,
|
|
3090
3074
|
testId: l
|
|
3091
3075
|
}) {
|
|
3092
|
-
const c = r ??
|
|
3093
|
-
return
|
|
3076
|
+
const c = r ?? Ka, d = Number.isFinite(s) && s > 0, u = a > 0 ? Kt(n / a * 100) : 100, f = d && a > 0 ? Kt(Math.min(100 - u, s / a * 100)) : 0, g = n >= a, v = `${c(n)} / ${c(a)}`, m = ["w6w-budget-meter"];
|
|
3077
|
+
return g && m.push("w6w-budget-meter-over"), o && m.push(o), /* @__PURE__ */ i(
|
|
3094
3078
|
"div",
|
|
3095
3079
|
{
|
|
3096
3080
|
role: "meter",
|
|
3097
|
-
className:
|
|
3081
|
+
className: m.join(" "),
|
|
3098
3082
|
"aria-label": e,
|
|
3099
3083
|
"aria-valuemin": 0,
|
|
3100
3084
|
"aria-valuenow": n,
|
|
@@ -3114,17 +3098,17 @@ function Is({
|
|
|
3114
3098
|
}
|
|
3115
3099
|
);
|
|
3116
3100
|
}
|
|
3117
|
-
const
|
|
3101
|
+
const ja = {
|
|
3118
3102
|
kv: "Key-value",
|
|
3119
3103
|
doc: "Document",
|
|
3120
3104
|
table: "Table"
|
|
3121
|
-
},
|
|
3122
|
-
function
|
|
3105
|
+
}, Is = ["kv", "doc", "table"], tn = ["string", "number", "integer", "boolean", "date", "datetime"], Ja = 5242880;
|
|
3106
|
+
function Ps(e) {
|
|
3123
3107
|
var a;
|
|
3124
3108
|
const n = (a = e.schema) == null ? void 0 : a.valueType;
|
|
3125
|
-
return typeof n == "string" &&
|
|
3109
|
+
return typeof n == "string" && tn.includes(n) ? n : "string";
|
|
3126
3110
|
}
|
|
3127
|
-
function
|
|
3111
|
+
function Ls(e) {
|
|
3128
3112
|
var s, r;
|
|
3129
3113
|
if (e.kind !== "table") return null;
|
|
3130
3114
|
const n = (s = e.schema) == null ? void 0 : s.columns;
|
|
@@ -3132,62 +3116,62 @@ function Ms(e) {
|
|
|
3132
3116
|
const a = (r = e.schema) == null ? void 0 : r.key;
|
|
3133
3117
|
return typeof a == "string" ? { columns: n, key: a } : { columns: n };
|
|
3134
3118
|
}
|
|
3135
|
-
function
|
|
3119
|
+
function Ms(e, n) {
|
|
3136
3120
|
const a = e == null ? void 0 : e.match(/filename="([^"]*)"/), s = a == null ? void 0 : a[1];
|
|
3137
3121
|
return s !== void 0 && s !== "" ? s : `${n}.csv`;
|
|
3138
3122
|
}
|
|
3139
|
-
const
|
|
3123
|
+
const Wa = {
|
|
3140
3124
|
required: "Required.",
|
|
3141
3125
|
not_a_number: "Enter a number.",
|
|
3142
3126
|
not_an_integer: "Enter a whole number.",
|
|
3143
3127
|
not_a_boolean: "Enter true or false.",
|
|
3144
3128
|
not_a_date: "Enter a date as YYYY-MM-DD.",
|
|
3145
3129
|
not_a_datetime: "Enter a date-time like 2026-01-31T09:30:00Z."
|
|
3146
|
-
},
|
|
3147
|
-
function
|
|
3130
|
+
}, Va = /^-?(0|[1-9]\d*)(\.\d+)?([eE][+-]?\d+)?$/, qa = /^-?(0|[1-9]\d*)$/, Ha = /^\d{4}-\d{2}-\d{2}$/, za = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$/;
|
|
3131
|
+
function Ya(e, n) {
|
|
3148
3132
|
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];
|
|
3149
3133
|
}
|
|
3150
|
-
function
|
|
3151
|
-
if (!
|
|
3134
|
+
function ct(e) {
|
|
3135
|
+
if (!Ha.test(e)) return null;
|
|
3152
3136
|
const n = Number(e.slice(0, 4)), a = Number(e.slice(5, 7)), s = Number(e.slice(8, 10));
|
|
3153
|
-
return a < 1 || a > 12 || s < 1 || s >
|
|
3137
|
+
return a < 1 || a > 12 || s < 1 || s > Ya(n, a) ? null : { year: n, month: a, day: s };
|
|
3154
3138
|
}
|
|
3155
|
-
function
|
|
3156
|
-
return { ok: !1, problem: e, message:
|
|
3139
|
+
function Z(e) {
|
|
3140
|
+
return { ok: !1, problem: e, message: Wa[e] };
|
|
3157
3141
|
}
|
|
3158
|
-
function
|
|
3142
|
+
function dt(e, n, a) {
|
|
3159
3143
|
const s = n.trim();
|
|
3160
3144
|
if (s === "")
|
|
3161
|
-
return a ?
|
|
3145
|
+
return a ? Z("required") : { ok: !0, value: void 0 };
|
|
3162
3146
|
switch (e) {
|
|
3163
3147
|
case "string":
|
|
3164
3148
|
return { ok: !0, value: n };
|
|
3165
3149
|
case "number": {
|
|
3166
|
-
if (!
|
|
3150
|
+
if (!Va.test(s)) return Z("not_a_number");
|
|
3167
3151
|
const r = Number(s);
|
|
3168
|
-
return Number.isFinite(r) ? { ok: !0, value: r } :
|
|
3152
|
+
return Number.isFinite(r) ? { ok: !0, value: r } : Z("not_a_number");
|
|
3169
3153
|
}
|
|
3170
3154
|
case "integer": {
|
|
3171
|
-
if (!
|
|
3155
|
+
if (!qa.test(s)) return Z("not_an_integer");
|
|
3172
3156
|
const r = Number(s);
|
|
3173
|
-
return Number.isSafeInteger(r) ? { ok: !0, value: r } :
|
|
3157
|
+
return Number.isSafeInteger(r) ? { ok: !0, value: r } : Z("not_an_integer");
|
|
3174
3158
|
}
|
|
3175
3159
|
case "boolean":
|
|
3176
|
-
return s === "true" ? { ok: !0, value: !0 } : s === "false" ? { ok: !0, value: !1 } :
|
|
3160
|
+
return s === "true" ? { ok: !0, value: !0 } : s === "false" ? { ok: !0, value: !1 } : Z("not_a_boolean");
|
|
3177
3161
|
case "date":
|
|
3178
|
-
return
|
|
3162
|
+
return ct(s) === null ? Z("not_a_date") : { ok: !0, value: s };
|
|
3179
3163
|
case "datetime":
|
|
3180
|
-
return
|
|
3164
|
+
return nn(s) ? { ok: !0, value: s } : Z("not_a_datetime");
|
|
3181
3165
|
}
|
|
3182
3166
|
}
|
|
3183
|
-
function
|
|
3184
|
-
if (!
|
|
3167
|
+
function nn(e) {
|
|
3168
|
+
if (!za.test(e) || ct(e.slice(0, 10)) === null) return !1;
|
|
3185
3169
|
const n = Number(e.slice(11, 13)), a = Number(e.slice(14, 16)), s = Number(e.slice(17, 19));
|
|
3186
3170
|
if (n > 23 || a > 59 || s > 59) return !1;
|
|
3187
3171
|
const o = e.slice(19).match(/(Z|([+-])(\d{2}):(\d{2}))$/);
|
|
3188
3172
|
return o === null || o[1] === "Z" ? !0 : Number(o[3]) <= 23 && Number(o[4]) <= 59;
|
|
3189
3173
|
}
|
|
3190
|
-
function
|
|
3174
|
+
function ut(e, n) {
|
|
3191
3175
|
if (n == null) return "";
|
|
3192
3176
|
if ((e === "string" || e === "date" || e === "datetime") && typeof n == "string")
|
|
3193
3177
|
return n;
|
|
@@ -3197,7 +3181,7 @@ function ot(e, n) {
|
|
|
3197
3181
|
const a = JSON.stringify(n);
|
|
3198
3182
|
return a === void 0 ? "" : a;
|
|
3199
3183
|
}
|
|
3200
|
-
function
|
|
3184
|
+
function Ds(e, n) {
|
|
3201
3185
|
switch (e) {
|
|
3202
3186
|
case "string":
|
|
3203
3187
|
return typeof n == "string";
|
|
@@ -3208,37 +3192,37 @@ function Us(e, n) {
|
|
|
3208
3192
|
case "boolean":
|
|
3209
3193
|
return typeof n == "boolean";
|
|
3210
3194
|
case "date":
|
|
3211
|
-
return typeof n == "string" &&
|
|
3195
|
+
return typeof n == "string" && ct(n) !== null;
|
|
3212
3196
|
case "datetime":
|
|
3213
|
-
return typeof n == "string" &&
|
|
3197
|
+
return typeof n == "string" && nn(n);
|
|
3214
3198
|
}
|
|
3215
3199
|
}
|
|
3216
|
-
const
|
|
3217
|
-
function
|
|
3200
|
+
const me = "The request failed.", Ga = "Could not reach the server.";
|
|
3201
|
+
function se(e) {
|
|
3218
3202
|
return typeof e == "string" && e.length > 0 ? e : void 0;
|
|
3219
3203
|
}
|
|
3220
|
-
function
|
|
3204
|
+
function an(e) {
|
|
3221
3205
|
return Number.isInteger(e) && e >= 0 ? e : void 0;
|
|
3222
3206
|
}
|
|
3223
|
-
function
|
|
3224
|
-
const s = { message:
|
|
3207
|
+
function sn(e, n, a) {
|
|
3208
|
+
const s = { message: me };
|
|
3225
3209
|
typeof a == "number" && (s.status = a);
|
|
3226
3210
|
const r = e !== null && typeof e == "object" ? e.error : void 0;
|
|
3227
3211
|
if (r !== null && typeof r == "object") {
|
|
3228
|
-
const o = r, l =
|
|
3212
|
+
const o = r, l = se(o.code);
|
|
3229
3213
|
l !== void 0 && (s.code = l);
|
|
3230
|
-
const c =
|
|
3214
|
+
const c = se(o.field);
|
|
3231
3215
|
c !== void 0 && (s.field = c);
|
|
3232
|
-
const d =
|
|
3216
|
+
const d = se(o.column);
|
|
3233
3217
|
d !== void 0 && (s.column = d);
|
|
3234
|
-
const u =
|
|
3218
|
+
const u = an(o.row);
|
|
3235
3219
|
u !== void 0 && (s.row = u);
|
|
3236
|
-
const f =
|
|
3220
|
+
const f = se(o.message);
|
|
3237
3221
|
f !== void 0 && (s.message = f);
|
|
3238
3222
|
}
|
|
3239
|
-
if (s.message ===
|
|
3223
|
+
if (s.message === me)
|
|
3240
3224
|
for (const o of n) {
|
|
3241
|
-
const l =
|
|
3225
|
+
const l = se(o);
|
|
3242
3226
|
if (l !== void 0) {
|
|
3243
3227
|
s.message = l;
|
|
3244
3228
|
break;
|
|
@@ -3246,84 +3230,84 @@ function nn(e, n, a) {
|
|
|
3246
3230
|
}
|
|
3247
3231
|
return s;
|
|
3248
3232
|
}
|
|
3249
|
-
function
|
|
3233
|
+
function Us(e) {
|
|
3250
3234
|
try {
|
|
3251
3235
|
const n = e !== null && typeof e == "object" ? e : void 0, a = n == null ? void 0 : n.raw, s = n == null ? void 0 : n.message;
|
|
3252
|
-
return
|
|
3236
|
+
return sn(a, [s], n == null ? void 0 : n.status);
|
|
3253
3237
|
} catch {
|
|
3254
|
-
return { message:
|
|
3238
|
+
return { message: me };
|
|
3255
3239
|
}
|
|
3256
3240
|
}
|
|
3257
|
-
function
|
|
3241
|
+
function Xa(e) {
|
|
3258
3242
|
try {
|
|
3259
3243
|
if (e.status === 0)
|
|
3260
3244
|
return {
|
|
3261
3245
|
status: 0,
|
|
3262
3246
|
code: "network_error",
|
|
3263
|
-
message:
|
|
3247
|
+
message: Ga
|
|
3264
3248
|
};
|
|
3265
3249
|
let n;
|
|
3266
3250
|
try {
|
|
3267
3251
|
n = JSON.parse(e.text);
|
|
3268
3252
|
} catch {
|
|
3269
|
-
return { status: e.status, message:
|
|
3253
|
+
return { status: e.status, message: me };
|
|
3270
3254
|
}
|
|
3271
|
-
return
|
|
3255
|
+
return sn(n, [], e.status);
|
|
3272
3256
|
} catch {
|
|
3273
|
-
return { message:
|
|
3257
|
+
return { message: me };
|
|
3274
3258
|
}
|
|
3275
3259
|
}
|
|
3276
|
-
function
|
|
3277
|
-
const n =
|
|
3260
|
+
function Za(e) {
|
|
3261
|
+
const n = se(e.column);
|
|
3278
3262
|
if (n !== void 0) {
|
|
3279
|
-
const s =
|
|
3263
|
+
const s = an(e.row);
|
|
3280
3264
|
return s === void 0 ? { kind: "cell", column: n } : { kind: "cell", column: n, row: s };
|
|
3281
3265
|
}
|
|
3282
|
-
const a =
|
|
3266
|
+
const a = se(e.field);
|
|
3283
3267
|
return a !== void 0 ? { kind: "field", field: a } : { kind: "form" };
|
|
3284
3268
|
}
|
|
3285
|
-
function
|
|
3269
|
+
function jt(e) {
|
|
3286
3270
|
return e + 2;
|
|
3287
3271
|
}
|
|
3288
|
-
const
|
|
3289
|
-
function
|
|
3272
|
+
const ln = "\0new", rn = "Changed by someone else since you loaded it.", Jt = "Enter a JSON object or array.", Qa = "The file is larger than 5 MB.";
|
|
3273
|
+
function es(e) {
|
|
3290
3274
|
const n = e.value;
|
|
3291
3275
|
return n !== null && typeof n == "object" && !Array.isArray(n) ? n : {};
|
|
3292
3276
|
}
|
|
3293
|
-
function
|
|
3294
|
-
const a =
|
|
3295
|
-
for (const r of n) s[r.name] =
|
|
3277
|
+
function Fs(e, n) {
|
|
3278
|
+
const a = es(e), s = {};
|
|
3279
|
+
for (const r of n) s[r.name] = ut(r.type, a[r.name]);
|
|
3296
3280
|
return { id: e.key, version: e.version, cells: s };
|
|
3297
3281
|
}
|
|
3298
|
-
function
|
|
3282
|
+
function Bs(e) {
|
|
3299
3283
|
const n = {};
|
|
3300
3284
|
for (const a of e)
|
|
3301
|
-
n[a.name] = a.default === void 0 ? "" :
|
|
3302
|
-
return { id:
|
|
3285
|
+
n[a.name] = a.default === void 0 ? "" : ut(a.type, a.default);
|
|
3286
|
+
return { id: ln, version: null, cells: n };
|
|
3303
3287
|
}
|
|
3304
|
-
function
|
|
3288
|
+
function Ks(e, n, a) {
|
|
3305
3289
|
const s = [];
|
|
3306
3290
|
for (const r of a)
|
|
3307
3291
|
(e.cells[r.name] ?? "") !== (n.cells[r.name] ?? "") && s.push(r.name);
|
|
3308
3292
|
return s;
|
|
3309
3293
|
}
|
|
3310
|
-
function
|
|
3294
|
+
function js(e, n) {
|
|
3311
3295
|
const a = {}, s = {};
|
|
3312
3296
|
for (const r of n) {
|
|
3313
|
-
const o =
|
|
3297
|
+
const o = dt(r.type, e.cells[r.name] ?? "", r.required);
|
|
3314
3298
|
o.ok ? o.value !== void 0 && (a[r.name] = o.value) : s[r.name] = o.message;
|
|
3315
3299
|
}
|
|
3316
3300
|
return Object.keys(s).length > 0 ? { ok: !1, errors: s } : { ok: !0, value: a };
|
|
3317
3301
|
}
|
|
3318
|
-
function
|
|
3302
|
+
function Js(e, n) {
|
|
3319
3303
|
if (e === null) return;
|
|
3320
3304
|
const a = Date.parse(e);
|
|
3321
3305
|
if (!Number.isFinite(a)) return;
|
|
3322
3306
|
const s = Math.ceil((a - n) / 1e3);
|
|
3323
3307
|
return s > 0 ? s : void 0;
|
|
3324
3308
|
}
|
|
3325
|
-
function
|
|
3326
|
-
if (e.id ===
|
|
3309
|
+
function Ws(e, n, a) {
|
|
3310
|
+
if (e.id === ln)
|
|
3327
3311
|
return a === void 0 ? { kind: "insert", value: n } : { kind: "insert", value: n, ttlSeconds: a };
|
|
3328
3312
|
const s = {
|
|
3329
3313
|
kind: "put",
|
|
@@ -3333,28 +3317,28 @@ function Vs(e, n, a) {
|
|
|
3333
3317
|
};
|
|
3334
3318
|
return a === void 0 ? s : { ...s, ttlSeconds: a };
|
|
3335
3319
|
}
|
|
3336
|
-
function
|
|
3337
|
-
const a =
|
|
3320
|
+
function Vs(e, n) {
|
|
3321
|
+
const a = Za(e);
|
|
3338
3322
|
return a.kind !== "cell" || !n.some((s) => s.name === a.column) ? null : { [a.column]: e.message };
|
|
3339
3323
|
}
|
|
3340
|
-
function
|
|
3324
|
+
function qs(e) {
|
|
3341
3325
|
return e.status === 409 && e.code === "version_conflict";
|
|
3342
3326
|
}
|
|
3343
|
-
function
|
|
3327
|
+
function ts(e) {
|
|
3344
3328
|
let n;
|
|
3345
3329
|
try {
|
|
3346
3330
|
n = JSON.parse(e);
|
|
3347
3331
|
} catch {
|
|
3348
|
-
return { ok: !1, message:
|
|
3332
|
+
return { ok: !1, message: Jt };
|
|
3349
3333
|
}
|
|
3350
|
-
return n === null || typeof n != "object" ? { ok: !1, message:
|
|
3334
|
+
return n === null || typeof n != "object" ? { ok: !1, message: Jt } : { ok: !0, value: n };
|
|
3351
3335
|
}
|
|
3352
|
-
function
|
|
3336
|
+
function Hs(e, n) {
|
|
3353
3337
|
if (e === "string") return { ok: !0, value: n };
|
|
3354
|
-
const a =
|
|
3338
|
+
const a = dt(e, n, !0);
|
|
3355
3339
|
return a.ok ? { ok: !0, value: a.value } : { ok: !1, message: a.message };
|
|
3356
3340
|
}
|
|
3357
|
-
function
|
|
3341
|
+
function zs(e) {
|
|
3358
3342
|
if (e.status === 200) {
|
|
3359
3343
|
let s = 0;
|
|
3360
3344
|
try {
|
|
@@ -3368,10 +3352,10 @@ function Ys(e) {
|
|
|
3368
3352
|
message: `Imported ${s} row${s === 1 ? "" : "s"}.`
|
|
3369
3353
|
};
|
|
3370
3354
|
}
|
|
3371
|
-
const n =
|
|
3372
|
-
return n.row === void 0 ? { ok: !1, message: n.message } : { ok: !1, message: `${n.column ? `Line ${
|
|
3355
|
+
const n = Xa(e);
|
|
3356
|
+
return n.row === void 0 ? { ok: !1, message: n.message } : { ok: !1, message: `${n.column ? `Line ${jt(n.row)}, column ${n.column}` : `Line ${jt(n.row)}`}: ${n.message}` };
|
|
3373
3357
|
}
|
|
3374
|
-
function
|
|
3358
|
+
function Ys({
|
|
3375
3359
|
stores: e,
|
|
3376
3360
|
loading: n,
|
|
3377
3361
|
error: a,
|
|
@@ -3383,41 +3367,41 @@ function Gs({
|
|
|
3383
3367
|
formatSize: d,
|
|
3384
3368
|
slots: u
|
|
3385
3369
|
}) {
|
|
3386
|
-
const f = d ??
|
|
3387
|
-
{ key: "name", header: "Name", render: (
|
|
3388
|
-
{ key: "kind", header: "Kind", render: (
|
|
3389
|
-
{ key: "entries", header: "Entries", align: "right", render: (
|
|
3390
|
-
{ key: "size", header: "Size", align: "right", render: (
|
|
3370
|
+
const f = d ?? zt, g = o !== void 0 || l !== void 0, v = [
|
|
3371
|
+
{ key: "name", header: "Name", render: (m) => /* @__PURE__ */ t("strong", { children: m.name }) },
|
|
3372
|
+
{ key: "kind", header: "Kind", render: (m) => ja[m.kind] },
|
|
3373
|
+
{ key: "entries", header: "Entries", align: "right", render: (m) => String(m.entryCount) },
|
|
3374
|
+
{ key: "size", header: "Size", align: "right", render: (m) => f(m.sizeBytes) },
|
|
3391
3375
|
{
|
|
3392
3376
|
key: "updated",
|
|
3393
3377
|
header: "Updated",
|
|
3394
|
-
render: (
|
|
3378
|
+
render: (m) => new Date(m.updatedAt).toLocaleString()
|
|
3395
3379
|
}
|
|
3396
3380
|
];
|
|
3397
|
-
return
|
|
3381
|
+
return g && v.push({
|
|
3398
3382
|
key: "actions",
|
|
3399
3383
|
header: "",
|
|
3400
3384
|
align: "right",
|
|
3401
3385
|
link: !1,
|
|
3402
|
-
render: (
|
|
3386
|
+
render: (m) => (
|
|
3403
3387
|
// Clicks here must not reach the row's onOpen.
|
|
3404
3388
|
// biome-ignore lint/a11y/useKeyWithClickEvents: propagation guard only; the buttons inside are the controls.
|
|
3405
3389
|
/* @__PURE__ */ i("div", { className: "w6w-data-row-actions", onClick: (h) => h.stopPropagation(), children: [
|
|
3406
3390
|
o && /* @__PURE__ */ t(
|
|
3407
|
-
|
|
3391
|
+
Yt,
|
|
3408
3392
|
{
|
|
3409
3393
|
label: "Edit",
|
|
3410
|
-
onClick: () => o(
|
|
3411
|
-
"data-testid": `data-store-edit-${
|
|
3394
|
+
onClick: () => o(m),
|
|
3395
|
+
"data-testid": `data-store-edit-${m.id}`
|
|
3412
3396
|
}
|
|
3413
3397
|
),
|
|
3414
3398
|
l && /* @__PURE__ */ t(
|
|
3415
|
-
|
|
3399
|
+
fe,
|
|
3416
3400
|
{
|
|
3417
3401
|
label: "Archive",
|
|
3418
|
-
onClick: () => l(
|
|
3402
|
+
onClick: () => l(m),
|
|
3419
3403
|
disabled: c,
|
|
3420
|
-
"data-testid": `data-store-archive-${
|
|
3404
|
+
"data-testid": `data-store-archive-${m.id}`
|
|
3421
3405
|
}
|
|
3422
3406
|
)
|
|
3423
3407
|
] })
|
|
@@ -3429,50 +3413,50 @@ function Gs({
|
|
|
3429
3413
|
] }),
|
|
3430
3414
|
a && /* @__PURE__ */ t("div", { className: "w6w-error", children: a }),
|
|
3431
3415
|
n && /* @__PURE__ */ t("p", { className: "w6w-muted", children: "Loading…" }),
|
|
3432
|
-
e.length === 0 && !n ? /* @__PURE__ */ t(
|
|
3433
|
-
|
|
3416
|
+
e.length === 0 && !n ? /* @__PURE__ */ t(Oe, { testId: "w6w-data-store-list-empty", children: (u == null ? void 0 : u.empty) ?? "No data stores yet." }) : /* @__PURE__ */ t(
|
|
3417
|
+
pe,
|
|
3434
3418
|
{
|
|
3435
3419
|
columns: v,
|
|
3436
3420
|
rows: e,
|
|
3437
|
-
rowKey: (
|
|
3421
|
+
rowKey: (m) => m.id,
|
|
3438
3422
|
loading: n,
|
|
3439
|
-
getRowHref: r ? (
|
|
3440
|
-
onRowClick: s ? (
|
|
3423
|
+
getRowHref: r ? (m) => r(m.id) : void 0,
|
|
3424
|
+
onRowClick: s ? (m, h) => s(m.id, h) : void 0
|
|
3441
3425
|
}
|
|
3442
3426
|
)
|
|
3443
3427
|
] });
|
|
3444
3428
|
}
|
|
3445
|
-
function
|
|
3429
|
+
function ns(e) {
|
|
3446
3430
|
return e.name !== "" && e.required === !0 && (e.type === "string" || e.type === "integer");
|
|
3447
3431
|
}
|
|
3448
|
-
function
|
|
3449
|
-
const { default: a, ...s } = e, r =
|
|
3432
|
+
function as(e, n) {
|
|
3433
|
+
const { default: a, ...s } = e, r = dt(e.type, n, !1);
|
|
3450
3434
|
return r.ok ? r.value === void 0 ? { column: s } : { column: { ...s, default: r.value } } : { column: s, error: r.message };
|
|
3451
3435
|
}
|
|
3452
|
-
function
|
|
3453
|
-
const { columns: n, onChange: a, keyColumn: s, onKeyColumnChange: r, columnErrors: o } = e, [l, c] =
|
|
3454
|
-
|
|
3436
|
+
function Gs(e) {
|
|
3437
|
+
const { columns: n, onChange: a, keyColumn: s, onKeyColumnChange: r, columnErrors: o } = e, [l, c] = b({}), d = n.filter(ns), u = d.some((h) => h.name === s) ? s : "";
|
|
3438
|
+
Q(() => {
|
|
3455
3439
|
s !== "" && u === "" && r("");
|
|
3456
3440
|
}, [s, u, r]);
|
|
3457
3441
|
function f() {
|
|
3458
3442
|
a([...n, { name: "", type: "string", required: !1 }]);
|
|
3459
3443
|
}
|
|
3460
|
-
function
|
|
3461
|
-
a(n.map((
|
|
3444
|
+
function g(h, y) {
|
|
3445
|
+
a(n.map((w, S) => S === h ? { ...w, ...y } : w));
|
|
3462
3446
|
}
|
|
3463
|
-
function v(h, y,
|
|
3464
|
-
const x = { ...n[h],
|
|
3465
|
-
c((C) => ({ ...C, [h]: T === void 0 ? { text:
|
|
3447
|
+
function v(h, y, w, S) {
|
|
3448
|
+
const x = { ...n[h], ...S, type: y }, { column: N, error: T } = as(x, w);
|
|
3449
|
+
c((C) => ({ ...C, [h]: T === void 0 ? { text: w } : { text: w, error: T } })), a(n.map((C, R) => R === h ? N : C));
|
|
3466
3450
|
}
|
|
3467
|
-
function
|
|
3451
|
+
function m(h) {
|
|
3468
3452
|
c((y) => {
|
|
3469
|
-
const
|
|
3470
|
-
for (const [
|
|
3471
|
-
const N = Number(
|
|
3472
|
-
N < h ?
|
|
3453
|
+
const w = {};
|
|
3454
|
+
for (const [S, x] of Object.entries(y)) {
|
|
3455
|
+
const N = Number(S);
|
|
3456
|
+
N < h ? w[N] = x : N > h && (w[N - 1] = x);
|
|
3473
3457
|
}
|
|
3474
|
-
return
|
|
3475
|
-
}), a(n.filter((y,
|
|
3458
|
+
return w;
|
|
3459
|
+
}), a(n.filter((y, w) => w !== h));
|
|
3476
3460
|
}
|
|
3477
3461
|
return /* @__PURE__ */ i("div", { className: "w6w-data-columns", children: [
|
|
3478
3462
|
/* @__PURE__ */ i("div", { className: "w6w-data-columns-head", children: [
|
|
@@ -3489,7 +3473,7 @@ function Xs(e) {
|
|
|
3489
3473
|
/* @__PURE__ */ t("span", {})
|
|
3490
3474
|
] }),
|
|
3491
3475
|
/* @__PURE__ */ t("ul", { className: "w6w-data-columns-list", "data-testid": "data-columns", children: n.map((h, y) => {
|
|
3492
|
-
const
|
|
3476
|
+
const w = l[y], S = (w == null ? void 0 : w.text) ?? ut(h.type, h.default);
|
|
3493
3477
|
return (
|
|
3494
3478
|
// biome-ignore lint/suspicious/noArrayIndexKey: rows are positional and reorderable
|
|
3495
3479
|
/* @__PURE__ */ i("li", { className: "w6w-data-columns-row", children: [
|
|
@@ -3500,7 +3484,7 @@ function Xs(e) {
|
|
|
3500
3484
|
value: h.name,
|
|
3501
3485
|
placeholder: "name",
|
|
3502
3486
|
"aria-label": "Column name",
|
|
3503
|
-
onChange: (x) =>
|
|
3487
|
+
onChange: (x) => g(y, { name: x.target.value })
|
|
3504
3488
|
}
|
|
3505
3489
|
),
|
|
3506
3490
|
/* @__PURE__ */ t(
|
|
@@ -3508,8 +3492,8 @@ function Xs(e) {
|
|
|
3508
3492
|
{
|
|
3509
3493
|
value: h.type,
|
|
3510
3494
|
"aria-label": "Column type",
|
|
3511
|
-
onChange: (x) => v(y, x.target.value,
|
|
3512
|
-
children:
|
|
3495
|
+
onChange: (x) => v(y, x.target.value, S),
|
|
3496
|
+
children: tn.map((x) => /* @__PURE__ */ t("option", { value: x, children: x }, x))
|
|
3513
3497
|
}
|
|
3514
3498
|
),
|
|
3515
3499
|
/* @__PURE__ */ i("label", { className: "w6w-data-columns-required", children: [
|
|
@@ -3519,7 +3503,7 @@ function Xs(e) {
|
|
|
3519
3503
|
type: "checkbox",
|
|
3520
3504
|
checked: h.required,
|
|
3521
3505
|
"aria-label": "Required",
|
|
3522
|
-
onChange: (x) =>
|
|
3506
|
+
onChange: (x) => g(y, { required: x.target.checked })
|
|
3523
3507
|
}
|
|
3524
3508
|
),
|
|
3525
3509
|
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: "required" })
|
|
@@ -3528,25 +3512,25 @@ function Xs(e) {
|
|
|
3528
3512
|
"input",
|
|
3529
3513
|
{
|
|
3530
3514
|
type: "text",
|
|
3531
|
-
value:
|
|
3515
|
+
value: S,
|
|
3532
3516
|
placeholder: "default",
|
|
3533
3517
|
"aria-label": "Column default",
|
|
3534
3518
|
onChange: (x) => v(y, h.type, x.target.value)
|
|
3535
3519
|
}
|
|
3536
3520
|
),
|
|
3537
3521
|
/* @__PURE__ */ t(
|
|
3538
|
-
|
|
3522
|
+
fe,
|
|
3539
3523
|
{
|
|
3540
3524
|
label: `Remove column ${h.name || y + 1}`,
|
|
3541
|
-
onClick: () =>
|
|
3525
|
+
onClick: () => m(y)
|
|
3542
3526
|
}
|
|
3543
3527
|
),
|
|
3544
|
-
(
|
|
3528
|
+
(w == null ? void 0 : w.error) !== void 0 && /* @__PURE__ */ t(
|
|
3545
3529
|
"div",
|
|
3546
3530
|
{
|
|
3547
3531
|
className: "w6w-result w6w-error w6w-data-columns-error",
|
|
3548
3532
|
"data-testid": `data-store-column-default-error-${y}`,
|
|
3549
|
-
children:
|
|
3533
|
+
children: w.error
|
|
3550
3534
|
}
|
|
3551
3535
|
),
|
|
3552
3536
|
h.name !== "" && o[h.name] !== void 0 && /* @__PURE__ */ t(
|
|
@@ -3570,13 +3554,13 @@ function Xs(e) {
|
|
|
3570
3554
|
] })
|
|
3571
3555
|
] });
|
|
3572
3556
|
}
|
|
3573
|
-
function
|
|
3557
|
+
function Xs({ result: e, busy: n, onImport: a, onRefuse: s, onExport: r }) {
|
|
3574
3558
|
function o(l) {
|
|
3575
3559
|
var u;
|
|
3576
3560
|
const c = l.target, d = (u = c.files) == null ? void 0 : u[0];
|
|
3577
3561
|
if (d !== void 0) {
|
|
3578
|
-
if (c.value = "", d.size >
|
|
3579
|
-
s(
|
|
3562
|
+
if (c.value = "", d.size > Ja) {
|
|
3563
|
+
s(Qa);
|
|
3580
3564
|
return;
|
|
3581
3565
|
}
|
|
3582
3566
|
a(d);
|
|
@@ -3609,7 +3593,7 @@ function Zs({ result: e, busy: n, onImport: a, onRefuse: s, onExport: r }) {
|
|
|
3609
3593
|
e !== null && /* @__PURE__ */ t("div", { className: e.ok ? "w6w-result" : "w6w-result w6w-error", "data-testid": "csv-result", children: e.message })
|
|
3610
3594
|
] });
|
|
3611
3595
|
}
|
|
3612
|
-
function
|
|
3596
|
+
function Zs({
|
|
3613
3597
|
rows: e,
|
|
3614
3598
|
empty: n,
|
|
3615
3599
|
loading: a,
|
|
@@ -3620,10 +3604,10 @@ function Qs({
|
|
|
3620
3604
|
onNew: c,
|
|
3621
3605
|
onLoadMore: d
|
|
3622
3606
|
}) {
|
|
3623
|
-
const [u, f] =
|
|
3607
|
+
const [u, f] = b(s ?? "");
|
|
3624
3608
|
return /* @__PURE__ */ i("div", { children: [
|
|
3625
|
-
/* @__PURE__ */ i("form", { className: "w6w-data-entries-toolbar", "data-testid": "entry-search", onSubmit: (
|
|
3626
|
-
|
|
3609
|
+
/* @__PURE__ */ i("form", { className: "w6w-data-entries-toolbar", "data-testid": "entry-search", onSubmit: (m) => {
|
|
3610
|
+
m.preventDefault(), l(u);
|
|
3627
3611
|
}, children: [
|
|
3628
3612
|
/* @__PURE__ */ t(
|
|
3629
3613
|
"input",
|
|
@@ -3633,7 +3617,7 @@ function Qs({
|
|
|
3633
3617
|
value: u,
|
|
3634
3618
|
placeholder: "Key prefix",
|
|
3635
3619
|
"aria-label": "Key prefix",
|
|
3636
|
-
onChange: (
|
|
3620
|
+
onChange: (m) => f(m.target.value)
|
|
3637
3621
|
}
|
|
3638
3622
|
),
|
|
3639
3623
|
/* @__PURE__ */ t("button", { className: "w6w-btn w6w-btn-ghost", type: "submit", children: "Search" }),
|
|
@@ -3649,37 +3633,37 @@ function Qs({
|
|
|
3649
3633
|
)
|
|
3650
3634
|
] }),
|
|
3651
3635
|
/* @__PURE__ */ t(
|
|
3652
|
-
|
|
3636
|
+
pe,
|
|
3653
3637
|
{
|
|
3654
3638
|
className: "w6w-data-entry-list",
|
|
3655
|
-
onRowClick: (
|
|
3639
|
+
onRowClick: (m) => o(m.key),
|
|
3656
3640
|
columns: [
|
|
3657
3641
|
{
|
|
3658
3642
|
key: "key",
|
|
3659
3643
|
header: "Key",
|
|
3660
3644
|
width: "38%",
|
|
3661
|
-
render: (
|
|
3645
|
+
render: (m) => /* @__PURE__ */ t(
|
|
3662
3646
|
"button",
|
|
3663
3647
|
{
|
|
3664
3648
|
type: "button",
|
|
3665
3649
|
className: "w6w-data-entry-key",
|
|
3666
|
-
title:
|
|
3650
|
+
title: m.key,
|
|
3667
3651
|
"data-testid": "entry-key",
|
|
3668
3652
|
onClick: (h) => {
|
|
3669
|
-
h.stopPropagation(), o(
|
|
3653
|
+
h.stopPropagation(), o(m.key);
|
|
3670
3654
|
},
|
|
3671
|
-
children:
|
|
3655
|
+
children: m.key
|
|
3672
3656
|
}
|
|
3673
3657
|
)
|
|
3674
3658
|
},
|
|
3675
3659
|
{
|
|
3676
3660
|
key: "value",
|
|
3677
3661
|
header: "Value",
|
|
3678
|
-
render: (
|
|
3662
|
+
render: (m) => m.copyText !== void 0 ? /* @__PURE__ */ t(st, { value: m.copyText, label: "Copy value", className: "w6w-copyable--bare", children: /* @__PURE__ */ t("span", { className: "w6w-muted w6w-small w6w-data-entry-preview", children: m.preview }) }) : /* @__PURE__ */ t("span", { className: "w6w-muted w6w-small w6w-data-entry-preview", children: m.preview })
|
|
3679
3663
|
}
|
|
3680
3664
|
],
|
|
3681
3665
|
rows: e,
|
|
3682
|
-
rowKey: (
|
|
3666
|
+
rowKey: (m) => m.key,
|
|
3683
3667
|
empty: (
|
|
3684
3668
|
// A div, not a <p>: `empty` is any node and callers often pass a <p>.
|
|
3685
3669
|
/* @__PURE__ */ t("div", { className: "w6w-muted w6w-small", children: a ? "Loading…" : n ?? "No entries match this key prefix." })
|
|
@@ -3698,7 +3682,7 @@ function Qs({
|
|
|
3698
3682
|
)
|
|
3699
3683
|
] });
|
|
3700
3684
|
}
|
|
3701
|
-
function
|
|
3685
|
+
function Qs({
|
|
3702
3686
|
kind: e,
|
|
3703
3687
|
isNew: n,
|
|
3704
3688
|
entryKey: a,
|
|
@@ -3710,17 +3694,17 @@ function el({
|
|
|
3710
3694
|
saving: d,
|
|
3711
3695
|
onTextChange: u,
|
|
3712
3696
|
onKeyChange: f,
|
|
3713
|
-
onDelete:
|
|
3697
|
+
onDelete: g,
|
|
3714
3698
|
onSave: v,
|
|
3715
|
-
onCancel:
|
|
3699
|
+
onCancel: m,
|
|
3716
3700
|
onReload: h
|
|
3717
3701
|
}) {
|
|
3718
|
-
const [y,
|
|
3719
|
-
|
|
3702
|
+
const [y, w] = b(n), [S, x] = b(!1), N = Vt(null);
|
|
3703
|
+
Q(() => {
|
|
3720
3704
|
var O;
|
|
3721
3705
|
n || (O = N.current) == null || O.focus();
|
|
3722
3706
|
}, [n]);
|
|
3723
|
-
const T = e === "doc" ? "document" : "entry", C = e === "doc" ?
|
|
3707
|
+
const T = e === "doc" ? "document" : "entry", C = e === "doc" ? ts(o) : void 0, R = C !== void 0 && !C.ok, I = l || (S && C && !C.ok ? C.message : null), j = /* @__PURE__ */ i(_, { children: [
|
|
3724
3708
|
n ? /* @__PURE__ */ i("label", { className: "w6w-field", children: [
|
|
3725
3709
|
/* @__PURE__ */ t("span", { children: "Key" }),
|
|
3726
3710
|
/* @__PURE__ */ t(
|
|
@@ -3738,7 +3722,7 @@ function el({
|
|
|
3738
3722
|
r
|
|
3739
3723
|
] }) : null,
|
|
3740
3724
|
e === "doc" ? /* @__PURE__ */ t(
|
|
3741
|
-
|
|
3725
|
+
we,
|
|
3742
3726
|
{
|
|
3743
3727
|
value: o,
|
|
3744
3728
|
readOnly: !y,
|
|
@@ -3747,11 +3731,11 @@ function el({
|
|
|
3747
3731
|
},
|
|
3748
3732
|
onFocus: () => x(!1),
|
|
3749
3733
|
onBlur: () => x(!0),
|
|
3750
|
-
showDiagnostics:
|
|
3734
|
+
showDiagnostics: S,
|
|
3751
3735
|
minHeight: "min(50vh, 400px)",
|
|
3752
3736
|
maxHeight: "60vh"
|
|
3753
3737
|
}
|
|
3754
|
-
) : /* @__PURE__ */ t(
|
|
3738
|
+
) : /* @__PURE__ */ t(st, { value: o, label: "Copy value", children: /* @__PURE__ */ t(
|
|
3755
3739
|
"input",
|
|
3756
3740
|
{
|
|
3757
3741
|
type: "text",
|
|
@@ -3762,9 +3746,9 @@ function el({
|
|
|
3762
3746
|
onChange: (O) => u(O.target.value)
|
|
3763
3747
|
}
|
|
3764
3748
|
) }),
|
|
3765
|
-
|
|
3749
|
+
I && /* @__PURE__ */ t("div", { className: "w6w-field-error", role: "alert", "data-testid": "entry-value-error", children: I }),
|
|
3766
3750
|
c && /* @__PURE__ */ i("div", { className: "w6w-error", "data-testid": "entry-conflict", children: [
|
|
3767
|
-
|
|
3751
|
+
rn,
|
|
3768
3752
|
" ",
|
|
3769
3753
|
/* @__PURE__ */ t(
|
|
3770
3754
|
"button",
|
|
@@ -3779,23 +3763,23 @@ function el({
|
|
|
3779
3763
|
] })
|
|
3780
3764
|
] });
|
|
3781
3765
|
return /* @__PURE__ */ i(
|
|
3782
|
-
|
|
3766
|
+
_e,
|
|
3783
3767
|
{
|
|
3784
3768
|
title: n ? `New ${T}` : y ? `Edit ${T}` : e === "doc" ? "Document" : "Entry",
|
|
3785
3769
|
subtitle: n ? void 0 : a,
|
|
3786
3770
|
size: e === "doc" ? "wide" : "default",
|
|
3787
3771
|
onClose: d ? () => {
|
|
3788
|
-
} :
|
|
3772
|
+
} : m,
|
|
3789
3773
|
children: [
|
|
3790
|
-
/* @__PURE__ */ t("div", { className: "w6w-modal-body", "data-testid": "entry-editor", children:
|
|
3774
|
+
/* @__PURE__ */ t("div", { className: "w6w-modal-body", "data-testid": "entry-editor", children: j }),
|
|
3791
3775
|
/* @__PURE__ */ i("div", { className: "w6w-modal-actions", children: [
|
|
3792
|
-
!n &&
|
|
3793
|
-
|
|
3776
|
+
!n && g && /* @__PURE__ */ t(
|
|
3777
|
+
fe,
|
|
3794
3778
|
{
|
|
3795
3779
|
label: "Delete entry",
|
|
3796
3780
|
className: "w6w-data-entry-delete",
|
|
3797
3781
|
disabled: d,
|
|
3798
|
-
onClick:
|
|
3782
|
+
onClick: g
|
|
3799
3783
|
}
|
|
3800
3784
|
),
|
|
3801
3785
|
/* @__PURE__ */ t(
|
|
@@ -3805,7 +3789,7 @@ function el({
|
|
|
3805
3789
|
className: "w6w-btn w6w-btn-ghost",
|
|
3806
3790
|
type: "button",
|
|
3807
3791
|
disabled: d,
|
|
3808
|
-
onClick:
|
|
3792
|
+
onClick: m,
|
|
3809
3793
|
children: y ? "Cancel" : "Close"
|
|
3810
3794
|
}
|
|
3811
3795
|
),
|
|
@@ -3815,7 +3799,7 @@ function el({
|
|
|
3815
3799
|
className: "w6w-btn",
|
|
3816
3800
|
type: "button",
|
|
3817
3801
|
"data-testid": "entry-save",
|
|
3818
|
-
disabled: !!c || !!d ||
|
|
3802
|
+
disabled: !!c || !!d || R || n && !(s != null && s.trim()),
|
|
3819
3803
|
onClick: v,
|
|
3820
3804
|
children: "Save"
|
|
3821
3805
|
}
|
|
@@ -3825,7 +3809,7 @@ function el({
|
|
|
3825
3809
|
className: "w6w-btn",
|
|
3826
3810
|
type: "button",
|
|
3827
3811
|
disabled: d,
|
|
3828
|
-
onClick: () =>
|
|
3812
|
+
onClick: () => w(!0),
|
|
3829
3813
|
children: "Edit"
|
|
3830
3814
|
}
|
|
3831
3815
|
)
|
|
@@ -3834,8 +3818,8 @@ function el({
|
|
|
3834
3818
|
}
|
|
3835
3819
|
);
|
|
3836
3820
|
}
|
|
3837
|
-
const
|
|
3838
|
-
function
|
|
3821
|
+
const Ae = (e) => e.isNew ? "new" : e.id;
|
|
3822
|
+
function el({
|
|
3839
3823
|
columns: e,
|
|
3840
3824
|
keyColumn: n,
|
|
3841
3825
|
rows: a,
|
|
@@ -3847,41 +3831,41 @@ function tl({
|
|
|
3847
3831
|
onCellChange: d,
|
|
3848
3832
|
onSave: u,
|
|
3849
3833
|
onDelete: f,
|
|
3850
|
-
onReload:
|
|
3834
|
+
onReload: g,
|
|
3851
3835
|
onAddRow: v,
|
|
3852
|
-
onLoadMore:
|
|
3836
|
+
onLoadMore: m,
|
|
3853
3837
|
onSearch: h
|
|
3854
3838
|
}) {
|
|
3855
|
-
const [y,
|
|
3839
|
+
const [y, w] = b(l ?? ""), S = (N) => {
|
|
3856
3840
|
N.preventDefault(), h(y);
|
|
3857
3841
|
}, x = [
|
|
3858
3842
|
...e.map((N) => ({
|
|
3859
3843
|
key: N.name,
|
|
3860
|
-
header: /* @__PURE__ */ i(
|
|
3844
|
+
header: /* @__PURE__ */ i(_, { children: [
|
|
3861
3845
|
N.name,
|
|
3862
3846
|
" ",
|
|
3863
3847
|
/* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: N.type })
|
|
3864
3848
|
] }),
|
|
3865
3849
|
render: (T) => {
|
|
3866
|
-
var
|
|
3867
|
-
const C = (
|
|
3850
|
+
var R;
|
|
3851
|
+
const C = (R = T.cellErrors) == null ? void 0 : R[N.name];
|
|
3868
3852
|
return /* @__PURE__ */ i("div", { className: "w6w-data-cell", children: [
|
|
3869
3853
|
/* @__PURE__ */ t(
|
|
3870
3854
|
"input",
|
|
3871
3855
|
{
|
|
3872
|
-
"data-row":
|
|
3856
|
+
"data-row": Ae(T),
|
|
3873
3857
|
"data-column": N.name,
|
|
3874
3858
|
value: T.cells[N.name] ?? "",
|
|
3875
3859
|
readOnly: N.name === n && !T.isNew,
|
|
3876
3860
|
"aria-label": `${N.name} (${N.type})`,
|
|
3877
|
-
onChange: (
|
|
3861
|
+
onChange: (I) => d(T.id, N.name, I.target.value)
|
|
3878
3862
|
}
|
|
3879
3863
|
),
|
|
3880
3864
|
C !== void 0 && /* @__PURE__ */ t(
|
|
3881
3865
|
"div",
|
|
3882
3866
|
{
|
|
3883
3867
|
className: "w6w-data-cell-error",
|
|
3884
|
-
"data-row":
|
|
3868
|
+
"data-row": Ae(T),
|
|
3885
3869
|
"data-column": N.name,
|
|
3886
3870
|
children: C
|
|
3887
3871
|
}
|
|
@@ -3899,16 +3883,16 @@ function tl({
|
|
|
3899
3883
|
{
|
|
3900
3884
|
className: "w6w-btn",
|
|
3901
3885
|
type: "button",
|
|
3902
|
-
"data-row":
|
|
3886
|
+
"data-row": Ae(N),
|
|
3903
3887
|
"data-testid": "row-save",
|
|
3904
3888
|
disabled: !N.isNew && !N.dirty || !!N.conflict,
|
|
3905
3889
|
onClick: () => u(N.id),
|
|
3906
3890
|
children: "Save"
|
|
3907
3891
|
}
|
|
3908
3892
|
),
|
|
3909
|
-
/* @__PURE__ */ t(
|
|
3910
|
-
N.conflict && /* @__PURE__ */ i("div", { className: "w6w-error", "data-row":
|
|
3911
|
-
|
|
3893
|
+
/* @__PURE__ */ t(fe, { label: "Delete entry", onClick: () => f(N.id) }),
|
|
3894
|
+
N.conflict && /* @__PURE__ */ i("div", { className: "w6w-error", "data-row": Ae(N), "data-testid": "row-conflict", children: [
|
|
3895
|
+
rn,
|
|
3912
3896
|
" ",
|
|
3913
3897
|
/* @__PURE__ */ t(
|
|
3914
3898
|
"button",
|
|
@@ -3916,7 +3900,7 @@ function tl({
|
|
|
3916
3900
|
className: "w6w-btn w6w-btn-ghost",
|
|
3917
3901
|
type: "button",
|
|
3918
3902
|
"data-testid": "row-reload",
|
|
3919
|
-
onClick: () =>
|
|
3903
|
+
onClick: () => g(N.id),
|
|
3920
3904
|
children: "Reload"
|
|
3921
3905
|
}
|
|
3922
3906
|
)
|
|
@@ -3926,7 +3910,7 @@ function tl({
|
|
|
3926
3910
|
];
|
|
3927
3911
|
return /* @__PURE__ */ i("div", { children: [
|
|
3928
3912
|
s != null && s !== "" && /* @__PURE__ */ t("div", { className: "w6w-error", "data-testid": "grid-error", children: s }),
|
|
3929
|
-
/* @__PURE__ */ i("form", { className: "w6w-data-entries-toolbar", "data-testid": "entry-search", onSubmit:
|
|
3913
|
+
/* @__PURE__ */ i("form", { className: "w6w-data-entries-toolbar", "data-testid": "entry-search", onSubmit: S, children: [
|
|
3930
3914
|
/* @__PURE__ */ t(
|
|
3931
3915
|
"input",
|
|
3932
3916
|
{
|
|
@@ -3935,7 +3919,7 @@ function tl({
|
|
|
3935
3919
|
value: y,
|
|
3936
3920
|
placeholder: "Key prefix",
|
|
3937
3921
|
"aria-label": "Key prefix",
|
|
3938
|
-
onChange: (N) =>
|
|
3922
|
+
onChange: (N) => w(N.target.value)
|
|
3939
3923
|
}
|
|
3940
3924
|
),
|
|
3941
3925
|
/* @__PURE__ */ t("button", { className: "w6w-btn w6w-btn-ghost", type: "submit", children: "Search" }),
|
|
@@ -3951,7 +3935,7 @@ function tl({
|
|
|
3951
3935
|
)
|
|
3952
3936
|
] }),
|
|
3953
3937
|
/* @__PURE__ */ t("div", { className: "w6w-data-grid-scroll", "data-testid": "data-grid-scroll", children: /* @__PURE__ */ t(
|
|
3954
|
-
|
|
3938
|
+
pe,
|
|
3955
3939
|
{
|
|
3956
3940
|
columns: x,
|
|
3957
3941
|
rows: a,
|
|
@@ -3968,152 +3952,153 @@ function tl({
|
|
|
3968
3952
|
className: "w6w-btn w6w-btn-ghost",
|
|
3969
3953
|
type: "button",
|
|
3970
3954
|
"data-testid": "entries-load-more",
|
|
3971
|
-
onClick:
|
|
3955
|
+
onClick: m,
|
|
3972
3956
|
children: "Load more"
|
|
3973
3957
|
}
|
|
3974
3958
|
)
|
|
3975
3959
|
] });
|
|
3976
3960
|
}
|
|
3977
3961
|
export {
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3962
|
+
Dt as ATTENTION_DISPLAY_CAP,
|
|
3963
|
+
ms as ActionTestForm,
|
|
3964
|
+
al as AddConnectionModal,
|
|
3965
|
+
Ct as ApiCallsPanel,
|
|
3966
|
+
$e as ApiError,
|
|
3967
|
+
De as AppIcon,
|
|
3968
|
+
sl as AppPicker,
|
|
3969
|
+
Je as AuthFieldsForm,
|
|
3970
|
+
Os as BudgetMeter,
|
|
3971
|
+
Wa as CELL_PROBLEM_COPY,
|
|
3972
|
+
Ja as CSV_MAX_BYTES,
|
|
3973
|
+
Qa as CSV_TOO_LARGE_COPY,
|
|
3974
|
+
As as CallableList,
|
|
3975
|
+
ll as CanvasLayer,
|
|
3976
|
+
Ie as CodeBlock,
|
|
3977
|
+
il as CodeEditor,
|
|
3978
|
+
Gs as ColumnsEditor,
|
|
3995
3979
|
Tn as Combobox,
|
|
3996
3980
|
An as ConfirmModal,
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
3981
|
+
_s as ConnectionHeader,
|
|
3982
|
+
Es as ConnectionList,
|
|
3983
|
+
st as Copyable,
|
|
4000
3984
|
Gn as CopyableText,
|
|
3985
|
+
rl as CreateSharedCredentialContext,
|
|
4001
3986
|
ol as CredentialPicker,
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
3987
|
+
Xs as CsvPanel,
|
|
3988
|
+
me as DATA_STORE_ERROR_FALLBACK,
|
|
3989
|
+
Is as DATA_STORE_KINDS,
|
|
3990
|
+
ja as DATA_STORE_KIND_LABEL,
|
|
3991
|
+
Ga as DATA_STORE_NETWORK_ERROR,
|
|
3992
|
+
Jt as DOC_VALUE_COPY,
|
|
3993
|
+
Qs as DataEntryEditor,
|
|
3994
|
+
Zs as DataEntryList,
|
|
3995
|
+
Ys as DataStoreList,
|
|
3996
|
+
pe as DataTable,
|
|
3997
|
+
el as DataTableGrid,
|
|
3998
|
+
fe as DeleteButton,
|
|
3999
|
+
Yt as EditButton,
|
|
4000
|
+
Rs as EditConnectionModal,
|
|
4001
|
+
Oe as EmptyState,
|
|
4002
|
+
Ss as ExecutionDetail,
|
|
4003
|
+
xs as ExecutionFilters,
|
|
4004
|
+
ks as ExecutionList,
|
|
4020
4005
|
pa as ExecutionLogPanel,
|
|
4021
|
-
|
|
4006
|
+
Cs as ExecutionStats,
|
|
4022
4007
|
cl as ExpressionEditorModal,
|
|
4023
4008
|
dl as ExpressionInput,
|
|
4024
4009
|
ul as ExpressionOptionsProvider,
|
|
4025
4010
|
wl as HTML_PREVIEW_CSP,
|
|
4026
|
-
|
|
4027
|
-
|
|
4011
|
+
lt as HealthStatusPill,
|
|
4012
|
+
vs as HistoryTimeline,
|
|
4028
4013
|
ml as HtmlPreview,
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4014
|
+
et as Icon,
|
|
4015
|
+
he as IconButton,
|
|
4016
|
+
Ns as InfoTip,
|
|
4017
|
+
we as JsonEditor,
|
|
4033
4018
|
hl as LastUsedNote,
|
|
4034
|
-
|
|
4019
|
+
tt as ListItem,
|
|
4035
4020
|
pl as Markdown,
|
|
4036
|
-
|
|
4037
|
-
|
|
4021
|
+
_e as Modal,
|
|
4022
|
+
ln as NEW_ROW_ID,
|
|
4038
4023
|
fl as NodeConfigForm,
|
|
4039
4024
|
$n as ParamsForm,
|
|
4040
4025
|
gl as PropertyEntryForm,
|
|
4041
4026
|
Ma as RECENT_DISPLAY_CAP,
|
|
4042
4027
|
yl as RESULT_RENDER_MAX_CHARS,
|
|
4043
4028
|
Ua as ReliabilityChart,
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4029
|
+
Ts as ReliabilityList,
|
|
4030
|
+
bs as RepoSyncIndicator,
|
|
4031
|
+
Ze as ResultViewer,
|
|
4047
4032
|
vl as RetryPolicyFields,
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4033
|
+
tn as SCALAR_TYPES,
|
|
4034
|
+
ys as ServerResourcesBadge,
|
|
4035
|
+
ps as ServerResourcesCard,
|
|
4036
|
+
fs as ServerResourcesCardSmall,
|
|
4037
|
+
gs as ServerResourcesRail,
|
|
4053
4038
|
Nl as StepBuilderModal,
|
|
4054
|
-
|
|
4039
|
+
rt as StepStatusPill,
|
|
4055
4040
|
Qn as UptimeStrip,
|
|
4056
|
-
|
|
4041
|
+
rn as VERSION_CONFLICT_COPY,
|
|
4057
4042
|
bl as W6WUIProvider,
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4043
|
+
hs as YamlEditor,
|
|
4044
|
+
js as buildRowValue,
|
|
4045
|
+
Vs as cellErrorsOf,
|
|
4061
4046
|
kl as connectionAppIdsToLookUp,
|
|
4062
|
-
|
|
4047
|
+
ws as createW6WApi,
|
|
4063
4048
|
Yn as cropText,
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4049
|
+
Ms as csvFilenameOf,
|
|
4050
|
+
zs as csvImportMessage,
|
|
4051
|
+
jt as csvLineOf,
|
|
4067
4052
|
xl as detectResultFormat,
|
|
4068
|
-
|
|
4053
|
+
Ks as dirtyColumns,
|
|
4069
4054
|
Da as displayBoard,
|
|
4070
|
-
|
|
4055
|
+
Fs as draftFromEntry,
|
|
4071
4056
|
Cl as effectiveNodeOutput,
|
|
4072
4057
|
Sl as effectiveNodeOutputs,
|
|
4073
|
-
|
|
4058
|
+
Za as errorPlacement,
|
|
4074
4059
|
$l as filterOptions,
|
|
4075
4060
|
Tl as findTestInput,
|
|
4076
|
-
|
|
4077
|
-
|
|
4061
|
+
ot as formatDurationMs,
|
|
4062
|
+
Le as formatExecutionTime,
|
|
4078
4063
|
Al as htmlPreviewSrcDoc,
|
|
4079
4064
|
Hl as iconNames,
|
|
4080
4065
|
El as indexNodeSamples,
|
|
4081
|
-
|
|
4066
|
+
Ds as isCellValue,
|
|
4082
4067
|
Rl as isExprValue,
|
|
4083
4068
|
_l as isFormResolvedOptions,
|
|
4084
4069
|
Ol as isSecretValue,
|
|
4085
4070
|
Il as isTestRequired,
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4071
|
+
qs as isVersionConflict,
|
|
4072
|
+
Hs as kvValueOf,
|
|
4073
|
+
Ps as kvValueTypeOf,
|
|
4074
|
+
Us as locateDataStoreError,
|
|
4075
|
+
Xa as locateRawResponseError,
|
|
4076
|
+
$s as needsAttention,
|
|
4077
|
+
Bs as newRowDraft,
|
|
4078
|
+
dt as parseCell,
|
|
4079
|
+
ts as parseDocText,
|
|
4095
4080
|
Pa as partitionBoard,
|
|
4096
4081
|
Ia as performancePoints,
|
|
4097
4082
|
Pl as previewNodeOutputs,
|
|
4098
|
-
|
|
4083
|
+
Js as remainingTtlSeconds,
|
|
4099
4084
|
Ll as rememberableInput,
|
|
4100
4085
|
Ml as requiredParamsFilled,
|
|
4101
4086
|
Pn as resolveConnectionAppMeta,
|
|
4102
4087
|
Dl as resultCopyText,
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4088
|
+
es as rowValueOf,
|
|
4089
|
+
Ws as rowWriteOf,
|
|
4090
|
+
ut as serializeCell,
|
|
4106
4091
|
Ul as shapeToSkeleton,
|
|
4107
4092
|
Fl as shouldUseCombobox,
|
|
4108
4093
|
Bl as splitFrontmatter,
|
|
4109
4094
|
Kl as startOAuthPopup,
|
|
4110
|
-
|
|
4095
|
+
Ls as tableSchemaOf,
|
|
4111
4096
|
jl as testInputSavesSettled,
|
|
4112
4097
|
Jl as trackTestInputSave,
|
|
4113
4098
|
La as uptimeDays,
|
|
4114
4099
|
Mn as useEnterSubmit,
|
|
4115
4100
|
Wl as useExpressionOptions,
|
|
4116
4101
|
Vl as useRememberedTestInput,
|
|
4117
|
-
|
|
4102
|
+
Wt as useW6WApi
|
|
4118
4103
|
};
|
|
4119
4104
|
//# sourceMappingURL=index.mjs.map
|