@nivaro/react 0.3.122 → 0.3.124

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.
@@ -10,7 +10,7 @@ import { noteReplayIdle as Me, createReplayIdleState as Ne, REPLAY_IDLE_RESTART_
10
10
  import { noteReplayEvent as Ue, createReplayCheckoutState as We } from "../shared/lib/replay-checkout.js";
11
11
  import { instrumentConsole as He, instrumentRequests as Ke, redactSecrets as $e } from "../shared/lib/replay-context.js";
12
12
  import { instrumentSocket as Be } from "../shared/lib/replay-socket.js";
13
- const ze = "nivaro-react@0.3.122", V = 1e4, Ye = 150, xe = 3e3, je = 600, Ge = (o) => `nvr_replay_resume${o ? `:${o}` : ""}`, X = () => typeof navigator > "u" || navigator.onLine !== !1;
13
+ const ze = "nivaro-react@0.3.124", V = 1e4, Ye = 150, xe = 3e3, je = 600, Ge = (o) => `nvr_replay_resume${o ? `:${o}` : ""}`, X = () => typeof navigator > "u" || navigator.onLine !== !1;
14
14
  function Je(o) {
15
15
  return typeof o.url != "string" || typeof fetch != "function" ? null : (f, u) => {
16
16
  const l = typeof o.getToken == "function" ? o.getToken() : void 0, d = { "Content-Type": "application/json" };
package/dist/index.d.ts CHANGED
@@ -330,6 +330,16 @@ declare interface ActivityO2m {
330
330
  from: string | null;
331
331
  to: string | null;
332
332
  }> | null;
333
+ /** Stored totals on the parent this write moved ("Requisition Amount +2,059"). */
334
+ totals?: Array<{
335
+ field: string;
336
+ label: string;
337
+ delta: number;
338
+ /** The child column whose change moved the total. */
339
+ source_field?: string;
340
+ }> | null;
341
+ /** Written on the row itself (its own page, an import, a sync), not from the parent's page. */
342
+ elsewhere?: boolean | null;
333
343
  }
334
344
 
335
345
  /** A stretch of the recording where the author was typing in a text field,
@@ -256,11 +256,11 @@ function nd(n, i, h, c = []) {
256
256
  setTimeout(() => {
257
257
  el.delete(_);
258
258
  const q = [...T.ids], A = [];
259
- for (let Q = 0; Q < q.length; Q += 200) A.push(q.slice(Q, Q + 200));
260
- const z = (Q, O) => n.request(
259
+ for (let W = 0; W < q.length; W += 200) A.push(q.slice(W, W + 200));
260
+ const z = (W, O) => n.request(
261
261
  X(`/items/${i}`, {
262
- filter: JSON.stringify({ id: { _in: Q } }),
263
- limit: Q.length,
262
+ filter: JSON.stringify({ id: { _in: W } }),
263
+ limit: W.length,
264
264
  // A template naming a linked record's field (categories:
265
265
  // "{{core_category.name}} - {{sub_category.name}}") reads those through
266
266
  // the link; a plain `*` row has only the ids and the label came out " - ".
@@ -272,14 +272,14 @@ function nd(n, i, h, c = []) {
272
272
  ).then(($) => $.data ?? []);
273
273
  Promise.all(
274
274
  A.map(
275
- (Q) => (c.length > 0 ? (
275
+ (W) => (c.length > 0 ? (
276
276
  // A stale template path must not cost the whole label: the plain row then.
277
- z(Q, !0).catch(() => z(Q, !1))
278
- ) : z(Q, !1)).catch(() => [])
277
+ z(W, !0).catch(() => z(W, !1))
278
+ ) : z(W, !1)).catch(() => [])
279
279
  )
280
- ).then((Q) => {
280
+ ).then((W) => {
281
281
  const O = /* @__PURE__ */ new Map();
282
- for (const $ of Q.flat()) O.set(String($.id), $);
282
+ for (const $ of W.flat()) O.set(String($.id), $);
283
283
  P(O);
284
284
  });
285
285
  }, 0);
@@ -353,12 +353,12 @@ function Lf({
353
353
  }
354
354
  );
355
355
  }
356
- const Q = c ? String(
356
+ const W = c ? String(
357
357
  [A.first_name, A.last_name].filter(Boolean).join(" ") || A.email || A.id || ""
358
358
  ) : Pr((S == null ? void 0 : S.display_template) ?? null, A);
359
359
  return (
360
360
  // To the right of the cell: below it, the card covered the same column on the next rows.
361
- /* @__PURE__ */ a(uf, { collection: n, id: i, disabled: c, side: "right", children: /* @__PURE__ */ a("span", { className: "text-[12px] text-slate-700 dark:text-slate-200", children: Q }) })
361
+ /* @__PURE__ */ a(uf, { collection: n, id: i, disabled: c, side: "right", children: /* @__PURE__ */ a("span", { className: "text-[12px] text-slate-700 dark:text-slate-200", children: W }) })
362
362
  );
363
363
  }
364
364
  function ad(n, i, h, c, _, S) {
@@ -405,7 +405,7 @@ function Ef({
405
405
  onAfterTransition: q,
406
406
  row: A,
407
407
  bulkEnabledKeys: z,
408
- disabled: Q = !1,
408
+ disabled: W = !1,
409
409
  label: O
410
410
  }) {
411
411
  var qt, ut, _t, Qt, pa, Tt, ma, at, fa, _n, Nn, Ye, mn, Lt, pt, ha, Un, Ka, Qn, fn;
@@ -417,8 +417,8 @@ function Ef({
417
417
  collection: n
418
418
  }), [M, g] = w(!1), [Y, H] = w({ x: 0, y: 0 }), K = Z(null), j = Z(null);
419
419
  re(() => {
420
- Q && g(!1);
421
- }, [Q]);
420
+ W && g(!1);
421
+ }, [W]);
422
422
  const { data: Ve } = te({
423
423
  queryKey: ["my-permissions"],
424
424
  queryFn: () => $.request(X("/security/my/permissions")).then((b) => b.data),
@@ -622,14 +622,14 @@ function Ef({
622
622
  {
623
623
  ref: K,
624
624
  type: "button",
625
- disabled: Q,
625
+ disabled: W,
626
626
  onClick: () => {
627
627
  var D;
628
628
  const b = (D = K.current) == null ? void 0 : D.getBoundingClientRect();
629
629
  b && H({ x: b.right - 176, y: b.bottom + 4 }), g((R) => !R);
630
630
  },
631
631
  "aria-label": `Actions for ${C.name}`,
632
- "data-tip": Q ? "Turn off bulk mode to use a row’s own actions" : void 0,
632
+ "data-tip": W ? "Turn off bulk mode to use a row’s own actions" : void 0,
633
633
  className: "inline-flex h-6 items-center gap-1 rounded border border-slate-200 bg-white px-2 text-[11px] font-medium text-slate-600 hover:border-slate-300 hover:text-slate-800 disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:border-slate-200 disabled:hover:text-slate-600 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300 dark:hover:text-slate-100 dark:disabled:hover:border-slate-700 dark:disabled:hover:text-slate-300",
634
634
  children: [
635
635
  "Actions",
@@ -1014,12 +1014,12 @@ function Ar({
1014
1014
  re(() => {
1015
1015
  T == null || T(A);
1016
1016
  }, [A]);
1017
- const [Q, O] = w("");
1017
+ const [W, O] = w("");
1018
1018
  re(() => {
1019
1019
  if (!q) return;
1020
- const g = setTimeout(() => q(Q.trim()), 250);
1020
+ const g = setTimeout(() => q(W.trim()), 250);
1021
1021
  return () => clearTimeout(g);
1022
- }, [Q]);
1022
+ }, [W]);
1023
1023
  const $ = Z(null);
1024
1024
  re(() => {
1025
1025
  if (!A) return;
@@ -1029,7 +1029,7 @@ function Ar({
1029
1029
  };
1030
1030
  return window.addEventListener("mousedown", g), () => window.removeEventListener("mousedown", g);
1031
1031
  }, [A]);
1032
- const m = Q && !q ? i.filter((g) => g.label.toLowerCase().includes(Q.toLowerCase())) : i, ne = new Set(h.map(String)), F = ((M = i.find((g) => String(g.value) === String(h[0]))) == null ? void 0 : M.label) ?? String(h[0] ?? ""), C = h.length === 0 ? n : h.length === 1 ? F : `${F} +${h.length - 1}`;
1032
+ const m = W && !q ? i.filter((g) => g.label.toLowerCase().includes(W.toLowerCase())) : i, ne = new Set(h.map(String)), F = ((M = i.find((g) => String(g.value) === String(h[0]))) == null ? void 0 : M.label) ?? String(h[0] ?? ""), C = h.length === 0 ? n : h.length === 1 ? F : `${F} +${h.length - 1}`;
1033
1033
  return /* @__PURE__ */ d("div", { ref: $, className: S ? "relative w-full" : "relative", children: [
1034
1034
  /* @__PURE__ */ d(
1035
1035
  "button",
@@ -1072,7 +1072,7 @@ function Ar({
1072
1072
  "input",
1073
1073
  {
1074
1074
  autoFocus: !0,
1075
- value: Q,
1075
+ value: W,
1076
1076
  onChange: (g) => O(g.target.value),
1077
1077
  placeholder: "Search…",
1078
1078
  className: "m-1.5 h-6 shrink-0 rounded border border-slate-200 bg-slate-50 px-1.5 text-[11px] font-normal normal-case outline-none focus:border-nvr-cyan/50 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-100"
@@ -1109,7 +1109,7 @@ function Pf({
1109
1109
  onChange: c,
1110
1110
  preferIds: _
1111
1111
  }) {
1112
- const S = zt(), [T, P] = w(!1), q = T || h.length > 0, [A, z] = w(""), Q = (_ ?? []).map(String).sort().join(","), { data: O } = te({
1112
+ const S = zt(), [T, P] = w(!1), q = T || h.length > 0, [A, z] = w(""), W = (_ ?? []).map(String).sort().join(","), { data: O } = te({
1113
1113
  queryKey: ["cbv-collection-meta", n],
1114
1114
  queryFn: () => S.request(X(`/collections/${n}`)).then((H) => H.data),
1115
1115
  staleTime: 10 * 6e4,
@@ -1118,7 +1118,7 @@ function Pf({
1118
1118
  }), $ = Ma(O), m = (O == null ? void 0 : O.display_template) ?? null, { data: ne = [], isLoading: F } = te({
1119
1119
  // Own key shape (an array of {value,label}) — 'cbv-filter-options' held the
1120
1120
  // page-only list; a new name keeps an old cached entry from answering.
1121
- queryKey: ["cbv-filter-options-all", n, $, m ?? "", A, Q],
1121
+ queryKey: ["cbv-filter-options-all", n, $, m ?? "", A, W],
1122
1122
  queryFn: async () => {
1123
1123
  const H = C0({
1124
1124
  search: A,
@@ -1229,10 +1229,10 @@ function Df({
1229
1229
  if (!n) return "All";
1230
1230
  const $ = Er(n);
1231
1231
  return $ ? mu($) : ((m = Or.find((ne) => ne.value === n)) == null ? void 0 : m.label) ?? n;
1232
- })(), [z, Q] = w("between");
1232
+ })(), [z, W] = w("between");
1233
1233
  re(() => {
1234
1234
  var $;
1235
- h && Q((($ = Er(n)) == null ? void 0 : $.op) ?? "between");
1235
+ h && W((($ = Er(n)) == null ? void 0 : $.op) ?? "between");
1236
1236
  }, [h, n]);
1237
1237
  const O = () => {
1238
1238
  const $ = _ || T;
@@ -1287,7 +1287,7 @@ function Df({
1287
1287
  type: "button",
1288
1288
  "data-date-op": $.op,
1289
1289
  "aria-pressed": z === $.op,
1290
- onClick: () => Q($.op),
1290
+ onClick: () => W($.op),
1291
1291
  className: `rounded border px-1 py-0.5 text-[10px] font-normal normal-case leading-tight tracking-normal ${z === $.op ? "border-nvr-cyan/40 bg-nvr-cyan/[0.08] font-medium text-slate-800 dark:text-slate-100" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"}`,
1292
1292
  children: $.label
1293
1293
  },
@@ -1339,7 +1339,7 @@ function Af({
1339
1339
  scopeDefault: _,
1340
1340
  narrowBy: S = []
1341
1341
  }) {
1342
- const T = zt(), P = Dr(), q = n.value_field ?? "id", [A, z] = w(!1), Q = JSON.stringify(S.filter((F) => F.values.length > 0)), { data: O = [], isLoading: $ } = te({
1342
+ const T = zt(), P = Dr(), q = n.value_field ?? "id", [A, z] = w(!1), W = JSON.stringify(S.filter((F) => F.values.length > 0)), { data: O = [], isLoading: $ } = te({
1343
1343
  // The cascade rides at the END of the key so label lookups by the prefix
1344
1344
  // (the filter sentence) still find every option list.
1345
1345
  queryKey: [
@@ -1348,11 +1348,11 @@ function Af({
1348
1348
  q,
1349
1349
  n.label_field,
1350
1350
  n.sort ?? "",
1351
- Q,
1351
+ W,
1352
1352
  i.map(String).sort().join(",")
1353
1353
  ],
1354
1354
  queryFn: async () => {
1355
- const F = Q !== "[]" ? Ip(
1355
+ const F = W !== "[]" ? Ip(
1356
1356
  n.collection,
1357
1357
  await Kp(T, P, n.collection),
1358
1358
  S
@@ -1550,9 +1550,9 @@ function cl({
1550
1550
  }), [A, z] = w(/* @__PURE__ */ new Set());
1551
1551
  if (!q)
1552
1552
  return /* @__PURE__ */ a("div", { className: "px-3 py-1.5", style: { paddingLeft: `${0.5 + i}rem` }, children: /* @__PURE__ */ a("span", { className: "inline-block h-3 w-20 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }) });
1553
- const Q = i < 2;
1553
+ const W = i < 2;
1554
1554
  return /* @__PURE__ */ a(He, { children: q.fields.filter((O) => !O.hidden && (!_ || O.field.includes(_))).map((O) => {
1555
- const $ = Q ? ft(q.relations, n, O.field) : void 0, m = Q && S ? ua(q.relations, n, O.field) : void 0, ne = ($ == null ? void 0 : $.one_collection) ?? null, F = A.has(O.field);
1555
+ const $ = W ? ft(q.relations, n, O.field) : void 0, m = W && S ? ua(q.relations, n, O.field) : void 0, ne = ($ == null ? void 0 : $.one_collection) ?? null, F = A.has(O.field);
1556
1556
  return /* @__PURE__ */ d("div", { children: [
1557
1557
  /* @__PURE__ */ d(
1558
1558
  "button",
@@ -1622,7 +1622,7 @@ function ld({
1622
1622
  if (n.kind === "o2m") A = P || null;
1623
1623
  else {
1624
1624
  const z = q == null ? void 0 : q.relations.find(
1625
- (Q) => Q.many_collection === P && Q.many_field === n.relation.junction_field
1625
+ (W) => W.many_collection === P && W.many_field === n.relation.junction_field
1626
1626
  );
1627
1627
  A = (z == null ? void 0 : z.one_collection) ?? null;
1628
1628
  }
@@ -1680,7 +1680,7 @@ function jf({
1680
1680
  retry: !1,
1681
1681
  enabled: !!c
1682
1682
  }))
1683
- }), Q = le(() => {
1683
+ }), W = le(() => {
1684
1684
  const C = /* @__PURE__ */ new Map();
1685
1685
  return A.forEach((M, g) => {
1686
1686
  var Y;
@@ -1733,7 +1733,7 @@ function jf({
1733
1733
  if (C.hidden) continue;
1734
1734
  const M = ft(q.relations, n, C.field);
1735
1735
  if (!(M != null && M.one_collection) || jt(M.one_collection)) continue;
1736
- const g = Q.get(M.one_collection);
1736
+ const g = W.get(M.one_collection);
1737
1737
  if (!g) continue;
1738
1738
  const Y = Be(C.field);
1739
1739
  for (const H of g.fields) {
@@ -1805,7 +1805,7 @@ function Bf({
1805
1805
  queryFn: () => _.request(X(`/collections/${n}`)).then((m) => m.data),
1806
1806
  staleTime: 10 * 6e4,
1807
1807
  retry: !1
1808
- }), q = Ma(P), A = (P == null ? void 0 : P.display_template) ?? null, { data: z = [], isLoading: Q } = te({
1808
+ }), q = Ma(P), A = (P == null ? void 0 : P.display_template) ?? null, { data: z = [], isLoading: W } = te({
1809
1809
  queryKey: ["cbv-filter-options", n, q, A ?? ""],
1810
1810
  queryFn: () => {
1811
1811
  const m = ol(A, q);
@@ -1838,7 +1838,7 @@ function Bf({
1838
1838
  className: "mx-2 mb-1 h-7 shrink-0 rounded border border-slate-200 bg-slate-50 px-2 text-[12px] outline-none focus:border-nvr-cyan/50 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-100"
1839
1839
  }
1840
1840
  ),
1841
- /* @__PURE__ */ a("div", { className: "min-h-0 flex-1 overflow-y-auto px-1 pb-1", children: Q ? /* @__PURE__ */ a("p", { className: "px-2 py-1 text-[11px] text-slate-400", children: "Loading…" }) : $.length === 0 ? /* @__PURE__ */ a("p", { className: "px-2 py-1 text-[11px] text-slate-400", children: "No matches" }) : $.slice(0, 300).map((m) => /* @__PURE__ */ d(
1841
+ /* @__PURE__ */ a("div", { className: "min-h-0 flex-1 overflow-y-auto px-1 pb-1", children: W ? /* @__PURE__ */ a("p", { className: "px-2 py-1 text-[11px] text-slate-400", children: "Loading…" }) : $.length === 0 ? /* @__PURE__ */ a("p", { className: "px-2 py-1 text-[11px] text-slate-400", children: "No matches" }) : $.slice(0, 300).map((m) => /* @__PURE__ */ d(
1842
1842
  "label",
1843
1843
  {
1844
1844
  className: "flex cursor-pointer items-center gap-1.5 rounded px-2 py-1 text-[12px] text-slate-700 hover:bg-slate-50 dark:text-slate-200 dark:hover:bg-slate-800",
@@ -1894,7 +1894,7 @@ function Uf({
1894
1894
  filters: _,
1895
1895
  onFiltersChange: S
1896
1896
  }) {
1897
- const [T, P] = w(!1), [q, A] = w(""), [z, Q] = w({
1897
+ const [T, P] = w(!1), [q, A] = w(""), [z, W] = w({
1898
1898
  collection: n,
1899
1899
  path: [],
1900
1900
  pathLabels: []
@@ -1912,7 +1912,7 @@ function Uf({
1912
1912
  };
1913
1913
  }, [T]);
1914
1914
  const ot = () => {
1915
- A(""), Q({ collection: n, path: [], pathLabels: [] }), $(null), ne("_contains"), C(""), g(""), H([]), j({}), Ae(null);
1915
+ A(""), W({ collection: n, path: [], pathLabels: [] }), $(null), ne("_contains"), C(""), g(""), H([]), j({}), Ae(null);
1916
1916
  }, $t = () => {
1917
1917
  ot(), P(!0);
1918
1918
  }, Zt = (v) => {
@@ -1936,7 +1936,7 @@ function Uf({
1936
1936
  relTarget: O.relTarget
1937
1937
  });
1938
1938
  }, ye = (v) => {
1939
- if (P(!0), A(""), Q({ collection: n, path: [], pathLabels: [] }), Ae(v.id), Array.isArray(v.value)) {
1939
+ if (P(!0), A(""), W({ collection: n, path: [], pathLabels: [] }), Ae(v.id), Array.isArray(v.value)) {
1940
1940
  $({
1941
1941
  path: v.path,
1942
1942
  pathLabels: v.pathLabels,
@@ -2008,7 +2008,7 @@ function Uf({
2008
2008
  "button",
2009
2009
  {
2010
2010
  type: "button",
2011
- onClick: () => Q({ collection: n, path: [], pathLabels: [] }),
2011
+ onClick: () => W({ collection: n, path: [], pathLabels: [] }),
2012
2012
  className: "flex w-full items-center gap-1 border-b border-slate-100 px-3 py-2 text-left text-[12px] font-medium text-slate-500 hover:bg-slate-50 dark:border-slate-800 dark:hover:bg-slate-800",
2013
2013
  children: [
2014
2014
  "‹ ",
@@ -2068,7 +2068,7 @@ function Uf({
2068
2068
  search: q,
2069
2069
  depth: z.path.length,
2070
2070
  onDrill: (v, ae, ue) => {
2071
- Q({ collection: v, path: ae, pathLabels: ue }), A("");
2071
+ W({ collection: v, path: ae, pathLabels: ue }), A("");
2072
2072
  },
2073
2073
  onPick: (v) => {
2074
2074
  $(v), ne(
@@ -2327,8 +2327,8 @@ function Qf({
2327
2327
  {
2328
2328
  type: "button",
2329
2329
  onClick: () => _((z) => {
2330
- const Q = new Set(z);
2331
- return Q.has(T.field) ? Q.delete(T.field) : Q.add(T.field), Q;
2330
+ const W = new Set(z);
2331
+ return W.has(T.field) ? W.delete(T.field) : W.add(T.field), W;
2332
2332
  }),
2333
2333
  className: "flex w-full items-center gap-1.5 rounded px-1.5 py-1 text-left text-[12px] text-slate-700 hover:bg-slate-50 dark:text-slate-200 dark:hover:bg-slate-800",
2334
2334
  children: [
@@ -2377,7 +2377,7 @@ function Wf({
2377
2377
  figures: q,
2378
2378
  notices: A,
2379
2379
  onFormOpen: z,
2380
- onClear: Q,
2380
+ onClear: W,
2381
2381
  onSuccess: O
2382
2382
  }) {
2383
2383
  var pn;
@@ -2480,7 +2480,7 @@ function Wf({
2480
2480
  au(ee, i);
2481
2481
  try {
2482
2482
  const fe = await N(ee);
2483
- Oe(fe), O(), Q(), C("actions");
2483
+ Oe(fe), O(), W(), C("actions");
2484
2484
  } catch (fe) {
2485
2485
  Oe(gu(fe, "Bulk action failed"));
2486
2486
  } finally {
@@ -2506,7 +2506,7 @@ function Wf({
2506
2506
  "button",
2507
2507
  {
2508
2508
  type: "button",
2509
- onClick: Q,
2509
+ onClick: W,
2510
2510
  "aria-label": "Clear selection",
2511
2511
  className: "text-slate-400 hover:text-white dark:hover:text-foreground",
2512
2512
  children: "✕"
@@ -2603,7 +2603,7 @@ function Wf({
2603
2603
  tone: "dark",
2604
2604
  disabled: nt,
2605
2605
  onDone: (N) => {
2606
- Oe(null), O(), N.failed === 0 && Q();
2606
+ Oe(null), O(), N.failed === 0 && W();
2607
2607
  }
2608
2608
  }
2609
2609
  ),
@@ -2656,7 +2656,7 @@ function Wf({
2656
2656
  ids: i.slice(0, 5),
2657
2657
  open: !0,
2658
2658
  onOpenChange: (N) => {
2659
- N || (g(!1), Y.current && (Y.current = !1, O(), Q()));
2659
+ N || (g(!1), Y.current && (Y.current = !1, O(), W()));
2660
2660
  },
2661
2661
  onMerged: () => {
2662
2662
  Y.current = !0;
@@ -2918,7 +2918,7 @@ function Dg({
2918
2918
  onOpenItem: q,
2919
2919
  initialAiPrompt: A,
2920
2920
  extraViews: z,
2921
- showCreate: Q = !0,
2921
+ showCreate: W = !0,
2922
2922
  viewersInHeader: O = !1,
2923
2923
  className: $
2924
2924
  }) {
@@ -3021,7 +3021,7 @@ function Dg({
3021
3021
  re(() => {
3022
3022
  Xe.length === 0 && vl(null);
3023
3023
  }, [Xe.length]);
3024
- const hd = Zi(n ? [n] : [], De.bulk_actions ?? null), bd = Ft ? hd("update-field") ? Qe ? null : "Turn on Select, then tick the rows to change." : "Bulk update is switched off for this list." : "This list has no row selection.", Va = Q && De.allow_create !== !1, yl = typeof De.create_label == "string" && De.create_label.trim().slice(0, 40) || "New item", za = xm(Va && !(L != null && L.singleton) ? n : null), [Qr, xa] = w(!1), [Wr, Ha] = w(null), { steps: Vr } = K0(
3024
+ const hd = Zi(n ? [n] : [], De.bulk_actions ?? null), bd = Ft ? hd("update-field") ? Qe ? null : "Turn on Select, then tick the rows to change." : "Bulk update is switched off for this list." : "This list has no row selection.", Va = W && De.allow_create !== !1, yl = typeof De.create_label == "string" && De.create_label.trim().slice(0, 40) || "New item", za = xm(Va && !(L != null && L.singleton) ? n : null), [Qr, xa] = w(!1), [Wr, Ha] = w(null), { steps: Vr } = K0(
3025
3025
  Va && !(L != null && L.singleton) ? n : null,
3026
3026
  null
3027
3027
  ), kl = (e) => {
@@ -3821,9 +3821,9 @@ function Dg({
3821
3821
  p.push(me);
3822
3822
  }
3823
3823
  p.length > 0 && !f && (f = setTimeout(() => void B(), 300));
3824
- }, W = (E) => qu(os, E, Ne);
3825
- rr.current = W;
3826
- const Se = Zn.subscribeCollections([n], (E) => cs([E], W)), ce = (E) => cs(E, Ne);
3824
+ }, Q = (E) => qu(os, E, Ne);
3825
+ rr.current = Q;
3826
+ const Se = Zn.subscribeCollections([n], (E) => cs([E], Q)), ce = (E) => cs(E, Ne);
3827
3827
  return ta.current = ce, () => {
3828
3828
  U = !0, ta.current === ce && (ta.current = null), Se(), rr.current = null, $u(os), t.cancel(), s && clearTimeout(s), f && clearTimeout(f), x.cancel();
3829
3829
  };
@@ -4075,8 +4075,8 @@ function Dg({
4075
4075
  if (t === "__state__") {
4076
4076
  const B = (p = we == null ? void 0 : we.instances) == null ? void 0 : p[String(l)];
4077
4077
  if (!(B != null && B.state_key)) return;
4078
- const Ne = Ye.__state__, W = (Ne == null ? void 0 : Ne.kind) === "state" ? Ne.value : [];
4079
- et("__state__", { kind: "state", value: [.../* @__PURE__ */ new Set([...W, B.state_key])] });
4078
+ const Ne = Ye.__state__, Q = (Ne == null ? void 0 : Ne.kind) === "state" ? Ne.value : [];
4079
+ et("__state__", { kind: "state", value: [.../* @__PURE__ */ new Set([...Q, B.state_key])] });
4080
4080
  return;
4081
4081
  }
4082
4082
  const o = na(t);
@@ -4084,7 +4084,7 @@ function Dg({
4084
4084
  if (o.kind === "in") {
4085
4085
  const Ne = ft(st, n, t) ? r[t] != null ? [r[t]] : [] : ((U = (x = (f = Re == null ? void 0 : Re.rows) == null ? void 0 : f[String(l)]) == null ? void 0 : x[lt[t]]) == null ? void 0 : U.ids) ?? [];
4086
4086
  if (Ne.length === 0) return;
4087
- const W = Ye[t], Se = (W == null ? void 0 : W.kind) === "in" ? W.value : [];
4087
+ const Q = Ye[t], Se = (Q == null ? void 0 : Q.kind) === "in" ? Q.value : [];
4088
4088
  et(t, { kind: "in", value: [.../* @__PURE__ */ new Set([...Se, ...Ne])] });
4089
4089
  return;
4090
4090
  }
@@ -4357,10 +4357,10 @@ function Dg({
4357
4357
  f.length > 0 && ae(f);
4358
4358
  const x = {}, U = {}, B = {};
4359
4359
  let Ne = !1;
4360
- const W = {}, Se = {}, ce = {};
4360
+ const Q = {}, Se = {}, ce = {};
4361
4361
  for (const E of e.columns)
4362
- typeof E != "string" && E.label && (x[E.key] = E.label), typeof E != "string" && E.format && (U[E.key] = E.format), typeof E != "string" && E.pin && (Ne = !0, E.pin !== "none" && (B[E.key] = E.pin)), typeof E != "string" && ((s = E.tint) != null && s.length) && (W[E.key] = E.tint), typeof E != "string" && E.width && (Se[E.key] = E.width), typeof E != "string" && n0(E.agg) && (ce[E.key] = E.agg);
4363
- dt(ce), ze(x), V(U), he(W), ee(Se), Ja(Ne ? B : null);
4362
+ typeof E != "string" && E.label && (x[E.key] = E.label), typeof E != "string" && E.format && (U[E.key] = E.format), typeof E != "string" && E.pin && (Ne = !0, E.pin !== "none" && (B[E.key] = E.pin)), typeof E != "string" && ((s = E.tint) != null && s.length) && (Q[E.key] = E.tint), typeof E != "string" && E.width && (Se[E.key] = E.width), typeof E != "string" && n0(E.agg) && (ce[E.key] = E.agg);
4363
+ dt(ce), ze(x), V(U), he(Q), ee(Se), Ja(Ne ? B : null);
4364
4364
  } else
4365
4365
  dt({}), Ja(null);
4366
4366
  j(1);
@@ -4664,10 +4664,10 @@ function Dg({
4664
4664
  ...new Set(
4665
4665
  x.flatMap((y) => l.map((u) => u[y]).filter((u) => u != null && u !== ""))
4666
4666
  )
4667
- ].map(String), W = /* @__PURE__ */ new Map();
4667
+ ].map(String), Q = /* @__PURE__ */ new Map();
4668
4668
  await Promise.all(
4669
4669
  Ne.map(
4670
- (y) => vm(m, y).then((u) => W.set(y.toUpperCase(), c0(u, y))).catch(() => W.set(y.toUpperCase(), y))
4670
+ (y) => vm(m, y).then((u) => Q.set(y.toUpperCase(), c0(u, y))).catch(() => Q.set(y.toUpperCase(), y))
4671
4671
  )
4672
4672
  );
4673
4673
  const Se = new Map(f.map((y) => [y.column, y])), ce = new Set(x), E = (y) => {
@@ -4693,7 +4693,7 @@ function Dg({
4693
4693
  return I && kn ? hi(kn, I) : kn;
4694
4694
  }
4695
4695
  const J = y[u], It = Se.get(u);
4696
- return It && J != null && J !== "" ? u0(It, B[String(y.id)]) || J : ce.has(u) && J != null && J !== "" ? W.get(String(J).toUpperCase()) ?? J : J != null && J !== "" && ((I == null ? void 0 : I.type) === "number" || aa(u)) ? su(J) : J != null && J !== "" && ((I == null ? void 0 : I.type) === "datetime" || ec(u)) ? lu(J) : u === "id" ? Js(L, y) ?? J : I && J != null ? _r(String(J), I) : J;
4696
+ return It && J != null && J !== "" ? u0(It, B[String(y.id)]) || J : ce.has(u) && J != null && J !== "" ? Q.get(String(J).toUpperCase()) ?? J : J != null && J !== "" && ((I == null ? void 0 : I.type) === "number" || aa(u)) ? su(J) : J != null && J !== "" && ((I == null ? void 0 : I.type) === "datetime" || ec(u)) ? lu(J) : u === "id" ? Js(L, y) ?? J : I && J != null ? _r(String(J), I) : J;
4697
4697
  }, xe = Jt.filter((y) => y.kind !== "actions"), sn = new Set(
4698
4698
  xe.filter((y) => y.kind !== "data" && y.kind !== "formula").map((y) => y.kind)
4699
4699
  ), yn = l.map((y) => String(y.id));
@@ -5120,7 +5120,7 @@ function Dg({
5120
5120
  let e = !1;
5121
5121
  const t = (f, x, U, B = !1) => {
5122
5122
  const Ne = x.map(U);
5123
- return Ne.every((W) => !!W) ? { kind: "is", field: f, values: Ne, not: B } : (e = !0, { kind: "is", field: f, values: [], count: x.length, not: B });
5123
+ return Ne.every((Q) => !!Q) ? { kind: "is", field: f, values: Ne, not: B } : (e = !0, { kind: "is", field: f, values: [], count: x.length, not: B });
5124
5124
  }, r = [];
5125
5125
  for (const f of ye) {
5126
5126
  const x = f.pathLabels.join(" › ") || f.path.join(".");
@@ -5152,7 +5152,7 @@ function Dg({
5152
5152
  if (!x) continue;
5153
5153
  const U = f === "__state__" ? "State" : f === "__fulfilment__" ? (Ke == null ? void 0 : Ke.label) ?? "Shipped" : f === "__integrations__" ? "Integrations" : f === "__aging__" ? "Time in state" : Ze(f), B = ie[f], Ne = (B == null ? void 0 : B.type) === "number" && B.prefix === "$";
5154
5154
  if (x.kind === "in" && x.value.length) {
5155
- const W = il(st, n, f), Se = (W == null ? void 0 : W.one_collection) ?? null, ce = Kl[f], E = Se ?? ((ce == null ? void 0 : ce.kind) === "m2m" ? ce.target : null);
5155
+ const Q = il(st, n, f), Se = (Q == null ? void 0 : Q.one_collection) ?? null, ce = Kl[f], E = Se ?? ((ce == null ? void 0 : ce.kind) === "m2m" ? ce.target : null);
5156
5156
  r.push(
5157
5157
  E ? t(
5158
5158
  U,
@@ -5165,36 +5165,36 @@ function Dg({
5165
5165
  kind: "is",
5166
5166
  field: U,
5167
5167
  values: x.value.map(
5168
- (W) => {
5168
+ (Q) => {
5169
5169
  var Se, ce;
5170
- return ((ce = (Se = Dt == null ? void 0 : Dt.states) == null ? void 0 : Se.find((E) => E.key === W)) == null ? void 0 : ce.label) ?? Be(W);
5170
+ return ((ce = (Se = Dt == null ? void 0 : Dt.states) == null ? void 0 : Se.find((E) => E.key === Q)) == null ? void 0 : ce.label) ?? Be(Q);
5171
5171
  }
5172
5172
  )
5173
5173
  });
5174
5174
  else if (x.kind === "fulfilment" && Ke) {
5175
- const W = (l = Ei.find((Se) => Se.value === x.value)) == null ? void 0 : l.label;
5176
- W && r.push({ kind: "phrase", text: W.toLowerCase() });
5175
+ const Q = (l = Ei.find((Se) => Se.value === x.value)) == null ? void 0 : l.label;
5176
+ Q && r.push({ kind: "phrase", text: Q.toLowerCase() });
5177
5177
  } else if (x.kind === "integrations") {
5178
- const W = (o = Pi.find((Se) => Se.value === x.value)) == null ? void 0 : o.label;
5179
- W && r.push({ kind: "is", field: U, values: [W.toLowerCase()] });
5178
+ const Q = (o = Pi.find((Se) => Se.value === x.value)) == null ? void 0 : o.label;
5179
+ Q && r.push({ kind: "is", field: U, values: [Q.toLowerCase()] });
5180
5180
  } else if (x.kind === "tasks")
5181
5181
  r.push({
5182
5182
  kind: "phrase",
5183
5183
  text: x.value === "none" ? "with no open tasks" : x.value === "overdue" ? "with overdue tasks" : "with open tasks"
5184
5184
  });
5185
5185
  else if (x.kind === "aging") {
5186
- const W = Su({ field: U, type: "range", value: x.value, rangeUnit: "h" });
5187
- W && r.push(W);
5186
+ const Q = Su({ field: U, type: "range", value: x.value, rangeUnit: "h" });
5187
+ Q && r.push(Q);
5188
5188
  } else if (x.kind === "text" && x.value.trim())
5189
5189
  r.push({ kind: "text", field: U, text: x.value });
5190
5190
  else if (x.kind === "num" && x.value !== "") {
5191
- const W = Hs({
5191
+ const Q = Hs({
5192
5192
  field: U,
5193
5193
  op: x.op,
5194
5194
  value: x.value,
5195
5195
  kind: Ne ? "currency" : "number"
5196
5196
  });
5197
- W && r.push(W);
5197
+ Q && r.push(Q);
5198
5198
  } else if (x.kind === "bool")
5199
5199
  r.push({
5200
5200
  kind: "is",
@@ -5204,7 +5204,7 @@ function Dg({
5204
5204
  ]
5205
5205
  });
5206
5206
  else if (x.kind === "date" && x.value) {
5207
- const W = Er(x.value), Se = W ? { kind: "date", field: U, op: W.op, from: W.from, to: W.to } : Hs({ field: U, op: "_preset", value: x.value, kind: "date" });
5207
+ const Q = Er(x.value), Se = Q ? { kind: "date", field: U, op: Q.op, from: Q.from, to: Q.to } : Hs({ field: U, op: "_preset", value: x.value, kind: "date" });
5208
5208
  Se && r.push(Se);
5209
5209
  }
5210
5210
  }
@@ -6982,7 +6982,7 @@ ${r}`).then(() => {
6982
6982
  collection: n,
6983
6983
  config: ka,
6984
6984
  onOpen: (e) => On(e),
6985
- onAddChild: Q && De.allow_create !== !1 ? (e) => C({
6985
+ onAddChild: W && De.allow_create !== !1 ? (e) => C({
6986
6986
  collection: n,
6987
6987
  itemId: "new",
6988
6988
  prefill: { [ka.parent_field]: e }
@@ -7083,14 +7083,14 @@ ${r}`).then(() => {
7083
7083
  Jt.map((e) => {
7084
7084
  const t = e.key, r = !!Gt(t), s = `group/hcell sticky top-0 h-8 select-none whitespace-nowrap bg-slate-50 px-3 py-0 text-[10px] font-bold uppercase tracking-wider text-slate-500 dark:bg-slate-800 dark:text-slate-400 ${r ? "z-[4]" : "z-[2]"}`, l = xt(t, "", "");
7085
7085
  if (e.kind === "in_step") {
7086
- const W = oe === Oa || oe === `-${Oa}`, Se = oe === `-${Oa}`;
7086
+ const Q = oe === Oa || oe === `-${Oa}`, Se = oe === `-${Oa}`;
7087
7087
  return /* @__PURE__ */ d(
7088
7088
  "th",
7089
7089
  {
7090
7090
  ref: r || Hn[t] ? gr(t) : void 0,
7091
7091
  style: { ...xr(t), ...je(t) },
7092
7092
  onClick: () => mr(Oa),
7093
- "aria-sort": W ? Se ? "descending" : "ascending" : "none",
7093
+ "aria-sort": Q ? Se ? "descending" : "ascending" : "none",
7094
7094
  tabIndex: 0,
7095
7095
  onKeyDown: (ce) => {
7096
7096
  ce.target === ce.currentTarget && (ce.key === "Enter" || ce.key === " ") && (ce.preventDefault(), mr(Oa));
@@ -7103,8 +7103,8 @@ ${r}`).then(() => {
7103
7103
  "span",
7104
7104
  {
7105
7105
  "aria-hidden": !0,
7106
- className: `ml-1 inline-block transition-colors duration-200 ${W ? "text-[#00a5cc]" : "text-slate-300 dark:text-slate-500"}`,
7107
- children: W ? Se ? "▼" : "▲" : "⇅"
7106
+ className: `ml-1 inline-block transition-colors duration-200 ${Q ? "text-[#00a5cc]" : "text-slate-300 dark:text-slate-500"}`,
7107
+ children: Q ? Se ? "▼" : "▲" : "⇅"
7108
7108
  }
7109
7109
  ),
7110
7110
  Is(t)
@@ -7114,7 +7114,7 @@ ${r}`).then(() => {
7114
7114
  );
7115
7115
  }
7116
7116
  if (e.kind !== "data") {
7117
- const W = e.kind === "state" ? "State" : e.kind === "entered" ? "Last State Change" : e.kind === "aging" ? "Aging" : e.kind === "owners" ? "Owners" : e.kind === "addendums" ? "Addendums" : e.kind === "fulfilment" ? Ke != null && Ke.label ? `${Ke.label} shipped` : "Shipped" : e.kind === "integrations" ? "Integrations" : e.kind === "tasks" ? "Tasks" : e.kind === "formula" ? Ze(t) : "";
7117
+ const Q = e.kind === "state" ? "State" : e.kind === "entered" ? "Last State Change" : e.kind === "aging" ? "Aging" : e.kind === "owners" ? "Owners" : e.kind === "addendums" ? "Addendums" : e.kind === "fulfilment" ? Ke != null && Ke.label ? `${Ke.label} shipped` : "Shipped" : e.kind === "integrations" ? "Integrations" : e.kind === "tasks" ? "Tasks" : e.kind === "formula" ? Ze(t) : "";
7118
7118
  return /* @__PURE__ */ d(
7119
7119
  "th",
7120
7120
  {
@@ -7122,7 +7122,8 @@ ${r}`).then(() => {
7122
7122
  style: je(t),
7123
7123
  className: `${s} text-left ${e.kind === "actions" ? "w-20 px-2" : ""} ${l}`,
7124
7124
  children: [
7125
- W,
7125
+ Q,
7126
+ !Q && /* @__PURE__ */ a("span", { className: "sr-only", children: "Actions" }),
7126
7127
  Is(t)
7127
7128
  ]
7128
7129
  },
@@ -7140,8 +7141,8 @@ ${r}`).then(() => {
7140
7141
  },
7141
7142
  "aria-sort": f ? void 0 : x ? U ? "descending" : "ascending" : "none",
7142
7143
  tabIndex: f ? void 0 : 0,
7143
- onKeyDown: (W) => {
7144
- f || W.target !== W.currentTarget || (W.key === "Enter" || W.key === " ") && (W.preventDefault(), mr(t));
7144
+ onKeyDown: (Q) => {
7145
+ f || Q.target !== Q.currentTarget || (Q.key === "Enter" || Q.key === " ") && (Q.preventDefault(), mr(t));
7145
7146
  },
7146
7147
  className: `${s} relative ${aa(t) ? "text-right" : "text-left"} ${f ? "" : "cursor-pointer hover:text-slate-600 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-nvr-cyan"} ${l}`,
7147
7148
  children: [
@@ -7176,14 +7177,14 @@ ${r}`).then(() => {
7176
7177
  B && !t.includes(".") && !B.computed_formula ? () => vl({ field: t, nonce: Date.now() }) : void 0
7177
7178
  ),
7178
7179
  totals: (() => {
7179
- const W = aa(t) && B ? Xn(t) : null;
7180
- if (!W) return;
7180
+ const Q = aa(t) && B ? Xn(t) : null;
7181
+ if (!Q) return;
7181
7182
  const Se = (ce) => pn(t, ce);
7182
- return W.kind === "none" ? { fn: null, onChange: Se, unavailable: W.why } : W.kind === "derived" ? {
7183
+ return Q.kind === "none" ? { fn: null, onChange: Se, unavailable: Q.why } : Q.kind === "derived" ? {
7183
7184
  fn: Me[t] === "sum" ? "sum" : null,
7184
7185
  onChange: Se,
7185
7186
  only: ["sum"],
7186
- note: Fd(W.terms)
7187
+ note: Fd(Q.terms)
7187
7188
  } : { fn: Me[t] ?? null, onChange: Se };
7188
7189
  })()
7189
7190
  }
@@ -7196,7 +7197,7 @@ ${r}`).then(() => {
7196
7197
  })
7197
7198
  ] }),
7198
7199
  (Zd || oa) && /* @__PURE__ */ d("tr", { className: "border-b border-slate-200 dark:border-slate-700", children: [
7199
- Ft && /* @__PURE__ */ a("th", { className: "sticky left-0 top-8 z-[4] w-11 bg-slate-50 py-1 pl-1.5 pr-3 dark:bg-slate-800" }),
7200
+ Ft && /* @__PURE__ */ a("th", { className: "sticky left-0 top-8 z-[4] w-11 bg-slate-50 py-1 pl-1.5 pr-3 dark:bg-slate-800", children: /* @__PURE__ */ a("span", { className: "sr-only", children: "Filters" }) }),
7200
7201
  Jt.map((e) => {
7201
7202
  var l;
7202
7203
  const t = e.key, s = `sticky top-8 bg-slate-50 px-2 py-1 text-left font-normal dark:bg-slate-800 ${!!Gt(t) ? "z-[4]" : "z-[2]"} ${xt(t, "", "")}`;
@@ -7335,7 +7336,8 @@ ${r}`).then(() => {
7335
7336
  "th",
7336
7337
  {
7337
7338
  style: je(t),
7338
- className: `${s} ${e.kind === "actions" ? "w-20" : ""}`
7339
+ className: `${s} ${e.kind === "actions" ? "w-20" : ""}`,
7340
+ children: /* @__PURE__ */ a("span", { className: "sr-only", children: "No filter" })
7339
7341
  },
7340
7342
  t
7341
7343
  ) : /* @__PURE__ */ a("th", { style: je(t), className: s, children: Xd(t) }, t);
@@ -7477,7 +7479,7 @@ ${r}`).then(() => {
7477
7479
  },
7478
7480
  `__group__${e.gkey}`
7479
7481
  );
7480
- const s = e.row, l = s.id, o = Xe.includes(l), p = (xe = we == null ? void 0 : we.instances) == null ? void 0 : xe[String(l)], f = Bd[String(l)], x = bs == null ? void 0 : bs[String(l)], U = Kd.get(String(l)) ?? null, B = Qd(n, l), Ne = !!(Ns != null && Ns.has(String(l))), W = !o && f ? zp(f.color) : !o && Ne ? Hi : void 0, Se = o ? Hp : f ? W ?? _i : Ne ? `${Hi} ${Ni}` : `${_i} ${Ni}`, ce = Gp, E = An.movingTo(String(l)), me = E ? ((sn = Jt.map((Pe) => ({ k: Pe.key, n: String(s[Pe.key] ?? "").length })).sort((Pe, k) => k.n - Pe.n)[0]) == null ? void 0 : sn.k) ?? ((yn = Jt[0]) == null ? void 0 : yn.key) : null;
7482
+ const s = e.row, l = s.id, o = Xe.includes(l), p = (xe = we == null ? void 0 : we.instances) == null ? void 0 : xe[String(l)], f = Bd[String(l)], x = bs == null ? void 0 : bs[String(l)], U = Kd.get(String(l)) ?? null, B = Qd(n, l), Ne = !!(Ns != null && Ns.has(String(l))), Q = !o && f ? zp(f.color) : !o && Ne ? Hi : void 0, Se = o ? Hp : f ? Q ?? _i : Ne ? `${Hi} ${Ni}` : `${_i} ${Ni}`, ce = Gp, E = An.movingTo(String(l)), me = E ? ((sn = Jt.map((Pe) => ({ k: Pe.key, n: String(s[Pe.key] ?? "").length })).sort((Pe, k) => k.n - Pe.n)[0]) == null ? void 0 : sn.k) ?? ((yn = Jt[0]) == null ? void 0 : yn.key) : null;
7481
7483
  return /* @__PURE__ */ d(
7482
7484
  "tr",
7483
7485
  {