@nivaro/react 0.3.58 → 0.3.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/components/fields/RelationField.js +110 -80
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/useRelationOptions.js +1 -0
  4. package/dist/hooks/useSessionRecorder.js +1 -1
  5. package/dist/index.d.ts +32 -1
  6. package/dist/index.js +523 -520
  7. package/dist/shared/components/CollectionBrowserView.js +2083 -2052
  8. package/dist/shared/components/DataTable.js +497 -465
  9. package/dist/shared/components/ItemEditForm.js +4430 -4282
  10. package/dist/shared/components/PageRenderer.js +537 -508
  11. package/dist/shared/components/QueryTable.js +74 -74
  12. package/dist/shared/components/WidgetSlot.js +543 -520
  13. package/dist/shared/components/alerts/AlertManagerView.js +269 -275
  14. package/dist/shared/components/alerts/types.js +37 -14
  15. package/dist/shared/components/item-edit/FieldRenderer.js +22 -20
  16. package/dist/shared/components/item-edit/GridBulkEditDialog.js +55 -54
  17. package/dist/shared/components/item-edit/InlineTableField.js +2461 -2421
  18. package/dist/shared/components/item-edit/M2MCombobox.js +141 -137
  19. package/dist/shared/components/item-edit/PlanGrid.js +876 -820
  20. package/dist/shared/components/item-edit/QuickCreateButton.js +323 -130
  21. package/dist/shared/components/item-edit/RelationCombobox.js +408 -375
  22. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +255 -156
  23. package/dist/shared/components/item-edit/SummaryPanel.js +356 -343
  24. package/dist/shared/components/item-edit/duplicate-rehearsal.js +47 -0
  25. package/dist/shared/components/item-edit/line-midair.js +82 -75
  26. package/dist/shared/components/item-edit/save-outcome.js +6 -4
  27. package/dist/shared/components/panels/ItemLockBanner.js +212 -209
  28. package/dist/shared/components/panels/PipelinePanel.js +775 -737
  29. package/dist/shared/components/panels/RecordIntegrityBanner.js +114 -86
  30. package/dist/shared/components/panels/RevisionsPanel.js +313 -299
  31. package/dist/shared/components/pipeline/PipelineEditorView.js +26 -16
  32. package/dist/shared/components/queue/QueueQuickFilters.js +13 -13
  33. package/dist/shared/components/queue/QueueWorklist.js +978 -953
  34. package/dist/shared/components/queue/live-state-aspect.js +9 -5
  35. package/dist/shared/components/widgets/ReviewListWidget.js +152 -149
  36. package/dist/shared/lib/display-prefs.js +60 -52
  37. package/dist/shared/lib/draft-store.js +71 -48
  38. package/dist/shared/lib/expression.js +53 -53
  39. package/dist/shared/lib/list-page-memory.js +42 -20
  40. package/dist/shared/lib/money-input.js +45 -0
  41. package/dist/shared/lib/sanitize-html.js +10 -6
  42. package/dist/shared/lib/staged-row-labels.js +18 -0
  43. package/package.json +1 -1
@@ -2208,7 +2208,7 @@ function bs({
2208
2208
  ] })
2209
2209
  ] });
2210
2210
  }
2211
- function wn({
2211
+ function kn({
2212
2212
  templateId: a,
2213
2213
  onBack: n,
2214
2214
  onExport: c,
@@ -3306,13 +3306,13 @@ function wn({
3306
3306
  ] }),
3307
3307
  /* @__PURE__ */ e(za, { templateId: a, states: st, bindings: ue })
3308
3308
  ] }),
3309
- j && /* @__PURE__ */ e(As, { onClose: () => K(!1) }),
3309
+ j && /* @__PURE__ */ e(Ds, { onClose: () => K(!1) }),
3310
3310
  !o.has("simulator") && /* @__PURE__ */ e(qs, { bindings: ue }),
3311
- !o.has("canvas") && /* @__PURE__ */ e(Rs, { templateId: a }),
3312
- !o.has("flow-map") && /* @__PURE__ */ e(Ps, { templateId: a }),
3311
+ !o.has("canvas") && /* @__PURE__ */ e(Ps, { templateId: a }),
3312
+ !o.has("flow-map") && /* @__PURE__ */ e(Ts, { templateId: a }),
3313
3313
  !o.has("cumulative-flow") && /* @__PURE__ */ e(Pa, { templateId: a }),
3314
- !o.has("replay") && /* @__PURE__ */ e(Ts, { templateId: a }),
3315
- !o.has("migration") && /* @__PURE__ */ e(Os, { templateId: a }),
3314
+ !o.has("replay") && /* @__PURE__ */ e(As, { templateId: a }),
3315
+ !o.has("migration") && /* @__PURE__ */ e(Rs, { templateId: a }),
3316
3316
  !o.has("lint") && /* @__PURE__ */ e(Qa, { templateId: a }),
3317
3317
  !o.has("coverage") && /* @__PURE__ */ e(Es, { templateId: a, states: re }),
3318
3318
  !o.has("skip-report") && /* @__PURE__ */ e(Wa, { templateId: a }),
@@ -4616,13 +4616,19 @@ function Es({
4616
4616
  " ",
4617
4617
  "already matches",
4618
4618
  " ",
4619
- Mt(F.suggestion.matched_filters.join(", ")) || "nothing"
4619
+ Mt(
4620
+ F.suggestion.matched_labels,
4621
+ F.suggestion.matched_filters
4622
+ ) || "nothing"
4620
4623
  ] }),
4621
4624
  F.suggestion.mismatched_filters.length > 0 && /* @__PURE__ */ t("span", { className: "text-amber-700 dark:text-amber-400", children: [
4622
4625
  " ",
4623
4626
  "— it misses",
4624
4627
  " ",
4625
- Mt(F.suggestion.mismatched_filters.join(", ")),
4628
+ Mt(
4629
+ F.suggestion.missing_labels,
4630
+ F.suggestion.mismatched_filters
4631
+ ),
4626
4632
  ", so assigning creates a group for this combination"
4627
4633
  ] })
4628
4634
  ] }) : /* @__PURE__ */ t("span", { className: "inline-flex items-center gap-1 text-amber-700 dark:text-amber-400", children: [
@@ -4676,10 +4682,13 @@ function Xt(a) {
4676
4682
  const c = n[n.length - 1].replace(/s$/i, "");
4677
4683
  return Jt(c);
4678
4684
  }
4679
- function Mt(a) {
4685
+ function Os(a) {
4680
4686
  return a.replace(/[a-z_]+(?:\.[a-z_]+)+/g, (n) => Xt(n));
4681
4687
  }
4682
- function Os({ templateId: a }) {
4688
+ function Mt(a, n) {
4689
+ return Array.isArray(a) && a.length > 0 ? a.join(", ") : Os(n.map((c) => c.replace(/ \(wants \d+\)$/, "")).join(", "));
4690
+ }
4691
+ function Rs({ templateId: a }) {
4683
4692
  const n = Z(), c = ke(), [g, l] = $(""), [x, o] = $(""), [r, h] = $(!1), { data: v } = H({
4684
4693
  queryKey: ["instance-distribution", a],
4685
4694
  queryFn: () => n.request(V(`/pipelines/${a}/instance-distribution`)),
@@ -4796,7 +4805,7 @@ function Os({ templateId: a }) {
4796
4805
  ] })
4797
4806
  ] });
4798
4807
  }
4799
- function Rs({ templateId: a }) {
4808
+ function Ps({ templateId: a }) {
4800
4809
  const n = Z(), [c, g] = $(
4801
4810
  null
4802
4811
  ), [l, x] = $(() => {
@@ -5093,7 +5102,7 @@ function Rs({ templateId: a }) {
5093
5102
  ] })
5094
5103
  ] });
5095
5104
  }
5096
- function Ps({ templateId: a }) {
5105
+ function Ts({ templateId: a }) {
5097
5106
  var L, O;
5098
5107
  const n = Z(), [c, g] = $(90), [l, x] = $(null), { data: o } = H({
5099
5108
  queryKey: ["flow-map", a, c],
@@ -5254,7 +5263,7 @@ function Ps({ templateId: a }) {
5254
5263
  ] })
5255
5264
  ] });
5256
5265
  }
5257
- function Ts({ templateId: a }) {
5266
+ function As({ templateId: a }) {
5258
5267
  const n = Z(), [c, g] = $(90), [l, x] = $(0), [o, r] = $(!1), [h, v] = $(!0), { data: u } = H({
5259
5268
  queryKey: ["pipeline-replay", a, c],
5260
5269
  queryFn: () => n.request(V(`/pipelines/${a}/replay`, { days: c })).then((w) => w.data),
@@ -5384,7 +5393,7 @@ function Ts({ templateId: a }) {
5384
5393
  ] })
5385
5394
  ] });
5386
5395
  }
5387
- function As({ onClose: a }) {
5396
+ function Ds({ onClose: a }) {
5388
5397
  return xe(() => {
5389
5398
  const n = (c) => {
5390
5399
  c.key === "Escape" && a();
@@ -5425,8 +5434,9 @@ function As({ onClose: a }) {
5425
5434
  export {
5426
5435
  ys as AiReviewCard,
5427
5436
  Es as OwnerGapsCard,
5428
- wn as PipelineEditorView,
5437
+ kn as PipelineEditorView,
5429
5438
  qs as PipelineSimulatorCard,
5430
5439
  ws as splitStartNote,
5431
- Gt as splitStartOptions
5440
+ Gt as splitStartOptions,
5441
+ Mt as suggestionList
5432
5442
  };
@@ -1,26 +1,26 @@
1
- import { jsxs as f, jsx as c, Fragment as S } from "react/jsx-runtime";
2
- import { useQuery as v } from "@tanstack/react-query";
3
- import { useState as x, useEffect as N, useMemo as w } from "react";
4
- import { MultiPick as q } from "../CollectionBrowserView.js";
1
+ import { jsxs as v, jsx as c, Fragment as q } from "react/jsx-runtime";
2
+ import { useQuery as S } from "@tanstack/react-query";
3
+ import { useState as x, useEffect as N, useMemo as C } from "react";
4
+ import { MultiPick as f } from "../CollectionBrowserView.js";
5
5
  const b = (r) => Array.isArray(r) ? r : r ? [r] : [];
6
- function C({
6
+ function O({
7
7
  def: r,
8
8
  selected: n,
9
9
  onChange: g,
10
10
  badge: u,
11
11
  narrowBy: p
12
12
  }) {
13
- const [i, d] = x(!1), [o, h] = x(""), y = r.loadOptions, e = JSON.stringify(p), { data: a = [], isLoading: l } = v({
13
+ const [i, d] = x(!1), [o, h] = x(""), y = r.loadOptions, e = JSON.stringify(p), { data: a = [], isLoading: l } = S({
14
14
  queryKey: ["queue-quick-facet", r.key, o, e],
15
15
  queryFn: () => y ? y(o, { narrowBy: p }) : Promise.resolve([]),
16
16
  enabled: !!y && (i || n.length > 0),
17
17
  staleTime: 6e4
18
- }), m = w(() => {
18
+ }), m = C(() => {
19
19
  const s = new Set(a.map((t) => t.value));
20
20
  return [...a, ...n.filter((t) => !s.has(t)).map((t) => ({ label: t, value: t }))];
21
21
  }, [a, n]);
22
22
  return /* @__PURE__ */ c(
23
- q,
23
+ f,
24
24
  {
25
25
  label: r.placeholder,
26
26
  options: m,
@@ -52,7 +52,7 @@ function Q({
52
52
  const y = r.some(
53
53
  (e) => JSON.stringify(o[e.key] ?? []) !== JSON.stringify(b(n[e.key]))
54
54
  );
55
- return r.length === 0 && !i ? null : /* @__PURE__ */ f(
55
+ return r.length === 0 && !i ? null : /* @__PURE__ */ v(
56
56
  "div",
57
57
  {
58
58
  className: "flex shrink-0 flex-wrap items-center gap-1.5 border-b border-slate-100 bg-white px-4 py-1.5 dark:border-slate-800 dark:bg-slate-900",
@@ -78,7 +78,7 @@ function Q({
78
78
  values: o[t.key] ?? []
79
79
  }));
80
80
  return e.loadOptions ? /* @__PURE__ */ c(
81
- C,
81
+ O,
82
82
  {
83
83
  def: e,
84
84
  selected: a,
@@ -88,7 +88,7 @@ function Q({
88
88
  },
89
89
  e.key
90
90
  ) : /* @__PURE__ */ c(
91
- q,
91
+ f,
92
92
  {
93
93
  label: e.placeholder,
94
94
  options: e.options ?? [],
@@ -99,7 +99,7 @@ function Q({
99
99
  e.key
100
100
  );
101
101
  }),
102
- r.length > 0 && /* @__PURE__ */ f(S, { children: [
102
+ r.length > 0 && /* @__PURE__ */ v(q, { children: [
103
103
  /* @__PURE__ */ c(
104
104
  "button",
105
105
  {
@@ -112,7 +112,7 @@ function Q({
112
112
  }
113
113
  u(e);
114
114
  },
115
- className: `h-6 rounded px-2.5 text-[11px] font-semibold text-white transition-[filter] hover:brightness-110 ${y ? "bg-nvr-cyan" : "bg-nvr-cyan opacity-60"}`,
115
+ className: `h-6 rounded px-2.5 text-[11px] font-semibold transition-[filter] hover:brightness-110 ${y ? "bg-nvr-cyan text-nvr-navy" : "bg-nvr-cyan/15 text-nvr-navy dark:text-nvr-cyan"}`,
116
116
  "data-queue-quick-apply": !0,
117
117
  children: "Apply"
118
118
  }