@declarion/react 0.38.1 → 0.39.0

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 (46) hide show
  1. package/dist-lib/{DraggableChildrenTable-CI5a0Emm.js → DraggableChildrenTable-DziCVhq6.js} +1 -1
  2. package/dist-lib/{Grid-BZEMUmjI.js → Grid-BTX2tkCT.js} +2 -2
  3. package/dist-lib/{LayoutRenderer-CnKUYh8M.js → LayoutRenderer-CwMERoPJ.js} +387 -285
  4. package/dist-lib/{MarkdownRenderer-DNmOqp_M.js → MarkdownRenderer-dHOTEhUa.js} +1 -1
  5. package/dist-lib/{RefreshControl-DsEXi6WF.js → RefreshControl--UAgflh7.js} +257 -175
  6. package/dist-lib/{SmartDetailPage.impl-DhSpZTLw.js → SmartDetailPage.impl-Bj7MtHxi.js} +474 -414
  7. package/dist-lib/{SmartRecordListPage.impl-Bi_FPbGy.js → SmartRecordListPage.impl-CZXzVhPC.js} +164 -164
  8. package/dist-lib/api/params.d.ts +12 -11
  9. package/dist-lib/components/columns/ColumnPicker.d.ts +11 -1
  10. package/dist-lib/components/detail-layout/EvidenceBlock.d.ts +6 -0
  11. package/dist-lib/components/detail-layout/useManualColumnResize.d.ts +25 -0
  12. package/dist-lib/components/list/QuickPeek.d.ts +11 -2
  13. package/dist-lib/components/pages/list/{ListBulkBar.d.ts → ListFloatbar.d.ts} +3 -3
  14. package/dist-lib/components/pages/list/RowActionsCell.d.ts +8 -10
  15. package/dist-lib/components/pages/list/RowContextMenu.d.ts +29 -0
  16. package/dist-lib/components/pages/list/SaveViewDialog.d.ts +5 -1
  17. package/dist-lib/components/pages/list/cardProjection.d.ts +1 -1
  18. package/dist-lib/components/pages/list/column-sizing.d.ts +15 -0
  19. package/dist-lib/components/pages/list/columns.d.ts +3 -0
  20. package/dist-lib/components/pages/list/useHeaderReorder.d.ts +26 -0
  21. package/dist-lib/components/pages/list/useRowMenu.d.ts +47 -0
  22. package/dist-lib/components/pages/profile/Profile.d.ts +3 -0
  23. package/dist-lib/components/pages/tenant-params/TenantParamsPage.d.ts +2 -0
  24. package/dist-lib/components/params/ParamsBlock.d.ts +25 -0
  25. package/dist-lib/components/params/param-editors.d.ts +28 -0
  26. package/dist-lib/components/primitives/Dropdown.d.ts +10 -1
  27. package/dist-lib/components/shared/ActionDialog.d.ts +2 -2
  28. package/dist-lib/components/shared/ActionRunner.d.ts +15 -0
  29. package/dist-lib/components/shared/ResponsiveActionBar.d.ts +45 -23
  30. package/dist-lib/declarion-react.css +1 -1
  31. package/dist-lib/hooks/useParams.d.ts +45 -1
  32. package/dist-lib/index.d.ts +0 -2
  33. package/dist-lib/index.js +3074 -2189
  34. package/dist-lib/lib/actions.d.ts +17 -3
  35. package/dist-lib/lib/evidence-verdict.d.ts +11 -0
  36. package/dist-lib/lib/rowClickGesture.d.ts +14 -0
  37. package/dist-lib/{registry-B_AmhRdj.js → registry-DXNFRlbB.js} +780 -559
  38. package/dist-lib/stores/list-layout.d.ts +86 -0
  39. package/dist-lib/testing.js +1 -1
  40. package/dist-lib/types/api.d.ts +29 -1
  41. package/dist-lib/types/schema.d.ts +15 -0
  42. package/dist-lib/{useCurrentScreen-CcsD2NAk.js → useCurrentScreen-BA2lb-d7.js} +860 -835
  43. package/dist-lib/{useProperties-CPtQIWXp.js → useProperties-Br2DeOQh.js} +81 -81
  44. package/dist-lib/{value-BCjHI_Ai.js → value-C91loRXp.js} +1 -1
  45. package/package.json +1 -1
  46. package/dist-lib/components/list/RowMenu.d.ts +0 -23
@@ -1,10 +1,10 @@
1
1
  import { s as e } from "./DynamicIcon-DeRpAaXm.js";
2
- import { $ as t, Gn as n, Hn as r, Kn as i, Nn as a, Pn as o, Wn as s, _t as c, et as l, i as u, jt as d, ot as f, un as p, xn as m } from "./useCurrentScreen-CcsD2NAk.js";
3
- import { useCallback as h, useEffect as g, useId as _, useMemo as v, useRef as y, useState as b } from "react";
4
- import { useLocation as x } from "react-router-dom";
5
- import { useQuery as S, useQueryClient as C } from "@tanstack/react-query";
6
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
7
- import { createPortal as D } from "react-dom";
2
+ import { $ as t, Gn as n, Hn as r, Kn as i, Nn as a, Pn as o, Wn as s, _t as c, ct as l, et as u, i as d, jt as f, ot as p, un as m, xn as h } from "./useCurrentScreen-BA2lb-d7.js";
3
+ import { useCallback as g, useEffect as _, useId as v, useMemo as y, useRef as b, useState as x } from "react";
4
+ import { useLocation as S } from "react-router-dom";
5
+ import { useQuery as C, useQueryClient as w } from "@tanstack/react-query";
6
+ import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
7
+ import { createPortal as ee } from "react-dom";
8
8
  import { create as O } from "zustand";
9
9
  //#region src/components/primitives/Avatar.tsx
10
10
  function k({ name: e, size: t = 22, color: n }) {
@@ -18,7 +18,7 @@ function k({ name: e, size: t = 22, color: n }) {
18
18
  "#F1F6DC",
19
19
  "#F6DCF1"
20
20
  ];
21
- return /* @__PURE__ */ T("span", {
21
+ return /* @__PURE__ */ E("span", {
22
22
  style: {
23
23
  display: "inline-flex",
24
24
  alignItems: "center",
@@ -39,9 +39,9 @@ function k({ name: e, size: t = 22, color: n }) {
39
39
  //#region src/components/primitives/Tooltip.tsx
40
40
  var A = 350, j = 80, M = 260, N = 6, P = 4;
41
41
  function F(e, t) {
42
- let [n, r] = b(!1), [i, a] = b(null), o = y(null), s = y(null), c = y(null), l = _(), u = h(() => {
42
+ let [n, r] = x(!1), [i, a] = x(null), o = b(null), s = b(null), c = b(null), l = v(), u = g(() => {
43
43
  s.current && clearTimeout(s.current), c.current && clearTimeout(c.current), s.current = null, c.current = null;
44
- }, []), d = h(() => {
44
+ }, []), d = g(() => {
45
45
  let t = e.current;
46
46
  if (!t) return;
47
47
  let n = t.getBoundingClientRect(), r = o.current, i = r?.offsetWidth ?? M, s = r?.offsetHeight ?? 0, c = n.left + n.width / 2 - i / 2;
@@ -51,12 +51,12 @@ function F(e, t) {
51
51
  left: c,
52
52
  top: l
53
53
  });
54
- }, [e]), f = h((e) => {
54
+ }, [e]), f = g((e) => {
55
55
  t && (u(), e ? r(!0) : s.current = setTimeout(() => r(!0), A));
56
- }, [u, t]), p = h(() => {
56
+ }, [u, t]), p = g(() => {
57
57
  u(), c.current = setTimeout(() => r(!1), j);
58
58
  }, [u]);
59
- g(() => {
59
+ _(() => {
60
60
  if (!n) {
61
61
  a(null);
62
62
  return;
@@ -66,7 +66,7 @@ function F(e, t) {
66
66
  return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
67
67
  window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
68
68
  };
69
- }, [n, d]), g(() => u, [u]);
69
+ }, [n, d]), _(() => u, [u]);
70
70
  let m = {
71
71
  position: "fixed",
72
72
  left: i?.left ?? 0,
@@ -83,7 +83,7 @@ function F(e, t) {
83
83
  pointerEvents: "none",
84
84
  visibility: i ? "visible" : "hidden",
85
85
  whiteSpace: "normal"
86
- }, v = n && t ? D(/* @__PURE__ */ T("div", {
86
+ }, h = n && t ? ee(/* @__PURE__ */ E("div", {
87
87
  ref: o,
88
88
  id: l,
89
89
  role: "tooltip",
@@ -99,12 +99,12 @@ function F(e, t) {
99
99
  onBlur: p
100
100
  },
101
101
  describedBy: n && t ? l : void 0,
102
- portal: v
102
+ portal: h
103
103
  };
104
104
  }
105
- function I({ content: e, children: t, triggerProps: n }) {
106
- let r = y(null), { triggerHandlers: i, describedBy: a, portal: o } = F(r, e);
107
- return e ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("span", {
105
+ function te({ content: e, children: t, triggerProps: n }) {
106
+ let r = b(null), { triggerHandlers: i, describedBy: a, portal: o } = F(r, e);
107
+ return e ? /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("span", {
108
108
  ...n,
109
109
  ref: r,
110
110
  "aria-describedby": a,
@@ -115,12 +115,12 @@ function I({ content: e, children: t, triggerProps: n }) {
115
115
  },
116
116
  ...i,
117
117
  children: t
118
- }), o] }) : /* @__PURE__ */ T(w, { children: t });
118
+ }), o] }) : /* @__PURE__ */ E(T, { children: t });
119
119
  }
120
- function ee({ label: t, size: n = 14, ...r }) {
121
- return /* @__PURE__ */ T(I, {
120
+ function ne({ label: t, size: n = 14, ...r }) {
121
+ return /* @__PURE__ */ E(te, {
122
122
  content: t,
123
- children: /* @__PURE__ */ T("span", {
123
+ children: /* @__PURE__ */ E("span", {
124
124
  tabIndex: 0,
125
125
  role: "note",
126
126
  "aria-label": t,
@@ -131,25 +131,25 @@ function ee({ label: t, size: n = 14, ...r }) {
131
131
  color: "var(--text-3)",
132
132
  cursor: "help"
133
133
  },
134
- children: /* @__PURE__ */ T(e.info, { size: n })
134
+ children: /* @__PURE__ */ E(e.info, { size: n })
135
135
  })
136
136
  });
137
137
  }
138
138
  //#endregion
139
139
  //#region src/components/primitives/RecordIdBadge.tsx
140
- var te = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, ne = 1200;
141
- function re({ value: t }) {
142
- let [n, r] = b(!1), i = te.test(t) ? `${t.slice(0, 8)}…` : t;
143
- return /* @__PURE__ */ E("button", {
140
+ var re = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, ie = 1200;
141
+ function ae({ value: t }) {
142
+ let [n, r] = x(!1), i = re.test(t) ? `${t.slice(0, 8)}…` : t;
143
+ return /* @__PURE__ */ D("button", {
144
144
  type: "button",
145
- onClick: h(async () => {
145
+ onClick: g(async () => {
146
146
  try {
147
- await navigator.clipboard.writeText(t), r(!0), window.setTimeout(() => r(!1), ne);
147
+ await navigator.clipboard.writeText(t), r(!0), window.setTimeout(() => r(!1), ie);
148
148
  } catch {}
149
149
  }, [t]),
150
150
  title: n ? "Copied" : `Copy ${t}`,
151
151
  className: "mono inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[11px] text-text-4 hover:bg-surface-2 hover:text-text-3 transition-colors shrink-0 border border-transparent hover:border-border",
152
- children: [/* @__PURE__ */ T("span", { children: i }), n ? /* @__PURE__ */ T(e.check, { size: 10 }) : /* @__PURE__ */ T(e.copy, {
152
+ children: [/* @__PURE__ */ E("span", { children: i }), n ? /* @__PURE__ */ E(e.check, { size: 10 }) : /* @__PURE__ */ E(e.copy, {
153
153
  size: 10,
154
154
  style: { opacity: .6 }
155
155
  })]
@@ -157,32 +157,32 @@ function re({ value: t }) {
157
157
  }
158
158
  //#endregion
159
159
  //#region src/lib/branding.ts
160
- var L = "branding";
161
- function ie(e, t) {
160
+ var I = "branding";
161
+ function oe(e, t) {
162
162
  return e?.parameters.find((e) => e.code === t)?.value;
163
163
  }
164
- function ae(e) {
165
- return oe(ie(e, L));
164
+ function se(e) {
165
+ return L(oe(e, I));
166
166
  }
167
- function oe(e) {
167
+ function L(e) {
168
168
  if (R(e)) return e;
169
169
  }
170
- function se(e) {
171
- let t = ae(e)?.identity;
170
+ function ce(e) {
171
+ let t = se(e)?.identity;
172
172
  return R(t) ? t : void 0;
173
173
  }
174
174
  function R(e) {
175
175
  return !!e && typeof e == "object" && !Array.isArray(e);
176
176
  }
177
- function ce(e) {
177
+ function le(e) {
178
178
  if (!e) return !1;
179
179
  let t = e.trim();
180
180
  return t ? t.startsWith("/") || t.startsWith("http://") || t.startsWith("https://") || t.startsWith("data:image/") : !1;
181
181
  }
182
182
  //#endregion
183
183
  //#region src/api/params.ts
184
- async function le() {
185
- let e = (await d("/api/params/public")).data;
184
+ async function ue() {
185
+ let e = (await f("/api/params/public")).data;
186
186
  if (Array.isArray(e)) return { parameters: e };
187
187
  let t = e ?? {};
188
188
  return {
@@ -193,20 +193,79 @@ async function le() {
193
193
  };
194
194
  }
195
195
  async function z(e) {
196
- return (await d(`/api/params/${encodeURIComponent(e)}`)).data;
196
+ return (await f(`/api/params/${encodeURIComponent(e)}`)).data;
197
+ }
198
+ async function de(e) {
199
+ return (await f(`/api/params${e === "tenant" ? "?resolution=tenant" : ""}`)).data ?? [];
197
200
  }
198
201
  //#endregion
199
202
  //#region src/hooks/useParams.ts
200
- function B() {
201
- return S({
203
+ var B = "$params";
204
+ function fe({ carrierEntityCode: e, rowId: t, enabled: n = !0, onWritten: r }) {
205
+ let i = w(), [a, o] = x(null), s = C({
206
+ queryKey: [
207
+ "params-carrier-detail",
208
+ e,
209
+ t
210
+ ],
211
+ queryFn: () => l(e, t),
212
+ enabled: n && !!t,
213
+ staleTime: 30 * 1e3
214
+ }), c = s.data?.data, u = !!c && !("$params" in c), d = y(() => Array.isArray(c?.$params) ? c[B] : [], [c]), f = y(() => new Map(d.map((e) => [e.param_code, e])), [d]), m = g(async (n) => {
215
+ o(null);
216
+ try {
217
+ await p(`${e}.__update`, {
218
+ object_ids: [t],
219
+ entity: e,
220
+ fields: { [B]: n }
221
+ }), await i.invalidateQueries({ queryKey: ["params-all"] }), await i.invalidateQueries({ queryKey: [
222
+ "params-carrier-detail",
223
+ e,
224
+ t
225
+ ] }), r?.();
226
+ } catch (e) {
227
+ o(e instanceof Error ? e.message : "Failed to save parameter.");
228
+ }
229
+ }, [
230
+ e,
231
+ t,
232
+ i,
233
+ r
234
+ ]), h = g((e, t) => {
235
+ let n = d.filter((t) => t.param_code !== e.code);
236
+ return n.push({
237
+ param_code: e.code,
238
+ value: t
239
+ }), m(n);
240
+ }, [d, m]), _ = g((e) => m(d.filter((t) => t.param_code !== e.code)), [d, m]), v = g(() => o(null), []);
241
+ return {
242
+ overrides: d,
243
+ overrideByCode: f,
244
+ missingParams: u,
245
+ isLoading: s.isLoading,
246
+ error: a,
247
+ clearError: v,
248
+ save: h,
249
+ reset: _
250
+ };
251
+ }
252
+ function pe(e) {
253
+ return C({
254
+ queryKey: ["params-all", e ?? "full"],
255
+ queryFn: () => de(e),
256
+ staleTime: 30 * 1e3
257
+ });
258
+ }
259
+ function V() {
260
+ return C({
202
261
  queryKey: ["params-public"],
203
- queryFn: le,
262
+ queryFn: ue,
204
263
  staleTime: 300 * 1e3
205
264
  });
206
265
  }
207
- function V(e, t = {}) {
266
+ function me(e, t = {}) {
208
267
  let n = t.enabled ?? !0;
209
- return S({
268
+ return C({
210
269
  queryKey: ["params", e],
211
270
  queryFn: () => z(e),
212
271
  enabled: !!e && n,
@@ -214,7 +273,7 @@ function V(e, t = {}) {
214
273
  });
215
274
  }
216
275
  function H(e) {
217
- let t = c((e) => e.isAuthenticated), n = B(), r = V(e, { enabled: t }), i = ue(n.data?.parameters, e);
276
+ let t = c((e) => e.isAuthenticated), n = V(), r = me(e, { enabled: t }), i = he(n.data?.parameters, e);
218
277
  if (t && r.data?.found) return {
219
278
  value: r.data.value,
220
279
  found: !0,
@@ -231,11 +290,11 @@ function H(e) {
231
290
  error: r.error ?? n.error ?? null
232
291
  };
233
292
  }
234
- function ue(e, t) {
293
+ function he(e, t) {
235
294
  return e?.find((e) => e.code === t);
236
295
  }
237
296
  function U(e, t) {
238
- let n = S({
297
+ let n = C({
239
298
  queryKey: ["params", e],
240
299
  queryFn: () => z(e),
241
300
  enabled: !!e,
@@ -252,13 +311,13 @@ function U(e, t) {
252
311
  //#endregion
253
312
  //#region src/hooks/useBranding.ts
254
313
  function W() {
255
- let e = H(L);
314
+ let e = H(I);
256
315
  return {
257
- branding: oe(e.value),
316
+ branding: L(e.value),
258
317
  isLoading: e.loading
259
318
  };
260
319
  }
261
- function de() {
320
+ function ge() {
262
321
  return W().branding?.identity;
263
322
  }
264
323
  function G() {
@@ -283,7 +342,7 @@ function X(e, t) {
283
342
  let r = { ...e };
284
343
  return delete r[t], r;
285
344
  }
286
- function fe(e, t) {
345
+ function _e(e, t) {
287
346
  let n = e;
288
347
  for (; Object.keys(n).length > 64;) {
289
348
  let e = null, r = Infinity;
@@ -323,7 +382,7 @@ var Z = O((e, t) => ({
323
382
  lastActiveAt: o,
324
383
  queryKeys: []
325
384
  };
326
- e({ entries: fe({
385
+ e({ entries: _e({
327
386
  ...a.entries,
328
387
  [n]: c
329
388
  }, n) });
@@ -347,7 +406,7 @@ var Z = O((e, t) => ({
347
406
  registerQueryKey: (n, r) => {
348
407
  let i = t();
349
408
  if (i.ttlMs <= 0) return;
350
- let a = Date.now(), o = i.entries[n], s = o?.queryKeys.some((e) => pe(e, r));
409
+ let a = Date.now(), o = i.entries[n], s = o?.queryKeys.some((e) => ve(e, r));
351
410
  if (o && s) return;
352
411
  let c = o ? {
353
412
  ...o,
@@ -358,7 +417,7 @@ var Z = O((e, t) => ({
358
417
  lastActiveAt: a,
359
418
  queryKeys: [r]
360
419
  };
361
- e({ entries: fe({
420
+ e({ entries: _e({
362
421
  ...i.entries,
363
422
  [n]: c
364
423
  }, n) });
@@ -380,7 +439,7 @@ var Z = O((e, t) => ({
380
439
  }
381
440
  }
382
441
  }));
383
- function pe(e, t) {
442
+ function ve(e, t) {
384
443
  if (e === t) return !0;
385
444
  try {
386
445
  return JSON.stringify(e) === JSON.stringify(t);
@@ -390,29 +449,29 @@ function pe(e, t) {
390
449
  }
391
450
  //#endregion
392
451
  //#region src/lib/canonical-url.ts
393
- function me(e) {
452
+ function ye(e) {
394
453
  return e.length > 1 && e.endsWith("/") ? e.replace(/\/+$/, "") || "/" : e;
395
454
  }
396
455
  function Q(e) {
397
- let t = me(e.pathname), n = e.search ?? "", r = n.startsWith("?") ? n.slice(1) : n, i = new URLSearchParams(r);
398
- for (let e of l) i.delete(e);
456
+ let t = ye(e.pathname), n = e.search ?? "", r = n.startsWith("?") ? n.slice(1) : n, i = new URLSearchParams(r);
457
+ for (let e of u) i.delete(e);
399
458
  i.sort();
400
459
  let a = i.toString();
401
460
  return a ? `${t}?${a}` : t;
402
461
  }
403
- function he(e) {
404
- return me(e.pathname);
462
+ function be(e) {
463
+ return ye(e.pathname);
405
464
  }
406
465
  //#endregion
407
466
  //#region src/hooks/usePageStateTtl.ts
408
- var ge = "ui_page_state_ttl_ms";
409
- function _e() {
410
- let { value: e } = U(ge, K);
467
+ var xe = "ui_page_state_ttl_ms";
468
+ function Se() {
469
+ let { value: e } = U(xe, K);
411
470
  return typeof e != "number" || !Number.isFinite(e) || e < 0 ? K : e;
412
471
  }
413
472
  //#endregion
414
473
  //#region src/hooks/usePageStateRuntime.ts
415
- var ve = [
474
+ var Ce = [
416
475
  ["entity-data"],
417
476
  ["entity-count"],
418
477
  ["entity-item"],
@@ -420,26 +479,26 @@ var ve = [
420
479
  ["entity-data-all"],
421
480
  ["action-data"],
422
481
  ["action-data-cursor"]
423
- ], ye = 6e4;
424
- function be(e, t) {
425
- for (let n of ve) e.setQueryDefaults(n, { gcTime: t });
426
- }
427
- function xe() {
428
- let e = C(), t = _e(), n = x(), r = y(n);
429
- r.current = n, g(() => (J(e), () => J(null)), [e]), g(() => {
430
- if (Z.getState().setTtl(t), be(e, t), t <= 0) for (let t of ve) e.removeQueries({ queryKey: t });
431
- }, [e, t]), g(() => {
482
+ ], we = 6e4;
483
+ function Te(e, t) {
484
+ for (let n of Ce) e.setQueryDefaults(n, { gcTime: t });
485
+ }
486
+ function Ee() {
487
+ let e = w(), t = Se(), n = S(), r = b(n);
488
+ r.current = n, _(() => (J(e), () => J(null)), [e]), _(() => {
489
+ if (Z.getState().setTtl(t), Te(e, t), t <= 0) for (let t of Ce) e.removeQueries({ queryKey: t });
490
+ }, [e, t]), _(() => {
432
491
  if (t <= 0) return;
433
492
  let e = setInterval(() => {
434
493
  let e = Z.getState(), t = r.current;
435
- e.touch(Q(t)), e.touch(he(t)), e.sweep(Date.now());
436
- }, ye);
494
+ e.touch(Q(t)), e.touch(be(t)), e.sweep(Date.now());
495
+ }, we);
437
496
  return () => clearInterval(e);
438
497
  }, [t]);
439
498
  }
440
- function Se(e, t = !0) {
441
- let n = Q(x());
442
- g(() => {
499
+ function De(e, t = !0) {
500
+ let n = Q(S());
501
+ _(() => {
443
502
  !t || !e || Z.getState().registerQueryKey(n, e);
444
503
  }, [
445
504
  n,
@@ -449,16 +508,16 @@ function Se(e, t = !0) {
449
508
  }
450
509
  //#endregion
451
510
  //#region src/lib/record-documents-key.ts
452
- var Ce = "record-documents";
511
+ var Oe = "record-documents";
453
512
  //#endregion
454
513
  //#region src/hooks/useBrandingChrome.ts
455
- function we() {
514
+ function ke() {
456
515
  let e = t(), n = G();
457
516
  return (e.enabled ? n?.embed?.viewport : n?.full?.viewport) ?? "auto";
458
517
  }
459
- function Te(e) {
518
+ function Ae(e) {
460
519
  let n = t(), r = G();
461
- return v(() => {
520
+ return y(() => {
462
521
  let t = { ...n.enabled ? r?.embed?.surfaces?.[e] : r?.full?.surfaces?.[e] };
463
522
  return {
464
523
  ...t,
@@ -470,9 +529,9 @@ function Te(e) {
470
529
  e
471
530
  ]);
472
531
  }
473
- function Ee() {
532
+ function je() {
474
533
  let e = G();
475
- return v(() => {
534
+ return y(() => {
476
535
  let t = { ...e?.full?.shell };
477
536
  return {
478
537
  ...t,
@@ -482,34 +541,34 @@ function Ee() {
482
541
  }
483
542
  //#endregion
484
543
  //#region src/components/pages/exportRequest.ts
485
- var De = /* @__PURE__ */ new Set(["_select", "_actions"]);
486
- function Oe(e) {
544
+ var Me = /* @__PURE__ */ new Set(["_select", "_actions"]);
545
+ function Ne(e) {
487
546
  let t = {};
488
547
  return e.screenCode && (t.screen = e.screenCode), e.jsonFilters && e.jsonFilters.length > 0 && (t.filters = e.jsonFilters), e.search && (t.search = e.search), e.sort && (t.sort = e.sort), e.includeDeleted && (t.include_deleted = !0), e.page && (t.page = e.page), e.perPage && (t.per_page = e.perPage), t;
489
548
  }
490
- function ke(e, t) {
491
- let n = t.visibleColumns.filter((e) => !De.has(e)), r = {
549
+ function Pe(e, t) {
550
+ let n = t.visibleColumns.filter((e) => !Me.has(e)), r = {
492
551
  format: "csv",
493
552
  scope: t.scope,
494
- query: Oe(e),
553
+ query: Ne(e),
495
554
  columns: n
496
555
  };
497
556
  return t.scope === "selected_rows" && t.selectedRowPKs && t.selectedRowPKs.length > 0 && (r.selection = t.selectedRowPKs), t.locale && (r.locale = t.locale), t.filename && (r.filename = t.filename), r;
498
557
  }
499
558
  //#endregion
500
559
  //#region src/components/pages/DocumentsMenu.tsx
501
- var Ae = "document-templates-available";
502
- function je({ entityCode: t, scope: n, objectIds: a = [], viewState: s, selectedIds: c = [], capability: l, canManageTemplates: d = !1 }) {
503
- let { run: m } = u(), h = y(null), [g, _] = b(!1), x = n === "detail" ? !!l?.generate_one : !!l?.generate_many, C = d && !x, { data: D, isLoading: O, error: k } = S({
504
- queryKey: [Ae, t],
505
- queryFn: async () => (await f("document.templates.available", { entity: t })).result?.templates ?? [],
506
- enabled: g || C,
560
+ var Fe = "document-templates-available";
561
+ function Ie({ entityCode: t, scope: n, objectIds: a = [], viewState: s, selectedIds: c = [], capability: l, canManageTemplates: u = !1 }) {
562
+ let { run: f } = d(), h = b(null), [g, _] = x(!1), v = n === "detail" ? !!l?.generate_one : !!l?.generate_many, S = u && !v, { data: w, isLoading: ee, error: O } = C({
563
+ queryKey: [Fe, t],
564
+ queryFn: async () => (await p("document.templates.available", { entity: t })).result?.templates ?? [],
565
+ enabled: g || S,
507
566
  staleTime: 6e4
508
- }), A = O, j = v(() => (D ?? []).filter((e) => n === "detail" ? e.input_mode === "one" || e.input_mode === "global" : e.input_mode === "many" || e.input_mode === "global"), [n, D]), M = C && j.length > 0, N = x || M;
509
- function P() {
567
+ }), k = ee, A = y(() => (w ?? []).filter((e) => n === "detail" ? e.input_mode === "one" || e.input_mode === "global" : e.input_mode === "many" || e.input_mode === "global"), [n, w]), j = S && A.length > 0, M = v || j;
568
+ function N() {
510
569
  _((e) => !e);
511
570
  }
512
- function F(e) {
571
+ function P(e) {
513
572
  if (e.input_mode === "global") return [{ kind: "global" }];
514
573
  if (n === "detail") return e.input_mode === "one" && a.length === 1 ? [{
515
574
  kind: "one",
@@ -519,7 +578,7 @@ function je({ entityCode: t, scope: n, objectIds: a = [], viewState: s, selected
519
578
  let e = [];
520
579
  return s && e.push({
521
580
  kind: "current_view",
522
- query: Oe(s)
581
+ query: Ne(s)
523
582
  }), c.length > 0 && e.push({
524
583
  kind: "selected",
525
584
  objectIds: c
@@ -527,9 +586,9 @@ function je({ entityCode: t, scope: n, objectIds: a = [], viewState: s, selected
527
586
  }
528
587
  return [];
529
588
  }
530
- function I(e, t, n) {
531
- let r = Me(e), i = p(e.name) || e.code;
532
- _(!1), m({
589
+ function F(e, t, n) {
590
+ let r = Le(e), i = m(e.name) || e.code;
591
+ _(!1), f({
533
592
  action: r,
534
593
  title: i,
535
594
  execute: (r) => {
@@ -541,53 +600,53 @@ function je({ entityCode: t, scope: n, objectIds: a = [], viewState: s, selected
541
600
  return Object.keys(r).length > 0 && (i.params = r), "objectIds" in t && (i.object_ids = t.objectIds), "query" in t && (i.query = {
542
601
  scope: "current_view",
543
602
  query: t.query
544
- }), f("document.generate", i);
603
+ }), p("document.generate", i);
545
604
  }
546
605
  });
547
606
  }
548
- return N ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(i, {
607
+ return M ? /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(i, {
549
608
  ref: h,
550
609
  kind: "ghost",
551
610
  size: "sm",
552
- icon: T(A ? e.loader : e.filePlus, { size: 12 }),
553
- onClick: P,
554
- disabled: A,
611
+ icon: E(k ? e.loader : e.filePlus, { size: 12 }),
612
+ onClick: N,
613
+ disabled: k,
555
614
  children: "Generate"
556
- }), /* @__PURE__ */ E(r, {
615
+ }), /* @__PURE__ */ D(r, {
557
616
  open: g,
558
617
  anchor: h.current,
559
618
  onClose: () => _(!1),
560
619
  align: "end",
561
620
  width: 300,
562
621
  children: [
563
- A && /* @__PURE__ */ T(o, {
622
+ k && /* @__PURE__ */ E(o, {
564
623
  disabled: !0,
565
- icon: /* @__PURE__ */ T(e.loader, { size: 12 }),
624
+ icon: /* @__PURE__ */ E(e.loader, { size: 12 }),
566
625
  children: "Loading templates..."
567
626
  }),
568
- k && /* @__PURE__ */ T(o, {
627
+ O && /* @__PURE__ */ E(o, {
569
628
  disabled: !0,
570
- icon: /* @__PURE__ */ T(e.warning, { size: 12 }),
571
- children: k instanceof Error ? k.message : String(k)
629
+ icon: /* @__PURE__ */ E(e.warning, { size: 12 }),
630
+ children: O instanceof Error ? O.message : String(O)
572
631
  }),
573
- !A && !k && j.length === 0 && /* @__PURE__ */ T(o, {
632
+ !k && !O && A.length === 0 && /* @__PURE__ */ E(o, {
574
633
  disabled: !0,
575
- icon: /* @__PURE__ */ T(e.file, { size: 12 }),
634
+ icon: /* @__PURE__ */ E(e.file, { size: 12 }),
576
635
  children: "No document templates"
577
636
  }),
578
- !A && !k && j.map((t) => {
579
- let n = F(t);
580
- return n.length === 0 ? null : Ne(t).flatMap((r) => n.map((n) => r.available ? /* @__PURE__ */ T(o, {
581
- icon: /* @__PURE__ */ T(e.file, { size: 12 }),
582
- onClick: () => I(t, n, r.format),
583
- title: p(t.description),
584
- children: Pe(t, n, r.format)
585
- }, `${t.source}:${t.code}:${n.kind}:${r.format}`) : /* @__PURE__ */ E(o, {
637
+ !k && !O && A.map((t) => {
638
+ let n = P(t);
639
+ return n.length === 0 ? null : Re(t).flatMap((r) => n.map((n) => r.available ? /* @__PURE__ */ E(o, {
640
+ icon: /* @__PURE__ */ E(e.file, { size: 12 }),
641
+ onClick: () => F(t, n, r.format),
642
+ title: m(t.description),
643
+ children: ze(t, n, r.format)
644
+ }, `${t.source}:${t.code}:${n.kind}:${r.format}`) : /* @__PURE__ */ D(o, {
586
645
  disabled: !0,
587
- icon: /* @__PURE__ */ T(e.file, { size: 12 }),
646
+ icon: /* @__PURE__ */ E(e.file, { size: 12 }),
588
647
  title: r.disabled_reason,
589
648
  children: [
590
- Pe(t, n, r.format),
649
+ ze(t, n, r.format),
591
650
  " - ",
592
651
  r.disabled_reason || "Unavailable"
593
652
  ]
@@ -596,8 +655,8 @@ function je({ entityCode: t, scope: n, objectIds: a = [], viewState: s, selected
596
655
  ]
597
656
  })] }) : null;
598
657
  }
599
- function Me(e) {
600
- let t = new m((e.params ?? []).map((e) => ({
658
+ function Le(e) {
659
+ let t = new h((e.params ?? []).map((e) => ({
601
660
  ...e,
602
661
  name: e.name ?? ""
603
662
  })));
@@ -611,14 +670,14 @@ function Me(e) {
611
670
  resolved_params: t
612
671
  };
613
672
  }
614
- function Ne(e) {
673
+ function Re(e) {
615
674
  return e.outputs && e.outputs.length > 0 ? e.outputs : (e.allowed_outputs && e.allowed_outputs.length > 0 ? e.allowed_outputs : [e.output_format || "xlsx"]).map((e) => ({
616
675
  format: e,
617
676
  available: !0
618
677
  }));
619
678
  }
620
- function Pe(e, t, n) {
621
- let r = p(e.name) || e.code, i = n ? ` (${n.toUpperCase()})` : "";
679
+ function ze(e, t, n) {
680
+ let r = m(e.name) || e.code, i = n ? ` (${n.toUpperCase()})` : "";
622
681
  switch (t.kind) {
623
682
  case "one": return `${r}${i}`;
624
683
  case "selected": return `${r}${i} - selected rows`;
@@ -628,16 +687,16 @@ function Pe(e, t, n) {
628
687
  }
629
688
  //#endregion
630
689
  //#region src/lib/document-templates.ts
631
- function Fe(e) {
690
+ function Be(e) {
632
691
  return !!e?.entities?.document_template;
633
692
  }
634
693
  //#endregion
635
694
  //#region src/lib/scroll-restoration.ts
636
- var Ie = "scroll", Le = 120, Re = 24, ze = 600;
637
- function Be(e, t) {
695
+ var Ve = "scroll", He = 120, Ue = 24, We = 600;
696
+ function Ge(e, t) {
638
697
  return Number.isFinite(e) ? Math.max(0, Math.min(e, Number.isFinite(t) && t > 0 ? t : 0)) : 0;
639
698
  }
640
- function Ve(e, t, n) {
699
+ function Ke(e, t, n) {
641
700
  let r = Number.isFinite(e) ? e : 0;
642
701
  if (t) {
643
702
  let e = n[t.index];
@@ -653,33 +712,33 @@ function Ve(e, t, n) {
653
712
  offset: r
654
713
  };
655
714
  }
656
- function He(e, t, n, r) {
715
+ function qe(e, t, n, r) {
657
716
  if (!e) return null;
658
717
  if (e.key) {
659
718
  let i = t.indexOf(e.key);
660
719
  if (i >= 0) {
661
720
  let t = n(i);
662
- if (t !== void 0) return Be(t + e.delta, r);
721
+ if (t !== void 0) return Ge(t + e.delta, r);
663
722
  }
664
723
  }
665
- return Be(e.offset, r);
724
+ return Ge(e.offset, r);
666
725
  }
667
- function Ue(e = Ie) {
668
- let t = x(), n = y(null);
726
+ function Je(e = Ve) {
727
+ let t = S(), n = b(null);
669
728
  if (n.current === null) {
670
729
  let r = Q(t), i = Z.getState().read(r, e);
671
730
  n.current = i && Number.isFinite(i.offset) ? Math.max(0, i.offset) : 0;
672
731
  }
673
732
  return n.current;
674
733
  }
675
- function We(e) {
734
+ function Ye(e) {
676
735
  let t = 0, n = null, r = () => {
677
736
  n = null, t = Date.now(), e();
678
737
  };
679
738
  return {
680
739
  trigger() {
681
740
  let e = Date.now() - t;
682
- e >= Le ? r() : n === null && (n = setTimeout(r, Le - e));
741
+ e >= He ? r() : n === null && (n = setTimeout(r, He - e));
683
742
  },
684
743
  flush() {
685
744
  n !== null && (clearTimeout(n), n = null), e();
@@ -689,15 +748,15 @@ function We(e) {
689
748
  }
690
749
  };
691
750
  }
692
- function Ge(e) {
693
- let { virtualizer: t, scrollElementRef: n, rowKeys: r } = e, i = e.stateKey ?? "scroll", a = e.enabled ?? !0, o = Q(x()), s = y(t);
751
+ function Xe(e) {
752
+ let { virtualizer: t, scrollElementRef: n, rowKeys: r } = e, i = e.stateKey ?? "scroll", a = e.enabled ?? !0, o = Q(S()), s = b(t);
694
753
  s.current = t;
695
- let c = y(r);
754
+ let c = b(r);
696
755
  c.current = r;
697
- let l = y(null);
698
- g(() => {
756
+ let l = b(null);
757
+ _(() => {
699
758
  l.current !== o && (l.current = null);
700
- }, [o]), g(() => {
759
+ }, [o]), _(() => {
701
760
  if (!a) return;
702
761
  let e = s.current;
703
762
  if (!e || r.length === 0) return;
@@ -712,11 +771,11 @@ function Ge(e) {
712
771
  let u = 0, d = 0, f = NaN, p = () => {
713
772
  let e = s.current;
714
773
  if (!e) return;
715
- let n = He(t, c.current, (t) => e.getOffsetForIndex(t, "start")?.[0], e.getTotalSize());
774
+ let n = qe(t, c.current, (t) => e.getOffsetForIndex(t, "start")?.[0], e.getTotalSize());
716
775
  n !== null && (Number.isNaN(f) || Math.abs(n - f) > 1) && (e.scrollToOffset(n, {
717
776
  align: "start",
718
777
  behavior: "auto"
719
- }), f = n, d++ < Re && (u = requestAnimationFrame(p)));
778
+ }), f = n, d++ < Ue && (u = requestAnimationFrame(p)));
720
779
  };
721
780
  return p(), () => {
722
781
  u && cancelAnimationFrame(u);
@@ -726,18 +785,18 @@ function Ge(e) {
726
785
  o,
727
786
  r,
728
787
  i
729
- ]), Ke(n, a, o, i, (e) => {
788
+ ]), Ze(n, a, o, i, (e) => {
730
789
  let t = s.current;
731
790
  if (!t) return null;
732
791
  let n = e.scrollTop, r = n > 0 ? n : t.scrollOffset ?? 0;
733
- return Ve(r, t.getVirtualItemForOffset(r), c.current);
792
+ return Ke(r, t.getVirtualItemForOffset(r), c.current);
734
793
  });
735
794
  }
736
- function Ke(e, t, n, r, i) {
737
- let a = y(i);
738
- a.current = i, g(() => {
795
+ function Ze(e, t, n, r, i) {
796
+ let a = b(i);
797
+ a.current = i, _(() => {
739
798
  if (!t) return;
740
- let i = 0, o = ze, s = null, c = null, l = (e) => {
799
+ let i = 0, o = We, s = null, c = null, l = (e) => {
741
800
  let t = a.current(e);
742
801
  t && Z.getState().set(n, r, t);
743
802
  }, u = () => c?.trigger(), d = () => {
@@ -746,7 +805,7 @@ function Ke(e, t, n, r, i) {
746
805
  o-- > 0 && (i = requestAnimationFrame(d));
747
806
  return;
748
807
  }
749
- s = t, c = We(() => l(t)), t.addEventListener("scroll", u, { passive: !0 });
808
+ s = t, c = Ye(() => l(t)), t.addEventListener("scroll", u, { passive: !0 });
750
809
  };
751
810
  return d(), () => {
752
811
  i && cancelAnimationFrame(i), s && s.removeEventListener("scroll", u), c?.flush();
@@ -758,11 +817,11 @@ function Ke(e, t, n, r, i) {
758
817
  r
759
818
  ]);
760
819
  }
761
- function qe(e) {
762
- let { scrollElementRef: t } = e, n = e.stateKey ?? "scroll", r = e.enabled ?? !0, i = Q(x()), a = y(null);
763
- g(() => {
820
+ function Qe(e) {
821
+ let { scrollElementRef: t } = e, n = e.stateKey ?? "scroll", r = e.enabled ?? !0, i = Q(S()), a = b(null);
822
+ _(() => {
764
823
  if (!r || a.current === i) return;
765
- let e = 0, o = ze, s = () => {
824
+ let e = 0, o = We, s = () => {
766
825
  let r = t.current;
767
826
  if (!r) {
768
827
  o-- > 0 && (e = requestAnimationFrame(s));
@@ -780,7 +839,7 @@ function qe(e) {
780
839
  i,
781
840
  n,
782
841
  t
783
- ]), Ke(t, r, i, n, (e) => ({
842
+ ]), Ze(t, r, i, n, (e) => ({
784
843
  key: "",
785
844
  delta: 0,
786
845
  offset: e.scrollTop
@@ -789,40 +848,63 @@ function qe(e) {
789
848
  //#endregion
790
849
  //#region src/components/list/peekDraftStore.ts
791
850
  var $ = /* @__PURE__ */ new Map();
792
- function Je(e, t) {
851
+ function $e(e, t) {
793
852
  $.set(e, t);
794
853
  }
795
- function Ye(e) {
854
+ function et(e) {
796
855
  let t = $.get(e);
797
856
  return t === void 0 ? null : ($.delete(e), t);
798
857
  }
799
- function Xe(e) {
858
+ function tt(e) {
800
859
  $.delete(e);
801
860
  }
802
861
  //#endregion
862
+ //#region src/lib/evidence-verdict.ts
863
+ var nt = {
864
+ verified: "Verified",
865
+ unverified: "Not yet verified",
866
+ tampered: "Tampered",
867
+ erased: "Lawfully erased",
868
+ indeterminate: "Cannot verify",
869
+ outside_coverage: "Outside coverage"
870
+ }, rt = {
871
+ verified: "emerald",
872
+ unverified: "slate",
873
+ tampered: "rose",
874
+ erased: "slate",
875
+ indeterminate: "amber",
876
+ outside_coverage: "slate"
877
+ };
878
+ function it(e) {
879
+ return nt[e] ?? e;
880
+ }
881
+ function at(e) {
882
+ return rt[e] ?? "slate";
883
+ }
884
+ //#endregion
803
885
  //#region src/components/shared/RefreshControl.tsx
804
- function Ze({ liveObject: t, realtime: r = !0 }) {
805
- return /* @__PURE__ */ E("span", {
886
+ function ot({ liveObject: t, realtime: r = !0 }) {
887
+ return /* @__PURE__ */ D("span", {
806
888
  style: {
807
889
  display: "inline-flex",
808
890
  alignItems: "center",
809
891
  gap: 8
810
892
  },
811
- children: [/* @__PURE__ */ T(n, {
812
- icon: t.isFetching ? /* @__PURE__ */ T("span", {
893
+ children: [/* @__PURE__ */ E(n, {
894
+ icon: t.isFetching ? /* @__PURE__ */ E("span", {
813
895
  "data-testid": "refresh-spinner",
814
896
  style: { display: "inline-flex" },
815
- children: /* @__PURE__ */ T(a, { size: 14 })
816
- }) : /* @__PURE__ */ T(e.refresh, { size: 14 }),
897
+ children: /* @__PURE__ */ E(a, { size: 14 })
898
+ }) : /* @__PURE__ */ E(e.refresh, { size: 14 }),
817
899
  title: "Refresh",
818
900
  disabled: t.isLoading || t.isFetching,
819
901
  onClick: () => {
820
902
  t.refetch();
821
903
  }
822
- }), r && /* @__PURE__ */ T("span", {
904
+ }), r && /* @__PURE__ */ E("span", {
823
905
  "data-testid": "live-indicator",
824
906
  title: t.isLive ? "This view updates automatically in realtime." : "Realtime updates are paused. Refresh manually to load the latest data.",
825
- children: /* @__PURE__ */ T(s, {
907
+ children: /* @__PURE__ */ E(s, {
826
908
  tone: t.isLive ? "emerald" : "amber",
827
909
  size: "xs",
828
910
  dot: !0,
@@ -832,4 +914,4 @@ function Ze({ liveObject: t, realtime: r = !0 }) {
832
914
  });
833
915
  }
834
916
  //#endregion
835
- export { V as A, K as C, H as D, de as E, I as F, k as I, ce as M, re as N, U as O, ee as P, Q as S, W as T, xe as _, Ie as a, _e as b, Ge as c, ke as d, Te as f, be as g, Ce as h, Ye as i, se as j, B as k, Fe as l, we as m, Xe as n, qe as o, Ee as p, Je as r, Ue as s, Ze as t, je as u, Se as v, Z as w, he as x, ge as y };
917
+ export { fe as A, F as B, be as C, W as D, Z as E, ce as F, le as I, ae as L, U as M, V as N, ge as O, me as P, ne as R, Se as S, K as T, k as V, Oe as _, $e as a, De as b, Qe as c, Be as d, Ie as f, ke as g, je as h, tt as i, H as j, pe as k, Je as l, Ae as m, it as n, et as o, Pe as p, at as r, Ve as s, ot as t, Xe as u, Te as v, Q as w, xe as x, Ee as y, te as z };