@nivaro/react 0.3.117 → 0.3.119
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 +136 -14
- package/dist/index.js +488 -485
- package/dist/shared/components/ActivityEntry.js +130 -125
- package/dist/shared/components/AgentPresenceChip.js +36 -26
- package/dist/shared/components/CellCopyLayer.js +50 -45
- package/dist/shared/components/CollectionBrowserView.js +3757 -3695
- package/dist/shared/components/FilePreviewLightbox.js +96 -58
- package/dist/shared/components/InStep.js +18 -17
- package/dist/shared/components/ItemEditForm.js +4451 -4385
- package/dist/shared/components/JobsTray.js +8 -8
- package/dist/shared/components/LiveNewMatchesPill.js +21 -14
- package/dist/shared/components/LiveOffNote.js +3 -2
- package/dist/shared/components/LiveRowMark.js +53 -23
- package/dist/shared/components/LiveTraceView.js +162 -123
- package/dist/shared/components/MyWorkView.js +320 -299
- package/dist/shared/components/NotificationBell.js +14 -14
- package/dist/shared/components/OverflowRail.js +1 -1
- package/dist/shared/components/PageRenderer.js +120 -116
- package/dist/shared/components/ProfileView.js +203 -202
- package/dist/shared/components/RealtimeStatusBanner.js +31 -29
- package/dist/shared/components/RecordDrilldownSheet.js +7 -7
- package/dist/shared/components/RecordHoverCard.js +102 -84
- package/dist/shared/components/RecordReadView.js +146 -146
- package/dist/shared/components/ScreenRefreshButton.js +34 -32
- package/dist/shared/components/TipLayer.js +65 -58
- package/dist/shared/components/WidgetImageMenu.js +83 -43
- package/dist/shared/components/activity/RecordActivityStream.js +175 -173
- package/dist/shared/components/bulk/BulkSelectionNotices.js +142 -119
- package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +158 -143
- package/dist/shared/components/change-proposals/ProposeChangeButton.js +17 -11
- package/dist/shared/components/change-proposals/ProposeChangeDialog.js +201 -173
- package/dist/shared/components/chat/ChatAnalyticsView.js +27 -27
- package/dist/shared/components/chat/HuddleAnalyticsTab.js +17 -17
- package/dist/shared/components/collections-directory/CollectionsToolbar.js +39 -41
- package/dist/shared/components/collections-directory/page-model.js +72 -67
- package/dist/shared/components/integrations/RecordIntegrationPreview.js +48 -56
- package/dist/shared/components/integrations/SendStatus.js +65 -59
- package/dist/shared/components/integrations/console/ReadyToSendView.js +275 -209
- package/dist/shared/components/integrations/console/SignalCard.js +237 -230
- package/dist/shared/components/item-edit/CatalogPickerField.js +227 -205
- package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +135 -94
- package/dist/shared/components/item-edit/CloneDialog.js +191 -161
- package/dist/shared/components/item-edit/DerivedCauseNote.js +44 -30
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +153 -134
- package/dist/shared/components/item-edit/FieldComments.js +88 -85
- package/dist/shared/components/item-edit/FieldPointer.js +82 -67
- package/dist/shared/components/item-edit/FieldRow.js +106 -100
- package/dist/shared/components/item-edit/FieldSourceBadge.js +58 -56
- package/dist/shared/components/item-edit/FilePickerField.js +452 -387
- package/dist/shared/components/item-edit/HeaderSummaryChip.js +78 -56
- package/dist/shared/components/item-edit/HeaderTools.js +245 -141
- package/dist/shared/components/item-edit/InlineTableField.js +1242 -1218
- package/dist/shared/components/item-edit/ListNeighborNav.js +47 -50
- package/dist/shared/components/item-edit/LiveTraceSheet.js +15 -10
- package/dist/shared/components/item-edit/MembershipSetField.js +285 -254
- package/dist/shared/components/item-edit/OutboxReviewTray.js +155 -144
- package/dist/shared/components/item-edit/QueueReturnChip.js +15 -36
- package/dist/shared/components/item-edit/RecalcValue.js +57 -32
- package/dist/shared/components/item-edit/RecordHelpChip.js +15 -16
- package/dist/shared/components/item-edit/RecordLiveSync.js +283 -231
- package/dist/shared/components/item-edit/RelationCombobox.js +439 -393
- package/dist/shared/components/item-edit/RemoteChangeUi.js +292 -224
- package/dist/shared/components/item-edit/RemoteUploads.js +26 -20
- package/dist/shared/components/item-edit/RemovedLineNote.js +77 -67
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +184 -179
- package/dist/shared/components/item-edit/ScheduledChangeChip.js +168 -134
- package/dist/shared/components/item-edit/SectionPresence.js +18 -10
- package/dist/shared/components/item-edit/SplitLinesButton.js +163 -139
- package/dist/shared/components/item-edit/UserChip.js +1 -1
- package/dist/shared/components/item-edit/addendum-view.js +6 -0
- package/dist/shared/components/item-edit/file-live.js +69 -54
- package/dist/shared/components/item-edit/layout-switch.js +98 -89
- package/dist/shared/components/item-edit/partner-needs.js +12 -12
- package/dist/shared/components/item-edit/removed-line.js +31 -25
- package/dist/shared/components/layout-editor/pickers/field-picker.js +151 -130
- package/dist/shared/components/list/ListViewers.js +46 -35
- package/dist/shared/components/notifications/NotificationCenterView.js +479 -437
- package/dist/shared/components/panels/AccessDeniedPanel.js +176 -101
- package/dist/shared/components/panels/AlertBanners.js +82 -72
- package/dist/shared/components/panels/BranchLanes.js +22 -22
- package/dist/shared/components/panels/CommentImages.js +123 -102
- package/dist/shared/components/panels/CommentPanel.js +186 -185
- package/dist/shared/components/panels/ExternalRequestsChip.js +111 -119
- package/dist/shared/components/panels/OwnerOpenedLine.js +31 -24
- package/dist/shared/components/panels/PipelinePanel.js +2037 -1885
- package/dist/shared/components/panels/ResubmissionDiff.js +163 -142
- package/dist/shared/components/pipeline/OwnerMatrixSheet.js +400 -288
- package/dist/shared/components/pipeline/PipelineEditorView.js +7 -2
- package/dist/shared/components/profile/AgentNameField.js +107 -81
- package/dist/shared/components/profile/AgentsPanel.js +184 -184
- package/dist/shared/components/profile/PersonAccess.js +599 -495
- package/dist/shared/components/profile/SignInTroubleshooter.js +160 -127
- package/dist/shared/components/profile/SignedInDevices.js +17 -17
- package/dist/shared/components/profile/primitives.js +1 -1
- package/dist/shared/components/queue/OwnerAvatars.js +91 -54
- package/dist/shared/components/queue/QueueTeamStrip.js +56 -46
- package/dist/shared/components/queue/QueueWorklist.js +1002 -983
- package/dist/shared/components/support/AssignRules.js +1733 -0
- package/dist/shared/components/support/PersonPick.js +88 -0
- package/dist/shared/components/support/RequestList.js +790 -0
- package/dist/shared/components/support/ScreenShare.js +158 -152
- package/dist/shared/components/support/SupportRequestDialog.js +50 -48
- package/dist/shared/components/support/SupportView.js +140 -246
- package/dist/shared/components/support/TicketDetailSheet.js +82 -75
- package/dist/shared/components/support/TicketSlowScreens.js +9 -9
- package/dist/shared/components/support/assign-rules-text.js +171 -0
- package/dist/shared/components/support/support-list.js +125 -0
- package/dist/shared/components/ui/SimpleSelect.js +28 -20
- package/dist/shared/components/ui/checkbox.js +6 -6
- package/dist/shared/components/ui/select.js +43 -39
- package/dist/shared/components/ui/sheet.js +9 -9
- package/dist/shared/components/ui/switch.js +12 -11
- package/dist/shared/components/watch-list/WatchDock.js +532 -459
- package/dist/shared/components/watch-list/WatchExtras.js +332 -286
- package/dist/shared/components/watch-list/WatchRows.js +164 -140
- package/dist/shared/lib/activity-sentence.js +103 -91
- package/dist/shared/lib/agent-presence.js +27 -21
- package/dist/shared/lib/approval-progress.js +2 -2
- package/dist/shared/lib/copy-rules.js +31 -24
- package/dist/shared/lib/derived-causes.js +113 -78
- package/dist/shared/lib/grid-cursors.js +26 -26
- package/dist/shared/lib/label-flash.js +27 -0
- package/dist/shared/lib/list-return.js +137 -125
- package/dist/shared/lib/live-deltas.js +40 -34
- package/dist/shared/lib/live-groups.js +56 -52
- package/dist/shared/lib/live-preference.js +64 -59
- package/dist/shared/lib/live-screen.js +223 -192
- package/dist/shared/lib/partner-failure.js +11 -11
- package/dist/shared/lib/rollup-recalc.js +68 -64
- package/dist/shared/lib/screen-refresh.js +74 -68
- package/dist/shared/lib/screen-share.js +108 -104
- package/dist/shared/lib/send-status.js +77 -61
- package/dist/shared/lib/text-diff-window.js +29 -0
- package/dist/shared/lib/watch-list.js +210 -209
- package/dist/shared/lib/widget-image-render.js +72 -49
- package/package.json +1 -1
|
@@ -1,108 +1,130 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useQueryClient as
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import { useNivaroClient as
|
|
5
|
-
import { post as
|
|
6
|
-
import { HEADER_LABEL as
|
|
7
|
-
import { cn as
|
|
8
|
-
import { Popover as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsxs as n, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useQueryClient as F, useQuery as Q } from "@tanstack/react-query";
|
|
3
|
+
import { useEffect as E, useState as v, useRef as W } from "react";
|
|
4
|
+
import { useNivaroClient as K } from "../../context.js";
|
|
5
|
+
import { post as P } from "../../lib/commands.js";
|
|
6
|
+
import { HEADER_LABEL as V, HEADER_VALUE_LINE as j, HEADER_VALUE_HERO as B, HEADER_SUB as z, HEADER_TILE as G } from "../../lib/header-strip.js";
|
|
7
|
+
import { cn as U } from "../../lib/utils.js";
|
|
8
|
+
import { Popover as J, PopoverTrigger as M, PopoverContent as X } from "../ui/popover.js";
|
|
9
|
+
import { RecalcValue as Y } from "./RecalcValue.js";
|
|
10
|
+
function oe({
|
|
11
|
+
collection: o,
|
|
12
|
+
itemId: a,
|
|
13
|
+
field: i,
|
|
14
|
+
config: r,
|
|
15
|
+
onOpen: k,
|
|
16
|
+
recalculating: h,
|
|
17
|
+
...C
|
|
18
|
+
}) {
|
|
19
|
+
const R = K(), f = F();
|
|
20
|
+
E(() => {
|
|
12
21
|
let t = null;
|
|
13
|
-
const
|
|
14
|
-
var
|
|
15
|
-
if (
|
|
16
|
-
const
|
|
17
|
-
typeof
|
|
18
|
-
() => void
|
|
22
|
+
const _ = f.getQueryCache().subscribe((d) => {
|
|
23
|
+
var D;
|
|
24
|
+
if (d.type !== "updated" || ((D = d.action) == null ? void 0 : D.type) !== "success") return;
|
|
25
|
+
const m = d.query.queryKey, p = m == null ? void 0 : m[0];
|
|
26
|
+
typeof p != "string" || !p.startsWith("o2m-rows") && !p.startsWith("nested") || d.query.state.dataUpdateCount <= 1 || p.startsWith("o2m-rows") && String(m[3]) !== String(a) || (t && clearTimeout(t), t = setTimeout(
|
|
27
|
+
() => void f.invalidateQueries({ queryKey: ["child-summary", o, a] }),
|
|
19
28
|
400
|
|
20
29
|
));
|
|
21
30
|
});
|
|
22
31
|
return () => {
|
|
23
|
-
|
|
32
|
+
_(), t && clearTimeout(t);
|
|
24
33
|
};
|
|
25
|
-
}, [
|
|
26
|
-
const { data: e, isLoading:
|
|
27
|
-
queryKey: ["child-summary",
|
|
28
|
-
queryFn: () =>
|
|
29
|
-
|
|
30
|
-
field:
|
|
34
|
+
}, [f, o, a]);
|
|
35
|
+
const { data: e, isLoading: N, dataUpdatedAt: S } = Q({
|
|
36
|
+
queryKey: ["child-summary", o, a, i, r.formula, r.positive_only],
|
|
37
|
+
queryFn: () => R.request(
|
|
38
|
+
P(`/items/${o}/${a}/child-summary`, {
|
|
39
|
+
field: i,
|
|
31
40
|
formula: r.formula,
|
|
32
41
|
positive_only: r.positive_only !== !1,
|
|
33
42
|
row_label: r.row_label
|
|
34
43
|
})
|
|
35
44
|
).then((t) => t.data),
|
|
36
|
-
enabled: !!
|
|
45
|
+
enabled: !!a && a !== "new",
|
|
37
46
|
staleTime: 3e4,
|
|
38
47
|
placeholderData: (t) => t
|
|
39
|
-
}), [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
}), [T, w] = v(!1), A = !!e && !!(h != null && h(e.child_collection)), [s, u] = v(null), [q, L] = v(!1), y = W(s);
|
|
49
|
+
y.current = s, E(() => {
|
|
50
|
+
A ? u({ endedAt: null }) : y.current && y.current.endedAt == null && u({ endedAt: Date.now() });
|
|
51
|
+
}, [A]), E(() => {
|
|
52
|
+
if (!s || s.endedAt == null) return;
|
|
53
|
+
if (S > s.endedAt) {
|
|
54
|
+
u(null), L(!0);
|
|
55
|
+
const _ = setTimeout(() => L(!1), 1400);
|
|
56
|
+
return () => clearTimeout(_);
|
|
57
|
+
}
|
|
58
|
+
const t = setTimeout(() => u(null), 15e3);
|
|
59
|
+
return () => clearTimeout(t);
|
|
60
|
+
}, [s, S]);
|
|
61
|
+
const H = s ? "pending" : q ? "landed" : null;
|
|
62
|
+
if (!e && !N || e && e.count === 0 && r.hide_when_zero !== !1) return null;
|
|
63
|
+
const O = e ? r.format === "number" ? e.total.toLocaleString("en-US", { maximumFractionDigits: 2 }) : e.total.toLocaleString("en-US", { style: "currency", currency: "USD" }) : "—", c = r.count_label ?? "rows", b = !!(e != null && e.first_id), g = (t) => r.format === "number" ? t.toLocaleString("en-US", { maximumFractionDigits: 2 }) : t.toLocaleString("en-US", { style: "currency", currency: "USD" }), $ = (t) => {
|
|
64
|
+
e && (w(!1), k({ childCollection: e.child_collection, fkField: e.fk_field, rowId: t, field: i }));
|
|
65
|
+
}, x = (e == null ? void 0 : e.items) ?? [];
|
|
66
|
+
return /* @__PURE__ */ n(J, { open: T, onOpenChange: w, children: [
|
|
67
|
+
/* @__PURE__ */ l(M, { asChild: !0, children: /* @__PURE__ */ n(
|
|
46
68
|
"button",
|
|
47
69
|
{
|
|
48
70
|
type: "button",
|
|
49
|
-
disabled: !
|
|
50
|
-
className:
|
|
51
|
-
|
|
71
|
+
disabled: !b,
|
|
72
|
+
className: U(
|
|
73
|
+
G,
|
|
52
74
|
"text-left",
|
|
53
|
-
|
|
75
|
+
b ? "cursor-pointer" : "cursor-default hover:bg-transparent dark:hover:bg-transparent"
|
|
54
76
|
),
|
|
55
|
-
"data-tip":
|
|
56
|
-
"data-header-summary":
|
|
77
|
+
"data-tip": b ? `Which ${c} contribute` : void 0,
|
|
78
|
+
"data-header-summary": i,
|
|
57
79
|
"data-header-money": "",
|
|
58
|
-
...
|
|
80
|
+
...C,
|
|
59
81
|
children: [
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
e && /* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ l("span", { className: V, "data-header-label": !0, children: r.label }),
|
|
83
|
+
/* @__PURE__ */ n("span", { className: `${j} items-baseline`, "data-header-value": !0, children: [
|
|
84
|
+
/* @__PURE__ */ l(Y, { state: H, inline: !0, children: /* @__PURE__ */ l("span", { className: U(B, N && !e && "text-slate-300"), children: O }) }),
|
|
85
|
+
e && /* @__PURE__ */ n("span", { className: z, children: [
|
|
64
86
|
"across ",
|
|
65
87
|
e.count,
|
|
66
88
|
" ",
|
|
67
|
-
e.count === 1 ?
|
|
89
|
+
e.count === 1 ? c.replace(/s$/, "") : c
|
|
68
90
|
] })
|
|
69
91
|
] })
|
|
70
92
|
]
|
|
71
93
|
}
|
|
72
94
|
) }),
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ n(X, { align: "start", className: "w-[360px] p-2 text-[11.5px]", children: [
|
|
96
|
+
/* @__PURE__ */ n("p", { className: "mb-1 px-1 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: [
|
|
75
97
|
r.label,
|
|
76
98
|
" — ",
|
|
77
99
|
(e == null ? void 0 : e.count) ?? 0,
|
|
78
100
|
" ",
|
|
79
|
-
|
|
101
|
+
c
|
|
80
102
|
] }),
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
|
|
103
|
+
/* @__PURE__ */ n("div", { className: "max-h-[260px] space-y-px overflow-y-auto", children: [
|
|
104
|
+
x.map((t) => /* @__PURE__ */ n(
|
|
83
105
|
"button",
|
|
84
106
|
{
|
|
85
107
|
type: "button",
|
|
86
|
-
onClick: () =>
|
|
108
|
+
onClick: () => $(t.id),
|
|
87
109
|
className: "flex w-full items-baseline gap-2 rounded px-1.5 py-1 text-left hover:bg-slate-50 dark:hover:bg-muted",
|
|
88
110
|
"data-tip": "Open this line",
|
|
89
111
|
children: [
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ l("span", { className: "min-w-0 flex-1 truncate text-slate-700 dark:text-slate-200", children: t.label }),
|
|
113
|
+
/* @__PURE__ */ l("span", { className: "shrink-0 font-mono tabular-nums text-slate-900 dark:text-slate-100", children: g(t.value) })
|
|
92
114
|
]
|
|
93
115
|
},
|
|
94
116
|
t.id
|
|
95
117
|
)),
|
|
96
|
-
e && e.count >
|
|
118
|
+
e && e.count > x.length && /* @__PURE__ */ n("p", { className: "px-1.5 py-1 text-[10.5px] text-slate-400", children: [
|
|
97
119
|
"+",
|
|
98
|
-
e.count -
|
|
120
|
+
e.count - x.length,
|
|
99
121
|
" more"
|
|
100
122
|
] })
|
|
101
123
|
] }),
|
|
102
|
-
e && /* @__PURE__ */
|
|
124
|
+
e && /* @__PURE__ */ l("p", { className: "border-t border-slate-100 px-1.5 pt-1.5 text-right font-medium text-slate-700 dark:border-border dark:text-slate-200", children: g(e.total) })
|
|
103
125
|
] })
|
|
104
126
|
] });
|
|
105
127
|
}
|
|
106
128
|
export {
|
|
107
|
-
|
|
129
|
+
oe as HeaderSummaryChip
|
|
108
130
|
};
|