@declarion/react 0.54.0 → 0.56.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 (175) hide show
  1. package/dist-lib/{DraggableChildrenTable-CPoUY99R.js → DraggableChildrenTable-BV5sb8Uo.js} +32 -32
  2. package/dist-lib/{Grid--QAEby8k.js → Grid-DWgUPuZ3.js} +45 -45
  3. package/dist-lib/{JsonEditor-DoNmyrYd.js → JsonEditor-Dz1PQHC8.js} +2 -2
  4. package/dist-lib/{LayoutRenderer-BxZ7Nd9b.js → LayoutRenderer-C9AH9cXf.js} +716 -714
  5. package/dist-lib/{ListCardsBody-BPV4GPrv.js → ListCardsBody-DXcDg536.js} +29 -29
  6. package/dist-lib/{MarkdownRenderer-CIKuh_0i.js → MarkdownRenderer-CcSFc2N3.js} +1 -1
  7. package/dist-lib/{RefreshControl-DMLkZP3R.js → RefreshControl-CNtN8zSl.js} +41 -41
  8. package/dist-lib/{SmartDetailPage.impl-SnNu6Ug-.js → SmartDetailPage.impl-lskCd-WG.js} +492 -492
  9. package/dist-lib/{SmartListPage.impl-C73pR7Iw.js → SmartListPage.impl-CrGbdzyK.js} +744 -743
  10. package/dist-lib/{SmartRecordListPage.impl-rJjQZe1V.js → SmartRecordListPage.impl-Bkl9aZJ8.js} +129 -129
  11. package/dist-lib/{SortHeaderMenu-DQ_KrkWk.js → SortHeaderMenu-SYSAaqQJ.js} +1 -1
  12. package/dist-lib/{action-dispatch-DsuUS7ae.js → action-dispatch-CR4ajBtT.js} +179 -179
  13. package/dist-lib/api/auth.d.ts +1 -1
  14. package/dist-lib/api/batch.d.ts +1 -1
  15. package/dist-lib/api/data.d.ts +3 -3
  16. package/dist-lib/api/entities.d.ts +1 -1
  17. package/dist-lib/api/events.d.ts +13 -4
  18. package/dist-lib/api/params.d.ts +1 -1
  19. package/dist-lib/api/properties.d.ts +1 -1
  20. package/dist-lib/api/schema.d.ts +1 -1
  21. package/dist-lib/api/status.d.ts +1 -1
  22. package/dist-lib/{cardProjection-BadzqyeQ.js → cardProjection-CW5RIMko.js} +24 -24
  23. package/dist-lib/components/actions/ActionButton.d.ts +1 -1
  24. package/dist-lib/components/actions/ActionDialog.d.ts +1 -1
  25. package/dist-lib/components/actions/ActionRunner.d.ts +1 -1
  26. package/dist-lib/components/actions/ObjectActionBar.d.ts +3 -3
  27. package/dist-lib/components/actions/PropertyGridEditor.d.ts +2 -2
  28. package/dist-lib/components/actions/ResponsiveActionBar.d.ts +2 -2
  29. package/dist-lib/components/actions/RowActionsKebab.d.ts +1 -1
  30. package/dist-lib/components/agents/AgentConversationDrawer.d.ts +1 -1
  31. package/dist-lib/components/agents/AgentPicker.d.ts +1 -1
  32. package/dist-lib/components/agents/transcript-runs.d.ts +1 -1
  33. package/dist-lib/components/chrome/AssociationTabs.d.ts +1 -1
  34. package/dist-lib/components/chrome/Breadcrumbs.d.ts +1 -1
  35. package/dist-lib/components/detail-layout/AssociatedBlock.d.ts +1 -1
  36. package/dist-lib/components/detail-layout/AssociatedToolbar.d.ts +1 -1
  37. package/dist-lib/components/detail-layout/ChildrenBlock.d.ts +2 -2
  38. package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +2 -2
  39. package/dist-lib/components/detail-layout/DetailHighlights.d.ts +3 -3
  40. package/dist-lib/components/detail-layout/DraggableChildrenTable.d.ts +3 -3
  41. package/dist-lib/components/detail-layout/EditableChildrenTable.d.ts +3 -3
  42. package/dist-lib/components/detail-layout/EvidenceBlock.d.ts +1 -1
  43. package/dist-lib/components/detail-layout/FieldsBlock.d.ts +1 -1
  44. package/dist-lib/components/detail-layout/LayoutColumn.d.ts +1 -1
  45. package/dist-lib/components/detail-layout/LayoutRenderer.d.ts +3 -3
  46. package/dist-lib/components/detail-layout/LayoutRow.d.ts +1 -1
  47. package/dist-lib/components/detail-layout/LayoutTabs.d.ts +1 -1
  48. package/dist-lib/components/detail-layout/PropertiesBlock.d.ts +1 -1
  49. package/dist-lib/components/detail-layout/QuickAddForm.d.ts +2 -2
  50. package/dist-lib/components/detail-layout/SectionBlock.d.ts +1 -1
  51. package/dist-lib/components/detail-layout/StatusesBlock.d.ts +1 -1
  52. package/dist-lib/components/detail-layout/TimelineComposer.d.ts +2 -2
  53. package/dist-lib/components/detail-layout/blockMeta.d.ts +1 -1
  54. package/dist-lib/components/detail-layout/useQuickAdd.d.ts +2 -2
  55. package/dist-lib/components/detail-layout/widgets/WidgetHost.d.ts +1 -1
  56. package/dist-lib/components/fields/RefCombobox.d.ts +2 -2
  57. package/dist-lib/components/fields/cells/factories/host-icons.d.ts +1 -1
  58. package/dist-lib/components/fields/cells/registry.d.ts +2 -2
  59. package/dist-lib/components/fields/index.d.ts +3 -3
  60. package/dist-lib/components/file-widgets/helpers.d.ts +1 -1
  61. package/dist-lib/components/file-widgets/host.d.ts +3 -3
  62. package/dist-lib/components/file-widgets/payload.d.ts +2 -2
  63. package/dist-lib/components/file-widgets/types.d.ts +1 -1
  64. package/dist-lib/components/file-widgets/useEmbedFileSrc.d.ts +1 -1
  65. package/dist-lib/components/filters/FilterChips.d.ts +1 -1
  66. package/dist-lib/components/filters/FilterDrawer.d.ts +3 -3
  67. package/dist-lib/components/layout/CommandPalette.d.ts +2 -2
  68. package/dist-lib/components/layout/Layout.d.ts +3 -3
  69. package/dist-lib/components/layout/Rail.d.ts +2 -2
  70. package/dist-lib/components/layout/Sidebar.d.ts +1 -1
  71. package/dist-lib/components/layout/TabStrip.d.ts +1 -1
  72. package/dist-lib/components/layout/TenantChip.d.ts +1 -1
  73. package/dist-lib/components/layout/TopBar.d.ts +1 -1
  74. package/dist-lib/components/layout/tab-close.d.ts +1 -1
  75. package/dist-lib/components/list/InlineEditCell.d.ts +1 -1
  76. package/dist-lib/components/list/PeekFieldCell.d.ts +2 -2
  77. package/dist-lib/components/list/QuickPeek.d.ts +3 -3
  78. package/dist-lib/components/list/ViewSwitcher.d.ts +1 -1
  79. package/dist-lib/components/pages/DocumentsMenu.d.ts +1 -1
  80. package/dist-lib/components/pages/ExportMenu.d.ts +1 -1
  81. package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +1 -1
  82. package/dist-lib/components/pages/auth/AuthShell.d.ts +1 -1
  83. package/dist-lib/components/pages/exportRequest.d.ts +1 -1
  84. package/dist-lib/components/pages/list/ListCardRow.d.ts +3 -3
  85. package/dist-lib/components/pages/list/ListCardsBody.d.ts +3 -3
  86. package/dist-lib/components/pages/list/ListFloatbar.d.ts +3 -3
  87. package/dist-lib/components/pages/list/ListHeader.d.ts +3 -3
  88. package/dist-lib/components/pages/list/ListNoRows.d.ts +1 -1
  89. package/dist-lib/components/pages/list/ListTable.d.ts +2 -2
  90. package/dist-lib/components/pages/list/ListTableRow.d.ts +1 -1
  91. package/dist-lib/components/pages/list/ListToolbar.d.ts +7 -5
  92. package/dist-lib/components/pages/list/RowActionsCell.d.ts +1 -1
  93. package/dist-lib/components/pages/list/RowContextMenu.d.ts +1 -1
  94. package/dist-lib/components/pages/list/SortHeaderMenu.d.ts +1 -1
  95. package/dist-lib/components/pages/list/cardProjection.d.ts +2 -2
  96. package/dist-lib/components/pages/list/columns.d.ts +3 -3
  97. package/dist-lib/components/pages/list/filter-meta.d.ts +2 -2
  98. package/dist-lib/components/pages/list/sortable-header.d.ts +1 -1
  99. package/dist-lib/components/pages/list/table-features.d.ts +1 -1
  100. package/dist-lib/components/pages/list/use-filter-value-labels.d.ts +4 -4
  101. package/dist-lib/components/pages/list/useListColumnLayout.d.ts +1 -1
  102. package/dist-lib/components/pages/list/useListQuery.d.ts +4 -8
  103. package/dist-lib/components/pages/list/useListRowInteraction.d.ts +4 -4
  104. package/dist-lib/components/pages/list/useListSelection.d.ts +2 -2
  105. package/dist-lib/components/pages/list/useListSort.d.ts +1 -1
  106. package/dist-lib/components/pages/list/useListViews.d.ts +3 -3
  107. package/dist-lib/components/pages/list/useRowMenu.d.ts +3 -3
  108. package/dist-lib/components/pages/tenant-params/TenantParamsPage.d.ts +1 -1
  109. package/dist-lib/components/params/param-editors.d.ts +1 -1
  110. package/dist-lib/components/primitives/ClassifiedFieldLocked.d.ts +1 -1
  111. package/dist-lib/components/shared/MarkdownRenderer.d.ts +1 -1
  112. package/dist-lib/components/shared/StatusGroupsDisplay.d.ts +2 -2
  113. package/dist-lib/embed/screen-location.d.ts +1 -1
  114. package/dist-lib/{field-classification-sMkkAEg9.js → field-classification-D6xQYn-h.js} +271 -400
  115. package/dist-lib/{format-count-B5SLlNOb.js → format-count-Dobmi-Ji.js} +238 -238
  116. package/dist-lib/hooks/useAgentConversation.d.ts +1 -1
  117. package/dist-lib/hooks/useAllEntityData.d.ts +1 -1
  118. package/dist-lib/hooks/useAssociatedData.d.ts +1 -1
  119. package/dist-lib/hooks/useBranding.d.ts +4 -4
  120. package/dist-lib/hooks/useBrandingChrome.d.ts +2 -2
  121. package/dist-lib/hooks/useChildrenData.d.ts +1 -1
  122. package/dist-lib/hooks/useCurrentScreen.d.ts +1 -1
  123. package/dist-lib/hooks/useCursorEntityData.d.ts +5 -5
  124. package/dist-lib/hooks/useEntity.d.ts +1 -1
  125. package/dist-lib/hooks/useEntityData.d.ts +8 -1
  126. package/dist-lib/hooks/useFilters.d.ts +1 -1
  127. package/dist-lib/hooks/useImpersonation.d.ts +1 -1
  128. package/dist-lib/hooks/useLiveObject.d.ts +2 -2
  129. package/dist-lib/hooks/useMutations.d.ts +3 -3
  130. package/dist-lib/hooks/useObject.d.ts +1 -1
  131. package/dist-lib/hooks/useParams.d.ts +2 -2
  132. package/dist-lib/hooks/useRealtimeThresholds.d.ts +1 -0
  133. package/dist-lib/hooks/useRegisterScreenTab.d.ts +1 -1
  134. package/dist-lib/hooks/useResponsiveMode.d.ts +1 -1
  135. package/dist-lib/hooks/useSSE.d.ts +1 -2
  136. package/dist-lib/hooks/useScreen.d.ts +1 -1
  137. package/dist-lib/hooks/useTimelineData.d.ts +2 -2
  138. package/dist-lib/hooks/useViews.d.ts +1 -1
  139. package/dist-lib/index.js +811 -811
  140. package/dist-lib/lib/action-dispatch.d.ts +2 -2
  141. package/dist-lib/lib/actions.d.ts +1 -1
  142. package/dist-lib/lib/brand-tokens.d.ts +1 -1
  143. package/dist-lib/lib/branding.d.ts +1 -1
  144. package/dist-lib/lib/child-config.d.ts +1 -1
  145. package/dist-lib/lib/children-validation.d.ts +2 -2
  146. package/dist-lib/lib/document-templates.d.ts +1 -1
  147. package/dist-lib/lib/evidence-verdict.d.ts +1 -1
  148. package/dist-lib/lib/mass-edit.d.ts +1 -1
  149. package/dist-lib/lib/messages.d.ts +2 -2
  150. package/dist-lib/lib/realtime-query-keys.d.ts +22 -0
  151. package/dist-lib/lib/realtime-reconcile.d.ts +1 -10
  152. package/dist-lib/lib/realtime-resync.d.ts +23 -0
  153. package/dist-lib/lib/rich-text.d.ts +1 -1
  154. package/dist-lib/lib/schema-routing.d.ts +1 -1
  155. package/dist-lib/lib/screen-back.d.ts +1 -1
  156. package/dist-lib/lib/size-value.d.ts +1 -1
  157. package/dist-lib/lib/toast.d.ts +2 -2
  158. package/dist-lib/lib/ui-actions.d.ts +1 -1
  159. package/dist-lib/lib/variants.d.ts +1 -1
  160. package/dist-lib/{peekDraftStore-CbHFwz_F.js → peekDraftStore-5wQ7lq_V.js} +17 -17
  161. package/dist-lib/{registry-D0RhCnEL.js → registry-CjgUaF7C.js} +511 -511
  162. package/dist-lib/stores/auth.d.ts +1 -1
  163. package/dist-lib/stores/preferences.d.ts +1 -1
  164. package/dist-lib/stores/realtime.d.ts +86 -19
  165. package/dist-lib/testing.d.ts +4 -4
  166. package/dist-lib/testing.js +40 -40
  167. package/dist-lib/types/api.d.ts +1 -1
  168. package/dist-lib/types/schema.d.ts +2 -2
  169. package/dist-lib/{useCurrentScreen-DVTXCj_K.js → useCurrentScreen-CzwzQpoW.js} +2476 -1967
  170. package/dist-lib/useListQuery-D7Hr5WM1.js +96 -0
  171. package/dist-lib/{useProperties-BcIz-MyO.js → useProperties-CqtCzFCr.js} +25 -25
  172. package/dist-lib/{useTabSearchMirror-UYCsopxP.js → useTabSearchMirror-C39U85cg.js} +13 -13
  173. package/dist-lib/{value-CQzGOI0F.js → value-Bo8C8WMU.js} +4 -4
  174. package/package.json +10 -10
  175. package/dist-lib/useListQuery-C2nq58YV.js +0 -90
@@ -1,83 +1,83 @@
1
1
  import { s as e } from "./DynamicIcon-DW5krHuX.js";
2
- import { Cr as t, Dr as n, Fr as r, Ir as i, Jn as a, Kn as o, Mt as s, Yn as c, Zn as l, an as u, at as d, h as f, lr as ee, nt as p, or as m, st as h, vr as te, xr as g, yt as ne } from "./useCurrentScreen-DVTXCj_K.js";
3
- import { a as _ } from "./registry-D0RhCnEL.js";
4
- import { T as re, l as ie, p as v } from "./field-classification-sMkkAEg9.js";
5
- import { f as y, h as b, p as x, u as S } from "./action-dispatch-DsuUS7ae.js";
6
- import { a as C, c as w, n as T, s as E, t as D } from "./cardProjection-BadzqyeQ.js";
7
- import { n as ae, r as O } from "./useProperties-BcIz-MyO.js";
8
- import { c as k, f as A, h as j, m as M, n as oe, t as se } from "./useTabSearchMirror-UYCsopxP.js";
9
- import { t as N } from "./LayoutRenderer-BxZ7Nd9b.js";
10
- import { t as P } from "./useListQuery-C2nq58YV.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
11
  import { useCallback as F, useEffect as I, useMemo as L, useRef as R, useState as z } from "react";
12
12
  import { useSearchParams as ce } from "react-router";
13
13
  import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
14
14
  //#region src/components/pages/SmartRecordListPage.impl.tsx
15
15
  var le = 200;
16
- function U({ screenCode: t }) {
17
- let [i, o] = ce(), { data: s } = u(), c = n(), d = s?.screens[t], p = d?.entity ? s?.entities[d.entity] : void 0, m = d?.entity;
18
- oe(d, p, i.toString()), se(d?.route);
19
- let h = ie(), _ = i.get("selected") ?? null, v = i.get("search") ?? "", y = ne(v, 300), b = i.get("sort") ?? d?.sort_default ?? "", x = L(() => A(i), [i]), S = x.filters.length > 0 ? x.filters : void 0, C = L(() => d?.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) ?? [], [d?.columns, p]), w = L(() => {
20
- let e = d?.responsive?.[c.category]?.presentation;
21
- return c.category === "phone" ? "drilldown" : e === "split" || e === "drilldown" || e === "stacked" ? e : "split";
22
- }, [d?.responsive, c.category]), E = L(() => {
23
- let e = d?.responsive?.[c.category];
24
- return e?.list?.presentation === "table" || e?.list?.presentation === "cards" ? e.list.presentation : e?.presentation === "table" || e?.presentation === "cards" ? e.presentation : c.category === "phone" ? "cards" : "table";
25
- }, [d?.responsive, c.category]), ae = d?.responsive?.[c.category]?.layout?.related_records, O = L(() => D({
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
26
  entity: p,
27
- screen: d
28
- }), [p, d]), N = L(() => T({
27
+ screen: f
28
+ }), [p, f]), N = L(() => T({
29
29
  entity: p,
30
- screen: d,
30
+ screen: f,
31
31
  presentation: E,
32
32
  visibleColumns: C,
33
33
  card: O,
34
- sort: b
34
+ sort: x
35
35
  }), [
36
36
  p,
37
- d,
37
+ f,
38
38
  E,
39
39
  C,
40
40
  O,
41
- b
41
+ x
42
42
  ]), U = P({
43
43
  entity: p,
44
44
  entityCode: m,
45
- screen: d,
46
- screenCode: t,
45
+ screen: f,
46
+ screenCode: o,
47
47
  page: 1,
48
48
  perPage: le,
49
- sortForRequest: f(b),
50
- debouncedSearch: y,
51
- filters: x.filters,
52
- filterError: !!x.error,
49
+ sortForRequest: te(x),
50
+ debouncedSearch: b,
51
+ filters: S.filters,
52
+ filterError: !!S.error,
53
53
  includeDeleted: !1,
54
54
  expand: N.expandFields,
55
55
  select: N.selectFields,
56
56
  runCountQuery: !1,
57
- urlKey: `${m ?? ""}|${i.toString()}`
57
+ urlKey: `${m ?? ""}|${s.toString()}`
58
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
- o((t) => {
59
+ c((t) => {
60
60
  let n = new URLSearchParams(t);
61
61
  return e ? n.set("selected", e) : n.delete("selected"), n;
62
62
  }, { replace: t?.replace ?? !0 });
63
- }, [o]), fe = F((e) => {
64
- o((t) => {
63
+ }, [c]), fe = F((e) => {
64
+ c((t) => {
65
65
  let n = new URLSearchParams(t);
66
66
  return e ? n.set("search", e) : n.delete("search"), n;
67
67
  }, { replace: !0 });
68
- }, [o]), pe = F((e, t) => {
69
- o((n) => {
68
+ }, [c]), pe = F((e, t) => {
69
+ c((n) => {
70
70
  let r = new URLSearchParams(n), i = A(n).filters, a;
71
71
  return a = t && t !== "__all__" ? [...M(i, e), k(e, t)] : M(i, e), j(a, r), r;
72
72
  }, { replace: !0 });
73
- }, [o]), Y = (d?.list_resizable ?? !1) && w === "split" && c.category !== "phone" && !c.touch, X = R(null), [Z, Q] = z(null), me = R(!1), $ = d?.list_width;
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
74
  I(() => {
75
- !Y || !$?.endsWith("%") || Q(null);
75
+ Y && $?.endsWith("%") && Q(null);
76
76
  }, [
77
77
  Y,
78
78
  $,
79
- c.width,
80
- c.height
79
+ d.width,
80
+ d.height
81
81
  ]), I(() => {
82
82
  if (!Y || Z !== null) return;
83
83
  let e = X.current;
@@ -108,8 +108,8 @@ function U({ screenCode: t }) {
108
108
  };
109
109
  document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", r), document.addEventListener("mouseup", i), he.current = i;
110
110
  }, [Z]);
111
- if (!s || !d || !p) return null;
112
- let _e = S?.length ?? 0, ve = w === "split" || w === "stacked" || !_, ye = w === "split" || w === "stacked" || !!_, be = w !== "split" && _ ? () => J(null, { replace: !0 }) : void 0, xe = w === "split" ? Y && Z !== null ? Z : d.list_width ?? "320px" : "100%";
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%";
113
113
  return /* @__PURE__ */ H("div", {
114
114
  ref: X,
115
115
  "data-record-list-presentation": w,
@@ -138,39 +138,39 @@ function U({ screenCode: t }) {
138
138
  style: {
139
139
  paddingTop: 12,
140
140
  paddingBottom: 12,
141
- ...re(12),
141
+ ...ne(12),
142
142
  display: "flex",
143
143
  flexDirection: "column",
144
144
  gap: 8,
145
145
  borderBottom: "1px solid var(--divider)"
146
146
  },
147
147
  children: [
148
- h.hasOriginBack && /* @__PURE__ */ H("div", {
148
+ g.hasOriginBack && /* @__PURE__ */ H("div", {
149
149
  style: {
150
150
  display: "flex",
151
151
  alignItems: "center",
152
152
  gap: 8
153
153
  },
154
- children: [/* @__PURE__ */ V(r, {
154
+ children: [/* @__PURE__ */ V(n, {
155
155
  icon: /* @__PURE__ */ V(e.back, { size: 14 }),
156
156
  title: "Back",
157
- onClick: h.goBack
157
+ onClick: g.goBack
158
158
  }), /* @__PURE__ */ V("span", {
159
159
  style: {
160
160
  fontSize: 12.5,
161
161
  fontWeight: 600,
162
162
  color: "var(--text)"
163
163
  },
164
- children: l(d.display?.name) || l(p.display.name_plural)
164
+ children: h(f.display?.name) || h(p.display.name_plural)
165
165
  })]
166
166
  }),
167
- /* @__PURE__ */ V(g, {
168
- value: v,
167
+ /* @__PURE__ */ V(i, {
168
+ value: y,
169
169
  onChange: fe,
170
- placeholder: `Search ${l(p.display.name_plural)}…`,
170
+ placeholder: `Search ${h(p.display.name_plural)}…`,
171
171
  prefix: /* @__PURE__ */ V(e.search, { size: 13 })
172
172
  }),
173
- x.error && /* @__PURE__ */ H("div", {
173
+ S.error && /* @__PURE__ */ H("div", {
174
174
  role: "alert",
175
175
  "data-testid": "record-list-filter-url-error",
176
176
  style: {
@@ -180,31 +180,31 @@ function U({ screenCode: t }) {
180
180
  color: "var(--danger)",
181
181
  fontSize: 11.5
182
182
  },
183
- children: [x.error, " Showing this list without URL filters."]
183
+ children: [S.error, " Showing this list without URL filters."]
184
184
  }),
185
- d.filters && d.filters.length > 0 && /* @__PURE__ */ V("div", {
185
+ f.filters && f.filters.length > 0 && /* @__PURE__ */ V("div", {
186
186
  style: {
187
187
  display: "flex",
188
188
  flexWrap: "wrap",
189
189
  gap: 6
190
190
  },
191
- children: d.filters.map((e) => {
192
- let t = p.fields.get(e);
193
- if (!t?.values) return null;
194
- let n = S?.find((t) => t.field === e && t.op === "eq")?.value ?? "__all__", r = a(t, e, s.entities), i = [{
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 = [{
195
195
  value: "__all__",
196
- label: `All ${r}`
197
- }, ...t.values.map((e) => ({
196
+ label: `All ${a}`
197
+ }, ...n.values.map((e) => ({
198
198
  value: e.code,
199
- label: l(e.name) || e.code
199
+ label: h(e.name) || e.code
200
200
  }))];
201
201
  return /* @__PURE__ */ V("div", {
202
202
  style: { minWidth: 120 },
203
- children: /* @__PURE__ */ V(te, {
204
- value: n,
205
- options: i,
203
+ children: /* @__PURE__ */ V(r, {
204
+ value: i,
205
+ options: o,
206
206
  onChange: (t) => pe(e, t),
207
- placeholder: r
207
+ placeholder: a
208
208
  })
209
209
  }, e);
210
210
  })
@@ -217,8 +217,8 @@ function U({ screenCode: t }) {
217
217
  fontSize: 11,
218
218
  color: "var(--text-3)"
219
219
  },
220
- children: [/* @__PURE__ */ V("span", { children: K ? "Loading…" : `${W.length} ${l(p.display.name_plural)}` }), _e > 0 && /* @__PURE__ */ V("button", {
221
- onClick: () => o((e) => {
220
+ children: [/* @__PURE__ */ V("span", { children: K ? "Loading…" : `${W.length} ${h(p.display.name_plural)}` }), _e > 0 && /* @__PURE__ */ V("button", {
221
+ onClick: () => c((e) => {
222
222
  let t = new URLSearchParams(e);
223
223
  return t.delete("filters"), t;
224
224
  }, { replace: !0 }),
@@ -273,7 +273,7 @@ function U({ screenCode: t }) {
273
273
  card: O,
274
274
  presentation: E,
275
275
  refs: G,
276
- isSelected: t === _,
276
+ isSelected: t === v,
277
277
  onClick: () => J(t, { replace: w === "split" })
278
278
  }, t);
279
279
  }), U.isCursor && U.hasMorePages && /* @__PURE__ */ V("button", {
@@ -316,15 +316,15 @@ function U({ screenCode: t }) {
316
316
  overflow: "hidden",
317
317
  height: w === "stacked" ? "50%" : "100%"
318
318
  },
319
- children: _ ? /* @__PURE__ */ V(de, {
319
+ children: v ? /* @__PURE__ */ V(de, {
320
320
  entityCode: m,
321
- recordId: _,
322
- items: d.items,
323
- schema: s,
321
+ recordId: v,
322
+ items: f.items,
323
+ schema: u,
324
324
  entity: p,
325
325
  onBackToList: be,
326
326
  relatedRecordsPresentation: ae
327
- }, _) : /* @__PURE__ */ V("div", {
327
+ }, v) : /* @__PURE__ */ V("div", {
328
328
  style: {
329
329
  display: "flex",
330
330
  alignItems: "center",
@@ -336,7 +336,7 @@ function U({ screenCode: t }) {
336
336
  style: { fontSize: 12.5 },
337
337
  children: [
338
338
  "Select a ",
339
- l(p.display.name),
339
+ h(p.display.name),
340
340
  " to view details"
341
341
  ]
342
342
  })
@@ -381,7 +381,7 @@ function ue({ record: e, entity: t, columns: n, card: r, presentation: i, refs:
381
381
  color: "var(--text-3)",
382
382
  overflowWrap: "anywhere"
383
383
  },
384
- children: x({
384
+ children: S({
385
385
  entity: t,
386
386
  fieldName: r.subtitleField,
387
387
  record: e,
@@ -406,7 +406,7 @@ function ue({ record: e, entity: t, columns: n, card: r, presentation: i, refs:
406
406
  maxWidth: "100%",
407
407
  overflowWrap: "anywhere"
408
408
  },
409
- children: x({
409
+ children: S({
410
410
  entity: t,
411
411
  fieldName: n,
412
412
  record: e,
@@ -444,7 +444,7 @@ function ue({ record: e, entity: t, columns: n, card: r, presentation: i, refs:
444
444
  minWidth: 0,
445
445
  overflowWrap: "anywhere"
446
446
  },
447
- children: x({
447
+ children: S({
448
448
  entity: t,
449
449
  fieldName: n,
450
450
  record: e,
@@ -490,7 +490,7 @@ function ue({ record: e, entity: t, columns: n, card: r, presentation: i, refs:
490
490
  whiteSpace: "nowrap",
491
491
  color: "var(--text)"
492
492
  },
493
- children: x({
493
+ children: S({
494
494
  entity: t,
495
495
  fieldName: l,
496
496
  record: e,
@@ -513,7 +513,7 @@ function ue({ record: e, entity: t, columns: n, card: r, presentation: i, refs:
513
513
  textOverflow: "ellipsis",
514
514
  whiteSpace: "nowrap"
515
515
  },
516
- children: x({
516
+ children: S({
517
517
  entity: t,
518
518
  fieldName: u,
519
519
  record: e,
@@ -528,9 +528,9 @@ function ue({ record: e, entity: t, columns: n, card: r, presentation: i, refs:
528
528
  gap: 4,
529
529
  flexShrink: 0
530
530
  },
531
- children: d.map((n) => y(t, e, n) == null ? null : /* @__PURE__ */ V("div", {
531
+ children: d.map((n) => b(t, e, n) == null ? null : /* @__PURE__ */ V("div", {
532
532
  style: { fontSize: 11 },
533
- children: x({
533
+ children: S({
534
534
  entity: t,
535
535
  fieldName: n,
536
536
  record: e,
@@ -544,11 +544,11 @@ function ue({ record: e, entity: t, columns: n, card: r, presentation: i, refs:
544
544
  });
545
545
  }
546
546
  function W(e, t, n) {
547
- let r = y(e, t, n);
547
+ let r = b(e, t, n);
548
548
  return !(r == null || r === "" || Array.isArray(r) && r.length === 0);
549
549
  }
550
550
  function G({ entity: e, record: t, field: n, refs: r }) {
551
- let i = p(), a = c(t, e), o = n ? x({
551
+ let i = p(), a = f(t, e), o = n ? S({
552
552
  entity: e,
553
553
  fieldName: n,
554
554
  record: t,
@@ -563,13 +563,13 @@ function G({ entity: e, record: t, field: n, refs: r }) {
563
563
  color: "var(--text)",
564
564
  overflowWrap: "anywhere"
565
565
  },
566
- children: o || l(e.display.name)
566
+ children: o || h(e.display.name)
567
567
  });
568
568
  }
569
- function K({ entity: e, record: t, fieldName: n, refs: r, locale: i }) {
570
- let o = y(e, t, n);
569
+ function K({ entity: e, record: n, fieldName: r, refs: i, locale: a }) {
570
+ let o = b(e, n, r);
571
571
  if (o == null || o === "") return null;
572
- let s = e.fields.get(n);
572
+ let s = e.fields.get(r);
573
573
  return s ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("dt", {
574
574
  style: {
575
575
  color: "var(--text-3)",
@@ -577,7 +577,7 @@ function K({ entity: e, record: t, fieldName: n, refs: r, locale: i }) {
577
577
  minWidth: 0,
578
578
  overflowWrap: "anywhere"
579
579
  },
580
- children: a(s, n)
580
+ children: t(s, r)
581
581
  }), /* @__PURE__ */ V("dd", {
582
582
  style: {
583
583
  margin: 0,
@@ -586,18 +586,18 @@ function K({ entity: e, record: t, fieldName: n, refs: r, locale: i }) {
586
586
  minWidth: 0,
587
587
  overflowWrap: "anywhere"
588
588
  },
589
- children: x({
589
+ children: S({
590
590
  entity: e,
591
- fieldName: n,
592
- record: t,
591
+ fieldName: r,
592
+ record: n,
593
593
  mode: "display",
594
- refs: r,
595
- locale: i
594
+ refs: i,
595
+ locale: a
596
596
  })
597
597
  })] }) : null;
598
598
  }
599
599
  function de({ entityCode: e, recordId: t, items: n, schema: r, entity: i, onBackToList: a, relatedRecordsPresentation: o }) {
600
- return /* @__PURE__ */ V(d, { children: /* @__PURE__ */ V(q, {
600
+ return /* @__PURE__ */ V(g, { children: /* @__PURE__ */ V(q, {
601
601
  entityCode: e,
602
602
  recordId: t,
603
603
  items: n,
@@ -607,53 +607,53 @@ function de({ entityCode: e, recordId: t, items: n, schema: r, entity: i, onBack
607
607
  relatedRecordsPresentation: o
608
608
  }) });
609
609
  }
610
- function q({ entityCode: n, recordId: a, items: u, schema: d, entity: f, onBackToList: p, relatedRecordsPresentation: te }) {
611
- let g = o(f, "update"), ne = L(() => a ? m(f, a) : void 0, [a, f]), { data: re, isLoading: ie } = _(n, ne), x = v(n), T = h(), [D, k] = z(!1), [A, j] = z({}), M = re?.data, oe = M?.$statuses, se = M?.$properties, P = O(n, a), I = ae(n, a), R = L(() => {
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(() => {
612
612
  let e = /* @__PURE__ */ new Set();
613
- for (let [t, n] of f.fields) !n.auto && !n.primary && e.add(t);
614
- for (let [t] of f.files ?? []) e.add(t);
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);
615
615
  return e;
616
- }, [f]), ce = F(() => {
616
+ }, [l]), ce = F(() => {
617
617
  if (M) {
618
618
  let e = {};
619
619
  R.forEach((t) => {
620
- let n = y(f, M, t);
621
- e[t] = S(f, t) ? n ?? null : n ?? "";
620
+ let n = b(l, M, t);
621
+ e[t] = ie(l, t) ? n ?? null : n ?? "";
622
622
  }), j(e);
623
623
  }
624
624
  k(!0);
625
625
  }, [
626
626
  M,
627
627
  R,
628
- f
628
+ l
629
629
  ]), le = F(async () => {
630
630
  await T.flushAllDrafts(), k(!1), j({});
631
631
  }, [T]), U = F(() => {
632
632
  let e = {}, t = E({
633
- entity: f,
633
+ entity: l,
634
634
  formData: A,
635
635
  record: M,
636
636
  isNew: !1
637
637
  }), n = w(t);
638
- for (let [t, n] of Object.entries(A)) f.files?.has(t) || (e[t] = b(f, t, n));
638
+ for (let [t, n] of Object.entries(A)) l.files?.has(t) || (e[t] = x(l, t, n));
639
639
  if (Object.keys(t).length > 0 && (e.$files = t), Object.keys(e).length === 0) {
640
640
  k(!1), j({});
641
641
  return;
642
642
  }
643
- x.mutate({
644
- pkValues: a,
643
+ S.mutate({
644
+ pkValues: r,
645
645
  data: e
646
646
  }, {
647
647
  onSuccess: () => {
648
- n.forEach((e) => T.markCommitted(e)), k(!1), j({}), s.success("Saved");
648
+ n.forEach((e) => T.markCommitted(e)), k(!1), j({}), m.success("Saved");
649
649
  },
650
- onError: () => s.error("Failed to save")
650
+ onError: () => m.error("Failed to save")
651
651
  });
652
652
  }, [
653
653
  T,
654
- x,
655
- a,
656
- f,
654
+ S,
655
+ r,
656
+ l,
657
657
  A,
658
658
  M
659
659
  ]), ue = F((e, t) => {
@@ -662,13 +662,13 @@ function q({ entityCode: n, recordId: a, items: u, schema: d, entity: f, onBackT
662
662
  [e]: t
663
663
  }));
664
664
  }, []);
665
- if (ie) return /* @__PURE__ */ V(C, {});
665
+ if (re) return /* @__PURE__ */ V(C, {});
666
666
  if (!M) return null;
667
- let W = c(M, f), G = f.display?.display_field, K = W ? void 0 : G ? M[G] : M[f.fields.names()[0]], de = W || (K != null && typeof K != "object" ? ee(K) : l(f.display.name)), q = M?.$refs, J = {
668
- schema: d,
669
- entity: f,
670
- entityCode: n,
671
- recordId: a,
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
672
  record: D ? {
673
673
  ...M,
674
674
  ...A
@@ -678,18 +678,18 @@ function q({ entityCode: n, recordId: a, items: u, schema: d, entity: f, onBackT
678
678
  onFieldChange: D ? ue : void 0,
679
679
  refs: q,
680
680
  objectProperties: se ?? void 0,
681
- onSetProperty: g ? (e, t) => I.mutate({
681
+ onSetProperty: _ ? (e, t) => I.mutate({
682
682
  propertyCode: e,
683
683
  value: t
684
684
  }) : void 0,
685
685
  isPropertyPending: I.isPending,
686
686
  objectStatuses: oe ?? void 0,
687
- onSetStatus: g ? (e, t) => P.mutate({
687
+ onSetStatus: _ ? (e, t) => P.mutate({
688
688
  groupCode: e,
689
689
  statusCode: t
690
690
  }) : void 0,
691
691
  isStatusPending: P.isPending,
692
- relatedRecordsPresentation: te
692
+ relatedRecordsPresentation: g
693
693
  };
694
694
  return /* @__PURE__ */ H("div", {
695
695
  style: {
@@ -726,23 +726,23 @@ function q({ entityCode: n, recordId: a, items: u, schema: d, entity: f, onBackT
726
726
  alignItems: "center",
727
727
  gap: 6
728
728
  },
729
- children: [p && /* @__PURE__ */ V(r, {
729
+ children: [p && /* @__PURE__ */ V(n, {
730
730
  icon: /* @__PURE__ */ V(e.back, { size: 14 }),
731
731
  title: "Back to list",
732
732
  onClick: p
733
- }), g && (D ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(i, {
733
+ }), _ && (D ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(s, {
734
734
  size: "xs",
735
735
  icon: /* @__PURE__ */ V(e.x, { size: 12 }),
736
736
  onClick: le,
737
737
  children: "Cancel"
738
- }), /* @__PURE__ */ V(i, {
738
+ }), /* @__PURE__ */ V(s, {
739
739
  kind: "primary",
740
740
  size: "xs",
741
- icon: x.isPending ? /* @__PURE__ */ V(t, { size: 12 }) : /* @__PURE__ */ V(e.save, { size: 12 }),
741
+ icon: S.isPending ? /* @__PURE__ */ V(o, { size: 12 }) : /* @__PURE__ */ V(e.save, { size: 12 }),
742
742
  onClick: U,
743
- disabled: x.isPending,
744
- children: x.isPending ? "Saving…" : "Save"
745
- })] }) : /* @__PURE__ */ V(i, {
743
+ disabled: S.isPending,
744
+ children: S.isPending ? "Saving…" : "Save"
745
+ })] }) : /* @__PURE__ */ V(s, {
746
746
  size: "xs",
747
747
  icon: /* @__PURE__ */ V(e.edit, { size: 12 }),
748
748
  onClick: ce,
@@ -758,8 +758,8 @@ function q({ entityCode: n, recordId: a, items: u, schema: d, entity: f, onBackT
758
758
  flexDirection: "column",
759
759
  gap: 12
760
760
  },
761
- children: u && u.length > 0 ? /* @__PURE__ */ V(N, {
762
- nodes: u,
761
+ children: i && i.length > 0 ? /* @__PURE__ */ V(N, {
762
+ nodes: i,
763
763
  ctx: J
764
764
  }) : /* @__PURE__ */ H("p", {
765
765
  style: {
@@ -1,5 +1,5 @@
1
1
  import { s as e } from "./DynamicIcon-DW5krHuX.js";
2
- import { Mr as t, wr as n } from "./useCurrentScreen-DVTXCj_K.js";
2
+ import { Lr as t, kr as n } from "./useCurrentScreen-CzwzQpoW.js";
3
3
  import { useRef as r, useState as i } from "react";
4
4
  import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
5
5
  //#region src/components/pages/list/SortHeaderMenu.tsx