@nivaro/react 0.3.139 → 0.3.140

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.
Files changed (87) hide show
  1. package/dist/components/InlineGridField.js +95 -92
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +36 -2
  4. package/dist/shared/components/AudienceConfirmPanel.js +19 -19
  5. package/dist/shared/components/BroadcastView.js +213 -211
  6. package/dist/shared/components/CollectionBrowserView.js +2677 -2658
  7. package/dist/shared/components/ConfigHistory.js +45 -45
  8. package/dist/shared/components/ConformanceView.js +110 -110
  9. package/dist/shared/components/DataTable.js +51 -51
  10. package/dist/shared/components/FilePreviewLightbox.js +26 -25
  11. package/dist/shared/components/ItemEditForm.js +3038 -3027
  12. package/dist/shared/components/LiveCount.js +27 -23
  13. package/dist/shared/components/LiveTraceView.js +62 -61
  14. package/dist/shared/components/PageRenderer.js +422 -410
  15. package/dist/shared/components/ProfileView.js +199 -199
  16. package/dist/shared/components/QualityRulesView.js +70 -70
  17. package/dist/shared/components/QueryTable.js +131 -130
  18. package/dist/shared/components/RecordGraph.js +98 -98
  19. package/dist/shared/components/RecordReadView.js +287 -288
  20. package/dist/shared/components/ReportView.js +1279 -1259
  21. package/dist/shared/components/SlaRulesView.js +73 -74
  22. package/dist/shared/components/WidgetSlot.js +73 -73
  23. package/dist/shared/components/ai/AiChart.js +36 -32
  24. package/dist/shared/components/ai/AiMarkdown.js +136 -129
  25. package/dist/shared/components/ai/TaskDo.js +87 -87
  26. package/dist/shared/components/ai/answer-formats.js +37 -30
  27. package/dist/shared/components/ai/call-log/format.js +17 -16
  28. package/dist/shared/components/bulk/BulkActionButtons.js +66 -66
  29. package/dist/shared/components/bulk/BulkFieldUpdate.js +59 -59
  30. package/dist/shared/components/bulk/BulkSelectionNotices.js +34 -34
  31. package/dist/shared/components/bulk/MessageStakeholders.js +31 -29
  32. package/dist/shared/components/bulk/PushBulkButtons.js +83 -82
  33. package/dist/shared/components/bulk/bulk-field-options.js +10 -10
  34. package/dist/shared/components/cbv/column-totals.js +53 -51
  35. package/dist/shared/components/chat/ChatAnalyticsView.js +87 -87
  36. package/dist/shared/components/collections-directory/CollectionsToolbar.js +18 -18
  37. package/dist/shared/components/command-center/announce.js +7 -6
  38. package/dist/shared/components/command-center/panels/AttentionPanel.js +32 -31
  39. package/dist/shared/components/command-center/panels/FlowPanel.js +29 -28
  40. package/dist/shared/components/command-center/panels/PeoplePanel.js +39 -39
  41. package/dist/shared/components/delegation/DelegationConsoleView.js +27 -27
  42. package/dist/shared/components/imports/RunDetailSheet.js +1 -1
  43. package/dist/shared/components/integrations/IntegrationObligationsView.js +119 -119
  44. package/dist/shared/components/integrations/console/EventsView.js +35 -35
  45. package/dist/shared/components/integrations/console/FirefightView.js +15 -14
  46. package/dist/shared/components/integrations/console/PartnerDetail.js +78 -78
  47. package/dist/shared/components/integrations/console/ReadyToSendView.js +103 -103
  48. package/dist/shared/components/integrations/console/SignalCard.js +67 -67
  49. package/dist/shared/components/item-edit/CatalogPickerField.js +536 -527
  50. package/dist/shared/components/item-edit/ChangesTray.js +88 -74
  51. package/dist/shared/components/item-edit/FilePickerField.js +123 -123
  52. package/dist/shared/components/item-edit/GroupSection.js +301 -292
  53. package/dist/shared/components/item-edit/HeaderSummaryChip.js +54 -54
  54. package/dist/shared/components/item-edit/InlineGridField.js +45 -36
  55. package/dist/shared/components/item-edit/InlineTableField.js +1167 -1153
  56. package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
  57. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
  58. package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
  59. package/dist/shared/components/monitoring/ApiRequestLog.js +35 -35
  60. package/dist/shared/components/notifications/NotificationCenterView.js +268 -268
  61. package/dist/shared/components/ops-report/format.js +37 -36
  62. package/dist/shared/components/panels/ReferencedByPanel.js +21 -20
  63. package/dist/shared/components/panels/RevisionsPanel.js +306 -305
  64. package/dist/shared/components/pipeline/OwnerMatrixVersionsCard.js +12 -12
  65. package/dist/shared/components/pipeline/PipelineEditorView.js +483 -482
  66. package/dist/shared/components/pipeline/PipelineHealthCards.js +33 -32
  67. package/dist/shared/components/pipeline/TeamsView.js +189 -130
  68. package/dist/shared/components/profile/AgentsPanel.js +6 -6
  69. package/dist/shared/components/profile/DelegationCard.js +13 -12
  70. package/dist/shared/components/profile/PersonActivity.js +48 -48
  71. package/dist/shared/components/profile/PersonExtras.js +107 -107
  72. package/dist/shared/components/profile/PersonWeek.js +9 -9
  73. package/dist/shared/components/queue/QueueBulkBar.js +19 -18
  74. package/dist/shared/components/queue/QueueBulkMove.js +21 -20
  75. package/dist/shared/components/queue/QueueItemSheet.js +136 -131
  76. package/dist/shared/components/queue/QueueWorklist.js +671 -670
  77. package/dist/shared/components/queue/worklist-helpers.js +36 -21
  78. package/dist/shared/components/support/RequestList.js +121 -121
  79. package/dist/shared/components/support/SupportAnalytics.js +29 -29
  80. package/dist/shared/lib/activity-sentence.js +251 -229
  81. package/dist/shared/lib/format-value.js +5 -4
  82. package/dist/shared/lib/number-format.js +87 -0
  83. package/dist/shared/lib/number-kind.js +133 -0
  84. package/dist/shared/lib/utils.js +24 -20
  85. package/dist/shared/lib/watch-list.js +1 -1
  86. package/dist/shared/lib/widget-value-format.js +26 -12
  87. package/package.json +1 -1
@@ -1,90 +1,90 @@
1
- import { jsxs as n, jsx as l } from "react/jsx-runtime";
2
- import { useQueryClient as F, useQuery as Q } from "@tanstack/react-query";
3
- import { useEffect as E, useState as v, useRef as W } from "react";
4
- import { useNivaroClient as K } from "../../context.js";
5
- import { post as P } from "../../lib/commands.js";
6
- import { HEADER_LABEL as V, HEADER_VALUE_LINE as j, HEADER_VALUE_HERO as B, HEADER_SUB as z, HEADER_TILE as G } from "../../lib/header-strip.js";
7
- import { cn as U } from "../../lib/utils.js";
8
- import { Popover as J, PopoverTrigger as M, PopoverContent as X } from "../ui/popover.js";
9
- import { RecalcValue as Y } from "./RecalcValue.js";
10
- function oe({
1
+ import { jsxs as a, jsx as l } from "react/jsx-runtime";
2
+ import { useQueryClient as Q, useQuery as W } from "@tanstack/react-query";
3
+ import { useEffect as E, useState as N, useRef as K } from "react";
4
+ import { useNivaroClient as P } from "../../context.js";
5
+ import { post as V } from "../../lib/commands.js";
6
+ import { HEADER_LABEL as j, HEADER_VALUE_LINE as B, HEADER_VALUE_HERO as z, HEADER_SUB as G, HEADER_TILE as J } from "../../lib/header-strip.js";
7
+ import { cn as U, formatNumber as k } from "../../lib/utils.js";
8
+ import { Popover as M, PopoverTrigger as X, PopoverContent as Y } from "../ui/popover.js";
9
+ import { RecalcValue as Z } from "./RecalcValue.js";
10
+ function ue({
11
11
  collection: o,
12
- itemId: a,
13
- field: i,
12
+ itemId: n,
13
+ field: u,
14
14
  config: r,
15
- onOpen: k,
15
+ onOpen: C,
16
16
  recalculating: h,
17
- ...C
17
+ ...R
18
18
  }) {
19
- const R = K(), f = F();
19
+ const T = P(), f = Q();
20
20
  E(() => {
21
21
  let t = null;
22
22
  const _ = f.getQueryCache().subscribe((d) => {
23
23
  var D;
24
24
  if (d.type !== "updated" || ((D = d.action) == null ? void 0 : D.type) !== "success") return;
25
25
  const m = d.query.queryKey, p = m == null ? void 0 : m[0];
26
- typeof p != "string" || !p.startsWith("o2m-rows") && !p.startsWith("nested") || d.query.state.dataUpdateCount <= 1 || p.startsWith("o2m-rows") && String(m[3]) !== String(a) || (t && clearTimeout(t), t = setTimeout(
27
- () => void f.invalidateQueries({ queryKey: ["child-summary", o, a] }),
26
+ typeof p != "string" || !p.startsWith("o2m-rows") && !p.startsWith("nested") || d.query.state.dataUpdateCount <= 1 || p.startsWith("o2m-rows") && String(m[3]) !== String(n) || (t && clearTimeout(t), t = setTimeout(
27
+ () => void f.invalidateQueries({ queryKey: ["child-summary", o, n] }),
28
28
  400
29
29
  ));
30
30
  });
31
31
  return () => {
32
32
  _(), t && clearTimeout(t);
33
33
  };
34
- }, [f, o, a]);
35
- const { data: e, isLoading: N, dataUpdatedAt: S } = Q({
36
- queryKey: ["child-summary", o, a, i, r.formula, r.positive_only],
37
- queryFn: () => R.request(
38
- P(`/items/${o}/${a}/child-summary`, {
39
- field: i,
34
+ }, [f, o, n]);
35
+ const { data: e, isLoading: v, dataUpdatedAt: S } = W({
36
+ queryKey: ["child-summary", o, n, u, r.formula, r.positive_only],
37
+ queryFn: () => T.request(
38
+ V(`/items/${o}/${n}/child-summary`, {
39
+ field: u,
40
40
  formula: r.formula,
41
41
  positive_only: r.positive_only !== !1,
42
42
  row_label: r.row_label
43
43
  })
44
44
  ).then((t) => t.data),
45
- enabled: !!a && a !== "new",
45
+ enabled: !!n && n !== "new",
46
46
  staleTime: 3e4,
47
47
  placeholderData: (t) => t
48
- }), [T, w] = v(!1), A = !!e && !!(h != null && h(e.child_collection)), [s, u] = v(null), [q, L] = v(!1), y = W(s);
49
- y.current = s, E(() => {
50
- A ? u({ endedAt: null }) : y.current && y.current.endedAt == null && u({ endedAt: Date.now() });
48
+ }), [q, w] = N(!1), A = !!e && !!(h != null && h(e.child_collection)), [s, i] = N(null), [H, L] = N(!1), b = K(s);
49
+ b.current = s, E(() => {
50
+ A ? i({ endedAt: null }) : b.current && b.current.endedAt == null && i({ endedAt: Date.now() });
51
51
  }, [A]), E(() => {
52
52
  if (!s || s.endedAt == null) return;
53
53
  if (S > s.endedAt) {
54
- u(null), L(!0);
54
+ i(null), L(!0);
55
55
  const _ = setTimeout(() => L(!1), 1400);
56
56
  return () => clearTimeout(_);
57
57
  }
58
- const t = setTimeout(() => u(null), 15e3);
58
+ const t = setTimeout(() => i(null), 15e3);
59
59
  return () => clearTimeout(t);
60
60
  }, [s, S]);
61
- const H = s ? "pending" : q ? "landed" : null;
62
- if (!e && !N || e && e.count === 0 && r.hide_when_zero !== !1) return null;
63
- const O = e ? r.format === "number" ? e.total.toLocaleString("en-US", { maximumFractionDigits: 2 }) : e.total.toLocaleString("en-US", { style: "currency", currency: "USD" }) : "—", c = r.count_label ?? "rows", b = !!(e != null && e.first_id), g = (t) => r.format === "number" ? t.toLocaleString("en-US", { maximumFractionDigits: 2 }) : t.toLocaleString("en-US", { style: "currency", currency: "USD" }), $ = (t) => {
64
- e && (w(!1), k({ childCollection: e.child_collection, fkField: e.fk_field, rowId: t, field: i }));
61
+ const O = s ? "pending" : H ? "landed" : null;
62
+ if (!e && !v || e && e.count === 0 && r.hide_when_zero !== !1) return null;
63
+ const $ = e ? r.format === "number" ? e.total.toLocaleString("en-US", { maximumFractionDigits: 2 }) : e.total.toLocaleString("en-US", { style: "currency", currency: "USD" }) : "—", c = r.count_label ?? "rows", y = !!(e != null && e.first_id), g = (t) => r.format === "number" ? t.toLocaleString("en-US", { maximumFractionDigits: 2 }) : t.toLocaleString("en-US", { style: "currency", currency: "USD" }), F = (t) => {
64
+ e && (w(!1), C({ childCollection: e.child_collection, fkField: e.fk_field, rowId: t, field: u }));
65
65
  }, x = (e == null ? void 0 : e.items) ?? [];
66
- return /* @__PURE__ */ n(J, { open: T, onOpenChange: w, children: [
67
- /* @__PURE__ */ l(M, { asChild: !0, children: /* @__PURE__ */ n(
66
+ return /* @__PURE__ */ a(M, { open: q, onOpenChange: w, children: [
67
+ /* @__PURE__ */ l(X, { asChild: !0, children: /* @__PURE__ */ a(
68
68
  "button",
69
69
  {
70
70
  type: "button",
71
- disabled: !b,
71
+ disabled: !y,
72
72
  className: U(
73
- G,
73
+ J,
74
74
  "text-left",
75
- b ? "cursor-pointer" : "cursor-default hover:bg-transparent dark:hover:bg-transparent"
75
+ y ? "cursor-pointer" : "cursor-default hover:bg-transparent dark:hover:bg-transparent"
76
76
  ),
77
- "data-tip": b ? `Which ${c} contribute` : void 0,
78
- "data-header-summary": i,
77
+ "data-tip": y ? `Which ${c} contribute` : void 0,
78
+ "data-header-summary": u,
79
79
  "data-header-money": "",
80
- ...C,
80
+ ...R,
81
81
  children: [
82
- /* @__PURE__ */ l("span", { className: V, "data-header-label": !0, children: r.label }),
83
- /* @__PURE__ */ n("span", { className: `${j} items-baseline`, "data-header-value": !0, children: [
84
- /* @__PURE__ */ l(Y, { state: H, inline: !0, children: /* @__PURE__ */ l("span", { className: U(B, N && !e && "text-slate-300"), children: O }) }),
85
- e && /* @__PURE__ */ n("span", { className: z, children: [
82
+ /* @__PURE__ */ l("span", { className: j, "data-header-label": !0, children: r.label }),
83
+ /* @__PURE__ */ a("span", { className: `${B} items-baseline`, "data-header-value": !0, children: [
84
+ /* @__PURE__ */ l(Z, { state: O, inline: !0, children: /* @__PURE__ */ l("span", { className: U(z, v && !e && "text-slate-300"), children: $ }) }),
85
+ e && /* @__PURE__ */ a("span", { className: G, children: [
86
86
  "across ",
87
- e.count,
87
+ k(e.count),
88
88
  " ",
89
89
  e.count === 1 ? c.replace(/s$/, "") : c
90
90
  ] })
@@ -92,20 +92,20 @@ function oe({
92
92
  ]
93
93
  }
94
94
  ) }),
95
- /* @__PURE__ */ n(X, { align: "start", className: "w-[360px] p-2 text-[11.5px]", children: [
96
- /* @__PURE__ */ n("p", { className: "mb-1 px-1 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: [
95
+ /* @__PURE__ */ a(Y, { align: "start", className: "w-[360px] p-2 text-[11.5px]", children: [
96
+ /* @__PURE__ */ a("p", { className: "mb-1 px-1 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: [
97
97
  r.label,
98
98
  " — ",
99
- (e == null ? void 0 : e.count) ?? 0,
99
+ k((e == null ? void 0 : e.count) ?? 0),
100
100
  " ",
101
101
  c
102
102
  ] }),
103
- /* @__PURE__ */ n("div", { className: "max-h-[260px] space-y-px overflow-y-auto", children: [
104
- x.map((t) => /* @__PURE__ */ n(
103
+ /* @__PURE__ */ a("div", { className: "max-h-[260px] space-y-px overflow-y-auto", children: [
104
+ x.map((t) => /* @__PURE__ */ a(
105
105
  "button",
106
106
  {
107
107
  type: "button",
108
- onClick: () => $(t.id),
108
+ onClick: () => F(t.id),
109
109
  className: "flex w-full items-baseline gap-2 rounded px-1.5 py-1 text-left hover:bg-slate-50 dark:hover:bg-muted",
110
110
  "data-tip": "Open this line",
111
111
  children: [
@@ -115,7 +115,7 @@ function oe({
115
115
  },
116
116
  t.id
117
117
  )),
118
- e && e.count > x.length && /* @__PURE__ */ n("p", { className: "px-1.5 py-1 text-[10.5px] text-slate-400", children: [
118
+ e && e.count > x.length && /* @__PURE__ */ a("p", { className: "px-1.5 py-1 text-[10.5px] text-slate-400", children: [
119
119
  "+",
120
120
  e.count - x.length,
121
121
  " more"
@@ -126,5 +126,5 @@ function oe({
126
126
  ] });
127
127
  }
128
128
  export {
129
- oe as HeaderSummaryChip
129
+ ue as HeaderSummaryChip
130
130
  };
@@ -1,15 +1,17 @@
1
- import { jsx as t, jsxs as a, Fragment as F } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as a, Fragment as z } from "react/jsx-runtime";
2
2
  import { useQueryClient as ae, useQuery as V } from "@tanstack/react-query";
3
3
  import { Loader2 as ie, X as H, ChevronRight as le } from "lucide-react";
4
4
  import { memo as de, useState as k, useMemo as U } from "react";
5
5
  import { useNivaroClient as oe } from "../../context.js";
6
6
  import { getActiveLayout as ce, get as W, patch as pe, del as ue, post as me } from "../../lib/commands.js";
7
- import { queryKeys as xe } from "../../lib/query-keys.js";
8
- import { titleCase as Y, cn as he, toLocalDateString as fe } from "../../lib/utils.js";
9
- import { NumberDraftInput as be } from "../ui/number-draft-input.js";
10
- import { useAddendumO2M as ye, useAddendumView as ge } from "./AddendumFieldContext.js";
11
- import { useO2MStaging as Ne } from "./O2MStagingContext.js";
12
- const we = /* @__PURE__ */ new Set([
7
+ import { formatFieldNumber as xe } from "../../lib/number-format.js";
8
+ import { queryKeys as he } from "../../lib/query-keys.js";
9
+ import { titleCase as Y, cn as fe, toLocalDateString as be } from "../../lib/utils.js";
10
+ import { NumberDraftInput as ye } from "../ui/number-draft-input.js";
11
+ import { useAddendumO2M as ge, useAddendumView as Ne } from "./AddendumFieldContext.js";
12
+ import { useO2MStaging as we } from "./O2MStagingContext.js";
13
+ import { numberKindOf as ve } from "../../lib/number-kind.js";
14
+ const ke = /* @__PURE__ */ new Set([
13
15
  "alias",
14
16
  "o2m",
15
17
  "m2m",
@@ -17,7 +19,7 @@ const we = /* @__PURE__ */ new Set([
17
19
  "presentation",
18
20
  "group",
19
21
  "divider"
20
- ]), je = de(function({
22
+ ]), Qe = de(function({
21
23
  relatedCollection: l,
22
24
  manyField: c,
23
25
  parentId: m,
@@ -25,8 +27,8 @@ const we = /* @__PURE__ */ new Set([
25
27
  parentFieldKey: Z,
26
28
  emptyLabel: q
27
29
  }) {
28
- var z;
29
- const b = oe(), P = ae(), x = Ne(), d = m === "new", B = ye()[Z ?? ""] ?? [], [S, C] = k(null), [Q, _] = k({}), [E, w] = k(!1), [R, y] = k({}), [g, $] = k(!1), N = ge(), { data: u } = V({
30
+ var X;
31
+ const b = oe(), P = ae(), x = we(), d = m === "new", B = ge()[Z ?? ""] ?? [], [S, C] = k(null), [Q, _] = k({}), [E, w] = k(!1), [R, y] = k({}), [g, $] = k(!1), N = Ne(), { data: u } = V({
30
32
  queryKey: ["active-layout", l, f ?? null],
31
33
  queryFn: () => b.request(
32
34
  ce({
@@ -36,8 +38,8 @@ const we = /* @__PURE__ */ new Set([
36
38
  ).then((e) => e.data).catch(() => null),
37
39
  staleTime: 6e4,
38
40
  enabled: !!f
39
- }), T = f ? ((z = u == null ? void 0 : u.layout) == null ? void 0 : z.id) ?? null : null, { data: ee = [] } = V({
40
- queryKey: xe.fieldConfig(l, T),
41
+ }), T = f ? ((X = u == null ? void 0 : u.layout) == null ? void 0 : X.id) ?? null : null, { data: ee = [] } = V({
42
+ queryKey: he.fieldConfig(l, T),
41
43
  queryFn: () => b.request(
42
44
  W(
43
45
  `/field-config/${l}`,
@@ -57,7 +59,7 @@ const we = /* @__PURE__ */ new Set([
57
59
  enabled: !d,
58
60
  staleTime: 3e4
59
61
  }), G = d && x ? x.getPendingRows(l, c) : [], o = ee.filter(
60
- (e) => !e.hidden && !we.has(e.type) && e.field !== c && e.field !== "id"
62
+ (e) => !e.hidden && !ke.has(e.type) && e.field !== c && e.field !== "id"
61
63
  ), A = U(
62
64
  () => ((u == null ? void 0 : u.groups) ?? []).filter((e) => e.type === "section").sort((e, r) => e.sort - r.sort),
63
65
  [u]
@@ -70,7 +72,7 @@ const we = /* @__PURE__ */ new Set([
70
72
  }
71
73
  return e;
72
74
  }, [o, A]);
73
- async function J(e) {
75
+ async function F(e) {
74
76
  $(!0);
75
77
  try {
76
78
  await b.request(pe(`/items/${l}/${e}`, Q)), P.invalidateQueries({ queryKey: ["o2m-rows", l, c, m] }), C(null);
@@ -79,7 +81,7 @@ const we = /* @__PURE__ */ new Set([
79
81
  $(!1);
80
82
  }
81
83
  }
82
- async function L() {
84
+ async function J() {
83
85
  if (d && x) {
84
86
  x.queueRow(l, c, { ...R }), w(!1), y({});
85
87
  return;
@@ -106,12 +108,19 @@ const we = /* @__PURE__ */ new Set([
106
108
  return /* @__PURE__ */ t("span", { className: r ? "text-emerald-600" : "text-slate-400", children: r ? "Yes" : "No" });
107
109
  if (e.type === "datetime" || e.type === "date")
108
110
  try {
109
- return /* @__PURE__ */ t("span", { children: fe(r) });
111
+ return /* @__PURE__ */ t("span", { children: be(r) });
110
112
  } catch {
111
113
  }
114
+ if (!/m2o|many-to-one|relation|user|file/i.test(e.interface ?? "")) {
115
+ const n = ve(e);
116
+ if (n && n !== "plain") {
117
+ const s = xe(r, e);
118
+ if (s) return /* @__PURE__ */ t("span", { className: "truncate tabular-nums", children: s });
119
+ }
120
+ }
112
121
  return /* @__PURE__ */ t("span", { className: "truncate", children: String(r) });
113
122
  }
114
- function I(e, r, n) {
123
+ function O(e, r, n) {
115
124
  const s = r[e.field] ?? "";
116
125
  return e.type === "boolean" ? /* @__PURE__ */ t(
117
126
  "input",
@@ -122,7 +131,7 @@ const we = /* @__PURE__ */ new Set([
122
131
  className: "h-4 w-4"
123
132
  }
124
133
  ) : e.type === "integer" || e.type === "bigInteger" || e.type === "float" || e.type === "decimal" ? /* @__PURE__ */ t(
125
- be,
134
+ ye,
126
135
  {
127
136
  bare: !0,
128
137
  type: "number",
@@ -156,7 +165,7 @@ const we = /* @__PURE__ */ new Set([
156
165
  }
157
166
  );
158
167
  }
159
- function X(e, r, n, s, i) {
168
+ function L(e, r, n, s, i) {
160
169
  const j = (h == null ? void 0 : h.get(null)) ?? [];
161
170
  return /* @__PURE__ */ a("div", { className: "border border-slate-200 rounded-lg bg-white overflow-hidden", children: [
162
171
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between border-b border-slate-100 px-3 py-2 bg-slate-50", children: [
@@ -186,7 +195,7 @@ const we = /* @__PURE__ */ new Set([
186
195
  /* @__PURE__ */ a("div", { className: "p-3 space-y-4", children: [
187
196
  j.length > 0 && /* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2", children: j.map((p) => /* @__PURE__ */ a("div", { children: [
188
197
  /* @__PURE__ */ t("label", { className: "block text-[11px] font-medium text-slate-500 mb-1", children: p.label ?? Y(p.field) }),
189
- I(p, e, r)
198
+ O(p, e, r)
190
199
  ] }, p.field)) }),
191
200
  A.map((p) => {
192
201
  const D = (h == null ? void 0 : h.get(p.key)) ?? [];
@@ -194,7 +203,7 @@ const we = /* @__PURE__ */ new Set([
194
203
  /* @__PURE__ */ t("div", { className: "text-[10px] font-semibold uppercase tracking-wider text-slate-400 mb-2 pb-1 border-b border-slate-100", children: p.label }),
195
204
  /* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2", children: D.map((M) => /* @__PURE__ */ a("div", { children: [
196
205
  /* @__PURE__ */ t("label", { className: "block text-[11px] font-medium text-slate-500 mb-1", children: M.label ?? Y(M.field) }),
197
- I(M, e, r)
206
+ O(M, e, r)
198
207
  ] }, M.field)) })
199
208
  ] }, p.key) : null;
200
209
  })
@@ -202,11 +211,11 @@ const we = /* @__PURE__ */ new Set([
202
211
  ] });
203
212
  }
204
213
  function ne(e, r) {
205
- return o.map((n) => /* @__PURE__ */ t("td", { className: "px-3 py-1.5", children: I(n, e, r) }, n.field));
214
+ return o.map((n) => /* @__PURE__ */ t("td", { className: "px-3 py-1.5", children: O(n, e, r) }, n.field));
206
215
  }
207
216
  if (!d && te)
208
217
  return /* @__PURE__ */ t("div", { className: "py-3 text-center text-[12px] text-slate-400", children: /* @__PURE__ */ t(ie, { className: "h-4 w-4 animate-spin inline" }) });
209
- const se = d ? G : v, O = !!h && A.length > 0;
218
+ const se = d ? G : v, I = !!h && A.length > 0;
210
219
  return (
211
220
  // The flat grid shows every displayable child column (a wide legacy table
212
221
  // has dozens) — it scrolls inside its card rather than running off a
@@ -240,27 +249,27 @@ const we = /* @__PURE__ */ new Set([
240
249
  ) })
241
250
  ] }, r)),
242
251
  !d && N === "original" && v.map((e, r) => {
243
- const n = String(e.id), s = S === n && !O;
252
+ const n = String(e.id), s = S === n && !I;
244
253
  return /* @__PURE__ */ a(
245
254
  "tr",
246
255
  {
247
- className: he(
256
+ className: fe(
248
257
  "border-b border-slate-100",
249
258
  r % 2 === 0 ? "bg-white" : "bg-slate-50/50"
250
259
  ),
251
260
  children: [
252
- o.map((i) => /* @__PURE__ */ t("td", { className: "px-3 py-1.5", children: s ? I(
261
+ o.map((i) => /* @__PURE__ */ t("td", { className: "px-3 py-1.5", children: s ? O(
253
262
  i,
254
263
  Q,
255
264
  (j, p) => _((D) => ({ ...D, [j]: p }))
256
265
  ) : K(i, e[i.field]) }, i.field)),
257
- /* @__PURE__ */ t("td", { className: "px-2 py-1.5", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-1 justify-end", children: s ? /* @__PURE__ */ a(F, { children: [
266
+ /* @__PURE__ */ t("td", { className: "px-2 py-1.5", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-1 justify-end", children: s ? /* @__PURE__ */ a(z, { children: [
258
267
  /* @__PURE__ */ t(
259
268
  "button",
260
269
  {
261
270
  type: "button",
262
271
  disabled: g,
263
- onClick: () => J(n),
272
+ onClick: () => F(n),
264
273
  className: "rounded px-1.5 py-0.5 bg-nvr-cyan text-white text-[11px] font-medium hover:brightness-110 disabled:opacity-50",
265
274
  children: g ? "…" : "Save"
266
275
  }
@@ -274,7 +283,7 @@ const we = /* @__PURE__ */ new Set([
274
283
  children: "Cancel"
275
284
  }
276
285
  )
277
- ] }) : /* @__PURE__ */ a(F, { children: [
286
+ ] }) : /* @__PURE__ */ a(z, { children: [
278
287
  /* @__PURE__ */ t(
279
288
  "button",
280
289
  {
@@ -325,7 +334,7 @@ const we = /* @__PURE__ */ new Set([
325
334
  /* @__PURE__ */ t("td", { className: "px-2 py-1.5" })
326
335
  ] }, n));
327
336
  })(),
328
- N === "original" && E && !O && /* @__PURE__ */ a("tr", { className: "border-b border-slate-100 bg-nvr-cyan/5", children: [
337
+ N === "original" && E && !I && /* @__PURE__ */ a("tr", { className: "border-b border-slate-100 bg-nvr-cyan/5", children: [
329
338
  d && /* @__PURE__ */ t("td", { className: "px-3 py-1.5" }),
330
339
  ne(R, (e, r) => y((n) => ({ ...n, [e]: r }))),
331
340
  /* @__PURE__ */ t("td", { className: "px-2 py-1.5", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-1 justify-end", children: [
@@ -334,7 +343,7 @@ const we = /* @__PURE__ */ new Set([
334
343
  {
335
344
  type: "button",
336
345
  disabled: g,
337
- onClick: L,
346
+ onClick: J,
338
347
  className: "rounded px-1.5 py-0.5 bg-nvr-cyan text-white text-[11px] font-medium hover:brightness-110 disabled:opacity-50",
339
348
  children: g ? "…" : "Add"
340
349
  }
@@ -362,17 +371,17 @@ const we = /* @__PURE__ */ new Set([
362
371
  ) })
363
372
  ] })
364
373
  ] }),
365
- S && O && (v.find((r) => String(r.id) === S) ? /* @__PURE__ */ t("div", { className: "border-t border-slate-200 p-3", children: X(
374
+ S && I && (v.find((r) => String(r.id) === S) ? /* @__PURE__ */ t("div", { className: "border-t border-slate-200 p-3", children: L(
366
375
  Q,
367
376
  (r, n) => _((s) => ({ ...s, [r]: n })),
368
- () => J(S),
377
+ () => F(S),
369
378
  () => C(null),
370
379
  "Edit Row"
371
380
  ) }) : null),
372
- E && O && /* @__PURE__ */ t("div", { className: "border-t border-slate-200 p-3", children: X(
381
+ E && I && /* @__PURE__ */ t("div", { className: "border-t border-slate-200 p-3", children: L(
373
382
  R,
374
383
  (e, r) => y((n) => ({ ...n, [e]: r })),
375
- L,
384
+ J,
376
385
  () => {
377
386
  w(!1), y({});
378
387
  },
@@ -391,5 +400,5 @@ const we = /* @__PURE__ */ new Set([
391
400
  );
392
401
  });
393
402
  export {
394
- je as InlineGridField
403
+ Qe as InlineGridField
395
404
  };