@nivaro/react 0.3.105 → 0.3.107

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.
@@ -0,0 +1,127 @@
1
+ import { jsxs as l, jsx as s, Fragment as f } from "react/jsx-runtime";
2
+ import { FlaskConical as x, ArrowUpRight as g } from "lucide-react";
3
+ import { useState as h, useEffect as u } from "react";
4
+ const c = /* @__PURE__ */ new Map();
5
+ function b(i) {
6
+ let e = c.get(i);
7
+ return e || (e = fetch(`${i}/api/app-info`, { credentials: "omit" }).then((t) => t.ok ? t.json() : null).then((t) => {
8
+ const n = t == null ? void 0 : t.environment_notice;
9
+ if (!n || typeof n != "object") return null;
10
+ const r = typeof n.label == "string" ? n.label.trim().slice(0, 40) : "";
11
+ if (!r) return null;
12
+ const m = typeof n.message == "string" ? n.message.trim().slice(0, 200) : "", o = typeof n.production_url == "string" ? n.production_url : null;
13
+ return {
14
+ label: r,
15
+ message: m,
16
+ productionUrl: o && /^https:\/\//.test(o) ? o : null,
17
+ inAdminApp: n.in_admin_app !== !1
18
+ };
19
+ }).catch(() => null), c.set(i, e)), e;
20
+ }
21
+ function d(i = "") {
22
+ const [e, t] = h(null);
23
+ return u(() => {
24
+ let n = !0;
25
+ return b(i).then((r) => {
26
+ n && t(r);
27
+ }), () => {
28
+ n = !1;
29
+ };
30
+ }, [i]), e;
31
+ }
32
+ function p(i) {
33
+ u(() => {
34
+ if (!i || typeof document > "u") return;
35
+ const e = `${i} · `, t = () => {
36
+ document.title.startsWith(e) || (document.title = e + document.title);
37
+ };
38
+ t();
39
+ const n = document.querySelector("title"), r = n ? new MutationObserver(t) : null;
40
+ return n && r && r.observe(n, { childList: !0, characterData: !0, subtree: !0 }), () => {
41
+ r == null || r.disconnect(), document.title.startsWith(e) && (document.title = document.title.slice(e.length));
42
+ };
43
+ }, [i]);
44
+ }
45
+ const a = "repeating-linear-gradient(-45deg, #111827 0 9px, #facc15 9px 18px)";
46
+ function N({ apiBase: i = "" }) {
47
+ const e = d(i);
48
+ return p(e ? e.label : null), e ? /* @__PURE__ */ l(f, { children: [
49
+ /* @__PURE__ */ s(
50
+ v,
51
+ {
52
+ label: e.label,
53
+ message: e.message,
54
+ productionUrl: e.productionUrl
55
+ }
56
+ ),
57
+ /* @__PURE__ */ s(
58
+ "div",
59
+ {
60
+ "aria-hidden": !0,
61
+ "data-environment-frame": !0,
62
+ className: "pointer-events-none fixed inset-0 z-40",
63
+ style: { border: "6px solid transparent", borderImage: `${a} 6` }
64
+ }
65
+ )
66
+ ] }) : null;
67
+ }
68
+ function v({
69
+ label: i,
70
+ message: e,
71
+ productionUrl: t,
72
+ preview: n = !1
73
+ }) {
74
+ return /* @__PURE__ */ l(
75
+ "div",
76
+ {
77
+ role: n ? void 0 : "alert",
78
+ "data-environment-banner": !0,
79
+ className: "relative z-30 flex min-h-[84px] w-full shrink-0 items-stretch bg-[#facc15] text-[#111827] shadow-[0_3px_16px_rgba(17,24,39,0.4)]",
80
+ children: [
81
+ /* @__PURE__ */ s("div", { "aria-hidden": !0, className: "w-8 shrink-0 sm:w-28", style: { backgroundImage: a } }),
82
+ /* @__PURE__ */ l("div", { className: "flex min-w-0 flex-1 flex-wrap items-center justify-center gap-x-6 gap-y-1.5 px-5 py-3 text-center", children: [
83
+ /* @__PURE__ */ l("span", { className: "inline-flex items-center gap-2.5 text-[22px] font-black uppercase leading-none tracking-[0.16em] sm:text-[28px]", children: [
84
+ /* @__PURE__ */ s(x, { className: "h-6 w-6 sm:h-7 sm:w-7", strokeWidth: 2.6 }),
85
+ i
86
+ ] }),
87
+ e && /* @__PURE__ */ s("span", { className: "max-w-[52ch] text-[14px] font-semibold leading-snug sm:text-[15.5px]", children: e }),
88
+ t && /* @__PURE__ */ l(
89
+ "a",
90
+ {
91
+ href: t,
92
+ onClick: n ? (r) => r.preventDefault() : void 0,
93
+ className: "inline-flex items-center gap-1.5 rounded-md bg-[#111827] px-3.5 py-2 text-[13.5px] font-bold text-[#facc15] transition-colors hover:bg-[#1f2937] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#111827] focus-visible:ring-offset-2 focus-visible:ring-offset-[#facc15]",
94
+ children: [
95
+ "Go to production",
96
+ /* @__PURE__ */ s(g, { className: "h-3.5 w-3.5", strokeWidth: 2.4 })
97
+ ]
98
+ }
99
+ )
100
+ ] }),
101
+ /* @__PURE__ */ s("div", { "aria-hidden": !0, className: "w-8 shrink-0 sm:w-28", style: { backgroundImage: a } })
102
+ ]
103
+ }
104
+ );
105
+ }
106
+ function _({ apiBase: i = "" }) {
107
+ const e = d(i), t = e != null && e.inAdminApp ? e : null;
108
+ return p(t ? t.label : null), t ? /* @__PURE__ */ l(
109
+ "div",
110
+ {
111
+ "aria-hidden": !0,
112
+ "data-environment-edge": !0,
113
+ className: "pointer-events-none fixed inset-x-0 top-0 z-[60] flex justify-center",
114
+ children: [
115
+ /* @__PURE__ */ s("div", { className: "absolute inset-x-0 top-0 h-[4px]", style: { backgroundImage: a } }),
116
+ /* @__PURE__ */ s("span", { className: "relative mt-[4px] rounded-b-md bg-[#facc15] px-2.5 pb-[3px] pt-[1px] text-[10.5px] font-extrabold uppercase leading-[14px] tracking-[0.14em] text-[#111827] shadow-[0_2px_6px_rgba(17,24,39,0.3)]", children: t.label })
117
+ ]
118
+ }
119
+ ) : null;
120
+ }
121
+ export {
122
+ v as EnvironmentBand,
123
+ _ as EnvironmentEdge,
124
+ N as EnvironmentLoginBanner,
125
+ b as readEnvironment,
126
+ d as useInstanceEnvironment
127
+ };
@@ -1,25 +1,26 @@
1
1
  import { jsx as t, jsxs as w, Fragment as ke } from "react/jsx-runtime";
2
2
  import { useQueryClient as rt, useQuery as nt } from "@tanstack/react-query";
3
3
  import { AlertTriangle as Xe, RefreshCw as Ye, MoreVertical as lt, MoreHorizontal as st, Clipboard as it, Copy as at, Clock as ot, Calendar as ct, Paperclip as dt, Folder as ut, File as ft, FileText as pt, Bell as mt, Phone as ht, MessageSquare as gt, Mail as yt, UserCheck as xt, UserPlus as wt, Users as bt, User as vt, Activity as _t, Zap as Nt, Power as kt, Search as St, Filter as Rt, Sliders as Lt, Settings as Ct, RotateCcw as $t, Pause as Et, Play as Tt, HelpCircle as qt, Info as jt, AlertCircle as Ot, Flag as It, Bookmark as Dt, Heart as At, Star as Wt, Unlock as Ut, Lock as Pt, EyeOff as Mt, Eye as Bt, Send as Ht, Upload as Vt, Download as Ft, Save as Jt, Trash2 as Kt, Edit2 as Qt, Edit as zt, Minus as Gt, Plus as Xt, XCircle as Yt, X as Zt, CheckCircle as er, Check as tr, Share2 as rr, Link as nr, ExternalLink as lr, ArrowUpRight as sr, ArrowDown as ir, ArrowUp as ar, ArrowLeft as or, ArrowRight as cr } from "lucide-react";
4
- import { useState as M, useRef as re, useCallback as Ue, useEffect as te, useMemo as Pe } from "react";
4
+ import { useState as H, useRef as re, useCallback as Ue, useEffect as te, useMemo as Pe } from "react";
5
5
  import { useApiFetchConfig as Se, useDrilldown as dr, useOptionalNivaroClient as ur } from "../context.js";
6
6
  import { useDebounced as fr } from "../hooks/useDebounced.js";
7
7
  import { PRETEND_DOWN_EVENT as Me } from "../lib/client-chaos.js";
8
8
  import { get as pr, post as mr } from "../lib/commands.js";
9
9
  import { HEADER_CELL_DENSE as hr, HEADER_CELL_LIST as gr, HEADER_LABEL as yr, HEADER_VALUE_LINE as xr, HEADER_VALUE_HERO as wr, HEADER_VALUE as br } from "../lib/header-strip.js";
10
10
  import { loadErrorText as Be } from "../lib/load-error.js";
11
+ import { useStartsOpen as vr } from "../lib/use-starts-open.js";
11
12
  import { affixesFor as de, formatWidgetValue as ue } from "../lib/widget-value-format.js";
12
- import { BackgroundRunOffer as vr } from "./BackgroundRunOffer.js";
13
- import { cacheStampTip as _r, CacheStamp as Nr } from "./CacheStamp.js";
14
- import { useStagedRelations as kr } from "./item-edit/O2MStagingContext.js";
13
+ import { BackgroundRunOffer as _r } from "./BackgroundRunOffer.js";
14
+ import { cacheStampTip as Nr, CacheStamp as kr } from "./CacheStamp.js";
15
+ import { useStagedRelations as Sr } from "./item-edit/O2MStagingContext.js";
15
16
  import { LoadErrorNote as He } from "./LoadErrorNote.js";
16
- import { QueryTable as Sr } from "./QueryTable.js";
17
+ import { QueryTable as Rr } from "./QueryTable.js";
17
18
  import { CardSkeleton as we } from "./Skeletons.js";
18
19
  import { Button as ce } from "./ui/button.js";
19
20
  import { DropdownMenu as Ve, DropdownMenuTrigger as Fe, DropdownMenuContent as Je, DropdownMenuItem as Ke } from "./ui/dropdown-menu.js";
20
- import { reportSlotScalar as Rr, ReportSlotWidget as Lr } from "./widgets/ReportSlotWidget.js";
21
- import { ReviewListWidget as Cr } from "./widgets/ReviewListWidget.js";
22
- import { RollupWidget as $r } from "./widgets/RollupWidget.js";
21
+ import { reportSlotScalar as Lr, ReportSlotWidget as Cr } from "./widgets/ReportSlotWidget.js";
22
+ import { ReviewListWidget as $r } from "./widgets/ReviewListWidget.js";
23
+ import { RollupWidget as Er } from "./widgets/RollupWidget.js";
23
24
  const Y = {
24
25
  ArrowRight: cr,
25
26
  ArrowLeft: or,
@@ -138,7 +139,7 @@ function be({
138
139
  )
139
140
  );
140
141
  }
141
- function Er({
142
+ function Tr({
142
143
  data: n,
143
144
  label: a,
144
145
  loading: o,
@@ -185,7 +186,7 @@ function Er({
185
186
  }
186
187
  ) });
187
188
  }
188
- function Tr(n, a) {
189
+ function qr(n, a) {
189
190
  if (Object.hasOwn(n, a)) return n[a] ?? null;
190
191
  const o = a.split(".");
191
192
  let s = n;
@@ -195,11 +196,11 @@ function Tr(n, a) {
195
196
  }
196
197
  return s ?? null;
197
198
  }
198
- function qr(n, a) {
199
+ function jr(n, a) {
199
200
  const o = {};
200
201
  for (const s of n)
201
202
  if (s.binding_type === "item_field")
202
- o[s.key] = Tr(a, s.binding_value);
203
+ o[s.key] = qr(a, s.binding_value);
203
204
  else if (s.binding_type === "static")
204
205
  o[s.key] = s.binding_value;
205
206
  else if (s.binding_type === "url_param" && typeof window < "u") {
@@ -255,7 +256,7 @@ function _e({
255
256
  )
256
257
  ] });
257
258
  }
258
- function jr({
259
+ function Or({
259
260
  data: n,
260
261
  label: a,
261
262
  style: o,
@@ -328,7 +329,7 @@ function Qe({ data: n }) {
328
329
  }
329
330
  );
330
331
  }
331
- function Or({ data: n }) {
332
+ function Ir({ data: n }) {
332
333
  const a = n.rows ?? [], o = n.fields ?? [];
333
334
  return a.length === 0 ? /* @__PURE__ */ t("p", { className: "text-[12px] text-slate-400", children: "No items" }) : /* @__PURE__ */ t("div", { className: "overflow-x-auto", children: /* @__PURE__ */ w("table", { className: "w-full text-[12px]", children: [
334
335
  /* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { className: "border-b border-slate-100", children: o.map((s) => /* @__PURE__ */ t("th", { className: "py-1 pr-3 text-left font-medium text-slate-500", children: s }, s)) }) }),
@@ -342,7 +343,7 @@ function ze({
342
343
  apiBase: s,
343
344
  onAction: d
344
345
  }) {
345
- const g = n.buttons ?? [], [v, b] = M(null), _ = Se(), R = async (C) => {
346
+ const g = n.buttons ?? [], [v, b] = H(null), _ = Se(), R = async (C) => {
346
347
  b(C);
347
348
  try {
348
349
  const S = typeof window < "u" ? localStorage.getItem("nivaro_workspace") ?? "" : "", $ = (await (await fetch(`${s}/widgets-internal/${a}/action`, {
@@ -381,7 +382,7 @@ function ze({
381
382
  );
382
383
  }) });
383
384
  }
384
- const Ir = /* @__PURE__ */ new Set(["navigate", "field-update", "flow", "toggle"]);
385
+ const Dr = /* @__PURE__ */ new Set(["navigate", "field-update", "flow", "toggle"]);
385
386
  function Ne({
386
387
  buttons: n,
387
388
  layout: a,
@@ -390,7 +391,7 @@ function Ne({
390
391
  apiBase: d,
391
392
  onClientAction: g
392
393
  }) {
393
- const [v, b] = M(null), [_, R] = M(null), [C, S] = M({}), U = re(null), A = Se();
394
+ const [v, b] = H(null), [_, R] = H(null), [C, S] = H({}), U = re(null), A = Se();
394
395
  function $(e) {
395
396
  return e === !0 || e === 1 ? "1" : e === !1 || e === 0 ? "0" : String(e ?? "");
396
397
  }
@@ -438,7 +439,7 @@ function Ne({
438
439
  }
439
440
  function G(e, f) {
440
441
  const u = e.action ?? "open-url";
441
- if (Ir.has(u)) {
442
+ if (Dr.has(u)) {
442
443
  if (u === "toggle") {
443
444
  const p = e.id ?? String(f);
444
445
  S((T) => ({ ...T, [p]: !E(e, f) }));
@@ -473,7 +474,7 @@ function Ne({
473
474
  function ne(e, f, u) {
474
475
  const p = e.id ?? String(f), T = v === p, P = _ === p;
475
476
  let x = e.label ?? "Button", N = e.variant ?? "secondary";
476
- const B = e.action_config, I = e.toggle_input || (B == null ? void 0 : B.toggle_input) || (B == null ? void 0 : B.field) || "";
477
+ const M = e.action_config, I = e.toggle_input || (M == null ? void 0 : M.toggle_input) || (M == null ? void 0 : M.field) || "";
477
478
  if (e.action === "toggle") {
478
479
  const q = I && I !== e.toggle_input ? { ...e, toggle_input: I } : e, J = E(q, f);
479
480
  x = J ? e.label_on || x : e.label_off || x, N = J ? e.variant_on ?? N : e.variant_off ?? N;
@@ -505,9 +506,9 @@ function Ne({
505
506
  if (a === "split" && n.length > 1) {
506
507
  const [e, ...f] = n, u = e.id ?? "0", p = _ === u, T = e.action === "none" || !e.action;
507
508
  let P = e.label ?? "Button", x = e.variant ?? "default";
508
- const N = e.action_config, B = e.toggle_input || (N == null ? void 0 : N.toggle_input) || (N == null ? void 0 : N.field) || "";
509
- if (e.action === "toggle" && B) {
510
- const L = B !== e.toggle_input ? { ...e, toggle_input: B } : e, q = E(L, 0);
509
+ const N = e.action_config, M = e.toggle_input || (N == null ? void 0 : N.toggle_input) || (N == null ? void 0 : N.field) || "";
510
+ if (e.action === "toggle" && M) {
511
+ const L = M !== e.toggle_input ? { ...e, toggle_input: M } : e, q = E(L, 0);
511
512
  P = q ? e.label_on || P : e.label_off || P, x = q ? e.variant_on ?? x : e.variant_off ?? x;
512
513
  }
513
514
  const I = e.icon ? Y[e.icon] : null, F = e.color ? {
@@ -622,7 +623,7 @@ function Ge(n, a) {
622
623
  const o = ((s = a == null ? void 0 : a.instance) == null ? void 0 : s.current_state) ?? null;
623
624
  return { next: o, moved: n !== void 0 && n !== o };
624
625
  }
625
- function sn({
626
+ function on({
626
627
  widgetId: n,
627
628
  inputBindings: a = [],
628
629
  itemDraft: o = {},
@@ -639,7 +640,7 @@ function sn({
639
640
  onContentChange: A
640
641
  }) {
641
642
  var De, Ae;
642
- const $ = Se(), E = _ ?? $.apiBase, [Z, fe] = M(v), [r, G] = M(null), [i, ne] = M(null), [e, f] = M(!0), [u, p] = M(!0), [T, P] = M(!0), [x, N] = M(null), [B, I] = M(0), [F, L] = M(null), q = re(!1), J = Ue(() => {
643
+ const $ = Se(), E = _ ?? $.apiBase, [Z, fe] = vr(v, !0), [r, G] = H(null), [i, ne] = H(null), [e, f] = H(!0), [u, p] = H(!0), [T, P] = H(!0), [x, N] = H(null), [M, I] = H(0), [F, L] = H(null), q = re(!1), J = Ue(() => {
643
644
  q.current = !0, I((l) => l + 1);
644
645
  }, []), K = re(null), le = re(void 0), pe = re(!1), se = rt();
645
646
  te(() => {
@@ -684,7 +685,7 @@ function sn({
684
685
  const Le = {};
685
686
  for (const [l, c] of Object.entries(o))
686
687
  l.includes(".") || (c == null || typeof c != "object") && (Le[l] = c);
687
- const D = { ...Le, ...qr(a, o) }, me = kr(), Q = Pe(() => {
688
+ const D = { ...Le, ...jr(a, o) }, me = Sr(), Q = Pe(() => {
688
689
  if ((r == null ? void 0 : r.widget_type) !== "rollup" || !me) return null;
689
690
  const l = r.config, c = l == null ? void 0 : l.collection;
690
691
  if (!c) return null;
@@ -811,7 +812,7 @@ function sn({
811
812
  })(), () => {
812
813
  c = !0;
813
814
  };
814
- }, [n, E, tt, d, B, r == null ? void 0 : r.widget_type]), te(() => {
815
+ }, [n, E, tt, d, M, r == null ? void 0 : r.widget_type]), te(() => {
815
816
  if (A) {
816
817
  if (x) {
817
818
  A(!0);
@@ -832,7 +833,7 @@ function sn({
832
833
  }
833
834
  }
834
835
  }, [i, x, r == null ? void 0 : r.widget_type, A]);
835
- const z = g || (r == null ? void 0 : r.name) || "", ae = (r == null ? void 0 : r.widget_type) === "report_widget" && i ? Rr(i) : i, H = (() => {
836
+ const z = g || (r == null ? void 0 : r.name) || "", ae = (r == null ? void 0 : r.widget_type) === "report_widget" && i ? Lr(i) : i, B = (() => {
836
837
  const l = i == null ? void 0 : i.awaiting;
837
838
  if (!Array.isArray(l) || l.length === 0) return null;
838
839
  const c = l.map((m) => {
@@ -877,13 +878,13 @@ function sn({
877
878
  ) });
878
879
  {
879
880
  const m = /* @__PURE__ */ t(
880
- Er,
881
+ Tr,
881
882
  {
882
883
  data: u ? null : ae ?? null,
883
884
  label: g || r.name,
884
885
  loading: u,
885
886
  widgetConfig: r.config,
886
- awaiting: H
887
+ awaiting: B
887
888
  }
888
889
  ), j = ge ? /* @__PURE__ */ t(
889
890
  "button",
@@ -911,7 +912,7 @@ function sn({
911
912
  disabled: u,
912
913
  "data-cache-refresh": !0,
913
914
  "aria-label": "Refresh this figure",
914
- "data-tip": _r(k),
915
+ "data-tip": Nr(k),
915
916
  className: "absolute bottom-1 right-1 rounded p-0.5 text-muted-foreground opacity-0 transition-opacity hover:bg-muted group-hover/cache:opacity-100 focus-visible:opacity-100 disabled:opacity-50",
916
917
  children: /* @__PURE__ */ t(Ye, { className: `h-3 w-3 ${u ? "animate-spin" : ""}` })
917
918
  }
@@ -931,14 +932,14 @@ function sn({
931
932
  );
932
933
  {
933
934
  const m = /* @__PURE__ */ t(
934
- jr,
935
+ Or,
935
936
  {
936
937
  data: u ? null : ae ?? null,
937
938
  label: g || r.name,
938
939
  style: l,
939
940
  loading: u,
940
941
  widgetConfig: r.config,
941
- awaiting: H
942
+ awaiting: B
942
943
  }
943
944
  );
944
945
  return ge ? /* @__PURE__ */ t(
@@ -955,8 +956,8 @@ function sn({
955
956
  }
956
957
  }
957
958
  return e ? /* @__PURE__ */ t("div", { className: "animate-pulse h-4 w-20 rounded bg-slate-200 dark:bg-[hsl(var(--nvr-skeleton))]" }) : /* @__PURE__ */ t("div", { className: "flex items-center gap-1.5", children: u ? /* @__PURE__ */ t("div", { className: "flex items-baseline gap-1", children: /* @__PURE__ */ t("div", { className: "animate-pulse h-5 w-20 rounded bg-slate-200 dark:bg-[hsl(var(--nvr-skeleton))]" }) }) : i && r && /* @__PURE__ */ w(ke, { children: [
958
- (r.widget_type === "stat" || r.widget_type === "custom-query" && "value" in i) && /* @__PURE__ */ t(ve, { data: i, awaiting: H }),
959
- r.widget_type === "report_widget" && ae && /* @__PURE__ */ t(ve, { data: ae, awaiting: H }),
959
+ (r.widget_type === "stat" || r.widget_type === "custom-query" && "value" in i) && /* @__PURE__ */ t(ve, { data: i, awaiting: B }),
960
+ r.widget_type === "report_widget" && ae && /* @__PURE__ */ t(ve, { data: ae, awaiting: B }),
960
961
  r.widget_type === "custom-query" && "values" in i && /* @__PURE__ */ t(Qe, { data: i }),
961
962
  r.widget_type === "action-buttons" && /* @__PURE__ */ t(
962
963
  ze,
@@ -981,7 +982,7 @@ function sn({
981
982
  ] }) });
982
983
  }
983
984
  const oe = r == null ? void 0 : r.widget_type, je = oe === "stat" ? /* @__PURE__ */ t(we, { framed: !1, title: !1, kpi: !0, className: "py-0.5" }) : oe === "list" || oe === "review_list" || oe === "custom-query" ? /* @__PURE__ */ t(we, { framed: !1, title: !1, lines: 4, className: "py-0.5" }) : /* @__PURE__ */ t(we, { framed: !1, title: !1, lines: 3, className: "py-0.5" }), Oe = ee ? /* @__PURE__ */ t(
984
- vr,
985
+ _r,
985
986
  {
986
987
  className: "mt-2",
987
988
  pending: u && !!r,
@@ -1024,38 +1025,38 @@ function sn({
1024
1025
  function Ie() {
1025
1026
  var l;
1026
1027
  return !i || !r ? null : /* @__PURE__ */ w(ke, { children: [
1027
- (r.widget_type === "stat" || r.widget_type === "custom-query" && "value" in i) && /* @__PURE__ */ t(ve, { data: i, awaiting: H }),
1028
- r.widget_type === "custom-query" && "values" in i && (H ? /* @__PURE__ */ w(
1028
+ (r.widget_type === "stat" || r.widget_type === "custom-query" && "value" in i) && /* @__PURE__ */ t(ve, { data: i, awaiting: B }),
1029
+ r.widget_type === "custom-query" && "values" in i && (B ? /* @__PURE__ */ w(
1029
1030
  "p",
1030
1031
  {
1031
1032
  className: "text-[12px] text-slate-500 dark:text-slate-400",
1032
- "data-widget-awaiting": H,
1033
+ "data-widget-awaiting": B,
1033
1034
  children: [
1034
1035
  "Set ",
1035
- H,
1036
+ B,
1036
1037
  " on this record to see ",
1037
1038
  z || "this",
1038
1039
  "."
1039
1040
  ]
1040
1041
  }
1041
1042
  ) : /* @__PURE__ */ t(Qe, { data: i })),
1042
- r.widget_type === "list" && /* @__PURE__ */ t(Or, { data: i }),
1043
- H && r.widget_type === "custom-query" && "rows" in i && /* @__PURE__ */ w(
1043
+ r.widget_type === "list" && /* @__PURE__ */ t(Ir, { data: i }),
1044
+ B && r.widget_type === "custom-query" && "rows" in i && /* @__PURE__ */ w(
1044
1045
  "p",
1045
1046
  {
1046
1047
  className: "text-[12px] text-slate-500 dark:text-slate-400",
1047
- "data-widget-awaiting": H,
1048
+ "data-widget-awaiting": B,
1048
1049
  children: [
1049
1050
  "Set ",
1050
- H,
1051
+ B,
1051
1052
  " on this record to see ",
1052
1053
  z || "this",
1053
1054
  "."
1054
1055
  ]
1055
1056
  }
1056
1057
  ),
1057
- !H && r.widget_type === "custom-query" && "rows" in i && /* @__PURE__ */ t(
1058
- Sr,
1058
+ !B && r.widget_type === "custom-query" && "rows" in i && /* @__PURE__ */ t(
1059
+ Rr,
1059
1060
  {
1060
1061
  rows: i.rows ?? [],
1061
1062
  config: (l = r.config) == null ? void 0 : l.table,
@@ -1063,7 +1064,7 @@ function sn({
1063
1064
  }
1064
1065
  ),
1065
1066
  r.widget_type === "review_list" && /* @__PURE__ */ t(
1066
- Cr,
1067
+ $r,
1067
1068
  {
1068
1069
  data: i,
1069
1070
  config: r.config ?? {},
@@ -1073,14 +1074,14 @@ function sn({
1073
1074
  }
1074
1075
  ),
1075
1076
  r.widget_type === "rollup" && /* @__PURE__ */ t(
1076
- $r,
1077
+ Er,
1077
1078
  {
1078
1079
  data: i,
1079
1080
  config: r.config ?? {},
1080
1081
  emptyLabel: z
1081
1082
  }
1082
1083
  ),
1083
- r.widget_type === "report_widget" && /* @__PURE__ */ t(Lr, { payload: i }),
1084
+ r.widget_type === "report_widget" && /* @__PURE__ */ t(Cr, { payload: i }),
1084
1085
  r.widget_type === "action-buttons" && /* @__PURE__ */ t(
1085
1086
  ze,
1086
1087
  {
@@ -1112,7 +1113,7 @@ function sn({
1112
1113
  "report_widget"
1113
1114
  ].includes(r.widget_type) && /* @__PURE__ */ t("pre", { className: "whitespace-pre-wrap text-[11px] text-slate-500", children: JSON.stringify(i, null, 2) }),
1114
1115
  i.cache ? /* @__PURE__ */ t(
1115
- Nr,
1116
+ kr,
1116
1117
  {
1117
1118
  envelope: i.cache,
1118
1119
  onRefresh: J,
@@ -1124,6 +1125,6 @@ function sn({
1124
1125
  }
1125
1126
  }
1126
1127
  export {
1127
- sn as WidgetSlot,
1128
+ on as WidgetSlot,
1128
1129
  Ge as hostStepChange
1129
1130
  };