@object-ui/plugin-list 5.1.1 → 5.2.1

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.
package/dist/index.js CHANGED
@@ -1,23 +1,23 @@
1
1
  import { ComponentRegistry as e, buildExpandFields as t, evaluatePlainCondition as n, normalizeQuickFilter as r, normalizeQuickFilters as i } from "@object-ui/core";
2
2
  import * as a from "react";
3
3
  import { useCallback as o, useContext as s, useEffect as c, useMemo as l, useState as u } from "react";
4
- import { Button as d, Card as f, CardContent as p, DropdownMenu as m, DropdownMenuContent as h, DropdownMenuItem as g, DropdownMenuTrigger as _, FilterBuilder as v, GroupingEditor as ee, Input as y, LookupValuePicker as b, NavigationOverlay as te, Popover as x, PopoverContent as S, PopoverTrigger as C, RefreshIndicator as ne, SortBuilder as re, cn as w } from "@object-ui/components";
5
- import { Activity as ie, ArrowUpDown as T, Calendar as ae, CheckSquare as oe, ChevronDown as E, ChevronRight as D, Download as O, EyeOff as se, GanttChartSquare as ce, Grid as k, Group as le, Images as A, Inbox as ue, LayoutGrid as de, Map as j, Paintbrush as fe, Plus as pe, Printer as me, Rows2 as he, Rows3 as ge, Rows4 as _e, Search as ve, Settings2 as ye, Share2 as be, SlidersHorizontal as xe, Trash2 as Se, X as Ce, icons as we } from "lucide-react";
6
- import { Fragment as Te, jsx as M, jsxs as N } from "react/jsx-runtime";
4
+ import { Button as d, Card as f, CardContent as p, DataEmptyState as m, DropdownMenu as h, DropdownMenuContent as g, DropdownMenuItem as _, DropdownMenuTrigger as v, FilterBuilder as ee, GroupingEditor as y, Input as b, LookupValuePicker as te, NavigationOverlay as ne, Popover as x, PopoverContent as S, PopoverTrigger as C, RefreshIndicator as re, SortBuilder as ie, cn as w } from "@object-ui/components";
5
+ import { Activity as ae, ArrowUpDown as T, Calendar as E, CheckSquare as D, ChevronDown as O, ChevronRight as k, Download as oe, EyeOff as se, GanttChartSquare as ce, Grid as A, Group as le, Images as j, Inbox as ue, LayoutGrid as de, Map as M, Paintbrush as fe, Plus as pe, Printer as me, Rows2 as he, Rows3 as ge, Rows4 as _e, Search as ve, Settings2 as ye, Share2 as be, SlidersHorizontal as xe, Trash2 as Se, X as Ce, icons as we } from "lucide-react";
6
+ import { Fragment as Te, jsx as N, jsxs as P } from "react/jsx-runtime";
7
7
  import { useObjectLabel as Ee, useObjectTranslation as De, useSafeFieldLabel as Oe } from "@object-ui/i18n";
8
- import { SchemaRenderer as ke, SchemaRendererContext as Ae, useDataScope as je, useDensityMode as Me, useNavigationOverlay as Ne, useSafeFieldLabel as P } from "@object-ui/react";
8
+ import { SchemaRenderer as ke, SchemaRendererContext as Ae, useDataScope as je, useDensityMode as Me, useNavigationOverlay as Ne, useSafeFieldLabel as F } from "@object-ui/react";
9
9
  import { usePullToRefresh as Pe } from "@object-ui/mobile";
10
10
  import { usePermissions as Fe } from "@object-ui/permissions";
11
11
  import { getCellRenderer as Ie, resolveCellRendererType as Le } from "@object-ui/fields";
12
12
  //#region src/ViewSwitcher.tsx
13
13
  var Re = {
14
- grid: /* @__PURE__ */ M(k, { className: "h-4 w-4" }),
15
- kanban: /* @__PURE__ */ M(de, { className: "h-4 w-4" }),
16
- gallery: /* @__PURE__ */ M(A, { className: "h-4 w-4" }),
17
- calendar: /* @__PURE__ */ M(ae, { className: "h-4 w-4" }),
18
- timeline: /* @__PURE__ */ M(ie, { className: "h-4 w-4" }),
19
- gantt: /* @__PURE__ */ M(ce, { className: "h-4 w-4" }),
20
- map: /* @__PURE__ */ M(j, { className: "h-4 w-4" })
14
+ grid: /* @__PURE__ */ N(A, { className: "h-4 w-4" }),
15
+ kanban: /* @__PURE__ */ N(de, { className: "h-4 w-4" }),
16
+ gallery: /* @__PURE__ */ N(j, { className: "h-4 w-4" }),
17
+ calendar: /* @__PURE__ */ N(E, { className: "h-4 w-4" }),
18
+ timeline: /* @__PURE__ */ N(ae, { className: "h-4 w-4" }),
19
+ gantt: /* @__PURE__ */ N(ce, { className: "h-4 w-4" }),
20
+ map: /* @__PURE__ */ N(M, { className: "h-4 w-4" })
21
21
  }, ze = {
22
22
  grid: "Grid",
23
23
  kanban: "Kanban",
@@ -38,11 +38,11 @@ var Re = {
38
38
  e,
39
39
  n
40
40
  ]);
41
- return /* @__PURE__ */ M("div", {
41
+ return /* @__PURE__ */ N("div", {
42
42
  className: w("flex items-center gap-1 bg-transparent oui-view-switcher", r),
43
43
  children: t.map((t) => {
44
44
  let n = e === t;
45
- return /* @__PURE__ */ N("button", {
45
+ return /* @__PURE__ */ P("button", {
46
46
  type: "button",
47
47
  onClick: () => o(t),
48
48
  "aria-label": ze[t],
@@ -50,7 +50,7 @@ var Re = {
50
50
  "aria-pressed": n,
51
51
  "data-state": n ? "on" : "off",
52
52
  className: w("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", "hover:bg-muted hover:text-muted-foreground", "gap-2 px-3 py-2", "data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm border-transparent border data-[state=on]:border-border/50"),
53
- children: [Re[t], /* @__PURE__ */ M("span", {
53
+ children: [Re[t], /* @__PURE__ */ N("span", {
54
54
  className: "hidden sm:inline-block text-xs font-medium",
55
55
  children: ze[t]
56
56
  })]
@@ -60,7 +60,7 @@ var Re = {
60
60
  };
61
61
  //#endregion
62
62
  //#region src/components/TabBar.tsx
63
- function F(e) {
63
+ function I(e) {
64
64
  return e ? we[e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("")] ?? null : null;
65
65
  }
66
66
  function Ve(e) {
@@ -70,13 +70,13 @@ var He = ({ tabs: e, activeTab: t, onTabChange: n, className: r }) => {
70
70
  let i = a.useMemo(() => Ve(e), [e]), o = a.useMemo(() => i.find((e) => e.isDefault)?.name ?? i[0]?.name, [i]), [s, c] = a.useState(o), l = t ?? s, u = a.useCallback((e) => {
71
71
  c(e.name), n?.(e);
72
72
  }, [n]);
73
- return i.length === 0 ? null : /* @__PURE__ */ M("div", {
73
+ return i.length === 0 ? null : /* @__PURE__ */ N("div", {
74
74
  className: w("px-2 sm:px-4 py-1 flex items-center gap-0.5 bg-background", r),
75
75
  "data-testid": "view-tabs",
76
76
  role: "tablist",
77
77
  children: i.map((e) => {
78
- let t = F(e.icon), n = l === e.name;
79
- return /* @__PURE__ */ N(d, {
78
+ let t = I(e.icon), n = l === e.name;
79
+ return /* @__PURE__ */ P(d, {
80
80
  variant: "ghost",
81
81
  size: "sm",
82
82
  className: w("h-7 px-2.5 py-1 text-xs rounded-md transition-colors duration-150", n ? "font-medium text-foreground bg-muted" : "text-muted-foreground hover:text-foreground hover:bg-transparent"),
@@ -84,7 +84,7 @@ var He = ({ tabs: e, activeTab: t, onTabChange: n, className: r }) => {
84
84
  role: "tab",
85
85
  "aria-selected": n,
86
86
  onClick: () => u(e),
87
- children: [t && /* @__PURE__ */ M(t, { className: "h-3 w-3 mr-1.5" }), e.label]
87
+ children: [t && /* @__PURE__ */ N(t, { className: "h-3 w-3 mr-1.5" }), e.label]
88
88
  }, e.name);
89
89
  })
90
90
  });
@@ -93,36 +93,36 @@ var He = ({ tabs: e, activeTab: t, onTabChange: n, className: r }) => {
93
93
  c(e.name), n?.(e);
94
94
  }, [n]);
95
95
  if (i.length === 0) return null;
96
- let p = F(u?.icon);
97
- return /* @__PURE__ */ M("div", {
96
+ let p = I(u?.icon);
97
+ return /* @__PURE__ */ N("div", {
98
98
  className: w("px-2 py-1", r),
99
99
  "data-testid": "view-tabs-select",
100
- children: /* @__PURE__ */ N(m, { children: [/* @__PURE__ */ M(_, {
100
+ children: /* @__PURE__ */ P(h, { children: [/* @__PURE__ */ N(v, {
101
101
  asChild: !0,
102
- children: /* @__PURE__ */ N(d, {
102
+ children: /* @__PURE__ */ P(d, {
103
103
  variant: "ghost",
104
104
  size: "sm",
105
105
  className: "h-7 px-2 text-xs font-medium text-foreground gap-1.5 max-w-[60vw] truncate",
106
106
  "aria-label": "Switch view",
107
107
  children: [
108
- p && /* @__PURE__ */ M(p, { className: "h-3.5 w-3.5 shrink-0" }),
109
- /* @__PURE__ */ M("span", {
108
+ p && /* @__PURE__ */ N(p, { className: "h-3.5 w-3.5 shrink-0" }),
109
+ /* @__PURE__ */ N("span", {
110
110
  className: "truncate",
111
111
  children: u?.label ?? ""
112
112
  }),
113
- /* @__PURE__ */ M(E, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" })
113
+ /* @__PURE__ */ N(O, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" })
114
114
  ]
115
115
  })
116
- }), /* @__PURE__ */ M(h, {
116
+ }), /* @__PURE__ */ N(g, {
117
117
  align: "start",
118
118
  className: "w-56 max-h-72 overflow-y-auto",
119
119
  children: i.map((e) => {
120
- let t = F(e.icon);
121
- return /* @__PURE__ */ N(g, {
120
+ let t = I(e.icon);
121
+ return /* @__PURE__ */ P(_, {
122
122
  onClick: () => f(e),
123
123
  className: w("text-sm", l === e.name && "font-medium bg-muted"),
124
124
  "data-testid": `view-tab-select-${e.name}`,
125
- children: [t && /* @__PURE__ */ M(t, { className: "h-3.5 w-3.5 mr-2 shrink-0" }), /* @__PURE__ */ M("span", {
125
+ children: [t && /* @__PURE__ */ N(t, { className: "h-3.5 w-3.5 mr-2 shrink-0" }), /* @__PURE__ */ N("span", {
126
126
  className: "truncate",
127
127
  children: e.label
128
128
  })]
@@ -133,31 +133,31 @@ var He = ({ tabs: e, activeTab: t, onTabChange: n, className: r }) => {
133
133
  };
134
134
  //#endregion
135
135
  //#region src/components/ViewSettingsPopover.tsx
136
- function I({ title: e, badge: t, onClear: n, clearLabel: r, defaultOpen: i = !0, children: o }) {
136
+ function L({ title: e, badge: t, onClear: n, clearLabel: r, defaultOpen: i = !0, children: o }) {
137
137
  let [s, c] = a.useState(i);
138
- return /* @__PURE__ */ N("div", {
138
+ return /* @__PURE__ */ P("div", {
139
139
  className: "border-b last:border-b-0",
140
- children: [/* @__PURE__ */ N("div", {
140
+ children: [/* @__PURE__ */ P("div", {
141
141
  className: "flex items-center justify-between px-3 py-2",
142
- children: [/* @__PURE__ */ N("button", {
142
+ children: [/* @__PURE__ */ P("button", {
143
143
  type: "button",
144
144
  onClick: () => c((e) => !e),
145
145
  className: "flex items-center gap-1.5 text-xs font-medium text-foreground/80 hover:text-foreground",
146
146
  children: [
147
- /* @__PURE__ */ M(E, { className: w("h-3.5 w-3.5 transition-transform", !s && "-rotate-90") }),
147
+ /* @__PURE__ */ N(O, { className: w("h-3.5 w-3.5 transition-transform", !s && "-rotate-90") }),
148
148
  e,
149
- typeof t == "number" && t > 0 && /* @__PURE__ */ M("span", {
149
+ typeof t == "number" && t > 0 && /* @__PURE__ */ N("span", {
150
150
  className: "ml-1 inline-flex h-4 min-w-[16px] items-center justify-center rounded-full bg-primary/10 px-1 text-[10px] text-primary tabular-nums",
151
151
  children: t
152
152
  })
153
153
  ]
154
- }), n && /* @__PURE__ */ M("button", {
154
+ }), n && /* @__PURE__ */ N("button", {
155
155
  type: "button",
156
156
  onClick: n,
157
157
  className: "text-[11px] text-muted-foreground hover:text-foreground",
158
158
  children: r
159
159
  })]
160
- }), s && /* @__PURE__ */ M("div", {
160
+ }), s && /* @__PURE__ */ N("div", {
161
161
  className: "px-3 pb-3",
162
162
  children: o
163
163
  })]
@@ -169,13 +169,13 @@ function We(e) {
169
169
  !!c?.field,
170
170
  f && f.mode !== "compact",
171
171
  (m?.size ?? 0) > 0
172
- ].filter(Boolean).length, y = f?.mode === "compact" ? _e : f?.mode === "comfortable" ? ge : he, b = t("list.viewSettings", { defaultValue: "View settings" });
173
- return /* @__PURE__ */ N(x, {
172
+ ].filter(Boolean).length, ee = f?.mode === "compact" ? _e : f?.mode === "comfortable" ? ge : he, b = t("list.viewSettings", { defaultValue: "View settings" });
173
+ return /* @__PURE__ */ P(x, {
174
174
  open: g,
175
175
  onOpenChange: _,
176
- children: [/* @__PURE__ */ M(C, {
176
+ children: [/* @__PURE__ */ N(C, {
177
177
  asChild: !0,
178
- children: /* @__PURE__ */ N(d, {
178
+ children: /* @__PURE__ */ P(d, {
179
179
  variant: "ghost",
180
180
  size: "sm",
181
181
  "aria-label": b,
@@ -183,38 +183,38 @@ function We(e) {
183
183
  className: w("h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150", v > 0 && "text-foreground font-medium"),
184
184
  "data-testid": "view-settings-trigger",
185
185
  children: [
186
- /* @__PURE__ */ M(ye, { className: "h-3.5 w-3.5 sm:mr-1.5" }),
187
- /* @__PURE__ */ M("span", {
186
+ /* @__PURE__ */ N(ye, { className: "h-3.5 w-3.5 sm:mr-1.5" }),
187
+ /* @__PURE__ */ N("span", {
188
188
  className: "hidden sm:inline",
189
189
  children: b
190
190
  }),
191
- v > 0 && /* @__PURE__ */ M("span", {
191
+ v > 0 && /* @__PURE__ */ N("span", {
192
192
  className: "ml-1 flex h-4 min-w-[16px] items-center justify-center text-[10px] font-medium text-muted-foreground tabular-nums",
193
193
  children: v
194
194
  })
195
195
  ]
196
196
  })
197
- }), /* @__PURE__ */ N(S, {
197
+ }), /* @__PURE__ */ P(S, {
198
198
  align: "end",
199
199
  className: "w-80 p-0",
200
200
  "data-testid": "view-settings-content",
201
201
  children: [
202
- /* @__PURE__ */ N("div", {
202
+ /* @__PURE__ */ P("div", {
203
203
  className: "px-3 py-2 border-b",
204
- children: [/* @__PURE__ */ M("div", {
204
+ children: [/* @__PURE__ */ N("div", {
205
205
  className: "text-sm font-semibold",
206
206
  children: b
207
- }), /* @__PURE__ */ M("div", {
207
+ }), /* @__PURE__ */ N("div", {
208
208
  className: "text-[11px] text-muted-foreground",
209
209
  children: t("list.viewSettingsHint", { defaultValue: "Grouping, color, density, and visible fields." })
210
210
  })]
211
211
  }),
212
- r && o && /* @__PURE__ */ M(I, {
212
+ r && o && /* @__PURE__ */ N(L, {
213
213
  title: t("list.group", { defaultValue: "Group" }),
214
214
  badge: i?.fields?.length || 0,
215
215
  onClear: i ? () => o(void 0) : void 0,
216
216
  clearLabel: t("list.clear", { defaultValue: "Clear" }),
217
- children: /* @__PURE__ */ M(ee, {
217
+ children: /* @__PURE__ */ N(y, {
218
218
  value: i,
219
219
  fieldOptions: n.map((e) => ({
220
220
  value: e.name,
@@ -229,15 +229,15 @@ function We(e) {
229
229
  onChange: (e) => o(e)
230
230
  })
231
231
  }),
232
- s && l && /* @__PURE__ */ N(I, {
232
+ s && l && /* @__PURE__ */ P(L, {
233
233
  title: t("list.color", { defaultValue: "Row color" }),
234
234
  onClear: c ? () => l(void 0) : void 0,
235
235
  clearLabel: t("list.clear", { defaultValue: "Clear" }),
236
236
  defaultOpen: !!c,
237
- children: [/* @__PURE__ */ M("label", {
237
+ children: [/* @__PURE__ */ N("label", {
238
238
  className: "block text-[11px] text-muted-foreground mb-1",
239
239
  children: t("list.colorByField", { defaultValue: "Color by field" })
240
- }), /* @__PURE__ */ N("select", {
240
+ }), /* @__PURE__ */ P("select", {
241
241
  className: "w-full h-8 rounded border border-input bg-background px-2 text-xs",
242
242
  value: c?.field || "",
243
243
  onChange: (e) => {
@@ -248,47 +248,47 @@ function We(e) {
248
248
  } : void 0);
249
249
  },
250
250
  "data-testid": "color-field-select",
251
- children: [/* @__PURE__ */ M("option", {
251
+ children: [/* @__PURE__ */ N("option", {
252
252
  value: "",
253
253
  children: t("list.none", { defaultValue: "None" })
254
- }), n.map((e) => /* @__PURE__ */ M("option", {
254
+ }), n.map((e) => /* @__PURE__ */ N("option", {
255
255
  value: e.name,
256
256
  children: e.label || e.name
257
257
  }, e.name))]
258
258
  })]
259
259
  }),
260
- u && f && /* @__PURE__ */ M(I, {
260
+ u && f && /* @__PURE__ */ N(L, {
261
261
  title: t("grid.toolbar.densityMode", { defaultValue: "Density" }),
262
262
  defaultOpen: f.mode !== "compact",
263
- children: /* @__PURE__ */ N("div", {
263
+ children: /* @__PURE__ */ P("div", {
264
264
  className: "flex items-center gap-2",
265
- children: [/* @__PURE__ */ N(d, {
265
+ children: [/* @__PURE__ */ P(d, {
266
266
  variant: "outline",
267
267
  size: "sm",
268
268
  className: "h-7 gap-1.5",
269
269
  onClick: f.cycle,
270
270
  "data-testid": "view-settings-density-cycle",
271
- children: [/* @__PURE__ */ M(y, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ M("span", {
271
+ children: [/* @__PURE__ */ N(ee, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ N("span", {
272
272
  className: "text-xs",
273
273
  children: f.mode === "compact" ? t("grid.toolbar.densityCompact", { defaultValue: "Compact" }) : f.mode === "comfortable" ? t("grid.toolbar.densityComfortable", { defaultValue: "Comfortable" }) : t("grid.toolbar.densitySpacious", { defaultValue: "Spacious" })
274
274
  })]
275
- }), /* @__PURE__ */ M("span", {
275
+ }), /* @__PURE__ */ N("span", {
276
276
  className: "text-[11px] text-muted-foreground",
277
277
  children: t("grid.toolbar.densityCycleShortHint", { defaultValue: "Click to cycle" })
278
278
  })]
279
279
  })
280
280
  }),
281
- p && m && h && /* @__PURE__ */ M(I, {
281
+ p && m && h && /* @__PURE__ */ N(L, {
282
282
  title: t("list.hideFieldsTitle", { defaultValue: "Hide fields" }),
283
283
  badge: m.size,
284
284
  onClear: m.size > 0 ? () => h(/* @__PURE__ */ new Set()) : void 0,
285
285
  clearLabel: t("list.showAll", { defaultValue: "Show all" }),
286
286
  defaultOpen: m.size > 0,
287
- children: /* @__PURE__ */ M("div", {
287
+ children: /* @__PURE__ */ N("div", {
288
288
  className: "max-h-48 overflow-y-auto space-y-0.5",
289
- children: n.map((e) => /* @__PURE__ */ N("label", {
289
+ children: n.map((e) => /* @__PURE__ */ P("label", {
290
290
  className: "flex items-center gap-2 text-xs py-1 px-1 rounded hover:bg-muted cursor-pointer",
291
- children: [/* @__PURE__ */ M("input", {
291
+ children: [/* @__PURE__ */ N("input", {
292
292
  type: "checkbox",
293
293
  checked: !m.has(e.name),
294
294
  onChange: () => {
@@ -296,7 +296,7 @@ function We(e) {
296
296
  t.has(e.name) ? t.delete(e.name) : t.add(e.name), h(t);
297
297
  },
298
298
  className: "rounded border-input"
299
- }), /* @__PURE__ */ M("span", {
299
+ }), /* @__PURE__ */ N("span", {
300
300
  className: "truncate",
301
301
  children: e.label || e.name
302
302
  })]
@@ -325,7 +325,7 @@ var Ke = new Set([
325
325
  ]);
326
326
  function qe({ config: e, objectDef: t, data: n = [], onFilterChange: r, maxVisible: i, className: a }) {
327
327
  switch (e.element) {
328
- case "dropdown": return /* @__PURE__ */ M(R, {
328
+ case "dropdown": return /* @__PURE__ */ N(z, {
329
329
  fields: e.fields || [],
330
330
  objectDef: t,
331
331
  data: n,
@@ -333,14 +333,14 @@ function qe({ config: e, objectDef: t, data: n = [], onFilterChange: r, maxVisib
333
333
  maxVisible: i,
334
334
  className: a
335
335
  });
336
- case "tabs": return /* @__PURE__ */ M(Je, {
336
+ case "tabs": return /* @__PURE__ */ N(Je, {
337
337
  tabs: e.tabs || [],
338
338
  showAllRecords: e.showAllRecords !== !1,
339
339
  allowAddTab: e.allowAddTab,
340
340
  onFilterChange: r,
341
341
  className: a
342
342
  });
343
- case "toggle": return /* @__PURE__ */ M(z, {
343
+ case "toggle": return /* @__PURE__ */ N(B, {
344
344
  fields: e.fields || [],
345
345
  onFilterChange: r,
346
346
  className: a
@@ -348,7 +348,7 @@ function qe({ config: e, objectDef: t, data: n = [], onFilterChange: r, maxVisib
348
348
  default: return null;
349
349
  }
350
350
  }
351
- function L(e, t, n, r) {
351
+ function R(e, t, n, r) {
352
352
  return e.map((e) => {
353
353
  let i = e.options ? [...e.options] : [], a = e.type, o, s, c;
354
354
  if (t?.fields) {
@@ -385,13 +385,13 @@ function L(e, t, n, r) {
385
385
  };
386
386
  });
387
387
  }
388
- function R({ fields: e, objectDef: t, data: n, onFilterChange: r, maxVisible: i, className: o }) {
388
+ function z({ fields: e, objectDef: t, data: n, onFilterChange: r, maxVisible: i, className: o }) {
389
389
  let { fieldLabel: s, translateOptions: c } = Oe(), l = Ge(), u = t?.name, [d, f] = a.useState(() => {
390
390
  let t = {};
391
391
  return e.forEach((e) => {
392
392
  e.defaultValues && e.defaultValues.length > 0 && (t[e.field] = e.defaultValues);
393
393
  }), t;
394
- }), p = a.useMemo(() => L(e, t, n, {
394
+ }), p = a.useMemo(() => R(e, t, n, {
395
395
  objectName: u,
396
396
  fieldLabel: s,
397
397
  translateOptions: c
@@ -420,35 +420,35 @@ function R({ fields: e, objectDef: t, data: n, onFilterChange: r, maxVisible: i,
420
420
  }, []);
421
421
  let g = i !== void 0 && i < p.length ? p.slice(0, i) : p, _ = i !== void 0 && i < p.length ? p.slice(i) : [], v = (e) => {
422
422
  let t = d[e.field] || [], n = t.length > 0, r = Ke.has(e.type || "") && e.options.length === 0 && (e.referenceTo || e.type === "user" || e.type === "owner"), i = r ? "w-72" : "w-56";
423
- return /* @__PURE__ */ N(x, { children: [/* @__PURE__ */ M(C, {
423
+ return /* @__PURE__ */ P(x, { children: [/* @__PURE__ */ N(C, {
424
424
  asChild: !0,
425
- children: /* @__PURE__ */ N("button", {
425
+ children: /* @__PURE__ */ P("button", {
426
426
  "data-testid": `filter-badge-${e.field}`,
427
427
  className: w("inline-flex items-center gap-1 h-7 px-2 text-xs transition-colors shrink-0 rounded-md", n ? "text-foreground font-medium" : "text-muted-foreground hover:text-foreground"),
428
428
  children: [
429
- /* @__PURE__ */ M("span", {
429
+ /* @__PURE__ */ N("span", {
430
430
  className: "truncate max-w-[100px]",
431
431
  children: e.label || e.field
432
432
  }),
433
- n && /* @__PURE__ */ M("span", {
433
+ n && /* @__PURE__ */ N("span", {
434
434
  className: "text-[10px] text-muted-foreground/80 tabular-nums",
435
435
  children: t.length
436
436
  }),
437
- n ? /* @__PURE__ */ M(Ce, {
437
+ n ? /* @__PURE__ */ N(Ce, {
438
438
  className: "h-3 w-3 opacity-60 hover:opacity-100",
439
439
  "data-testid": `filter-clear-${e.field}`,
440
440
  onClick: (t) => {
441
441
  t.stopPropagation(), h(e.field, []);
442
442
  }
443
- }) : /* @__PURE__ */ M(E, { className: "h-3 w-3 opacity-60" })
443
+ }) : /* @__PURE__ */ N(O, { className: "h-3 w-3 opacity-60" })
444
444
  ]
445
445
  })
446
- }), /* @__PURE__ */ M(S, {
446
+ }), /* @__PURE__ */ N(S, {
447
447
  align: "start",
448
448
  className: w(i, "p-2"),
449
- children: r ? /* @__PURE__ */ M("div", {
449
+ children: r ? /* @__PURE__ */ N("div", {
450
450
  "data-testid": `filter-lookup-${e.field}`,
451
- children: /* @__PURE__ */ M(b, {
451
+ children: /* @__PURE__ */ N(te, {
452
452
  field: {
453
453
  value: e.field,
454
454
  label: e.label || e.field,
@@ -464,16 +464,16 @@ function R({ fields: e, objectDef: t, data: n, onFilterChange: r, maxVisible: i,
464
464
  h(e.field, n);
465
465
  }
466
466
  })
467
- }) : /* @__PURE__ */ M("div", {
467
+ }) : /* @__PURE__ */ N("div", {
468
468
  className: "max-h-60 overflow-y-auto space-y-0.5",
469
469
  "data-testid": `filter-options-${e.field}`,
470
- children: e.options.length === 0 ? /* @__PURE__ */ M("div", {
470
+ children: e.options.length === 0 ? /* @__PURE__ */ N("div", {
471
471
  className: "px-2 py-3 text-center text-xs text-muted-foreground",
472
472
  children: "No options"
473
- }) : e.options.map((n) => /* @__PURE__ */ N("label", {
473
+ }) : e.options.map((n) => /* @__PURE__ */ P("label", {
474
474
  className: w("flex items-center gap-2 text-sm py-1.5 px-2 rounded cursor-pointer", t.includes(n.value) ? "bg-primary/5 text-primary" : "hover:bg-muted"),
475
475
  children: [
476
- /* @__PURE__ */ M("input", {
476
+ /* @__PURE__ */ N("input", {
477
477
  type: "checkbox",
478
478
  checked: t.includes(n.value),
479
479
  onChange: () => {
@@ -482,15 +482,15 @@ function R({ fields: e, objectDef: t, data: n, onFilterChange: r, maxVisible: i,
482
482
  },
483
483
  className: "rounded border-input"
484
484
  }),
485
- n.color && /* @__PURE__ */ M("span", {
485
+ n.color && /* @__PURE__ */ N("span", {
486
486
  className: "h-2.5 w-2.5 rounded-full shrink-0",
487
487
  style: { backgroundColor: n.color }
488
488
  }),
489
- /* @__PURE__ */ M("span", {
489
+ /* @__PURE__ */ N("span", {
490
490
  className: "truncate flex-1",
491
491
  children: n.label
492
492
  }),
493
- n.count !== void 0 && /* @__PURE__ */ M("span", {
493
+ n.count !== void 0 && /* @__PURE__ */ N("span", {
494
494
  className: "text-xs text-muted-foreground",
495
495
  children: n.count
496
496
  })
@@ -499,32 +499,32 @@ function R({ fields: e, objectDef: t, data: n, onFilterChange: r, maxVisible: i,
499
499
  })
500
500
  })] }, e.field);
501
501
  };
502
- return /* @__PURE__ */ M("div", {
502
+ return /* @__PURE__ */ N("div", {
503
503
  className: w("flex items-center gap-0.5 overflow-x-auto", o),
504
504
  "data-testid": "user-filters-dropdown",
505
- children: p.length === 0 ? /* @__PURE__ */ M("span", {
505
+ children: p.length === 0 ? /* @__PURE__ */ N("span", {
506
506
  className: "text-xs text-muted-foreground",
507
507
  "data-testid": "user-filters-empty",
508
508
  children: "No filter fields"
509
- }) : /* @__PURE__ */ N(Te, { children: [g.map(v), _.length > 0 && /* @__PURE__ */ N(x, { children: [/* @__PURE__ */ M(C, {
509
+ }) : /* @__PURE__ */ P(Te, { children: [g.map(v), _.length > 0 && /* @__PURE__ */ P(x, { children: [/* @__PURE__ */ N(C, {
510
510
  asChild: !0,
511
- children: /* @__PURE__ */ N("button", {
511
+ children: /* @__PURE__ */ P("button", {
512
512
  "data-testid": "user-filters-more",
513
513
  className: "inline-flex items-center gap-1 h-7 px-2 text-xs text-muted-foreground hover:text-foreground transition-colors shrink-0 rounded-md",
514
514
  children: [
515
- /* @__PURE__ */ M("span", { children: l }),
516
- /* @__PURE__ */ M("span", {
515
+ /* @__PURE__ */ N("span", { children: l }),
516
+ /* @__PURE__ */ N("span", {
517
517
  className: "text-[10px] text-muted-foreground/80 tabular-nums",
518
518
  children: _.length
519
519
  }),
520
- /* @__PURE__ */ M(E, { className: "h-3 w-3 opacity-60" })
520
+ /* @__PURE__ */ N(O, { className: "h-3 w-3 opacity-60" })
521
521
  ]
522
522
  })
523
- }), /* @__PURE__ */ M(S, {
523
+ }), /* @__PURE__ */ N(S, {
524
524
  align: "start",
525
525
  className: "w-64 p-2",
526
526
  "data-testid": "user-filters-more-content",
527
- children: /* @__PURE__ */ M("div", {
527
+ children: /* @__PURE__ */ N("div", {
528
528
  className: "space-y-1",
529
529
  children: _.map(v)
530
530
  })
@@ -545,23 +545,23 @@ function Je({ tabs: e, showAllRecords: t, allowAddTab: n, onFilterChange: r, cla
545
545
  return a.useEffect(() => {
546
546
  let t = e.find((e) => e.default);
547
547
  t && r(t.filters || []);
548
- }, []), /* @__PURE__ */ N("div", {
548
+ }, []), /* @__PURE__ */ P("div", {
549
549
  className: w("flex items-center gap-0.5 overflow-x-auto", i),
550
550
  "data-testid": "user-filters-tabs",
551
- children: [l.map((e) => /* @__PURE__ */ M("button", {
551
+ children: [l.map((e) => /* @__PURE__ */ N("button", {
552
552
  "data-testid": `filter-tab-${e.id}`,
553
553
  onClick: () => c(e.id),
554
554
  className: w("inline-flex items-center h-7 px-3 text-xs font-medium rounded-md transition-colors shrink-0", o === e.id ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:text-foreground hover:bg-muted"),
555
555
  children: e.label
556
- }, e.id)), n && /* @__PURE__ */ M("button", {
556
+ }, e.id)), n && /* @__PURE__ */ N("button", {
557
557
  className: "inline-flex items-center justify-center h-7 w-7 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted shrink-0",
558
558
  "data-testid": "filter-tab-add",
559
559
  title: "Add filter tab",
560
- children: /* @__PURE__ */ M(pe, { className: "h-3.5 w-3.5" })
560
+ children: /* @__PURE__ */ N(pe, { className: "h-3.5 w-3.5" })
561
561
  })]
562
562
  });
563
563
  }
564
- function z({ fields: e, onFilterChange: t, className: n }) {
564
+ function B({ fields: e, onFilterChange: t, className: n }) {
565
565
  let [r, i] = a.useState(() => {
566
566
  let t = /* @__PURE__ */ new Set();
567
567
  return e.forEach((e) => {
@@ -588,10 +588,10 @@ function z({ fields: e, onFilterChange: t, className: n }) {
588
588
  };
589
589
  return a.useEffect(() => {
590
590
  r.size > 0 && o(r);
591
- }, []), /* @__PURE__ */ M("div", {
591
+ }, []), /* @__PURE__ */ N("div", {
592
592
  className: w("flex items-center gap-1 overflow-x-auto", n),
593
593
  "data-testid": "user-filters-toggle",
594
- children: e.map((e) => /* @__PURE__ */ M(d, {
594
+ children: e.map((e) => /* @__PURE__ */ N(d, {
595
595
  variant: r.has(e.field) ? "default" : "outline",
596
596
  size: "sm",
597
597
  className: "h-7 px-3 text-xs shrink-0",
@@ -603,7 +603,7 @@ function z({ fields: e, onFilterChange: t, className: n }) {
603
603
  }
604
604
  //#endregion
605
605
  //#region src/ListView.tsx
606
- function B(e) {
606
+ function V(e) {
607
607
  switch (e) {
608
608
  case "equals":
609
609
  case "eq": return "=";
@@ -627,10 +627,10 @@ function B(e) {
627
627
  default: return e;
628
628
  }
629
629
  }
630
- function V(e) {
630
+ function H(e) {
631
631
  if (!Array.isArray(e) || e.length < 3) return e;
632
632
  let [t, n, r] = e;
633
- return typeof t == "string" && (t === "and" || t === "or") ? [t, ...e.slice(1).map((e) => Array.isArray(e) ? V(e) : e)] : n === "in" && Array.isArray(r) ? r.length === 0 ? [] : r.length === 1 ? [
633
+ return typeof t == "string" && (t === "and" || t === "or") ? [t, ...e.slice(1).map((e) => Array.isArray(e) ? H(e) : e)] : n === "in" && Array.isArray(r) ? r.length === 0 ? [] : r.length === 1 ? [
634
634
  t,
635
635
  "=",
636
636
  r[0]
@@ -652,7 +652,7 @@ function Ye(e) {
652
652
  return e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
653
653
  }
654
654
  function Xe(e) {
655
- return !Array.isArray(e) || e.length === 0 ? [] : e.map((e) => Array.isArray(e) ? V(e) : e).filter((e) => Array.isArray(e) && e.length > 0);
655
+ return !Array.isArray(e) || e.length === 0 ? [] : e.map((e) => Array.isArray(e) ? H(e) : e).filter((e) => Array.isArray(e) && e.length > 0);
656
656
  }
657
657
  function Ze(e) {
658
658
  if (!e || !e.conditions || e.conditions.length === 0) return [];
@@ -666,7 +666,7 @@ function Ze(e) {
666
666
  null
667
667
  ] : [
668
668
  e.field,
669
- B(e.operator),
669
+ V(e.operator),
670
670
  e.value
671
671
  ]));
672
672
  return t.length === 0 ? [] : t.length === 1 ? t[0] : [e.logic, ...t];
@@ -773,40 +773,40 @@ function rt() {
773
773
  };
774
774
  }
775
775
  }
776
- var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange: s, onSortChange: c, onSearchChange: l, onHiddenFieldsChange: u, onColumnStateChange: f, onRowClick: p, showViewSwitcher: m = !1, ...h }, g) => {
777
- let { t: _ } = nt(), { fieldLabel: b, actionLabel: ie } = rt(), { translateOptions: ae } = Oe(), E = a.useMemo(() => e.viewType ? e : {
776
+ var U = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange: s, onSortChange: c, onSearchChange: l, onHiddenFieldsChange: u, onColumnStateChange: f, onRowClick: p, showViewSwitcher: h = !1, ...g }, _) => {
777
+ let { t: v } = nt(), { fieldLabel: te, actionLabel: ae } = rt(), { translateOptions: E } = Oe(), O = a.useMemo(() => e.viewType ? e : {
778
778
  ...e,
779
779
  viewType: "grid"
780
- }, [e]), D = a.useCallback((e, t) => E.objectName ? b(E.objectName, e, t) : t, [E.objectName, b]), ce = a.useCallback((e) => {
780
+ }, [e]), k = a.useCallback((e, t) => O.objectName ? te(O.objectName, e, t) : t, [O.objectName, te]), ce = a.useCallback((e) => {
781
781
  let t = Ye(e);
782
- return E.objectName && typeof ie == "function" ? ie(E.objectName, e, t) : t;
783
- }, [E.objectName, ie]), k = a.useMemo(() => {
784
- let e = E.userActions, t = E.addRecord?.enabled === !0 && e?.addRecordForm !== !1;
782
+ return O.objectName && typeof ae == "function" ? ae(O.objectName, e, t) : t;
783
+ }, [O.objectName, ae]), A = a.useMemo(() => {
784
+ let e = O.userActions, t = O.addRecord?.enabled === !0 && e?.addRecordForm !== !1;
785
785
  return {
786
- showSearch: e?.search === void 0 ? E.showSearch !== !1 : e.search,
787
- showSort: e?.sort === void 0 ? E.showSort !== !1 : e.sort,
788
- showFilters: e?.filter === void 0 ? E.showFilters !== !1 : e.filter,
789
- showDensity: e?.rowHeight === void 0 ? E.showDensity !== !1 : e.rowHeight,
790
- showHideFields: E.showHideFields === !0,
791
- showGroup: E.showGroup !== !1,
792
- showColor: E.showColor === !0,
793
- compactToolbar: E.compactToolbar === !0,
786
+ showSearch: e?.search === void 0 ? O.showSearch !== !1 : e.search,
787
+ showSort: e?.sort === void 0 ? O.showSort !== !1 : e.sort,
788
+ showFilters: e?.filter === void 0 ? O.showFilters !== !1 : e.filter,
789
+ showDensity: e?.rowHeight === void 0 ? O.showDensity !== !1 : e.rowHeight,
790
+ showHideFields: O.showHideFields === !0,
791
+ showGroup: O.showGroup !== !1,
792
+ showColor: O.showColor === !0,
793
+ compactToolbar: O.compactToolbar === !0,
794
794
  showAddRecord: t,
795
- addRecordPosition: E.addRecord?.position === "bottom" ? "bottom" : "top"
795
+ addRecordPosition: O.addRecord?.position === "bottom" ? "bottom" : "top"
796
796
  };
797
797
  }, [
798
- E.userActions,
799
- E.showSearch,
800
- E.showSort,
801
- E.showFilters,
802
- E.showDensity,
803
- E.showHideFields,
804
- E.showGroup,
805
- E.showColor,
806
- E.compactToolbar,
807
- E.addRecord,
808
- E.userActions?.addRecordForm
809
- ]), [A, de] = a.useState(E.viewType), [j, ye] = a.useState(""), [Ee, De] = a.useState(!1), [Ae, je] = a.useState(!1), [P, Ie] = a.useState(() => E.sort && E.sort.length > 0 ? E.sort.map((e) => {
798
+ O.userActions,
799
+ O.showSearch,
800
+ O.showSort,
801
+ O.showFilters,
802
+ O.showDensity,
803
+ O.showHideFields,
804
+ O.showGroup,
805
+ O.showColor,
806
+ O.compactToolbar,
807
+ O.addRecord,
808
+ O.userActions?.addRecordForm
809
+ ]), [j, de] = a.useState(O.viewType), [M, ye] = a.useState(""), [Ee, De] = a.useState(!1), [Ae, je] = a.useState(!1), [F, Ie] = a.useState(() => O.sort && O.sort.length > 0 ? O.sort.map((e) => {
810
810
  if (typeof e == "string") {
811
811
  let t = e.trim().split(/\s+/);
812
812
  return {
@@ -820,9 +820,9 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
820
820
  field: e.field,
821
821
  order: e.order || "asc"
822
822
  };
823
- }) : []), Le = a.useMemo(() => JSON.stringify(E.sort || []), [E.sort]);
823
+ }) : []), Le = a.useMemo(() => JSON.stringify(O.sort || []), [O.sort]);
824
824
  a.useEffect(() => {
825
- E.sort && E.sort.length > 0 ? Ie(E.sort.map((e) => {
825
+ O.sort && O.sort.length > 0 ? Ie(O.sort.map((e) => {
826
826
  if (typeof e == "string") {
827
827
  let t = e.trim().split(/\s+/);
828
828
  return {
@@ -838,12 +838,12 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
838
838
  };
839
839
  })) : Ie([]);
840
840
  }, [Le]);
841
- let [Re, ze] = a.useState(!1), [F, Ve] = a.useState({
841
+ let [Re, ze] = a.useState(!1), [I, Ve] = a.useState({
842
842
  id: "root",
843
843
  logic: "and",
844
844
  conditions: []
845
- }), [I, Ge] = a.useState(() => {
846
- if (!(!E.tabs || E.tabs.length === 0)) return E.tabs.find((e) => e.isDefault)?.name ?? E.tabs[0]?.name;
845
+ }), [L, Ge] = a.useState(() => {
846
+ if (!(!O.tabs || O.tabs.length === 0)) return O.tabs.find((e) => e.isDefault)?.name ?? O.tabs[0]?.name;
847
847
  }), Ke = a.useCallback((e) => {
848
848
  if (Ge(e.name), e.filter) {
849
849
  let t = {
@@ -860,19 +860,19 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
860
860
  };
861
861
  Ve(e), s?.(e);
862
862
  }
863
- }, [s]), L = h.dataSource, [R, Je] = a.useState([]), [z, B] = a.useState(() => !(Array.isArray(E.data) || E.data && typeof E.data == "object" && E.data.provider === "value" && Array.isArray(E.data.items))), [V, Qe] = a.useState(null), [$e, et] = a.useState(!1), [tt, H] = a.useState(0), [it, at] = a.useState(!1);
864
- a.useImperativeHandle(g, () => ({ refresh: () => H((e) => e + 1) }), []), a.useEffect(() => {
865
- if (!(!L?.onMutation || !E.objectName || E.refreshTrigger)) return L.onMutation((e) => {
866
- e.resource === E.objectName && H((e) => e + 1);
863
+ }, [s]), R = g.dataSource, [z, Je] = a.useState([]), [B, V] = a.useState(() => !(Array.isArray(O.data) || O.data && typeof O.data == "object" && O.data.provider === "value" && Array.isArray(O.data.items))), [H, Qe] = a.useState(null), [$e, et] = a.useState(!1), [tt, U] = a.useState(0), [it, at] = a.useState(!1);
864
+ a.useImperativeHandle(_, () => ({ refresh: () => U((e) => e + 1) }), []), a.useEffect(() => {
865
+ if (!(!R?.onMutation || !O.objectName || O.refreshTrigger)) return R.onMutation((e) => {
866
+ e.resource === O.objectName && U((e) => e + 1);
867
867
  });
868
868
  }, [
869
- L,
870
- E.objectName,
871
- E.refreshTrigger
869
+ R,
870
+ O.objectName,
871
+ O.refreshTrigger
872
872
  ]);
873
- let [ot, st] = a.useState(void 0), U = ot ?? E.pagination?.pageSize ?? 100, W = a.useMemo(() => {
874
- if (E.grouping?.fields?.length) return E.grouping;
875
- let e = typeof E.groupBy == "string" ? E.groupBy.trim() : "", t = typeof E.groupBy2 == "string" ? E.groupBy2.trim() : "", n = [];
873
+ let [ot, st] = a.useState(void 0), W = ot ?? O.pagination?.pageSize ?? 100, G = a.useMemo(() => {
874
+ if (O.grouping?.fields?.length) return O.grouping;
875
+ let e = typeof O.groupBy == "string" ? O.groupBy.trim() : "", t = typeof O.groupBy2 == "string" ? O.groupBy2.trim() : "", n = [];
876
876
  return e && n.push({
877
877
  field: e,
878
878
  order: "asc",
@@ -883,57 +883,57 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
883
883
  collapsed: !1
884
884
  }), n.length > 0 ? { fields: n } : void 0;
885
885
  }, [
886
- E.grouping,
887
- E.groupBy,
888
- E.groupBy2
889
- ]), [G, ct] = a.useState(W), [lt, ut] = a.useState(!1), dt = a.useRef(W);
886
+ O.grouping,
887
+ O.groupBy,
888
+ O.groupBy2
889
+ ]), [K, ct] = a.useState(G), [lt, ut] = a.useState(!1), dt = a.useRef(G);
890
890
  a.useEffect(() => {
891
- dt.current !== W && (dt.current = W, ct(W));
892
- }, [W]);
893
- let [K, ft] = a.useState(E.rowColor), [pt, mt] = a.useState(!1), [ht, gt] = a.useState([]), _t = a.useRef(0), [vt, yt] = a.useState(() => {
891
+ dt.current !== G && (dt.current = G, ct(G));
892
+ }, [G]);
893
+ let [q, ft] = a.useState(O.rowColor), [pt, mt] = a.useState(!1), [ht, gt] = a.useState([]), _t = a.useRef(0), [vt, yt] = a.useState(() => {
894
894
  let e = /* @__PURE__ */ new Set();
895
- return E.quickFilters?.forEach((t) => {
895
+ return O.quickFilters?.forEach((t) => {
896
896
  let n = r(t);
897
897
  n.defaultActive && e.add(n.id);
898
898
  }), e;
899
899
  }), [bt, xt] = a.useState([]), St = a.useMemo(() => {
900
- if (E.userFilters) return E.userFilters;
901
- if (!V?.fields) return;
900
+ if (O.userFilters) return O.userFilters;
901
+ if (!H?.fields) return;
902
902
  let e = new Set([
903
903
  "select",
904
904
  "multi-select",
905
905
  "boolean"
906
- ]), t = [], n = Array.isArray(V.fields) ? V.fields.map((e) => [e.name, e]) : Object.entries(V.fields);
906
+ ]), t = [], n = Array.isArray(H.fields) ? H.fields.map((e) => [e.name, e]) : Object.entries(H.fields);
907
907
  for (let [r, i] of n) (e.has(i.type) || i.options && !i.type) && t.push({
908
908
  field: r,
909
- label: D(r, i.label || r),
909
+ label: k(r, i.label || r),
910
910
  type: i.type === "boolean" ? "boolean" : i.type === "multi-select" ? "multi-select" : "select"
911
911
  });
912
912
  if (t.length !== 0) return {
913
913
  element: "dropdown",
914
914
  fields: t
915
915
  };
916
- }, [E.userFilters, V]), [q, Ct] = a.useState(() => new Set(E.hiddenFields || [])), wt = a.useMemo(() => JSON.stringify(E.hiddenFields || []), [E.hiddenFields]);
916
+ }, [O.userFilters, H]), [J, Ct] = a.useState(() => new Set(O.hiddenFields || [])), wt = a.useMemo(() => JSON.stringify(O.hiddenFields || []), [O.hiddenFields]);
917
917
  a.useEffect(() => {
918
- Ct(new Set(E.hiddenFields || []));
918
+ Ct(new Set(O.hiddenFields || []));
919
919
  }, [wt]);
920
920
  let Tt = a.useCallback((e) => {
921
921
  Ct(e), u?.(Array.from(e));
922
- }, [u]), [Et, Dt] = a.useState(!1), [Ot, kt] = a.useState(!1), J = a.useMemo(() => i(E.quickFilters), [E.quickFilters]), Y = a.useMemo(() => {
923
- if (E.exportOptions) return Array.isArray(E.exportOptions) ? { formats: E.exportOptions } : E.exportOptions;
924
- }, [E.exportOptions]), X = Me(a.useMemo(() => E.densityMode ? E.densityMode : E.rowHeight ? {
922
+ }, [u]), [Et, Dt] = a.useState(!1), [Ot, kt] = a.useState(!1), Y = a.useMemo(() => i(O.quickFilters), [O.quickFilters]), X = a.useMemo(() => {
923
+ if (O.exportOptions) return Array.isArray(O.exportOptions) ? { formats: O.exportOptions } : O.exportOptions;
924
+ }, [O.exportOptions]), Z = Me(a.useMemo(() => O.densityMode ? O.densityMode : O.rowHeight ? {
925
925
  compact: "compact",
926
926
  short: "compact",
927
927
  medium: "comfortable",
928
928
  tall: "spacious",
929
929
  extra_tall: "spacious"
930
- }[E.rowHeight] || "comfortable" : "compact", [E.densityMode, E.rowHeight]), { onChange: E.onDensityChange }), At = a.useMemo(() => `objectui:gallery:density:${E.objectName ?? "default"}`, [E.objectName]), [Z, jt] = a.useState(() => {
931
- if (typeof window > "u") return E.gallery?.cardSize ?? "medium";
930
+ }[O.rowHeight] || "comfortable" : "compact", [O.densityMode, O.rowHeight]), { onChange: O.onDensityChange }), At = a.useMemo(() => `objectui:gallery:density:${O.objectName ?? "default"}`, [O.objectName]), [Q, jt] = a.useState(() => {
931
+ if (typeof window > "u") return O.gallery?.cardSize ?? "medium";
932
932
  try {
933
933
  let e = window.localStorage.getItem(At);
934
934
  if (e === "small" || e === "medium" || e === "large") return e;
935
935
  } catch {}
936
- return E.gallery?.cardSize ?? "medium";
936
+ return O.gallery?.cardSize ?? "medium";
937
937
  }), Mt = a.useCallback(() => {
938
938
  jt((e) => {
939
939
  let t = e === "large" ? "medium" : e === "medium" ? "small" : "large";
@@ -944,23 +944,23 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
944
944
  });
945
945
  }, [At]), { ref: Nt, isRefreshing: Pt, pullDistance: Ft } = Pe({
946
946
  onRefresh: a.useCallback(async () => {
947
- H((e) => e + 1);
947
+ U((e) => e + 1);
948
948
  }, []),
949
- enabled: !!L && !!E.objectName
950
- }), It = a.useMemo(() => E.id ? `listview-${E.objectName}-${E.id}-view` : `listview-${E.objectName}-view`, [E.objectName, E.id]);
949
+ enabled: !!R && !!O.objectName
950
+ }), It = a.useMemo(() => O.id ? `listview-${O.objectName}-${O.id}-view` : `listview-${O.objectName}-view`, [O.objectName, O.id]);
951
951
  a.useEffect(() => {
952
952
  let e = !0;
953
953
  return et(!1), Qe(null), (async () => {
954
- if (!L || !E.objectName) {
954
+ if (!R || !O.objectName) {
955
955
  et(!0);
956
956
  return;
957
957
  }
958
- if (typeof L.getObjectSchema != "function") {
958
+ if (typeof R.getObjectSchema != "function") {
959
959
  et(!0);
960
960
  return;
961
961
  }
962
962
  try {
963
- let t = await L.getObjectSchema(E.objectName);
963
+ let t = await R.getObjectSchema(O.objectName);
964
964
  e && Qe(t);
965
965
  } catch (e) {
966
966
  console.warn("Failed to fetch object schema for ListView:", e);
@@ -970,9 +970,9 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
970
970
  })(), () => {
971
971
  e = !1;
972
972
  };
973
- }, [E.objectName, L]);
973
+ }, [O.objectName, R]);
974
974
  let Lt = a.useMemo(() => {
975
- let e = Array.isArray(E.fields) ? E.fields.map((e) => typeof e == "string" ? e : e?.field).filter((e) => typeof e == "string" && e.length > 0) : [], n = new Set(e), r = (e) => {
975
+ let e = Array.isArray(O.fields) ? O.fields.map((e) => typeof e == "string" ? e : e?.field).filter((e) => typeof e == "string" && e.length > 0) : [], n = new Set(e), r = (e) => {
976
976
  if (!e) return;
977
977
  let t = [
978
978
  e.groupField,
@@ -996,51 +996,51 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
996
996
  ];
997
997
  for (let e of t) typeof e == "string" && e && n.add(e);
998
998
  };
999
- r(E.kanban), r(E.options?.kanban), r(E.calendar), r(E.options?.calendar), r(E.gallery), r(E.options?.gallery), r(E.timeline), r(E.options?.timeline), r(E.gantt), r(E.options?.gantt);
999
+ r(O.kanban), r(O.options?.kanban), r(O.calendar), r(O.options?.calendar), r(O.gallery), r(O.options?.gallery), r(O.timeline), r(O.options?.timeline), r(O.gantt), r(O.options?.gantt);
1000
1000
  let i = n.size > 0 ? Array.from(n) : void 0;
1001
- return t(V?.fields, i);
1001
+ return t(H?.fields, i);
1002
1002
  }, [
1003
- V?.fields,
1004
- E.fields,
1005
- E.kanban,
1006
- E.calendar,
1007
- E.gallery,
1008
- E.timeline,
1009
- E.gantt,
1010
- E.options
1011
- ]), Q = Fe();
1003
+ H?.fields,
1004
+ O.fields,
1005
+ O.kanban,
1006
+ O.calendar,
1007
+ O.gallery,
1008
+ O.timeline,
1009
+ O.gantt,
1010
+ O.options
1011
+ ]), $ = Fe();
1012
1012
  a.useEffect(() => {
1013
1013
  let e = !0, t = ++_t.current;
1014
- if (E.data && typeof E.data == "object" && !Array.isArray(E.data)) {
1015
- let e = E.data;
1014
+ if (O.data && typeof O.data == "object" && !Array.isArray(O.data)) {
1015
+ let e = O.data;
1016
1016
  if (e.provider === "value" && Array.isArray(e.items)) {
1017
1017
  let t = e.items;
1018
- if (j) {
1019
- let e = j.toLowerCase();
1018
+ if (M) {
1019
+ let e = M.toLowerCase();
1020
1020
  t = t.filter((t) => Object.values(t).some((t) => t != null && String(t).toLowerCase().includes(e)));
1021
1021
  }
1022
- Je(t), B(!1), at(!1);
1022
+ Je(t), V(!1), at(!1);
1023
1023
  return;
1024
1024
  }
1025
1025
  }
1026
- if (Array.isArray(E.data)) {
1027
- let e = E.data;
1028
- if (j) {
1029
- let t = j.toLowerCase();
1026
+ if (Array.isArray(O.data)) {
1027
+ let e = O.data;
1028
+ if (M) {
1029
+ let t = M.toLowerCase();
1030
1030
  e = e.filter((e) => Object.values(e).some((e) => e != null && String(e).toLowerCase().includes(t)));
1031
1031
  }
1032
- Je(e), B(!1), at(!1);
1032
+ Je(e), V(!1), at(!1);
1033
1033
  return;
1034
1034
  }
1035
1035
  return $e ? ((async () => {
1036
- if (!L || !E.objectName) {
1037
- B(!1);
1036
+ if (!R || !O.objectName) {
1037
+ V(!1);
1038
1038
  return;
1039
1039
  }
1040
- B(!0);
1040
+ V(!0);
1041
1041
  try {
1042
- let n = [], r = E.filters || [], i = Ze(F), a = [];
1043
- J && vt.size > 0 && J.forEach((e) => {
1042
+ let n = [], r = O.filters || [], i = Ze(I), a = [];
1043
+ Y && vt.size > 0 && Y.forEach((e) => {
1044
1044
  vt.has(e.id) && e.filters && e.filters.length > 0 && a.push(e.filters);
1045
1045
  });
1046
1046
  let o = Xe(bt), s = [
@@ -1050,11 +1050,11 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
1050
1050
  ...o
1051
1051
  ].filter((e) => Array.isArray(e) && e.length > 0);
1052
1052
  s.length > 1 ? n = ["and", ...s] : s.length === 1 && (n = s[0]);
1053
- let c = P.length > 0 ? P.filter((e) => e.field).map((e) => ({
1053
+ let c = F.length > 0 ? F.filter((e) => e.field).map((e) => ({
1054
1054
  field: e.field,
1055
1055
  order: e.order
1056
1056
  })) : void 0, l = (() => {
1057
- let e = Array.isArray(E.fields) ? E.fields.map((e) => typeof e == "string" ? e : e?.field).filter((e) => typeof e == "string" && e.length > 0) : [], t = Q?.isLoaded && E.objectName ? e.filter((e) => Q.checkField(E.objectName, e, "read")) : e;
1057
+ let e = Array.isArray(O.fields) ? O.fields.map((e) => typeof e == "string" ? e : e?.field).filter((e) => typeof e == "string" && e.length > 0) : [], t = $?.isLoaded && O.objectName ? e.filter((e) => $.checkField(O.objectName, e, "read")) : e;
1058
1058
  if (t.length === 0) return;
1059
1059
  let n = new Set(["id"]);
1060
1060
  for (let e of t) n.add(e);
@@ -1083,55 +1083,55 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
1083
1083
  ];
1084
1084
  for (let e of t) typeof e == "string" && e && n.add(e);
1085
1085
  };
1086
- r(E.kanban), r(E.options?.kanban), r(E.calendar), r(E.options?.calendar), r(E.gallery), r(E.options?.gallery), r(E.timeline), r(E.options?.timeline);
1086
+ r(O.kanban), r(O.options?.kanban), r(O.calendar), r(O.options?.calendar), r(O.gallery), r(O.options?.gallery), r(O.timeline), r(O.options?.timeline);
1087
1087
  {
1088
- let e = E.timeline ?? E.options?.timeline;
1088
+ let e = O.timeline ?? O.options?.timeline;
1089
1089
  e && !Array.isArray(e.metaFields) && (n.add("status"), n.add("priority"));
1090
1090
  }
1091
- return r(E.gantt), r(E.options?.gantt), Array.from(n);
1092
- })(), u = Array.isArray(n) ? n.length > 0 : !!n && Object.keys(n).length > 0, d = await L.find(E.objectName, {
1091
+ return r(O.gantt), r(O.options?.gantt), Array.from(n);
1092
+ })(), u = Array.isArray(n) ? n.length > 0 : !!n && Object.keys(n).length > 0, d = await R.find(O.objectName, {
1093
1093
  ...u ? { $filter: n } : {},
1094
1094
  $orderby: c,
1095
- $top: U,
1095
+ $top: W,
1096
1096
  ...l ? { $select: l } : {},
1097
1097
  ...Lt.length > 0 ? { $expand: Lt } : {},
1098
- ...j ? {
1099
- $search: j,
1100
- ...E.searchableFields && E.searchableFields.length > 0 ? { $searchFields: E.searchableFields } : {}
1098
+ ...M ? {
1099
+ $search: M,
1100
+ ...O.searchableFields && O.searchableFields.length > 0 ? { $searchFields: O.searchableFields } : {}
1101
1101
  } : {}
1102
1102
  });
1103
1103
  if (!e || t !== _t.current) return;
1104
1104
  let f = [];
1105
- Array.isArray(d) ? f = d : d && typeof d == "object" && (Array.isArray(d.data) ? f = d.data : Array.isArray(d.records) ? f = d.records : Array.isArray(d.value) && (f = d.value)), Je(f), at(f.length >= U);
1105
+ Array.isArray(d) ? f = d : d && typeof d == "object" && (Array.isArray(d.data) ? f = d.data : Array.isArray(d.records) ? f = d.records : Array.isArray(d.value) && (f = d.value)), Je(f), at(f.length >= W);
1106
1106
  } catch (e) {
1107
1107
  t === _t.current && console.error("ListView data fetch error:", e);
1108
1108
  } finally {
1109
- e && t === _t.current && B(!1);
1109
+ e && t === _t.current && V(!1);
1110
1110
  }
1111
1111
  })(), () => {
1112
1112
  e = !1;
1113
1113
  }) : void 0;
1114
1114
  }, [
1115
- E.objectName,
1116
- E.data,
1117
- L,
1118
- E.filters,
1119
- U,
1120
- P,
1115
+ O.objectName,
1116
+ O.data,
1117
+ R,
1118
+ O.filters,
1119
+ W,
1121
1120
  F,
1121
+ I,
1122
1122
  vt,
1123
- J,
1123
+ Y,
1124
1124
  bt,
1125
1125
  tt,
1126
- j,
1127
- E.searchableFields,
1126
+ M,
1127
+ O.searchableFields,
1128
1128
  Lt,
1129
1129
  $e,
1130
- E.refreshTrigger,
1131
- Q
1130
+ O.refreshTrigger,
1131
+ $
1132
1132
  ]);
1133
1133
  let Rt = a.useMemo(() => {
1134
- if (E.appearance?.allowedVisualizations && E.appearance.allowedVisualizations.length > 0) return E.appearance.allowedVisualizations.filter((e) => [
1134
+ if (O.appearance?.allowedVisualizations && O.appearance.allowedVisualizations.length > 0) return O.appearance.allowedVisualizations.filter((e) => [
1135
1135
  "grid",
1136
1136
  "kanban",
1137
1137
  "gallery",
@@ -1141,7 +1141,7 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
1141
1141
  "map"
1142
1142
  ].includes(e));
1143
1143
  let e = ["grid"];
1144
- return (E.kanban?.groupField || E.options?.kanban?.groupField) && e.push("kanban"), (E.gallery?.coverField || E.gallery?.imageField || E.options?.gallery?.imageField) && e.push("gallery"), (E.calendar?.startDateField || E.options?.calendar?.startDateField) && e.push("calendar"), (E.timeline?.startDateField || E.options?.timeline?.startDateField || E.options?.timeline?.dateField || E.options?.calendar?.startDateField) && e.push("timeline"), (E.gantt?.startDateField || E.options?.gantt?.startDateField) && e.push("gantt"), (E.options?.map?.locationField || E.options?.map?.latitudeField && E.options?.map?.longitudeField) && e.push("map"), E.viewType && !e.includes(E.viewType) && [
1144
+ return (O.kanban?.groupField || O.options?.kanban?.groupField) && e.push("kanban"), (O.gallery?.coverField || O.gallery?.imageField || O.options?.gallery?.imageField) && e.push("gallery"), (O.calendar?.startDateField || O.options?.calendar?.startDateField) && e.push("calendar"), (O.timeline?.startDateField || O.options?.timeline?.startDateField || O.options?.timeline?.dateField || O.options?.calendar?.startDateField) && e.push("timeline"), (O.gantt?.startDateField || O.options?.gantt?.startDateField) && e.push("gantt"), (O.options?.map?.locationField || O.options?.map?.latitudeField && O.options?.map?.longitudeField) && e.push("map"), O.viewType && !e.includes(O.viewType) && [
1145
1145
  "grid",
1146
1146
  "kanban",
1147
1147
  "calendar",
@@ -1149,20 +1149,20 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
1149
1149
  "gantt",
1150
1150
  "map",
1151
1151
  "gallery"
1152
- ].includes(E.viewType) && e.push(E.viewType), e;
1152
+ ].includes(O.viewType) && e.push(O.viewType), e;
1153
1153
  }, [
1154
- E.options,
1155
- E.viewType,
1156
- E.kanban,
1157
- E.calendar,
1158
- E.gantt,
1159
- E.gallery,
1160
- E.timeline,
1161
- E.appearance?.allowedVisualizations
1154
+ O.options,
1155
+ O.viewType,
1156
+ O.kanban,
1157
+ O.calendar,
1158
+ O.gantt,
1159
+ O.gallery,
1160
+ O.timeline,
1161
+ O.appearance?.allowedVisualizations
1162
1162
  ]);
1163
1163
  a.useEffect(() => {
1164
- E.viewType && de(E.viewType);
1165
- }, [E.viewType]);
1164
+ O.viewType && de(O.viewType);
1165
+ }, [O.viewType]);
1166
1166
  let zt = a.useCallback((e) => {
1167
1167
  de(e);
1168
1168
  try {
@@ -1174,20 +1174,20 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
1174
1174
  }, [It, o]), Bt = a.useCallback((e) => {
1175
1175
  ye(e), l?.(e);
1176
1176
  }, [l]), Vt = Ne({
1177
- navigation: E.navigation,
1178
- objectName: E.objectName,
1179
- onNavigate: E.onNavigate,
1177
+ navigation: O.navigation,
1178
+ objectName: O.objectName,
1179
+ onNavigate: O.onNavigate,
1180
1180
  onRowClick: p
1181
- }), $ = a.useMemo(() => {
1182
- let e = E.fields || [];
1183
- if (Array.isArray(e) || (e = []), Q?.isLoaded && E.objectName && (e = e.filter((e) => {
1181
+ }), Ht = a.useMemo(() => {
1182
+ let e = O.fields || [];
1183
+ if (Array.isArray(e) || (e = []), $?.isLoaded && O.objectName && (e = e.filter((e) => {
1184
1184
  let t = typeof e == "string" ? e : e?.name || e?.fieldName || e?.field;
1185
- return t ? Q.checkField(E.objectName, t, "read") : !0;
1186
- })), q.size > 0 && (e = e.filter((e) => {
1185
+ return t ? $.checkField(O.objectName, t, "read") : !0;
1186
+ })), J.size > 0 && (e = e.filter((e) => {
1187
1187
  let t = typeof e == "string" ? e : e?.name || e?.fieldName || e?.field;
1188
- return t != null && !q.has(t);
1189
- })), E.fieldOrder && E.fieldOrder.length > 0) {
1190
- let t = new Map(E.fieldOrder.map((e, t) => [e, t]));
1188
+ return t != null && !J.has(t);
1189
+ })), O.fieldOrder && O.fieldOrder.length > 0) {
1190
+ let t = new Map(O.fieldOrder.map((e, t) => [e, t]));
1191
1191
  e = [...e].sort((e, n) => {
1192
1192
  let r = typeof e == "string" ? e : e?.name || e?.fieldName || e?.field, i = typeof n == "string" ? n : n?.name || n?.fieldName || n?.field;
1193
1193
  return (t.get(r) ?? Infinity) - (t.get(i) ?? Infinity);
@@ -1195,131 +1195,131 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
1195
1195
  }
1196
1196
  return e;
1197
1197
  }, [
1198
- E.fields,
1199
- E.objectName,
1200
- q,
1201
- E.fieldOrder,
1202
- Q
1203
- ]), Ht = a.useMemo(() => {
1204
- let e = X.mode === "compact" ? "compact" : X.mode === "spacious" ? "tall" : "medium", t = {
1205
- objectName: E.objectName,
1206
- fields: $,
1207
- filters: E.filters,
1208
- sort: P,
1198
+ O.fields,
1199
+ O.objectName,
1200
+ J,
1201
+ O.fieldOrder,
1202
+ $
1203
+ ]), Ut = a.useMemo(() => {
1204
+ let e = Z.mode === "compact" ? "compact" : Z.mode === "spacious" ? "tall" : "medium", t = {
1205
+ objectName: O.objectName,
1206
+ fields: Ht,
1207
+ filters: O.filters,
1208
+ sort: F,
1209
1209
  className: "h-full w-full",
1210
1210
  showSearch: !1,
1211
1211
  onRowClick: Vt.handleClick,
1212
1212
  rowHeight: e,
1213
1213
  hideRowHeightToggle: !0,
1214
- ...E.striped == null ? {} : { striped: E.striped },
1215
- ...E.bordered == null ? {} : { bordered: E.bordered },
1214
+ ...O.striped == null ? {} : { striped: O.striped },
1215
+ ...O.bordered == null ? {} : { bordered: O.bordered },
1216
1216
  ...f ? { onColumnStateChange: f } : {},
1217
- ...E.columnState ? { columnState: E.columnState } : {}
1217
+ ...O.columnState ? { columnState: O.columnState } : {}
1218
1218
  };
1219
- switch (A) {
1219
+ switch (j) {
1220
1220
  case "grid": return {
1221
1221
  type: "object-grid",
1222
1222
  ...t,
1223
- columns: $,
1224
- ...E.conditionalFormatting ? { conditionalFormatting: E.conditionalFormatting } : {},
1225
- ...E.inlineEdit == null ? {} : { editable: E.inlineEdit },
1226
- ...E.wrapHeaders == null ? {} : { wrapHeaders: E.wrapHeaders },
1227
- ...E.virtualScroll == null ? {} : { virtualScroll: E.virtualScroll },
1228
- ...E.resizable == null ? {} : { resizable: E.resizable },
1229
- ...E.selection ? { selection: E.selection } : {},
1230
- ...E.pagination ? { pagination: E.pagination } : {},
1231
- ...G ? { grouping: G } : {},
1232
- ...K ? { rowColor: K } : {},
1233
- ...E.rowActions ? { rowActions: E.rowActions } : {},
1234
- ...E.rowActionDefs ? { rowActionDefs: E.rowActionDefs } : {},
1235
- ...E.bulkActions ? { batchActions: E.bulkActions } : {},
1236
- ...E.bulkActionDefs ? { bulkActionDefs: E.bulkActionDefs } : {},
1237
- ...E.options?.grid || {}
1223
+ columns: Ht,
1224
+ ...O.conditionalFormatting ? { conditionalFormatting: O.conditionalFormatting } : {},
1225
+ ...O.inlineEdit == null ? {} : { editable: O.inlineEdit },
1226
+ ...O.wrapHeaders == null ? {} : { wrapHeaders: O.wrapHeaders },
1227
+ ...O.virtualScroll == null ? {} : { virtualScroll: O.virtualScroll },
1228
+ ...O.resizable == null ? {} : { resizable: O.resizable },
1229
+ ...O.selection ? { selection: O.selection } : {},
1230
+ ...O.pagination ? { pagination: O.pagination } : {},
1231
+ ...K ? { grouping: K } : {},
1232
+ ...q ? { rowColor: q } : {},
1233
+ ...O.rowActions ? { rowActions: O.rowActions } : {},
1234
+ ...O.rowActionDefs ? { rowActionDefs: O.rowActionDefs } : {},
1235
+ ...O.bulkActions ? { batchActions: O.bulkActions } : {},
1236
+ ...O.bulkActionDefs ? { bulkActionDefs: O.bulkActionDefs } : {},
1237
+ ...O.options?.grid || {}
1238
1238
  };
1239
1239
  case "kanban": return {
1240
1240
  type: "object-kanban",
1241
1241
  ...t,
1242
- groupBy: E.kanban?.groupField || E.options?.kanban?.groupField || "status",
1243
- groupField: E.kanban?.groupField || E.options?.kanban?.groupField || "status",
1244
- ...E.kanban?.titleField || E.options?.kanban?.titleField ? { titleField: E.kanban?.titleField || E.options?.kanban?.titleField } : {},
1245
- cardFields: E.kanban?.cardFields || $ || [],
1246
- ...G ? { grouping: G } : {},
1247
- ...E.options?.kanban || {},
1248
- ...E.kanban || {}
1242
+ groupBy: O.kanban?.groupField || O.options?.kanban?.groupField || "status",
1243
+ groupField: O.kanban?.groupField || O.options?.kanban?.groupField || "status",
1244
+ ...O.kanban?.titleField || O.options?.kanban?.titleField ? { titleField: O.kanban?.titleField || O.options?.kanban?.titleField } : {},
1245
+ cardFields: O.kanban?.cardFields || Ht || [],
1246
+ ...K ? { grouping: K } : {},
1247
+ ...O.options?.kanban || {},
1248
+ ...O.kanban || {}
1249
1249
  };
1250
1250
  case "calendar": return {
1251
1251
  type: "object-calendar",
1252
1252
  ...t,
1253
- startDateField: E.calendar?.startDateField || E.options?.calendar?.startDateField || "start_date",
1254
- endDateField: E.calendar?.endDateField || E.options?.calendar?.endDateField || "end_date",
1255
- ...E.calendar?.titleField || E.options?.calendar?.titleField ? { titleField: E.calendar?.titleField || E.options?.calendar?.titleField } : {},
1256
- ...E.calendar?.defaultView ? { defaultView: E.calendar.defaultView } : {},
1257
- ...E.options?.calendar || {},
1258
- ...E.calendar || {}
1253
+ startDateField: O.calendar?.startDateField || O.options?.calendar?.startDateField || "start_date",
1254
+ endDateField: O.calendar?.endDateField || O.options?.calendar?.endDateField || "end_date",
1255
+ ...O.calendar?.titleField || O.options?.calendar?.titleField ? { titleField: O.calendar?.titleField || O.options?.calendar?.titleField } : {},
1256
+ ...O.calendar?.defaultView ? { defaultView: O.calendar.defaultView } : {},
1257
+ ...O.options?.calendar || {},
1258
+ ...O.calendar || {}
1259
1259
  };
1260
1260
  case "gallery": {
1261
1261
  let e = {
1262
- ...E.options?.gallery || {},
1263
- ...E.gallery || {},
1264
- cardSize: Z
1262
+ ...O.options?.gallery || {},
1263
+ ...O.gallery || {},
1264
+ cardSize: Q
1265
1265
  };
1266
1266
  return {
1267
1267
  type: "object-gallery",
1268
1268
  ...t,
1269
1269
  gallery: Object.keys(e).length > 0 ? e : void 0,
1270
- imageField: E.gallery?.coverField || E.gallery?.imageField || E.options?.gallery?.imageField,
1271
- titleField: E.gallery?.titleField || E.options?.gallery?.titleField || "name",
1272
- subtitleField: E.gallery?.subtitleField || E.options?.gallery?.subtitleField,
1273
- ...G ? { grouping: G } : {}
1270
+ imageField: O.gallery?.coverField || O.gallery?.imageField || O.options?.gallery?.imageField,
1271
+ titleField: O.gallery?.titleField || O.options?.gallery?.titleField || "name",
1272
+ subtitleField: O.gallery?.subtitleField || O.options?.gallery?.subtitleField,
1273
+ ...K ? { grouping: K } : {}
1274
1274
  };
1275
1275
  }
1276
1276
  case "timeline": {
1277
1277
  let e = {
1278
- ...E.options?.timeline || {},
1279
- ...E.timeline || {}
1278
+ ...O.options?.timeline || {},
1279
+ ...O.timeline || {}
1280
1280
  };
1281
1281
  return {
1282
1282
  type: "object-timeline",
1283
1283
  ...t,
1284
1284
  timeline: Object.keys(e).length > 0 ? e : void 0,
1285
- startDateField: E.timeline?.startDateField || E.options?.timeline?.startDateField || E.options?.timeline?.dateField || "created_at",
1286
- titleField: E.timeline?.titleField || E.options?.timeline?.titleField || "name",
1287
- ...E.timeline?.endDateField ? { endDateField: E.timeline.endDateField } : {},
1288
- ...E.timeline?.groupByField ? { groupByField: E.timeline.groupByField } : {},
1289
- ...E.timeline?.colorField ? { colorField: E.timeline.colorField } : {},
1290
- ...E.timeline?.scale ? { scale: E.timeline.scale } : {}
1285
+ startDateField: O.timeline?.startDateField || O.options?.timeline?.startDateField || O.options?.timeline?.dateField || "created_at",
1286
+ titleField: O.timeline?.titleField || O.options?.timeline?.titleField || "name",
1287
+ ...O.timeline?.endDateField ? { endDateField: O.timeline.endDateField } : {},
1288
+ ...O.timeline?.groupByField ? { groupByField: O.timeline.groupByField } : {},
1289
+ ...O.timeline?.colorField ? { colorField: O.timeline.colorField } : {},
1290
+ ...O.timeline?.scale ? { scale: O.timeline.scale } : {}
1291
1291
  };
1292
1292
  }
1293
1293
  case "gantt": return {
1294
1294
  type: "object-gantt",
1295
1295
  ...t,
1296
- startDateField: E.gantt?.startDateField || E.options?.gantt?.startDateField || "start_date",
1297
- endDateField: E.gantt?.endDateField || E.options?.gantt?.endDateField || "end_date",
1298
- progressField: E.gantt?.progressField || E.options?.gantt?.progressField || "progress",
1299
- dependenciesField: E.gantt?.dependenciesField || E.options?.gantt?.dependenciesField || "dependencies",
1300
- ...E.gantt?.titleField ? { titleField: E.gantt.titleField } : {},
1301
- ...E.options?.gantt || {},
1302
- ...E.gantt || {}
1296
+ startDateField: O.gantt?.startDateField || O.options?.gantt?.startDateField || "start_date",
1297
+ endDateField: O.gantt?.endDateField || O.options?.gantt?.endDateField || "end_date",
1298
+ progressField: O.gantt?.progressField || O.options?.gantt?.progressField || "progress",
1299
+ dependenciesField: O.gantt?.dependenciesField || O.options?.gantt?.dependenciesField || "dependencies",
1300
+ ...O.gantt?.titleField ? { titleField: O.gantt.titleField } : {},
1301
+ ...O.options?.gantt || {},
1302
+ ...O.gantt || {}
1303
1303
  };
1304
1304
  case "map": return {
1305
1305
  type: "object-map",
1306
1306
  ...t,
1307
- locationField: E.options?.map?.locationField || "location",
1308
- ...E.options?.map || {}
1307
+ locationField: O.options?.map?.locationField || "location",
1308
+ ...O.options?.map || {}
1309
1309
  };
1310
1310
  default: return t;
1311
1311
  }
1312
1312
  }, [
1313
- A,
1314
- E,
1315
- P,
1316
- $,
1317
- G,
1313
+ j,
1314
+ O,
1315
+ F,
1316
+ Ht,
1318
1317
  K,
1318
+ q,
1319
1319
  Vt.handleClick,
1320
- X.mode,
1321
- Z
1322
- ]), Ut = F.conditions && F.conditions.length > 0, Wt = a.useMemo(() => {
1320
+ Z.mode,
1321
+ Q
1322
+ ]), Wt = I.conditions && I.conditions.length > 0, Gt = a.useMemo(() => {
1323
1323
  let e, t = (e, t) => {
1324
1324
  if (!t) return;
1325
1325
  let n = Array.isArray(t) ? t.map((e) => ({
@@ -1331,17 +1331,17 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
1331
1331
  label: t?.label || e,
1332
1332
  ...t
1333
1333
  }));
1334
- return E.objectName ? ae(E.objectName, e, n) : n;
1334
+ return O.objectName ? E(O.objectName, e, n) : n;
1335
1335
  };
1336
- if (e = V?.fields ? Object.entries(V.fields).map(([e, n]) => ({
1336
+ if (e = H?.fields ? Object.entries(H.fields).map(([e, n]) => ({
1337
1337
  value: e,
1338
- label: D(e, n.label || e),
1338
+ label: k(e, n.label || e),
1339
1339
  type: n.type || "text",
1340
1340
  options: t(e, n.options),
1341
1341
  referenceTo: n.reference_to || n.reference,
1342
1342
  displayField: n.display_field || n.reference_field,
1343
1343
  idField: n.id_field
1344
- })) : (E.fields || []).map((e) => {
1344
+ })) : (O.fields || []).map((e) => {
1345
1345
  if (typeof e == "string") return {
1346
1346
  value: e,
1347
1347
  label: e,
@@ -1350,34 +1350,34 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
1350
1350
  let n = e.name || e.fieldName;
1351
1351
  return {
1352
1352
  value: n,
1353
- label: D(n, e.label || e.name),
1353
+ label: k(n, e.label || e.name),
1354
1354
  type: e.type || "text",
1355
1355
  options: t(n, e.options),
1356
1356
  referenceTo: e.reference_to || e.reference,
1357
1357
  displayField: e.display_field || e.reference_field,
1358
1358
  idField: e.id_field
1359
1359
  };
1360
- }), E.filterableFields && E.filterableFields.length > 0) {
1361
- let t = new Set(E.filterableFields);
1360
+ }), O.filterableFields && O.filterableFields.length > 0) {
1361
+ let t = new Set(O.filterableFields);
1362
1362
  e = e.filter((e) => t.has(e.value));
1363
1363
  }
1364
1364
  return e;
1365
1365
  }, [
1366
- V,
1367
- E.fields,
1368
- E.filterableFields,
1369
- E.objectName,
1370
- D,
1371
- ae
1372
- ]), Gt = a.useCallback((e) => {
1366
+ H,
1367
+ O.fields,
1368
+ O.filterableFields,
1369
+ O.objectName,
1370
+ k,
1371
+ E
1372
+ ]), Kt = a.useCallback((e) => {
1373
1373
  yt((t) => {
1374
1374
  let n = new Set(t);
1375
1375
  return n.has(e) ? n.delete(e) : n.add(e), n;
1376
1376
  });
1377
- }, []), Kt = a.useCallback((e) => {
1378
- let t = Y, n = t?.maxRecords || 0, r = t?.includeHeaders !== !1, i = t?.fileNamePrefix || E.objectName || "export", a = n > 0 ? R.slice(0, n) : R;
1377
+ }, []), qt = a.useCallback((e) => {
1378
+ let t = X, n = t?.maxRecords || 0, r = t?.includeHeaders !== !1, i = t?.fileNamePrefix || O.objectName || "export", a = n > 0 ? z.slice(0, n) : z;
1379
1379
  if (e === "csv") {
1380
- let e = $.map((e) => typeof e == "string" ? e : e.name || e.fieldName || e.field), t = [];
1380
+ let e = Ht.map((e) => typeof e == "string" ? e : e.name || e.fieldName || e.field), t = [];
1381
1381
  r && t.push(e.join(",")), a.forEach((n) => {
1382
1382
  t.push(e.map((e) => {
1383
1383
  let t = n[e], r;
@@ -1392,136 +1392,136 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
1392
1392
  }
1393
1393
  kt(!1);
1394
1394
  }, [
1395
- R,
1396
- $,
1397
- Y,
1398
- E.objectName
1399
- ]), qt = a.useMemo(() => (E.fields || []).map((e) => {
1395
+ z,
1396
+ Ht,
1397
+ X,
1398
+ O.objectName
1399
+ ]), Jt = a.useMemo(() => (O.fields || []).map((e) => {
1400
1400
  if (typeof e == "string") return {
1401
1401
  name: e,
1402
- label: D(e, e)
1402
+ label: k(e, e)
1403
1403
  };
1404
1404
  let t = e.name || e.fieldName || e.field;
1405
1405
  return {
1406
1406
  name: t,
1407
- label: D(t, e.label || e.name || e.field)
1407
+ label: k(t, e.label || e.name || e.field)
1408
1408
  };
1409
- }), [E.fields, D]);
1410
- return /* @__PURE__ */ N("div", {
1409
+ }), [O.fields, k]);
1410
+ return /* @__PURE__ */ P("div", {
1411
1411
  ref: Nt,
1412
1412
  className: w("flex flex-col h-full bg-background relative min-w-0 overflow-hidden", n),
1413
- ...E.aria?.label ? { "aria-label": E.aria.label } : {},
1414
- ...E.aria?.describedBy ? { "aria-describedby": E.aria.describedBy } : {},
1415
- ...E.aria?.live ? { "aria-live": E.aria.live } : {},
1413
+ ...O.aria?.label ? { "aria-label": O.aria.label } : {},
1414
+ ...O.aria?.describedBy ? { "aria-describedby": O.aria.describedBy } : {},
1415
+ ...O.aria?.live ? { "aria-live": O.aria.live } : {},
1416
1416
  role: "region",
1417
1417
  children: [
1418
- Ft > 0 && /* @__PURE__ */ M("div", {
1418
+ Ft > 0 && /* @__PURE__ */ N("div", {
1419
1419
  className: "flex items-center justify-center text-xs text-muted-foreground",
1420
1420
  style: { height: Ft },
1421
- children: _(Pt ? "list.refreshing" : "list.pullToRefresh")
1421
+ children: v(Pt ? "list.refreshing" : "list.pullToRefresh")
1422
1422
  }),
1423
- m && /* @__PURE__ */ M("div", {
1423
+ h && /* @__PURE__ */ N("div", {
1424
1424
  className: "px-4 py-1 flex items-center bg-background",
1425
- children: /* @__PURE__ */ M(Be, {
1426
- currentView: A,
1425
+ children: /* @__PURE__ */ N(Be, {
1426
+ currentView: j,
1427
1427
  availableViews: Rt,
1428
1428
  onViewChange: zt
1429
1429
  })
1430
1430
  }),
1431
- E.description && E.appearance?.showDescription !== !1 && /* @__PURE__ */ M("div", {
1431
+ O.description && O.appearance?.showDescription !== !1 && /* @__PURE__ */ N("div", {
1432
1432
  className: "px-4 pt-1.5 text-xs text-muted-foreground bg-background",
1433
1433
  "data-testid": "view-description",
1434
- children: typeof E.description == "string" ? E.description : ""
1434
+ children: typeof O.description == "string" ? O.description : ""
1435
1435
  }),
1436
- /* @__PURE__ */ N("div", {
1436
+ /* @__PURE__ */ P("div", {
1437
1437
  className: "border-b px-2 sm:px-4 py-1.5 flex items-center justify-between gap-1 sm:gap-2 bg-background",
1438
- children: [/* @__PURE__ */ N("div", {
1438
+ children: [/* @__PURE__ */ P("div", {
1439
1439
  className: "flex items-center gap-2 overflow-x-auto min-w-0",
1440
1440
  children: [
1441
- E.tabs && E.tabs.length > 0 && /* @__PURE__ */ N(Te, { children: [/* @__PURE__ */ M("div", {
1441
+ O.tabs && O.tabs.length > 0 && /* @__PURE__ */ P(Te, { children: [/* @__PURE__ */ N("div", {
1442
1442
  className: "hidden sm:block shrink-0",
1443
- children: /* @__PURE__ */ M(He, {
1444
- tabs: E.tabs,
1445
- activeTab: I,
1443
+ children: /* @__PURE__ */ N(He, {
1444
+ tabs: O.tabs,
1445
+ activeTab: L,
1446
1446
  onTabChange: Ke,
1447
1447
  className: "!px-0 !py-0"
1448
1448
  })
1449
- }), /* @__PURE__ */ M("div", {
1449
+ }), /* @__PURE__ */ N("div", {
1450
1450
  className: "sm:hidden shrink-0",
1451
- children: /* @__PURE__ */ M(Ue, {
1452
- tabs: E.tabs,
1453
- activeTab: I,
1451
+ children: /* @__PURE__ */ N(Ue, {
1452
+ tabs: O.tabs,
1453
+ activeTab: L,
1454
1454
  onTabChange: Ke,
1455
1455
  className: "!px-0 !py-0"
1456
1456
  })
1457
1457
  })] }),
1458
- E.tabs && E.tabs.length > 0 && St && /* @__PURE__ */ M("div", { className: "hidden sm:block h-4 w-px bg-border/60 mx-1 shrink-0" }),
1459
- St && /* @__PURE__ */ M("div", {
1458
+ O.tabs && O.tabs.length > 0 && St && /* @__PURE__ */ N("div", { className: "hidden sm:block h-4 w-px bg-border/60 mx-1 shrink-0" }),
1459
+ St && /* @__PURE__ */ N("div", {
1460
1460
  className: "shrink-0 min-w-0 overflow-x-auto",
1461
1461
  "data-testid": "user-filters",
1462
- children: /* @__PURE__ */ M(qe, {
1462
+ children: /* @__PURE__ */ N(qe, {
1463
1463
  config: St,
1464
- objectDef: V,
1465
- data: R,
1464
+ objectDef: H,
1465
+ data: z,
1466
1466
  onFilterChange: xt,
1467
1467
  maxVisible: 3
1468
1468
  })
1469
1469
  })
1470
1470
  ]
1471
- }), /* @__PURE__ */ N("div", {
1471
+ }), /* @__PURE__ */ P("div", {
1472
1472
  className: "flex items-center gap-0 shrink-0 rounded-lg border border-border bg-muted/40 p-0.5 shadow-sm",
1473
1473
  children: [
1474
- k.showHideFields && !k.compactToolbar && /* @__PURE__ */ N(x, {
1474
+ A.showHideFields && !A.compactToolbar && /* @__PURE__ */ P(x, {
1475
1475
  open: Et,
1476
1476
  onOpenChange: Dt,
1477
- children: [/* @__PURE__ */ M(C, {
1477
+ children: [/* @__PURE__ */ N(C, {
1478
1478
  asChild: !0,
1479
- children: /* @__PURE__ */ N(d, {
1479
+ children: /* @__PURE__ */ P(d, {
1480
1480
  variant: "ghost",
1481
1481
  size: "sm",
1482
- className: w("hidden sm:inline-flex h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150", q.size > 0 && "text-primary"),
1482
+ className: w("hidden sm:inline-flex h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150", J.size > 0 && "text-primary"),
1483
1483
  children: [
1484
- /* @__PURE__ */ M(se, { className: "h-3.5 w-3.5 mr-1.5" }),
1485
- /* @__PURE__ */ M("span", {
1484
+ /* @__PURE__ */ N(se, { className: "h-3.5 w-3.5 mr-1.5" }),
1485
+ /* @__PURE__ */ N("span", {
1486
1486
  className: "hidden sm:inline",
1487
- children: _("list.hideFields")
1487
+ children: v("list.hideFields")
1488
1488
  }),
1489
- q.size > 0 && /* @__PURE__ */ M("span", {
1489
+ J.size > 0 && /* @__PURE__ */ N("span", {
1490
1490
  className: "ml-1 flex h-4 min-w-[16px] items-center justify-center text-[10px] font-medium text-muted-foreground tabular-nums",
1491
- children: q.size
1491
+ children: J.size
1492
1492
  })
1493
1493
  ]
1494
1494
  })
1495
- }), /* @__PURE__ */ M(S, {
1495
+ }), /* @__PURE__ */ N(S, {
1496
1496
  align: "start",
1497
1497
  className: "w-64 p-3",
1498
- children: /* @__PURE__ */ N("div", {
1498
+ children: /* @__PURE__ */ P("div", {
1499
1499
  className: "space-y-2",
1500
- children: [/* @__PURE__ */ N("div", {
1500
+ children: [/* @__PURE__ */ P("div", {
1501
1501
  className: "flex items-center justify-between border-b pb-2",
1502
- children: [/* @__PURE__ */ M("h4", {
1502
+ children: [/* @__PURE__ */ N("h4", {
1503
1503
  className: "font-medium text-sm",
1504
- children: _("list.hideFieldsTitle")
1505
- }), q.size > 0 && /* @__PURE__ */ M(d, {
1504
+ children: v("list.hideFieldsTitle")
1505
+ }), J.size > 0 && /* @__PURE__ */ N(d, {
1506
1506
  variant: "ghost",
1507
1507
  size: "sm",
1508
1508
  className: "h-6 px-2 text-xs",
1509
1509
  onClick: () => Tt(/* @__PURE__ */ new Set()),
1510
- children: _("list.showAll")
1510
+ children: v("list.showAll")
1511
1511
  })]
1512
- }), /* @__PURE__ */ M("div", {
1512
+ }), /* @__PURE__ */ N("div", {
1513
1513
  className: "max-h-60 overflow-y-auto space-y-1",
1514
- children: qt.map((e) => /* @__PURE__ */ N("label", {
1514
+ children: Jt.map((e) => /* @__PURE__ */ P("label", {
1515
1515
  className: "flex items-center gap-2 text-sm py-1 px-1 rounded hover:bg-muted cursor-pointer",
1516
- children: [/* @__PURE__ */ M("input", {
1516
+ children: [/* @__PURE__ */ N("input", {
1517
1517
  type: "checkbox",
1518
- checked: !q.has(e.name),
1518
+ checked: !J.has(e.name),
1519
1519
  onChange: () => {
1520
- let t = new Set(q);
1520
+ let t = new Set(J);
1521
1521
  t.has(e.name) ? t.delete(e.name) : t.add(e.name), Tt(t);
1522
1522
  },
1523
1523
  className: "rounded border-input"
1524
- }), /* @__PURE__ */ M("span", {
1524
+ }), /* @__PURE__ */ N("span", {
1525
1525
  className: "truncate",
1526
1526
  children: e.label
1527
1527
  })]
@@ -1530,42 +1530,42 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
1530
1530
  })
1531
1531
  })]
1532
1532
  }),
1533
- k.showHideFields && !k.compactToolbar && (k.showFilters || k.showSort || k.showGroup) && /* @__PURE__ */ M("div", { className: "hidden sm:block h-5 w-px bg-border/50 mx-1 shrink-0" }),
1534
- k.showFilters && /* @__PURE__ */ N(x, {
1533
+ A.showHideFields && !A.compactToolbar && (A.showFilters || A.showSort || A.showGroup) && /* @__PURE__ */ N("div", { className: "hidden sm:block h-5 w-px bg-border/50 mx-1 shrink-0" }),
1534
+ A.showFilters && /* @__PURE__ */ P(x, {
1535
1535
  open: Re,
1536
1536
  onOpenChange: ze,
1537
- children: [/* @__PURE__ */ M(C, {
1537
+ children: [/* @__PURE__ */ N(C, {
1538
1538
  asChild: !0,
1539
- children: /* @__PURE__ */ N(d, {
1539
+ children: /* @__PURE__ */ P(d, {
1540
1540
  variant: "ghost",
1541
1541
  size: "sm",
1542
- className: w("h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150", Ut && "text-foreground font-medium"),
1542
+ className: w("h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150", Wt && "text-foreground font-medium"),
1543
1543
  children: [
1544
- /* @__PURE__ */ M(xe, { className: "h-3.5 w-3.5 mr-1.5" }),
1545
- /* @__PURE__ */ M("span", {
1544
+ /* @__PURE__ */ N(xe, { className: "h-3.5 w-3.5 mr-1.5" }),
1545
+ /* @__PURE__ */ N("span", {
1546
1546
  className: "hidden sm:inline",
1547
- children: _("list.filter")
1547
+ children: v("list.filter")
1548
1548
  }),
1549
- Ut && /* @__PURE__ */ M("span", {
1549
+ Wt && /* @__PURE__ */ N("span", {
1550
1550
  className: "ml-1 flex h-4 min-w-[16px] items-center justify-center text-[10px] font-medium text-muted-foreground tabular-nums",
1551
- children: F.conditions?.length || 0
1551
+ children: I.conditions?.length || 0
1552
1552
  })
1553
1553
  ]
1554
1554
  })
1555
- }), /* @__PURE__ */ M(S, {
1555
+ }), /* @__PURE__ */ N(S, {
1556
1556
  align: "start",
1557
1557
  className: "w-[calc(100vw-2rem)] sm:w-[600px] max-w-[600px] p-3 sm:p-4",
1558
- children: /* @__PURE__ */ N("div", {
1558
+ children: /* @__PURE__ */ P("div", {
1559
1559
  className: "space-y-4",
1560
- children: [/* @__PURE__ */ M("div", {
1560
+ children: [/* @__PURE__ */ N("div", {
1561
1561
  className: "flex items-center justify-between border-b pb-2",
1562
- children: /* @__PURE__ */ M("h4", {
1562
+ children: /* @__PURE__ */ N("h4", {
1563
1563
  className: "font-medium text-sm",
1564
- children: _("list.filterRecords")
1564
+ children: v("list.filterRecords")
1565
1565
  })
1566
- }), /* @__PURE__ */ M(v, {
1567
- fields: Wt,
1568
- value: F,
1566
+ }), /* @__PURE__ */ N(ee, {
1567
+ fields: Gt,
1568
+ value: I,
1569
1569
  onChange: (e) => {
1570
1570
  Ve(e), s && s(e);
1571
1571
  }
@@ -1573,58 +1573,58 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
1573
1573
  })
1574
1574
  })]
1575
1575
  }),
1576
- k.showGroup && !k.compactToolbar && /* @__PURE__ */ N(x, {
1576
+ A.showGroup && !A.compactToolbar && /* @__PURE__ */ P(x, {
1577
1577
  open: lt,
1578
1578
  onOpenChange: ut,
1579
- children: [/* @__PURE__ */ M(C, {
1579
+ children: [/* @__PURE__ */ N(C, {
1580
1580
  asChild: !0,
1581
- children: /* @__PURE__ */ N(d, {
1581
+ children: /* @__PURE__ */ P(d, {
1582
1582
  variant: "ghost",
1583
1583
  size: "sm",
1584
- className: w("hidden sm:inline-flex h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150", G && "text-foreground font-medium"),
1584
+ className: w("hidden sm:inline-flex h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150", K && "text-foreground font-medium"),
1585
1585
  children: [
1586
- /* @__PURE__ */ M(le, { className: "h-3.5 w-3.5 mr-1.5" }),
1587
- /* @__PURE__ */ M("span", {
1586
+ /* @__PURE__ */ N(le, { className: "h-3.5 w-3.5 mr-1.5" }),
1587
+ /* @__PURE__ */ N("span", {
1588
1588
  className: "hidden sm:inline",
1589
- children: _("list.group")
1589
+ children: v("list.group")
1590
1590
  }),
1591
- G && G.fields?.length > 0 && /* @__PURE__ */ M("span", {
1591
+ K && K.fields?.length > 0 && /* @__PURE__ */ N("span", {
1592
1592
  className: "ml-1 flex h-4 min-w-[16px] items-center justify-center text-[10px] font-medium text-muted-foreground tabular-nums",
1593
- children: G.fields.length
1593
+ children: K.fields.length
1594
1594
  })
1595
1595
  ]
1596
1596
  })
1597
- }), /* @__PURE__ */ M(S, {
1597
+ }), /* @__PURE__ */ N(S, {
1598
1598
  align: "start",
1599
1599
  className: "w-72 p-3",
1600
- children: /* @__PURE__ */ N("div", {
1600
+ children: /* @__PURE__ */ P("div", {
1601
1601
  className: "space-y-2",
1602
- children: [/* @__PURE__ */ N("div", {
1602
+ children: [/* @__PURE__ */ P("div", {
1603
1603
  className: "flex items-center justify-between border-b pb-2",
1604
- children: [/* @__PURE__ */ M("h4", {
1604
+ children: [/* @__PURE__ */ N("h4", {
1605
1605
  className: "font-medium text-sm",
1606
- children: _("list.groupBy")
1607
- }), G && /* @__PURE__ */ M(d, {
1606
+ children: v("list.groupBy")
1607
+ }), K && /* @__PURE__ */ N(d, {
1608
1608
  variant: "ghost",
1609
1609
  size: "sm",
1610
1610
  className: "h-6 px-2 text-xs",
1611
1611
  onClick: () => ct(void 0),
1612
1612
  "data-testid": "clear-grouping",
1613
- children: _("list.clear")
1613
+ children: v("list.clear")
1614
1614
  })]
1615
- }), /* @__PURE__ */ M("div", {
1615
+ }), /* @__PURE__ */ N("div", {
1616
1616
  "data-testid": "group-field-list",
1617
- children: /* @__PURE__ */ M(ee, {
1618
- value: G,
1619
- fieldOptions: qt.map((e) => ({
1617
+ children: /* @__PURE__ */ N(y, {
1618
+ value: K,
1619
+ fieldOptions: Jt.map((e) => ({
1620
1620
  value: e.name,
1621
1621
  label: e.label || e.name
1622
1622
  })),
1623
1623
  maxLevels: 3,
1624
1624
  labels: {
1625
- addGroup: _("list.addGroup", { defaultValue: "Add group field" }),
1626
- collapseTitle: _("list.collapsedByDefault", { defaultValue: "Collapsed by default" }),
1627
- removeTitle: _("list.removeGroup", { defaultValue: "Remove" })
1625
+ addGroup: v("list.addGroup", { defaultValue: "Add group field" }),
1626
+ collapseTitle: v("list.collapsedByDefault", { defaultValue: "Collapsed by default" }),
1627
+ removeTitle: v("list.removeGroup", { defaultValue: "Remove" })
1628
1628
  },
1629
1629
  onChange: (e) => ct(e)
1630
1630
  })
@@ -1632,41 +1632,41 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
1632
1632
  })
1633
1633
  })]
1634
1634
  }),
1635
- k.showSort && /* @__PURE__ */ N(x, {
1635
+ A.showSort && /* @__PURE__ */ P(x, {
1636
1636
  open: Ae,
1637
1637
  onOpenChange: je,
1638
- children: [/* @__PURE__ */ M(C, {
1638
+ children: [/* @__PURE__ */ N(C, {
1639
1639
  asChild: !0,
1640
- children: /* @__PURE__ */ N(d, {
1640
+ children: /* @__PURE__ */ P(d, {
1641
1641
  variant: "ghost",
1642
1642
  size: "sm",
1643
- className: w("hidden sm:inline-flex h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150", P.length > 0 && "text-foreground font-medium"),
1643
+ className: w("hidden sm:inline-flex h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150", F.length > 0 && "text-foreground font-medium"),
1644
1644
  children: [
1645
- /* @__PURE__ */ M(T, { className: "h-3.5 w-3.5 mr-1.5" }),
1646
- /* @__PURE__ */ M("span", {
1645
+ /* @__PURE__ */ N(T, { className: "h-3.5 w-3.5 mr-1.5" }),
1646
+ /* @__PURE__ */ N("span", {
1647
1647
  className: "hidden sm:inline",
1648
- children: _("list.sort")
1648
+ children: v("list.sort")
1649
1649
  }),
1650
- P.length > 0 && /* @__PURE__ */ M("span", {
1650
+ F.length > 0 && /* @__PURE__ */ N("span", {
1651
1651
  className: "ml-1 flex h-4 min-w-[16px] items-center justify-center text-[10px] font-medium text-muted-foreground tabular-nums",
1652
- children: P.length
1652
+ children: F.length
1653
1653
  })
1654
1654
  ]
1655
1655
  })
1656
- }), /* @__PURE__ */ M(S, {
1656
+ }), /* @__PURE__ */ N(S, {
1657
1657
  align: "start",
1658
1658
  className: "w-[calc(100vw-2rem)] sm:w-[600px] max-w-[600px] p-3 sm:p-4",
1659
- children: /* @__PURE__ */ N("div", {
1659
+ children: /* @__PURE__ */ P("div", {
1660
1660
  className: "space-y-4",
1661
- children: [/* @__PURE__ */ M("div", {
1661
+ children: [/* @__PURE__ */ N("div", {
1662
1662
  className: "flex items-center justify-between border-b pb-2",
1663
- children: /* @__PURE__ */ M("h4", {
1663
+ children: /* @__PURE__ */ N("h4", {
1664
1664
  className: "font-medium text-sm",
1665
- children: _("list.sortRecords")
1665
+ children: v("list.sortRecords")
1666
1666
  })
1667
- }), /* @__PURE__ */ M(re, {
1668
- fields: Wt,
1669
- value: P,
1667
+ }), /* @__PURE__ */ N(ie, {
1668
+ fields: Gt,
1669
+ value: F,
1670
1670
  onChange: (e) => {
1671
1671
  Ie(e), c && c(e);
1672
1672
  }
@@ -1674,60 +1674,60 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
1674
1674
  })
1675
1675
  })]
1676
1676
  }),
1677
- !k.compactToolbar && (k.showFilters || k.showSort || k.showGroup) && (k.showColor || k.showDensity) && /* @__PURE__ */ M("div", { className: "hidden sm:block h-5 w-px bg-border/50 mx-1 shrink-0" }),
1678
- k.showColor && !k.compactToolbar && /* @__PURE__ */ N(x, {
1677
+ !A.compactToolbar && (A.showFilters || A.showSort || A.showGroup) && (A.showColor || A.showDensity) && /* @__PURE__ */ N("div", { className: "hidden sm:block h-5 w-px bg-border/50 mx-1 shrink-0" }),
1678
+ A.showColor && !A.compactToolbar && /* @__PURE__ */ P(x, {
1679
1679
  open: pt,
1680
1680
  onOpenChange: mt,
1681
- children: [/* @__PURE__ */ M(C, {
1681
+ children: [/* @__PURE__ */ N(C, {
1682
1682
  asChild: !0,
1683
- children: /* @__PURE__ */ N(d, {
1683
+ children: /* @__PURE__ */ P(d, {
1684
1684
  variant: "ghost",
1685
1685
  size: "sm",
1686
- className: w("hidden sm:inline-flex h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150", K && "text-foreground font-medium"),
1687
- children: [/* @__PURE__ */ M(fe, { className: "h-3.5 w-3.5 mr-1.5" }), /* @__PURE__ */ M("span", {
1686
+ className: w("hidden sm:inline-flex h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150", q && "text-foreground font-medium"),
1687
+ children: [/* @__PURE__ */ N(fe, { className: "h-3.5 w-3.5 mr-1.5" }), /* @__PURE__ */ N("span", {
1688
1688
  className: "hidden sm:inline",
1689
- children: _("list.color")
1689
+ children: v("list.color")
1690
1690
  })]
1691
1691
  })
1692
- }), /* @__PURE__ */ M(S, {
1692
+ }), /* @__PURE__ */ N(S, {
1693
1693
  align: "start",
1694
1694
  className: "w-64 p-3",
1695
- children: /* @__PURE__ */ N("div", {
1695
+ children: /* @__PURE__ */ P("div", {
1696
1696
  className: "space-y-2",
1697
- children: [/* @__PURE__ */ N("div", {
1697
+ children: [/* @__PURE__ */ P("div", {
1698
1698
  className: "flex items-center justify-between border-b pb-2",
1699
- children: [/* @__PURE__ */ M("h4", {
1699
+ children: [/* @__PURE__ */ N("h4", {
1700
1700
  className: "font-medium text-sm",
1701
- children: _("list.rowColor")
1702
- }), K && /* @__PURE__ */ M(d, {
1701
+ children: v("list.rowColor")
1702
+ }), q && /* @__PURE__ */ N(d, {
1703
1703
  variant: "ghost",
1704
1704
  size: "sm",
1705
1705
  className: "h-6 px-2 text-xs",
1706
1706
  onClick: () => ft(void 0),
1707
1707
  "data-testid": "clear-row-color",
1708
- children: _("list.clear")
1708
+ children: v("list.clear")
1709
1709
  })]
1710
- }), /* @__PURE__ */ N("div", {
1710
+ }), /* @__PURE__ */ P("div", {
1711
1711
  className: "space-y-2",
1712
1712
  "data-testid": "color-field-list",
1713
- children: [/* @__PURE__ */ M("label", {
1713
+ children: [/* @__PURE__ */ N("label", {
1714
1714
  className: "text-xs text-muted-foreground",
1715
- children: _("list.colorByField")
1716
- }), /* @__PURE__ */ N("select", {
1715
+ children: v("list.colorByField")
1716
+ }), /* @__PURE__ */ P("select", {
1717
1717
  className: "w-full h-8 rounded border border-input bg-background px-2 text-xs",
1718
- value: K?.field || "",
1718
+ value: q?.field || "",
1719
1719
  onChange: (e) => {
1720
1720
  let t = e.target.value;
1721
1721
  ft(t ? {
1722
1722
  field: t,
1723
- colors: K?.colors || {}
1723
+ colors: q?.colors || {}
1724
1724
  } : void 0);
1725
1725
  },
1726
1726
  "data-testid": "color-field-select",
1727
- children: [/* @__PURE__ */ M("option", {
1727
+ children: [/* @__PURE__ */ N("option", {
1728
1728
  value: "",
1729
- children: _("list.none")
1730
- }), qt.map((e) => /* @__PURE__ */ M("option", {
1729
+ children: v("list.none")
1730
+ }), Jt.map((e) => /* @__PURE__ */ N("option", {
1731
1731
  value: e.name,
1732
1732
  children: e.label
1733
1733
  }, e.name))]
@@ -1736,185 +1736,185 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
1736
1736
  })
1737
1737
  })]
1738
1738
  }),
1739
- k.showDensity && !k.compactToolbar && A !== "gallery" && (() => {
1740
- let e = X.mode === "compact" ? _e : X.mode === "comfortable" ? ge : he, t = X.mode === "compact" ? _("grid.toolbar.densityCompact", { defaultValue: "Compact" }) : X.mode === "comfortable" ? _("grid.toolbar.densityComfortable", { defaultValue: "Comfortable" }) : _("grid.toolbar.densitySpacious", { defaultValue: "Spacious" }), n = `${_("grid.toolbar.densityMode", { defaultValue: "Density" })}: ${t}`, r = _("grid.toolbar.densityCycleHint", {
1739
+ A.showDensity && !A.compactToolbar && j !== "gallery" && (() => {
1740
+ let e = Z.mode === "compact" ? _e : Z.mode === "comfortable" ? ge : he, t = Z.mode === "compact" ? v("grid.toolbar.densityCompact", { defaultValue: "Compact" }) : Z.mode === "comfortable" ? v("grid.toolbar.densityComfortable", { defaultValue: "Comfortable" }) : v("grid.toolbar.densitySpacious", { defaultValue: "Spacious" }), n = `${v("grid.toolbar.densityMode", { defaultValue: "Density" })}: ${t}`, r = v("grid.toolbar.densityCycleHint", {
1741
1741
  defaultValue: "{{label}} (click to cycle)",
1742
1742
  label: n
1743
1743
  });
1744
- return /* @__PURE__ */ M(d, {
1744
+ return /* @__PURE__ */ N(d, {
1745
1745
  variant: "ghost",
1746
1746
  size: "sm",
1747
1747
  "aria-label": n,
1748
- className: w("hidden sm:inline-flex h-7 w-7 p-0 text-muted-foreground hover:text-primary transition-colors duration-150", X.mode !== "compact" && "text-foreground font-medium"),
1749
- onClick: X.cycle,
1748
+ className: w("hidden sm:inline-flex h-7 w-7 p-0 text-muted-foreground hover:text-primary transition-colors duration-150", Z.mode !== "compact" && "text-foreground font-medium"),
1749
+ onClick: Z.cycle,
1750
1750
  title: r,
1751
- children: /* @__PURE__ */ M(e, { className: "h-3.5 w-3.5" })
1751
+ children: /* @__PURE__ */ N(e, { className: "h-3.5 w-3.5" })
1752
1752
  });
1753
1753
  })(),
1754
- k.showDensity && !k.compactToolbar && A === "gallery" && (() => {
1755
- let e = Z === "small" ? _e : Z === "medium" ? ge : he, t = Z === "small" ? _("grid.toolbar.densityCompact", { defaultValue: "Compact" }) : Z === "medium" ? _("grid.toolbar.densityComfortable", { defaultValue: "Comfortable" }) : _("grid.toolbar.densitySpacious", { defaultValue: "Spacious" }), n = `${_("grid.toolbar.densityMode", { defaultValue: "Density" })}: ${t}`, r = _("grid.toolbar.densityCycleHint", {
1754
+ A.showDensity && !A.compactToolbar && j === "gallery" && (() => {
1755
+ let e = Q === "small" ? _e : Q === "medium" ? ge : he, t = Q === "small" ? v("grid.toolbar.densityCompact", { defaultValue: "Compact" }) : Q === "medium" ? v("grid.toolbar.densityComfortable", { defaultValue: "Comfortable" }) : v("grid.toolbar.densitySpacious", { defaultValue: "Spacious" }), n = `${v("grid.toolbar.densityMode", { defaultValue: "Density" })}: ${t}`, r = v("grid.toolbar.densityCycleHint", {
1756
1756
  defaultValue: "{{label}} (click to cycle)",
1757
1757
  label: n
1758
1758
  });
1759
- return /* @__PURE__ */ M(d, {
1759
+ return /* @__PURE__ */ N(d, {
1760
1760
  variant: "ghost",
1761
1761
  size: "sm",
1762
1762
  "aria-label": n,
1763
- className: w("hidden sm:inline-flex h-7 w-7 p-0 text-muted-foreground hover:text-primary transition-colors duration-150", Z !== "small" && "text-foreground font-medium"),
1763
+ className: w("hidden sm:inline-flex h-7 w-7 p-0 text-muted-foreground hover:text-primary transition-colors duration-150", Q !== "small" && "text-foreground font-medium"),
1764
1764
  onClick: Mt,
1765
1765
  title: r,
1766
- children: /* @__PURE__ */ M(e, { className: "h-3.5 w-3.5" })
1766
+ children: /* @__PURE__ */ N(e, { className: "h-3.5 w-3.5" })
1767
1767
  });
1768
1768
  })(),
1769
- k.compactToolbar && (k.showGroup || k.showColor || k.showDensity || k.showHideFields) && /* @__PURE__ */ M(We, {
1770
- t: _,
1771
- allFields: qt,
1772
- showGroup: k.showGroup,
1773
- groupingConfig: G,
1769
+ A.compactToolbar && (A.showGroup || A.showColor || A.showDensity || A.showHideFields) && /* @__PURE__ */ N(We, {
1770
+ t: v,
1771
+ allFields: Jt,
1772
+ showGroup: A.showGroup,
1773
+ groupingConfig: K,
1774
1774
  setGroupingConfig: ct,
1775
- showColor: k.showColor,
1776
- rowColorConfig: K,
1775
+ showColor: A.showColor,
1776
+ rowColorConfig: q,
1777
1777
  setRowColorConfig: ft,
1778
- showDensity: k.showDensity,
1779
- density: X,
1780
- showHideFields: k.showHideFields,
1781
- hiddenFields: q,
1778
+ showDensity: A.showDensity,
1779
+ density: Z,
1780
+ showHideFields: A.showHideFields,
1781
+ hiddenFields: J,
1782
1782
  updateHiddenFields: Tt
1783
1783
  }),
1784
- (k.showColor || k.showDensity || k.compactToolbar) && Y && E.allowExport !== !1 && /* @__PURE__ */ M("div", { className: "h-5 w-px bg-border/50 mx-1 shrink-0" }),
1785
- Y && E.allowExport !== !1 && /* @__PURE__ */ N(x, {
1784
+ (A.showColor || A.showDensity || A.compactToolbar) && X && O.allowExport !== !1 && /* @__PURE__ */ N("div", { className: "h-5 w-px bg-border/50 mx-1 shrink-0" }),
1785
+ X && O.allowExport !== !1 && /* @__PURE__ */ P(x, {
1786
1786
  open: Ot,
1787
1787
  onOpenChange: kt,
1788
- children: [/* @__PURE__ */ M(C, {
1788
+ children: [/* @__PURE__ */ N(C, {
1789
1789
  asChild: !0,
1790
- children: /* @__PURE__ */ N(d, {
1790
+ children: /* @__PURE__ */ P(d, {
1791
1791
  variant: "ghost",
1792
1792
  size: "sm",
1793
1793
  className: "h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150",
1794
- children: [/* @__PURE__ */ M(O, { className: "h-3.5 w-3.5 mr-1.5" }), /* @__PURE__ */ M("span", {
1794
+ children: [/* @__PURE__ */ N(oe, { className: "h-3.5 w-3.5 mr-1.5" }), /* @__PURE__ */ N("span", {
1795
1795
  className: "hidden sm:inline",
1796
- children: _("list.export")
1796
+ children: v("list.export")
1797
1797
  })]
1798
1798
  })
1799
- }), /* @__PURE__ */ M(S, {
1799
+ }), /* @__PURE__ */ N(S, {
1800
1800
  align: "start",
1801
1801
  className: "w-48 p-2",
1802
- children: /* @__PURE__ */ M("div", {
1802
+ children: /* @__PURE__ */ N("div", {
1803
1803
  className: "space-y-1",
1804
- children: (Y.formats || ["csv", "json"]).map((e) => /* @__PURE__ */ N(d, {
1804
+ children: (X.formats || ["csv", "json"]).map((e) => /* @__PURE__ */ P(d, {
1805
1805
  variant: "ghost",
1806
1806
  size: "sm",
1807
1807
  className: "w-full justify-start h-8 text-xs",
1808
- onClick: () => Kt(e),
1809
- children: [/* @__PURE__ */ M(O, { className: "h-3.5 w-3.5 mr-2" }), _("list.exportAs", { format: e.toUpperCase() })]
1808
+ onClick: () => qt(e),
1809
+ children: [/* @__PURE__ */ N(oe, { className: "h-3.5 w-3.5 mr-2" }), v("list.exportAs", { format: e.toUpperCase() })]
1810
1810
  }, e))
1811
1811
  })
1812
1812
  })]
1813
1813
  }),
1814
- (E.sharing?.enabled || E.sharing?.type) && /* @__PURE__ */ N(d, {
1814
+ (O.sharing?.enabled || O.sharing?.type) && /* @__PURE__ */ P(d, {
1815
1815
  variant: "ghost",
1816
1816
  size: "sm",
1817
1817
  className: "h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150",
1818
- title: `Sharing: ${E.sharing?.visibility || E.sharing?.type || "private"}`,
1818
+ title: `Sharing: ${O.sharing?.visibility || O.sharing?.type || "private"}`,
1819
1819
  "data-testid": "share-button",
1820
- children: [/* @__PURE__ */ M(be, { className: "h-3.5 w-3.5 mr-1.5" }), /* @__PURE__ */ M("span", {
1820
+ children: [/* @__PURE__ */ N(be, { className: "h-3.5 w-3.5 mr-1.5" }), /* @__PURE__ */ N("span", {
1821
1821
  className: "hidden sm:inline",
1822
- children: _("list.share")
1822
+ children: v("list.share")
1823
1823
  })]
1824
1824
  }),
1825
- E.allowPrinting && /* @__PURE__ */ N(d, {
1825
+ O.allowPrinting && /* @__PURE__ */ P(d, {
1826
1826
  variant: "ghost",
1827
1827
  size: "sm",
1828
1828
  className: "h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150",
1829
1829
  onClick: () => window.print(),
1830
1830
  "data-testid": "print-button",
1831
- children: [/* @__PURE__ */ M(me, { className: "h-3.5 w-3.5 mr-1.5" }), /* @__PURE__ */ M("span", {
1831
+ children: [/* @__PURE__ */ N(me, { className: "h-3.5 w-3.5 mr-1.5" }), /* @__PURE__ */ N("span", {
1832
1832
  className: "hidden sm:inline",
1833
- children: _("list.print")
1833
+ children: v("list.print")
1834
1834
  })]
1835
1835
  }),
1836
1836
  (() => {
1837
- let e = E.allowPrinting || E.sharing?.enabled || E.sharing?.type || Y && E.allowExport !== !1;
1838
- return k.showSearch && e ? /* @__PURE__ */ M("div", { className: "h-5 w-px bg-border/50 mx-1 shrink-0" }) : null;
1837
+ let e = O.allowPrinting || O.sharing?.enabled || O.sharing?.type || X && O.allowExport !== !1;
1838
+ return A.showSearch && e ? /* @__PURE__ */ N("div", { className: "h-5 w-px bg-border/50 mx-1 shrink-0" }) : null;
1839
1839
  })(),
1840
- k.showSearch && /* @__PURE__ */ N(x, {
1840
+ A.showSearch && /* @__PURE__ */ P(x, {
1841
1841
  open: Ee,
1842
1842
  onOpenChange: De,
1843
- children: [/* @__PURE__ */ M(C, {
1843
+ children: [/* @__PURE__ */ N(C, {
1844
1844
  asChild: !0,
1845
- children: /* @__PURE__ */ M(d, {
1845
+ children: /* @__PURE__ */ N(d, {
1846
1846
  variant: "ghost",
1847
1847
  size: "sm",
1848
- className: w("hidden sm:inline-flex h-7 w-7 p-0 text-muted-foreground hover:text-primary text-xs transition-colors duration-150", j && "text-foreground font-medium"),
1848
+ className: w("hidden sm:inline-flex h-7 w-7 p-0 text-muted-foreground hover:text-primary text-xs transition-colors duration-150", M && "text-foreground font-medium"),
1849
1849
  "data-testid": "search-icon-button",
1850
- title: _("list.search"),
1851
- children: /* @__PURE__ */ M(ve, { className: "h-3.5 w-3.5" })
1850
+ title: v("list.search"),
1851
+ children: /* @__PURE__ */ N(ve, { className: "h-3.5 w-3.5" })
1852
1852
  })
1853
- }), /* @__PURE__ */ M(S, {
1853
+ }), /* @__PURE__ */ N(S, {
1854
1854
  align: "end",
1855
1855
  className: "w-[calc(100vw-2rem)] sm:w-64 p-2",
1856
1856
  "data-testid": "search-popover",
1857
- children: /* @__PURE__ */ N("div", {
1857
+ children: /* @__PURE__ */ P("div", {
1858
1858
  className: "relative",
1859
1859
  children: [
1860
- /* @__PURE__ */ M(ve, { className: "absolute left-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground" }),
1861
- /* @__PURE__ */ M(y, {
1862
- placeholder: _("list.search") + "...",
1863
- value: j,
1860
+ /* @__PURE__ */ N(ve, { className: "absolute left-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground" }),
1861
+ /* @__PURE__ */ N(b, {
1862
+ placeholder: v("list.search") + "...",
1863
+ value: M,
1864
1864
  onChange: (e) => Bt(e.target.value),
1865
1865
  className: "pl-7 h-8 text-xs",
1866
1866
  autoFocus: !0
1867
1867
  }),
1868
- j && /* @__PURE__ */ M(d, {
1868
+ M && /* @__PURE__ */ N(d, {
1869
1869
  variant: "ghost",
1870
1870
  size: "sm",
1871
1871
  className: "absolute right-0.5 top-1/2 -translate-y-1/2 h-5 w-5 p-0 hover:bg-muted-foreground/20",
1872
1872
  onClick: () => Bt(""),
1873
- children: /* @__PURE__ */ M(Ce, { className: "h-3 w-3" })
1873
+ children: /* @__PURE__ */ N(Ce, { className: "h-3 w-3" })
1874
1874
  })
1875
1875
  ]
1876
1876
  })
1877
1877
  })]
1878
1878
  }),
1879
- k.showAddRecord && k.addRecordPosition === "top" && /* @__PURE__ */ N(d, {
1879
+ A.showAddRecord && A.addRecordPosition === "top" && /* @__PURE__ */ P(d, {
1880
1880
  variant: "ghost",
1881
1881
  size: "sm",
1882
1882
  className: "h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150",
1883
1883
  "data-testid": "add-record-button",
1884
- onClick: () => h.onAddRecord?.(),
1885
- children: [/* @__PURE__ */ M(pe, { className: "h-3.5 w-3.5 mr-1.5" }), /* @__PURE__ */ M("span", {
1884
+ onClick: () => g.onAddRecord?.(),
1885
+ children: [/* @__PURE__ */ N(pe, { className: "h-3.5 w-3.5 mr-1.5" }), /* @__PURE__ */ N("span", {
1886
1886
  className: "hidden sm:inline",
1887
- children: _("list.addRecord")
1887
+ children: v("list.addRecord")
1888
1888
  })]
1889
1889
  })
1890
1890
  ]
1891
1891
  })]
1892
1892
  }),
1893
- J && J.length > 0 && /* @__PURE__ */ M("div", {
1893
+ Y && Y.length > 0 && /* @__PURE__ */ N("div", {
1894
1894
  className: "hidden sm:flex border-b px-2 sm:px-4 py-1 items-center gap-1 flex-wrap bg-background",
1895
1895
  "data-testid": "quick-filters",
1896
- children: J.map((e) => {
1896
+ children: Y.map((e) => {
1897
1897
  let t = vt.has(e.id), n = e.icon ? we[e.icon.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("")] ?? null : null;
1898
- return /* @__PURE__ */ N(d, {
1898
+ return /* @__PURE__ */ P(d, {
1899
1899
  variant: t ? "default" : "outline",
1900
1900
  size: "sm",
1901
1901
  className: "h-7 px-3 text-xs",
1902
- onClick: () => Gt(e.id),
1903
- children: [n && /* @__PURE__ */ M(n, { className: "h-3 w-3 mr-1.5" }), e.label]
1902
+ onClick: () => Kt(e.id),
1903
+ children: [n && /* @__PURE__ */ N(n, { className: "h-3 w-3 mr-1.5" }), e.label]
1904
1904
  }, e.id);
1905
1905
  })
1906
1906
  }),
1907
- /* @__PURE__ */ N("div", {
1907
+ /* @__PURE__ */ P("div", {
1908
1908
  className: "flex-1 min-h-0 bg-background relative overflow-hidden animate-in fade-in-0 duration-200",
1909
- children: [/* @__PURE__ */ M(ne, { active: z && R.length > 0 }), z && R.length === 0 ? /* @__PURE__ */ N("div", {
1909
+ children: [/* @__PURE__ */ N(re, { active: B && z.length > 0 }), B && z.length === 0 ? /* @__PURE__ */ P("div", {
1910
1910
  className: "flex flex-col h-full min-h-[200px] p-4 gap-2",
1911
1911
  "data-testid": "list-loading",
1912
1912
  role: "status",
1913
1913
  "aria-live": "polite",
1914
1914
  "aria-busy": "true",
1915
- children: [/* @__PURE__ */ M("span", {
1915
+ children: [/* @__PURE__ */ N("span", {
1916
1916
  className: "sr-only",
1917
- children: _("list.loading")
1917
+ children: v("list.loading")
1918
1918
  }), [
1919
1919
  0,
1920
1920
  1,
@@ -1922,65 +1922,57 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
1922
1922
  3,
1923
1923
  4,
1924
1924
  5
1925
- ].map((e) => /* @__PURE__ */ M("div", {
1925
+ ].map((e) => /* @__PURE__ */ N("div", {
1926
1926
  className: "h-9 rounded bg-muted/60 animate-pulse",
1927
1927
  style: { opacity: Math.max(.25, 1 - e * .12) }
1928
1928
  }, e))]
1929
- }) : !z && R.length === 0 && A === "grid" ? (() => {
1930
- let e = E.emptyState?.icon;
1931
- return /* @__PURE__ */ N("div", {
1932
- className: "flex flex-col items-center justify-center h-full min-h-[200px] text-center p-8",
1929
+ }) : !B && z.length === 0 && j === "grid" ? (() => {
1930
+ let e = O.emptyState?.icon, t = e ? we[e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("")] ?? ue : ue, n = (typeof O.emptyState?.title == "string" ? O.emptyState.title : void 0) ?? v("list.noItems"), r = (typeof O.emptyState?.message == "string" ? O.emptyState.message : void 0) ?? v("list.noItemsMessage");
1931
+ return /* @__PURE__ */ N(m, {
1933
1932
  "data-testid": "empty-state",
1934
- children: [
1935
- /* @__PURE__ */ M(e ? we[e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("")] ?? ue : ue, { className: "h-12 w-12 text-muted-foreground/50 mb-4" }),
1936
- /* @__PURE__ */ M("h3", {
1937
- className: "text-lg font-medium text-foreground mb-1",
1938
- children: (typeof E.emptyState?.title == "string" ? E.emptyState.title : void 0) ?? _("list.noItems")
1939
- }),
1940
- /* @__PURE__ */ M("p", {
1941
- className: "text-sm text-muted-foreground max-w-md",
1942
- children: (typeof E.emptyState?.message == "string" ? E.emptyState.message : void 0) ?? _("list.noItemsMessage")
1943
- }),
1944
- k.showAddRecord && /* @__PURE__ */ N(d, {
1945
- variant: "default",
1946
- size: "sm",
1947
- className: "mt-4",
1948
- "data-testid": "empty-state-add-record",
1949
- onClick: () => h.onAddRecord?.(),
1950
- children: [/* @__PURE__ */ M(pe, { className: "h-4 w-4 mr-1.5" }), _("list.addRecord")]
1951
- })
1952
- ]
1933
+ className: "h-full min-h-[200px] p-8 gap-1 [&>h3]:text-lg [&>h3]:font-medium [&>h3]:text-foreground [&>p]:max-w-md",
1934
+ icon: /* @__PURE__ */ N(t, { className: "h-12 w-12 text-muted-foreground/50" }),
1935
+ iconWrapperClassName: "mb-3",
1936
+ title: n,
1937
+ description: r,
1938
+ action: A.showAddRecord ? /* @__PURE__ */ P(d, {
1939
+ variant: "default",
1940
+ size: "sm",
1941
+ "data-testid": "empty-state-add-record",
1942
+ onClick: () => g.onAddRecord?.(),
1943
+ children: [/* @__PURE__ */ N(pe, { className: "h-4 w-4 mr-1.5" }), v("list.addRecord")]
1944
+ }) : void 0
1953
1945
  });
1954
- })() : /* @__PURE__ */ M(ke, {
1955
- schema: Ht,
1956
- ...h,
1957
- data: R,
1958
- loading: z,
1946
+ })() : /* @__PURE__ */ N(ke, {
1947
+ schema: Ut,
1948
+ ...g,
1949
+ data: z,
1950
+ loading: B,
1959
1951
  onRowSelect: gt
1960
1952
  })]
1961
- }, A),
1962
- k.showAddRecord && k.addRecordPosition === "bottom" && /* @__PURE__ */ M("div", {
1953
+ }, j),
1954
+ A.showAddRecord && A.addRecordPosition === "bottom" && /* @__PURE__ */ N("div", {
1963
1955
  className: "border-t px-2 sm:px-4 py-1 bg-background shrink-0",
1964
- children: /* @__PURE__ */ N(d, {
1956
+ children: /* @__PURE__ */ P(d, {
1965
1957
  variant: "ghost",
1966
1958
  size: "sm",
1967
1959
  className: "h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150",
1968
1960
  "data-testid": "add-record-button",
1969
- onClick: () => h.onAddRecord?.(),
1970
- children: [/* @__PURE__ */ M(pe, { className: "h-3.5 w-3.5 mr-1.5" }), /* @__PURE__ */ M("span", {
1961
+ onClick: () => g.onAddRecord?.(),
1962
+ children: [/* @__PURE__ */ N(pe, { className: "h-3.5 w-3.5 mr-1.5" }), /* @__PURE__ */ N("span", {
1971
1963
  className: "hidden sm:inline",
1972
- children: _("list.addRecord")
1964
+ children: v("list.addRecord")
1973
1965
  })]
1974
1966
  })
1975
1967
  }),
1976
- E.bulkActions && E.bulkActions.length > 0 && ht.length > 0 && A !== "grid" && /* @__PURE__ */ N("div", {
1968
+ O.bulkActions && O.bulkActions.length > 0 && ht.length > 0 && j !== "grid" && /* @__PURE__ */ P("div", {
1977
1969
  className: "border-t border-primary/30 px-4 py-2 flex items-center gap-2 text-xs bg-primary/10 text-foreground shrink-0 shadow-sm",
1978
1970
  role: "region",
1979
1971
  "aria-label": "Bulk actions",
1980
1972
  "data-testid": "bulk-actions-bar",
1981
1973
  children: [
1982
- /* @__PURE__ */ M(oe, { className: "h-3.5 w-3.5 text-primary shrink-0" }),
1983
- /* @__PURE__ */ N("span", {
1974
+ /* @__PURE__ */ N(D, { className: "h-3.5 w-3.5 text-primary shrink-0" }),
1975
+ /* @__PURE__ */ P("span", {
1984
1976
  className: "font-medium",
1985
1977
  children: [
1986
1978
  ht.length,
@@ -1989,53 +1981,53 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
1989
1981
  " selected"
1990
1982
  ]
1991
1983
  }),
1992
- /* @__PURE__ */ M("div", {
1984
+ /* @__PURE__ */ N("div", {
1993
1985
  className: "flex items-center gap-1.5 ml-3",
1994
- children: E.bulkActions.map((e) => {
1986
+ children: O.bulkActions.map((e) => {
1995
1987
  let t = String(e).toLowerCase(), n = t.includes("delete") || t.includes("remove") || t.includes("destroy"), r = n ? Se : null;
1996
- return /* @__PURE__ */ N(d, {
1988
+ return /* @__PURE__ */ P(d, {
1997
1989
  variant: n ? "destructive" : "outline",
1998
1990
  size: "sm",
1999
1991
  className: "h-7 px-2.5 text-xs gap-1.5",
2000
- onClick: () => h.onBulkAction?.(e, ht),
1992
+ onClick: () => g.onBulkAction?.(e, ht),
2001
1993
  "data-testid": `bulk-action-${e}`,
2002
- children: [r && /* @__PURE__ */ M(r, { className: "h-3 w-3" }), ce(e)]
1994
+ children: [r && /* @__PURE__ */ N(r, { className: "h-3 w-3" }), ce(e)]
2003
1995
  }, e);
2004
1996
  })
2005
1997
  }),
2006
- /* @__PURE__ */ N(d, {
1998
+ /* @__PURE__ */ P(d, {
2007
1999
  variant: "ghost",
2008
2000
  size: "sm",
2009
2001
  className: "h-7 px-2 text-xs ml-auto gap-1",
2010
2002
  onClick: () => gt([]),
2011
- children: [/* @__PURE__ */ M(Ce, { className: "h-3 w-3" }), "Clear"]
2003
+ children: [/* @__PURE__ */ N(Ce, { className: "h-3 w-3" }), "Clear"]
2012
2004
  })
2013
2005
  ]
2014
2006
  }),
2015
- !z && R.length > 0 && E.showRecordCount !== !1 && /* @__PURE__ */ N("div", {
2007
+ !B && z.length > 0 && O.showRecordCount !== !1 && /* @__PURE__ */ P("div", {
2016
2008
  className: "border-t px-4 py-2 flex items-center gap-3 text-xs text-muted-foreground bg-background shrink-0",
2017
2009
  "data-testid": "record-count-bar",
2018
2010
  children: [
2019
- /* @__PURE__ */ M("span", {
2011
+ /* @__PURE__ */ N("span", {
2020
2012
  className: "font-medium text-foreground/80",
2021
- children: R.length === 1 ? _("list.recordCountOne", { count: R.length }) : _("list.recordCount", { count: R.length })
2013
+ children: z.length === 1 ? v("list.recordCountOne", { count: z.length }) : v("list.recordCount", { count: z.length })
2022
2014
  }),
2023
- it && /* @__PURE__ */ M("span", {
2015
+ it && /* @__PURE__ */ N("span", {
2024
2016
  className: "text-amber-600",
2025
2017
  "data-testid": "data-limit-warning",
2026
- children: _("list.dataLimitReached", { limit: U })
2018
+ children: v("list.dataLimitReached", { limit: W })
2027
2019
  }),
2028
- E.pagination?.pageSizeOptions && E.pagination.pageSizeOptions.length > 0 && /* @__PURE__ */ N("div", {
2020
+ O.pagination?.pageSizeOptions && O.pagination.pageSizeOptions.length > 0 && /* @__PURE__ */ P("div", {
2029
2021
  className: "ml-auto flex items-center gap-2",
2030
- children: [/* @__PURE__ */ M("span", { children: _("table.rowsPerPage", { defaultValue: "Rows per page" }) }), /* @__PURE__ */ M("select", {
2022
+ children: [/* @__PURE__ */ N("span", { children: v("table.rowsPerPage", { defaultValue: "Rows per page" }) }), /* @__PURE__ */ N("select", {
2031
2023
  "data-testid": "page-size-selector",
2032
2024
  className: "h-7 w-[72px] px-2 py-1 text-xs rounded-md border border-input bg-background",
2033
- value: String(U),
2025
+ value: String(W),
2034
2026
  onChange: (e) => {
2035
2027
  let t = Number(e.target.value);
2036
- st(t), h.onPageSizeChange && h.onPageSizeChange(t);
2028
+ st(t), g.onPageSizeChange && g.onPageSizeChange(t);
2037
2029
  },
2038
- children: E.pagination.pageSizeOptions.map((e) => /* @__PURE__ */ M("option", {
2030
+ children: O.pagination.pageSizeOptions.map((e) => /* @__PURE__ */ N("option", {
2039
2031
  value: String(e),
2040
2032
  children: e
2041
2033
  }, e))
@@ -2043,17 +2035,17 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
2043
2035
  })
2044
2036
  ]
2045
2037
  }),
2046
- Vt.isOverlay && /* @__PURE__ */ M(te, {
2038
+ Vt.isOverlay && /* @__PURE__ */ N(ne, {
2047
2039
  ...Vt,
2048
- title: E.label ? `${E.label} Detail` : E.objectName ? `${E.objectName.charAt(0).toUpperCase() + E.objectName.slice(1)} Detail` : "Record Detail",
2049
- children: (e) => /* @__PURE__ */ M("div", {
2040
+ title: O.label ? `${O.label} Detail` : O.objectName ? `${O.objectName.charAt(0).toUpperCase() + O.objectName.slice(1)} Detail` : "Record Detail",
2041
+ children: (e) => /* @__PURE__ */ N("div", {
2050
2042
  className: "space-y-3",
2051
- children: Object.entries(e).map(([e, t]) => /* @__PURE__ */ N("div", {
2043
+ children: Object.entries(e).map(([e, t]) => /* @__PURE__ */ P("div", {
2052
2044
  className: "flex flex-col",
2053
- children: [/* @__PURE__ */ M("span", {
2045
+ children: [/* @__PURE__ */ N("span", {
2054
2046
  className: "text-xs font-medium text-muted-foreground uppercase tracking-wide",
2055
2047
  children: e.replace(/_/g, " ")
2056
- }), /* @__PURE__ */ M("span", {
2048
+ }), /* @__PURE__ */ N("span", {
2057
2049
  className: "text-sm",
2058
2050
  children: String(t ?? "—")
2059
2051
  })]
@@ -2063,7 +2055,7 @@ var H = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
2063
2055
  ]
2064
2056
  });
2065
2057
  });
2066
- H.displayName = "ListView";
2058
+ U.displayName = "ListView";
2067
2059
  //#endregion
2068
2060
  //#region src/ObjectGallery.tsx
2069
2061
  var it = {
@@ -2074,7 +2066,13 @@ var it = {
2074
2066
  small: "aspect-square",
2075
2067
  medium: "aspect-[4/3]",
2076
2068
  large: "aspect-[16/10]"
2077
- }, ot = [
2069
+ }, ot = new Set([
2070
+ "number",
2071
+ "currency",
2072
+ "percent",
2073
+ "integer",
2074
+ "decimal"
2075
+ ]), st = [
2078
2076
  {
2079
2077
  bg: "from-indigo-500/15 via-indigo-500/5 to-purple-500/10",
2080
2078
  ring: "ring-indigo-500/15",
@@ -2106,35 +2104,40 @@ var it = {
2106
2104
  text: "text-violet-600/70 dark:text-violet-300/70"
2107
2105
  }
2108
2106
  ];
2109
- function st(e) {
2107
+ function W(e) {
2110
2108
  let t = 5381;
2111
2109
  for (let n = 0; n < e.length; n++) t = (t << 5) + t + e.charCodeAt(n);
2112
- return ot[Math.abs(t) % ot.length];
2110
+ return st[Math.abs(t) % st.length];
2113
2111
  }
2114
- var U = (e) => {
2112
+ var G = (e) => {
2115
2113
  let { schema: n } = e, r = s(Ae), i = e.dataSource || r?.dataSource, a = je(n.bind), [d, m] = u([]), [h, g] = u(!1), [_, v] = u(null), ee = Ne({
2116
2114
  navigation: n.navigation,
2117
2115
  objectName: n.objectName,
2118
2116
  onRowClick: e.onRowClick ?? e.onCardClick
2119
- }), y = n.gallery, b = y?.coverField ?? n.imageField ?? "image", x = y?.coverFit ?? "cover", S = y?.cardSize ?? "medium", C = y?.titleField ?? n.titleField ?? "name", ne = y?.visibleFields, { fieldOptionLabel: re } = P(), ie = o((e) => {
2117
+ }), y = n.gallery, b = y?.coverField ?? n.imageField ?? "image", te = y?.coverFit ?? "cover", x = y?.cardSize ?? "medium", S = y?.titleField ?? n.titleField ?? "name", C = y?.visibleFields, { fieldLabel: re, fieldOptionLabel: ie } = F(), ae = o((e) => {
2120
2118
  let t = _?.fields?.[e], r = { name: e };
2121
2119
  if (t) {
2122
2120
  t.type && (r.type = t.type), t.label && (r.label = t.label), t.options && (r.options = t.options), t.currency && (r.currency = t.currency), t.precision !== void 0 && (r.precision = t.precision), t.format && (r.format = t.format);
2123
2121
  let e = t.reference_to || t.reference;
2124
2122
  e && (r.reference_to = e), t.reference_field && (r.reference_field = t.reference_field);
2125
2123
  }
2124
+ if (n.objectName) {
2125
+ let t = String(r.label ?? e);
2126
+ r.label = re(n.objectName, e, t);
2127
+ }
2126
2128
  return n.objectName && Array.isArray(r.options) && (r.options = r.options.map((t) => {
2127
2129
  let r = String(t?.value ?? t), i = String(t?.label ?? r);
2128
2130
  return {
2129
2131
  ...t,
2130
2132
  value: r,
2131
- label: re(n.objectName, e, r, i)
2133
+ label: ie(n.objectName, e, r, i)
2132
2134
  };
2133
2135
  })), r;
2134
2136
  }, [
2135
2137
  _,
2136
2138
  n.objectName,
2137
- re
2139
+ re,
2140
+ ie
2138
2141
  ]);
2139
2142
  c(() => {
2140
2143
  let e = !0;
@@ -2186,18 +2189,18 @@ var U = (e) => {
2186
2189
  e.data,
2187
2190
  _
2188
2191
  ]);
2189
- let T = e.data || a || n.data || d || [], ae = l(() => T.some((e) => typeof e[b] == "string" && !!e[b]), [T, b]), oe = !!y?.coverField || ae, O = n.grouping?.fields, se = !!(O && O.length > 0), [ce, k] = u({}), le = l(() => O ? O.some((e) => e.collapsed) : !1, [O]), A = o((e) => {
2190
- k((t) => ({
2192
+ let T = e.data || a || n.data || d || [], E = l(() => T.some((e) => typeof e[b] == "string" && !!e[b]), [T, b]), D = n.grouping?.fields, oe = !!(D && D.length > 0), [se, ce] = u({}), A = l(() => D ? D.some((e) => e.collapsed) : !1, [D]), le = o((e) => {
2193
+ ce((t) => ({
2191
2194
  ...t,
2192
- [e]: t[e] === void 0 ? !le : !t[e]
2195
+ [e]: t[e] === void 0 ? !A : !t[e]
2193
2196
  }));
2194
- }, [le]), ue = l(() => {
2195
- if (!se || !O) return [];
2197
+ }, [A]), j = l(() => {
2198
+ if (!oe || !D) return [];
2196
2199
  let e = /* @__PURE__ */ new Map(), t = [];
2197
2200
  for (let n of T) {
2198
- let r = O.map((e) => String(n[e.field] ?? "")).join(" / ");
2201
+ let r = D.map((e) => String(n[e.field] ?? "")).join(" / ");
2199
2202
  if (!e.has(r)) {
2200
- let i = O.map((e) => {
2203
+ let i = D.map((e) => {
2201
2204
  let t = n[e.field];
2202
2205
  return t != null && t !== "" ? String(t) : "(empty)";
2203
2206
  }).join(" / ");
@@ -2208,7 +2211,7 @@ var U = (e) => {
2208
2211
  }
2209
2212
  e.get(r).items.push(n);
2210
2213
  }
2211
- let n = O[0]?.order ?? "asc";
2214
+ let n = D[0]?.order ?? "asc";
2212
2215
  return t.sort((e, t) => {
2213
2216
  let r = e.localeCompare(t, void 0, {
2214
2217
  numeric: !0,
@@ -2216,7 +2219,7 @@ var U = (e) => {
2216
2219
  });
2217
2220
  return n === "desc" ? -r : r;
2218
2221
  }), t.map((t) => {
2219
- let n = e.get(t), r = t in ce ? ce[t] : le;
2222
+ let n = e.get(t), r = t in se ? se[t] : A;
2220
2223
  return {
2221
2224
  key: t,
2222
2225
  label: n.label,
@@ -2226,106 +2229,109 @@ var U = (e) => {
2226
2229
  });
2227
2230
  }, [
2228
2231
  T,
2229
- O,
2232
+ D,
2233
+ oe,
2230
2234
  se,
2231
- ce,
2232
- le
2235
+ A
2233
2236
  ]);
2234
- if (h && !T.length) return /* @__PURE__ */ M("div", {
2237
+ if (h && !T.length) return /* @__PURE__ */ N("div", {
2235
2238
  className: "p-4 text-sm text-muted-foreground",
2236
2239
  children: "Loading Gallery..."
2237
2240
  });
2238
- if (!T.length) return /* @__PURE__ */ M("div", {
2241
+ if (!T.length) return /* @__PURE__ */ N("div", {
2239
2242
  className: "p-4 text-sm text-muted-foreground",
2240
2243
  children: "No items to display"
2241
2244
  });
2242
- let de = (t, r) => {
2243
- let i = t.id ?? t._id ?? r, a = String(t[C] ?? "Untitled"), o = t[b], s = st(String(i) + "|" + a);
2244
- return /* @__PURE__ */ N(f, {
2245
+ let ue = (t, r) => {
2246
+ let i = t.id ?? t._id ?? r, a = String(t[S] ?? "Untitled"), o = t[b], s = W(String(i) + "|" + a);
2247
+ return /* @__PURE__ */ P(f, {
2245
2248
  role: "listitem",
2246
2249
  className: w("group relative overflow-hidden border-border/60 bg-card", "transition-all duration-200 ease-out", "hover:shadow-lg hover:border-border hover:-translate-y-0.5", (e.onCardClick || e.onRowClick || n.navigation) && "cursor-pointer"),
2247
2250
  onClick: (e) => ee.handleClick(t, e),
2248
2251
  children: [
2249
- !oe && /* @__PURE__ */ M("div", {
2252
+ !E && /* @__PURE__ */ N("div", {
2250
2253
  "aria-hidden": !0,
2251
2254
  className: w("absolute inset-x-0 top-0 h-[3px] bg-gradient-to-r", s.bg)
2252
2255
  }),
2253
- /* @__PURE__ */ M("div", {
2254
- className: w("w-full overflow-hidden relative", at[S]),
2255
- hidden: !oe,
2256
- children: o ? /* @__PURE__ */ M("img", {
2256
+ /* @__PURE__ */ N("div", {
2257
+ className: w("w-full overflow-hidden relative", at[x]),
2258
+ hidden: !E,
2259
+ children: o ? /* @__PURE__ */ N("img", {
2257
2260
  src: o,
2258
2261
  alt: a,
2259
- className: w("h-full w-full transition-transform duration-300 ease-out group-hover:scale-[1.04]", x === "cover" && "object-cover", x === "contain" && "object-contain")
2260
- }) : /* @__PURE__ */ M("div", {
2262
+ className: w("h-full w-full transition-transform duration-300 ease-out group-hover:scale-[1.04]", te === "cover" && "object-cover", te === "contain" && "object-contain")
2263
+ }) : /* @__PURE__ */ N("div", {
2261
2264
  className: w("flex h-full w-full items-center justify-center bg-gradient-to-br ring-1 ring-inset", s.bg, s.ring),
2262
- children: /* @__PURE__ */ M("span", {
2265
+ children: /* @__PURE__ */ N("span", {
2263
2266
  className: w("text-5xl font-semibold tracking-tight opacity-90", s.text),
2264
2267
  children: a[0]?.toUpperCase()
2265
2268
  })
2266
2269
  })
2267
2270
  }),
2268
- /* @__PURE__ */ N(p, {
2269
- className: w("p-3", oe && "border-t border-border/60"),
2270
- children: [/* @__PURE__ */ M("h3", {
2271
+ /* @__PURE__ */ P(p, {
2272
+ className: w("p-3", E && "border-t border-border/60"),
2273
+ children: [/* @__PURE__ */ N("h3", {
2271
2274
  className: "font-semibold tracking-tight truncate text-sm leading-tight text-foreground",
2272
2275
  title: a,
2273
2276
  children: a
2274
- }), ne && ne.length > 0 && /* @__PURE__ */ M("div", {
2277
+ }), C && C.length > 0 && /* @__PURE__ */ N("div", {
2275
2278
  className: "mt-1.5 space-y-1",
2276
- children: ne.map((e) => {
2279
+ children: C.map((e) => {
2277
2280
  let n = t[e];
2278
2281
  if (n == null || n === "") return null;
2279
- let r = ie(e);
2280
- return /* @__PURE__ */ M("div", {
2281
- className: "text-xs text-muted-foreground truncate [&_*]:!text-xs",
2282
+ let r = ae(e), i = Le(r) || r.type || "text", a = Ie(i), o = r?.label && String(r.label).trim() ? String(r.label) : void 0, s = o != null && ot.has(i);
2283
+ return /* @__PURE__ */ P("div", {
2284
+ className: w("text-xs text-muted-foreground truncate [&_*]:!text-xs", s && "flex items-baseline gap-1.5"),
2282
2285
  onClick: (e) => {
2283
2286
  e.target.closest("a,button") && e.stopPropagation();
2284
2287
  },
2285
- children: /* @__PURE__ */ M(Ie(Le(r) || r.type || "text"), {
2288
+ children: [s && /* @__PURE__ */ N("span", {
2289
+ className: "shrink-0 text-muted-foreground/70 tabular-nums",
2290
+ children: o
2291
+ }), /* @__PURE__ */ N(a, {
2286
2292
  value: n,
2287
2293
  field: r
2288
- })
2294
+ })]
2289
2295
  }, e);
2290
2296
  })
2291
2297
  })]
2292
2298
  })
2293
2299
  ]
2294
2300
  }, i);
2295
- }, j = (e) => /* @__PURE__ */ M("div", {
2296
- className: w("grid gap-4 p-4 auto-rows-min content-start", it[S], n.className),
2301
+ }, de = (e) => /* @__PURE__ */ N("div", {
2302
+ className: w("grid gap-4 p-4 auto-rows-min content-start", it[x], n.className),
2297
2303
  role: "list",
2298
- children: e.map((e, t) => de(e, t))
2304
+ children: e.map((e, t) => ue(e, t))
2299
2305
  });
2300
- return /* @__PURE__ */ N(Te, { children: [se ? /* @__PURE__ */ M("div", {
2306
+ return /* @__PURE__ */ P(Te, { children: [oe ? /* @__PURE__ */ N("div", {
2301
2307
  className: "space-y-2",
2302
- children: ue.map((e) => /* @__PURE__ */ N("div", {
2308
+ children: j.map((e) => /* @__PURE__ */ P("div", {
2303
2309
  className: "border rounded-md",
2304
- children: [/* @__PURE__ */ N("button", {
2310
+ children: [/* @__PURE__ */ P("button", {
2305
2311
  type: "button",
2306
2312
  className: "flex w-full items-center gap-2 px-3 py-2 text-sm font-medium text-left bg-muted/50 hover:bg-muted transition-colors",
2307
- onClick: () => A(e.key),
2313
+ onClick: () => le(e.key),
2308
2314
  children: [
2309
- e.collapsed ? /* @__PURE__ */ M(D, { className: "h-4 w-4 shrink-0" }) : /* @__PURE__ */ M(E, { className: "h-4 w-4 shrink-0" }),
2310
- /* @__PURE__ */ M("span", { children: e.label }),
2311
- /* @__PURE__ */ M("span", {
2315
+ e.collapsed ? /* @__PURE__ */ N(k, { className: "h-4 w-4 shrink-0" }) : /* @__PURE__ */ N(O, { className: "h-4 w-4 shrink-0" }),
2316
+ /* @__PURE__ */ N("span", { children: e.label }),
2317
+ /* @__PURE__ */ N("span", {
2312
2318
  className: "ml-auto text-xs text-muted-foreground",
2313
2319
  children: e.items.length
2314
2320
  })
2315
2321
  ]
2316
- }), !e.collapsed && j(e.items)]
2322
+ }), !e.collapsed && de(e.items)]
2317
2323
  }, e.key))
2318
- }) : j(T), ee.isOverlay && /* @__PURE__ */ M(te, {
2324
+ }) : de(T), ee.isOverlay && /* @__PURE__ */ N(ne, {
2319
2325
  ...ee,
2320
2326
  title: "Gallery Item",
2321
- children: (e) => /* @__PURE__ */ M("div", {
2327
+ children: (e) => /* @__PURE__ */ N("div", {
2322
2328
  className: "space-y-3",
2323
- children: Object.entries(e).map(([e, t]) => /* @__PURE__ */ N("div", {
2329
+ children: Object.entries(e).map(([e, t]) => /* @__PURE__ */ P("div", {
2324
2330
  className: "flex flex-col",
2325
- children: [/* @__PURE__ */ M("span", {
2331
+ children: [/* @__PURE__ */ N("span", {
2326
2332
  className: "text-xs font-medium text-muted-foreground uppercase tracking-wide",
2327
2333
  children: e.replace(/_/g, " ")
2328
- }), /* @__PURE__ */ M("span", {
2334
+ }), /* @__PURE__ */ N("span", {
2329
2335
  className: "text-sm",
2330
2336
  children: String(t ?? "—")
2331
2337
  })]
@@ -2333,11 +2339,11 @@ var U = (e) => {
2333
2339
  })
2334
2340
  })] });
2335
2341
  };
2336
- e.register("object-gallery", U, {
2342
+ e.register("object-gallery", G, {
2337
2343
  namespace: "plugin-list",
2338
2344
  label: "Gallery View",
2339
2345
  category: "view"
2340
- }), e.register("list-view", H, {
2346
+ }), e.register("list-view", U, {
2341
2347
  namespace: "plugin-list",
2342
2348
  label: "List View",
2343
2349
  category: "Views",
@@ -2414,7 +2420,7 @@ e.register("object-gallery", U, {
2414
2420
  sort: [],
2415
2421
  options: {}
2416
2422
  }
2417
- }), e.register("list", H, {
2423
+ }), e.register("list", U, {
2418
2424
  namespace: "view",
2419
2425
  category: "view",
2420
2426
  label: "List",
@@ -2485,4 +2491,4 @@ e.register("object-gallery", U, {
2485
2491
  ]
2486
2492
  });
2487
2493
  //#endregion
2488
- export { H as ListView, U as ObjectGallery, He as TabBar, Ue as TabBarSelect, qe as UserFilters, Be as ViewSwitcher, Qe as evaluateConditionalFormatting, V as normalizeFilterCondition, Xe as normalizeFilters };
2494
+ export { U as ListView, G as ObjectGallery, He as TabBar, Ue as TabBarSelect, qe as UserFilters, Be as ViewSwitcher, Qe as evaluateConditionalFormatting, H as normalizeFilterCondition, Xe as normalizeFilters };