@nivaro/react 0.3.111 → 0.3.113
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/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +207 -3
- package/dist/index.js +745 -728
- package/dist/shared/components/CollectionBrowserView.js +3133 -2954
- package/dist/shared/components/CollectionImportBanner.js +135 -0
- package/dist/shared/components/ItemEditForm.js +2235 -2218
- package/dist/shared/components/JobsTray.js +54 -47
- package/dist/shared/components/ViewAsPersonButton.js +109 -0
- package/dist/shared/components/bulk/BulkFieldUpdate.js +228 -150
- package/dist/shared/components/bulk/BulkFieldUpdateButton.js +35 -41
- package/dist/shared/components/bulk/BulkLinksValue.js +91 -0
- package/dist/shared/components/bulk/bulk-field-options.js +20 -19
- package/dist/shared/components/bulk/bulk-update-preview.js +39 -0
- package/dist/shared/components/cbv/ColumnHeaderMenu.js +130 -0
- package/dist/shared/components/cbv/column-totals.js +163 -0
- package/dist/shared/components/collections-directory/CollectionHoverCard.js +108 -81
- package/dist/shared/components/collections-directory/CollectionRow.js +164 -148
- package/dist/shared/components/collections-directory/CollectionsDirectory.js +167 -166
- package/dist/shared/components/collections-directory/directory-data.js +70 -58
- package/dist/shared/components/imports/CollectionImportPanel.js +120 -118
- package/dist/shared/components/imports/DefinitionsPanel.js +24 -24
- package/dist/shared/components/imports/ImportDuplicatesNotice.js +65 -0
- package/dist/shared/components/item-edit/CatalogPickerField.js +631 -639
- package/dist/shared/components/item-edit/DuplicateNotice.js +168 -0
- package/dist/shared/components/item-edit/FieldRow.js +248 -246
- package/dist/shared/components/item-edit/InlineGridField.js +34 -33
- package/dist/shared/components/item-edit/InlineTableField.js +3002 -2825
- package/dist/shared/components/item-edit/MembershipSetField.js +165 -169
- package/dist/shared/components/item-edit/NestedRelationEditor.js +184 -189
- package/dist/shared/components/item-edit/PlanGrid.js +2 -1
- package/dist/shared/components/item-edit/QuickPickerDialog.js +35 -34
- package/dist/shared/components/item-edit/RecordLiveSync.js +32 -30
- package/dist/shared/components/item-edit/RelationCombobox.js +101 -100
- package/dist/shared/components/item-edit/RowHistorySheet.js +28 -27
- package/dist/shared/components/item-edit/SummaryPanel.js +133 -135
- package/dist/shared/components/item-edit/UserChip.js +262 -239
- package/dist/shared/components/item-edit/ViewAsRole.js +129 -52
- package/dist/shared/components/item-edit/grid-search.js +375 -0
- package/dist/shared/components/item-edit/render-stability.js +61 -54
- package/dist/shared/components/notifications/NotificationRulesEditor.js +25 -20
- package/dist/shared/components/ops-report/DigestSections.js +163 -144
- package/dist/shared/components/ops-report/drill.js +97 -97
- package/dist/shared/components/panels/AddendumLinesDiff.js +52 -51
- package/dist/shared/components/panels/AddendumPanel.js +92 -91
- package/dist/shared/components/panels/AsyncUserPicker.js +108 -0
- package/dist/shared/components/panels/CommentPanel.js +265 -252
- package/dist/shared/components/panels/OwnersSlot.js +47 -35
- package/dist/shared/components/panels/PipelineInsight.js +186 -0
- package/dist/shared/components/panels/PipelinePanel.js +1440 -1397
- package/dist/shared/components/panels/RecordIntegrityBanner.js +39 -38
- package/dist/shared/components/panels/RevisionsPanel.js +261 -260
- package/dist/shared/components/panels/StandInReason.js +69 -0
- package/dist/shared/components/pipeline/FieldPicker.js +41 -40
- package/dist/shared/components/pipeline/OwnerMatrix.js +829 -700
- package/dist/shared/components/pipeline/OwnerRecordTrial.js +362 -0
- package/dist/shared/components/pipeline/PipelineEditorView.js +483 -467
- package/dist/shared/components/pipeline/PipelineStateOwners.js +65 -64
- package/dist/shared/components/pipeline/owner-matrix-draft.js +178 -0
- package/dist/shared/components/profile/MyDefaultsCard.js +36 -35
- package/dist/shared/components/profile/PersonHeader.js +29 -29
- package/dist/shared/components/profile/PersonProfile.js +30 -28
- package/dist/shared/components/profile/SlowScreensCard.js +286 -0
- package/dist/shared/components/queue/QueueWorklist.js +1090 -1071
- package/dist/shared/components/quick-filters/useQuickFilterEditing.js +45 -44
- package/dist/shared/components/support/TicketDetailSheet.js +25 -16
- package/dist/shared/components/support/TicketSlowScreens.js +32 -0
- package/dist/shared/lib/activity-sentence.js +224 -178
- package/dist/shared/lib/collection-import-banner.js +27 -0
- package/dist/shared/lib/crash-report.js +112 -0
- package/dist/shared/lib/export-runs.js +99 -0
- package/dist/shared/lib/jobs-tray.js +89 -67
- package/dist/shared/lib/list-link.js +76 -69
- package/dist/shared/lib/nav-trail.js +180 -76
- package/dist/shared/lib/query-keys.js +26 -0
- package/dist/shared/lib/view-as.js +16 -11
- package/package.json +1 -1
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { jsxs as l, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { ArrowRight as k, ArrowLeft as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { titleCase as f, formatRelative as
|
|
5
|
-
import { Popover as
|
|
2
|
+
import { AlertTriangle as b, ArrowRight as k, ArrowLeft as w, Workflow as y, LayoutTemplate as v } from "lucide-react";
|
|
3
|
+
import { useState as C, useRef as _, useCallback as d, useEffect as u } from "react";
|
|
4
|
+
import { formatNumber as h, titleCase as f, formatRelative as P, formatDateTime as $ } from "../../lib/utils.js";
|
|
5
|
+
import { Popover as A, PopoverAnchor as S, PopoverContent as E } from "../ui/popover.js";
|
|
6
6
|
import { Skeleton as c } from "../ui/skeleton.js";
|
|
7
|
-
import { useCollectionSummary as
|
|
8
|
-
const
|
|
9
|
-
function
|
|
10
|
-
const [n, i] =
|
|
11
|
-
|
|
7
|
+
import { useCollectionSummary as L } from "./directory-data.js";
|
|
8
|
+
const T = 400, O = 150, N = 6;
|
|
9
|
+
function U(s, e = T) {
|
|
10
|
+
const [n, i] = C(!1), o = _(null), t = d(() => {
|
|
11
|
+
o.current && clearTimeout(o.current), o.current = null;
|
|
12
12
|
}, []), m = d(() => {
|
|
13
|
-
s && (
|
|
14
|
-
}, [s,
|
|
15
|
-
|
|
16
|
-
}, [
|
|
17
|
-
|
|
18
|
-
}, [
|
|
19
|
-
return u(() =>
|
|
20
|
-
s ||
|
|
21
|
-
}, [s,
|
|
13
|
+
s && (t(), o.current = setTimeout(() => i(!0), e));
|
|
14
|
+
}, [s, t, e]), p = d(() => {
|
|
15
|
+
t(), o.current = setTimeout(() => i(!1), O);
|
|
16
|
+
}, [t]), r = d(() => {
|
|
17
|
+
t(), i(!1);
|
|
18
|
+
}, [t]);
|
|
19
|
+
return u(() => t, [t]), u(() => {
|
|
20
|
+
s || r();
|
|
21
|
+
}, [s, r]), { open: n, show: m, hide: p, cancel: t, close: r };
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function g({ items: s }) {
|
|
24
24
|
if (s.length === 0)
|
|
25
25
|
return /* @__PURE__ */ a("p", { className: "text-[11px] text-slate-400 dark:text-slate-500", children: "None" });
|
|
26
|
-
const
|
|
26
|
+
const e = s.slice(0, N), n = s.slice(N);
|
|
27
27
|
return /* @__PURE__ */ l("div", { className: "flex flex-wrap gap-1", children: [
|
|
28
|
-
|
|
28
|
+
e.map((i) => /* @__PURE__ */ a(
|
|
29
29
|
"span",
|
|
30
30
|
{
|
|
31
31
|
"data-tip": i.tip,
|
|
@@ -47,131 +47,158 @@ function N({ items: s }) {
|
|
|
47
47
|
)
|
|
48
48
|
] });
|
|
49
49
|
}
|
|
50
|
-
function x({ icon: s, children:
|
|
50
|
+
function x({ icon: s, children: e }) {
|
|
51
51
|
return /* @__PURE__ */ l("p", { className: "mb-1 flex items-center gap-1 text-[10px] font-semibold uppercase tracking-wide text-slate-400 dark:text-slate-500", children: [
|
|
52
52
|
s,
|
|
53
|
-
|
|
53
|
+
e
|
|
54
54
|
] });
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
|
|
56
|
+
function j({ flag: s }) {
|
|
57
|
+
return /* @__PURE__ */ l(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
"data-heavy-list-note": !0,
|
|
61
|
+
className: "flex gap-2 rounded-md bg-amber-50 px-2 py-1.5 text-[11.5px] leading-snug text-amber-800 ring-1 ring-inset ring-amber-200 dark:bg-amber-400/10 dark:text-amber-200 dark:ring-amber-400/25",
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ a(b, { className: "mt-px h-3.5 w-3.5 shrink-0", "aria-hidden": "true" }),
|
|
64
|
+
/* @__PURE__ */ l("div", { className: "min-w-0", children: [
|
|
65
|
+
/* @__PURE__ */ a("p", { className: "font-medium", children: "Heavy list columns" }),
|
|
66
|
+
/* @__PURE__ */ a("ul", { className: "mt-0.5 space-y-px", children: s.fields.map((e) => /* @__PURE__ */ l("li", { children: [
|
|
67
|
+
e.label,
|
|
68
|
+
": up to ",
|
|
69
|
+
h(e.max),
|
|
70
|
+
" per record (avg",
|
|
71
|
+
" ",
|
|
72
|
+
h(Math.round(e.avg)),
|
|
73
|
+
")"
|
|
74
|
+
] }, e.field)) }),
|
|
75
|
+
/* @__PURE__ */ a("p", { className: "mt-0.5 text-amber-700/90 dark:text-amber-300/80", children: "The list opens on them. Fix it in Data model → Collection Browser." })
|
|
76
|
+
] })
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
function D({ collection: s }) {
|
|
82
|
+
const { data: e, isLoading: n, isError: i } = L(s, !0);
|
|
58
83
|
if (n)
|
|
59
84
|
return /* @__PURE__ */ l("div", { className: "space-y-2", role: "status", "aria-busy": "true", "aria-label": "Loading summary", children: [
|
|
60
85
|
/* @__PURE__ */ a(c, { className: "h-3 w-24" }),
|
|
61
|
-
[0, 1, 2, 3, 4].map((
|
|
86
|
+
[0, 1, 2, 3, 4].map((t) => /* @__PURE__ */ l("div", { className: "flex justify-between gap-4", children: [
|
|
62
87
|
/* @__PURE__ */ a(c, { className: "h-3 w-32" }),
|
|
63
88
|
/* @__PURE__ */ a(c, { className: "h-3 w-12" })
|
|
64
|
-
] },
|
|
89
|
+
] }, t)),
|
|
65
90
|
/* @__PURE__ */ a(c, { className: "h-3 w-20" }),
|
|
66
91
|
/* @__PURE__ */ a(c, { className: "h-4 w-full" })
|
|
67
92
|
] });
|
|
68
|
-
if (i || !
|
|
93
|
+
if (i || !e)
|
|
69
94
|
return /* @__PURE__ */ a("p", { className: "text-[12px] text-slate-500 dark:text-slate-400", children: "Couldn't load this collection's summary." });
|
|
70
|
-
const
|
|
95
|
+
const o = Math.max(0, e.field_count - e.fields.length);
|
|
71
96
|
return /* @__PURE__ */ l("div", { className: "space-y-3", children: [
|
|
72
97
|
/* @__PURE__ */ l("div", { children: [
|
|
73
98
|
/* @__PURE__ */ l(x, { children: [
|
|
74
|
-
|
|
99
|
+
e.field_count,
|
|
75
100
|
" field",
|
|
76
|
-
|
|
101
|
+
e.field_count === 1 ? "" : "s"
|
|
77
102
|
] }),
|
|
78
|
-
|
|
103
|
+
e.fields.length === 0 ? /* @__PURE__ */ a("p", { className: "text-[11px] text-slate-400 dark:text-slate-500", children: "No fields yet" }) : /* @__PURE__ */ a("ul", { className: "space-y-0.5", children: e.fields.slice(0, 8).map((t) => /* @__PURE__ */ l("li", { className: "flex items-baseline justify-between gap-3 text-[12px]", children: [
|
|
79
104
|
/* @__PURE__ */ a(
|
|
80
105
|
"span",
|
|
81
106
|
{
|
|
82
107
|
className: "truncate text-slate-700 dark:text-slate-200",
|
|
83
|
-
"data-tip":
|
|
84
|
-
children:
|
|
108
|
+
"data-tip": t.label !== t.field ? t.field : void 0,
|
|
109
|
+
children: t.label || t.field
|
|
85
110
|
}
|
|
86
111
|
),
|
|
87
|
-
/* @__PURE__ */ a("span", { className: "shrink-0 font-mono text-[10px] text-slate-400 dark:text-slate-500", children:
|
|
88
|
-
] },
|
|
89
|
-
|
|
112
|
+
/* @__PURE__ */ a("span", { className: "shrink-0 font-mono text-[10px] text-slate-400 dark:text-slate-500", children: t.type })
|
|
113
|
+
] }, t.field)) }),
|
|
114
|
+
o > 0 && /* @__PURE__ */ l("p", { className: "mt-0.5 text-[11px] text-slate-400 dark:text-slate-500", children: [
|
|
90
115
|
"and ",
|
|
91
|
-
|
|
116
|
+
o,
|
|
92
117
|
" more"
|
|
93
118
|
] })
|
|
94
119
|
] }),
|
|
95
120
|
/* @__PURE__ */ l("div", { children: [
|
|
96
121
|
/* @__PURE__ */ a(x, { icon: /* @__PURE__ */ a(k, { className: "h-2.5 w-2.5" }), children: "Points to" }),
|
|
97
122
|
/* @__PURE__ */ a(
|
|
98
|
-
|
|
123
|
+
g,
|
|
99
124
|
{
|
|
100
|
-
items:
|
|
101
|
-
key: `${
|
|
102
|
-
label: f(
|
|
103
|
-
tip: `${
|
|
125
|
+
items: e.relations_out.map((t) => ({
|
|
126
|
+
key: `${t.field}:${t.collection}`,
|
|
127
|
+
label: f(t.collection),
|
|
128
|
+
tip: `${t.field} → ${t.collection}`
|
|
104
129
|
}))
|
|
105
130
|
}
|
|
106
131
|
)
|
|
107
132
|
] }),
|
|
108
133
|
/* @__PURE__ */ l("div", { children: [
|
|
109
|
-
/* @__PURE__ */ a(x, { icon: /* @__PURE__ */ a(
|
|
134
|
+
/* @__PURE__ */ a(x, { icon: /* @__PURE__ */ a(w, { className: "h-2.5 w-2.5" }), children: "Used by" }),
|
|
110
135
|
/* @__PURE__ */ a(
|
|
111
|
-
|
|
136
|
+
g,
|
|
112
137
|
{
|
|
113
|
-
items:
|
|
114
|
-
key: `${
|
|
115
|
-
label: f(
|
|
116
|
-
tip: `${
|
|
138
|
+
items: e.relations_in.map((t) => ({
|
|
139
|
+
key: `${t.collection}:${t.field}`,
|
|
140
|
+
label: f(t.collection),
|
|
141
|
+
tip: `${t.collection}.${t.field}`
|
|
117
142
|
}))
|
|
118
143
|
}
|
|
119
144
|
)
|
|
120
145
|
] }),
|
|
121
|
-
(
|
|
122
|
-
|
|
123
|
-
/* @__PURE__ */ a(w, { className: "h-3 w-3 shrink-0 text-slate-400 dark:text-slate-500" }),
|
|
124
|
-
/* @__PURE__ */ a("span", { className: "truncate", children: t.pipeline })
|
|
125
|
-
] }),
|
|
126
|
-
t.forms > 0 && /* @__PURE__ */ l("span", { className: "inline-flex items-center gap-1", children: [
|
|
146
|
+
(e.pipeline || e.forms > 0) && /* @__PURE__ */ l("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-[11px] text-slate-600 dark:text-slate-300", children: [
|
|
147
|
+
e.pipeline && /* @__PURE__ */ l("span", { className: "inline-flex min-w-0 items-center gap-1", children: [
|
|
127
148
|
/* @__PURE__ */ a(y, { className: "h-3 w-3 shrink-0 text-slate-400 dark:text-slate-500" }),
|
|
128
|
-
|
|
149
|
+
/* @__PURE__ */ a("span", { className: "truncate", children: e.pipeline })
|
|
150
|
+
] }),
|
|
151
|
+
e.forms > 0 && /* @__PURE__ */ l("span", { className: "inline-flex items-center gap-1", children: [
|
|
152
|
+
/* @__PURE__ */ a(v, { className: "h-3 w-3 shrink-0 text-slate-400 dark:text-slate-500" }),
|
|
153
|
+
e.forms,
|
|
129
154
|
" form",
|
|
130
|
-
|
|
155
|
+
e.forms === 1 ? "" : "s"
|
|
131
156
|
] })
|
|
132
157
|
] }),
|
|
133
|
-
/* @__PURE__ */ a("p", { className: "border-t border-slate-100 pt-2 text-[11px] text-slate-500 dark:border-white/[0.06] dark:text-slate-400", children:
|
|
158
|
+
/* @__PURE__ */ a("p", { className: "border-t border-slate-100 pt-2 text-[11px] text-slate-500 dark:border-white/[0.06] dark:text-slate-400", children: e.last_edit ? /* @__PURE__ */ l("span", { "data-tip": $(e.last_edit.at), children: [
|
|
134
159
|
"Edited ",
|
|
135
|
-
|
|
136
|
-
|
|
160
|
+
P(e.last_edit.at),
|
|
161
|
+
e.last_edit.user ? ` by ${e.last_edit.user}` : ""
|
|
137
162
|
] }) : "No edits in the last 90 days" })
|
|
138
163
|
] });
|
|
139
164
|
}
|
|
140
|
-
function
|
|
165
|
+
function W({
|
|
141
166
|
collection: s,
|
|
142
|
-
title:
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
167
|
+
title: e,
|
|
168
|
+
heavyList: n,
|
|
169
|
+
open: i,
|
|
170
|
+
onClose: o,
|
|
171
|
+
onCardEnter: t,
|
|
172
|
+
onCardLeave: m,
|
|
173
|
+
children: p
|
|
148
174
|
}) {
|
|
149
|
-
return /* @__PURE__ */ l(
|
|
150
|
-
/* @__PURE__ */ a(
|
|
151
|
-
|
|
152
|
-
|
|
175
|
+
return /* @__PURE__ */ l(A, { open: i, onOpenChange: (r) => !r && o(), children: [
|
|
176
|
+
/* @__PURE__ */ a(S, { asChild: !0, children: p }),
|
|
177
|
+
i && /* @__PURE__ */ l(
|
|
178
|
+
E,
|
|
153
179
|
{
|
|
154
180
|
side: "right",
|
|
155
181
|
align: "start",
|
|
156
182
|
sideOffset: 12,
|
|
157
183
|
collisionPadding: 12,
|
|
158
184
|
avoidCollisions: !0,
|
|
159
|
-
onOpenAutoFocus: (
|
|
160
|
-
onCloseAutoFocus: (
|
|
161
|
-
onPointerEnter:
|
|
162
|
-
onPointerLeave:
|
|
163
|
-
onClick: (
|
|
164
|
-
"aria-label": `${
|
|
185
|
+
onOpenAutoFocus: (r) => r.preventDefault(),
|
|
186
|
+
onCloseAutoFocus: (r) => r.preventDefault(),
|
|
187
|
+
onPointerEnter: t,
|
|
188
|
+
onPointerLeave: m,
|
|
189
|
+
onClick: (r) => r.stopPropagation(),
|
|
190
|
+
"aria-label": `${e} summary`,
|
|
165
191
|
className: "w-[320px] p-3 motion-reduce:animate-none",
|
|
166
192
|
children: [
|
|
167
|
-
/* @__PURE__ */ a("p", { className: "mb-2 truncate text-[13px] font-semibold text-slate-800 dark:text-slate-100", children:
|
|
168
|
-
/* @__PURE__ */ a(
|
|
193
|
+
/* @__PURE__ */ a("p", { className: "mb-2 truncate text-[13px] font-semibold text-slate-800 dark:text-slate-100", children: e }),
|
|
194
|
+
n && n.fields.length > 0 && /* @__PURE__ */ a("div", { className: "mb-2.5", children: /* @__PURE__ */ a(j, { flag: n }) }),
|
|
195
|
+
/* @__PURE__ */ a(D, { collection: s })
|
|
169
196
|
]
|
|
170
197
|
}
|
|
171
198
|
)
|
|
172
199
|
] });
|
|
173
200
|
}
|
|
174
201
|
export {
|
|
175
|
-
|
|
176
|
-
|
|
202
|
+
W as CollectionHoverCard,
|
|
203
|
+
U as useHoverIntent
|
|
177
204
|
};
|