@declarion/react 0.57.0 → 0.59.2

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 (166) hide show
  1. package/README.md +0 -2
  2. package/dist-lib/AgentChatPanel.impl-DBH1Ff4G.js +1200 -0
  3. package/dist-lib/DetailAuditStrip-9eJM2Fml.js +288 -0
  4. package/dist-lib/{DraggableChildrenTable-BV5sb8Uo.js → DraggableChildrenTable-4RZC351U.js} +87 -86
  5. package/dist-lib/Grid-CQabaBLx.js +405 -0
  6. package/dist-lib/{LayoutRenderer-C9AH9cXf.js → LayoutRenderer-DGKWZKpW.js} +1000 -1114
  7. package/dist-lib/{ListCardsBody-DXcDg536.js → ListCardsBody-DfGmyNIu.js} +84 -84
  8. package/dist-lib/MarkdownRenderer-BDbzDv_y.js +87 -0
  9. package/dist-lib/{RefreshControl-CNtN8zSl.js → RefreshControl-Bhoib0ZA.js} +126 -155
  10. package/dist-lib/SmartDetailPage.impl-DFjz29Ff.js +1565 -0
  11. package/dist-lib/SmartListPage.impl-BrZLE_Gb.js +3046 -0
  12. package/dist-lib/{SmartRecordListPage.impl-Bkl9aZJ8.js → SmartRecordListPage.impl-C1FJLr80.js} +281 -280
  13. package/dist-lib/SortHeaderMenu-Cijxk4cX.js +107 -0
  14. package/dist-lib/action-dispatch-DY0c8U81.js +1967 -0
  15. package/dist-lib/api/client.d.ts +5 -0
  16. package/dist-lib/api/data.d.ts +2 -4
  17. package/dist-lib/api/entities.d.ts +8 -15
  18. package/dist-lib/api/events.d.ts +3 -3
  19. package/dist-lib/cardProjection-Bkl2SSYz.js +499 -0
  20. package/dist-lib/components/actions/ResponsiveActionBar.d.ts +17 -16
  21. package/dist-lib/components/agents/AgentChatPanel.d.ts +3 -13
  22. package/dist-lib/components/agents/AgentChatPanel.impl.d.ts +14 -0
  23. package/dist-lib/components/agents/AgentPicker.d.ts +1 -2
  24. package/dist-lib/components/chrome/PageShell.d.ts +7 -0
  25. package/dist-lib/components/chrome/RecordHeader.d.ts +1 -2
  26. package/dist-lib/components/chrome/headerActionZone.d.ts +27 -0
  27. package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +1 -2
  28. package/dist-lib/components/detail-layout/DetailHighlights.d.ts +1 -2
  29. package/dist-lib/components/detail-layout/blockMeta.d.ts +2 -1
  30. package/dist-lib/components/fields/BoolField.d.ts +1 -1
  31. package/dist-lib/components/fields/EnumField.d.ts +1 -1
  32. package/dist-lib/components/fields/IntArrayField.d.ts +1 -1
  33. package/dist-lib/components/fields/MultilangArrayField.d.ts +2 -0
  34. package/dist-lib/components/fields/MultilangField.d.ts +1 -1
  35. package/dist-lib/components/fields/MultilangTextField.d.ts +1 -1
  36. package/dist-lib/components/fields/NumberField.d.ts +1 -1
  37. package/dist-lib/components/fields/PasswordField.d.ts +1 -1
  38. package/dist-lib/components/fields/RefCombobox.d.ts +1 -1
  39. package/dist-lib/components/fields/SecretField.d.ts +1 -1
  40. package/dist-lib/components/fields/StringArrayField.d.ts +1 -1
  41. package/dist-lib/components/fields/TimestampField.d.ts +1 -1
  42. package/dist-lib/components/fields/cells/registry.d.ts +2 -1
  43. package/dist-lib/components/fields/index.d.ts +2 -1
  44. package/dist-lib/components/fields/langMap.d.ts +2 -0
  45. package/dist-lib/components/fields/secretValue.d.ts +2 -0
  46. package/dist-lib/components/file-widgets/UnknownFileWidget.d.ts +3 -0
  47. package/dist-lib/components/file-widgets/UploadFailureText.d.ts +4 -0
  48. package/dist-lib/components/file-widgets/helpers.d.ts +1 -1
  49. package/dist-lib/components/file-widgets/host.d.ts +4 -3
  50. package/dist-lib/components/file-widgets/types.d.ts +1 -0
  51. package/dist-lib/components/file-widgets/upload.d.ts +18 -3
  52. package/dist-lib/components/filters/filter-op-label.d.ts +3 -0
  53. package/dist-lib/components/layout/ImpersonationBanner.d.ts +1 -1
  54. package/dist-lib/components/layout/ImpersonationFrame.d.ts +1 -1
  55. package/dist-lib/components/layout/Layout.d.ts +2 -1
  56. package/dist-lib/components/layout/Sidebar.d.ts +2 -1
  57. package/dist-lib/components/layout/TenantChip.d.ts +1 -1
  58. package/dist-lib/components/list/ViewSwitcher.d.ts +4 -2
  59. package/dist-lib/components/pages/DocumentsMenu.d.ts +1 -2
  60. package/dist-lib/components/pages/ExportMenu.d.ts +3 -5
  61. package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +1 -2
  62. package/dist-lib/components/pages/auth/AuthShell.d.ts +4 -31
  63. package/dist-lib/components/pages/exportRequest.d.ts +4 -6
  64. package/dist-lib/components/pages/list/DeleteViewDialog.d.ts +8 -0
  65. package/dist-lib/components/pages/list/ListCardRow.d.ts +1 -2
  66. package/dist-lib/components/pages/list/ListCardsBody.d.ts +0 -1
  67. package/dist-lib/components/pages/list/ListFloatbar.d.ts +2 -2
  68. package/dist-lib/components/pages/list/ListHeader.d.ts +2 -2
  69. package/dist-lib/components/pages/list/ListNoRows.d.ts +4 -5
  70. package/dist-lib/components/pages/list/ListToolbar.d.ts +3 -2
  71. package/dist-lib/components/pages/list/ListUrlBanner.d.ts +10 -0
  72. package/dist-lib/components/pages/list/RowActionsCell.d.ts +2 -4
  73. package/dist-lib/components/pages/list/RowContextMenu.d.ts +1 -2
  74. package/dist-lib/components/pages/list/columns.d.ts +2 -1
  75. package/dist-lib/components/pages/list/filter-meta.d.ts +2 -1
  76. package/dist-lib/components/pages/list/useActiveView.d.ts +38 -0
  77. package/dist-lib/components/pages/list/useListColumnLayout.d.ts +6 -5
  78. package/dist-lib/components/pages/list/useListQuery.d.ts +4 -4
  79. package/dist-lib/components/pages/list/useListSort.d.ts +5 -4
  80. package/dist-lib/components/pages/list/useListViews.d.ts +18 -8
  81. package/dist-lib/components/pages/list/useRowMenu.d.ts +2 -3
  82. package/dist-lib/components/pages/profile/Profile.d.ts +3 -0
  83. package/dist-lib/components/params/ParamsBlock.d.ts +1 -13
  84. package/dist-lib/components/params/param-editors.d.ts +3 -11
  85. package/dist-lib/components/primitives/ClassifiedFieldLocked.d.ts +1 -2
  86. package/dist-lib/components/shared/DynamicIcon.d.ts +2 -2
  87. package/dist-lib/components/shared/LoadingSkeleton.d.ts +1 -0
  88. package/dist-lib/components/shared/LucideIcon.d.ts +1 -1
  89. package/dist-lib/components/shared/useOwnRefresh.d.ts +1 -1
  90. package/dist-lib/declarion-react.css +1 -1
  91. package/dist-lib/embed/theme.d.ts +1 -1
  92. package/dist-lib/embed/useEmbedNavigate.d.ts +1 -1
  93. package/dist-lib/failure-v-uGSpbX.js +158 -0
  94. package/dist-lib/{field-classification-D6xQYn-h.js → field-classification-C28XE-_P.js} +514 -307
  95. package/dist-lib/format-count-DA4wmmWR.js +1771 -0
  96. package/dist-lib/hooks/useEntityData.d.ts +1 -1
  97. package/dist-lib/hooks/useFilters.d.ts +7 -5
  98. package/dist-lib/hooks/useLanguage.d.ts +4 -0
  99. package/dist-lib/hooks/useParams.d.ts +4 -51
  100. package/dist-lib/hooks/useRegisterScreenTab.d.ts +1 -1
  101. package/dist-lib/hooks/useSSE.d.ts +3 -3
  102. package/dist-lib/hooks/useTabTitle.d.ts +2 -0
  103. package/dist-lib/hooks/useText.d.ts +3 -3
  104. package/dist-lib/hooks/useVersionWatcher.d.ts +1 -1
  105. package/dist-lib/hooks/useViews.d.ts +20 -0
  106. package/dist-lib/index.d.ts +8 -7
  107. package/dist-lib/index.js +2716 -5803
  108. package/dist-lib/lib/action-dispatch.d.ts +2 -1
  109. package/dist-lib/lib/actions.d.ts +30 -42
  110. package/dist-lib/lib/anchor.d.ts +3 -4
  111. package/dist-lib/lib/decimal-text.d.ts +1 -0
  112. package/dist-lib/lib/document-templates.d.ts +1 -2
  113. package/dist-lib/lib/download.d.ts +2 -1
  114. package/dist-lib/lib/evidence-verdict.d.ts +2 -1
  115. package/dist-lib/lib/failure.d.ts +2 -0
  116. package/dist-lib/lib/field-classification.d.ts +3 -3
  117. package/dist-lib/lib/filters.d.ts +18 -2
  118. package/dist-lib/lib/format-count.d.ts +8 -7
  119. package/dist-lib/lib/language.d.ts +19 -0
  120. package/dist-lib/lib/mass-edit.d.ts +2 -1
  121. package/dist-lib/lib/realtime-query-keys.d.ts +1 -1
  122. package/dist-lib/lib/realtime-reconcile.d.ts +3 -4
  123. package/dist-lib/lib/screen-back.d.ts +4 -6
  124. package/dist-lib/lib/sort.d.ts +9 -9
  125. package/dist-lib/lib/timestamp.d.ts +5 -7
  126. package/dist-lib/lib/ui-actions.d.ts +2 -1
  127. package/dist-lib/peekDraftStore-D-cTbiIr.js +199 -0
  128. package/dist-lib/registry-Cb3W-czW.js +1950 -0
  129. package/dist-lib/safe-url-oSJw5pzO.js +34 -0
  130. package/dist-lib/stores/icon-registry.d.ts +2 -2
  131. package/dist-lib/stores/list-layout.d.ts +3 -4
  132. package/dist-lib/stores/realtime.d.ts +1 -1
  133. package/dist-lib/stores/tabs.d.ts +3 -2
  134. package/dist-lib/testing.d.ts +6 -0
  135. package/dist-lib/testing.js +98 -76
  136. package/dist-lib/types/api.d.ts +7 -8
  137. package/dist-lib/types/fieldType.d.ts +1 -1
  138. package/dist-lib/types/files.d.ts +4 -4
  139. package/dist-lib/types/schema.d.ts +44 -50
  140. package/dist-lib/useAgentConversation-D97IqE-J.js +623 -0
  141. package/dist-lib/{useCurrentScreen-CzwzQpoW.js → useCurrentScreen-BL5NZFCw.js} +2777 -3768
  142. package/dist-lib/useListQuery-BG1GyKtJ.js +103 -0
  143. package/dist-lib/useProperties-4Lg3odrt.js +83 -0
  144. package/dist-lib/{useTabSearchMirror-C39U85cg.js → useTabSearchMirror-ZVLlINBX.js} +49 -51
  145. package/dist-lib/useText-BFDCTUSo.js +952 -0
  146. package/dist-lib/{value-Bo8C8WMU.js → value-By1-WJ8J.js} +74 -76
  147. package/dist-lib/vite/fingerprint-plugin.d.ts +2 -3
  148. package/package.json +9 -9
  149. package/dist-lib/Grid-DWgUPuZ3.js +0 -404
  150. package/dist-lib/MarkdownRenderer-CcSFc2N3.js +0 -85
  151. package/dist-lib/RecordIdBadge-CGxPR-8q.js +0 -24
  152. package/dist-lib/SmartDetailPage.impl-lskCd-WG.js +0 -1846
  153. package/dist-lib/SmartListPage.impl-CrGbdzyK.js +0 -2854
  154. package/dist-lib/SortHeaderMenu-SYSAaqQJ.js +0 -106
  155. package/dist-lib/action-dispatch-CR4ajBtT.js +0 -1985
  156. package/dist-lib/cardProjection-CW5RIMko.js +0 -699
  157. package/dist-lib/components/pages/home/HomeStub.d.ts +0 -6
  158. package/dist-lib/components/pages/jobs/Jobs.d.ts +0 -1
  159. package/dist-lib/components/pages/pipeline/Pipeline.d.ts +0 -1
  160. package/dist-lib/format-count-Dobmi-Ji.js +0 -1551
  161. package/dist-lib/hooks/useUserLocale.d.ts +0 -1
  162. package/dist-lib/lib/messages.d.ts +0 -12
  163. package/dist-lib/peekDraftStore-5wQ7lq_V.js +0 -194
  164. package/dist-lib/registry-CjgUaF7C.js +0 -1768
  165. package/dist-lib/useListQuery-D7Hr5WM1.js +0 -96
  166. package/dist-lib/useProperties-CqtCzFCr.js +0 -81
@@ -1,176 +1,178 @@
1
1
  import { s as e } from "./DynamicIcon-DW5krHuX.js";
2
- import { $n as t, Br as n, Cr as r, Er as i, Mr as a, Or as o, Vr as s, Zn as c, _t as l, at as u, dr as d, er as f, et as p, jt as m, mr as ee, nr as h, rt as g, un as _, v as te } from "./useCurrentScreen-CzwzQpoW.js";
3
- import { a as v } from "./registry-CjgUaF7C.js";
4
- import { T as ne, l as re, p as y } from "./field-classification-D6xQYn-h.js";
5
- import { f as b, h as x, p as S, u as ie } from "./action-dispatch-CR4ajBtT.js";
6
- import { a as C, c as w, n as T, s as E, t as D } from "./cardProjection-CW5RIMko.js";
7
- import { n as ae, r as O } from "./useProperties-CqtCzFCr.js";
8
- import { c as k, f as A, h as j, m as M, n as oe, t as se } from "./useTabSearchMirror-C39U85cg.js";
9
- import { t as N } from "./LayoutRenderer-C9AH9cXf.js";
10
- import { t as P } from "./useListQuery-D7Hr5WM1.js";
11
- import { useCallback as F, useEffect as I, useMemo as L, useRef as R, useState as z } from "react";
12
- import { useSearchParams as ce } from "react-router";
2
+ import { Ln as t, On as n, Rn as r, St as i, Zt as a, _n as o, ct as s, en as c, hn as l, jn as u, nn as d, on as f, ot as p, v as ee, vn as m } from "./useCurrentScreen-BL5NZFCw.js";
3
+ import { d as h, f as g, t as _ } from "./useText-BFDCTUSo.js";
4
+ import { c as v } from "./registry-Cb3W-czW.js";
5
+ import { A as te, O as y, g as b, h as ne, k as x, l as re } from "./field-classification-C28XE-_P.js";
6
+ import { f as S, h as C, p as w, u as ie } from "./action-dispatch-DY0c8U81.js";
7
+ import { n as T, r as E } from "./useProperties-4Lg3odrt.js";
8
+ import { c as ae, f as D, h as O, m as k, n as A, t as j } from "./useTabSearchMirror-ZVLlINBX.js";
9
+ import { t as M } from "./LayoutRenderer-DGKWZKpW.js";
10
+ import { n as N, t as P } from "./cardProjection-Bkl2SSYz.js";
11
+ import { t as F } from "./useListQuery-BG1GyKtJ.js";
12
+ import { useCallback as I, useEffect as L, useMemo as R, useRef as z, useState as oe } from "react";
13
+ import { useSearchParams as se } from "react-router";
13
14
  import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
14
15
  //#region src/components/pages/SmartRecordListPage.impl.tsx
15
- var le = 200;
16
- function U({ screenCode: o }) {
17
- let [s, c] = ce(), { data: u } = _(), d = a(), f = u?.screens[o], p = f?.entity ? u?.entities[f.entity] : void 0, m = f?.entity;
18
- oe(f, p, s.toString()), se(f?.route);
19
- let g = re(), v = s.get("selected") ?? null, y = s.get("search") ?? "", b = l(y, 300), x = s.get("sort") ?? f?.sort_default ?? "", S = L(() => A(s), [s]), ie = S.filters.length > 0 ? S.filters : void 0, C = L(() => f?.columns ?? p?.fields.names().filter((e) => !p.fields.get(e)?.primary && !p.fields.get(e)?.auto && p.fields.get(e)?.display?.is_listable !== !1).slice(0, 4) ?? [], [f?.columns, p]), w = L(() => {
20
- let e = f?.responsive?.[d.category]?.presentation;
21
- return d.category === "phone" ? "drilldown" : e === "split" || e === "drilldown" || e === "stacked" ? e : "split";
22
- }, [f?.responsive, d.category]), E = L(() => {
23
- let e = f?.responsive?.[d.category];
24
- return e?.list?.presentation === "table" || e?.list?.presentation === "cards" ? e.list.presentation : e?.presentation === "table" || e?.presentation === "cards" ? e.presentation : d.category === "phone" ? "cards" : "table";
25
- }, [f?.responsive, d.category]), ae = f?.responsive?.[d.category]?.layout?.related_records, O = L(() => D({
26
- entity: p,
27
- screen: f
28
- }), [p, f]), N = L(() => T({
29
- entity: p,
30
- screen: f,
31
- presentation: E,
32
- visibleColumns: C,
33
- card: O,
34
- sort: x
16
+ var ce = 200, le = "items:";
17
+ function U({ screenCode: n }) {
18
+ let r = _(), s = _("errors"), [l, d] = se(), { data: p } = g(), m = f(), h = p?.screens[n], v = h?.entity ? p?.entities[h.entity] : void 0, y = h?.entity;
19
+ A(h, v, l.toString()), j(h?.route);
20
+ let ne = b(), x = l.get("selected") ?? null, re = l.get("search") ?? "", S = i(re, 300), C = l.get("sort") ?? h?.sort_default ?? "", w = R(() => D(l), [l]), ie = w.filters.length > 0 ? w.filters : void 0, T = R(() => h?.columns ?? v?.fields.names().filter((e) => !v.fields.get(e)?.primary && !v.fields.get(e)?.auto && v.fields.get(e)?.display?.is_listable !== !1).slice(0, 4) ?? [], [h?.columns, v]), E = R(() => {
21
+ let e = h?.responsive?.[m.category]?.presentation;
22
+ return m.category === "phone" ? "drilldown" : e === "split" || e === "drilldown" || e === "stacked" ? e : "split";
23
+ }, [h?.responsive, m.category]), M = R(() => {
24
+ let e = h?.responsive?.[m.category];
25
+ return e?.list?.presentation === "table" || e?.list?.presentation === "cards" ? e.list.presentation : e?.presentation === "table" || e?.presentation === "cards" ? e.presentation : m.category === "phone" ? "cards" : "table";
26
+ }, [h?.responsive, m.category]), le = h?.responsive?.[m.category]?.layout?.related_records, U = R(() => P({
27
+ entity: v,
28
+ screen: h
29
+ }), [v, h]), W = R(() => N({
30
+ entity: v,
31
+ screen: h,
32
+ presentation: M,
33
+ visibleColumns: T,
34
+ card: U,
35
+ sort: C
35
36
  }), [
36
- p,
37
- f,
38
- E,
39
- C,
40
- O,
41
- x
42
- ]), U = P({
43
- entity: p,
44
- entityCode: m,
45
- screen: f,
46
- screenCode: o,
37
+ v,
38
+ h,
39
+ M,
40
+ T,
41
+ U,
42
+ C
43
+ ]), G = F({
44
+ entity: v,
45
+ entityCode: y,
46
+ screen: h,
47
+ screenCode: n,
47
48
  page: 1,
48
- perPage: le,
49
- sortForRequest: te(x),
50
- debouncedSearch: b,
51
- filters: S.filters,
52
- filterError: !!S.error,
49
+ perPage: ce,
50
+ sortForRequest: ee(C),
51
+ debouncedSearch: S,
52
+ filters: w.filters,
53
53
  includeDeleted: !1,
54
- expand: N.expandFields,
55
- select: N.selectFields,
54
+ expand: W.expandFields,
55
+ select: W.selectFields,
56
+ isHeld: !1,
57
+ retryHeld: () => void 0,
56
58
  runCountQuery: !1,
57
- urlKey: `${m ?? ""}|${s.toString()}`
58
- }), W = U.rows, G = U.refs, K = U.isLoading, q = L(() => p?.fields.names().find((e) => p.fields.get(e)?.primary) ?? "id", [p]), J = F((e, t) => {
59
- c((t) => {
59
+ urlKey: `${y ?? ""}|${l.toString()}`
60
+ }), K = G.rows, q = G.refs, J = G.isLoading, fe = R(() => v?.fields.names().find((e) => v.fields.get(e)?.primary) ?? "id", [v]), pe = I((e, t) => {
61
+ d((t) => {
60
62
  let n = new URLSearchParams(t);
61
63
  return e ? n.set("selected", e) : n.delete("selected"), n;
62
64
  }, { replace: t?.replace ?? !0 });
63
- }, [c]), fe = F((e) => {
64
- c((t) => {
65
+ }, [d]), me = I((e) => {
66
+ d((t) => {
65
67
  let n = new URLSearchParams(t);
66
68
  return e ? n.set("search", e) : n.delete("search"), n;
67
69
  }, { replace: !0 });
68
- }, [c]), pe = F((e, t) => {
69
- c((n) => {
70
- let r = new URLSearchParams(n), i = A(n).filters, a;
71
- return a = t && t !== "__all__" ? [...M(i, e), k(e, t)] : M(i, e), j(a, r), r;
70
+ }, [d]), he = I((e, t) => {
71
+ d((n) => {
72
+ let r = new URLSearchParams(n), i = D(n).filters, a;
73
+ return a = t && t !== "__all__" ? [...k(i, e), ae(e, t)] : k(i, e), O(a, r), r;
72
74
  }, { replace: !0 });
73
- }, [c]), Y = (f?.list_resizable ?? !1) && w === "split" && d.category !== "phone" && !d.touch, X = R(null), [Z, Q] = z(null), me = R(!1), $ = f?.list_width;
74
- I(() => {
75
- Y && $?.endsWith("%") && Q(null);
75
+ }, [d]), Y = (h?.list_resizable ?? !1) && E === "split" && m.category !== "phone" && !m.touch, ge = z(null), [X, Z] = oe(null), _e = z(!1), Q = h?.list_width;
76
+ L(() => {
77
+ Y && Q?.endsWith("%") && Z(null);
76
78
  }, [
77
79
  Y,
78
- $,
79
- d.width,
80
- d.height
81
- ]), I(() => {
82
- if (!Y || Z !== null) return;
83
- let e = X.current;
80
+ Q,
81
+ m.width,
82
+ m.height
83
+ ]), L(() => {
84
+ if (!Y || X !== null) return;
85
+ let e = ge.current;
84
86
  if (e) {
85
- if ($ && $.endsWith("%")) {
86
- let t = parseFloat($) / 100;
87
- Q(Math.round(e.getBoundingClientRect().width * t));
88
- } else Q($ && parseInt($, 10) || 320);
87
+ if (Q && Q.endsWith("%")) {
88
+ let t = parseFloat(Q) / 100;
89
+ Z(Math.round(e.getBoundingClientRect().width * t));
90
+ } else Z(Q && parseInt(Q, 10) || 320);
89
91
  }
90
92
  }, [
91
93
  Y,
92
- $,
93
- Z,
94
- p
94
+ Q,
95
+ X,
96
+ v
95
97
  ]);
96
- let he = R(null);
97
- I(() => () => {
98
- he.current?.();
98
+ let $ = z(null);
99
+ L(() => () => {
100
+ $.current?.();
99
101
  }, []);
100
- let ge = F((e) => {
101
- e.preventDefault(), me.current = !0;
102
- let t = e.clientX, n = Z ?? 320, r = (e) => {
103
- if (!me.current) return;
104
- let r = (X.current?.getBoundingClientRect().width ?? window.innerWidth) - 300, i = Math.max(200, Math.min(r, n + e.clientX - t));
105
- Q(i);
102
+ let ve = I((e) => {
103
+ e.preventDefault(), _e.current = !0;
104
+ let t = e.clientX, n = X ?? 320, r = (e) => {
105
+ if (!_e.current) return;
106
+ let r = (ge.current?.getBoundingClientRect().width ?? window.innerWidth) - 300, i = Math.max(200, Math.min(r, n + e.clientX - t));
107
+ Z(i);
106
108
  }, i = () => {
107
- me.current = !1, document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", i), document.body.style.cursor = "", document.body.style.userSelect = "", he.current = null;
109
+ _e.current = !1, document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", i), document.body.style.cursor = "", document.body.style.userSelect = "", $.current = null;
108
110
  };
109
- document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", r), document.addEventListener("mouseup", i), he.current = i;
110
- }, [Z]);
111
- if (!u || !f || !p) return null;
112
- let _e = ie?.length ?? 0, ve = w === "split" || w === "stacked" || !v, ye = w === "split" || w === "stacked" || !!v, be = w !== "split" && v ? () => J(null, { replace: !0 }) : void 0, xe = w === "split" ? Y && Z !== null ? Z : f.list_width ?? "320px" : "100%";
111
+ document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", r), document.addEventListener("mouseup", i), $.current = i;
112
+ }, [X]);
113
+ if (!p || !h || !v) return null;
114
+ let ye = ie?.length ?? 0, be = E === "split" || E === "stacked" || !x, xe = E === "split" || E === "stacked" || !!x, Se = E !== "split" && x ? () => pe(null, { replace: !0 }) : void 0, Ce = E === "split" ? Y && X !== null ? X : h.list_width ?? "320px" : "100%";
113
115
  return /* @__PURE__ */ H("div", {
114
- ref: X,
115
- "data-record-list-presentation": w,
116
+ ref: ge,
117
+ "data-record-list-presentation": E,
116
118
  style: {
117
119
  display: "flex",
118
- flexDirection: w === "stacked" ? "column" : "row",
120
+ flexDirection: E === "stacked" ? "column" : "row",
119
121
  height: "100%",
120
122
  minWidth: 0,
121
123
  overflow: "hidden"
122
124
  },
123
125
  children: [
124
- ve && /* @__PURE__ */ H("div", {
126
+ be && /* @__PURE__ */ H("div", {
125
127
  "data-testid": "record-list-panel",
126
128
  style: {
127
- flex: w === "split" ? "none" : "1 1 auto",
129
+ flex: E === "split" ? "none" : "1 1 auto",
128
130
  display: "flex",
129
131
  flexDirection: "column",
130
132
  overflow: "hidden",
131
- borderRight: w === "split" && !Y ? "1px solid var(--divider)" : "none",
132
- borderBottom: w === "stacked" ? "1px solid var(--divider)" : "none",
133
- width: xe,
133
+ borderRight: E === "split" && !Y ? "1px solid var(--divider)" : "none",
134
+ borderBottom: E === "stacked" ? "1px solid var(--divider)" : "none",
135
+ width: Ce,
134
136
  minWidth: 0,
135
- height: w === "stacked" ? "50%" : "100%"
137
+ height: E === "stacked" ? "50%" : "100%"
136
138
  },
137
139
  children: [/* @__PURE__ */ H("div", {
138
140
  style: {
139
141
  paddingTop: 12,
140
142
  paddingBottom: 12,
141
- ...ne(12),
143
+ ...te(12),
142
144
  display: "flex",
143
145
  flexDirection: "column",
144
146
  gap: 8,
145
147
  borderBottom: "1px solid var(--divider)"
146
148
  },
147
149
  children: [
148
- g.hasOriginBack && /* @__PURE__ */ H("div", {
150
+ ne.hasOriginBack && /* @__PURE__ */ H("div", {
149
151
  style: {
150
152
  display: "flex",
151
153
  alignItems: "center",
152
154
  gap: 8
153
155
  },
154
- children: [/* @__PURE__ */ V(n, {
156
+ children: [/* @__PURE__ */ V(t, {
155
157
  icon: /* @__PURE__ */ V(e.back, { size: 14 }),
156
- title: "Back",
157
- onClick: g.goBack
158
+ title: r("list.header.back", "Back"),
159
+ onClick: ne.goBack
158
160
  }), /* @__PURE__ */ V("span", {
159
161
  style: {
160
162
  fontSize: 12.5,
161
163
  fontWeight: 600,
162
164
  color: "var(--text)"
163
165
  },
164
- children: h(f.display?.name) || h(p.display.name_plural)
166
+ children: r(h.display?.name) || r(v.display.name_plural)
165
167
  })]
166
168
  }),
167
- /* @__PURE__ */ V(i, {
168
- value: y,
169
- onChange: fe,
170
- placeholder: `Search ${h(p.display.name_plural)}…`,
169
+ /* @__PURE__ */ V(c, {
170
+ value: re,
171
+ onChange: me,
172
+ placeholder: r("list.toolbar.search_placeholder", "Search {name}…", { name: r(v.display.name_plural) }),
171
173
  prefix: /* @__PURE__ */ V(e.search, { size: 13 })
172
174
  }),
173
- S.error && /* @__PURE__ */ H("div", {
175
+ w.error && /* @__PURE__ */ H("div", {
174
176
  role: "alert",
175
177
  "data-testid": "record-list-filter-url-error",
176
178
  style: {
@@ -180,31 +182,35 @@ function U({ screenCode: o }) {
180
182
  color: "var(--danger)",
181
183
  fontSize: 11.5
182
184
  },
183
- children: [S.error, " Showing this list without URL filters."]
185
+ children: [
186
+ s(w.errorCode ?? "", w.error),
187
+ " ",
188
+ r("list.filters.invalid_suffix", "Showing this list without URL filters.")
189
+ ]
184
190
  }),
185
- f.filters && f.filters.length > 0 && /* @__PURE__ */ V("div", {
191
+ h.filters && h.filters.length > 0 && /* @__PURE__ */ V("div", {
186
192
  style: {
187
193
  display: "flex",
188
194
  flexWrap: "wrap",
189
195
  gap: 6
190
196
  },
191
- children: f.filters.map((e) => {
192
- let n = p.fields.get(e);
193
- if (!n?.values) return null;
194
- let i = ie?.find((t) => t.field === e && t.op === "eq")?.value ?? "__all__", a = t(n, e, u.entities), o = [{
197
+ children: h.filters.map((e) => {
198
+ let t = v.fields.get(e);
199
+ if (!t?.values) return null;
200
+ let n = ie?.find((t) => t.field === e && t.op === "eq")?.value ?? "__all__", i = o(r, t, e, p.entities), s = [{
195
201
  value: "__all__",
196
- label: `All ${a}`
197
- }, ...n.values.map((e) => ({
202
+ label: r("list.filters.all_values", "All {field}", { field: i })
203
+ }, ...t.values.map((e) => ({
198
204
  value: e.code,
199
- label: h(e.name) || e.code
205
+ label: r(e.name) || e.code
200
206
  }))];
201
207
  return /* @__PURE__ */ V("div", {
202
208
  style: { minWidth: 120 },
203
- children: /* @__PURE__ */ V(r, {
204
- value: i,
205
- options: o,
206
- onChange: (t) => pe(e, t),
207
- placeholder: a
209
+ children: /* @__PURE__ */ V(a, {
210
+ value: n,
211
+ options: s,
212
+ onChange: (t) => he(e, t),
213
+ placeholder: i
208
214
  })
209
215
  }, e);
210
216
  })
@@ -217,8 +223,11 @@ function U({ screenCode: o }) {
217
223
  fontSize: 11,
218
224
  color: "var(--text-3)"
219
225
  },
220
- children: [/* @__PURE__ */ V("span", { children: K ? "Loading…" : `${W.length} ${h(p.display.name_plural)}` }), _e > 0 && /* @__PURE__ */ V("button", {
221
- onClick: () => c((e) => {
226
+ children: [/* @__PURE__ */ V("span", { children: J ? r("list.records.loading", "Loading…") : r("list.records.count", "{count} {name}", {
227
+ count: K.length,
228
+ name: r(v.display.name_plural)
229
+ }) }), ye > 0 && /* @__PURE__ */ V("button", {
230
+ onClick: () => d((e) => {
222
231
  let t = new URLSearchParams(e);
223
232
  return t.delete("filters"), t;
224
233
  }, { replace: !0 }),
@@ -231,7 +240,7 @@ function U({ screenCode: o }) {
231
240
  textDecoration: "underline",
232
241
  padding: 0
233
242
  },
234
- children: "Clear filters"
243
+ children: r("list.filters.clear", "Clear filters")
235
244
  })]
236
245
  })
237
246
  ]
@@ -239,12 +248,12 @@ function U({ screenCode: o }) {
239
248
  style: {
240
249
  flex: 1,
241
250
  overflowY: "auto",
242
- padding: E === "cards" ? 10 : 0,
243
- display: E === "cards" ? "flex" : "block",
251
+ padding: M === "cards" ? 10 : 0,
252
+ display: M === "cards" ? "flex" : "block",
244
253
  flexDirection: "column",
245
- gap: E === "cards" ? 10 : void 0
254
+ gap: M === "cards" ? 10 : void 0
246
255
  },
247
- children: K ? /* @__PURE__ */ V("div", {
256
+ children: J ? /* @__PURE__ */ V("div", {
248
257
  style: {
249
258
  padding: 12,
250
259
  display: "flex",
@@ -256,31 +265,31 @@ function U({ screenCode: o }) {
256
265
  borderRadius: 6,
257
266
  background: "var(--surface-3)"
258
267
  } }, t))
259
- }) : W.length === 0 ? /* @__PURE__ */ V("div", {
268
+ }) : K.length === 0 ? /* @__PURE__ */ V("div", {
260
269
  style: {
261
270
  padding: 28,
262
271
  textAlign: "center",
263
272
  fontSize: 12.5,
264
273
  color: "var(--text-3)"
265
274
  },
266
- children: "No records found"
267
- }) : /* @__PURE__ */ H(B, { children: [W.map((e) => {
268
- let t = ee(e[q]);
275
+ children: r("list.records.none", "No records found")
276
+ }) : /* @__PURE__ */ H(B, { children: [K.map((e) => {
277
+ let t = u(e[fe]);
269
278
  return /* @__PURE__ */ V(ue, {
270
279
  record: e,
271
- entity: p,
272
- columns: C,
273
- card: O,
274
- presentation: E,
275
- refs: G,
276
- isSelected: t === v,
277
- onClick: () => J(t, { replace: w === "split" })
280
+ entity: v,
281
+ columns: T,
282
+ card: U,
283
+ presentation: M,
284
+ refs: q,
285
+ isSelected: t === x,
286
+ onClick: () => pe(t, { replace: E === "split" })
278
287
  }, t);
279
- }), U.isCursor && U.hasMorePages && /* @__PURE__ */ V("button", {
288
+ }), G.isCursor && G.hasMorePages && /* @__PURE__ */ V("button", {
280
289
  type: "button",
281
290
  "data-testid": "record-list-load-more",
282
- onClick: U.fetchNextPage,
283
- disabled: U.isFetchingNextPage,
291
+ onClick: G.fetchNextPage,
292
+ disabled: G.isFetchingNextPage,
284
293
  style: {
285
294
  width: "100%",
286
295
  padding: "8px 12px",
@@ -289,15 +298,15 @@ function U({ screenCode: o }) {
289
298
  border: "none",
290
299
  borderTop: "1px solid var(--divider)",
291
300
  color: "var(--text-2)",
292
- cursor: U.isFetchingNextPage ? "default" : "pointer"
301
+ cursor: G.isFetchingNextPage ? "default" : "pointer"
293
302
  },
294
- children: U.isFetchingNextPage ? "Loading…" : "Load more"
303
+ children: G.isFetchingNextPage ? r("list.records.loading", "Loading…") : r("list.footer.load_more", "Load more")
295
304
  })] })
296
305
  })]
297
306
  }),
298
307
  Y && /* @__PURE__ */ V("div", {
299
308
  "data-testid": "record-list-resize-handle",
300
- onMouseDown: ge,
309
+ onMouseDown: ve,
301
310
  style: {
302
311
  flex: "none",
303
312
  width: 1,
@@ -308,23 +317,23 @@ function U({ screenCode: o }) {
308
317
  onMouseEnter: (e) => e.currentTarget.style.background = "var(--border-strong)",
309
318
  onMouseLeave: (e) => e.currentTarget.style.background = "var(--divider)"
310
319
  }),
311
- ye && /* @__PURE__ */ V("div", {
320
+ xe && /* @__PURE__ */ V("div", {
312
321
  "data-testid": "record-detail-panel",
313
322
  style: {
314
323
  flex: 1,
315
324
  minWidth: 0,
316
325
  overflow: "hidden",
317
- height: w === "stacked" ? "50%" : "100%"
326
+ height: E === "stacked" ? "50%" : "100%"
318
327
  },
319
- children: v ? /* @__PURE__ */ V(de, {
320
- entityCode: m,
321
- recordId: v,
322
- items: f.items,
323
- schema: u,
324
- entity: p,
325
- onBackToList: be,
326
- relatedRecordsPresentation: ae
327
- }, v) : /* @__PURE__ */ V("div", {
328
+ children: x ? /* @__PURE__ */ V(de, {
329
+ entityCode: y,
330
+ recordId: x,
331
+ items: h.items,
332
+ schema: p,
333
+ entity: v,
334
+ onBackToList: Se,
335
+ relatedRecordsPresentation: le
336
+ }, x) : /* @__PURE__ */ V("div", {
328
337
  style: {
329
338
  display: "flex",
330
339
  alignItems: "center",
@@ -332,13 +341,9 @@ function U({ screenCode: o }) {
332
341
  height: "100%",
333
342
  color: "var(--text-3)"
334
343
  },
335
- children: /* @__PURE__ */ H("p", {
344
+ children: /* @__PURE__ */ V("p", {
336
345
  style: { fontSize: 12.5 },
337
- children: [
338
- "Select a ",
339
- h(p.display.name),
340
- " to view details"
341
- ]
346
+ children: r("list.detail.select_prompt", "Select a {name} to view details", { name: r(v.display.name) })
342
347
  })
343
348
  })
344
349
  })
@@ -346,7 +351,7 @@ function U({ screenCode: o }) {
346
351
  });
347
352
  }
348
353
  function ue({ record: e, entity: t, columns: n, card: r, presentation: i, refs: a, isSelected: o, onClick: s }) {
349
- let c = p();
354
+ let c = _();
350
355
  if (i === "cards") {
351
356
  let n = r.badgeFields.filter((n) => W(t, e, n)), i = r.bodyFields.filter((n) => W(t, e, n)), l = r.metaFields.filter((n) => W(t, e, n));
352
357
  return /* @__PURE__ */ H("button", {
@@ -381,13 +386,13 @@ function ue({ record: e, entity: t, columns: n, card: r, presentation: i, refs:
381
386
  color: "var(--text-3)",
382
387
  overflowWrap: "anywhere"
383
388
  },
384
- children: S({
389
+ children: w({
385
390
  entity: t,
386
391
  fieldName: r.subtitleField,
387
392
  record: e,
388
393
  mode: "display",
389
394
  refs: a,
390
- locale: c
395
+ t: c
391
396
  })
392
397
  }),
393
398
  n.length > 0 && /* @__PURE__ */ V("div", {
@@ -406,13 +411,13 @@ function ue({ record: e, entity: t, columns: n, card: r, presentation: i, refs:
406
411
  maxWidth: "100%",
407
412
  overflowWrap: "anywhere"
408
413
  },
409
- children: S({
414
+ children: w({
410
415
  entity: t,
411
416
  fieldName: n,
412
417
  record: e,
413
418
  mode: "display",
414
419
  refs: a,
415
- locale: c
420
+ t: c
416
421
  })
417
422
  }, n))
418
423
  }),
@@ -427,8 +432,7 @@ function ue({ record: e, entity: t, columns: n, card: r, presentation: i, refs:
427
432
  entity: t,
428
433
  record: e,
429
434
  fieldName: n,
430
- refs: a,
431
- locale: c
435
+ refs: a
432
436
  }, n))
433
437
  }),
434
438
  l.length > 0 && /* @__PURE__ */ V("div", {
@@ -444,13 +448,13 @@ function ue({ record: e, entity: t, columns: n, card: r, presentation: i, refs:
444
448
  minWidth: 0,
445
449
  overflowWrap: "anywhere"
446
450
  },
447
- children: S({
451
+ children: w({
448
452
  entity: t,
449
453
  fieldName: n,
450
454
  record: e,
451
455
  mode: "display",
452
456
  refs: a,
453
- locale: c
457
+ t: c
454
458
  })
455
459
  }, n))
456
460
  })
@@ -490,13 +494,13 @@ function ue({ record: e, entity: t, columns: n, card: r, presentation: i, refs:
490
494
  whiteSpace: "nowrap",
491
495
  color: "var(--text)"
492
496
  },
493
- children: S({
497
+ children: w({
494
498
  entity: t,
495
499
  fieldName: l,
496
500
  record: e,
497
501
  mode: "display",
498
502
  refs: a,
499
- locale: c
503
+ t: c
500
504
  })
501
505
  }), /* @__PURE__ */ H("div", {
502
506
  style: {
@@ -513,13 +517,13 @@ function ue({ record: e, entity: t, columns: n, card: r, presentation: i, refs:
513
517
  textOverflow: "ellipsis",
514
518
  whiteSpace: "nowrap"
515
519
  },
516
- children: S({
520
+ children: w({
517
521
  entity: t,
518
522
  fieldName: u,
519
523
  record: e,
520
524
  mode: "display",
521
525
  refs: a,
522
- locale: c
526
+ t: c
523
527
  })
524
528
  }), /* @__PURE__ */ V("div", {
525
529
  style: {
@@ -528,15 +532,15 @@ function ue({ record: e, entity: t, columns: n, card: r, presentation: i, refs:
528
532
  gap: 4,
529
533
  flexShrink: 0
530
534
  },
531
- children: d.map((n) => b(t, e, n) == null ? null : /* @__PURE__ */ V("div", {
535
+ children: d.map((n) => S(t, e, n) == null ? null : /* @__PURE__ */ V("div", {
532
536
  style: { fontSize: 11 },
533
- children: S({
537
+ children: w({
534
538
  entity: t,
535
539
  fieldName: n,
536
540
  record: e,
537
541
  mode: "display",
538
542
  refs: a,
539
- locale: c
543
+ t: c
540
544
  })
541
545
  }, n))
542
546
  })]
@@ -544,17 +548,17 @@ function ue({ record: e, entity: t, columns: n, card: r, presentation: i, refs:
544
548
  });
545
549
  }
546
550
  function W(e, t, n) {
547
- let r = b(e, t, n);
551
+ let r = S(e, t, n);
548
552
  return !(r == null || r === "" || Array.isArray(r) && r.length === 0);
549
553
  }
550
554
  function G({ entity: e, record: t, field: n, refs: r }) {
551
- let i = p(), a = f(t, e), o = n ? S({
555
+ let i = _(), a = m(i, t, e), o = n ? w({
552
556
  entity: e,
553
557
  fieldName: n,
554
558
  record: t,
555
559
  mode: "display",
556
560
  refs: r,
557
- locale: i
561
+ t: i
558
562
  }) : a;
559
563
  return /* @__PURE__ */ V("div", {
560
564
  style: {
@@ -563,13 +567,13 @@ function G({ entity: e, record: t, field: n, refs: r }) {
563
567
  color: "var(--text)",
564
568
  overflowWrap: "anywhere"
565
569
  },
566
- children: o || h(e.display.name)
570
+ children: o || i(e.display.name)
567
571
  });
568
572
  }
569
- function K({ entity: e, record: n, fieldName: r, refs: i, locale: a }) {
570
- let o = b(e, n, r);
571
- if (o == null || o === "") return null;
572
- let s = e.fields.get(r);
573
+ function K({ entity: e, record: t, fieldName: n, refs: r }) {
574
+ let i = _(), a = S(e, t, n);
575
+ if (a == null || a === "") return null;
576
+ let s = e.fields.get(n);
573
577
  return s ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("dt", {
574
578
  style: {
575
579
  color: "var(--text-3)",
@@ -577,7 +581,7 @@ function K({ entity: e, record: n, fieldName: r, refs: i, locale: a }) {
577
581
  minWidth: 0,
578
582
  overflowWrap: "anywhere"
579
583
  },
580
- children: t(s, r)
584
+ children: o(i, s, n)
581
585
  }), /* @__PURE__ */ V("dd", {
582
586
  style: {
583
587
  margin: 0,
@@ -586,18 +590,18 @@ function K({ entity: e, record: n, fieldName: r, refs: i, locale: a }) {
586
590
  minWidth: 0,
587
591
  overflowWrap: "anywhere"
588
592
  },
589
- children: S({
593
+ children: w({
590
594
  entity: e,
591
- fieldName: r,
592
- record: n,
595
+ fieldName: n,
596
+ record: t,
593
597
  mode: "display",
594
- refs: i,
595
- locale: a
598
+ refs: r,
599
+ t: i
596
600
  })
597
601
  })] }) : null;
598
602
  }
599
603
  function de({ entityCode: e, recordId: t, items: n, schema: r, entity: i, onBackToList: a, relatedRecordsPresentation: o }) {
600
- return /* @__PURE__ */ V(g, { children: /* @__PURE__ */ V(q, {
604
+ return /* @__PURE__ */ V(p, { children: /* @__PURE__ */ V(q, {
601
605
  entityCode: e,
602
606
  recordId: t,
603
607
  items: n,
@@ -607,89 +611,86 @@ function de({ entityCode: e, recordId: t, items: n, schema: r, entity: i, onBack
607
611
  relatedRecordsPresentation: o
608
612
  }) });
609
613
  }
610
- function q({ entityCode: t, recordId: r, items: i, schema: a, entity: l, onBackToList: p, relatedRecordsPresentation: g }) {
611
- let _ = c(l, "update"), te = L(() => r ? d(l, r) : void 0, [r, l]), { data: ne, isLoading: re } = v(t, te), S = y(t), T = u(), [D, k] = z(!1), [A, j] = z({}), M = ne?.data, oe = M?.$statuses, se = M?.$properties, P = O(t, r), I = ae(t, r), R = L(() => {
614
+ function q({ entityCode: i, recordId: a, items: o, schema: c, entity: f, onBackToList: p, relatedRecordsPresentation: ee }) {
615
+ let g = _(), b = l(f, "update"), w = R(() => a ? n(f, a) : void 0, [a, f]), { data: ae, isLoading: D } = v(i, w), O = ne(i), k = s(), [A, j] = oe(!1), [N, P] = oe({}), F = ae?.data, L = F?.$statuses, z = F?.$properties, se = E(i, a), ce = T(i, a), U = R(() => {
612
616
  let e = /* @__PURE__ */ new Set();
613
- for (let [t, n] of l.fields) !n.auto && !n.primary && e.add(t);
614
- for (let [t] of l.files ?? []) e.add(t);
617
+ for (let [t, n] of f.fields) !n.auto && !n.primary && e.add(t);
618
+ for (let [t] of f.files ?? []) e.add(t);
615
619
  return e;
616
- }, [l]), ce = F(() => {
617
- if (M) {
620
+ }, [f]), ue = I(() => {
621
+ if (F) {
618
622
  let e = {};
619
- R.forEach((t) => {
620
- let n = b(l, M, t);
621
- e[t] = ie(l, t) ? n ?? null : n ?? "";
622
- }), j(e);
623
+ U.forEach((t) => {
624
+ let n = S(f, F, t);
625
+ e[t] = ie(f, t) ? n ?? null : n ?? "";
626
+ }), P(e);
623
627
  }
624
- k(!0);
628
+ j(!0);
625
629
  }, [
626
- M,
627
- R,
628
- l
629
- ]), le = F(async () => {
630
- await T.flushAllDrafts(), k(!1), j({});
631
- }, [T]), U = F(() => {
632
- let e = {}, t = E({
633
- entity: l,
634
- formData: A,
635
- record: M,
630
+ F,
631
+ U,
632
+ f
633
+ ]), W = I(async () => {
634
+ await k.flushAllDrafts(), j(!1), P({});
635
+ }, [k]), G = I(() => {
636
+ let e = {}, t = y({
637
+ entity: f,
638
+ formData: N,
639
+ record: F,
636
640
  isNew: !1
637
- }), n = w(t);
638
- for (let [t, n] of Object.entries(A)) l.files?.has(t) || (e[t] = x(l, t, n));
641
+ }), n = x(t);
642
+ for (let [t, n] of Object.entries(N)) f.files?.has(t) || (e[t] = C(f, t, n));
639
643
  if (Object.keys(t).length > 0 && (e.$files = t), Object.keys(e).length === 0) {
640
- k(!1), j({});
644
+ j(!1), P({});
641
645
  return;
642
646
  }
643
- S.mutate({
644
- pkValues: r,
647
+ O.mutate({
648
+ pkValues: a,
645
649
  data: e
646
- }, {
647
- onSuccess: () => {
648
- n.forEach((e) => T.markCommitted(e)), k(!1), j({}), m.success("Saved");
649
- },
650
- onError: () => m.error("Failed to save")
651
- });
650
+ }, { onSuccess: () => {
651
+ n.forEach((e) => k.markCommitted(e)), j(!1), P({});
652
+ } });
652
653
  }, [
653
- T,
654
- S,
655
- r,
656
- l,
657
- A,
658
- M
659
- ]), ue = F((e, t) => {
660
- j((n) => ({
654
+ k,
655
+ O,
656
+ a,
657
+ f,
658
+ N,
659
+ F
660
+ ]), K = I((e, t) => {
661
+ P((n) => ({
661
662
  ...n,
662
663
  [e]: t
663
664
  }));
664
665
  }, []);
665
- if (re) return /* @__PURE__ */ V(C, {});
666
- if (!M) return null;
667
- let W = f(M, l), G = l.display?.display_field, K = W ? void 0 : G ? M[G] : M[l.fields.names()[0]], de = W || (K != null && typeof K != "object" ? ee(K) : h(l.display.name)), q = M?.$refs, J = {
668
- schema: a,
669
- entity: l,
670
- entityCode: t,
671
- recordId: r,
672
- record: D ? {
673
- ...M,
674
- ...A
675
- } : M,
666
+ if (D) return /* @__PURE__ */ V(re, {});
667
+ if (!F) return null;
668
+ let de = m(g, F, f), q = f.display?.display_field, J = de ? void 0 : q ? F[q] : F[f.fields.names()[0]], fe = de || (J != null && typeof J != "object" ? u(J) : g(f.display.name)), pe = F?.$refs, me = {
669
+ schema: c,
670
+ entity: f,
671
+ entityCode: i,
672
+ recordId: a,
673
+ record: A ? {
674
+ ...F,
675
+ ...N
676
+ } : F,
676
677
  isNew: !1,
677
- mode: D ? "edit" : "display",
678
- onFieldChange: D ? ue : void 0,
679
- refs: q,
680
- objectProperties: se ?? void 0,
681
- onSetProperty: _ ? (e, t) => I.mutate({
678
+ mode: A ? "edit" : "display",
679
+ onFieldChange: A ? K : void 0,
680
+ refs: pe,
681
+ objectProperties: z ?? void 0,
682
+ onSetProperty: b ? (e, t) => ce.mutate({
682
683
  propertyCode: e,
683
684
  value: t
684
685
  }) : void 0,
685
- isPropertyPending: I.isPending,
686
- objectStatuses: oe ?? void 0,
687
- onSetStatus: _ ? (e, t) => P.mutate({
686
+ isPropertyPending: ce.isPending,
687
+ objectStatuses: L ?? void 0,
688
+ onSetStatus: b ? (e, t) => se.mutate({
688
689
  groupCode: e,
689
690
  statusCode: t
690
691
  }) : void 0,
691
- isStatusPending: P.isPending,
692
- relatedRecordsPresentation: g
692
+ isStatusPending: se.isPending,
693
+ relatedRecordsPresentation: ee
693
694
  };
694
695
  return /* @__PURE__ */ H("div", {
695
696
  style: {
@@ -702,7 +703,9 @@ function q({ entityCode: t, recordId: r, items: i, schema: a, entity: l, onBackT
702
703
  display: "flex",
703
704
  alignItems: "center",
704
705
  justifyContent: "space-between",
705
- padding: "10px 16px",
706
+ paddingTop: 10,
707
+ paddingBottom: 10,
708
+ ...te(16),
706
709
  borderBottom: "1px solid var(--divider)",
707
710
  position: "sticky",
708
711
  top: 0,
@@ -719,58 +722,56 @@ function q({ entityCode: t, recordId: r, items: i, schema: a, entity: l, onBackT
719
722
  whiteSpace: "nowrap",
720
723
  color: "var(--text)"
721
724
  },
722
- children: de
725
+ children: fe
723
726
  }), /* @__PURE__ */ H("div", {
724
727
  style: {
725
728
  display: "flex",
726
729
  alignItems: "center",
727
730
  gap: 6
728
731
  },
729
- children: [p && /* @__PURE__ */ V(n, {
732
+ children: [p && /* @__PURE__ */ V(t, {
730
733
  icon: /* @__PURE__ */ V(e.back, { size: 14 }),
731
- title: "Back to list",
734
+ title: g("list.detail.back_to_list", "Back to list"),
732
735
  onClick: p
733
- }), _ && (D ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(s, {
736
+ }), b && (A ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(r, {
734
737
  size: "xs",
735
738
  icon: /* @__PURE__ */ V(e.x, { size: 12 }),
736
- onClick: le,
737
- children: "Cancel"
738
- }), /* @__PURE__ */ V(s, {
739
+ onClick: W,
740
+ children: g("dialog.cancel", "Cancel")
741
+ }), /* @__PURE__ */ V(r, {
739
742
  kind: "primary",
740
743
  size: "xs",
741
- icon: S.isPending ? /* @__PURE__ */ V(o, { size: 12 }) : /* @__PURE__ */ V(e.save, { size: 12 }),
742
- onClick: U,
743
- disabled: S.isPending,
744
- children: S.isPending ? "Saving…" : "Save"
745
- })] }) : /* @__PURE__ */ V(s, {
744
+ icon: O.isPending ? /* @__PURE__ */ V(d, { size: 12 }) : /* @__PURE__ */ V(e.save, { size: 12 }),
745
+ onClick: G,
746
+ disabled: O.isPending,
747
+ children: O.isPending ? g("dialog.saving", "Saving…") : g("dialog.save", "Save")
748
+ })] }) : /* @__PURE__ */ V(r, {
746
749
  size: "xs",
747
750
  icon: /* @__PURE__ */ V(e.edit, { size: 12 }),
748
- onClick: ce,
749
- children: "Edit"
751
+ onClick: ue,
752
+ children: g("list.record.edit", "Edit")
750
753
  }))]
751
754
  })]
752
755
  }), /* @__PURE__ */ V("div", {
753
756
  style: {
754
757
  flex: 1,
755
758
  overflowY: "auto",
756
- padding: 16,
759
+ paddingTop: 16,
760
+ paddingBottom: 16,
761
+ ...te(16),
757
762
  display: "flex",
758
763
  flexDirection: "column",
759
764
  gap: 12
760
765
  },
761
- children: i && i.length > 0 ? /* @__PURE__ */ V(N, {
762
- nodes: i,
763
- ctx: J
764
- }) : /* @__PURE__ */ H("p", {
766
+ children: o && o.length > 0 ? /* @__PURE__ */ V(M, {
767
+ nodes: o,
768
+ ctx: me
769
+ }) : /* @__PURE__ */ V("p", {
765
770
  style: {
766
771
  fontSize: 12.5,
767
772
  color: "var(--text-3)"
768
773
  },
769
- children: [
770
- "No layout configured. Add ",
771
- /* @__PURE__ */ V("code", { children: "items:" }),
772
- " to the screen definition."
773
- ]
774
+ children: h(g("list.detail.no_layout", "No layout configured. Add {key} to the screen definition."), { key: /* @__PURE__ */ V("code", { children: le }) })
774
775
  })
775
776
  })]
776
777
  });