@object-ui/plugin-detail 3.1.5 → 3.3.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 (143) hide show
  1. package/.turbo/turbo-build.log +50 -47
  2. package/CHANGELOG.md +20 -0
  3. package/dist/{AddressField-DBkEyMcG.js → AddressField-CDLSeyNx.js} +1 -1
  4. package/dist/{AutoNumberField-Baa191z-.js → AutoNumberField-CtE7suf5.js} +1 -1
  5. package/dist/{AvatarField-YGj51ozd.js → AvatarField-Xuieq0ZI.js} +1 -1
  6. package/dist/{BooleanField-CaA898Tk.js → BooleanField-DwfMKknK.js} +1 -1
  7. package/dist/{CodeField-BU51nl1L.js → CodeField-CfwgRxx2.js} +1 -1
  8. package/dist/{ColorField-Cnf6ZM7c.js → ColorField-YKHA7dBD.js} +1 -1
  9. package/dist/{CurrencyField-Wg-XOId2.js → CurrencyField-tvS3fPAF.js} +1 -1
  10. package/dist/{DateField-Cth1ky_m.js → DateField-BKqXpkOh.js} +1 -1
  11. package/dist/{DateTimeField-B0m6FhHL.js → DateTimeField-CR-nJCE7.js} +1 -1
  12. package/dist/{EmailField-Do7qT_L_.js → EmailField-CgvW1Qal.js} +1 -1
  13. package/dist/{FileField-aRJAdbQb.js → FileField-BVAme2ML.js} +1 -1
  14. package/dist/{FormulaField-DTMkagFx.js → FormulaField-DamJ2VaG.js} +1 -1
  15. package/dist/{GeolocationField-RqpHWTEv.js → GeolocationField-C99z7ZBM.js} +1 -1
  16. package/dist/{GridField-D4IH0cpo.js → GridField-C9JbpTx_.js} +1 -1
  17. package/dist/{ImageField-BYCFajjr.js → ImageField-CDANtgVV.js} +1 -1
  18. package/dist/{LocationField-Bi_ew9sd.js → LocationField-ZSyZ0O-h.js} +1 -1
  19. package/dist/{LookupField-BjwlDPtt.js → LookupField-B3hQJt95.js} +307 -306
  20. package/dist/LookupField-D00z6gn_.js +2 -0
  21. package/dist/{MasterDetailField-I1A9oEGC.js → MasterDetailField-B0HTmmD7.js} +1 -1
  22. package/dist/{NumberField-D_NucQlp.js → NumberField-DL2QAL7X.js} +1 -1
  23. package/dist/{ObjectField-CG-LaM65.js → ObjectField-JYvUnuRO.js} +1 -1
  24. package/dist/{PasswordField-DBtluGJ1.js → PasswordField-DVTimsc3.js} +1 -1
  25. package/dist/{PercentField-B6sO_J3i.js → PercentField-DjR6BSpw.js} +1 -1
  26. package/dist/{PhoneField-CcQAWwR6.js → PhoneField-CX1JL-jp.js} +1 -1
  27. package/dist/{QRCodeField-CEjWs-J5.js → QRCodeField-CH_1pU6R.js} +1 -1
  28. package/dist/{RatingField-B_Mnr63i.js → RatingField-rRi_P0N0.js} +1 -1
  29. package/dist/{RichTextField-qOEJl5Ai.js → RichTextField-CJqLWlrb.js} +1 -1
  30. package/dist/SelectField-DGoDoRM_.js +30 -0
  31. package/dist/SelectField-XBVI50AD.js +2 -0
  32. package/dist/{SignatureField-CddhEK9u.js → SignatureField-2CnhcWI0.js} +1 -1
  33. package/dist/{SliderField-Df5hMzNc.js → SliderField-DEpMVXko.js} +1 -1
  34. package/dist/{SummaryField-DgiFm-Cr.js → SummaryField-7ch9aqAu.js} +1 -1
  35. package/dist/{TextAreaField-DuriTqsD.js → TextAreaField-Cmw1oXcw.js} +1 -1
  36. package/dist/{TextField-CGNSl7RU.js → TextField-OTLa3p51.js} +1 -1
  37. package/dist/{TimeField-YO58ctFg.js → TimeField-DKPoNWoR.js} +1 -1
  38. package/dist/{UrlField-1-BMM1jn.js → UrlField-CxbmzP9f.js} +1 -1
  39. package/dist/{UserField-B6GqxP_S.js → UserField-ChvwUkMK.js} +1 -1
  40. package/dist/{VectorField-BkEjbSt0.js → VectorField-BVClL8Vw.js} +1 -1
  41. package/dist/index.d.ts +1 -1
  42. package/dist/index.js +1252 -1199
  43. package/dist/index.umd.cjs +47 -46
  44. package/dist/packages/plugin-detail/src/ActivityTimeline.d.ts.map +1 -0
  45. package/dist/packages/plugin-detail/src/CommentAttachment.d.ts.map +1 -0
  46. package/dist/packages/plugin-detail/src/CommentInput.d.ts.map +1 -0
  47. package/dist/packages/plugin-detail/src/DetailSection.d.ts.map +1 -0
  48. package/dist/packages/plugin-detail/src/DetailTabs.d.ts.map +1 -0
  49. package/dist/packages/plugin-detail/src/DetailView.d.ts.map +1 -0
  50. package/dist/packages/plugin-detail/src/DetailView.stories.d.ts.map +1 -0
  51. package/dist/packages/plugin-detail/src/DiffView.d.ts.map +1 -0
  52. package/dist/packages/plugin-detail/src/FieldChangeItem.d.ts.map +1 -0
  53. package/dist/packages/plugin-detail/src/HeaderHighlight.d.ts.map +1 -0
  54. package/dist/packages/plugin-detail/src/InlineCreateRelated.d.ts.map +1 -0
  55. package/dist/packages/plugin-detail/src/MentionAutocomplete.d.ts.map +1 -0
  56. package/dist/packages/plugin-detail/src/PointInTimeRestore.d.ts.map +1 -0
  57. package/dist/packages/plugin-detail/src/ReactionPicker.d.ts.map +1 -0
  58. package/dist/packages/plugin-detail/src/RecordActivityTimeline.d.ts.map +1 -0
  59. package/dist/packages/plugin-detail/src/RecordChatterPanel.d.ts.map +1 -0
  60. package/dist/packages/plugin-detail/src/RecordComments.d.ts.map +1 -0
  61. package/dist/packages/plugin-detail/src/RecordNavigationEnhanced.d.ts.map +1 -0
  62. package/dist/packages/plugin-detail/src/RelatedList.d.ts.map +1 -0
  63. package/dist/packages/plugin-detail/src/RelationshipGraph.d.ts.map +1 -0
  64. package/dist/packages/plugin-detail/src/RichTextCommentInput.d.ts.map +1 -0
  65. package/dist/packages/plugin-detail/src/SectionGroup.d.ts.map +1 -0
  66. package/dist/packages/plugin-detail/src/SubscriptionToggle.d.ts.map +1 -0
  67. package/dist/packages/plugin-detail/src/ThreadedReplies.d.ts.map +1 -0
  68. package/dist/packages/plugin-detail/src/autoLayout.d.ts.map +1 -0
  69. package/dist/packages/plugin-detail/src/index.d.ts.map +1 -0
  70. package/dist/packages/plugin-detail/src/useDetailTranslation.d.ts.map +1 -0
  71. package/dist/plugin-detail.css +1 -1
  72. package/dist/{src-CXr1-vVl.js → src-C56Ly5uG.js} +35777 -35335
  73. package/dist/useFieldTranslation-CkxqyB82.js +9 -0
  74. package/package.json +10 -10
  75. package/src/CommentAttachment.tsx +5 -3
  76. package/src/DiffView.tsx +7 -5
  77. package/src/RecordActivityTimeline.tsx +21 -17
  78. package/src/RecordChatterPanel.tsx +9 -7
  79. package/src/RecordComments.tsx +11 -9
  80. package/src/RecordNavigationEnhanced.tsx +9 -7
  81. package/src/RichTextCommentInput.tsx +11 -9
  82. package/src/SubscriptionToggle.tsx +4 -2
  83. package/src/ThreadedReplies.tsx +4 -2
  84. package/src/__tests__/RecordActivityTimeline.test.tsx +9 -9
  85. package/src/__tests__/RecordChatterPanel.test.tsx +6 -6
  86. package/src/__tests__/RecordCommentsPinSearch.test.tsx +6 -6
  87. package/src/useDetailTranslation.ts +69 -0
  88. package/vite.config.ts +1 -0
  89. package/dist/SelectField-C8hWu3gm.js +0 -30
  90. package/dist/src/ActivityTimeline.d.ts.map +0 -1
  91. package/dist/src/CommentAttachment.d.ts.map +0 -1
  92. package/dist/src/CommentInput.d.ts.map +0 -1
  93. package/dist/src/DetailSection.d.ts.map +0 -1
  94. package/dist/src/DetailTabs.d.ts.map +0 -1
  95. package/dist/src/DetailView.d.ts.map +0 -1
  96. package/dist/src/DetailView.stories.d.ts.map +0 -1
  97. package/dist/src/DiffView.d.ts.map +0 -1
  98. package/dist/src/FieldChangeItem.d.ts.map +0 -1
  99. package/dist/src/HeaderHighlight.d.ts.map +0 -1
  100. package/dist/src/InlineCreateRelated.d.ts.map +0 -1
  101. package/dist/src/MentionAutocomplete.d.ts.map +0 -1
  102. package/dist/src/PointInTimeRestore.d.ts.map +0 -1
  103. package/dist/src/ReactionPicker.d.ts.map +0 -1
  104. package/dist/src/RecordActivityTimeline.d.ts.map +0 -1
  105. package/dist/src/RecordChatterPanel.d.ts.map +0 -1
  106. package/dist/src/RecordComments.d.ts.map +0 -1
  107. package/dist/src/RecordNavigationEnhanced.d.ts.map +0 -1
  108. package/dist/src/RelatedList.d.ts.map +0 -1
  109. package/dist/src/RelationshipGraph.d.ts.map +0 -1
  110. package/dist/src/RichTextCommentInput.d.ts.map +0 -1
  111. package/dist/src/SectionGroup.d.ts.map +0 -1
  112. package/dist/src/SubscriptionToggle.d.ts.map +0 -1
  113. package/dist/src/ThreadedReplies.d.ts.map +0 -1
  114. package/dist/src/autoLayout.d.ts.map +0 -1
  115. package/dist/src/index.d.ts.map +0 -1
  116. package/dist/src/useDetailTranslation.d.ts.map +0 -1
  117. /package/dist/{src → packages/plugin-detail/src}/ActivityTimeline.d.ts +0 -0
  118. /package/dist/{src → packages/plugin-detail/src}/CommentAttachment.d.ts +0 -0
  119. /package/dist/{src → packages/plugin-detail/src}/CommentInput.d.ts +0 -0
  120. /package/dist/{src → packages/plugin-detail/src}/DetailSection.d.ts +0 -0
  121. /package/dist/{src → packages/plugin-detail/src}/DetailTabs.d.ts +0 -0
  122. /package/dist/{src → packages/plugin-detail/src}/DetailView.d.ts +0 -0
  123. /package/dist/{src → packages/plugin-detail/src}/DetailView.stories.d.ts +0 -0
  124. /package/dist/{src → packages/plugin-detail/src}/DiffView.d.ts +0 -0
  125. /package/dist/{src → packages/plugin-detail/src}/FieldChangeItem.d.ts +0 -0
  126. /package/dist/{src → packages/plugin-detail/src}/HeaderHighlight.d.ts +0 -0
  127. /package/dist/{src → packages/plugin-detail/src}/InlineCreateRelated.d.ts +0 -0
  128. /package/dist/{src → packages/plugin-detail/src}/MentionAutocomplete.d.ts +0 -0
  129. /package/dist/{src → packages/plugin-detail/src}/PointInTimeRestore.d.ts +0 -0
  130. /package/dist/{src → packages/plugin-detail/src}/ReactionPicker.d.ts +0 -0
  131. /package/dist/{src → packages/plugin-detail/src}/RecordActivityTimeline.d.ts +0 -0
  132. /package/dist/{src → packages/plugin-detail/src}/RecordChatterPanel.d.ts +0 -0
  133. /package/dist/{src → packages/plugin-detail/src}/RecordComments.d.ts +0 -0
  134. /package/dist/{src → packages/plugin-detail/src}/RecordNavigationEnhanced.d.ts +0 -0
  135. /package/dist/{src → packages/plugin-detail/src}/RelatedList.d.ts +0 -0
  136. /package/dist/{src → packages/plugin-detail/src}/RelationshipGraph.d.ts +0 -0
  137. /package/dist/{src → packages/plugin-detail/src}/RichTextCommentInput.d.ts +0 -0
  138. /package/dist/{src → packages/plugin-detail/src}/SectionGroup.d.ts +0 -0
  139. /package/dist/{src → packages/plugin-detail/src}/SubscriptionToggle.d.ts +0 -0
  140. /package/dist/{src → packages/plugin-detail/src}/ThreadedReplies.d.ts +0 -0
  141. /package/dist/{src → packages/plugin-detail/src}/autoLayout.d.ts +0 -0
  142. /package/dist/{src → packages/plugin-detail/src}/index.d.ts +0 -0
  143. /package/dist/{src → packages/plugin-detail/src}/useDetailTranslation.d.ts +0 -0
@@ -1,15 +1,16 @@
1
- import { $ as e, C as t, D as n, E as r, F as i, Gt as a, H as o, I as ee, Jt as te, L as ne, O as s, P as c, R as re, S as ie, T as l, Tt as ae, Yt as oe, Z as u, Zt as se, b as ce, c as d, cn as le, ct as ue, d as de, dt as fe, hn as f, ht as p, in as pe, l as me, nt as m, o as h, pn as g, q as _, rn as he, s as v, u as y, un as b, v as x, w as ge, x as S, y as C } from "./src-CXr1-vVl.js";
2
- import { useCallback as w, useContext as _e, useEffect as T, useMemo as E, useRef as D, useState as O } from "react";
3
- import { Fragment as ve, jsx as k, jsxs as A } from "react/jsx-runtime";
1
+ import { $ as e, C as t, D as n, E as r, F as i, Gt as a, H as o, I as ee, Jt as te, L as ne, O as s, P as c, R as re, S as ie, T as l, Tt as ae, Yt as oe, Z as u, Zt as se, b as ce, c as d, cn as le, ct as ue, d as f, dt as de, ht as fe, in as pe, l as p, mn as m, nt as me, o as he, q as h, rn as g, s as _, u as ge, un as v, v as y, w as _e, x as b, y as ve } from "./src-C56Ly5uG.js";
2
+ import { t as ye } from "./useFieldTranslation-CkxqyB82.js";
3
+ import { useCallback as x, useContext as be, useEffect as S, useMemo as C, useRef as w, useState as T } from "react";
4
+ import { Fragment as xe, jsx as E, jsxs as D } from "react/jsx-runtime";
4
5
  //#region ../fields/src/widgets/RecordPickerDialog.tsx
5
- var ye = 10, j = 60, M = 5;
6
- function be(e) {
6
+ var O = 10, k = 60, Se = 5;
7
+ function A(e) {
7
8
  return typeof e == "string" ? { field: e } : e;
8
9
  }
9
- function xe(e) {
10
+ function j(e) {
10
11
  return e.replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (e) => e.toUpperCase());
11
12
  }
12
- function Se(e) {
13
+ function Ce(e) {
13
14
  let t = {};
14
15
  for (let n of e) switch (n.operator) {
15
16
  case "eq":
@@ -42,7 +43,7 @@ function Se(e) {
42
43
  }
43
44
  return t;
44
45
  }
45
- function Ce(e, t) {
46
+ function we(e, t) {
46
47
  let n = {};
47
48
  for (let r of t) {
48
49
  let t = e[r.field];
@@ -50,17 +51,17 @@ function Ce(e, t) {
50
51
  }
51
52
  return n;
52
53
  }
53
- function N({ open: r, onOpenChange: l, title: f = "Select Record", multiple: p = !1, dataSource: m, objectName: g, columns: _, displayField: ge = "name", idField: _e = "id", pageSize: N = ye, value: P, onSelect: F, onSelectRecords: we, lookupFilters: I, cellRenderer: Te, filterColumns: Ee, renderFilterBar: De, renderGrid: Oe }) {
54
- let [L, ke] = O([]), [R, Ae] = O(!1), [z, B] = O(null), [V, je] = O(0), [H, Me] = O(""), [U, W] = O(1), G = D(null), [K, Ne] = O(null), [q, Pe] = O("asc"), [Fe, Ie] = O(/* @__PURE__ */ new Set()), Le = D(/* @__PURE__ */ new Map()), [J, Re] = O(-1), ze = D(null), [Be, Ve] = O(!1), [Y, He] = O({}), [Ue, We] = O({}), X = D(null), [Ge, Ke] = O(""), qe = E(() => _ && _.length > 0 ? _.map(be) : [{
55
- field: ge,
56
- label: xe(ge)
57
- }], [_, ge]), Z = E(() => {
58
- if (Ee && Ee.length > 0) return Ee;
59
- if (I && I.length > 0) return I.map((e) => {
54
+ function M({ open: r, onOpenChange: l, title: fe = "Select Record", multiple: m = !1, dataSource: me, objectName: h, columns: _e, displayField: ye = "name", idField: be = "id", pageSize: M = O, value: N, onSelect: P, onSelectRecords: Te, lookupFilters: F, cellRenderer: Ee, filterColumns: I, renderFilterBar: De, renderGrid: Oe }) {
55
+ let [L, R] = T([]), [z, ke] = T(!1), [B, V] = T(null), [H, Ae] = T(0), [je, Me] = T(""), [U, W] = T(1), G = w(null), [K, Ne] = T(null), [q, Pe] = T("asc"), [Fe, Ie] = T(/* @__PURE__ */ new Set()), Le = w(/* @__PURE__ */ new Map()), [J, Re] = T(-1), ze = w(null), [Be, Ve] = T(!1), [Y, He] = T({}), [Ue, We] = T({}), X = w(null), [Ge, Ke] = T(""), qe = C(() => _e && _e.length > 0 ? _e.map(A) : [{
56
+ field: ye,
57
+ label: j(ye)
58
+ }], [_e, ye]), Z = C(() => {
59
+ if (I && I.length > 0) return I;
60
+ if (F && F.length > 0) return F.map((e) => {
60
61
  let t = "text";
61
62
  return typeof e.value == "boolean" ? t = "boolean" : Array.isArray(e.value) ? t = "select" : typeof e.value == "number" || e.operator === "gt" || e.operator === "lt" || e.operator === "gte" || e.operator === "lte" ? t = "number" : (e.operator === "in" || e.operator === "notIn") && (t = "select"), {
62
63
  field: e.field,
63
- label: xe(e.field),
64
+ label: j(e.field),
64
65
  type: t,
65
66
  ...Array.isArray(e.value) ? { options: e.value.map((e) => {
66
67
  if (typeof e == "object" && e) {
@@ -77,126 +78,126 @@ function N({ open: r, onOpenChange: l, title: f = "Select Record", multiple: p =
77
78
  }) } : {}
78
79
  };
79
80
  });
80
- }, [Ee, I]), Je = E(() => {
81
- let e = I?.length ? Se(I) : {}, t = Z?.length ? Ce(Y, Z) : {}, n = {
81
+ }, [I, F]), Je = C(() => {
82
+ let e = F?.length ? Ce(F) : {}, t = Z?.length ? we(Y, Z) : {}, n = {
82
83
  ...e,
83
84
  ...t
84
85
  };
85
86
  return Object.keys(n).length > 0 ? n : void 0;
86
87
  }, [
87
- I,
88
+ F,
88
89
  Z,
89
90
  Y
90
- ]), Q = Math.max(1, Math.ceil(V / N)), Ye = w(async (e, t = 1, n, r) => {
91
- if (!(!m || !g)) {
92
- Ae(!0), B(null);
91
+ ]), Q = Math.max(1, Math.ceil(H / M)), Ye = x(async (e, t = 1, n, r) => {
92
+ if (!(!me || !h)) {
93
+ ke(!0), V(null);
93
94
  try {
94
95
  let i = {
95
- $top: N,
96
- $skip: (t - 1) * N
96
+ $top: M,
97
+ $skip: (t - 1) * M
97
98
  };
98
99
  e && e.trim() && (i.$search = e.trim()), n && (i.$orderby = { [n.field]: n.direction });
99
100
  let a = r === void 0 ? Je : r;
100
101
  a && Object.keys(a).length > 0 && (i.$filter = a);
101
- let o = await m.find(g, i), ee = o?.data ?? o ?? [];
102
- ke(ee), je(o?.total ?? ee.length), Re(-1);
102
+ let o = await me.find(h, i), ee = o?.data ?? o ?? [];
103
+ R(ee), Ae(o?.total ?? ee.length), Re(-1);
103
104
  } catch (e) {
104
- B(e instanceof Error ? e.message : String(e)), ke([]);
105
+ V(e instanceof Error ? e.message : String(e)), R([]);
105
106
  } finally {
106
- Ae(!1);
107
+ ke(!1);
107
108
  }
108
109
  }
109
110
  }, [
110
- m,
111
- g,
112
- N,
111
+ me,
112
+ h,
113
+ M,
113
114
  Je
114
- ]), Xe = E(() => K ? {
115
+ ]), Xe = C(() => K ? {
115
116
  field: K,
116
117
  direction: q
117
118
  } : null, [K, q]);
118
- T(() => {
119
- r || (Me(""), W(1), B(null), ke([]), Ne(null), Pe("asc"), Re(-1), Ve(!1), He({}), We({}), Ke(""), Ie(new Set(p && Array.isArray(P) ? P : [])), Le.current.clear());
120
- }, [r]), T(() => {
121
- r && Ye(H || void 0, U, Xe);
119
+ S(() => {
120
+ r || (Me(""), W(1), V(null), R([]), Ne(null), Pe("asc"), Re(-1), Ve(!1), He({}), We({}), Ke(""), Ie(new Set(m && Array.isArray(N) ? N : [])), Le.current.clear());
121
+ }, [r]), S(() => {
122
+ r && Ye(je || void 0, U, Xe);
122
123
  }, [
123
124
  r,
124
125
  U,
125
126
  Xe,
126
127
  Je
127
- ]), T(() => {
128
- r && p && Ie(new Set(Array.isArray(P) ? P : []));
128
+ ]), S(() => {
129
+ r && m && Ie(new Set(Array.isArray(N) ? N : []));
129
130
  }, [
130
131
  r,
131
- p,
132
- P
132
+ m,
133
+ N
133
134
  ]);
134
- let Ze = w((e) => {
135
+ let Ze = x((e) => {
135
136
  Me(e), W(1), G.current && clearTimeout(G.current), G.current = setTimeout(() => {
136
137
  Ye(e || void 0, 1, Xe);
137
138
  }, 300);
138
139
  }, [Ye, Xe]);
139
- T(() => () => {
140
+ S(() => () => {
140
141
  G.current && clearTimeout(G.current);
141
142
  }, []);
142
- let Qe = w((e) => {
143
+ let Qe = x((e) => {
143
144
  Ne((t) => t === e ? (Pe((e) => e === "asc" ? "desc" : "asc"), e) : (Pe("asc"), e)), W(1);
144
- }, []), $e = w((e) => e[_e] ?? e.id ?? e._id, [_e]), et = w((e) => {
145
+ }, []), $e = x((e) => e[be] ?? e.id ?? e._id, [be]), et = x((e) => {
145
146
  let t = $e(e);
146
- return p ? Fe.has(t) : P === t;
147
+ return m ? Fe.has(t) : N === t;
147
148
  }, [
148
- p,
149
- P,
149
+ m,
150
+ N,
150
151
  Fe,
151
152
  $e
152
- ]), tt = w((e) => {
153
+ ]), tt = x((e) => {
153
154
  let t = $e(e);
154
- p ? Ie((n) => {
155
+ m ? Ie((n) => {
155
156
  let r = new Set(n);
156
157
  return r.has(t) ? (r.delete(t), Le.current.delete(t)) : (r.add(t), Le.current.set(t, e)), r;
157
- }) : (F(t), we?.([e]), l(!1));
158
+ }) : (P(t), Te?.([e]), l(!1));
158
159
  }, [
159
- p,
160
+ m,
160
161
  $e,
161
- F,
162
- we,
162
+ P,
163
+ Te,
163
164
  l
164
- ]), nt = w(() => {
165
+ ]), nt = x(() => {
165
166
  let e = Array.from(Fe);
166
- F(e);
167
+ P(e);
167
168
  let t = e.map((e) => Le.current.get(e)).filter(Boolean);
168
- we?.(t), l(!1);
169
+ Te?.(t), l(!1);
169
170
  }, [
170
171
  Fe,
171
- F,
172
- we,
172
+ P,
173
+ Te,
173
174
  l
174
- ]), rt = w(() => {
175
+ ]), rt = x(() => {
175
176
  W((e) => Math.max(1, e - 1));
176
- }, []), it = w(() => {
177
+ }, []), it = x(() => {
177
178
  W((e) => Math.min(Q, e + 1));
178
- }, [Q]), at = w((e) => {
179
+ }, [Q]), at = x((e) => {
179
180
  if (e.key !== "Enter") return;
180
181
  let t = parseInt(Ge, 10);
181
182
  !isNaN(t) && t >= 1 && t <= Q && W(t), Ke("");
182
- }, [Ge, Q]), ot = w((e) => {
183
+ }, [Ge, Q]), ot = x((e) => {
183
184
  L.length !== 0 && (e.key === "ArrowDown" ? (e.preventDefault(), Re((e) => Math.min(e + 1, L.length - 1))) : e.key === "ArrowUp" ? (e.preventDefault(), Re((e) => Math.max(e - 1, 0))) : (e.key === "Enter" || e.key === " ") && (e.preventDefault(), J >= 0 && J < L.length && tt(L[J])));
184
185
  }, [
185
186
  L,
186
187
  J,
187
188
  tt
188
189
  ]);
189
- T(() => {
190
+ S(() => {
190
191
  if (J >= 0 && ze.current) {
191
192
  let e = ze.current.querySelector(`[data-row-index="${J}"]`);
192
193
  e && typeof e.scrollIntoView == "function" && e.scrollIntoView({ block: "nearest" });
193
194
  }
194
195
  }, [J]);
195
- let st = w((e, t) => {
196
+ let st = x((e, t) => {
196
197
  let n = e[t.field];
197
- if (t.type && Te) {
198
- let e = Te(t.type);
199
- if (e) return /* @__PURE__ */ k(e, {
198
+ if (t.type && Ee) {
199
+ let e = Ee(t.type);
200
+ if (e) return /* @__PURE__ */ E(e, {
200
201
  value: n,
201
202
  field: {
202
203
  name: t.field,
@@ -205,7 +206,7 @@ function N({ open: r, onOpenChange: l, title: f = "Select Record", multiple: p =
205
206
  });
206
207
  }
207
208
  return n == null ? "" : typeof n == "object" ? n.$numberDecimal ? String(Number(n.$numberDecimal)) : n.$oid ? String(n.$oid) : n.$date ? new Date(n.$date).toLocaleDateString() : n.name || n.label ? String(n.name || n.label) : JSON.stringify(n) : typeof n == "boolean" ? n ? "Yes" : "No" : String(n);
208
- }, [Te]), ct = w((e) => K === e ? k(q === "asc" ? he : le, { className: "ml-1 size-3" }) : /* @__PURE__ */ k(pe, { className: "ml-1 size-3 opacity-40" }), [K, q]), lt = w((e, t, n) => {
209
+ }, [Ee]), ct = x((e) => K === e ? E(q === "asc" ? g : le, { className: "ml-1 size-3" }) : /* @__PURE__ */ E(pe, { className: "ml-1 size-3 opacity-40" }), [K, q]), lt = x((e, t, n) => {
209
210
  e.preventDefault(), e.stopPropagation(), X.current = {
210
211
  field: t,
211
212
  startX: e.clientX,
@@ -213,7 +214,7 @@ function N({ open: r, onOpenChange: l, title: f = "Select Record", multiple: p =
213
214
  };
214
215
  let r = (e) => {
215
216
  if (!X.current) return;
216
- let t = e.clientX - X.current.startX, n = Math.max(j, X.current.startWidth + t);
217
+ let t = e.clientX - X.current.startX, n = Math.max(k, X.current.startWidth + t);
217
218
  We((e) => ({
218
219
  ...e,
219
220
  [X.current.field]: n
@@ -222,39 +223,39 @@ function N({ open: r, onOpenChange: l, title: f = "Select Record", multiple: p =
222
223
  X.current = null, document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", i);
223
224
  };
224
225
  document.addEventListener("mousemove", r), document.addEventListener("mouseup", i);
225
- }, []), $ = w((e, t) => {
226
+ }, []), $ = x((e, t) => {
226
227
  He((n) => ({
227
228
  ...n,
228
229
  [e]: t
229
230
  })), W(1);
230
- }, []), ut = w(() => {
231
+ }, []), ut = x(() => {
231
232
  He({}), W(1);
232
- }, []), dt = E(() => Object.values(Y).filter((e) => e != null && e !== "").length, [Y]), ft = w((e) => {
233
- let r = Y[e.field], i = e.label || xe(e.field);
233
+ }, []), dt = C(() => Object.values(Y).filter((e) => e != null && e !== "").length, [Y]), ft = x((e) => {
234
+ let r = Y[e.field], i = e.label || j(e.field);
234
235
  switch (e.type) {
235
- case "select": return /* @__PURE__ */ A("div", {
236
+ case "select": return /* @__PURE__ */ D("div", {
236
237
  className: "space-y-1",
237
- children: [/* @__PURE__ */ k(s, {
238
+ children: [/* @__PURE__ */ E(s, {
238
239
  className: "text-xs text-muted-foreground",
239
240
  children: i
240
- }), /* @__PURE__ */ A(C, {
241
+ }), /* @__PURE__ */ D(ve, {
241
242
  value: r == null ? "" : String(r),
242
243
  onValueChange: (t) => $(e.field, t),
243
- children: [/* @__PURE__ */ k(ie, {
244
+ children: [/* @__PURE__ */ E(ie, {
244
245
  className: "h-8 text-xs",
245
- children: /* @__PURE__ */ k(t, { placeholder: `Filter ${i}` })
246
- }), /* @__PURE__ */ k(ce, { children: e.options?.map((e) => /* @__PURE__ */ k(S, {
246
+ children: /* @__PURE__ */ E(t, { placeholder: `Filter ${i}` })
247
+ }), /* @__PURE__ */ E(ce, { children: e.options?.map((e) => /* @__PURE__ */ E(b, {
247
248
  value: String(e.value),
248
249
  children: e.label
249
250
  }, String(e.value))) })]
250
251
  })]
251
252
  });
252
- case "number": return /* @__PURE__ */ A("div", {
253
+ case "number": return /* @__PURE__ */ D("div", {
253
254
  className: "space-y-1",
254
- children: [/* @__PURE__ */ k(s, {
255
+ children: [/* @__PURE__ */ E(s, {
255
256
  className: "text-xs text-muted-foreground",
256
257
  children: i
257
- }), /* @__PURE__ */ k(n, {
258
+ }), /* @__PURE__ */ E(n, {
258
259
  type: "number",
259
260
  className: "h-8 text-xs",
260
261
  value: r ?? "",
@@ -265,40 +266,40 @@ function N({ open: r, onOpenChange: l, title: f = "Select Record", multiple: p =
265
266
  }
266
267
  })]
267
268
  });
268
- case "date": return /* @__PURE__ */ A("div", {
269
+ case "date": return /* @__PURE__ */ D("div", {
269
270
  className: "space-y-1",
270
- children: [/* @__PURE__ */ k(s, {
271
+ children: [/* @__PURE__ */ E(s, {
271
272
  className: "text-xs text-muted-foreground",
272
273
  children: i
273
- }), /* @__PURE__ */ k(n, {
274
+ }), /* @__PURE__ */ E(n, {
274
275
  type: "date",
275
276
  className: "h-8 text-xs",
276
277
  value: r ?? "",
277
278
  onChange: (t) => $(e.field, t.target.value)
278
279
  })]
279
280
  });
280
- case "boolean": return /* @__PURE__ */ A("div", {
281
+ case "boolean": return /* @__PURE__ */ D("div", {
281
282
  className: "space-y-1",
282
- children: [/* @__PURE__ */ k(s, {
283
+ children: [/* @__PURE__ */ E(s, {
283
284
  className: "text-xs text-muted-foreground",
284
285
  children: i
285
- }), /* @__PURE__ */ A("div", {
286
+ }), /* @__PURE__ */ D("div", {
286
287
  className: "flex items-center gap-2 h-8",
287
- children: [/* @__PURE__ */ k(o, {
288
+ children: [/* @__PURE__ */ E(o, {
288
289
  checked: !!r,
289
290
  onCheckedChange: (t) => $(e.field, !!t)
290
- }), /* @__PURE__ */ k("span", {
291
+ }), /* @__PURE__ */ E("span", {
291
292
  className: "text-xs text-muted-foreground",
292
293
  children: "Yes"
293
294
  })]
294
295
  })]
295
296
  });
296
- default: return /* @__PURE__ */ A("div", {
297
+ default: return /* @__PURE__ */ D("div", {
297
298
  className: "space-y-1",
298
- children: [/* @__PURE__ */ k(s, {
299
+ children: [/* @__PURE__ */ E(s, {
299
300
  className: "text-xs text-muted-foreground",
300
301
  children: i
301
- }), /* @__PURE__ */ k(n, {
302
+ }), /* @__PURE__ */ E(n, {
302
303
  className: "h-8 text-xs",
303
304
  value: r ?? "",
304
305
  placeholder: `Filter ${i}`,
@@ -306,38 +307,38 @@ function N({ open: r, onOpenChange: l, title: f = "Select Record", multiple: p =
306
307
  })]
307
308
  });
308
309
  }
309
- }, [Y, $]), pt = w((e, t) => e ? "bg-primary/5 hover:bg-primary/10" : t % 2 == 1 ? "bg-muted/20 hover:bg-accent/30" : "hover:bg-accent/30", []);
310
- return /* @__PURE__ */ k(c, {
310
+ }, [Y, $]), pt = x((e, t) => e ? "bg-primary/5 hover:bg-primary/10" : t % 2 == 1 ? "bg-muted/20 hover:bg-accent/30" : "hover:bg-accent/30", []);
311
+ return /* @__PURE__ */ E(c, {
311
312
  open: r,
312
313
  onOpenChange: l,
313
- children: /* @__PURE__ */ A(i, {
314
+ children: /* @__PURE__ */ D(i, {
314
315
  className: "w-[95vw] sm:max-w-3xl lg:max-w-5xl max-h-[85vh] sm:max-h-[80vh] flex flex-col gap-0",
315
316
  "data-testid": "record-picker-dialog",
316
317
  children: [
317
- /* @__PURE__ */ k(ne, { children: /* @__PURE__ */ A(re, { children: [f, p && /* @__PURE__ */ k("span", {
318
+ /* @__PURE__ */ E(ne, { children: /* @__PURE__ */ D(re, { children: [fe, m && /* @__PURE__ */ E("span", {
318
319
  className: "sr-only",
319
320
  children: " (multiple selection)"
320
321
  })] }) }),
321
- /* @__PURE__ */ A("div", {
322
+ /* @__PURE__ */ D("div", {
322
323
  className: "relative rounded-md border bg-muted/30 mb-3",
323
324
  children: [
324
- /* @__PURE__ */ k(fe, { className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground" }),
325
- /* @__PURE__ */ k(n, {
325
+ /* @__PURE__ */ E(de, { className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground" }),
326
+ /* @__PURE__ */ E(n, {
326
327
  placeholder: "Search...",
327
- value: H,
328
+ value: je,
328
329
  onChange: (e) => Ze(e.target.value),
329
330
  className: "pl-9 border-0 bg-transparent shadow-none focus-visible:ring-0",
330
331
  "data-testid": "record-picker-search"
331
332
  }),
332
- R && /* @__PURE__ */ k(ae, {
333
+ z && /* @__PURE__ */ E(ae, {
333
334
  className: "absolute right-3 top-1/2 -translate-y-1/2 size-4 animate-spin text-muted-foreground",
334
335
  "data-testid": "record-picker-loading-indicator"
335
336
  })
336
337
  ]
337
338
  }),
338
- Z && Z.length > 0 && /* @__PURE__ */ k("div", {
339
+ Z && Z.length > 0 && /* @__PURE__ */ E("div", {
339
340
  className: "py-2",
340
- children: De ? /* @__PURE__ */ k("div", {
341
+ children: De ? /* @__PURE__ */ E("div", {
341
342
  "data-testid": "record-picker-filter-bar",
342
343
  children: De({
343
344
  filterColumns: Z,
@@ -346,114 +347,114 @@ function N({ open: r, onOpenChange: l, title: f = "Select Record", multiple: p =
346
347
  onClear: ut,
347
348
  activeCount: dt
348
349
  })
349
- }) : /* @__PURE__ */ A(ve, { children: [/* @__PURE__ */ A("div", {
350
+ }) : /* @__PURE__ */ D(xe, { children: [/* @__PURE__ */ D("div", {
350
351
  className: "flex items-center gap-2",
351
352
  "data-testid": "record-picker-filter-bar",
352
- children: [/* @__PURE__ */ A(u, {
353
+ children: [/* @__PURE__ */ D(u, {
353
354
  type: "button",
354
355
  variant: dt > 0 ? "secondary" : "outline",
355
356
  size: "sm",
356
357
  className: "gap-1.5 shrink-0",
357
358
  onClick: () => Ve((e) => !e),
358
359
  children: [
359
- /* @__PURE__ */ k(ue, { className: "size-3.5" }),
360
+ /* @__PURE__ */ E(ue, { className: "size-3.5" }),
360
361
  "Filters",
361
- dt > 0 && /* @__PURE__ */ k("span", {
362
+ dt > 0 && /* @__PURE__ */ E("span", {
362
363
  className: "inline-flex h-5 min-w-[20px] items-center justify-center rounded-full bg-primary/10 px-1 text-xs font-medium text-primary",
363
364
  children: dt
364
365
  })
365
366
  ]
366
- }), dt > 0 && /* @__PURE__ */ A(u, {
367
+ }), dt > 0 && /* @__PURE__ */ D(u, {
367
368
  type: "button",
368
369
  variant: "ghost",
369
370
  size: "sm",
370
371
  className: "gap-1 text-xs",
371
372
  onClick: ut,
372
- children: [/* @__PURE__ */ k(e, { className: "size-3" }), "Clear"]
373
+ children: [/* @__PURE__ */ E(e, { className: "size-3" }), "Clear"]
373
374
  })]
374
- }), Be && /* @__PURE__ */ k("div", {
375
+ }), Be && /* @__PURE__ */ E("div", {
375
376
  className: "mt-2 grid gap-3 sm:grid-cols-2 lg:grid-cols-3 border rounded-md p-3 bg-muted/30",
376
377
  "data-testid": "record-picker-filter-panel",
377
- children: Z.map((e) => /* @__PURE__ */ k("div", { children: ft(e) }, e.field))
378
+ children: Z.map((e) => /* @__PURE__ */ E("div", { children: ft(e) }, e.field))
378
379
  })] })
379
380
  }),
380
- z && /* @__PURE__ */ A("div", {
381
+ B && /* @__PURE__ */ D("div", {
381
382
  className: "flex flex-col items-center gap-2 py-4",
382
383
  role: "alert",
383
384
  children: [
384
- /* @__PURE__ */ k(a, { className: "size-5 text-destructive" }),
385
- /* @__PURE__ */ k("p", {
385
+ /* @__PURE__ */ E(a, { className: "size-5 text-destructive" }),
386
+ /* @__PURE__ */ E("p", {
386
387
  className: "text-sm text-destructive",
387
- children: z
388
+ children: B
388
389
  }),
389
- /* @__PURE__ */ k(u, {
390
+ /* @__PURE__ */ E(u, {
390
391
  variant: "outline",
391
392
  size: "sm",
392
- onClick: () => Ye(H || void 0, U, Xe),
393
+ onClick: () => Ye(je || void 0, U, Xe),
393
394
  type: "button",
394
395
  children: "Retry"
395
396
  })
396
397
  ]
397
398
  }),
398
- Oe ? /* @__PURE__ */ k("div", {
399
+ Oe ? /* @__PURE__ */ E("div", {
399
400
  className: "flex-1 min-h-0",
400
401
  "data-testid": "record-picker-grid-slot",
401
402
  children: Oe({
402
403
  columns: qe,
403
404
  records: L,
404
- loading: R,
405
- totalCount: V,
405
+ loading: z,
406
+ totalCount: H,
406
407
  currentPage: U,
407
- pageSize: N,
408
+ pageSize: M,
408
409
  sortField: K,
409
410
  sortDirection: q,
410
411
  onSort: Qe,
411
412
  onPageChange: W,
412
413
  onRowClick: tt,
413
414
  isSelected: et,
414
- multiple: p,
415
- idField: _e,
416
- cellRenderer: Te
415
+ multiple: m,
416
+ idField: be,
417
+ cellRenderer: Ee
417
418
  })
418
- }) : /* @__PURE__ */ A(ve, { children: [
419
- R && L.length === 0 && !z && /* @__PURE__ */ k("div", {
419
+ }) : /* @__PURE__ */ D(xe, { children: [
420
+ z && L.length === 0 && !B && /* @__PURE__ */ E("div", {
420
421
  className: "flex-1 overflow-hidden min-h-0 border rounded-md",
421
422
  role: "status",
422
423
  "aria-live": "polite",
423
424
  "data-testid": "record-picker-skeleton",
424
- children: /* @__PURE__ */ A(h, { children: [/* @__PURE__ */ k(y, { children: /* @__PURE__ */ A(de, {
425
+ children: /* @__PURE__ */ D(he, { children: [/* @__PURE__ */ E(ge, { children: /* @__PURE__ */ D(f, {
425
426
  className: "bg-muted/40",
426
- children: [p && /* @__PURE__ */ k(me, { className: "w-10" }), qe.map((e) => /* @__PURE__ */ k(me, { children: /* @__PURE__ */ k(x, { className: "h-4 w-20" }) }, e.field))]
427
- }) }), /* @__PURE__ */ k(v, { children: Array.from({ length: M }, (e, t) => /* @__PURE__ */ A(de, { children: [p && /* @__PURE__ */ k(d, {
427
+ children: [m && /* @__PURE__ */ E(p, { className: "w-10" }), qe.map((e) => /* @__PURE__ */ E(p, { children: /* @__PURE__ */ E(y, { className: "h-4 w-20" }) }, e.field))]
428
+ }) }), /* @__PURE__ */ E(_, { children: Array.from({ length: Se }, (e, t) => /* @__PURE__ */ D(f, { children: [m && /* @__PURE__ */ E(d, {
428
429
  className: "w-10",
429
- children: /* @__PURE__ */ k(x, { className: "size-4 rounded" })
430
- }), qe.map((e) => /* @__PURE__ */ k(d, { children: /* @__PURE__ */ k(x, { className: "h-4 w-full" }) }, e.field))] }, t)) })] })
430
+ children: /* @__PURE__ */ E(y, { className: "size-4 rounded" })
431
+ }), qe.map((e) => /* @__PURE__ */ E(d, { children: /* @__PURE__ */ E(y, { className: "h-4 w-full" }) }, e.field))] }, t)) })] })
431
432
  }),
432
- !R && !z && L.length === 0 && /* @__PURE__ */ k("div", {
433
+ !z && !B && L.length === 0 && /* @__PURE__ */ E("div", {
433
434
  className: "py-8 text-center",
434
- children: /* @__PURE__ */ k("p", {
435
+ children: /* @__PURE__ */ E("p", {
435
436
  className: "text-sm text-muted-foreground",
436
437
  children: "No records found"
437
438
  })
438
439
  }),
439
- !z && L.length > 0 && /* @__PURE__ */ A("div", {
440
+ !B && L.length > 0 && /* @__PURE__ */ D("div", {
440
441
  className: "relative flex-1 overflow-auto min-h-0 border rounded-md",
441
442
  tabIndex: 0,
442
443
  onKeyDown: ot,
443
444
  role: "grid",
444
445
  "aria-label": "Records",
445
- children: [R && /* @__PURE__ */ k("div", {
446
+ children: [z && /* @__PURE__ */ E("div", {
446
447
  className: "absolute inset-0 z-10 flex items-center justify-center bg-background/60",
447
448
  "data-testid": "record-picker-loading-overlay",
448
- children: /* @__PURE__ */ k(ae, { className: "size-6 animate-spin text-muted-foreground" })
449
- }), /* @__PURE__ */ A(h, {
449
+ children: /* @__PURE__ */ E(ae, { className: "size-6 animate-spin text-muted-foreground" })
450
+ }), /* @__PURE__ */ D(he, {
450
451
  style: Object.keys(Ue).length > 0 ? { tableLayout: "fixed" } : void 0,
451
- children: [/* @__PURE__ */ k(y, {
452
+ children: [/* @__PURE__ */ E(ge, {
452
453
  className: "sticky top-0 z-[5] bg-muted/50 [&_tr]:border-b",
453
454
  "data-testid": "record-picker-sticky-header",
454
- children: /* @__PURE__ */ A(de, { children: [p && /* @__PURE__ */ k(me, { className: "w-10" }), qe.map((e) => {
455
+ children: /* @__PURE__ */ D(f, { children: [m && /* @__PURE__ */ E(p, { className: "w-10" }), qe.map((e) => {
455
456
  let t = Ue[e.field];
456
- return /* @__PURE__ */ A(me, {
457
+ return /* @__PURE__ */ D(p, {
457
458
  style: t ? {
458
459
  width: `${t}px`,
459
460
  minWidth: `${t}px`
@@ -461,10 +462,10 @@ function N({ open: r, onOpenChange: l, title: f = "Select Record", multiple: p =
461
462
  className: "cursor-pointer select-none relative group text-xs font-semibold uppercase tracking-wider",
462
463
  onClick: () => Qe(e.field),
463
464
  "aria-sort": K === e.field ? q === "asc" ? "ascending" : "descending" : "none",
464
- children: [/* @__PURE__ */ A("span", {
465
+ children: [/* @__PURE__ */ D("span", {
465
466
  className: "inline-flex items-center",
466
- children: [e.label || xe(e.field), ct(e.field)]
467
- }), /* @__PURE__ */ k("span", {
467
+ children: [e.label || j(e.field), ct(e.field)]
468
+ }), /* @__PURE__ */ E("span", {
468
469
  role: "separator",
469
470
  "aria-orientation": "vertical",
470
471
  className: "absolute right-0 top-0 bottom-0 w-1 cursor-col-resize opacity-0 group-hover:opacity-100 bg-border hover:bg-primary/50 transition-opacity",
@@ -477,20 +478,20 @@ function N({ open: r, onOpenChange: l, title: f = "Select Record", multiple: p =
477
478
  })]
478
479
  }, e.field);
479
480
  })] })
480
- }), /* @__PURE__ */ k(v, {
481
+ }), /* @__PURE__ */ E(_, {
481
482
  ref: ze,
482
483
  children: L.map((e, t) => {
483
484
  let n = $e(e), r = et(e), i = t === J;
484
- return /* @__PURE__ */ A(de, {
485
+ return /* @__PURE__ */ D(f, {
485
486
  "data-row-index": t,
486
- className: b("cursor-pointer transition-colors", pt(r, t), i && "ring-2 ring-primary ring-inset"),
487
+ className: v("cursor-pointer transition-colors", pt(r, t), i && "ring-2 ring-primary ring-inset"),
487
488
  onClick: () => tt(e),
488
489
  "data-testid": `record-row-${n}`,
489
490
  "aria-selected": r,
490
- children: [p && /* @__PURE__ */ k(d, {
491
+ children: [m && /* @__PURE__ */ E(d, {
491
492
  className: "w-10",
492
- children: r && /* @__PURE__ */ k(se, { className: "size-4 text-primary" })
493
- }), qe.map((t) => /* @__PURE__ */ k(d, {
493
+ children: r && /* @__PURE__ */ E(se, { className: "size-4 text-primary" })
494
+ }), qe.map((t) => /* @__PURE__ */ E(d, {
494
495
  className: "py-2.5",
495
496
  children: st(e, t)
496
497
  }, t.field))]
@@ -499,18 +500,18 @@ function N({ open: r, onOpenChange: l, title: f = "Select Record", multiple: p =
499
500
  })]
500
501
  })]
501
502
  }),
502
- !z && V > 0 && /* @__PURE__ */ A("div", {
503
+ !B && H > 0 && /* @__PURE__ */ D("div", {
503
504
  className: "flex items-center justify-between text-sm text-muted-foreground border-t pt-3 mt-2 px-1",
504
505
  "data-testid": "record-picker-pagination",
505
- children: [/* @__PURE__ */ A("span", { children: [
506
- V,
506
+ children: [/* @__PURE__ */ D("span", { children: [
507
+ H,
507
508
  " ",
508
- V === 1 ? "record" : "records",
509
+ H === 1 ? "record" : "records",
509
510
  Q > 1 && ` · Page ${U} of ${Q}`
510
- ] }), Q > 1 && /* @__PURE__ */ A("div", {
511
+ ] }), Q > 1 && /* @__PURE__ */ D("div", {
511
512
  className: "flex items-center gap-1.5",
512
513
  children: [
513
- /* @__PURE__ */ k(u, {
514
+ /* @__PURE__ */ E(u, {
514
515
  variant: "outline",
515
516
  size: "icon",
516
517
  className: "size-7",
@@ -518,9 +519,9 @@ function N({ open: r, onOpenChange: l, title: f = "Select Record", multiple: p =
518
519
  disabled: U <= 1,
519
520
  type: "button",
520
521
  "aria-label": "Previous page",
521
- children: /* @__PURE__ */ k(oe, { className: "size-4" })
522
+ children: /* @__PURE__ */ E(oe, { className: "size-4" })
522
523
  }),
523
- /* @__PURE__ */ k(n, {
524
+ /* @__PURE__ */ E(n, {
524
525
  className: "h-7 w-12 text-center text-xs px-1",
525
526
  placeholder: String(U),
526
527
  value: Ge,
@@ -529,7 +530,7 @@ function N({ open: r, onOpenChange: l, title: f = "Select Record", multiple: p =
529
530
  "aria-label": "Jump to page",
530
531
  "data-testid": "record-picker-page-jump"
531
532
  }),
532
- /* @__PURE__ */ k(u, {
533
+ /* @__PURE__ */ E(u, {
533
534
  variant: "outline",
534
535
  size: "icon",
535
536
  className: "size-7",
@@ -537,25 +538,25 @@ function N({ open: r, onOpenChange: l, title: f = "Select Record", multiple: p =
537
538
  disabled: U >= Q,
538
539
  type: "button",
539
540
  "aria-label": "Next page",
540
- children: /* @__PURE__ */ k(te, { className: "size-4" })
541
+ children: /* @__PURE__ */ E(te, { className: "size-4" })
541
542
  })
542
543
  ]
543
544
  })]
544
545
  })
545
546
  ] }),
546
- p && /* @__PURE__ */ k(ee, { children: /* @__PURE__ */ A("div", {
547
+ m && /* @__PURE__ */ E(ee, { children: /* @__PURE__ */ D("div", {
547
548
  className: "flex items-center gap-2 w-full justify-between",
548
- children: [/* @__PURE__ */ A("span", {
549
+ children: [/* @__PURE__ */ D("span", {
549
550
  className: "text-sm text-muted-foreground",
550
551
  children: [Fe.size, " selected"]
551
- }), /* @__PURE__ */ A("div", {
552
+ }), /* @__PURE__ */ D("div", {
552
553
  className: "flex gap-2",
553
- children: [/* @__PURE__ */ k(u, {
554
+ children: [/* @__PURE__ */ E(u, {
554
555
  variant: "outline",
555
556
  type: "button",
556
557
  onClick: () => l(!1),
557
558
  children: "Cancel"
558
- }), /* @__PURE__ */ k(u, {
559
+ }), /* @__PURE__ */ E(u, {
559
560
  type: "button",
560
561
  onClick: nt,
561
562
  children: "Confirm"
@@ -568,17 +569,17 @@ function N({ open: r, onOpenChange: l, title: f = "Select Record", multiple: p =
568
569
  }
569
570
  //#endregion
570
571
  //#region ../fields/src/widgets/_cell-renderer-bridge.ts
571
- var P;
572
- function F(e) {
573
- P = e;
572
+ var N;
573
+ function P(e) {
574
+ N = e;
574
575
  }
575
- function we() {
576
- return P;
576
+ function Te() {
577
+ return N;
577
578
  }
578
579
  //#endregion
579
580
  //#region ../fields/src/widgets/LookupField.tsx
580
- var I = /* @__PURE__ */ f({ LookupField: () => L }), Te = 50, Ee = g;
581
- function De(e, t, n, r) {
581
+ var F = 50, Ee = m;
582
+ function I(e, t, n, r) {
582
583
  let i = e[n] ?? e.id ?? e._id, a = e[t] ?? e.label ?? e.name ?? String(i), o = r ? e[r] : void 0;
583
584
  return {
584
585
  value: i,
@@ -587,7 +588,7 @@ function De(e, t, n, r) {
587
588
  ...e
588
589
  };
589
590
  }
590
- function Oe(e) {
591
+ function De(e) {
591
592
  return {
592
593
  text: "text",
593
594
  number: "number",
@@ -600,12 +601,12 @@ function Oe(e) {
600
601
  boolean: "boolean"
601
602
  }[e];
602
603
  }
603
- function L({ value: t, onChange: i, field: o, readonly: ee, ...te }) {
604
- let [ne, s] = O(!1), [c, re] = O(""), [ie, oe] = O([]), [se, ce] = O(!1), [d, le] = O(null), [ue, de] = O(0), f = D(null), [pe, me] = O([]), [h, g] = O(-1), he = D(null), v = o || te.schema, y = v?.field, b = y && typeof y == "object" && ("reference_to" in y || "reference" in y || "type" in y) ? y : v, x = b?.options || [], S = b?.multiple || !1, C = b?.display_field || b?.reference_field || "name", ye = b?.description_field, j = b?.id_field || "id", M = b?.reference_to || b?.reference, be = b?.lookup_columns, xe = b?.lookup_page_size, Se = b?.lookup_filters, Ce = E(() => {
605
- if (!be) return;
604
+ function Oe({ value: t, onChange: i, field: o, readonly: ee, ...te }) {
605
+ let [ne, s] = T(!1), [c, re] = T(""), { t: ie } = ye(), [oe, se] = T([]), [ce, d] = T(!1), [le, ue] = T(null), [f, pe] = T(0), p = w(null), [m, he] = T([]), [g, _] = T(-1), ge = w(null), v = o || te.schema, y = v?.field, b = y && typeof y == "object" && ("reference_to" in y || "reference" in y || "type" in y) ? y : v, ve = b?.options || [], O = b?.multiple || !1, k = b?.display_field || b?.reference_field || "name", Se = b?.description_field, A = b?.id_field || "id", j = b?.reference_to || b?.reference, Ce = b?.lookup_columns, we = b?.lookup_page_size, N = b?.lookup_filters, P = C(() => {
606
+ if (!Ce) return;
606
607
  let e = [];
607
- for (let t of be) if (typeof t == "object" && t.type) {
608
- let n = Oe(t.type);
608
+ for (let t of Ce) if (typeof t == "object" && t.type) {
609
+ let n = De(t.type);
609
610
  n && e.push({
610
611
  field: t.field,
611
612
  label: t.label,
@@ -613,250 +614,250 @@ function L({ value: t, onChange: i, field: o, readonly: ee, ...te }) {
613
614
  });
614
615
  }
615
616
  return e.length > 0 ? e : void 0;
616
- }, [be]), P = _e(Ee)?.dataSource ?? null, F = te.dataSource ?? v?.dataSource ?? b?.dataSource ?? P, I = F != null && typeof F.find == "function" && !!M, L = te.onCreateNew ?? v?.onCreateNew, [ke, R] = O(!1), Ae = I ? ie : x, z = E(() => {
617
- if (I || !c) return Ae;
617
+ }, [Ce]), Oe = be(Ee)?.dataSource ?? null, L = te.dataSource ?? v?.dataSource ?? b?.dataSource ?? Oe, R = L != null && typeof L.find == "function" && !!j, z = te.onCreateNew ?? v?.onCreateNew, [ke, B] = T(!1), V = R ? oe : ve, H = C(() => {
618
+ if (R || !c) return V;
618
619
  let e = c.toLowerCase();
619
- return Ae.filter((t) => t.label.toLowerCase().includes(e) || t.description && t.description.toLowerCase().includes(e));
620
+ return V.filter((t) => t.label.toLowerCase().includes(e) || t.description && t.description.toLowerCase().includes(e));
620
621
  }, [
621
- I,
622
- Ae,
622
+ R,
623
+ V,
623
624
  c
624
625
  ]);
625
- T(() => {
626
- g(-1);
627
- }, [z.length]);
628
- let B = w(async (e) => {
629
- if (!(!F || !M)) {
630
- ce(!0), le(null);
626
+ S(() => {
627
+ _(-1);
628
+ }, [H.length]);
629
+ let Ae = x(async (e) => {
630
+ if (!(!L || !j)) {
631
+ d(!0), ue(null);
631
632
  try {
632
- let t = { $top: Te };
633
+ let t = { $top: F };
633
634
  e && e.trim() && (t.$search = e.trim());
634
- let n = await F.find(M, t), r = n?.data ?? n ?? [];
635
- oe(r.map((e) => De(e, C, j, ye))), de(n?.total ?? r.length);
635
+ let n = await L.find(j, t), r = n?.data ?? n ?? [];
636
+ se(r.map((e) => I(e, k, A, Se))), pe(n?.total ?? r.length);
636
637
  } catch (e) {
637
- le(e instanceof Error ? e.message : String(e)), oe([]);
638
+ ue(e instanceof Error ? e.message : String(e)), se([]);
638
639
  } finally {
639
- ce(!1);
640
+ d(!1);
640
641
  }
641
642
  }
642
643
  }, [
643
- F,
644
- M,
645
- C,
644
+ L,
646
645
  j,
647
- ye
646
+ k,
647
+ A,
648
+ Se
648
649
  ]);
649
- T(() => {
650
- ne && I && B(c || void 0), ne || (re(""), le(null), g(-1));
650
+ S(() => {
651
+ ne && R && Ae(c || void 0), ne || (re(""), ue(null), _(-1));
651
652
  }, [ne]);
652
- let V = w((e) => {
653
- re(e), I && (f.current && clearTimeout(f.current), f.current = setTimeout(() => {
654
- B(e || void 0);
653
+ let je = x((e) => {
654
+ re(e), R && (p.current && clearTimeout(p.current), p.current = setTimeout(() => {
655
+ Ae(e || void 0);
655
656
  }, 300));
656
- }, [I, B]);
657
- T(() => () => {
658
- f.current && clearTimeout(f.current);
657
+ }, [R, Ae]);
658
+ S(() => () => {
659
+ p.current && clearTimeout(p.current);
659
660
  }, []);
660
- let je = w((e) => x.find((t) => t.value === e) ?? ie.find((t) => t.value === e) ?? pe.find((t) => t.value === e), [
661
- x,
662
- ie,
663
- pe
664
- ]), H = S ? (Array.isArray(t) ? t : []).map(je).filter(Boolean) : t ? [je(t)].filter(Boolean) : [], Me = w((e) => {
665
- if (S) {
661
+ let Me = x((e) => ve.find((t) => t.value === e) ?? oe.find((t) => t.value === e) ?? m.find((t) => t.value === e), [
662
+ ve,
663
+ oe,
664
+ m
665
+ ]), U = O ? (Array.isArray(t) ? t : []).map(Me).filter(Boolean) : t ? [Me(t)].filter(Boolean) : [], W = x((e) => {
666
+ if (O) {
666
667
  let n = Array.isArray(t) ? t : [];
667
668
  n.includes(e.value) ? i(n.filter((t) => t !== e.value)) : i([...n, e.value]);
668
669
  } else i(e.value), s(!1);
669
670
  }, [
670
- S,
671
+ O,
671
672
  t,
672
673
  i
673
- ]), U = (e) => {
674
- i(S ? (Array.isArray(t) ? t : []).filter((t) => t !== e) : null);
675
- }, W = w((e) => {
676
- me(e.map((e) => De(e, C, j, ye)));
674
+ ]), G = (e) => {
675
+ i(O ? (Array.isArray(t) ? t : []).filter((t) => t !== e) : null);
676
+ }, K = x((e) => {
677
+ he(e.map((e) => I(e, k, A, Se)));
677
678
  }, [
678
- C,
679
- j,
680
- ye
681
- ]), G = w((e) => {
682
- e.key === "ArrowDown" ? (e.preventDefault(), g((e) => e < z.length - 1 ? e + 1 : e)) : e.key === "ArrowUp" ? (e.preventDefault(), g((e) => e > 0 ? e - 1 : 0)) : e.key === "Enter" && (e.preventDefault(), h >= 0 && h < z.length && Me(z[h]));
679
+ k,
680
+ A,
681
+ Se
682
+ ]), Ne = x((e) => {
683
+ e.key === "ArrowDown" ? (e.preventDefault(), _((e) => e < H.length - 1 ? e + 1 : e)) : e.key === "ArrowUp" ? (e.preventDefault(), _((e) => e > 0 ? e - 1 : 0)) : e.key === "Enter" && (e.preventDefault(), g >= 0 && g < H.length && W(H[g]));
683
684
  }, [
684
- z,
685
- h,
686
- Me
685
+ H,
686
+ g,
687
+ W
687
688
  ]);
688
- return T(() => {
689
- h >= 0 && he.current && he.current.querySelector(`[data-lookup-index="${h}"]`)?.scrollIntoView({ block: "nearest" });
690
- }, [h]), ee ? H.length ? S ? /* @__PURE__ */ k("div", {
689
+ return S(() => {
690
+ g >= 0 && ge.current && ge.current.querySelector(`[data-lookup-index="${g}"]`)?.scrollIntoView({ block: "nearest" });
691
+ }, [g]), ee ? U.length ? O ? /* @__PURE__ */ E("div", {
691
692
  className: "flex flex-wrap gap-1",
692
- children: H.map((e, t) => /* @__PURE__ */ k(_, {
693
+ children: U.map((e, t) => /* @__PURE__ */ E(h, {
693
694
  variant: "outline",
694
- children: e?.[C] || e?.label
695
+ children: e?.[k] || e?.label
695
696
  }, t))
696
- }) : /* @__PURE__ */ k("span", {
697
+ }) : /* @__PURE__ */ E("span", {
697
698
  className: "text-sm",
698
- children: H[0]?.[C] || H[0]?.label
699
- }) : /* @__PURE__ */ k("span", {
699
+ children: U[0]?.[k] || U[0]?.label
700
+ }) : /* @__PURE__ */ E("span", {
700
701
  className: "text-sm",
701
702
  children: "-"
702
- }) : /* @__PURE__ */ A("div", {
703
+ }) : /* @__PURE__ */ D("div", {
703
704
  className: "space-y-2",
704
705
  children: [
705
- H.length > 0 && /* @__PURE__ */ k("div", {
706
+ U.length > 0 && /* @__PURE__ */ E("div", {
706
707
  className: "flex flex-wrap gap-1",
707
- children: H.map((t, n) => /* @__PURE__ */ A(_, {
708
+ children: U.map((t, n) => /* @__PURE__ */ D(h, {
708
709
  variant: "outline",
709
710
  className: "gap-1",
710
- children: [t?.[C] || t?.label, /* @__PURE__ */ k("button", {
711
- onClick: () => U(t?.value),
711
+ children: [t?.[k] || t?.label, /* @__PURE__ */ E("button", {
712
+ onClick: () => G(t?.value),
712
713
  className: "ml-1 hover:text-destructive",
713
714
  type: "button",
714
- "aria-label": `Remove ${t?.[C] || t?.label}`,
715
- children: /* @__PURE__ */ k(e, { className: "size-3" })
715
+ "aria-label": `Remove ${t?.[k] || t?.label}`,
716
+ children: /* @__PURE__ */ E(e, { className: "size-3" })
716
717
  })]
717
718
  }, n))
718
719
  }),
719
- /* @__PURE__ */ A("div", {
720
+ /* @__PURE__ */ D("div", {
720
721
  className: "flex items-center gap-1.5",
721
- children: [/* @__PURE__ */ A(ge, {
722
+ children: [/* @__PURE__ */ D(_e, {
722
723
  open: ne,
723
724
  onOpenChange: s,
724
- children: [/* @__PURE__ */ k(r, {
725
+ children: [/* @__PURE__ */ E(r, {
725
726
  asChild: !0,
726
- children: /* @__PURE__ */ A(u, {
727
+ children: /* @__PURE__ */ D(u, {
727
728
  variant: "outline",
728
729
  className: "min-w-0 flex-1 justify-start text-left font-normal",
729
730
  type: "button",
730
- children: [/* @__PURE__ */ k(fe, { className: "mr-2 size-4" }), H.length === 0 ? v?.placeholder || "Select..." : S ? `${H.length} selected` : "Change selection"]
731
+ children: [/* @__PURE__ */ E(de, { className: "mr-2 size-4" }), U.length === 0 ? v?.placeholder || ie("common.select") : O ? ie("table.selected", { count: U.length }) : ie("common.select")]
731
732
  })
732
- }), /* @__PURE__ */ A(l, {
733
+ }), /* @__PURE__ */ D(l, {
733
734
  className: "w-[var(--radix-popover-trigger-width)] p-0",
734
735
  align: "start",
735
736
  children: [
736
- /* @__PURE__ */ k("div", {
737
+ /* @__PURE__ */ E("div", {
737
738
  className: "p-2",
738
- children: /* @__PURE__ */ A("div", {
739
+ children: /* @__PURE__ */ D("div", {
739
740
  className: "relative",
740
741
  children: [
741
- /* @__PURE__ */ k(fe, { className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground" }),
742
- /* @__PURE__ */ k(n, {
743
- placeholder: "Search...",
742
+ /* @__PURE__ */ E(de, { className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground" }),
743
+ /* @__PURE__ */ E(n, {
744
+ placeholder: ie("common.search") + "...",
744
745
  value: c,
745
- onChange: (e) => V(e.target.value),
746
- onKeyDown: G,
746
+ onChange: (e) => je(e.target.value),
747
+ onKeyDown: Ne,
747
748
  className: "w-full pl-9 h-8 text-sm"
748
749
  }),
749
- se && /* @__PURE__ */ k(ae, {
750
+ ce && /* @__PURE__ */ E(ae, {
750
751
  className: "absolute right-3 top-1/2 -translate-y-1/2 size-4 animate-spin text-muted-foreground",
751
752
  "data-testid": "lookup-loading"
752
753
  })
753
754
  ]
754
755
  })
755
756
  }),
756
- d && /* @__PURE__ */ A("div", {
757
+ le && /* @__PURE__ */ D("div", {
757
758
  className: "flex flex-col items-center gap-2 py-4 px-2",
758
759
  role: "alert",
759
760
  children: [
760
- /* @__PURE__ */ k(a, { className: "size-5 text-destructive" }),
761
- /* @__PURE__ */ k("p", {
761
+ /* @__PURE__ */ E(a, { className: "size-5 text-destructive" }),
762
+ /* @__PURE__ */ E("p", {
762
763
  className: "text-sm text-destructive",
763
- children: d
764
+ children: le
764
765
  }),
765
- /* @__PURE__ */ k(u, {
766
+ /* @__PURE__ */ E(u, {
766
767
  variant: "outline",
767
768
  size: "sm",
768
- onClick: () => B(c || void 0),
769
+ onClick: () => Ae(c || void 0),
769
770
  type: "button",
770
771
  children: "Retry"
771
772
  })
772
773
  ]
773
774
  }),
774
- se && z.length === 0 && !d && /* @__PURE__ */ A("div", {
775
+ ce && H.length === 0 && !le && /* @__PURE__ */ D("div", {
775
776
  className: "flex flex-col items-center gap-2 py-6",
776
777
  role: "status",
777
778
  "aria-live": "polite",
778
- children: [/* @__PURE__ */ k(ae, { className: "size-6 animate-spin text-muted-foreground" }), /* @__PURE__ */ k("p", {
779
+ children: [/* @__PURE__ */ E(ae, { className: "size-6 animate-spin text-muted-foreground" }), /* @__PURE__ */ E("p", {
779
780
  className: "text-sm text-muted-foreground",
780
781
  children: "Loading…"
781
782
  })]
782
783
  }),
783
- !d && !(se && z.length === 0) && /* @__PURE__ */ k("div", {
784
- ref: he,
784
+ !le && !(ce && H.length === 0) && /* @__PURE__ */ E("div", {
785
+ ref: ge,
785
786
  className: "max-h-64 overflow-y-auto px-1 pb-1",
786
787
  role: "listbox",
787
- children: z.length === 0 ? /* @__PURE__ */ A("div", {
788
+ children: H.length === 0 ? /* @__PURE__ */ D("div", {
788
789
  className: "py-4 text-center",
789
- children: [/* @__PURE__ */ k("p", {
790
+ children: [/* @__PURE__ */ E("p", {
790
791
  className: "text-sm text-muted-foreground",
791
792
  children: "No options found"
792
- }), L && /* @__PURE__ */ A(u, {
793
+ }), z && /* @__PURE__ */ D(u, {
793
794
  variant: "ghost",
794
795
  size: "sm",
795
796
  className: "mt-2 gap-1",
796
797
  type: "button",
797
798
  onClick: () => {
798
- L(c), s(!1);
799
+ z(c), s(!1);
799
800
  },
800
- children: [/* @__PURE__ */ k(p, { className: "size-4" }), "Create new"]
801
+ children: [/* @__PURE__ */ E(fe, { className: "size-4" }), "Create new"]
801
802
  })]
802
- }) : /* @__PURE__ */ A(ve, { children: [
803
- z.map((e, n) => {
804
- let r = S ? (Array.isArray(t) ? t : []).includes(e.value) : t === e.value, i = n === h;
805
- return /* @__PURE__ */ A("button", {
803
+ }) : /* @__PURE__ */ D(xe, { children: [
804
+ H.map((e, n) => {
805
+ let r = O ? (Array.isArray(t) ? t : []).includes(e.value) : t === e.value;
806
+ return /* @__PURE__ */ D("button", {
806
807
  "data-lookup-index": n,
807
808
  role: "option",
808
809
  "aria-selected": r,
809
- onClick: () => Me(e),
810
- className: `w-full text-left px-3 py-2 rounded-md text-sm hover:bg-accent flex items-center justify-between ${i ? "bg-accent text-accent-foreground" : r ? "bg-accent/50 text-accent-foreground" : ""}`,
810
+ onClick: () => W(e),
811
+ className: `w-full text-left px-3 py-2 rounded-md text-sm hover:bg-accent flex items-center justify-between ${n === g ? "bg-accent text-accent-foreground" : r ? "bg-accent/50 text-accent-foreground" : ""}`,
811
812
  type: "button",
812
- children: [/* @__PURE__ */ A("div", {
813
+ children: [/* @__PURE__ */ D("div", {
813
814
  className: "min-w-0 flex-1",
814
- children: [/* @__PURE__ */ k("span", {
815
+ children: [/* @__PURE__ */ E("span", {
815
816
  className: "block truncate",
816
817
  children: e.label
817
- }), e.description && /* @__PURE__ */ k("span", {
818
+ }), e.description && /* @__PURE__ */ E("span", {
818
819
  className: "block truncate text-xs text-muted-foreground",
819
820
  children: e.description
820
821
  })]
821
- }), r && /* @__PURE__ */ k(_, {
822
+ }), r && /* @__PURE__ */ E(h, {
822
823
  variant: "default",
823
824
  className: "ml-2 shrink-0",
824
825
  children: "Selected"
825
826
  })]
826
827
  }, e.value);
827
828
  }),
828
- I && ue > z.length && /* @__PURE__ */ A("p", {
829
+ R && f > H.length && /* @__PURE__ */ D("p", {
829
830
  className: "text-xs text-muted-foreground text-center py-2",
830
831
  children: [
831
832
  "Showing ",
832
- z.length,
833
+ H.length,
833
834
  " of ",
834
- ue,
835
+ f,
835
836
  " results."
836
837
  ]
837
838
  }),
838
- I && ue > z.length && /* @__PURE__ */ A("button", {
839
+ R && f > H.length && /* @__PURE__ */ D("button", {
839
840
  type: "button",
840
841
  className: "w-full text-center px-3 py-2 rounded-md text-sm font-medium text-primary hover:bg-accent flex items-center justify-center gap-1.5",
841
842
  onClick: () => {
842
- s(!1), R(!0);
843
+ s(!1), B(!0);
843
844
  },
844
845
  "data-testid": "show-all-results",
845
846
  children: [
846
- /* @__PURE__ */ k(m, { className: "size-3.5" }),
847
+ /* @__PURE__ */ E(me, { className: "size-3.5" }),
847
848
  "Show All Results (",
848
- ue,
849
+ f,
849
850
  ")"
850
851
  ]
851
852
  }),
852
- L && /* @__PURE__ */ A("button", {
853
+ z && /* @__PURE__ */ D("button", {
853
854
  type: "button",
854
855
  className: "w-full text-left px-3 py-2 rounded-md text-sm hover:bg-accent flex items-center gap-1.5 text-muted-foreground",
855
856
  onClick: () => {
856
- L(c), s(!1);
857
+ z(c), s(!1);
857
858
  },
858
859
  children: [
859
- /* @__PURE__ */ k(p, { className: "size-3.5" }),
860
+ /* @__PURE__ */ E(fe, { className: "size-3.5" }),
860
861
  "Create new",
861
862
  c ? ` "${c}"` : ""
862
863
  ]
@@ -865,38 +866,38 @@ function L({ value: t, onChange: i, field: o, readonly: ee, ...te }) {
865
866
  })
866
867
  ]
867
868
  })]
868
- }), I && /* @__PURE__ */ k(u, {
869
+ }), R && /* @__PURE__ */ E(u, {
869
870
  variant: "outline",
870
871
  size: "icon",
871
872
  className: "shrink-0",
872
873
  type: "button",
873
- onClick: () => R(!0),
874
+ onClick: () => B(!0),
874
875
  "aria-label": "Browse all records",
875
876
  title: "Browse all records",
876
877
  "data-testid": "browse-all-records",
877
- children: /* @__PURE__ */ k(m, { className: "size-4" })
878
+ children: /* @__PURE__ */ E(me, { className: "size-4" })
878
879
  })]
879
880
  }),
880
- I && F && M && /* @__PURE__ */ k(N, {
881
+ R && L && j && /* @__PURE__ */ E(M, {
881
882
  open: ke,
882
- onOpenChange: R,
883
+ onOpenChange: B,
883
884
  title: v?.label || "Select",
884
- multiple: S,
885
- dataSource: F,
886
- objectName: M,
887
- columns: be,
888
- displayField: C,
889
- idField: j,
890
- pageSize: xe,
885
+ multiple: O,
886
+ dataSource: L,
887
+ objectName: j,
888
+ columns: Ce,
889
+ displayField: k,
890
+ idField: A,
891
+ pageSize: we,
891
892
  value: t,
892
893
  onSelect: i,
893
- onSelectRecords: W,
894
- lookupFilters: Se,
895
- cellRenderer: we(),
896
- filterColumns: Ce
894
+ onSelectRecords: K,
895
+ lookupFilters: N,
896
+ cellRenderer: Te(),
897
+ filterColumns: P
897
898
  })
898
899
  ]
899
900
  });
900
901
  }
901
902
  //#endregion
902
- export { F as n, I as t };
903
+ export { P as n, Oe as t };