@nivaro/react 0.3.138 → 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.
- package/dist/components/InlineGridField.js +95 -92
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +36 -2
- package/dist/shared/components/AudienceConfirmPanel.js +19 -19
- package/dist/shared/components/BroadcastView.js +213 -211
- package/dist/shared/components/CollectionBrowserView.js +2677 -2658
- package/dist/shared/components/ConfigHistory.js +45 -45
- package/dist/shared/components/ConformanceView.js +110 -110
- package/dist/shared/components/DataTable.js +51 -51
- package/dist/shared/components/FilePreviewLightbox.js +26 -25
- package/dist/shared/components/ItemEditForm.js +3038 -3027
- package/dist/shared/components/LiveCount.js +27 -23
- package/dist/shared/components/LiveTraceView.js +62 -61
- package/dist/shared/components/PageRenderer.js +422 -410
- package/dist/shared/components/ProfileView.js +199 -199
- package/dist/shared/components/QualityRulesView.js +70 -70
- package/dist/shared/components/QueryTable.js +131 -130
- package/dist/shared/components/RecordGraph.js +98 -98
- package/dist/shared/components/RecordReadView.js +287 -288
- package/dist/shared/components/ReportView.js +1279 -1259
- package/dist/shared/components/SlaRulesView.js +73 -74
- package/dist/shared/components/WidgetSlot.js +73 -73
- package/dist/shared/components/ai/AiChart.js +36 -32
- package/dist/shared/components/ai/AiMarkdown.js +136 -129
- package/dist/shared/components/ai/TaskDo.js +87 -87
- package/dist/shared/components/ai/answer-formats.js +37 -30
- package/dist/shared/components/ai/call-log/format.js +17 -16
- package/dist/shared/components/bulk/BulkActionButtons.js +66 -66
- package/dist/shared/components/bulk/BulkFieldUpdate.js +59 -59
- package/dist/shared/components/bulk/BulkSelectionNotices.js +34 -34
- package/dist/shared/components/bulk/MessageStakeholders.js +31 -29
- package/dist/shared/components/bulk/PushBulkButtons.js +83 -82
- package/dist/shared/components/bulk/bulk-field-options.js +10 -10
- package/dist/shared/components/cbv/column-totals.js +53 -51
- package/dist/shared/components/chat/ChatAnalyticsView.js +87 -87
- package/dist/shared/components/collections-directory/CollectionsToolbar.js +18 -18
- package/dist/shared/components/command-center/announce.js +7 -6
- package/dist/shared/components/command-center/panels/AttentionPanel.js +32 -31
- package/dist/shared/components/command-center/panels/FlowPanel.js +29 -28
- package/dist/shared/components/command-center/panels/PeoplePanel.js +39 -39
- package/dist/shared/components/delegation/DelegationConsoleView.js +27 -27
- package/dist/shared/components/imports/RunDetailSheet.js +1 -1
- package/dist/shared/components/integrations/IntegrationObligationsView.js +119 -119
- package/dist/shared/components/integrations/console/EventsView.js +35 -35
- package/dist/shared/components/integrations/console/FirefightView.js +15 -14
- package/dist/shared/components/integrations/console/PartnerDetail.js +78 -78
- package/dist/shared/components/integrations/console/ReadyToSendView.js +103 -103
- package/dist/shared/components/integrations/console/SignalCard.js +67 -67
- package/dist/shared/components/item-edit/CatalogPickerField.js +536 -527
- package/dist/shared/components/item-edit/ChangesTray.js +88 -74
- package/dist/shared/components/item-edit/FilePickerField.js +123 -123
- package/dist/shared/components/item-edit/GroupSection.js +301 -292
- package/dist/shared/components/item-edit/HeaderSummaryChip.js +54 -54
- package/dist/shared/components/item-edit/InlineGridField.js +45 -36
- package/dist/shared/components/item-edit/InlineTableField.js +1167 -1153
- package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
- package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
- package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
- package/dist/shared/components/monitoring/ApiRequestLog.js +35 -35
- package/dist/shared/components/notifications/NotificationCenterView.js +268 -268
- package/dist/shared/components/ops-report/format.js +37 -36
- package/dist/shared/components/panels/ReferencedByPanel.js +21 -20
- package/dist/shared/components/panels/RevisionsPanel.js +306 -305
- package/dist/shared/components/pipeline/OwnerMatrixVersionsCard.js +12 -12
- package/dist/shared/components/pipeline/PipelineEditorView.js +483 -482
- package/dist/shared/components/pipeline/PipelineHealthCards.js +33 -32
- package/dist/shared/components/pipeline/TeamsView.js +189 -130
- package/dist/shared/components/profile/AgentsPanel.js +6 -6
- package/dist/shared/components/profile/DelegationCard.js +13 -12
- package/dist/shared/components/profile/PersonActivity.js +48 -48
- package/dist/shared/components/profile/PersonExtras.js +107 -107
- package/dist/shared/components/profile/PersonWeek.js +9 -9
- package/dist/shared/components/queue/QueueBulkBar.js +19 -18
- package/dist/shared/components/queue/QueueBulkMove.js +21 -20
- package/dist/shared/components/queue/QueueItemSheet.js +136 -131
- package/dist/shared/components/queue/QueueWorklist.js +671 -670
- package/dist/shared/components/queue/worklist-helpers.js +36 -21
- package/dist/shared/components/support/RequestList.js +121 -121
- package/dist/shared/components/support/SupportAnalytics.js +29 -29
- package/dist/shared/lib/activity-sentence.js +316 -278
- package/dist/shared/lib/format-value.js +5 -4
- package/dist/shared/lib/number-format.js +87 -0
- package/dist/shared/lib/number-kind.js +133 -0
- package/dist/shared/lib/utils.js +24 -20
- package/dist/shared/lib/watch-list.js +1 -1
- package/dist/shared/lib/widget-value-format.js +26 -12
- package/package.json +1 -1
|
@@ -1,156 +1,158 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as S, useRef as G, useEffect as _, useCallback as z } from "react";
|
|
3
3
|
import { get as M, del as W, post as H, patch as Q } from "../lib/commands.js";
|
|
4
4
|
import { useOptionalNivaroClient as T, useGridFlush as X } from "../shared/context.js";
|
|
5
|
-
|
|
5
|
+
import { numberKindOf as Y } from "../shared/lib/number-kind.js";
|
|
6
|
+
import { formatNumberAs as Z } from "../shared/lib/number-format.js";
|
|
7
|
+
function tt({
|
|
6
8
|
value: o,
|
|
7
9
|
onValue: d,
|
|
8
10
|
placeholder: l
|
|
9
11
|
}) {
|
|
10
|
-
const [m,
|
|
12
|
+
const [m, g] = S(null), i = o == null ? "" : String(o);
|
|
11
13
|
return /* @__PURE__ */ r(
|
|
12
14
|
"input",
|
|
13
15
|
{
|
|
14
16
|
type: "number",
|
|
15
17
|
value: m ?? i,
|
|
16
|
-
onChange: (
|
|
17
|
-
var
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
|
|
18
|
+
onChange: (u) => {
|
|
19
|
+
var R;
|
|
20
|
+
const h = u.target.value;
|
|
21
|
+
if (h === "" && ((R = u.target.validity) != null && R.badInput)) {
|
|
22
|
+
g("");
|
|
21
23
|
return;
|
|
22
24
|
}
|
|
23
|
-
if (
|
|
24
|
-
const w = Number(
|
|
25
|
+
if (g(h), h.trim() === "") return d(null);
|
|
26
|
+
const w = Number(h);
|
|
25
27
|
Number.isFinite(w) && d(w);
|
|
26
28
|
},
|
|
27
|
-
onBlur: () =>
|
|
29
|
+
onBlur: () => g(null),
|
|
28
30
|
placeholder: l,
|
|
29
31
|
"data-nf-grid-cell": !0
|
|
30
32
|
}
|
|
31
33
|
);
|
|
32
34
|
}
|
|
33
|
-
async function
|
|
34
|
-
const m = /* @__PURE__ */ new Map(),
|
|
35
|
-
for (let i = 0; i <
|
|
35
|
+
async function K(o, d, l) {
|
|
36
|
+
const m = /* @__PURE__ */ new Map(), g = [...new Set(l)].filter((i) => i && i !== "new");
|
|
37
|
+
for (let i = 0; i < g.length; i += 500)
|
|
36
38
|
try {
|
|
37
|
-
const
|
|
39
|
+
const u = await o.request(
|
|
38
40
|
M("/revisions/latest", {
|
|
39
41
|
collection: d,
|
|
40
|
-
items:
|
|
42
|
+
items: g.slice(i, i + 500).join(",")
|
|
41
43
|
})
|
|
42
44
|
);
|
|
43
|
-
for (const [
|
|
44
|
-
m.set(
|
|
45
|
+
for (const [h, w] of Object.entries((u == null ? void 0 : u.data) ?? {}))
|
|
46
|
+
m.set(h, typeof w == "number" && Number.isFinite(w) ? w : null);
|
|
45
47
|
} catch {
|
|
46
48
|
}
|
|
47
49
|
return m;
|
|
48
50
|
}
|
|
49
|
-
function
|
|
51
|
+
function et(o) {
|
|
50
52
|
var l;
|
|
51
53
|
const d = o == null ? void 0 : o.response;
|
|
52
54
|
return (((l = d == null ? void 0 : d.data) == null ? void 0 : l.code) ?? (d == null ? void 0 : d.code)) === "MIDAIR_COLLISION";
|
|
53
55
|
}
|
|
54
|
-
function
|
|
56
|
+
function L(o) {
|
|
55
57
|
return o.replace(/_/g, " ").replace(/\b\w/g, (d) => d.toUpperCase());
|
|
56
58
|
}
|
|
57
|
-
function
|
|
59
|
+
function ot({
|
|
58
60
|
field: o,
|
|
59
61
|
itemId: d
|
|
60
62
|
}) {
|
|
61
|
-
const l = T(), m = X(),
|
|
62
|
-
_(() => (
|
|
63
|
-
|
|
63
|
+
const l = T(), m = X(), g = o.relation, i = (g == null ? void 0 : g.relatedCollection) ?? "", u = (g == null ? void 0 : g.manyField) ?? "", [h, w] = S([]), [R, O] = S([]), [C, x] = S(/* @__PURE__ */ new Map()), [y, $] = S([]), [N, j] = S(/* @__PURE__ */ new Set()), v = G(!0);
|
|
64
|
+
_(() => (v.current = !0, () => {
|
|
65
|
+
v.current = !1;
|
|
64
66
|
}), []);
|
|
65
|
-
const
|
|
66
|
-
if (!(!l || !d || !i || !
|
|
67
|
+
const V = C.size > 0 || y.length > 0 || N.size > 0, I = G(/* @__PURE__ */ new Map()), k = z(async () => {
|
|
68
|
+
if (!(!l || !d || !i || !u))
|
|
67
69
|
try {
|
|
68
70
|
const n = (await l.request(
|
|
69
71
|
M(`/items/${i}`, {
|
|
70
|
-
filter: JSON.stringify({ [
|
|
72
|
+
filter: JSON.stringify({ [u]: { _eq: d } }),
|
|
71
73
|
limit: 200,
|
|
72
74
|
fields: "*"
|
|
73
75
|
})
|
|
74
76
|
)).data ?? [];
|
|
75
|
-
|
|
77
|
+
I.current = await K(
|
|
76
78
|
l,
|
|
77
79
|
i,
|
|
78
80
|
n.map((e) => String(e.id))
|
|
79
|
-
),
|
|
81
|
+
), v.current && O(n);
|
|
80
82
|
} catch {
|
|
81
|
-
|
|
83
|
+
v.current && O([]);
|
|
82
84
|
}
|
|
83
|
-
}, [l, d, i,
|
|
85
|
+
}, [l, d, i, u]);
|
|
84
86
|
_(() => {
|
|
85
87
|
!l || !i || l.request(M(`/field-config/${i}`)).then((t) => {
|
|
86
|
-
if (!
|
|
88
|
+
if (!v.current) return;
|
|
87
89
|
const n = (t.data ?? []).filter(
|
|
88
|
-
(e) => !e.field.startsWith("_") && e.field !== "id" && e.field !==
|
|
90
|
+
(e) => !e.field.startsWith("_") && e.field !== "id" && e.field !== u
|
|
89
91
|
);
|
|
90
92
|
w(n);
|
|
91
93
|
}).catch(() => {
|
|
92
94
|
});
|
|
93
|
-
}, [l, i,
|
|
94
|
-
|
|
95
|
-
}, [
|
|
96
|
-
const
|
|
95
|
+
}, [l, i, u]), _(() => {
|
|
96
|
+
k();
|
|
97
|
+
}, [k]);
|
|
98
|
+
const U = z(async () => {
|
|
97
99
|
if (!l) return;
|
|
98
|
-
for (const e of
|
|
100
|
+
for (const e of N)
|
|
99
101
|
await l.request(W(`/items/${i}/${e}`));
|
|
100
|
-
for (const e of
|
|
101
|
-
await l.request(H(`/items/${i}`, { ...e, [
|
|
102
|
-
const t = [...
|
|
102
|
+
for (const e of y)
|
|
103
|
+
await l.request(H(`/items/${i}`, { ...e, [u]: d }));
|
|
104
|
+
const t = [...C].filter(([e]) => !N.has(e)), n = t.map(([e]) => e).filter((e) => !((I.current.get(e) ?? 0) > 0));
|
|
103
105
|
if (n.length > 0) {
|
|
104
|
-
const e = await
|
|
105
|
-
for (const [
|
|
106
|
+
const e = await K(l, i, n);
|
|
107
|
+
for (const [f, a] of e) I.current.set(f, a);
|
|
106
108
|
}
|
|
107
|
-
for (const [e,
|
|
108
|
-
const a =
|
|
109
|
+
for (const [e, f] of t) {
|
|
110
|
+
const a = I.current.get(e);
|
|
109
111
|
try {
|
|
110
112
|
await l.request(
|
|
111
113
|
Q(
|
|
112
114
|
`/items/${i}/${e}`,
|
|
113
|
-
typeof a == "number" && a > 0 ? { ...
|
|
115
|
+
typeof a == "number" && a > 0 ? { ...f, _base_revision: a } : f
|
|
114
116
|
)
|
|
115
117
|
);
|
|
116
|
-
} catch (
|
|
117
|
-
throw
|
|
118
|
+
} catch (s) {
|
|
119
|
+
throw et(s) && await k(), s;
|
|
118
120
|
}
|
|
119
121
|
}
|
|
120
|
-
|
|
121
|
-
}, [l, i,
|
|
122
|
-
_(() => (m == null || m.register(
|
|
123
|
-
function
|
|
124
|
-
var a,
|
|
125
|
-
return e ? ((a =
|
|
122
|
+
v.current && (x(/* @__PURE__ */ new Map()), $([]), j(/* @__PURE__ */ new Set()), await k());
|
|
123
|
+
}, [l, i, u, d, N, y, C, k]), q = `inline-grid:${i}:${u}`;
|
|
124
|
+
_(() => (m == null || m.register(q, U), () => m == null ? void 0 : m.unregister(q)), [m, q, U]);
|
|
125
|
+
function B(t, n, e, f) {
|
|
126
|
+
var a, s;
|
|
127
|
+
return e ? ((a = y[f]) == null ? void 0 : a[n]) ?? "" : ((s = C.get(String(t.id))) == null ? void 0 : s[n]) ?? t[n] ?? "";
|
|
126
128
|
}
|
|
127
|
-
function
|
|
128
|
-
if (
|
|
129
|
-
|
|
129
|
+
function J(t, n, e, f, a) {
|
|
130
|
+
if (f) {
|
|
131
|
+
$((b) => b.map((c, P) => P === a ? { ...c, [n]: e } : c));
|
|
130
132
|
return;
|
|
131
133
|
}
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
const
|
|
135
|
-
return
|
|
134
|
+
const s = String(t.id);
|
|
135
|
+
x((b) => {
|
|
136
|
+
const c = new Map(b);
|
|
137
|
+
return c.set(s, { ...c.get(s) ?? {}, [n]: e }), c;
|
|
136
138
|
});
|
|
137
139
|
}
|
|
138
|
-
function
|
|
139
|
-
const a =
|
|
140
|
+
function A(t, n, e, f) {
|
|
141
|
+
const a = B(n, t.field, e, f), s = (c) => J(n, t.field, c, e, f), b = ["integer", "bigInteger", "float", "decimal", "numeric"].includes(t.type);
|
|
140
142
|
return t.type === "boolean" ? /* @__PURE__ */ r(
|
|
141
143
|
"input",
|
|
142
144
|
{
|
|
143
145
|
type: "checkbox",
|
|
144
146
|
checked: !!a,
|
|
145
|
-
onChange: (
|
|
147
|
+
onChange: (c) => s(c.target.checked),
|
|
146
148
|
"data-nf-grid-cell-checkbox": !0
|
|
147
149
|
}
|
|
148
|
-
) :
|
|
150
|
+
) : b ? /* @__PURE__ */ r(tt, { value: a, onValue: s, placeholder: t.note ?? void 0 }) : t.type === "datetime" || t.interface === "datetime" ? /* @__PURE__ */ r(
|
|
149
151
|
"input",
|
|
150
152
|
{
|
|
151
153
|
type: "datetime-local",
|
|
152
154
|
value: a ? String(a).slice(0, 16) : "",
|
|
153
|
-
onChange: (
|
|
155
|
+
onChange: (c) => s(c.target.value ? new Date(c.target.value).toISOString() : null),
|
|
154
156
|
"data-nf-grid-cell": !0
|
|
155
157
|
}
|
|
156
158
|
) : /* @__PURE__ */ r(
|
|
@@ -158,7 +160,7 @@ function it({
|
|
|
158
160
|
{
|
|
159
161
|
type: "text",
|
|
160
162
|
value: a == null ? "" : String(a),
|
|
161
|
-
onChange: (
|
|
163
|
+
onChange: (c) => s(c.target.value || null),
|
|
162
164
|
placeholder: t.note ?? void 0,
|
|
163
165
|
"data-nf-grid-cell": !0
|
|
164
166
|
}
|
|
@@ -166,37 +168,37 @@ function it({
|
|
|
166
168
|
}
|
|
167
169
|
if (!d)
|
|
168
170
|
return /* @__PURE__ */ r("div", { "data-nf-inline-grid": !0, "data-nf-inline-grid-empty": !0, children: /* @__PURE__ */ r("p", { "data-nf-empty": !0, children: "Save the record first to manage related rows." }) });
|
|
169
|
-
const E =
|
|
170
|
-
...E.map((t) => ({ ...t, ...
|
|
171
|
-
...
|
|
172
|
-
],
|
|
171
|
+
const E = R.filter((t) => !N.has(String(t.id))), D = [
|
|
172
|
+
...E.map((t) => ({ ...t, ...C.get(String(t.id)) ?? {} })),
|
|
173
|
+
...y
|
|
174
|
+
], F = h.filter(
|
|
173
175
|
(t) => ["integer", "bigInteger", "float", "decimal", "numeric"].includes(t.type)
|
|
174
176
|
);
|
|
175
177
|
return /* @__PURE__ */ p("div", { "data-nf-inline-grid": !0, children: [
|
|
176
178
|
/* @__PURE__ */ p("span", { "data-nf-inline-grid-label": !0, children: [
|
|
177
|
-
o.label ??
|
|
179
|
+
o.label ?? L(o.field),
|
|
178
180
|
o.note ? /* @__PURE__ */ p("span", { "data-nf-inline-grid-note": !0, title: o.note, children: [
|
|
179
181
|
" ",
|
|
180
182
|
"?"
|
|
181
183
|
] }) : null
|
|
182
184
|
] }),
|
|
183
|
-
|
|
185
|
+
V && /* @__PURE__ */ r("div", { "data-nf-inline-grid-pending": !0, children: "Unsaved changes — will save with the record" }),
|
|
184
186
|
/* @__PURE__ */ p("div", { "data-nf-inline-grid-wrap": !0, children: [
|
|
185
187
|
/* @__PURE__ */ r("div", { "data-nf-inline-grid-scroll": !0, children: /* @__PURE__ */ p("table", { "data-nf-inline-grid-table": !0, children: [
|
|
186
188
|
/* @__PURE__ */ r("thead", { children: /* @__PURE__ */ p("tr", { children: [
|
|
187
|
-
|
|
189
|
+
h.map((t) => /* @__PURE__ */ r("th", { "data-nf-grid-th": !0, children: t.label ?? L(t.field) }, t.field)),
|
|
188
190
|
/* @__PURE__ */ r("th", { "data-nf-grid-th-action": !0 })
|
|
189
191
|
] }) }),
|
|
190
192
|
/* @__PURE__ */ p("tbody", { children: [
|
|
191
193
|
E.map((t) => /* @__PURE__ */ p("tr", { "data-nf-grid-row": !0, children: [
|
|
192
|
-
|
|
194
|
+
h.map((n) => /* @__PURE__ */ r("td", { "data-nf-grid-td": !0, children: A(n, t, !1, -1) }, n.field)),
|
|
193
195
|
/* @__PURE__ */ r("td", { "data-nf-grid-td-action": !0, children: /* @__PURE__ */ r(
|
|
194
196
|
"button",
|
|
195
197
|
{
|
|
196
198
|
type: "button",
|
|
197
199
|
"data-nf-grid-delete": !0,
|
|
198
200
|
"aria-label": "Delete row",
|
|
199
|
-
onClick: () =>
|
|
201
|
+
onClick: () => j((n) => {
|
|
200
202
|
const e = new Set(n);
|
|
201
203
|
return e.add(String(t.id)), e;
|
|
202
204
|
}),
|
|
@@ -204,20 +206,20 @@ function it({
|
|
|
204
206
|
}
|
|
205
207
|
) })
|
|
206
208
|
] }, String(t.id))),
|
|
207
|
-
|
|
209
|
+
y.map((t, n) => /* @__PURE__ */ p(
|
|
208
210
|
"tr",
|
|
209
211
|
{
|
|
210
212
|
"data-nf-grid-row": !0,
|
|
211
213
|
"data-nf-grid-row-new": !0,
|
|
212
214
|
children: [
|
|
213
|
-
|
|
215
|
+
h.map((e) => /* @__PURE__ */ r("td", { "data-nf-grid-td": !0, children: A(e, t, !0, n) }, e.field)),
|
|
214
216
|
/* @__PURE__ */ r("td", { "data-nf-grid-td-action": !0, children: /* @__PURE__ */ r(
|
|
215
217
|
"button",
|
|
216
218
|
{
|
|
217
219
|
type: "button",
|
|
218
220
|
"data-nf-grid-delete": !0,
|
|
219
221
|
"aria-label": "Remove new row",
|
|
220
|
-
onClick: () =>
|
|
222
|
+
onClick: () => $((e) => e.filter((f, a) => a !== n)),
|
|
221
223
|
children: "×"
|
|
222
224
|
}
|
|
223
225
|
) })
|
|
@@ -225,16 +227,17 @@ function it({
|
|
|
225
227
|
},
|
|
226
228
|
t._rowId ?? `new-${n}`
|
|
227
229
|
)),
|
|
228
|
-
|
|
230
|
+
D.length === 0 && /* @__PURE__ */ r("tr", { children: /* @__PURE__ */ r("td", { colSpan: h.length + 1, "data-nf-grid-empty-row": !0, children: "No rows yet" }) })
|
|
229
231
|
] }),
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
if (!
|
|
233
|
-
const e =
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
232
|
+
F.length > 0 && D.length > 0 && /* @__PURE__ */ r("tfoot", { children: /* @__PURE__ */ p("tr", { "data-nf-grid-totals": !0, children: [
|
|
233
|
+
h.map((t) => {
|
|
234
|
+
if (!F.some((s) => s.field === t.field)) return /* @__PURE__ */ r("td", { "data-nf-grid-total-cell": !0 }, t.field);
|
|
235
|
+
const e = D.reduce((s, b) => s + (Number(b[t.field]) || 0), 0), f = Y(t), a = Z(
|
|
236
|
+
e,
|
|
237
|
+
f === "money" ? "money" : Number.isInteger(e) ? "count" : "decimal",
|
|
238
|
+
t
|
|
239
|
+
);
|
|
240
|
+
return /* @__PURE__ */ r("td", { "data-nf-grid-total-cell": !0, "data-nf-grid-total-num": !0, children: a }, t.field);
|
|
238
241
|
}),
|
|
239
242
|
/* @__PURE__ */ r("td", { "data-nf-grid-total-cell": !0 })
|
|
240
243
|
] }) })
|
|
@@ -244,7 +247,7 @@ function it({
|
|
|
244
247
|
{
|
|
245
248
|
type: "button",
|
|
246
249
|
"data-nf-grid-add": !0,
|
|
247
|
-
onClick: () =>
|
|
250
|
+
onClick: () => $((t) => [...t, { _rowId: crypto.randomUUID() }]),
|
|
248
251
|
children: "+ Add row"
|
|
249
252
|
}
|
|
250
253
|
) })
|
|
@@ -252,7 +255,7 @@ function it({
|
|
|
252
255
|
] });
|
|
253
256
|
}
|
|
254
257
|
export {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
+
tt as GridNumberInput,
|
|
259
|
+
ot as InlineGridField,
|
|
260
|
+
K as latestRevisions
|
|
258
261
|
};
|