@nivaro/react 0.3.61 → 0.3.63

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.
@@ -7,16 +7,17 @@ import { useNivaroClient as fe } from "../../context.js";
7
7
  import { get as G, post as W, patch as Se, del as oe } from "../../lib/commands.js";
8
8
  import { describeOwnerGroup as _e, sentenceLabelsFromFields as $e } from "../../lib/config-sentences.js";
9
9
  import { useRecordReader as Ie } from "../../lib/record-loader.js";
10
- import { ConfigReadBack as Ee } from "../ConfigReadBack.js";
11
- import { UserAvatar as ce } from "../UserAvatar.js";
10
+ import { ConfigReadBack as Le } from "../ConfigReadBack.js";
11
+ import { ConfirmButton as Ee } from "../profile/primitives.js";
12
+ import { UserAvatar as de } from "../UserAvatar.js";
12
13
  import { Button as k } from "../ui/button.js";
13
- import { Command as Le, CommandInput as je, CommandList as Pe, CommandEmpty as Oe, CommandGroup as Ue, CommandItem as De } from "../ui/command.js";
14
+ import { Command as je, CommandInput as Pe, CommandList as Oe, CommandEmpty as De, CommandGroup as Ue, CommandItem as ze } from "../ui/command.js";
14
15
  import { Input as S } from "../ui/input.js";
15
16
  import { Label as C } from "../ui/label.js";
16
- import { Popover as ze, PopoverTrigger as Ae, PopoverContent as Re } from "../ui/popover.js";
17
- import { SimpleSelect as de } from "../ui/SimpleSelect.js";
17
+ import { Popover as Ae, PopoverTrigger as Re, PopoverContent as Be } from "../ui/popover.js";
18
+ import { SimpleSelect as ce } from "../ui/SimpleSelect.js";
18
19
  import { FieldPicker as Ke } from "./FieldPicker.js";
19
- import { findM2ORelation as Be, findO2MRelation as Te, renderDisplayTemplate as Me } from "./relations.js";
20
+ import { findM2ORelation as Te, findO2MRelation as Me, renderDisplayTemplate as Qe } from "./relations.js";
20
21
  const ue = {
21
22
  string: [
22
23
  { label: "=", value: "eq" },
@@ -74,45 +75,45 @@ const ue = {
74
75
  { label: "≠", value: "neq" }
75
76
  ]
76
77
  };
77
- function Qe(t) {
78
+ function Ve(t) {
78
79
  return ue[t] ?? ue.string;
79
80
  }
80
- function Ve({
81
+ function We({
81
82
  relatedCollection: t,
82
83
  value: o,
83
84
  onChange: x
84
85
  }) {
85
- const c = fe();
86
+ const d = fe();
86
87
  Ie();
87
- const [n, f] = h(""), [d, r] = h(!1), [b, g] = h(""), v = Fe(null), { data: m } = F({
88
+ const [n, f] = h(""), [c, r] = h(!1), [b, g] = h(""), v = Fe(null), { data: m } = F({
88
89
  queryKey: ["collection-meta", t],
89
- queryFn: () => c.request(G(`/collections/${t}`)).then((u) => u.data)
90
+ queryFn: () => d.request(G(`/collections/${t}`)).then((u) => u.data)
90
91
  }), s = (m == null ? void 0 : m.display_template) ?? null;
91
92
  function N(u) {
92
- return Me(s, u);
93
+ return Qe(s, u);
93
94
  }
94
- const { data: L, isLoading: j } = F({
95
+ const { data: E, isLoading: j } = F({
95
96
  queryKey: ["items-picker", t, n],
96
- queryFn: () => c.request(
97
+ queryFn: () => d.request(
97
98
  G(`/items/${t}`, { limit: 30, search: n || void 0 })
98
99
  ).then((u) => u.data),
99
- enabled: d
100
+ enabled: c
100
101
  }), { data: _ } = F({
101
102
  queryKey: ["item-single", t, o],
102
- queryFn: () => c.request(G(`/items/${t}/${o}`)).then((u) => u.data),
103
+ queryFn: () => d.request(G(`/items/${t}/${o}`)).then((u) => u.data),
103
104
  enabled: !!o
104
105
  });
105
106
  return Ge(() => {
106
- if (!d) return;
107
+ if (!c) return;
107
108
  function u(P) {
108
109
  v.current && !v.current.contains(P.target) && r(!1);
109
110
  }
110
111
  return document.addEventListener("mousedown", u), () => document.removeEventListener("mousedown", u);
111
- }, [d]), /* @__PURE__ */ l("div", { className: "relative", ref: v, children: [
112
+ }, [c]), /* @__PURE__ */ l("div", { className: "relative", ref: v, children: [
112
113
  /* @__PURE__ */ e(
113
114
  S,
114
115
  {
115
- value: d ? b : _ ? N(_) : o,
116
+ value: c ? b : _ ? N(_) : o,
116
117
  onChange: (u) => {
117
118
  g(u.target.value), f(u.target.value);
118
119
  },
@@ -123,7 +124,7 @@ function Ve({
123
124
  className: "h-8 text-[12px] w-[160px]"
124
125
  }
125
126
  ),
126
- d && /* @__PURE__ */ e("div", { className: "absolute z-50 top-full mt-0.5 max-h-48 w-full min-w-[200px] overflow-y-auto rounded-md border border-slate-200 bg-white shadow-lg dark:border-border dark:bg-card", children: j ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-3", children: /* @__PURE__ */ e(Y, { className: "h-3.5 w-3.5 animate-spin text-slate-400" }) }) : (L ?? []).length === 0 ? /* @__PURE__ */ e("div", { className: "px-3 py-2 text-[12px] text-slate-400", children: "No results" }) : (L ?? []).map((u) => /* @__PURE__ */ e(
127
+ c && /* @__PURE__ */ e("div", { className: "absolute z-50 top-full mt-0.5 max-h-48 w-full min-w-[200px] overflow-y-auto rounded-md border border-slate-200 bg-white shadow-lg dark:border-border dark:bg-card", children: j ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-3", children: /* @__PURE__ */ e(Y, { className: "h-3.5 w-3.5 animate-spin text-slate-400" }) }) : (E ?? []).length === 0 ? /* @__PURE__ */ e("div", { className: "px-3 py-2 text-[12px] text-slate-400", children: "No results" }) : (E ?? []).map((u) => /* @__PURE__ */ e(
127
128
  "button",
128
129
  {
129
130
  type: "button",
@@ -141,18 +142,18 @@ function pe({
141
142
  row: t,
142
143
  fields: o,
143
144
  relations: x,
144
- collection: c,
145
+ collection: d,
145
146
  onChange: n,
146
147
  onRemove: f
147
148
  }) {
148
- const d = o.find((s) => s.field === t.field), r = t.field && c ? Be(x, c, t.field) ?? null : null, b = !r && t.field && c ? x.find(
149
- (s) => s.many_collection === c && s.many_field === t.field && s.junction_field !== null
150
- ) ?? null : null, g = !r && !b && t.field && c ? Te(x, c, t.field) ?? null : null, v = (r == null ? void 0 : r.one_collection) ?? (b == null ? void 0 : b.one_collection) ?? (g == null ? void 0 : g.many_collection) ?? null, m = v ? "uuid" : (d == null ? void 0 : d.type) ?? "string";
149
+ const c = o.find((s) => s.field === t.field), r = t.field && d ? Te(x, d, t.field) ?? null : null, b = !r && t.field && d ? x.find(
150
+ (s) => s.many_collection === d && s.many_field === t.field && s.junction_field !== null
151
+ ) ?? null : null, g = !r && !b && t.field && d ? Me(x, d, t.field) ?? null : null, v = (r == null ? void 0 : r.one_collection) ?? (b == null ? void 0 : b.one_collection) ?? (g == null ? void 0 : g.many_collection) ?? null, m = v ? "uuid" : (c == null ? void 0 : c.type) ?? "string";
151
152
  return /* @__PURE__ */ l("div", { className: "flex flex-wrap items-center gap-2", children: [
152
153
  /* @__PURE__ */ e(
153
154
  Ke,
154
155
  {
155
- collection: c,
156
+ collection: d,
156
157
  fields: o,
157
158
  relations: x,
158
159
  value: t.field,
@@ -163,16 +164,16 @@ function pe({
163
164
  }
164
165
  ),
165
166
  /* @__PURE__ */ e(
166
- de,
167
+ ce,
167
168
  {
168
169
  value: t.op,
169
170
  onChange: (s) => n({ ...t, op: s }),
170
171
  className: "h-8 w-[70px] rounded-md border-slate-200 bg-white px-2 text-[13px]",
171
- options: Qe(m).map((s) => ({ value: s.value, label: s.label }))
172
+ options: Ve(m).map((s) => ({ value: s.value, label: s.label }))
172
173
  }
173
174
  ),
174
175
  m === "boolean" ? /* @__PURE__ */ e(
175
- de,
176
+ ce,
176
177
  {
177
178
  value: t.value,
178
179
  onChange: (s) => n({ ...t, value: s }),
@@ -200,7 +201,7 @@ function pe({
200
201
  className: "h-8 text-[12px] w-[140px]"
201
202
  }
202
203
  ) : v ? /* @__PURE__ */ e(
203
- Ve,
204
+ We,
204
205
  {
205
206
  relatedCollection: v,
206
207
  value: t.value,
@@ -226,10 +227,10 @@ function pe({
226
227
  )
227
228
  ] });
228
229
  }
229
- function We(t) {
230
+ function Ye(t) {
230
231
  return [t.first_name, t.last_name].filter(Boolean).join(" ").trim() || t.email;
231
232
  }
232
- function E(t) {
233
+ function L(t) {
233
234
  const o = [t.first_name, t.last_name].filter(Boolean).join(" ").trim();
234
235
  return o ? `${o} (${t.email})` : t.email;
235
236
  }
@@ -237,11 +238,11 @@ function me({
237
238
  value: t,
238
239
  onChange: o,
239
240
  users: x,
240
- placeholder: c = "Select a user…"
241
+ placeholder: d = "Select a user…"
241
242
  }) {
242
- const [n, f] = h(!1), d = x.find((r) => r.id === t);
243
- return /* @__PURE__ */ l(ze, { open: n, onOpenChange: f, children: [
244
- /* @__PURE__ */ e(Ae, { asChild: !0, children: /* @__PURE__ */ l(
243
+ const [n, f] = h(!1), c = x.find((r) => r.id === t);
244
+ return /* @__PURE__ */ l(Ae, { open: n, onOpenChange: f, children: [
245
+ /* @__PURE__ */ e(Re, { asChild: !0, children: /* @__PURE__ */ l(
245
246
  "button",
246
247
  {
247
248
  type: "button",
@@ -250,8 +251,8 @@ function me({
250
251
  /* @__PURE__ */ e(
251
252
  "span",
252
253
  {
253
- className: d ? "flex-1 truncate text-left" : "flex-1 text-left text-slate-400",
254
- children: d ? E(d) : c
254
+ className: c ? "flex-1 truncate text-left" : "flex-1 text-left text-slate-400",
255
+ children: c ? L(c) : d
255
256
  }
256
257
  ),
257
258
  /* @__PURE__ */ e(
@@ -276,14 +277,14 @@ function me({
276
277
  ]
277
278
  }
278
279
  ) }),
279
- /* @__PURE__ */ e(Re, { className: "w-[280px] p-0", align: "start", children: /* @__PURE__ */ l(Le, { children: [
280
- /* @__PURE__ */ e(je, { placeholder: "Search users…", className: "h-8 text-[12px]" }),
281
- /* @__PURE__ */ l(Pe, { children: [
282
- /* @__PURE__ */ e(Oe, { className: "py-3 text-center text-[12px] text-muted-foreground", children: "No users found" }),
280
+ /* @__PURE__ */ e(Be, { className: "w-[280px] p-0", align: "start", children: /* @__PURE__ */ l(je, { children: [
281
+ /* @__PURE__ */ e(Pe, { placeholder: "Search users…", className: "h-8 text-[12px]" }),
282
+ /* @__PURE__ */ l(Oe, { children: [
283
+ /* @__PURE__ */ e(De, { className: "py-3 text-center text-[12px] text-muted-foreground", children: "No users found" }),
283
284
  /* @__PURE__ */ e(Ue, { children: x.map((r) => /* @__PURE__ */ l(
284
- De,
285
+ ze,
285
286
  {
286
- value: `${E(r)} ${r.email}`,
287
+ value: `${L(r)} ${r.email}`,
287
288
  onSelect: () => {
288
289
  o(t === r.id ? "" : r.id), f(!1);
289
290
  },
@@ -308,7 +309,7 @@ function me({
308
309
  )
309
310
  }
310
311
  ),
311
- E(r)
312
+ L(r)
312
313
  ]
313
314
  },
314
315
  r.id
@@ -322,34 +323,34 @@ function he(t) {
322
323
  const o = ((n = t.first_name) == null ? void 0 : n[0]) ?? "", x = ((f = t.last_name) == null ? void 0 : f[0]) ?? "";
323
324
  return (`${o}${x}`.trim() || t.email[0] || "?").toUpperCase();
324
325
  }
325
- function Ye(t) {
326
+ function Xe(t) {
326
327
  return !t || t.length === 0 ? "All records" : t.map((o) => `${o.field} ${o.op} ${String(o.value ?? "")}`).join(", ");
327
328
  }
328
- function xt({
329
+ function vt({
329
330
  stateId: t,
330
331
  stateName: o,
331
332
  templateId: x,
332
- collection: c
333
+ collection: d
333
334
  }) {
334
335
  var re;
335
- const n = fe(), f = we(), { data: d } = F({
336
- queryKey: ["collection-meta", c],
337
- queryFn: () => n.request(G(`/collections/${c}`)).then((a) => a.data),
338
- enabled: !!c
339
- }), r = ((re = d == null ? void 0 : d.fields) == null ? void 0 : re.filter((a) => !a.hidden)) ?? [], b = (d == null ? void 0 : d.relations) ?? [], g = ["pipeline-owner-groups", t], { data: v, isLoading: m } = F({
336
+ const n = fe(), f = we(), { data: c } = F({
337
+ queryKey: ["collection-meta", d],
338
+ queryFn: () => n.request(G(`/collections/${d}`)).then((a) => a.data),
339
+ enabled: !!d
340
+ }), r = ((re = c == null ? void 0 : c.fields) == null ? void 0 : re.filter((a) => !a.hidden)) ?? [], b = (c == null ? void 0 : c.relations) ?? [], g = ["pipeline-owner-groups", t], { data: v, isLoading: m } = F({
340
341
  queryKey: g,
341
342
  queryFn: () => n.request(G(`/pipelines/states/${t}/owner-groups`)).then((a) => a.data)
342
343
  }), { data: s } = F({
343
344
  queryKey: ["users", "picker"],
344
345
  queryFn: () => n.request(G("/users", { limit: 200 })).then((a) => a.data)
345
- }), N = () => f.invalidateQueries({ queryKey: g }), [L, j] = h(null), [_, u] = h(""), [P, X] = h(!1), [z, O] = h([]), [A, U] = h(""), [ve, H] = h(!1), [J, Z] = h(""), [ee, te] = h(!1), [R, D] = h([]), [K, ae] = h(""), be = (a) => {
346
+ }), N = () => f.invalidateQueries({ queryKey: g }), [E, j] = h(null), [_, u] = h(""), [P, X] = h(!1), [z, O] = h([]), [A, D] = h(""), [ve, H] = h(!1), [J, Z] = h(""), [ee, te] = h(!1), [R, U] = h([]), [B, ae] = h(""), be = (a) => {
346
347
  j(a.id), u(a.name ?? ""), X(a.is_default), O(
347
348
  (a.filters ?? []).map((p) => ({ field: p.field, op: p.op, value: String(p.value ?? "") }))
348
- ), U("");
349
- }, B = () => {
350
- j(null), U("");
349
+ ), D("");
350
+ }, K = () => {
351
+ j(null), D("");
351
352
  }, le = () => {
352
- Z(""), te(!1), D([]), ae(""), H(!1);
353
+ Z(""), te(!1), U([]), ae(""), H(!1);
353
354
  }, se = (a) => a.filter((p) => p.field.trim()).map((p) => ({ field: p.field.trim(), op: p.op, value: p.value })), T = I({
354
355
  mutationFn: async () => {
355
356
  const a = se(R), p = await n.request(
@@ -359,8 +360,8 @@ function xt({
359
360
  filters: a.length > 0 ? a : void 0
360
361
  })
361
362
  ).then((y) => y.data);
362
- K && await n.request(
363
- W(`/pipelines/owner-groups/${p.id}/users`, { user: K })
363
+ B && await n.request(
364
+ W(`/pipelines/owner-groups/${p.id}/users`, { user: B })
364
365
  );
365
366
  },
366
367
  onSuccess: () => {
@@ -382,13 +383,13 @@ function xt({
382
383
  }), ge = I({
383
384
  mutationFn: (a) => n.request(oe(`/pipelines/owner-groups/${a}`)),
384
385
  onSuccess: () => {
385
- N(), B(), w.success("Group deleted");
386
+ N(), K(), w.success("Group deleted");
386
387
  },
387
388
  onError: () => w.error("Failed to delete group")
388
389
  }), ne = I({
389
390
  mutationFn: ({ groupId: a, user: p }) => n.request(W(`/pipelines/owner-groups/${a}/users`, { user: p })),
390
391
  onSuccess: () => {
391
- N(), U("");
392
+ N(), D("");
392
393
  },
393
394
  onError: () => w.error("Failed to add user")
394
395
  }), Ne = I({
@@ -399,7 +400,7 @@ function xt({
399
400
  return /* @__PURE__ */ l("div", { className: "space-y-3", children: [
400
401
  /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ e("span", { className: "text-[12px] font-medium text-slate-600", children: "Owner Groups" }) }),
401
402
  m ? /* @__PURE__ */ e("p", { className: "text-[12px] text-slate-400", children: "Loading groups…" }) : !v || v.length === 0 ? /* @__PURE__ */ e("p", { className: "text-[12px] text-slate-400", children: "No owner groups configured — any authenticated user can act as owner for skip evaluation." }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: v.map((a, p) => {
402
- const y = L === a.id;
403
+ const y = E === a.id;
403
404
  return /* @__PURE__ */ l("div", { className: "rounded-lg border border-slate-200 bg-white", children: [
404
405
  /* @__PURE__ */ l("div", { className: "group flex items-start gap-3 px-3 py-2.5", children: [
405
406
  /* @__PURE__ */ l("div", { className: "min-w-0 flex-1 space-y-1.5", children: [
@@ -407,28 +408,28 @@ function xt({
407
408
  /* @__PURE__ */ e("span", { className: "text-[13px] font-medium text-slate-800", children: a.name || `Group ${p + 1}` }),
408
409
  a.is_default && /* @__PURE__ */ e("span", { className: "rounded-full bg-nvr-cyan/10 px-1.5 py-0.5 text-[10px] font-medium text-nvr-cyan", children: "default" })
409
410
  ] }),
410
- /* @__PURE__ */ e("p", { className: "font-mono text-[11px] text-slate-400", children: Ye(a.filters) }),
411
+ /* @__PURE__ */ e("p", { className: "font-mono text-[11px] text-slate-400", children: Xe(a.filters) }),
411
412
  /* @__PURE__ */ e(
412
- Ee,
413
+ Le,
413
414
  {
414
415
  kind: "owner-group",
415
416
  sentences: _e(
416
417
  a,
417
418
  { stateLabel: o },
418
- $e(r, b, c)
419
+ $e(r, b, d)
419
420
  )
420
421
  }
421
422
  ),
422
423
  a.users.length > 0 && /* @__PURE__ */ e("div", { className: "flex items-center gap-1 flex-wrap pt-0.5", children: a.users.map((i) => /* @__PURE__ */ e(
423
- ce,
424
+ de,
424
425
  {
425
426
  userId: i.user,
426
427
  className: "h-7 w-7",
427
- alt: E(i),
428
+ alt: L(i),
428
429
  fallback: /* @__PURE__ */ e(
429
430
  "span",
430
431
  {
431
- title: E(i),
432
+ title: L(i),
432
433
  className: "flex h-7 w-7 items-center justify-center rounded-full bg-nvr-cyan/10 text-[11px] font-medium text-nvr-cyan",
433
434
  children: he(i)
434
435
  }
@@ -437,26 +438,26 @@ function xt({
437
438
  i.link_id
438
439
  )) })
439
440
  ] }),
440
- /* @__PURE__ */ l("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity shrink-0", children: [
441
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 [&:has([data-armed])]:opacity-100 transition-opacity shrink-0", children: [
441
442
  /* @__PURE__ */ e(
442
443
  "button",
443
444
  {
444
445
  type: "button",
445
- onClick: () => y ? B() : be(a),
446
+ onClick: () => y ? K() : be(a),
446
447
  className: "rounded p-1 text-slate-400 hover:text-slate-700",
447
448
  title: "Edit group",
448
449
  children: /* @__PURE__ */ e(ke, { className: "h-3.5 w-3.5" })
449
450
  }
450
451
  ),
451
452
  /* @__PURE__ */ e(
452
- "button",
453
+ Ee,
453
454
  {
454
- type: "button",
455
- onClick: () => {
456
- confirm(`Delete group "${a.name || `Group ${p + 1}`}"?`) && ge.mutate(a.id);
457
- },
458
- className: "rounded p-1 text-slate-400 hover:text-red-500",
455
+ onConfirm: () => ge.mutate(a.id),
459
456
  title: "Delete group",
457
+ confirmLabel: "Delete?",
458
+ confirmTitle: `Delete group "${a.name || `Group ${p + 1}`}"?`,
459
+ className: "rounded p-1 text-slate-400 hover:text-red-500",
460
+ armedClassName: "rounded bg-red-50 px-1.5 text-[11px] font-semibold text-red-700 hover:text-red-700 dark:bg-red-500/10 dark:text-red-400",
460
461
  children: /* @__PURE__ */ e(xe, { className: "h-3.5 w-3.5" })
461
462
  }
462
463
  )
@@ -512,7 +513,7 @@ function xt({
512
513
  row: i,
513
514
  fields: r,
514
515
  relations: b,
515
- collection: c ?? "",
516
+ collection: d ?? "",
516
517
  onChange: ($) => O((ie) => ie.map((Q, ye) => ye === q ? $ : Q)),
517
518
  onRemove: () => O(($) => $.filter((ie, Q) => Q !== q))
518
519
  },
@@ -527,14 +528,14 @@ function xt({
527
528
  className: "flex items-center gap-2 rounded-md border border-slate-200 bg-white px-2 py-1.5",
528
529
  children: [
529
530
  /* @__PURE__ */ e(
530
- ce,
531
+ de,
531
532
  {
532
533
  userId: i.user,
533
534
  className: "h-6 w-6",
534
535
  fallback: /* @__PURE__ */ e("span", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-nvr-cyan/10 text-[10px] font-medium text-nvr-cyan", children: he(i) })
535
536
  }
536
537
  ),
537
- /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-[12px] text-slate-700", children: We(i) }),
538
+ /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-[12px] text-slate-700", children: Ye(i) }),
538
539
  /* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: i.email }),
539
540
  /* @__PURE__ */ e(
540
541
  "button",
@@ -555,7 +556,7 @@ function xt({
555
556
  me,
556
557
  {
557
558
  value: A,
558
- onChange: U,
559
+ onChange: D,
559
560
  users: s ?? [],
560
561
  placeholder: "Add a user…"
561
562
  }
@@ -585,7 +586,7 @@ function xt({
585
586
  size: "sm",
586
587
  variant: "ghost",
587
588
  className: "text-[12px]",
588
- onClick: B,
589
+ onClick: K,
589
590
  children: "Cancel"
590
591
  }
591
592
  ),
@@ -640,7 +641,7 @@ function xt({
640
641
  size: "sm",
641
642
  variant: "ghost",
642
643
  className: "h-6 gap-1 text-[11px]",
643
- onClick: () => D((a) => [...a, { field: "", op: "eq", value: "" }]),
644
+ onClick: () => U((a) => [...a, { field: "", op: "eq", value: "" }]),
644
645
  children: [
645
646
  /* @__PURE__ */ e(V, { className: "h-3 w-3" }),
646
647
  "Add Filter"
@@ -655,9 +656,9 @@ function xt({
655
656
  row: a,
656
657
  fields: r,
657
658
  relations: b,
658
- collection: c ?? "",
659
- onChange: (y) => D((i) => i.map((q, $) => $ === p ? y : q)),
660
- onRemove: () => D((y) => y.filter((i, q) => q !== p))
659
+ collection: d ?? "",
660
+ onChange: (y) => U((i) => i.map((q, $) => $ === p ? y : q)),
661
+ onRemove: () => U((y) => y.filter((i, q) => q !== p))
661
662
  },
662
663
  p
663
664
  ))
@@ -667,7 +668,7 @@ function xt({
667
668
  /* @__PURE__ */ e(
668
669
  me,
669
670
  {
670
- value: K,
671
+ value: B,
671
672
  onChange: ae,
672
673
  users: s ?? [],
673
674
  placeholder: "Select a user…"
@@ -715,5 +716,5 @@ function xt({
715
716
  ] });
716
717
  }
717
718
  export {
718
- xt as PipelineStateOwners
719
+ vt as PipelineStateOwners
719
720
  };