@object-ui/plugin-list 4.0.6 → 4.0.7
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,22 +1,22 @@
|
|
|
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, FilterBuilder as m, GroupingEditor as ee, Input as te, NavigationOverlay as ne, Popover as
|
|
5
|
-
import { Activity as
|
|
6
|
-
import { Fragment as
|
|
7
|
-
import { SchemaRenderer as
|
|
8
|
-
import { usePullToRefresh as
|
|
9
|
-
import { useObjectLabel as
|
|
4
|
+
import { Button as d, Card as f, CardContent as p, FilterBuilder as m, GroupingEditor as ee, Input as te, LookupValuePicker as h, NavigationOverlay as ne, Popover as g, PopoverContent as _, PopoverTrigger as v, SortBuilder as y, cn as b } from "@object-ui/components";
|
|
5
|
+
import { Activity as x, AlignJustify as re, ArrowUpDown as ie, Calendar as S, ChevronDown as C, ChevronRight as w, Download as T, EyeOff as ae, GanttChartSquare as E, Grid as D, Group as O, Images as k, Inbox as oe, LayoutGrid as A, Map as se, Paintbrush as ce, Plus as j, Printer as le, Search as ue, Share2 as de, SlidersHorizontal as fe, X as pe, icons as me } from "lucide-react";
|
|
6
|
+
import { Fragment as he, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
7
|
+
import { SchemaRenderer as ge, SchemaRendererContext as _e, useDataScope as ve, useDensityMode as ye, useNavigationOverlay as be } from "@object-ui/react";
|
|
8
|
+
import { usePullToRefresh as xe } from "@object-ui/mobile";
|
|
9
|
+
import { useObjectLabel as Se, useObjectTranslation as P } from "@object-ui/i18n";
|
|
10
10
|
//#region src/ViewSwitcher.tsx
|
|
11
|
-
var
|
|
12
|
-
grid: /* @__PURE__ */
|
|
13
|
-
kanban: /* @__PURE__ */
|
|
14
|
-
gallery: /* @__PURE__ */
|
|
15
|
-
calendar: /* @__PURE__ */
|
|
16
|
-
timeline: /* @__PURE__ */
|
|
17
|
-
gantt: /* @__PURE__ */
|
|
18
|
-
map: /* @__PURE__ */
|
|
19
|
-
},
|
|
11
|
+
var Ce = {
|
|
12
|
+
grid: /* @__PURE__ */ M(D, { className: "h-4 w-4" }),
|
|
13
|
+
kanban: /* @__PURE__ */ M(A, { className: "h-4 w-4" }),
|
|
14
|
+
gallery: /* @__PURE__ */ M(k, { className: "h-4 w-4" }),
|
|
15
|
+
calendar: /* @__PURE__ */ M(S, { className: "h-4 w-4" }),
|
|
16
|
+
timeline: /* @__PURE__ */ M(x, { className: "h-4 w-4" }),
|
|
17
|
+
gantt: /* @__PURE__ */ M(E, { className: "h-4 w-4" }),
|
|
18
|
+
map: /* @__PURE__ */ M(se, { className: "h-4 w-4" })
|
|
19
|
+
}, F = {
|
|
20
20
|
grid: "Grid",
|
|
21
21
|
kanban: "Kanban",
|
|
22
22
|
gallery: "Gallery",
|
|
@@ -24,7 +24,7 @@ var I = {
|
|
|
24
24
|
timeline: "Timeline",
|
|
25
25
|
gantt: "Gantt",
|
|
26
26
|
map: "Map"
|
|
27
|
-
},
|
|
27
|
+
}, we = ({ currentView: e, availableViews: t = ["grid", "kanban"], onViewChange: n, className: r, animated: i = !0 }) => {
|
|
28
28
|
let o = a.useCallback((t) => {
|
|
29
29
|
if (!i || t === e) {
|
|
30
30
|
n(t);
|
|
@@ -36,21 +36,21 @@ var I = {
|
|
|
36
36
|
e,
|
|
37
37
|
n
|
|
38
38
|
]);
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
className:
|
|
39
|
+
return /* @__PURE__ */ M("div", {
|
|
40
|
+
className: b("flex items-center gap-1 bg-transparent oui-view-switcher", r),
|
|
41
41
|
children: t.map((t) => {
|
|
42
42
|
let n = e === t;
|
|
43
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ N("button", {
|
|
44
44
|
type: "button",
|
|
45
45
|
onClick: () => o(t),
|
|
46
|
-
"aria-label":
|
|
47
|
-
title:
|
|
46
|
+
"aria-label": F[t],
|
|
47
|
+
title: F[t],
|
|
48
48
|
"aria-pressed": n,
|
|
49
49
|
"data-state": n ? "on" : "off",
|
|
50
|
-
className:
|
|
51
|
-
children: [
|
|
50
|
+
className: b("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"),
|
|
51
|
+
children: [Ce[t], /* @__PURE__ */ M("span", {
|
|
52
52
|
className: "hidden sm:inline-block text-xs font-medium",
|
|
53
|
-
children:
|
|
53
|
+
children: F[t]
|
|
54
54
|
})]
|
|
55
55
|
}, t);
|
|
56
56
|
})
|
|
@@ -58,40 +58,43 @@ var I = {
|
|
|
58
58
|
};
|
|
59
59
|
//#endregion
|
|
60
60
|
//#region src/components/TabBar.tsx
|
|
61
|
-
function
|
|
62
|
-
return e ?
|
|
61
|
+
function Te(e) {
|
|
62
|
+
return e ? me[e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("")] ?? null : null;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function I(e) {
|
|
65
65
|
return e.filter((e) => e.pinned || e.visible !== "false" && e.visible !== !1).sort((e, t) => (e.order ?? 0) - (t.order ?? 0));
|
|
66
66
|
}
|
|
67
|
-
var
|
|
68
|
-
let i = a.useMemo(() =>
|
|
67
|
+
var Ee = ({ tabs: e, activeTab: t, onTabChange: n, className: r }) => {
|
|
68
|
+
let i = a.useMemo(() => I(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) => {
|
|
69
69
|
c(e.name), n?.(e);
|
|
70
70
|
}, [n]);
|
|
71
|
-
return i.length === 0 ? null : /* @__PURE__ */
|
|
72
|
-
className:
|
|
71
|
+
return i.length === 0 ? null : /* @__PURE__ */ M("div", {
|
|
72
|
+
className: b("border-b px-2 sm:px-4 py-1 flex items-center gap-0.5 bg-background", r),
|
|
73
73
|
"data-testid": "view-tabs",
|
|
74
74
|
role: "tablist",
|
|
75
75
|
children: i.map((e) => {
|
|
76
|
-
let t =
|
|
77
|
-
return /* @__PURE__ */
|
|
76
|
+
let t = Te(e.icon), n = l === e.name;
|
|
77
|
+
return /* @__PURE__ */ N(d, {
|
|
78
78
|
variant: "ghost",
|
|
79
79
|
size: "sm",
|
|
80
|
-
className:
|
|
80
|
+
className: b("h-7 px-3 py-1.5 text-xs rounded-none transition-colors duration-150", n ? "border-b-2 border-primary font-medium text-foreground" : "text-muted-foreground hover:text-foreground"),
|
|
81
81
|
"data-testid": `view-tab-${e.name}`,
|
|
82
82
|
role: "tab",
|
|
83
83
|
"aria-selected": n,
|
|
84
84
|
onClick: () => u(e),
|
|
85
|
-
children: [t && /* @__PURE__ */
|
|
85
|
+
children: [t && /* @__PURE__ */ M(t, { className: "h-3 w-3 mr-1.5" }), e.label]
|
|
86
86
|
}, e.name);
|
|
87
87
|
})
|
|
88
88
|
});
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
}, De = new Set([
|
|
90
|
+
"lookup",
|
|
91
|
+
"master_detail",
|
|
92
|
+
"user",
|
|
93
|
+
"owner"
|
|
94
|
+
]);
|
|
95
|
+
function Oe({ config: e, objectDef: t, data: n = [], onFilterChange: r, maxVisible: i, className: a }) {
|
|
93
96
|
switch (e.element) {
|
|
94
|
-
case "dropdown": return /* @__PURE__ */
|
|
97
|
+
case "dropdown": return /* @__PURE__ */ M(Ae, {
|
|
95
98
|
fields: e.fields || [],
|
|
96
99
|
objectDef: t,
|
|
97
100
|
data: n,
|
|
@@ -99,14 +102,14 @@ function Te({ config: e, objectDef: t, data: n = [], onFilterChange: r, maxVisib
|
|
|
99
102
|
maxVisible: i,
|
|
100
103
|
className: a
|
|
101
104
|
});
|
|
102
|
-
case "tabs": return /* @__PURE__ */
|
|
105
|
+
case "tabs": return /* @__PURE__ */ M(je, {
|
|
103
106
|
tabs: e.tabs || [],
|
|
104
107
|
showAllRecords: e.showAllRecords !== !1,
|
|
105
108
|
allowAddTab: e.allowAddTab,
|
|
106
109
|
onFilterChange: r,
|
|
107
110
|
className: a
|
|
108
111
|
});
|
|
109
|
-
case "toggle": return /* @__PURE__ */
|
|
112
|
+
case "toggle": return /* @__PURE__ */ M(L, {
|
|
110
113
|
fields: e.fields || [],
|
|
111
114
|
onFilterChange: r,
|
|
112
115
|
className: a
|
|
@@ -114,12 +117,12 @@ function Te({ config: e, objectDef: t, data: n = [], onFilterChange: r, maxVisib
|
|
|
114
117
|
default: return null;
|
|
115
118
|
}
|
|
116
119
|
}
|
|
117
|
-
function
|
|
120
|
+
function ke(e, t, n) {
|
|
118
121
|
return e.map((e) => {
|
|
119
|
-
let r = e.options ? [...e.options] : [];
|
|
120
|
-
if (
|
|
122
|
+
let r = e.options ? [...e.options] : [], i = e.type, a, o, s;
|
|
123
|
+
if (t?.fields) {
|
|
121
124
|
let n = Array.isArray(t.fields) ? t.fields.find((t) => t.name === e.field) : t.fields[e.field];
|
|
122
|
-
n
|
|
125
|
+
n && (i ||= n.type, a = n.reference_to ?? n.reference, o = n.display_field ?? n.reference_field, s = n.id_field, r.length === 0 && n.options && (r = Array.isArray(n.options) ? n.options.map((e) => ({
|
|
123
126
|
label: e.label ?? String(e.value ?? e),
|
|
124
127
|
value: e.value ?? e,
|
|
125
128
|
color: e.color
|
|
@@ -127,24 +130,34 @@ function R(e, t, n) {
|
|
|
127
130
|
label: t?.label || e,
|
|
128
131
|
value: e,
|
|
129
132
|
color: t?.color
|
|
130
|
-
})));
|
|
133
|
+
}))));
|
|
131
134
|
}
|
|
132
|
-
return
|
|
135
|
+
return r.length === 0 && i === "boolean" && (r = [{
|
|
136
|
+
label: "True",
|
|
137
|
+
value: !0
|
|
138
|
+
}, {
|
|
139
|
+
label: "False",
|
|
140
|
+
value: !1
|
|
141
|
+
}]), e.showCount && n.length > 0 && (r = r.map((t) => ({
|
|
133
142
|
...t,
|
|
134
143
|
count: n.filter((n) => n[e.field] === t.value).length
|
|
135
144
|
}))), {
|
|
136
145
|
...e,
|
|
137
|
-
|
|
146
|
+
type: i,
|
|
147
|
+
options: r,
|
|
148
|
+
referenceTo: a,
|
|
149
|
+
displayField: o,
|
|
150
|
+
idField: s
|
|
138
151
|
};
|
|
139
152
|
});
|
|
140
153
|
}
|
|
141
|
-
function
|
|
154
|
+
function Ae({ fields: e, objectDef: t, data: n, onFilterChange: r, maxVisible: i, className: o }) {
|
|
142
155
|
let [s, c] = a.useState(() => {
|
|
143
156
|
let t = {};
|
|
144
157
|
return e.forEach((e) => {
|
|
145
158
|
e.defaultValues && e.defaultValues.length > 0 && (t[e.field] = e.defaultValues);
|
|
146
159
|
}), t;
|
|
147
|
-
}), l = a.useMemo(() =>
|
|
160
|
+
}), l = a.useMemo(() => ke(e, t, n), [
|
|
148
161
|
e,
|
|
149
162
|
t,
|
|
150
163
|
n
|
|
@@ -165,40 +178,61 @@ function z({ fields: e, objectDef: t, data: n, onFilterChange: r, maxVisible: i,
|
|
|
165
178
|
Object.values(s).some((e) => e.length > 0) && u(s);
|
|
166
179
|
}, []);
|
|
167
180
|
let f = i !== void 0 && i < l.length ? l.slice(0, i) : l, p = i !== void 0 && i < l.length ? l.slice(i) : [], m = (e) => {
|
|
168
|
-
let t = s[e.field] || [], n = t.length > 0;
|
|
169
|
-
return /* @__PURE__ */
|
|
181
|
+
let t = s[e.field] || [], n = t.length > 0, r = De.has(e.type || "") && e.options.length === 0 && (e.referenceTo || e.type === "user" || e.type === "owner"), i = r ? "w-72" : "w-56";
|
|
182
|
+
return /* @__PURE__ */ N(g, { children: [/* @__PURE__ */ M(v, {
|
|
170
183
|
asChild: !0,
|
|
171
|
-
children: /* @__PURE__ */
|
|
184
|
+
children: /* @__PURE__ */ N("button", {
|
|
172
185
|
"data-testid": `filter-badge-${e.field}`,
|
|
173
|
-
className:
|
|
186
|
+
className: b("inline-flex items-center gap-1 rounded-full border h-7 px-2.5 text-xs font-medium transition-colors shrink-0", n ? "border-primary/30 bg-primary/5 text-primary" : "border-border bg-background hover:bg-accent text-foreground"),
|
|
174
187
|
children: [
|
|
175
|
-
/* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ M("span", {
|
|
176
189
|
className: "truncate max-w-[100px]",
|
|
177
190
|
children: e.label || e.field
|
|
178
191
|
}),
|
|
179
|
-
n && /* @__PURE__ */
|
|
192
|
+
n && /* @__PURE__ */ M("span", {
|
|
180
193
|
className: "flex h-4 min-w-[16px] items-center justify-center rounded-full bg-primary/10 text-[10px]",
|
|
181
194
|
children: t.length
|
|
182
195
|
}),
|
|
183
|
-
n ? /* @__PURE__ */
|
|
196
|
+
n ? /* @__PURE__ */ M(pe, {
|
|
184
197
|
className: "h-3 w-3 opacity-60",
|
|
185
198
|
"data-testid": `filter-clear-${e.field}`,
|
|
186
199
|
onClick: (t) => {
|
|
187
200
|
t.stopPropagation(), d(e.field, []);
|
|
188
201
|
}
|
|
189
|
-
}) : /* @__PURE__ */
|
|
202
|
+
}) : /* @__PURE__ */ M(C, { className: "h-3 w-3 opacity-60" })
|
|
190
203
|
]
|
|
191
204
|
})
|
|
192
|
-
}), /* @__PURE__ */
|
|
205
|
+
}), /* @__PURE__ */ M(_, {
|
|
193
206
|
align: "start",
|
|
194
|
-
className: "
|
|
195
|
-
children: /* @__PURE__ */
|
|
207
|
+
className: b(i, "p-2"),
|
|
208
|
+
children: r ? /* @__PURE__ */ M("div", {
|
|
209
|
+
"data-testid": `filter-lookup-${e.field}`,
|
|
210
|
+
children: /* @__PURE__ */ M(h, {
|
|
211
|
+
field: {
|
|
212
|
+
value: e.field,
|
|
213
|
+
label: e.label || e.field,
|
|
214
|
+
type: e.type,
|
|
215
|
+
referenceTo: e.referenceTo,
|
|
216
|
+
displayField: e.displayField,
|
|
217
|
+
idField: e.idField
|
|
218
|
+
},
|
|
219
|
+
value: t,
|
|
220
|
+
multiple: !0,
|
|
221
|
+
onChange: (t) => {
|
|
222
|
+
let n = Array.isArray(t) ? t : t == null || t === "" ? [] : [t];
|
|
223
|
+
d(e.field, n);
|
|
224
|
+
}
|
|
225
|
+
})
|
|
226
|
+
}) : /* @__PURE__ */ M("div", {
|
|
196
227
|
className: "max-h-60 overflow-y-auto space-y-0.5",
|
|
197
228
|
"data-testid": `filter-options-${e.field}`,
|
|
198
|
-
children: e.options.
|
|
199
|
-
className:
|
|
229
|
+
children: e.options.length === 0 ? /* @__PURE__ */ M("div", {
|
|
230
|
+
className: "px-2 py-3 text-center text-xs text-muted-foreground",
|
|
231
|
+
children: "No options"
|
|
232
|
+
}) : e.options.map((n) => /* @__PURE__ */ N("label", {
|
|
233
|
+
className: b("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"),
|
|
200
234
|
children: [
|
|
201
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ M("input", {
|
|
202
236
|
type: "checkbox",
|
|
203
237
|
checked: t.includes(n.value),
|
|
204
238
|
onChange: () => {
|
|
@@ -207,15 +241,15 @@ function z({ fields: e, objectDef: t, data: n, onFilterChange: r, maxVisible: i,
|
|
|
207
241
|
},
|
|
208
242
|
className: "rounded border-input"
|
|
209
243
|
}),
|
|
210
|
-
n.color && /* @__PURE__ */
|
|
244
|
+
n.color && /* @__PURE__ */ M("span", {
|
|
211
245
|
className: "h-2.5 w-2.5 rounded-full shrink-0",
|
|
212
246
|
style: { backgroundColor: n.color }
|
|
213
247
|
}),
|
|
214
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ M("span", {
|
|
215
249
|
className: "truncate flex-1",
|
|
216
250
|
children: n.label
|
|
217
251
|
}),
|
|
218
|
-
n.count !== void 0 && /* @__PURE__ */
|
|
252
|
+
n.count !== void 0 && /* @__PURE__ */ M("span", {
|
|
219
253
|
className: "text-xs text-muted-foreground",
|
|
220
254
|
children: n.count
|
|
221
255
|
})
|
|
@@ -224,39 +258,39 @@ function z({ fields: e, objectDef: t, data: n, onFilterChange: r, maxVisible: i,
|
|
|
224
258
|
})
|
|
225
259
|
})] }, e.field);
|
|
226
260
|
};
|
|
227
|
-
return /* @__PURE__ */
|
|
228
|
-
className:
|
|
261
|
+
return /* @__PURE__ */ N("div", {
|
|
262
|
+
className: b("flex items-center gap-1 overflow-x-auto", o),
|
|
229
263
|
"data-testid": "user-filters-dropdown",
|
|
230
|
-
children: [/* @__PURE__ */
|
|
264
|
+
children: [/* @__PURE__ */ M(fe, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }), l.length === 0 ? /* @__PURE__ */ M("span", {
|
|
231
265
|
className: "text-xs text-muted-foreground",
|
|
232
266
|
"data-testid": "user-filters-empty",
|
|
233
267
|
children: "No filter fields"
|
|
234
|
-
}) : /* @__PURE__ */
|
|
268
|
+
}) : /* @__PURE__ */ N(he, { children: [f.map(m), p.length > 0 && /* @__PURE__ */ N(g, { children: [/* @__PURE__ */ M(v, {
|
|
235
269
|
asChild: !0,
|
|
236
|
-
children: /* @__PURE__ */
|
|
270
|
+
children: /* @__PURE__ */ N("button", {
|
|
237
271
|
"data-testid": "user-filters-more",
|
|
238
272
|
className: "inline-flex items-center gap-1 rounded-full border border-border bg-background hover:bg-accent text-foreground h-7 px-2.5 text-xs font-medium transition-colors shrink-0",
|
|
239
273
|
children: [
|
|
240
|
-
/* @__PURE__ */
|
|
241
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ M("span", { children: "More" }),
|
|
275
|
+
/* @__PURE__ */ M("span", {
|
|
242
276
|
className: "flex h-4 min-w-[16px] items-center justify-center rounded-full bg-muted text-[10px] font-medium",
|
|
243
277
|
children: p.length
|
|
244
278
|
}),
|
|
245
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ M(C, { className: "h-3 w-3 opacity-60" })
|
|
246
280
|
]
|
|
247
281
|
})
|
|
248
|
-
}), /* @__PURE__ */
|
|
282
|
+
}), /* @__PURE__ */ M(_, {
|
|
249
283
|
align: "start",
|
|
250
284
|
className: "w-64 p-2",
|
|
251
285
|
"data-testid": "user-filters-more-content",
|
|
252
|
-
children: /* @__PURE__ */
|
|
286
|
+
children: /* @__PURE__ */ M("div", {
|
|
253
287
|
className: "space-y-1",
|
|
254
288
|
children: p.map(m)
|
|
255
289
|
})
|
|
256
290
|
})] })] })]
|
|
257
291
|
});
|
|
258
292
|
}
|
|
259
|
-
function
|
|
293
|
+
function je({ tabs: e, showAllRecords: t, allowAddTab: n, onFilterChange: r, className: i }) {
|
|
260
294
|
let [o, s] = a.useState(() => e.find((e) => e.default)?.id || (t ? "__all__" : e[0]?.id || "")), c = a.useCallback((t) => {
|
|
261
295
|
s(t), r(t === "__all__" ? [] : e.find((e) => e.id === t)?.filters || []);
|
|
262
296
|
}, [e, r]), l = a.useMemo(() => {
|
|
@@ -270,23 +304,23 @@ function Ee({ tabs: e, showAllRecords: t, allowAddTab: n, onFilterChange: r, cla
|
|
|
270
304
|
return a.useEffect(() => {
|
|
271
305
|
let t = e.find((e) => e.default);
|
|
272
306
|
t && r(t.filters || []);
|
|
273
|
-
}, []), /* @__PURE__ */
|
|
274
|
-
className:
|
|
307
|
+
}, []), /* @__PURE__ */ N("div", {
|
|
308
|
+
className: b("flex items-center gap-0.5 overflow-x-auto", i),
|
|
275
309
|
"data-testid": "user-filters-tabs",
|
|
276
|
-
children: [l.map((e) => /* @__PURE__ */
|
|
310
|
+
children: [l.map((e) => /* @__PURE__ */ M("button", {
|
|
277
311
|
"data-testid": `filter-tab-${e.id}`,
|
|
278
312
|
onClick: () => c(e.id),
|
|
279
|
-
className:
|
|
313
|
+
className: b("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"),
|
|
280
314
|
children: e.label
|
|
281
|
-
}, e.id)), n && /* @__PURE__ */
|
|
315
|
+
}, e.id)), n && /* @__PURE__ */ M("button", {
|
|
282
316
|
className: "inline-flex items-center justify-center h-7 w-7 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted shrink-0",
|
|
283
317
|
"data-testid": "filter-tab-add",
|
|
284
318
|
title: "Add filter tab",
|
|
285
|
-
children: /* @__PURE__ */
|
|
319
|
+
children: /* @__PURE__ */ M(j, { className: "h-3.5 w-3.5" })
|
|
286
320
|
})]
|
|
287
321
|
});
|
|
288
322
|
}
|
|
289
|
-
function
|
|
323
|
+
function L({ fields: e, onFilterChange: t, className: n }) {
|
|
290
324
|
let [r, i] = a.useState(() => {
|
|
291
325
|
let t = /* @__PURE__ */ new Set();
|
|
292
326
|
return e.forEach((e) => {
|
|
@@ -313,10 +347,10 @@ function De({ fields: e, onFilterChange: t, className: n }) {
|
|
|
313
347
|
};
|
|
314
348
|
return a.useEffect(() => {
|
|
315
349
|
r.size > 0 && o(r);
|
|
316
|
-
}, []), /* @__PURE__ */
|
|
317
|
-
className:
|
|
350
|
+
}, []), /* @__PURE__ */ M("div", {
|
|
351
|
+
className: b("flex items-center gap-1 overflow-x-auto", n),
|
|
318
352
|
"data-testid": "user-filters-toggle",
|
|
319
|
-
children: e.map((e) => /* @__PURE__ */
|
|
353
|
+
children: e.map((e) => /* @__PURE__ */ M(d, {
|
|
320
354
|
variant: r.has(e.field) ? "default" : "outline",
|
|
321
355
|
size: "sm",
|
|
322
356
|
className: "h-7 px-3 text-xs shrink-0",
|
|
@@ -328,7 +362,7 @@ function De({ fields: e, onFilterChange: t, className: n }) {
|
|
|
328
362
|
}
|
|
329
363
|
//#endregion
|
|
330
364
|
//#region src/ListView.tsx
|
|
331
|
-
function
|
|
365
|
+
function R(e) {
|
|
332
366
|
switch (e) {
|
|
333
367
|
case "equals":
|
|
334
368
|
case "eq": return "=";
|
|
@@ -352,10 +386,10 @@ function Oe(e) {
|
|
|
352
386
|
default: return e;
|
|
353
387
|
}
|
|
354
388
|
}
|
|
355
|
-
function
|
|
389
|
+
function z(e) {
|
|
356
390
|
if (!Array.isArray(e) || e.length < 3) return e;
|
|
357
391
|
let [t, n, r] = e;
|
|
358
|
-
return typeof t == "string" && (t === "and" || t === "or") ? [t, ...e.slice(1).map((e) => Array.isArray(e) ?
|
|
392
|
+
return typeof t == "string" && (t === "and" || t === "or") ? [t, ...e.slice(1).map((e) => Array.isArray(e) ? z(e) : e)] : n === "in" && Array.isArray(r) ? r.length === 0 ? [] : r.length === 1 ? [
|
|
359
393
|
t,
|
|
360
394
|
"=",
|
|
361
395
|
r[0]
|
|
@@ -373,15 +407,15 @@ function B(e) {
|
|
|
373
407
|
e
|
|
374
408
|
])] : e;
|
|
375
409
|
}
|
|
376
|
-
function
|
|
410
|
+
function Me(e) {
|
|
377
411
|
return e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
|
|
378
412
|
}
|
|
379
|
-
function
|
|
380
|
-
return !Array.isArray(e) || e.length === 0 ? [] : e.map((e) => Array.isArray(e) ?
|
|
413
|
+
function Ne(e) {
|
|
414
|
+
return !Array.isArray(e) || e.length === 0 ? [] : e.map((e) => Array.isArray(e) ? z(e) : e).filter((e) => Array.isArray(e) && e.length > 0);
|
|
381
415
|
}
|
|
382
|
-
function
|
|
416
|
+
function Pe(e) {
|
|
383
417
|
if (!e || !e.conditions || e.conditions.length === 0) return [];
|
|
384
|
-
let t =
|
|
418
|
+
let t = Ne(e.conditions.map((e) => e.operator === "isEmpty" ? [
|
|
385
419
|
e.field,
|
|
386
420
|
"=",
|
|
387
421
|
null
|
|
@@ -391,12 +425,12 @@ function je(e) {
|
|
|
391
425
|
null
|
|
392
426
|
] : [
|
|
393
427
|
e.field,
|
|
394
|
-
|
|
428
|
+
R(e.operator),
|
|
395
429
|
e.value
|
|
396
430
|
]));
|
|
397
431
|
return t.length === 0 ? [] : t.length === 1 ? t[0] : [e.logic, ...t];
|
|
398
432
|
}
|
|
399
|
-
function
|
|
433
|
+
function Fe(e, t) {
|
|
400
434
|
if (!t || t.length === 0) return {};
|
|
401
435
|
for (let r of t) {
|
|
402
436
|
let t = !1, i = ("condition" in r ? r.condition : void 0) || ("expression" in r ? r.expression : void 0) || void 0;
|
|
@@ -431,7 +465,7 @@ function V(e, t) {
|
|
|
431
465
|
}
|
|
432
466
|
return {};
|
|
433
467
|
}
|
|
434
|
-
var
|
|
468
|
+
var B = {
|
|
435
469
|
"list.recordCount": "{{count}} records",
|
|
436
470
|
"list.recordCountOne": "{{count}} record",
|
|
437
471
|
"list.noItems": "No items found",
|
|
@@ -462,35 +496,35 @@ var H = {
|
|
|
462
496
|
"list.print": "Print",
|
|
463
497
|
"list.hideFieldsTitle": "Hide Fields"
|
|
464
498
|
};
|
|
465
|
-
function
|
|
499
|
+
function Ie() {
|
|
466
500
|
try {
|
|
467
|
-
let e =
|
|
501
|
+
let e = P();
|
|
468
502
|
return e.t("list.recordCount") === "list.recordCount" ? { t: (e, t) => {
|
|
469
|
-
let n =
|
|
503
|
+
let n = B[e] || e;
|
|
470
504
|
if (t) for (let [e, r] of Object.entries(t)) n = n.replace(`{{${e}}}`, String(r));
|
|
471
505
|
return n;
|
|
472
506
|
} } : { t: e.t };
|
|
473
507
|
} catch {
|
|
474
508
|
return { t: (e, t) => {
|
|
475
|
-
let n =
|
|
509
|
+
let n = B[e] || e;
|
|
476
510
|
if (t) for (let [e, r] of Object.entries(t)) n = n.replace(`{{${e}}}`, String(r));
|
|
477
511
|
return n;
|
|
478
512
|
} };
|
|
479
513
|
}
|
|
480
514
|
}
|
|
481
|
-
function
|
|
515
|
+
function Le() {
|
|
482
516
|
try {
|
|
483
|
-
let { fieldLabel: e } =
|
|
517
|
+
let { fieldLabel: e } = Se();
|
|
484
518
|
return { fieldLabel: e };
|
|
485
519
|
} catch {
|
|
486
520
|
return { fieldLabel: (e, t, n) => n };
|
|
487
521
|
}
|
|
488
522
|
}
|
|
489
|
-
var
|
|
490
|
-
let { t: x } =
|
|
523
|
+
var V = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange: s, onSortChange: c, onSearchChange: l, onRowClick: u, showViewSwitcher: f = !1, ...p }, h) => {
|
|
524
|
+
let { t: x } = Ie(), { fieldLabel: S } = Le(), C = a.useMemo(() => ({
|
|
491
525
|
...e,
|
|
492
526
|
viewType: e.viewType || "grid"
|
|
493
|
-
}), [e]),
|
|
527
|
+
}), [e]), w = a.useCallback((e, t) => C.objectName ? S(C.objectName, e, t) : t, [C.objectName, S]), E = a.useMemo(() => {
|
|
494
528
|
let e = C.userActions, t = C.addRecord?.enabled === !0 && e?.addRecordForm !== !1;
|
|
495
529
|
return {
|
|
496
530
|
showSearch: e?.search === void 0 ? C.showSearch !== !1 : e.search,
|
|
@@ -514,7 +548,7 @@ var U = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
|
|
|
514
548
|
C.showColor,
|
|
515
549
|
C.addRecord,
|
|
516
550
|
C.userActions?.addRecordForm
|
|
517
|
-
]), [
|
|
551
|
+
]), [D, k] = a.useState(C.viewType), [A, se] = a.useState(""), [he, _e] = a.useState(!1), [ve, Se] = a.useState(!1), [P, Ce] = a.useState(() => C.sort && C.sort.length > 0 ? C.sort.map((e) => {
|
|
518
552
|
if (typeof e == "string") {
|
|
519
553
|
let t = e.trim().split(/\s+/);
|
|
520
554
|
return {
|
|
@@ -528,39 +562,39 @@ var U = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
|
|
|
528
562
|
field: e.field,
|
|
529
563
|
order: e.order || "asc"
|
|
530
564
|
};
|
|
531
|
-
}) : []), [
|
|
565
|
+
}) : []), [F, Te] = a.useState(!1), [I, De] = a.useState({
|
|
532
566
|
id: "root",
|
|
533
567
|
logic: "and",
|
|
534
568
|
conditions: []
|
|
535
|
-
}), [
|
|
569
|
+
}), [ke, Ae] = a.useState(() => {
|
|
536
570
|
if (!(!C.tabs || C.tabs.length === 0)) return C.tabs.find((e) => e.isDefault)?.name ?? C.tabs[0]?.name;
|
|
537
|
-
}),
|
|
538
|
-
if (
|
|
571
|
+
}), je = a.useCallback((e) => {
|
|
572
|
+
if (Ae(e.name), e.filter) {
|
|
539
573
|
let t = {
|
|
540
574
|
id: `tab-filter-${e.name}`,
|
|
541
575
|
logic: e.filter.logic || "and",
|
|
542
576
|
conditions: e.filter.conditions || []
|
|
543
577
|
};
|
|
544
|
-
|
|
578
|
+
De(t), s?.(t);
|
|
545
579
|
} else {
|
|
546
580
|
let e = {
|
|
547
581
|
id: "root",
|
|
548
582
|
logic: "and",
|
|
549
583
|
conditions: []
|
|
550
584
|
};
|
|
551
|
-
|
|
585
|
+
De(e), s?.(e);
|
|
552
586
|
}
|
|
553
|
-
}, [s]),
|
|
554
|
-
a.useImperativeHandle(
|
|
555
|
-
if (!(!
|
|
556
|
-
e.resource === C.objectName &&
|
|
587
|
+
}, [s]), L = p.dataSource, [R, z] = a.useState([]), [Fe, B] = a.useState(!1), [V, Re] = a.useState(null), [ze, H] = a.useState(!1), [Be, Ve] = a.useState(0), [He, Ue] = a.useState(!1);
|
|
588
|
+
a.useImperativeHandle(h, () => ({ refresh: () => Ve((e) => e + 1) }), []), a.useEffect(() => {
|
|
589
|
+
if (!(!L?.onMutation || !C.objectName || C.refreshTrigger)) return L.onMutation((e) => {
|
|
590
|
+
e.resource === C.objectName && Ve((e) => e + 1);
|
|
557
591
|
});
|
|
558
592
|
}, [
|
|
559
|
-
|
|
593
|
+
L,
|
|
560
594
|
C.objectName,
|
|
561
595
|
C.refreshTrigger
|
|
562
596
|
]);
|
|
563
|
-
let [
|
|
597
|
+
let [We, Ge] = a.useState(void 0), U = We ?? C.pagination?.pageSize ?? 100, W = a.useMemo(() => {
|
|
564
598
|
if (C.grouping?.fields?.length) return C.grouping;
|
|
565
599
|
let e = typeof C.groupBy == "string" ? C.groupBy.trim() : "", t = typeof C.groupBy2 == "string" ? C.groupBy2.trim() : "", n = [];
|
|
566
600
|
return e && n.push({
|
|
@@ -576,110 +610,110 @@ var U = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
|
|
|
576
610
|
C.grouping,
|
|
577
611
|
C.groupBy,
|
|
578
612
|
C.groupBy2
|
|
579
|
-
]), [
|
|
613
|
+
]), [G, Ke] = a.useState(W), [qe, Je] = a.useState(!1), Ye = a.useRef(W);
|
|
580
614
|
a.useEffect(() => {
|
|
581
|
-
|
|
582
|
-
}, [
|
|
583
|
-
let [
|
|
615
|
+
Ye.current !== W && (Ye.current = W, Ke(W));
|
|
616
|
+
}, [W]);
|
|
617
|
+
let [K, Xe] = a.useState(C.rowColor), [Ze, Qe] = a.useState(!1), [$e, et] = a.useState([]), q = a.useRef(0), [J, tt] = a.useState(() => {
|
|
584
618
|
let e = /* @__PURE__ */ new Set();
|
|
585
619
|
return C.quickFilters?.forEach((t) => {
|
|
586
620
|
let n = r(t);
|
|
587
621
|
n.defaultActive && e.add(n.id);
|
|
588
622
|
}), e;
|
|
589
|
-
}), [
|
|
623
|
+
}), [nt, rt] = a.useState([]), it = a.useMemo(() => {
|
|
590
624
|
if (C.userFilters) return C.userFilters;
|
|
591
|
-
if (!
|
|
625
|
+
if (!V?.fields) return;
|
|
592
626
|
let e = new Set([
|
|
593
627
|
"select",
|
|
594
628
|
"multi-select",
|
|
595
629
|
"boolean"
|
|
596
|
-
]), t = [], n = Array.isArray(
|
|
630
|
+
]), t = [], n = Array.isArray(V.fields) ? V.fields.map((e) => [e.name, e]) : Object.entries(V.fields);
|
|
597
631
|
for (let [r, i] of n) (e.has(i.type) || i.options && !i.type) && t.push({
|
|
598
632
|
field: r,
|
|
599
|
-
label:
|
|
633
|
+
label: w(r, i.label || r),
|
|
600
634
|
type: i.type === "boolean" ? "boolean" : i.type === "multi-select" ? "multi-select" : "select"
|
|
601
635
|
});
|
|
602
636
|
if (t.length !== 0) return {
|
|
603
637
|
element: "dropdown",
|
|
604
638
|
fields: t
|
|
605
639
|
};
|
|
606
|
-
}, [C.userFilters,
|
|
640
|
+
}, [C.userFilters, V]), [Y, at] = a.useState(() => new Set(C.hiddenFields || [])), [ot, st] = a.useState(!1), [ct, lt] = a.useState(!1), X = a.useMemo(() => i(C.quickFilters), [C.quickFilters]), Z = a.useMemo(() => {
|
|
607
641
|
if (C.exportOptions) return Array.isArray(C.exportOptions) ? { formats: C.exportOptions } : C.exportOptions;
|
|
608
|
-
}, [C.exportOptions]),
|
|
642
|
+
}, [C.exportOptions]), Q = ye(a.useMemo(() => C.densityMode ? C.densityMode : C.rowHeight ? {
|
|
609
643
|
compact: "compact",
|
|
610
644
|
short: "compact",
|
|
611
645
|
medium: "comfortable",
|
|
612
646
|
tall: "spacious",
|
|
613
647
|
extra_tall: "spacious"
|
|
614
|
-
}[C.rowHeight] || "comfortable" : "compact", [C.densityMode, C.rowHeight])), { ref: ut, isRefreshing: dt, pullDistance: ft } =
|
|
648
|
+
}[C.rowHeight] || "comfortable" : "compact", [C.densityMode, C.rowHeight])), { ref: ut, isRefreshing: dt, pullDistance: ft } = xe({
|
|
615
649
|
onRefresh: a.useCallback(async () => {
|
|
616
|
-
|
|
650
|
+
Ve((e) => e + 1);
|
|
617
651
|
}, []),
|
|
618
|
-
enabled: !!
|
|
652
|
+
enabled: !!L && !!C.objectName
|
|
619
653
|
}), pt = a.useMemo(() => C.id ? `listview-${C.objectName}-${C.id}-view` : `listview-${C.objectName}-view`, [C.objectName, C.id]);
|
|
620
654
|
a.useEffect(() => {
|
|
621
655
|
let e = !0;
|
|
622
|
-
return
|
|
623
|
-
if (!
|
|
624
|
-
|
|
656
|
+
return H(!1), Re(null), (async () => {
|
|
657
|
+
if (!L || !C.objectName) {
|
|
658
|
+
H(!0);
|
|
625
659
|
return;
|
|
626
660
|
}
|
|
627
|
-
if (typeof
|
|
628
|
-
|
|
661
|
+
if (typeof L.getObjectSchema != "function") {
|
|
662
|
+
H(!0);
|
|
629
663
|
return;
|
|
630
664
|
}
|
|
631
665
|
try {
|
|
632
|
-
let t = await
|
|
633
|
-
e &&
|
|
666
|
+
let t = await L.getObjectSchema(C.objectName);
|
|
667
|
+
e && Re(t);
|
|
634
668
|
} catch (e) {
|
|
635
669
|
console.warn("Failed to fetch object schema for ListView:", e);
|
|
636
670
|
} finally {
|
|
637
|
-
e &&
|
|
671
|
+
e && H(!0);
|
|
638
672
|
}
|
|
639
673
|
})(), () => {
|
|
640
674
|
e = !1;
|
|
641
675
|
};
|
|
642
|
-
}, [C.objectName,
|
|
643
|
-
let mt = a.useMemo(() => t(
|
|
676
|
+
}, [C.objectName, L]);
|
|
677
|
+
let mt = a.useMemo(() => t(V?.fields, C.fields), [V?.fields, C.fields]);
|
|
644
678
|
a.useEffect(() => {
|
|
645
|
-
let e = !0, t = ++
|
|
679
|
+
let e = !0, t = ++q.current;
|
|
646
680
|
if (C.data && typeof C.data == "object" && !Array.isArray(C.data)) {
|
|
647
681
|
let e = C.data;
|
|
648
682
|
if (e.provider === "value" && Array.isArray(e.items)) {
|
|
649
683
|
let t = e.items;
|
|
650
|
-
if (
|
|
651
|
-
let e =
|
|
684
|
+
if (A) {
|
|
685
|
+
let e = A.toLowerCase();
|
|
652
686
|
t = t.filter((t) => Object.values(t).some((t) => t != null && String(t).toLowerCase().includes(e)));
|
|
653
687
|
}
|
|
654
|
-
|
|
688
|
+
z(t), B(!1), Ue(!1);
|
|
655
689
|
return;
|
|
656
690
|
}
|
|
657
691
|
}
|
|
658
692
|
if (Array.isArray(C.data)) {
|
|
659
693
|
let e = C.data;
|
|
660
|
-
if (
|
|
661
|
-
let t =
|
|
694
|
+
if (A) {
|
|
695
|
+
let t = A.toLowerCase();
|
|
662
696
|
e = e.filter((e) => Object.values(e).some((e) => e != null && String(e).toLowerCase().includes(t)));
|
|
663
697
|
}
|
|
664
|
-
|
|
698
|
+
z(e), B(!1), Ue(!1);
|
|
665
699
|
return;
|
|
666
700
|
}
|
|
667
|
-
return
|
|
668
|
-
if (!(!
|
|
669
|
-
|
|
701
|
+
return ze ? ((async () => {
|
|
702
|
+
if (!(!L || !C.objectName)) {
|
|
703
|
+
B(!0);
|
|
670
704
|
try {
|
|
671
|
-
let n = [], r = C.filters || [], i =
|
|
672
|
-
|
|
673
|
-
|
|
705
|
+
let n = [], r = C.filters || [], i = Pe(I), a = [];
|
|
706
|
+
X && J.size > 0 && X.forEach((e) => {
|
|
707
|
+
J.has(e.id) && e.filters && e.filters.length > 0 && a.push(e.filters);
|
|
674
708
|
});
|
|
675
|
-
let o =
|
|
709
|
+
let o = Ne(nt), s = [
|
|
676
710
|
...r.length > 0 ? [r] : [],
|
|
677
711
|
...i.length > 0 ? [i] : [],
|
|
678
712
|
...a,
|
|
679
713
|
...o
|
|
680
714
|
].filter((e) => Array.isArray(e) && e.length > 0);
|
|
681
715
|
s.length > 1 ? n = ["and", ...s] : s.length === 1 && (n = s[0]);
|
|
682
|
-
let c =
|
|
716
|
+
let c = P.length > 0 ? P.filter((e) => e.field).map((e) => ({
|
|
683
717
|
field: e.field,
|
|
684
718
|
order: e.order
|
|
685
719
|
})) : void 0, l = (() => {
|
|
@@ -712,24 +746,24 @@ var U = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
|
|
|
712
746
|
for (let e of n) typeof e == "string" && e && t.add(e);
|
|
713
747
|
};
|
|
714
748
|
return n(C.kanban), n(C.options?.kanban), n(C.calendar), n(C.options?.calendar), n(C.gallery), n(C.options?.gallery), n(C.timeline), n(C.options?.timeline), n(C.gantt), n(C.options?.gantt), Array.from(t);
|
|
715
|
-
})(), u = Array.isArray(n) ? n.length > 0 : !!n && Object.keys(n).length > 0, d = await
|
|
749
|
+
})(), u = Array.isArray(n) ? n.length > 0 : !!n && Object.keys(n).length > 0, d = await L.find(C.objectName, {
|
|
716
750
|
...u ? { $filter: n } : {},
|
|
717
751
|
$orderby: c,
|
|
718
|
-
$top:
|
|
752
|
+
$top: U,
|
|
719
753
|
...l ? { $select: l } : {},
|
|
720
754
|
...mt.length > 0 ? { $expand: mt } : {},
|
|
721
|
-
...
|
|
722
|
-
$search:
|
|
755
|
+
...A ? {
|
|
756
|
+
$search: A,
|
|
723
757
|
...C.searchableFields && C.searchableFields.length > 0 ? { $searchFields: C.searchableFields } : {}
|
|
724
758
|
} : {}
|
|
725
759
|
});
|
|
726
|
-
if (!e || t !==
|
|
760
|
+
if (!e || t !== q.current) return;
|
|
727
761
|
let f = [];
|
|
728
|
-
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)),
|
|
762
|
+
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)), z(f), Ue(f.length >= U);
|
|
729
763
|
} catch (e) {
|
|
730
|
-
t ===
|
|
764
|
+
t === q.current && console.error("ListView data fetch error:", e);
|
|
731
765
|
} finally {
|
|
732
|
-
e && t ===
|
|
766
|
+
e && t === q.current && B(!1);
|
|
733
767
|
}
|
|
734
768
|
}
|
|
735
769
|
})(), () => {
|
|
@@ -738,19 +772,19 @@ var U = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
|
|
|
738
772
|
}, [
|
|
739
773
|
C.objectName,
|
|
740
774
|
C.data,
|
|
741
|
-
|
|
775
|
+
L,
|
|
742
776
|
C.filters,
|
|
743
|
-
|
|
777
|
+
U,
|
|
778
|
+
P,
|
|
744
779
|
I,
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
M,
|
|
780
|
+
J,
|
|
781
|
+
X,
|
|
782
|
+
nt,
|
|
783
|
+
Be,
|
|
784
|
+
A,
|
|
751
785
|
C.searchableFields,
|
|
752
786
|
mt,
|
|
753
|
-
|
|
787
|
+
ze,
|
|
754
788
|
C.refreshTrigger
|
|
755
789
|
]);
|
|
756
790
|
let ht = a.useMemo(() => {
|
|
@@ -784,10 +818,10 @@ var U = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
|
|
|
784
818
|
C.appearance?.allowedVisualizations
|
|
785
819
|
]);
|
|
786
820
|
a.useEffect(() => {
|
|
787
|
-
C.viewType &&
|
|
821
|
+
C.viewType && k(C.viewType);
|
|
788
822
|
}, [C.viewType]);
|
|
789
823
|
let gt = a.useCallback((e) => {
|
|
790
|
-
|
|
824
|
+
k(e);
|
|
791
825
|
try {
|
|
792
826
|
localStorage.setItem(pt, e);
|
|
793
827
|
} catch (e) {
|
|
@@ -795,17 +829,17 @@ var U = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
|
|
|
795
829
|
}
|
|
796
830
|
o?.(e);
|
|
797
831
|
}, [pt, o]), _t = a.useCallback((e) => {
|
|
798
|
-
|
|
799
|
-
}, [l]), vt =
|
|
832
|
+
se(e), l?.(e);
|
|
833
|
+
}, [l]), vt = be({
|
|
800
834
|
navigation: C.navigation,
|
|
801
835
|
objectName: C.objectName,
|
|
802
836
|
onNavigate: C.onNavigate,
|
|
803
837
|
onRowClick: u
|
|
804
838
|
}), $ = a.useMemo(() => {
|
|
805
839
|
let e = C.fields || [];
|
|
806
|
-
if (Array.isArray(e) || (e = []),
|
|
840
|
+
if (Array.isArray(e) || (e = []), Y.size > 0 && (e = e.filter((e) => {
|
|
807
841
|
let t = typeof e == "string" ? e : e?.name || e?.fieldName || e?.field;
|
|
808
|
-
return t != null && !
|
|
842
|
+
return t != null && !Y.has(t);
|
|
809
843
|
})), C.fieldOrder && C.fieldOrder.length > 0) {
|
|
810
844
|
let t = new Map(C.fieldOrder.map((e, t) => [e, t]));
|
|
811
845
|
e = [...e].sort((e, n) => {
|
|
@@ -816,21 +850,21 @@ var U = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
|
|
|
816
850
|
return e;
|
|
817
851
|
}, [
|
|
818
852
|
C.fields,
|
|
819
|
-
|
|
853
|
+
Y,
|
|
820
854
|
C.fieldOrder
|
|
821
855
|
]), yt = a.useMemo(() => {
|
|
822
856
|
let e = {
|
|
823
857
|
objectName: C.objectName,
|
|
824
858
|
fields: $,
|
|
825
859
|
filters: C.filters,
|
|
826
|
-
sort:
|
|
860
|
+
sort: P,
|
|
827
861
|
className: "h-full w-full",
|
|
828
862
|
showSearch: !1,
|
|
829
863
|
onRowClick: vt.handleClick,
|
|
830
864
|
...C.striped == null ? {} : { striped: C.striped },
|
|
831
865
|
...C.bordered == null ? {} : { bordered: C.bordered }
|
|
832
866
|
};
|
|
833
|
-
switch (
|
|
867
|
+
switch (D) {
|
|
834
868
|
case "grid": return {
|
|
835
869
|
type: "object-grid",
|
|
836
870
|
...e,
|
|
@@ -842,8 +876,8 @@ var U = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
|
|
|
842
876
|
...C.resizable == null ? {} : { resizable: C.resizable },
|
|
843
877
|
...C.selection ? { selection: C.selection } : {},
|
|
844
878
|
...C.pagination ? { pagination: C.pagination } : {},
|
|
845
|
-
...
|
|
846
|
-
...
|
|
879
|
+
...G ? { grouping: G } : {},
|
|
880
|
+
...K ? { rowColor: K } : {},
|
|
847
881
|
...C.rowActions ? { rowActions: C.rowActions } : {},
|
|
848
882
|
...C.bulkActions ? { batchActions: C.bulkActions } : {},
|
|
849
883
|
...C.options?.grid || {}
|
|
@@ -855,7 +889,7 @@ var U = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
|
|
|
855
889
|
groupField: C.kanban?.groupField || C.options?.kanban?.groupField || "status",
|
|
856
890
|
...C.kanban?.titleField || C.options?.kanban?.titleField ? { titleField: C.kanban?.titleField || C.options?.kanban?.titleField } : {},
|
|
857
891
|
cardFields: C.kanban?.cardFields || $ || [],
|
|
858
|
-
...
|
|
892
|
+
...G ? { grouping: G } : {},
|
|
859
893
|
...C.options?.kanban || {},
|
|
860
894
|
...C.kanban || {}
|
|
861
895
|
};
|
|
@@ -881,7 +915,7 @@ var U = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
|
|
|
881
915
|
imageField: C.gallery?.coverField || C.gallery?.imageField || C.options?.gallery?.imageField,
|
|
882
916
|
titleField: C.gallery?.titleField || C.options?.gallery?.titleField || "name",
|
|
883
917
|
subtitleField: C.gallery?.subtitleField || C.options?.gallery?.subtitleField,
|
|
884
|
-
...
|
|
918
|
+
...G ? { grouping: G } : {}
|
|
885
919
|
};
|
|
886
920
|
}
|
|
887
921
|
case "timeline": {
|
|
@@ -921,20 +955,23 @@ var U = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
|
|
|
921
955
|
default: return e;
|
|
922
956
|
}
|
|
923
957
|
}, [
|
|
924
|
-
|
|
958
|
+
D,
|
|
925
959
|
C,
|
|
926
|
-
|
|
960
|
+
P,
|
|
927
961
|
$,
|
|
928
|
-
|
|
929
|
-
|
|
962
|
+
G,
|
|
963
|
+
K,
|
|
930
964
|
vt.handleClick
|
|
931
|
-
]), bt =
|
|
965
|
+
]), bt = I.conditions && I.conditions.length > 0, xt = a.useMemo(() => {
|
|
932
966
|
let e;
|
|
933
|
-
if (e =
|
|
967
|
+
if (e = V?.fields ? Object.entries(V.fields).map(([e, t]) => ({
|
|
934
968
|
value: e,
|
|
935
|
-
label:
|
|
969
|
+
label: w(e, t.label || e),
|
|
936
970
|
type: t.type || "text",
|
|
937
|
-
options: t.options
|
|
971
|
+
options: t.options,
|
|
972
|
+
referenceTo: t.reference_to || t.reference,
|
|
973
|
+
displayField: t.display_field || t.reference_field,
|
|
974
|
+
idField: t.id_field
|
|
938
975
|
})) : (C.fields || []).map((e) => {
|
|
939
976
|
if (typeof e == "string") return {
|
|
940
977
|
value: e,
|
|
@@ -944,9 +981,12 @@ var U = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
|
|
|
944
981
|
let t = e.name || e.fieldName;
|
|
945
982
|
return {
|
|
946
983
|
value: t,
|
|
947
|
-
label:
|
|
984
|
+
label: w(t, e.label || e.name),
|
|
948
985
|
type: e.type || "text",
|
|
949
|
-
options: e.options
|
|
986
|
+
options: e.options,
|
|
987
|
+
referenceTo: e.reference_to || e.reference,
|
|
988
|
+
displayField: e.display_field || e.reference_field,
|
|
989
|
+
idField: e.id_field
|
|
950
990
|
};
|
|
951
991
|
}), C.filterableFields && C.filterableFields.length > 0) {
|
|
952
992
|
let t = new Set(C.filterableFields);
|
|
@@ -954,16 +994,16 @@ var U = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
|
|
|
954
994
|
}
|
|
955
995
|
return e;
|
|
956
996
|
}, [
|
|
957
|
-
|
|
997
|
+
V,
|
|
958
998
|
C.fields,
|
|
959
999
|
C.filterableFields
|
|
960
1000
|
]), St = a.useCallback((e) => {
|
|
961
|
-
|
|
1001
|
+
tt((t) => {
|
|
962
1002
|
let n = new Set(t);
|
|
963
1003
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
964
1004
|
});
|
|
965
1005
|
}, []), Ct = a.useCallback((e) => {
|
|
966
|
-
let t =
|
|
1006
|
+
let t = Z, n = t?.maxRecords || 0, r = t?.includeHeaders !== !1, i = t?.fileNamePrefix || C.objectName || "export", a = n > 0 ? R.slice(0, n) : R;
|
|
967
1007
|
if (e === "csv") {
|
|
968
1008
|
let e = $.map((e) => typeof e == "string" ? e : e.name || e.fieldName || e.field), t = [];
|
|
969
1009
|
r && t.push(e.join(",")), a.forEach((n) => {
|
|
@@ -978,125 +1018,125 @@ var U = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
|
|
|
978
1018
|
let e = new Blob([JSON.stringify(a, null, 2)], { type: "application/json" }), t = URL.createObjectURL(e), n = document.createElement("a");
|
|
979
1019
|
n.href = t, n.download = `${i}.json`, n.click(), URL.revokeObjectURL(t);
|
|
980
1020
|
}
|
|
981
|
-
|
|
1021
|
+
lt(!1);
|
|
982
1022
|
}, [
|
|
983
|
-
|
|
1023
|
+
R,
|
|
984
1024
|
$,
|
|
985
|
-
|
|
1025
|
+
Z,
|
|
986
1026
|
C.objectName
|
|
987
1027
|
]), wt = a.useMemo(() => (C.fields || []).map((e) => {
|
|
988
1028
|
if (typeof e == "string") return {
|
|
989
1029
|
name: e,
|
|
990
|
-
label:
|
|
1030
|
+
label: w(e, e)
|
|
991
1031
|
};
|
|
992
1032
|
let t = e.name || e.fieldName || e.field;
|
|
993
1033
|
return {
|
|
994
1034
|
name: t,
|
|
995
|
-
label:
|
|
1035
|
+
label: w(t, e.label || e.name || e.field)
|
|
996
1036
|
};
|
|
997
|
-
}), [C.fields,
|
|
998
|
-
return /* @__PURE__ */
|
|
1037
|
+
}), [C.fields, w]);
|
|
1038
|
+
return /* @__PURE__ */ N("div", {
|
|
999
1039
|
ref: ut,
|
|
1000
|
-
className:
|
|
1040
|
+
className: b("flex flex-col h-full bg-background relative min-w-0 overflow-hidden", n),
|
|
1001
1041
|
...C.aria?.label ? { "aria-label": C.aria.label } : {},
|
|
1002
1042
|
...C.aria?.describedBy ? { "aria-describedby": C.aria.describedBy } : {},
|
|
1003
1043
|
...C.aria?.live ? { "aria-live": C.aria.live } : {},
|
|
1004
1044
|
role: "region",
|
|
1005
1045
|
children: [
|
|
1006
|
-
ft > 0 && /* @__PURE__ */
|
|
1046
|
+
ft > 0 && /* @__PURE__ */ M("div", {
|
|
1007
1047
|
className: "flex items-center justify-center text-xs text-muted-foreground",
|
|
1008
1048
|
style: { height: ft },
|
|
1009
1049
|
children: x(dt ? "list.refreshing" : "list.pullToRefresh")
|
|
1010
1050
|
}),
|
|
1011
|
-
f && /* @__PURE__ */
|
|
1051
|
+
f && /* @__PURE__ */ M("div", {
|
|
1012
1052
|
className: "border-b px-4 py-1 flex items-center bg-background",
|
|
1013
|
-
children: /* @__PURE__ */
|
|
1014
|
-
currentView:
|
|
1053
|
+
children: /* @__PURE__ */ M(we, {
|
|
1054
|
+
currentView: D,
|
|
1015
1055
|
availableViews: ht,
|
|
1016
1056
|
onViewChange: gt
|
|
1017
1057
|
})
|
|
1018
1058
|
}),
|
|
1019
|
-
C.tabs && C.tabs.length > 0 && /* @__PURE__ */
|
|
1059
|
+
C.tabs && C.tabs.length > 0 && /* @__PURE__ */ M(Ee, {
|
|
1020
1060
|
tabs: C.tabs,
|
|
1021
|
-
activeTab:
|
|
1022
|
-
onTabChange:
|
|
1061
|
+
activeTab: ke,
|
|
1062
|
+
onTabChange: je
|
|
1023
1063
|
}),
|
|
1024
|
-
C.description && C.appearance?.showDescription !== !1 && /* @__PURE__ */
|
|
1064
|
+
C.description && C.appearance?.showDescription !== !1 && /* @__PURE__ */ M("div", {
|
|
1025
1065
|
className: "border-b px-4 py-1.5 text-xs text-muted-foreground bg-background",
|
|
1026
1066
|
"data-testid": "view-description",
|
|
1027
1067
|
children: typeof C.description == "string" ? C.description : ""
|
|
1028
1068
|
}),
|
|
1029
|
-
/* @__PURE__ */
|
|
1069
|
+
/* @__PURE__ */ N("div", {
|
|
1030
1070
|
className: "border-b px-2 sm:px-4 py-1 flex items-center justify-between gap-1 sm:gap-2 bg-background",
|
|
1031
|
-
children: [/* @__PURE__ */
|
|
1071
|
+
children: [/* @__PURE__ */ M("div", {
|
|
1032
1072
|
className: "flex items-center gap-0.5 overflow-x-auto min-w-0",
|
|
1033
|
-
children:
|
|
1073
|
+
children: it && /* @__PURE__ */ M("div", {
|
|
1034
1074
|
className: "shrink-0 min-w-0",
|
|
1035
1075
|
"data-testid": "user-filters",
|
|
1036
|
-
children: /* @__PURE__ */
|
|
1037
|
-
config:
|
|
1038
|
-
objectDef:
|
|
1039
|
-
data:
|
|
1040
|
-
onFilterChange:
|
|
1076
|
+
children: /* @__PURE__ */ M(Oe, {
|
|
1077
|
+
config: it,
|
|
1078
|
+
objectDef: V,
|
|
1079
|
+
data: R,
|
|
1080
|
+
onFilterChange: rt,
|
|
1041
1081
|
maxVisible: 3
|
|
1042
1082
|
})
|
|
1043
1083
|
})
|
|
1044
|
-
}), /* @__PURE__ */
|
|
1084
|
+
}), /* @__PURE__ */ N("div", {
|
|
1045
1085
|
className: "flex items-center gap-0.5 shrink-0",
|
|
1046
1086
|
children: [
|
|
1047
|
-
|
|
1048
|
-
open:
|
|
1049
|
-
onOpenChange:
|
|
1050
|
-
children: [/* @__PURE__ */
|
|
1087
|
+
E.showHideFields && /* @__PURE__ */ N(g, {
|
|
1088
|
+
open: ot,
|
|
1089
|
+
onOpenChange: st,
|
|
1090
|
+
children: [/* @__PURE__ */ M(v, {
|
|
1051
1091
|
asChild: !0,
|
|
1052
|
-
children: /* @__PURE__ */
|
|
1092
|
+
children: /* @__PURE__ */ N(d, {
|
|
1053
1093
|
variant: "ghost",
|
|
1054
1094
|
size: "sm",
|
|
1055
|
-
className:
|
|
1095
|
+
className: b("h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150", Y.size > 0 && "text-primary"),
|
|
1056
1096
|
children: [
|
|
1057
|
-
/* @__PURE__ */
|
|
1058
|
-
/* @__PURE__ */
|
|
1097
|
+
/* @__PURE__ */ M(ae, { className: "h-3.5 w-3.5 mr-1.5" }),
|
|
1098
|
+
/* @__PURE__ */ M("span", {
|
|
1059
1099
|
className: "hidden sm:inline",
|
|
1060
1100
|
children: x("list.hideFields")
|
|
1061
1101
|
}),
|
|
1062
|
-
|
|
1102
|
+
Y.size > 0 && /* @__PURE__ */ M("span", {
|
|
1063
1103
|
className: "ml-1 flex h-4 min-w-[16px] items-center justify-center rounded-full bg-primary/10 text-[10px] font-medium text-primary",
|
|
1064
|
-
children:
|
|
1104
|
+
children: Y.size
|
|
1065
1105
|
})
|
|
1066
1106
|
]
|
|
1067
1107
|
})
|
|
1068
|
-
}), /* @__PURE__ */
|
|
1108
|
+
}), /* @__PURE__ */ M(_, {
|
|
1069
1109
|
align: "start",
|
|
1070
1110
|
className: "w-64 p-3",
|
|
1071
|
-
children: /* @__PURE__ */
|
|
1111
|
+
children: /* @__PURE__ */ N("div", {
|
|
1072
1112
|
className: "space-y-2",
|
|
1073
|
-
children: [/* @__PURE__ */
|
|
1113
|
+
children: [/* @__PURE__ */ N("div", {
|
|
1074
1114
|
className: "flex items-center justify-between border-b pb-2",
|
|
1075
|
-
children: [/* @__PURE__ */
|
|
1115
|
+
children: [/* @__PURE__ */ M("h4", {
|
|
1076
1116
|
className: "font-medium text-sm",
|
|
1077
1117
|
children: x("list.hideFieldsTitle")
|
|
1078
|
-
}),
|
|
1118
|
+
}), Y.size > 0 && /* @__PURE__ */ M(d, {
|
|
1079
1119
|
variant: "ghost",
|
|
1080
1120
|
size: "sm",
|
|
1081
1121
|
className: "h-6 px-2 text-xs",
|
|
1082
|
-
onClick: () =>
|
|
1122
|
+
onClick: () => at(/* @__PURE__ */ new Set()),
|
|
1083
1123
|
children: x("list.showAll")
|
|
1084
1124
|
})]
|
|
1085
|
-
}), /* @__PURE__ */
|
|
1125
|
+
}), /* @__PURE__ */ M("div", {
|
|
1086
1126
|
className: "max-h-60 overflow-y-auto space-y-1",
|
|
1087
|
-
children: wt.map((e) => /* @__PURE__ */
|
|
1127
|
+
children: wt.map((e) => /* @__PURE__ */ N("label", {
|
|
1088
1128
|
className: "flex items-center gap-2 text-sm py-1 px-1 rounded hover:bg-muted cursor-pointer",
|
|
1089
|
-
children: [/* @__PURE__ */
|
|
1129
|
+
children: [/* @__PURE__ */ M("input", {
|
|
1090
1130
|
type: "checkbox",
|
|
1091
|
-
checked: !
|
|
1131
|
+
checked: !Y.has(e.name),
|
|
1092
1132
|
onChange: () => {
|
|
1093
|
-
|
|
1133
|
+
at((t) => {
|
|
1094
1134
|
let n = new Set(t);
|
|
1095
1135
|
return n.has(e.name) ? n.delete(e.name) : n.add(e.name), n;
|
|
1096
1136
|
});
|
|
1097
1137
|
},
|
|
1098
1138
|
className: "rounded border-input"
|
|
1099
|
-
}), /* @__PURE__ */
|
|
1139
|
+
}), /* @__PURE__ */ M("span", {
|
|
1100
1140
|
className: "truncate",
|
|
1101
1141
|
children: e.label
|
|
1102
1142
|
})]
|
|
@@ -1105,92 +1145,92 @@ var U = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
|
|
|
1105
1145
|
})
|
|
1106
1146
|
})]
|
|
1107
1147
|
}),
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
open:
|
|
1111
|
-
onOpenChange:
|
|
1112
|
-
children: [/* @__PURE__ */
|
|
1148
|
+
E.showHideFields && (E.showFilters || E.showSort || E.showGroup) && /* @__PURE__ */ M("div", { className: "h-4 w-px bg-border/60 mx-0.5 shrink-0" }),
|
|
1149
|
+
E.showFilters && /* @__PURE__ */ N(g, {
|
|
1150
|
+
open: F,
|
|
1151
|
+
onOpenChange: Te,
|
|
1152
|
+
children: [/* @__PURE__ */ M(v, {
|
|
1113
1153
|
asChild: !0,
|
|
1114
|
-
children: /* @__PURE__ */
|
|
1154
|
+
children: /* @__PURE__ */ N(d, {
|
|
1115
1155
|
variant: "ghost",
|
|
1116
1156
|
size: "sm",
|
|
1117
|
-
className:
|
|
1157
|
+
className: b("h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150", bt && "bg-primary/10 border border-primary/20 text-primary"),
|
|
1118
1158
|
children: [
|
|
1119
|
-
/* @__PURE__ */
|
|
1120
|
-
/* @__PURE__ */
|
|
1159
|
+
/* @__PURE__ */ M(fe, { className: "h-3.5 w-3.5 mr-1.5" }),
|
|
1160
|
+
/* @__PURE__ */ M("span", {
|
|
1121
1161
|
className: "hidden sm:inline",
|
|
1122
1162
|
children: x("list.filter")
|
|
1123
1163
|
}),
|
|
1124
|
-
bt && /* @__PURE__ */
|
|
1164
|
+
bt && /* @__PURE__ */ M("span", {
|
|
1125
1165
|
className: "ml-1 flex h-4 min-w-[16px] items-center justify-center rounded-full bg-primary/10 text-[10px] font-medium text-primary",
|
|
1126
|
-
children:
|
|
1166
|
+
children: I.conditions?.length || 0
|
|
1127
1167
|
})
|
|
1128
1168
|
]
|
|
1129
1169
|
})
|
|
1130
|
-
}), /* @__PURE__ */
|
|
1170
|
+
}), /* @__PURE__ */ M(_, {
|
|
1131
1171
|
align: "start",
|
|
1132
1172
|
className: "w-[calc(100vw-2rem)] sm:w-[600px] max-w-[600px] p-3 sm:p-4",
|
|
1133
|
-
children: /* @__PURE__ */
|
|
1173
|
+
children: /* @__PURE__ */ N("div", {
|
|
1134
1174
|
className: "space-y-4",
|
|
1135
|
-
children: [/* @__PURE__ */
|
|
1175
|
+
children: [/* @__PURE__ */ M("div", {
|
|
1136
1176
|
className: "flex items-center justify-between border-b pb-2",
|
|
1137
|
-
children: /* @__PURE__ */
|
|
1177
|
+
children: /* @__PURE__ */ M("h4", {
|
|
1138
1178
|
className: "font-medium text-sm",
|
|
1139
1179
|
children: x("list.filterRecords")
|
|
1140
1180
|
})
|
|
1141
|
-
}), /* @__PURE__ */
|
|
1181
|
+
}), /* @__PURE__ */ M(m, {
|
|
1142
1182
|
fields: xt,
|
|
1143
|
-
value:
|
|
1183
|
+
value: I,
|
|
1144
1184
|
onChange: (e) => {
|
|
1145
|
-
|
|
1185
|
+
De(e), s && s(e);
|
|
1146
1186
|
}
|
|
1147
1187
|
})]
|
|
1148
1188
|
})
|
|
1149
1189
|
})]
|
|
1150
1190
|
}),
|
|
1151
|
-
|
|
1152
|
-
open:
|
|
1153
|
-
onOpenChange:
|
|
1154
|
-
children: [/* @__PURE__ */
|
|
1191
|
+
E.showGroup && /* @__PURE__ */ N(g, {
|
|
1192
|
+
open: qe,
|
|
1193
|
+
onOpenChange: Je,
|
|
1194
|
+
children: [/* @__PURE__ */ M(v, {
|
|
1155
1195
|
asChild: !0,
|
|
1156
|
-
children: /* @__PURE__ */
|
|
1196
|
+
children: /* @__PURE__ */ N(d, {
|
|
1157
1197
|
variant: "ghost",
|
|
1158
1198
|
size: "sm",
|
|
1159
|
-
className:
|
|
1199
|
+
className: b("h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150", G && "bg-primary/10 border border-primary/20 text-primary"),
|
|
1160
1200
|
children: [
|
|
1161
|
-
/* @__PURE__ */
|
|
1162
|
-
/* @__PURE__ */
|
|
1201
|
+
/* @__PURE__ */ M(O, { className: "h-3.5 w-3.5 mr-1.5" }),
|
|
1202
|
+
/* @__PURE__ */ M("span", {
|
|
1163
1203
|
className: "hidden sm:inline",
|
|
1164
1204
|
children: x("list.group")
|
|
1165
1205
|
}),
|
|
1166
|
-
|
|
1206
|
+
G && G.fields?.length > 0 && /* @__PURE__ */ M("span", {
|
|
1167
1207
|
className: "ml-1 flex h-4 min-w-[16px] items-center justify-center rounded-full bg-primary/10 text-[10px] font-medium text-primary",
|
|
1168
|
-
children:
|
|
1208
|
+
children: G.fields.length
|
|
1169
1209
|
})
|
|
1170
1210
|
]
|
|
1171
1211
|
})
|
|
1172
|
-
}), /* @__PURE__ */
|
|
1212
|
+
}), /* @__PURE__ */ M(_, {
|
|
1173
1213
|
align: "start",
|
|
1174
1214
|
className: "w-72 p-3",
|
|
1175
|
-
children: /* @__PURE__ */
|
|
1215
|
+
children: /* @__PURE__ */ N("div", {
|
|
1176
1216
|
className: "space-y-2",
|
|
1177
|
-
children: [/* @__PURE__ */
|
|
1217
|
+
children: [/* @__PURE__ */ N("div", {
|
|
1178
1218
|
className: "flex items-center justify-between border-b pb-2",
|
|
1179
|
-
children: [/* @__PURE__ */
|
|
1219
|
+
children: [/* @__PURE__ */ M("h4", {
|
|
1180
1220
|
className: "font-medium text-sm",
|
|
1181
1221
|
children: x("list.groupBy")
|
|
1182
|
-
}),
|
|
1222
|
+
}), G && /* @__PURE__ */ M(d, {
|
|
1183
1223
|
variant: "ghost",
|
|
1184
1224
|
size: "sm",
|
|
1185
1225
|
className: "h-6 px-2 text-xs",
|
|
1186
|
-
onClick: () =>
|
|
1226
|
+
onClick: () => Ke(void 0),
|
|
1187
1227
|
"data-testid": "clear-grouping",
|
|
1188
1228
|
children: x("list.clear")
|
|
1189
1229
|
})]
|
|
1190
|
-
}), /* @__PURE__ */
|
|
1230
|
+
}), /* @__PURE__ */ M("div", {
|
|
1191
1231
|
"data-testid": "group-field-list",
|
|
1192
|
-
children: /* @__PURE__ */
|
|
1193
|
-
value:
|
|
1232
|
+
children: /* @__PURE__ */ M(ee, {
|
|
1233
|
+
value: G,
|
|
1194
1234
|
fieldOptions: wt.map((e) => ({
|
|
1195
1235
|
value: e.name,
|
|
1196
1236
|
label: e.label || e.name
|
|
@@ -1201,108 +1241,108 @@ var U = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
|
|
|
1201
1241
|
collapseTitle: x("list.collapsedByDefault", "Collapsed by default"),
|
|
1202
1242
|
removeTitle: x("list.removeGroup", "Remove")
|
|
1203
1243
|
},
|
|
1204
|
-
onChange: (e) =>
|
|
1244
|
+
onChange: (e) => Ke(e)
|
|
1205
1245
|
})
|
|
1206
1246
|
})]
|
|
1207
1247
|
})
|
|
1208
1248
|
})]
|
|
1209
1249
|
}),
|
|
1210
|
-
|
|
1211
|
-
open:
|
|
1212
|
-
onOpenChange:
|
|
1213
|
-
children: [/* @__PURE__ */
|
|
1250
|
+
E.showSort && /* @__PURE__ */ N(g, {
|
|
1251
|
+
open: ve,
|
|
1252
|
+
onOpenChange: Se,
|
|
1253
|
+
children: [/* @__PURE__ */ M(v, {
|
|
1214
1254
|
asChild: !0,
|
|
1215
|
-
children: /* @__PURE__ */
|
|
1255
|
+
children: /* @__PURE__ */ N(d, {
|
|
1216
1256
|
variant: "ghost",
|
|
1217
1257
|
size: "sm",
|
|
1218
|
-
className:
|
|
1258
|
+
className: b("h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150", P.length > 0 && "bg-primary/10 border border-primary/20 text-primary"),
|
|
1219
1259
|
children: [
|
|
1220
|
-
/* @__PURE__ */
|
|
1221
|
-
/* @__PURE__ */
|
|
1260
|
+
/* @__PURE__ */ M(ie, { className: "h-3.5 w-3.5 mr-1.5" }),
|
|
1261
|
+
/* @__PURE__ */ M("span", {
|
|
1222
1262
|
className: "hidden sm:inline",
|
|
1223
1263
|
children: x("list.sort")
|
|
1224
1264
|
}),
|
|
1225
|
-
|
|
1265
|
+
P.length > 0 && /* @__PURE__ */ M("span", {
|
|
1226
1266
|
className: "ml-1 flex h-4 min-w-[16px] items-center justify-center rounded-full bg-primary/10 text-[10px] font-medium text-primary",
|
|
1227
|
-
children:
|
|
1267
|
+
children: P.length
|
|
1228
1268
|
})
|
|
1229
1269
|
]
|
|
1230
1270
|
})
|
|
1231
|
-
}), /* @__PURE__ */
|
|
1271
|
+
}), /* @__PURE__ */ M(_, {
|
|
1232
1272
|
align: "start",
|
|
1233
1273
|
className: "w-[calc(100vw-2rem)] sm:w-[600px] max-w-[600px] p-3 sm:p-4",
|
|
1234
|
-
children: /* @__PURE__ */
|
|
1274
|
+
children: /* @__PURE__ */ N("div", {
|
|
1235
1275
|
className: "space-y-4",
|
|
1236
|
-
children: [/* @__PURE__ */
|
|
1276
|
+
children: [/* @__PURE__ */ M("div", {
|
|
1237
1277
|
className: "flex items-center justify-between border-b pb-2",
|
|
1238
|
-
children: /* @__PURE__ */
|
|
1278
|
+
children: /* @__PURE__ */ M("h4", {
|
|
1239
1279
|
className: "font-medium text-sm",
|
|
1240
1280
|
children: x("list.sortRecords")
|
|
1241
1281
|
})
|
|
1242
|
-
}), /* @__PURE__ */
|
|
1282
|
+
}), /* @__PURE__ */ M(y, {
|
|
1243
1283
|
fields: xt,
|
|
1244
|
-
value:
|
|
1284
|
+
value: P,
|
|
1245
1285
|
onChange: (e) => {
|
|
1246
|
-
|
|
1286
|
+
Ce(e), c && c(e);
|
|
1247
1287
|
}
|
|
1248
1288
|
})]
|
|
1249
1289
|
})
|
|
1250
1290
|
})]
|
|
1251
1291
|
}),
|
|
1252
|
-
(
|
|
1253
|
-
|
|
1254
|
-
open:
|
|
1255
|
-
onOpenChange:
|
|
1256
|
-
children: [/* @__PURE__ */
|
|
1292
|
+
(E.showFilters || E.showSort || E.showGroup) && (E.showColor || E.showDensity) && /* @__PURE__ */ M("div", { className: "h-4 w-px bg-border/60 mx-0.5 shrink-0" }),
|
|
1293
|
+
E.showColor && /* @__PURE__ */ N(g, {
|
|
1294
|
+
open: Ze,
|
|
1295
|
+
onOpenChange: Qe,
|
|
1296
|
+
children: [/* @__PURE__ */ M(v, {
|
|
1257
1297
|
asChild: !0,
|
|
1258
|
-
children: /* @__PURE__ */
|
|
1298
|
+
children: /* @__PURE__ */ N(d, {
|
|
1259
1299
|
variant: "ghost",
|
|
1260
1300
|
size: "sm",
|
|
1261
|
-
className:
|
|
1262
|
-
children: [/* @__PURE__ */
|
|
1301
|
+
className: b("h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150", K && "bg-primary/10 border border-primary/20 text-primary"),
|
|
1302
|
+
children: [/* @__PURE__ */ M(ce, { className: "h-3.5 w-3.5 mr-1.5" }), /* @__PURE__ */ M("span", {
|
|
1263
1303
|
className: "hidden sm:inline",
|
|
1264
1304
|
children: x("list.color")
|
|
1265
1305
|
})]
|
|
1266
1306
|
})
|
|
1267
|
-
}), /* @__PURE__ */
|
|
1307
|
+
}), /* @__PURE__ */ M(_, {
|
|
1268
1308
|
align: "start",
|
|
1269
1309
|
className: "w-64 p-3",
|
|
1270
|
-
children: /* @__PURE__ */
|
|
1310
|
+
children: /* @__PURE__ */ N("div", {
|
|
1271
1311
|
className: "space-y-2",
|
|
1272
|
-
children: [/* @__PURE__ */
|
|
1312
|
+
children: [/* @__PURE__ */ N("div", {
|
|
1273
1313
|
className: "flex items-center justify-between border-b pb-2",
|
|
1274
|
-
children: [/* @__PURE__ */
|
|
1314
|
+
children: [/* @__PURE__ */ M("h4", {
|
|
1275
1315
|
className: "font-medium text-sm",
|
|
1276
1316
|
children: x("list.rowColor")
|
|
1277
|
-
}),
|
|
1317
|
+
}), K && /* @__PURE__ */ M(d, {
|
|
1278
1318
|
variant: "ghost",
|
|
1279
1319
|
size: "sm",
|
|
1280
1320
|
className: "h-6 px-2 text-xs",
|
|
1281
|
-
onClick: () =>
|
|
1321
|
+
onClick: () => Xe(void 0),
|
|
1282
1322
|
"data-testid": "clear-row-color",
|
|
1283
1323
|
children: x("list.clear")
|
|
1284
1324
|
})]
|
|
1285
|
-
}), /* @__PURE__ */
|
|
1325
|
+
}), /* @__PURE__ */ N("div", {
|
|
1286
1326
|
className: "space-y-2",
|
|
1287
1327
|
"data-testid": "color-field-list",
|
|
1288
|
-
children: [/* @__PURE__ */
|
|
1328
|
+
children: [/* @__PURE__ */ M("label", {
|
|
1289
1329
|
className: "text-xs text-muted-foreground",
|
|
1290
1330
|
children: x("list.colorByField")
|
|
1291
|
-
}), /* @__PURE__ */
|
|
1331
|
+
}), /* @__PURE__ */ N("select", {
|
|
1292
1332
|
className: "w-full h-8 rounded border border-input bg-background px-2 text-xs",
|
|
1293
|
-
value:
|
|
1333
|
+
value: K?.field || "",
|
|
1294
1334
|
onChange: (e) => {
|
|
1295
1335
|
let t = e.target.value;
|
|
1296
|
-
|
|
1336
|
+
Xe(t ? {
|
|
1297
1337
|
field: t,
|
|
1298
|
-
colors:
|
|
1338
|
+
colors: K?.colors || {}
|
|
1299
1339
|
} : void 0);
|
|
1300
1340
|
},
|
|
1301
1341
|
"data-testid": "color-field-select",
|
|
1302
|
-
children: [/* @__PURE__ */
|
|
1342
|
+
children: [/* @__PURE__ */ M("option", {
|
|
1303
1343
|
value: "",
|
|
1304
1344
|
children: x("list.none")
|
|
1305
|
-
}), wt.map((e) => /* @__PURE__ */
|
|
1345
|
+
}), wt.map((e) => /* @__PURE__ */ M("option", {
|
|
1306
1346
|
value: e.name,
|
|
1307
1347
|
children: e.label
|
|
1308
1348
|
}, e.name))]
|
|
@@ -1311,119 +1351,119 @@ var U = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
|
|
|
1311
1351
|
})
|
|
1312
1352
|
})]
|
|
1313
1353
|
}),
|
|
1314
|
-
|
|
1354
|
+
E.showDensity && /* @__PURE__ */ N(d, {
|
|
1315
1355
|
variant: "ghost",
|
|
1316
1356
|
size: "sm",
|
|
1317
|
-
className:
|
|
1318
|
-
onClick:
|
|
1319
|
-
title: `Density: ${
|
|
1320
|
-
children: [/* @__PURE__ */
|
|
1357
|
+
className: b("h-7 px-2 text-muted-foreground hover:text-primary text-xs hidden lg:flex transition-colors duration-150", Q.mode !== "compact" && "bg-primary/10 border border-primary/20 text-primary"),
|
|
1358
|
+
onClick: Q.cycle,
|
|
1359
|
+
title: `Density: ${Q.mode}`,
|
|
1360
|
+
children: [/* @__PURE__ */ M(re, { className: "h-3.5 w-3.5 mr-1.5" }), /* @__PURE__ */ M("span", {
|
|
1321
1361
|
className: "hidden sm:inline capitalize",
|
|
1322
|
-
children:
|
|
1362
|
+
children: Q.mode
|
|
1323
1363
|
})]
|
|
1324
1364
|
}),
|
|
1325
|
-
(
|
|
1326
|
-
|
|
1327
|
-
open:
|
|
1328
|
-
onOpenChange:
|
|
1329
|
-
children: [/* @__PURE__ */
|
|
1365
|
+
(E.showColor || E.showDensity) && Z && C.allowExport !== !1 && /* @__PURE__ */ M("div", { className: "h-4 w-px bg-border/60 mx-0.5 shrink-0" }),
|
|
1366
|
+
Z && C.allowExport !== !1 && /* @__PURE__ */ N(g, {
|
|
1367
|
+
open: ct,
|
|
1368
|
+
onOpenChange: lt,
|
|
1369
|
+
children: [/* @__PURE__ */ M(v, {
|
|
1330
1370
|
asChild: !0,
|
|
1331
|
-
children: /* @__PURE__ */
|
|
1371
|
+
children: /* @__PURE__ */ N(d, {
|
|
1332
1372
|
variant: "ghost",
|
|
1333
1373
|
size: "sm",
|
|
1334
1374
|
className: "h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150",
|
|
1335
|
-
children: [/* @__PURE__ */
|
|
1375
|
+
children: [/* @__PURE__ */ M(T, { className: "h-3.5 w-3.5 mr-1.5" }), /* @__PURE__ */ M("span", {
|
|
1336
1376
|
className: "hidden sm:inline",
|
|
1337
1377
|
children: x("list.export")
|
|
1338
1378
|
})]
|
|
1339
1379
|
})
|
|
1340
|
-
}), /* @__PURE__ */
|
|
1380
|
+
}), /* @__PURE__ */ M(_, {
|
|
1341
1381
|
align: "start",
|
|
1342
1382
|
className: "w-48 p-2",
|
|
1343
|
-
children: /* @__PURE__ */
|
|
1383
|
+
children: /* @__PURE__ */ M("div", {
|
|
1344
1384
|
className: "space-y-1",
|
|
1345
|
-
children: (
|
|
1385
|
+
children: (Z.formats || ["csv", "json"]).map((e) => /* @__PURE__ */ N(d, {
|
|
1346
1386
|
variant: "ghost",
|
|
1347
1387
|
size: "sm",
|
|
1348
1388
|
className: "w-full justify-start h-8 text-xs",
|
|
1349
1389
|
onClick: () => Ct(e),
|
|
1350
|
-
children: [/* @__PURE__ */
|
|
1390
|
+
children: [/* @__PURE__ */ M(T, { className: "h-3.5 w-3.5 mr-2" }), x("list.exportAs", { format: e.toUpperCase() })]
|
|
1351
1391
|
}, e))
|
|
1352
1392
|
})
|
|
1353
1393
|
})]
|
|
1354
1394
|
}),
|
|
1355
|
-
(C.sharing?.enabled || C.sharing?.type) && /* @__PURE__ */
|
|
1395
|
+
(C.sharing?.enabled || C.sharing?.type) && /* @__PURE__ */ N(d, {
|
|
1356
1396
|
variant: "ghost",
|
|
1357
1397
|
size: "sm",
|
|
1358
1398
|
className: "h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150",
|
|
1359
1399
|
title: `Sharing: ${C.sharing?.visibility || C.sharing?.type || "private"}`,
|
|
1360
1400
|
"data-testid": "share-button",
|
|
1361
|
-
children: [/* @__PURE__ */
|
|
1401
|
+
children: [/* @__PURE__ */ M(de, { className: "h-3.5 w-3.5 mr-1.5" }), /* @__PURE__ */ M("span", {
|
|
1362
1402
|
className: "hidden sm:inline",
|
|
1363
1403
|
children: x("list.share")
|
|
1364
1404
|
})]
|
|
1365
1405
|
}),
|
|
1366
|
-
C.allowPrinting && /* @__PURE__ */
|
|
1406
|
+
C.allowPrinting && /* @__PURE__ */ N(d, {
|
|
1367
1407
|
variant: "ghost",
|
|
1368
1408
|
size: "sm",
|
|
1369
1409
|
className: "h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150",
|
|
1370
1410
|
onClick: () => window.print(),
|
|
1371
1411
|
"data-testid": "print-button",
|
|
1372
|
-
children: [/* @__PURE__ */
|
|
1412
|
+
children: [/* @__PURE__ */ M(le, { className: "h-3.5 w-3.5 mr-1.5" }), /* @__PURE__ */ M("span", {
|
|
1373
1413
|
className: "hidden sm:inline",
|
|
1374
1414
|
children: x("list.print")
|
|
1375
1415
|
})]
|
|
1376
1416
|
}),
|
|
1377
1417
|
(() => {
|
|
1378
|
-
let e = C.allowPrinting || C.sharing?.enabled || C.sharing?.type ||
|
|
1379
|
-
return
|
|
1418
|
+
let e = C.allowPrinting || C.sharing?.enabled || C.sharing?.type || Z && C.allowExport !== !1;
|
|
1419
|
+
return E.showSearch && e ? /* @__PURE__ */ M("div", { className: "h-4 w-px bg-border/60 mx-0.5 shrink-0" }) : null;
|
|
1380
1420
|
})(),
|
|
1381
|
-
|
|
1382
|
-
open:
|
|
1383
|
-
onOpenChange:
|
|
1384
|
-
children: [/* @__PURE__ */
|
|
1421
|
+
E.showSearch && /* @__PURE__ */ N(g, {
|
|
1422
|
+
open: he,
|
|
1423
|
+
onOpenChange: _e,
|
|
1424
|
+
children: [/* @__PURE__ */ M(v, {
|
|
1385
1425
|
asChild: !0,
|
|
1386
|
-
children: /* @__PURE__ */
|
|
1426
|
+
children: /* @__PURE__ */ M(d, {
|
|
1387
1427
|
variant: "ghost",
|
|
1388
1428
|
size: "sm",
|
|
1389
|
-
className:
|
|
1429
|
+
className: b("h-7 w-7 p-0 text-muted-foreground hover:text-primary text-xs transition-colors duration-150", A && "bg-primary/10 border border-primary/20 text-primary"),
|
|
1390
1430
|
"data-testid": "search-icon-button",
|
|
1391
1431
|
title: x("list.search"),
|
|
1392
|
-
children: /* @__PURE__ */
|
|
1432
|
+
children: /* @__PURE__ */ M(ue, { className: "h-3.5 w-3.5" })
|
|
1393
1433
|
})
|
|
1394
|
-
}), /* @__PURE__ */
|
|
1434
|
+
}), /* @__PURE__ */ M(_, {
|
|
1395
1435
|
align: "end",
|
|
1396
1436
|
className: "w-[calc(100vw-2rem)] sm:w-64 p-2",
|
|
1397
1437
|
"data-testid": "search-popover",
|
|
1398
|
-
children: /* @__PURE__ */
|
|
1438
|
+
children: /* @__PURE__ */ N("div", {
|
|
1399
1439
|
className: "relative",
|
|
1400
1440
|
children: [
|
|
1401
|
-
/* @__PURE__ */
|
|
1402
|
-
/* @__PURE__ */
|
|
1441
|
+
/* @__PURE__ */ M(ue, { className: "absolute left-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground" }),
|
|
1442
|
+
/* @__PURE__ */ M(te, {
|
|
1403
1443
|
placeholder: x("list.search") + "...",
|
|
1404
|
-
value:
|
|
1444
|
+
value: A,
|
|
1405
1445
|
onChange: (e) => _t(e.target.value),
|
|
1406
1446
|
className: "pl-7 h-8 text-xs",
|
|
1407
1447
|
autoFocus: !0
|
|
1408
1448
|
}),
|
|
1409
|
-
|
|
1449
|
+
A && /* @__PURE__ */ M(d, {
|
|
1410
1450
|
variant: "ghost",
|
|
1411
1451
|
size: "sm",
|
|
1412
1452
|
className: "absolute right-0.5 top-1/2 -translate-y-1/2 h-5 w-5 p-0 hover:bg-muted-foreground/20",
|
|
1413
1453
|
onClick: () => _t(""),
|
|
1414
|
-
children: /* @__PURE__ */
|
|
1454
|
+
children: /* @__PURE__ */ M(pe, { className: "h-3 w-3" })
|
|
1415
1455
|
})
|
|
1416
1456
|
]
|
|
1417
1457
|
})
|
|
1418
1458
|
})]
|
|
1419
1459
|
}),
|
|
1420
|
-
|
|
1460
|
+
E.showAddRecord && E.addRecordPosition === "top" && /* @__PURE__ */ N(d, {
|
|
1421
1461
|
variant: "ghost",
|
|
1422
1462
|
size: "sm",
|
|
1423
1463
|
className: "h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150",
|
|
1424
1464
|
"data-testid": "add-record-button",
|
|
1425
1465
|
onClick: () => p.onAddRecord?.(),
|
|
1426
|
-
children: [/* @__PURE__ */
|
|
1466
|
+
children: [/* @__PURE__ */ M(j, { className: "h-3.5 w-3.5 mr-1.5" }), /* @__PURE__ */ M("span", {
|
|
1427
1467
|
className: "hidden sm:inline",
|
|
1428
1468
|
children: x("list.addRecord")
|
|
1429
1469
|
})]
|
|
@@ -1431,133 +1471,133 @@ var U = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
|
|
|
1431
1471
|
]
|
|
1432
1472
|
})]
|
|
1433
1473
|
}),
|
|
1434
|
-
|
|
1474
|
+
X && X.length > 0 && /* @__PURE__ */ M("div", {
|
|
1435
1475
|
className: "border-b px-2 sm:px-4 py-1 flex items-center gap-1 flex-wrap bg-background",
|
|
1436
1476
|
"data-testid": "quick-filters",
|
|
1437
|
-
children:
|
|
1438
|
-
let t =
|
|
1439
|
-
return /* @__PURE__ */
|
|
1477
|
+
children: X.map((e) => {
|
|
1478
|
+
let t = J.has(e.id), n = e.icon ? me[e.icon.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("")] ?? null : null;
|
|
1479
|
+
return /* @__PURE__ */ N(d, {
|
|
1440
1480
|
variant: t ? "default" : "outline",
|
|
1441
1481
|
size: "sm",
|
|
1442
1482
|
className: "h-7 px-3 text-xs",
|
|
1443
1483
|
onClick: () => St(e.id),
|
|
1444
|
-
children: [n && /* @__PURE__ */
|
|
1484
|
+
children: [n && /* @__PURE__ */ M(n, { className: "h-3 w-3 mr-1.5" }), e.label]
|
|
1445
1485
|
}, e.id);
|
|
1446
1486
|
})
|
|
1447
1487
|
}),
|
|
1448
|
-
/* @__PURE__ */
|
|
1488
|
+
/* @__PURE__ */ M("div", {
|
|
1449
1489
|
className: "flex-1 min-h-0 bg-background relative overflow-hidden animate-in fade-in-0 duration-200",
|
|
1450
|
-
children: !
|
|
1490
|
+
children: !Fe && R.length === 0 ? (() => {
|
|
1451
1491
|
let e = C.emptyState?.icon;
|
|
1452
|
-
return /* @__PURE__ */
|
|
1492
|
+
return /* @__PURE__ */ N("div", {
|
|
1453
1493
|
className: "flex flex-col items-center justify-center h-full min-h-[200px] text-center p-8",
|
|
1454
1494
|
"data-testid": "empty-state",
|
|
1455
1495
|
children: [
|
|
1456
|
-
/* @__PURE__ */
|
|
1457
|
-
/* @__PURE__ */
|
|
1496
|
+
/* @__PURE__ */ M(e ? me[e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("")] ?? oe : oe, { className: "h-12 w-12 text-muted-foreground/50 mb-4" }),
|
|
1497
|
+
/* @__PURE__ */ M("h3", {
|
|
1458
1498
|
className: "text-lg font-medium text-foreground mb-1",
|
|
1459
1499
|
children: (typeof C.emptyState?.title == "string" ? C.emptyState.title : void 0) ?? "No items found"
|
|
1460
1500
|
}),
|
|
1461
|
-
/* @__PURE__ */
|
|
1501
|
+
/* @__PURE__ */ M("p", {
|
|
1462
1502
|
className: "text-sm text-muted-foreground max-w-md",
|
|
1463
1503
|
children: (typeof C.emptyState?.message == "string" ? C.emptyState.message : void 0) ?? "There are no records to display. Try adjusting your filters or adding new data."
|
|
1464
1504
|
}),
|
|
1465
|
-
|
|
1505
|
+
E.showAddRecord && /* @__PURE__ */ N(d, {
|
|
1466
1506
|
variant: "default",
|
|
1467
1507
|
size: "sm",
|
|
1468
1508
|
className: "mt-4",
|
|
1469
1509
|
"data-testid": "empty-state-add-record",
|
|
1470
1510
|
onClick: () => p.onAddRecord?.(),
|
|
1471
|
-
children: [/* @__PURE__ */
|
|
1511
|
+
children: [/* @__PURE__ */ M(j, { className: "h-4 w-4 mr-1.5" }), x("list.addRecord")]
|
|
1472
1512
|
})
|
|
1473
1513
|
]
|
|
1474
1514
|
});
|
|
1475
|
-
})() : /* @__PURE__ */
|
|
1515
|
+
})() : /* @__PURE__ */ M(ge, {
|
|
1476
1516
|
schema: yt,
|
|
1477
1517
|
...p,
|
|
1478
|
-
data:
|
|
1479
|
-
loading:
|
|
1480
|
-
onRowSelect:
|
|
1518
|
+
data: R,
|
|
1519
|
+
loading: Fe,
|
|
1520
|
+
onRowSelect: et
|
|
1481
1521
|
})
|
|
1482
|
-
},
|
|
1483
|
-
|
|
1522
|
+
}, D),
|
|
1523
|
+
E.showAddRecord && E.addRecordPosition === "bottom" && /* @__PURE__ */ M("div", {
|
|
1484
1524
|
className: "border-t px-2 sm:px-4 py-1 bg-background shrink-0",
|
|
1485
|
-
children: /* @__PURE__ */
|
|
1525
|
+
children: /* @__PURE__ */ N(d, {
|
|
1486
1526
|
variant: "ghost",
|
|
1487
1527
|
size: "sm",
|
|
1488
1528
|
className: "h-7 px-2 text-muted-foreground hover:text-primary text-xs transition-colors duration-150",
|
|
1489
1529
|
"data-testid": "add-record-button",
|
|
1490
1530
|
onClick: () => p.onAddRecord?.(),
|
|
1491
|
-
children: [/* @__PURE__ */
|
|
1531
|
+
children: [/* @__PURE__ */ M(j, { className: "h-3.5 w-3.5 mr-1.5" }), /* @__PURE__ */ M("span", {
|
|
1492
1532
|
className: "hidden sm:inline",
|
|
1493
1533
|
children: x("list.addRecord")
|
|
1494
1534
|
})]
|
|
1495
1535
|
})
|
|
1496
1536
|
}),
|
|
1497
|
-
C.bulkActions && C.bulkActions.length > 0 &&
|
|
1537
|
+
C.bulkActions && C.bulkActions.length > 0 && $e.length > 0 && D !== "grid" && /* @__PURE__ */ N("div", {
|
|
1498
1538
|
className: "border-t px-4 py-1.5 flex items-center gap-2 text-xs bg-primary/5 shrink-0",
|
|
1499
1539
|
"data-testid": "bulk-actions-bar",
|
|
1500
1540
|
children: [
|
|
1501
|
-
/* @__PURE__ */
|
|
1541
|
+
/* @__PURE__ */ N("span", {
|
|
1502
1542
|
className: "text-muted-foreground font-medium",
|
|
1503
|
-
children: [
|
|
1543
|
+
children: [$e.length, " selected"]
|
|
1504
1544
|
}),
|
|
1505
|
-
/* @__PURE__ */
|
|
1545
|
+
/* @__PURE__ */ M("div", {
|
|
1506
1546
|
className: "flex items-center gap-1 ml-2",
|
|
1507
|
-
children: C.bulkActions.map((e) => /* @__PURE__ */
|
|
1547
|
+
children: C.bulkActions.map((e) => /* @__PURE__ */ M(d, {
|
|
1508
1548
|
variant: "outline",
|
|
1509
1549
|
size: "sm",
|
|
1510
1550
|
className: "h-6 px-2 text-xs",
|
|
1511
|
-
onClick: () => p.onBulkAction?.(e,
|
|
1551
|
+
onClick: () => p.onBulkAction?.(e, $e),
|
|
1512
1552
|
"data-testid": `bulk-action-${e}`,
|
|
1513
|
-
children:
|
|
1553
|
+
children: Me(e)
|
|
1514
1554
|
}, e))
|
|
1515
1555
|
}),
|
|
1516
|
-
/* @__PURE__ */
|
|
1556
|
+
/* @__PURE__ */ M(d, {
|
|
1517
1557
|
variant: "ghost",
|
|
1518
1558
|
size: "sm",
|
|
1519
1559
|
className: "h-6 px-2 text-xs ml-auto",
|
|
1520
|
-
onClick: () =>
|
|
1560
|
+
onClick: () => et([]),
|
|
1521
1561
|
children: "Clear"
|
|
1522
1562
|
})
|
|
1523
1563
|
]
|
|
1524
1564
|
}),
|
|
1525
|
-
!
|
|
1565
|
+
!Fe && R.length > 0 && C.showRecordCount !== !1 && /* @__PURE__ */ N("div", {
|
|
1526
1566
|
className: "border-t px-4 py-1.5 flex items-center gap-2 text-xs text-muted-foreground bg-background shrink-0",
|
|
1527
1567
|
"data-testid": "record-count-bar",
|
|
1528
1568
|
children: [
|
|
1529
|
-
/* @__PURE__ */
|
|
1530
|
-
|
|
1569
|
+
/* @__PURE__ */ M("span", { children: R.length === 1 ? x("list.recordCountOne", { count: R.length }) : x("list.recordCount", { count: R.length }) }),
|
|
1570
|
+
He && /* @__PURE__ */ M("span", {
|
|
1531
1571
|
className: "text-amber-600",
|
|
1532
1572
|
"data-testid": "data-limit-warning",
|
|
1533
|
-
children: x("list.dataLimitReached", { limit:
|
|
1573
|
+
children: x("list.dataLimitReached", { limit: U })
|
|
1534
1574
|
}),
|
|
1535
|
-
C.pagination?.pageSizeOptions && C.pagination.pageSizeOptions.length > 0 && /* @__PURE__ */
|
|
1575
|
+
C.pagination?.pageSizeOptions && C.pagination.pageSizeOptions.length > 0 && /* @__PURE__ */ M("select", {
|
|
1536
1576
|
className: "ml-auto h-6 rounded border border-input bg-background px-1 text-xs",
|
|
1537
|
-
value:
|
|
1577
|
+
value: U,
|
|
1538
1578
|
onChange: (e) => {
|
|
1539
1579
|
let t = Number(e.target.value);
|
|
1540
|
-
|
|
1580
|
+
Ge(t), p.onPageSizeChange && p.onPageSizeChange(t);
|
|
1541
1581
|
},
|
|
1542
1582
|
"data-testid": "page-size-selector",
|
|
1543
|
-
children: C.pagination.pageSizeOptions.map((e) => /* @__PURE__ */
|
|
1583
|
+
children: C.pagination.pageSizeOptions.map((e) => /* @__PURE__ */ N("option", {
|
|
1544
1584
|
value: e,
|
|
1545
1585
|
children: [e, " / page"]
|
|
1546
1586
|
}, e))
|
|
1547
1587
|
})
|
|
1548
1588
|
]
|
|
1549
1589
|
}),
|
|
1550
|
-
vt.isOverlay && /* @__PURE__ */
|
|
1590
|
+
vt.isOverlay && /* @__PURE__ */ M(ne, {
|
|
1551
1591
|
...vt,
|
|
1552
1592
|
title: C.label ? `${C.label} Detail` : C.objectName ? `${C.objectName.charAt(0).toUpperCase() + C.objectName.slice(1)} Detail` : "Record Detail",
|
|
1553
|
-
children: (e) => /* @__PURE__ */
|
|
1593
|
+
children: (e) => /* @__PURE__ */ M("div", {
|
|
1554
1594
|
className: "space-y-3",
|
|
1555
|
-
children: Object.entries(e).map(([e, t]) => /* @__PURE__ */
|
|
1595
|
+
children: Object.entries(e).map(([e, t]) => /* @__PURE__ */ N("div", {
|
|
1556
1596
|
className: "flex flex-col",
|
|
1557
|
-
children: [/* @__PURE__ */
|
|
1597
|
+
children: [/* @__PURE__ */ M("span", {
|
|
1558
1598
|
className: "text-xs font-medium text-muted-foreground uppercase tracking-wide",
|
|
1559
1599
|
children: e.replace(/_/g, " ")
|
|
1560
|
-
}), /* @__PURE__ */
|
|
1600
|
+
}), /* @__PURE__ */ M("span", {
|
|
1561
1601
|
className: "text-sm",
|
|
1562
1602
|
children: String(t ?? "—")
|
|
1563
1603
|
})]
|
|
@@ -1567,23 +1607,23 @@ var U = a.forwardRef(({ schema: e, className: n, onViewChange: o, onFilterChange
|
|
|
1567
1607
|
]
|
|
1568
1608
|
});
|
|
1569
1609
|
});
|
|
1570
|
-
|
|
1610
|
+
V.displayName = "ListView";
|
|
1571
1611
|
//#endregion
|
|
1572
1612
|
//#region src/ObjectGallery.tsx
|
|
1573
|
-
var
|
|
1613
|
+
var Re = {
|
|
1574
1614
|
small: "grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6",
|
|
1575
1615
|
medium: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",
|
|
1576
1616
|
large: "grid-cols-1 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
1577
|
-
},
|
|
1617
|
+
}, ze = {
|
|
1578
1618
|
small: "aspect-square",
|
|
1579
1619
|
medium: "aspect-[4/3]",
|
|
1580
1620
|
large: "aspect-[16/10]"
|
|
1581
|
-
},
|
|
1582
|
-
let { schema: n } = e, r = s(
|
|
1621
|
+
}, H = (e) => {
|
|
1622
|
+
let { schema: n } = e, r = s(_e), i = e.dataSource || r?.dataSource, a = ve(n.bind), [d, m] = u([]), [ee, te] = u(!1), [h, g] = u(null), _ = be({
|
|
1583
1623
|
navigation: n.navigation,
|
|
1584
1624
|
objectName: n.objectName,
|
|
1585
1625
|
onRowClick: e.onRowClick ?? e.onCardClick
|
|
1586
|
-
}), v = n.gallery,
|
|
1626
|
+
}), v = n.gallery, y = v?.coverField ?? n.imageField ?? "image", x = v?.coverFit ?? "cover", re = v?.cardSize ?? "medium", ie = v?.titleField ?? n.titleField ?? "name", S = v?.visibleFields;
|
|
1587
1627
|
c(() => {
|
|
1588
1628
|
let e = !0;
|
|
1589
1629
|
return (async () => {
|
|
@@ -1634,18 +1674,18 @@ var W = {
|
|
|
1634
1674
|
e.data,
|
|
1635
1675
|
h
|
|
1636
1676
|
]);
|
|
1637
|
-
let T = e.data || a || n.data || d || [],
|
|
1638
|
-
|
|
1677
|
+
let T = e.data || a || n.data || d || [], ae = l(() => T.some((e) => typeof e[y] == "string" && !!e[y]), [T, y]), E = !!v?.coverField || ae, D = n.grouping?.fields, O = !!(D && D.length > 0), [k, oe] = u({}), A = l(() => D ? D.some((e) => e.collapsed) : !1, [D]), se = o((e) => {
|
|
1678
|
+
oe((t) => ({
|
|
1639
1679
|
...t,
|
|
1640
|
-
[e]: t[e] === void 0 ? !
|
|
1680
|
+
[e]: t[e] === void 0 ? !A : !t[e]
|
|
1641
1681
|
}));
|
|
1642
|
-
}, [
|
|
1643
|
-
if (!
|
|
1682
|
+
}, [A]), ce = l(() => {
|
|
1683
|
+
if (!O || !D) return [];
|
|
1644
1684
|
let e = /* @__PURE__ */ new Map(), t = [];
|
|
1645
1685
|
for (let n of T) {
|
|
1646
|
-
let r =
|
|
1686
|
+
let r = D.map((e) => String(n[e.field] ?? "")).join(" / ");
|
|
1647
1687
|
if (!e.has(r)) {
|
|
1648
|
-
let i =
|
|
1688
|
+
let i = D.map((e) => {
|
|
1649
1689
|
let t = n[e.field];
|
|
1650
1690
|
return t != null && t !== "" ? String(t) : "(empty)";
|
|
1651
1691
|
}).join(" / ");
|
|
@@ -1656,7 +1696,7 @@ var W = {
|
|
|
1656
1696
|
}
|
|
1657
1697
|
e.get(r).items.push(n);
|
|
1658
1698
|
}
|
|
1659
|
-
let n =
|
|
1699
|
+
let n = D[0]?.order ?? "asc";
|
|
1660
1700
|
return t.sort((e, t) => {
|
|
1661
1701
|
let r = e.localeCompare(t, void 0, {
|
|
1662
1702
|
numeric: !0,
|
|
@@ -1664,7 +1704,7 @@ var W = {
|
|
|
1664
1704
|
});
|
|
1665
1705
|
return n === "desc" ? -r : r;
|
|
1666
1706
|
}), t.map((t) => {
|
|
1667
|
-
let n = e.get(t), r = t in
|
|
1707
|
+
let n = e.get(t), r = t in k ? k[t] : A;
|
|
1668
1708
|
return {
|
|
1669
1709
|
key: t,
|
|
1670
1710
|
label: n.label,
|
|
@@ -1674,50 +1714,50 @@ var W = {
|
|
|
1674
1714
|
});
|
|
1675
1715
|
}, [
|
|
1676
1716
|
T,
|
|
1717
|
+
D,
|
|
1677
1718
|
O,
|
|
1678
1719
|
k,
|
|
1679
|
-
A
|
|
1680
|
-
M
|
|
1720
|
+
A
|
|
1681
1721
|
]);
|
|
1682
|
-
if (ee && !T.length) return /* @__PURE__ */
|
|
1722
|
+
if (ee && !T.length) return /* @__PURE__ */ M("div", {
|
|
1683
1723
|
className: "p-4 text-sm text-muted-foreground",
|
|
1684
1724
|
children: "Loading Gallery..."
|
|
1685
1725
|
});
|
|
1686
|
-
if (!T.length) return /* @__PURE__ */
|
|
1726
|
+
if (!T.length) return /* @__PURE__ */ M("div", {
|
|
1687
1727
|
className: "p-4 text-sm text-muted-foreground",
|
|
1688
1728
|
children: "No items to display"
|
|
1689
1729
|
});
|
|
1690
|
-
let
|
|
1691
|
-
let i = t.id ?? t._id ?? r, a = String(t[
|
|
1692
|
-
return /* @__PURE__ */
|
|
1730
|
+
let j = (t, r) => {
|
|
1731
|
+
let i = t.id ?? t._id ?? r, a = String(t[ie] ?? "Untitled"), o = t[y];
|
|
1732
|
+
return /* @__PURE__ */ N(f, {
|
|
1693
1733
|
role: "listitem",
|
|
1694
|
-
className:
|
|
1734
|
+
className: b("group overflow-hidden transition-all hover:shadow-md", (e.onCardClick || e.onRowClick || n.navigation) && "cursor-pointer"),
|
|
1695
1735
|
onClick: () => _.handleClick(t),
|
|
1696
|
-
children: [/* @__PURE__ */
|
|
1697
|
-
className:
|
|
1698
|
-
hidden: !
|
|
1699
|
-
children: o ? /* @__PURE__ */
|
|
1736
|
+
children: [/* @__PURE__ */ M("div", {
|
|
1737
|
+
className: b("w-full overflow-hidden bg-muted relative", ze[re]),
|
|
1738
|
+
hidden: !E,
|
|
1739
|
+
children: o ? /* @__PURE__ */ M("img", {
|
|
1700
1740
|
src: o,
|
|
1701
1741
|
alt: a,
|
|
1702
|
-
className:
|
|
1703
|
-
}) : /* @__PURE__ */
|
|
1742
|
+
className: b("h-full w-full transition-transform group-hover:scale-105", x === "cover" && "object-cover", x === "contain" && "object-contain")
|
|
1743
|
+
}) : /* @__PURE__ */ M("div", {
|
|
1704
1744
|
className: "flex h-full w-full items-center justify-center bg-secondary/50 text-muted-foreground",
|
|
1705
|
-
children: /* @__PURE__ */
|
|
1745
|
+
children: /* @__PURE__ */ M("span", {
|
|
1706
1746
|
className: "text-4xl font-light opacity-20",
|
|
1707
1747
|
children: a[0]?.toUpperCase()
|
|
1708
1748
|
})
|
|
1709
1749
|
})
|
|
1710
|
-
}), /* @__PURE__ */
|
|
1711
|
-
className:
|
|
1712
|
-
children: [/* @__PURE__ */
|
|
1750
|
+
}), /* @__PURE__ */ N(p, {
|
|
1751
|
+
className: b("p-3", E && "border-t"),
|
|
1752
|
+
children: [/* @__PURE__ */ M("h3", {
|
|
1713
1753
|
className: "font-medium truncate text-sm",
|
|
1714
1754
|
title: a,
|
|
1715
1755
|
children: a
|
|
1716
|
-
}),
|
|
1756
|
+
}), S && S.length > 0 && /* @__PURE__ */ M("div", {
|
|
1717
1757
|
className: "mt-1 space-y-0.5",
|
|
1718
|
-
children:
|
|
1758
|
+
children: S.map((e) => {
|
|
1719
1759
|
let n = t[e];
|
|
1720
|
-
return n == null || n === "" ? null : /* @__PURE__ */
|
|
1760
|
+
return n == null || n === "" ? null : /* @__PURE__ */ M("p", {
|
|
1721
1761
|
className: "text-xs text-muted-foreground truncate",
|
|
1722
1762
|
children: typeof n == "object" ? n.label ?? n.name ?? n.id ?? JSON.stringify(n) : String(n)
|
|
1723
1763
|
}, e);
|
|
@@ -1725,40 +1765,40 @@ var W = {
|
|
|
1725
1765
|
})]
|
|
1726
1766
|
})]
|
|
1727
1767
|
}, i);
|
|
1728
|
-
},
|
|
1729
|
-
className:
|
|
1768
|
+
}, le = (e) => /* @__PURE__ */ M("div", {
|
|
1769
|
+
className: b("grid gap-4 p-4 auto-rows-min content-start", Re[re], n.className),
|
|
1730
1770
|
role: "list",
|
|
1731
|
-
children: e.map((e, t) =>
|
|
1771
|
+
children: e.map((e, t) => j(e, t))
|
|
1732
1772
|
});
|
|
1733
|
-
return /* @__PURE__ */
|
|
1773
|
+
return /* @__PURE__ */ N(he, { children: [O ? /* @__PURE__ */ M("div", {
|
|
1734
1774
|
className: "space-y-2",
|
|
1735
|
-
children:
|
|
1775
|
+
children: ce.map((e) => /* @__PURE__ */ N("div", {
|
|
1736
1776
|
className: "border rounded-md",
|
|
1737
|
-
children: [/* @__PURE__ */
|
|
1777
|
+
children: [/* @__PURE__ */ N("button", {
|
|
1738
1778
|
type: "button",
|
|
1739
1779
|
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",
|
|
1740
|
-
onClick: () =>
|
|
1780
|
+
onClick: () => se(e.key),
|
|
1741
1781
|
children: [
|
|
1742
|
-
e.collapsed ? /* @__PURE__ */
|
|
1743
|
-
/* @__PURE__ */
|
|
1744
|
-
/* @__PURE__ */
|
|
1782
|
+
e.collapsed ? /* @__PURE__ */ M(w, { className: "h-4 w-4 shrink-0" }) : /* @__PURE__ */ M(C, { className: "h-4 w-4 shrink-0" }),
|
|
1783
|
+
/* @__PURE__ */ M("span", { children: e.label }),
|
|
1784
|
+
/* @__PURE__ */ M("span", {
|
|
1745
1785
|
className: "ml-auto text-xs text-muted-foreground",
|
|
1746
1786
|
children: e.items.length
|
|
1747
1787
|
})
|
|
1748
1788
|
]
|
|
1749
|
-
}), !e.collapsed &&
|
|
1789
|
+
}), !e.collapsed && le(e.items)]
|
|
1750
1790
|
}, e.key))
|
|
1751
|
-
}) :
|
|
1791
|
+
}) : le(T), _.isOverlay && /* @__PURE__ */ M(ne, {
|
|
1752
1792
|
..._,
|
|
1753
1793
|
title: "Gallery Item",
|
|
1754
|
-
children: (e) => /* @__PURE__ */
|
|
1794
|
+
children: (e) => /* @__PURE__ */ M("div", {
|
|
1755
1795
|
className: "space-y-3",
|
|
1756
|
-
children: Object.entries(e).map(([e, t]) => /* @__PURE__ */
|
|
1796
|
+
children: Object.entries(e).map(([e, t]) => /* @__PURE__ */ N("div", {
|
|
1757
1797
|
className: "flex flex-col",
|
|
1758
|
-
children: [/* @__PURE__ */
|
|
1798
|
+
children: [/* @__PURE__ */ M("span", {
|
|
1759
1799
|
className: "text-xs font-medium text-muted-foreground uppercase tracking-wide",
|
|
1760
1800
|
children: e.replace(/_/g, " ")
|
|
1761
|
-
}), /* @__PURE__ */
|
|
1801
|
+
}), /* @__PURE__ */ M("span", {
|
|
1762
1802
|
className: "text-sm",
|
|
1763
1803
|
children: String(t ?? "—")
|
|
1764
1804
|
})]
|
|
@@ -1766,11 +1806,11 @@ var W = {
|
|
|
1766
1806
|
})
|
|
1767
1807
|
})] });
|
|
1768
1808
|
};
|
|
1769
|
-
e.register("object-gallery",
|
|
1809
|
+
e.register("object-gallery", H, {
|
|
1770
1810
|
namespace: "plugin-list",
|
|
1771
1811
|
label: "Gallery View",
|
|
1772
1812
|
category: "view"
|
|
1773
|
-
}), e.register("list-view",
|
|
1813
|
+
}), e.register("list-view", V, {
|
|
1774
1814
|
namespace: "plugin-list",
|
|
1775
1815
|
label: "List View",
|
|
1776
1816
|
category: "Views",
|
|
@@ -1847,7 +1887,7 @@ e.register("object-gallery", Pe, {
|
|
|
1847
1887
|
sort: [],
|
|
1848
1888
|
options: {}
|
|
1849
1889
|
}
|
|
1850
|
-
}), e.register("list",
|
|
1890
|
+
}), e.register("list", V, {
|
|
1851
1891
|
namespace: "view",
|
|
1852
1892
|
category: "view",
|
|
1853
1893
|
label: "List",
|
|
@@ -1918,4 +1958,4 @@ e.register("object-gallery", Pe, {
|
|
|
1918
1958
|
]
|
|
1919
1959
|
});
|
|
1920
1960
|
//#endregion
|
|
1921
|
-
export {
|
|
1961
|
+
export { V as ListView, H as ObjectGallery, Ee as TabBar, Oe as UserFilters, we as ViewSwitcher, Fe as evaluateConditionalFormatting, z as normalizeFilterCondition, Ne as normalizeFilters };
|