@nivaro/react 0.3.138 → 0.3.140
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/components/InlineGridField.js +95 -92
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +36 -2
- package/dist/shared/components/AudienceConfirmPanel.js +19 -19
- package/dist/shared/components/BroadcastView.js +213 -211
- package/dist/shared/components/CollectionBrowserView.js +2677 -2658
- package/dist/shared/components/ConfigHistory.js +45 -45
- package/dist/shared/components/ConformanceView.js +110 -110
- package/dist/shared/components/DataTable.js +51 -51
- package/dist/shared/components/FilePreviewLightbox.js +26 -25
- package/dist/shared/components/ItemEditForm.js +3038 -3027
- package/dist/shared/components/LiveCount.js +27 -23
- package/dist/shared/components/LiveTraceView.js +62 -61
- package/dist/shared/components/PageRenderer.js +422 -410
- package/dist/shared/components/ProfileView.js +199 -199
- package/dist/shared/components/QualityRulesView.js +70 -70
- package/dist/shared/components/QueryTable.js +131 -130
- package/dist/shared/components/RecordGraph.js +98 -98
- package/dist/shared/components/RecordReadView.js +287 -288
- package/dist/shared/components/ReportView.js +1279 -1259
- package/dist/shared/components/SlaRulesView.js +73 -74
- package/dist/shared/components/WidgetSlot.js +73 -73
- package/dist/shared/components/ai/AiChart.js +36 -32
- package/dist/shared/components/ai/AiMarkdown.js +136 -129
- package/dist/shared/components/ai/TaskDo.js +87 -87
- package/dist/shared/components/ai/answer-formats.js +37 -30
- package/dist/shared/components/ai/call-log/format.js +17 -16
- package/dist/shared/components/bulk/BulkActionButtons.js +66 -66
- package/dist/shared/components/bulk/BulkFieldUpdate.js +59 -59
- package/dist/shared/components/bulk/BulkSelectionNotices.js +34 -34
- package/dist/shared/components/bulk/MessageStakeholders.js +31 -29
- package/dist/shared/components/bulk/PushBulkButtons.js +83 -82
- package/dist/shared/components/bulk/bulk-field-options.js +10 -10
- package/dist/shared/components/cbv/column-totals.js +53 -51
- package/dist/shared/components/chat/ChatAnalyticsView.js +87 -87
- package/dist/shared/components/collections-directory/CollectionsToolbar.js +18 -18
- package/dist/shared/components/command-center/announce.js +7 -6
- package/dist/shared/components/command-center/panels/AttentionPanel.js +32 -31
- package/dist/shared/components/command-center/panels/FlowPanel.js +29 -28
- package/dist/shared/components/command-center/panels/PeoplePanel.js +39 -39
- package/dist/shared/components/delegation/DelegationConsoleView.js +27 -27
- package/dist/shared/components/imports/RunDetailSheet.js +1 -1
- package/dist/shared/components/integrations/IntegrationObligationsView.js +119 -119
- package/dist/shared/components/integrations/console/EventsView.js +35 -35
- package/dist/shared/components/integrations/console/FirefightView.js +15 -14
- package/dist/shared/components/integrations/console/PartnerDetail.js +78 -78
- package/dist/shared/components/integrations/console/ReadyToSendView.js +103 -103
- package/dist/shared/components/integrations/console/SignalCard.js +67 -67
- package/dist/shared/components/item-edit/CatalogPickerField.js +536 -527
- package/dist/shared/components/item-edit/ChangesTray.js +88 -74
- package/dist/shared/components/item-edit/FilePickerField.js +123 -123
- package/dist/shared/components/item-edit/GroupSection.js +301 -292
- package/dist/shared/components/item-edit/HeaderSummaryChip.js +54 -54
- package/dist/shared/components/item-edit/InlineGridField.js +45 -36
- package/dist/shared/components/item-edit/InlineTableField.js +1167 -1153
- package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
- package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
- package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
- package/dist/shared/components/monitoring/ApiRequestLog.js +35 -35
- package/dist/shared/components/notifications/NotificationCenterView.js +268 -268
- package/dist/shared/components/ops-report/format.js +37 -36
- package/dist/shared/components/panels/ReferencedByPanel.js +21 -20
- package/dist/shared/components/panels/RevisionsPanel.js +306 -305
- package/dist/shared/components/pipeline/OwnerMatrixVersionsCard.js +12 -12
- package/dist/shared/components/pipeline/PipelineEditorView.js +483 -482
- package/dist/shared/components/pipeline/PipelineHealthCards.js +33 -32
- package/dist/shared/components/pipeline/TeamsView.js +189 -130
- package/dist/shared/components/profile/AgentsPanel.js +6 -6
- package/dist/shared/components/profile/DelegationCard.js +13 -12
- package/dist/shared/components/profile/PersonActivity.js +48 -48
- package/dist/shared/components/profile/PersonExtras.js +107 -107
- package/dist/shared/components/profile/PersonWeek.js +9 -9
- package/dist/shared/components/queue/QueueBulkBar.js +19 -18
- package/dist/shared/components/queue/QueueBulkMove.js +21 -20
- package/dist/shared/components/queue/QueueItemSheet.js +136 -131
- package/dist/shared/components/queue/QueueWorklist.js +671 -670
- package/dist/shared/components/queue/worklist-helpers.js +36 -21
- package/dist/shared/components/support/RequestList.js +121 -121
- package/dist/shared/components/support/SupportAnalytics.js +29 -29
- package/dist/shared/lib/activity-sentence.js +316 -278
- package/dist/shared/lib/format-value.js +5 -4
- package/dist/shared/lib/number-format.js +87 -0
- package/dist/shared/lib/number-kind.js +133 -0
- package/dist/shared/lib/utils.js +24 -20
- package/dist/shared/lib/watch-list.js +1 -1
- package/dist/shared/lib/widget-value-format.js +26 -12
- package/package.json +1 -1
|
@@ -5,10 +5,10 @@ import { Undo2 as G, Loader2 as K, Check as Q, UserRound as z } from "lucide-rea
|
|
|
5
5
|
import { useState as m, useEffect as P } from "react";
|
|
6
6
|
import { useNivaroClient as B } from "../../context.js";
|
|
7
7
|
import { get as I, post as L, patch as H } from "../../lib/commands.js";
|
|
8
|
-
import {
|
|
9
|
-
import { RelationCombobox as
|
|
10
|
-
import { SectionCard as
|
|
11
|
-
function
|
|
8
|
+
import { formatNumber as J, cn as V } from "../../lib/utils.js";
|
|
9
|
+
import { RelationCombobox as X } from "../item-edit/RelationCombobox.js";
|
|
10
|
+
import { SectionCard as Z, Toggle as U, Field as k, PersonChip as ee } from "./primitives.js";
|
|
11
|
+
function pe({
|
|
12
12
|
user: n,
|
|
13
13
|
onSaved: R,
|
|
14
14
|
forUser: c,
|
|
@@ -80,7 +80,7 @@ function ce({
|
|
|
80
80
|
day: "numeric"
|
|
81
81
|
}) : null;
|
|
82
82
|
return /* @__PURE__ */ o(
|
|
83
|
-
|
|
83
|
+
Z,
|
|
84
84
|
{
|
|
85
85
|
testId: "delegation",
|
|
86
86
|
icon: /* @__PURE__ */ e(z, { className: "h-4 w-4" }),
|
|
@@ -119,7 +119,7 @@ function ce({
|
|
|
119
119
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between gap-3", children: [
|
|
120
120
|
/* @__PURE__ */ e("span", { className: "text-[12.5px] font-medium text-slate-700 dark:text-slate-200", children: a ? `${a} is out of office` : "I'm out of office" }),
|
|
121
121
|
/* @__PURE__ */ e(
|
|
122
|
-
|
|
122
|
+
U,
|
|
123
123
|
{
|
|
124
124
|
on: p,
|
|
125
125
|
onChange: () => N((t) => !t),
|
|
@@ -136,8 +136,9 @@ function ce({
|
|
|
136
136
|
" out,",
|
|
137
137
|
" ",
|
|
138
138
|
i.owned_open_records > 0 && /* @__PURE__ */ o(T, { children: [
|
|
139
|
-
/* @__PURE__ */ e("span", { className: "font-semibold", children: i.owned_open_records }),
|
|
140
|
-
"
|
|
139
|
+
/* @__PURE__ */ e("span", { className: "font-semibold", children: J(i.owned_open_records) }),
|
|
140
|
+
" ",
|
|
141
|
+
"open record",
|
|
141
142
|
i.owned_open_records === 1 ? "" : "s",
|
|
142
143
|
" ",
|
|
143
144
|
a ? "they own" : "you own"
|
|
@@ -225,7 +226,7 @@ function ce({
|
|
|
225
226
|
/* @__PURE__ */ o("div", { children: [
|
|
226
227
|
/* @__PURE__ */ e("span", { className: "mb-1 block text-[11px] font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400", children: "Delegate" }),
|
|
227
228
|
/* @__PURE__ */ e(
|
|
228
|
-
|
|
229
|
+
X,
|
|
229
230
|
{
|
|
230
231
|
collection: "nivaro_users",
|
|
231
232
|
value: l,
|
|
@@ -269,7 +270,7 @@ function ce({
|
|
|
269
270
|
/* @__PURE__ */ e(
|
|
270
271
|
"p",
|
|
271
272
|
{
|
|
272
|
-
className:
|
|
273
|
+
className: V(
|
|
273
274
|
"mt-3 text-[11.5px] leading-relaxed",
|
|
274
275
|
p && !l ? "rounded-md bg-amber-50 px-2.5 py-1.5 text-amber-700 dark:bg-amber-500/10 dark:text-amber-400" : "text-slate-400 dark:text-slate-500"
|
|
275
276
|
),
|
|
@@ -278,12 +279,12 @@ function ce({
|
|
|
278
279
|
),
|
|
279
280
|
w && w.length > 0 && /* @__PURE__ */ o("div", { className: "mt-3 border-t border-slate-100 pt-3 dark:border-border/60", children: [
|
|
280
281
|
/* @__PURE__ */ e("p", { className: "mb-1.5 text-[11px] font-medium uppercase tracking-wide text-slate-400", children: "Covers for" }),
|
|
281
|
-
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-x-4 gap-y-1.5", "data-person-covers": !0, children: w.map((t) => /* @__PURE__ */ e(
|
|
282
|
+
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-x-4 gap-y-1.5", "data-person-covers": !0, children: w.map((t) => /* @__PURE__ */ e(ee, { person: t }, t.id)) })
|
|
282
283
|
] })
|
|
283
284
|
]
|
|
284
285
|
}
|
|
285
286
|
);
|
|
286
287
|
}
|
|
287
288
|
export {
|
|
288
|
-
|
|
289
|
+
pe as DelegationCard
|
|
289
290
|
};
|
|
@@ -4,14 +4,14 @@ import { Flame as G, LogIn as Q, ChevronLeft as V, ChevronRight as X, Footprints
|
|
|
4
4
|
import { useState as T, useMemo as R } from "react";
|
|
5
5
|
import { useNivaroClient as B, useNavigation as te, useItemNavigation as ae } from "../../context.js";
|
|
6
6
|
import { get as A } from "../../lib/commands.js";
|
|
7
|
-
import { formatRelative as se, formatDateTime as ne, cn as f } from "../../lib/utils.js";
|
|
8
|
-
import { ErrorNotice as
|
|
7
|
+
import { formatRelative as se, formatDateTime as ne, cn as f, formatNumber as re } from "../../lib/utils.js";
|
|
8
|
+
import { ErrorNotice as le } from "../ErrorNotice.js";
|
|
9
9
|
import { SkeletonBar as D } from "../Skeletons.js";
|
|
10
|
-
import { SimpleSelect as
|
|
11
|
-
import { localDateKey as
|
|
12
|
-
import { foldJourneySession as
|
|
13
|
-
import { SectionCard as E, EmptyLine as F, usePersonUrl as
|
|
14
|
-
function
|
|
10
|
+
import { SimpleSelect as ie } from "../ui/SimpleSelect.js";
|
|
11
|
+
import { localDateKey as oe, localDayOffset as de, shiftDate as ce, isSafeAdminPath as me } from "./dayTimelineLayout.js";
|
|
12
|
+
import { foldJourneySession as ue, fmtDuration as U, fallbackJourneyLabel as pe, words as he, fmtSpan as xe, fmtClock as fe } from "./journey-view.js";
|
|
13
|
+
import { SectionCard as E, EmptyLine as F, usePersonUrl as ye } from "./primitives.js";
|
|
14
|
+
function Je({ userId: e, title: r = "Rhythm" }) {
|
|
15
15
|
const n = B(), { data: t } = $({
|
|
16
16
|
queryKey: ["nvr-user-stats", e],
|
|
17
17
|
queryFn: () => n.request(A(`/users/${e}/stats`)).then((u) => u.data).catch(() => null),
|
|
@@ -31,9 +31,9 @@ function Re({ userId: e, title: r = "Rhythm" }) {
|
|
|
31
31
|
"-day streak"
|
|
32
32
|
] }),
|
|
33
33
|
children: o ? /* @__PURE__ */ a(F, { children: "Nothing recorded in the last eight weeks." }) : /* @__PURE__ */ l(Z, { children: [
|
|
34
|
-
/* @__PURE__ */ a(
|
|
35
|
-
t.active_days && /* @__PURE__ */ a(
|
|
36
|
-
t.typical_hours_utc && /* @__PURE__ */ a(
|
|
34
|
+
/* @__PURE__ */ a(ge, { weeks: t.weeks, max: c }),
|
|
35
|
+
t.active_days && /* @__PURE__ */ a(ve, { days: t.active_days }),
|
|
36
|
+
t.typical_hours_utc && /* @__PURE__ */ a(ke, { hours: t.typical_hours_utc }),
|
|
37
37
|
/* @__PURE__ */ a("dl", { className: "mt-4 grid grid-cols-3 gap-2 text-center", children: [
|
|
38
38
|
["Approvals", t.totals.transitions],
|
|
39
39
|
["Tasks done", t.totals.tasks_done],
|
|
@@ -52,7 +52,7 @@ function P(e) {
|
|
|
52
52
|
return r.setUTCDate(r.getUTCDate() - n), r;
|
|
53
53
|
}
|
|
54
54
|
const q = (e) => e.toLocaleDateString(void 0, { month: "short", day: "numeric", timeZone: "UTC" });
|
|
55
|
-
function
|
|
55
|
+
function ge({
|
|
56
56
|
weeks: e,
|
|
57
57
|
max: r
|
|
58
58
|
}) {
|
|
@@ -75,7 +75,7 @@ function ye({
|
|
|
75
75
|
o === 0 ? "text-transparent" : "text-slate-500 dark:text-slate-400"
|
|
76
76
|
),
|
|
77
77
|
"aria-hidden": o === 0,
|
|
78
|
-
children: o
|
|
78
|
+
children: re(o)
|
|
79
79
|
}
|
|
80
80
|
),
|
|
81
81
|
/* @__PURE__ */ a(
|
|
@@ -105,8 +105,8 @@ function ye({
|
|
|
105
105
|
}) })
|
|
106
106
|
] });
|
|
107
107
|
}
|
|
108
|
-
const
|
|
109
|
-
function
|
|
108
|
+
const be = ["Mon", "", "Wed", "", "Fri", "", "Sun"];
|
|
109
|
+
function ve({ days: e }) {
|
|
110
110
|
const r = new Set(e), n = P(/* @__PURE__ */ new Date()), t = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), c = Array.from({ length: 8 }, (s, d) => {
|
|
111
111
|
const m = new Date(n.getTime() - (7 - d) * 7 * M);
|
|
112
112
|
return {
|
|
@@ -128,7 +128,7 @@ function be({ days: e }) {
|
|
|
128
128
|
] })
|
|
129
129
|
] }),
|
|
130
130
|
/* @__PURE__ */ l("div", { className: "mt-1.5 flex gap-1.5", children: [
|
|
131
|
-
/* @__PURE__ */ a("div", { className: "flex flex-col gap-[3px] pr-1", "aria-hidden": !0, children:
|
|
131
|
+
/* @__PURE__ */ a("div", { className: "flex flex-col gap-[3px] pr-1", "aria-hidden": !0, children: be.map((s, d) => /* @__PURE__ */ a(
|
|
132
132
|
"span",
|
|
133
133
|
{
|
|
134
134
|
className: "h-3 text-[9.5px] leading-3 text-slate-400",
|
|
@@ -164,7 +164,7 @@ function be({ days: e }) {
|
|
|
164
164
|
] })
|
|
165
165
|
] });
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function ke({ hours: e }) {
|
|
168
168
|
const r = -(/* @__PURE__ */ new Date()).getTimezoneOffset() / 60, n = (c) => ((c + r) % 24 + 24) % 24, t = (c) => {
|
|
169
169
|
const o = Math.round(c * 2) / 2, u = Math.floor(o) % 24, s = o % 1 ? 30 : 0;
|
|
170
170
|
return new Date(2e3, 0, 1, u, s).toLocaleTimeString([], { hour: "numeric", minute: s ? "2-digit" : void 0 });
|
|
@@ -185,25 +185,25 @@ function ve({ hours: e }) {
|
|
|
185
185
|
] })
|
|
186
186
|
] });
|
|
187
187
|
}
|
|
188
|
-
function
|
|
189
|
-
const r =
|
|
188
|
+
function Be(e) {
|
|
189
|
+
const r = pe(e);
|
|
190
190
|
return r.section && r.kind === "page" ? `${r.section} › ${r.title}` : r.title;
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function Ne(e, r, n) {
|
|
193
193
|
return e.request(
|
|
194
194
|
A(`/journeys/days/${r}`, n ? { app: n } : void 0)
|
|
195
195
|
).then((t) => ({ days: t.data ?? [], apps: t.apps ?? [] })).catch(() => ({ days: [], apps: [] }));
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function we(e) {
|
|
198
198
|
const r = e.filter((n) => n !== "admin");
|
|
199
|
-
return (n) => !n || n === "admin" ? "Admin" : r.length <= 1 ? "Portal" :
|
|
199
|
+
return (n) => !n || n === "admin" ? "Admin" : r.length <= 1 ? "Portal" : he(n);
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function Se(e) {
|
|
202
202
|
return e < 600 ? e : Math.floor(e / 60) * 60;
|
|
203
203
|
}
|
|
204
204
|
function W(e, r) {
|
|
205
205
|
if (e === r) return "Today";
|
|
206
|
-
if (e ===
|
|
206
|
+
if (e === ce(r, -1)) return "Yesterday";
|
|
207
207
|
const [n, t, c] = e.split("-").map(Number);
|
|
208
208
|
return new Date(n, t - 1, c).toLocaleDateString("en-US", {
|
|
209
209
|
weekday: "short",
|
|
@@ -216,13 +216,13 @@ function J(e, r, n = !1) {
|
|
|
216
216
|
const t = W(e, r);
|
|
217
217
|
return t === "Today" || t === "Yesterday" ? t.toLowerCase() : n ? `on ${t}` : t;
|
|
218
218
|
}
|
|
219
|
-
const L = 8,
|
|
220
|
-
function
|
|
219
|
+
const L = 8, De = 300;
|
|
220
|
+
function Pe({ userId: e }) {
|
|
221
221
|
var O;
|
|
222
|
-
const r = B(), n =
|
|
222
|
+
const r = B(), n = oe(/* @__PURE__ */ new Date()), [t, c] = T(n), [o, u] = T(null), { data: s } = $({
|
|
223
223
|
queryKey: ["nvr-journey-days", e, o],
|
|
224
|
-
queryFn: () =>
|
|
225
|
-
}), d = (s == null ? void 0 : s.days) ?? [], m = (s == null ? void 0 : s.apps) ?? [], y =
|
|
224
|
+
queryFn: () => Ne(r, e, o)
|
|
225
|
+
}), d = (s == null ? void 0 : s.days) ?? [], m = (s == null ? void 0 : s.apps) ?? [], y = de(t), { data: g, isLoading: b, isError: h, error: w, refetch: S } = $({
|
|
226
226
|
queryKey: ["nvr-journey", e, t, y, o],
|
|
227
227
|
queryFn: () => r.request(
|
|
228
228
|
A(`/journeys/user/${e}`, {
|
|
@@ -236,9 +236,9 @@ function Be({ userId: e }) {
|
|
|
236
236
|
() => [.../* @__PURE__ */ new Set([n, ...d.map((i) => i.date)])].sort().reverse(),
|
|
237
237
|
[n, d]
|
|
238
238
|
), N = p.indexOf(t), _ = N > 0 ? p[N - 1] : null, C = N >= 0 && N < p.length - 1 ? p[N + 1] : null, x = R(
|
|
239
|
-
() => ((g == null ? void 0 : g.sessions) ?? []).map((i) => ({ s: i, v:
|
|
239
|
+
() => ((g == null ? void 0 : g.sessions) ?? []).map((i) => ({ s: i, v: ue(i.steps) })).filter((i) => i.v.rows.length > 0).sort((i, v) => i.v.start.localeCompare(v.v.start)),
|
|
240
240
|
[g]
|
|
241
|
-
), Y = Math.max(60, ...x.flatMap((i) => i.v.rows.map((v) => v.seconds ?? 0))), z = x.reduce((i, v) => i +
|
|
241
|
+
), Y = Math.max(60, ...x.flatMap((i) => i.v.rows.map((v) => v.seconds ?? 0))), z = x.reduce((i, v) => i + Se(v.v.seconds), 0), I = we(m), j = ((O = d.find((i) => i.date !== t)) == null ? void 0 : O.date) ?? null, K = "inline-flex h-7 w-7 items-center justify-center rounded-md text-slate-500 transition-colors hover:bg-slate-100 hover:text-slate-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/40 disabled:pointer-events-none disabled:opacity-30 dark:text-slate-400 dark:hover:bg-muted dark:hover:text-slate-100", H = /* @__PURE__ */ l("div", { className: "flex items-center gap-0.5", "data-journey-day-picker": !0, children: [
|
|
242
242
|
/* @__PURE__ */ a(
|
|
243
243
|
"button",
|
|
244
244
|
{
|
|
@@ -251,7 +251,7 @@ function Be({ userId: e }) {
|
|
|
251
251
|
}
|
|
252
252
|
),
|
|
253
253
|
/* @__PURE__ */ a(
|
|
254
|
-
|
|
254
|
+
ie,
|
|
255
255
|
{
|
|
256
256
|
value: t,
|
|
257
257
|
onChange: c,
|
|
@@ -324,7 +324,7 @@ function Be({ userId: e }) {
|
|
|
324
324
|
}
|
|
325
325
|
)
|
|
326
326
|
] }),
|
|
327
|
-
b ? /* @__PURE__ */ a(
|
|
327
|
+
b ? /* @__PURE__ */ a(_e, {}) : h ? /* @__PURE__ */ a(le, { error: w, what: "the pages visited", onRetry: () => void S() }) : x.length === 0 ? /* @__PURE__ */ l("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-1", "data-journey-empty": !0, children: [
|
|
328
328
|
/* @__PURE__ */ l(F, { children: [
|
|
329
329
|
"No pages recorded ",
|
|
330
330
|
t === n ? "today" : J(t, n, !0),
|
|
@@ -343,7 +343,7 @@ function Be({ userId: e }) {
|
|
|
343
343
|
}
|
|
344
344
|
)
|
|
345
345
|
] }) : /* @__PURE__ */ a("div", { className: "divide-y divide-slate-100 dark:divide-border/60", children: x.map(({ s: i, v }) => /* @__PURE__ */ a(
|
|
346
|
-
|
|
346
|
+
Ce,
|
|
347
347
|
{
|
|
348
348
|
app: i.app ?? "admin",
|
|
349
349
|
appName: I(i.app ?? "admin"),
|
|
@@ -357,7 +357,7 @@ function Be({ userId: e }) {
|
|
|
357
357
|
}
|
|
358
358
|
);
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function _e() {
|
|
361
361
|
return /* @__PURE__ */ l("div", { className: "space-y-3", role: "status", "aria-busy": "true", "aria-label": "Loading pages visited", children: [
|
|
362
362
|
/* @__PURE__ */ a(D, { width: 160, className: "h-3.5" }),
|
|
363
363
|
[72, 54, 64, 46].map((e) => /* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
|
|
@@ -367,7 +367,7 @@ function De() {
|
|
|
367
367
|
] }, e))
|
|
368
368
|
] });
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function Ce({
|
|
371
371
|
app: e,
|
|
372
372
|
appName: r,
|
|
373
373
|
view: n,
|
|
@@ -377,7 +377,7 @@ function _e({
|
|
|
377
377
|
const [o, u] = T(!1), s = n.rows.length > L + 2 && !o, d = s ? n.rows.slice(0, L) : n.rows;
|
|
378
378
|
return /* @__PURE__ */ l("section", { className: "py-4 first:pt-0 last:pb-0", "data-journey-session": !0, children: [
|
|
379
379
|
/* @__PURE__ */ l("header", { className: "mb-2 flex flex-wrap items-baseline gap-x-2 gap-y-0.5", children: [
|
|
380
|
-
/* @__PURE__ */ a("h4", { className: "text-[13px] font-semibold tabular-nums text-slate-800 dark:text-slate-100", children:
|
|
380
|
+
/* @__PURE__ */ a("h4", { className: "text-[13px] font-semibold tabular-nums text-slate-800 dark:text-slate-100", children: xe(n.start, n.end) }),
|
|
381
381
|
/* @__PURE__ */ l("p", { className: "text-[11.5px] tabular-nums text-slate-500 dark:text-slate-400", children: [
|
|
382
382
|
U(n.seconds) || "under a minute",
|
|
383
383
|
" · ",
|
|
@@ -395,7 +395,7 @@ function _e({
|
|
|
395
395
|
)
|
|
396
396
|
] }),
|
|
397
397
|
/* @__PURE__ */ a("ol", { className: "-mx-2", children: d.map((m) => /* @__PURE__ */ a(
|
|
398
|
-
|
|
398
|
+
je,
|
|
399
399
|
{
|
|
400
400
|
row: m,
|
|
401
401
|
maxDwell: c,
|
|
@@ -421,21 +421,21 @@ function _e({
|
|
|
421
421
|
] })
|
|
422
422
|
] });
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function je({
|
|
425
425
|
row: e,
|
|
426
426
|
maxDwell: r,
|
|
427
427
|
appName: n
|
|
428
428
|
}) {
|
|
429
429
|
var k;
|
|
430
|
-
const t = te(), { urlFor: c, open: o } = ae(), u =
|
|
430
|
+
const t = te(), { urlFor: c, open: o } = ae(), u = ye(), s = e.label, d = (p) => t.consoleUrl ? t.consoleUrl(p) : p;
|
|
431
431
|
let m = null, y = null;
|
|
432
432
|
if (s.record) {
|
|
433
433
|
const p = { collection: s.record.collection, itemId: s.record.id };
|
|
434
434
|
m = c(p), y = () => o(p);
|
|
435
|
-
} else s.queue_id ? m = d(`/queues/${encodeURIComponent(s.queue_id)}`) : s.person_id ? m = u(s.person_id) : e.app === "admin" && s.kind !== "record" &&
|
|
435
|
+
} else s.queue_id ? m = d(`/queues/${encodeURIComponent(s.queue_id)}`) : s.person_id ? m = u(s.person_id) : e.app === "admin" && s.kind !== "record" && me(e.path) && (m = d(e.path));
|
|
436
436
|
const b = [s.kind === "record" || s.kind === "new-record" || ((k = s.section) == null ? void 0 : k.toLowerCase()) === n.toLowerCase() ? null : s.section, ...e.details, e.visits > 1 ? `${e.visits} visits` : null].filter(
|
|
437
437
|
Boolean
|
|
438
|
-
), h = (e.seconds ?? 0) >=
|
|
438
|
+
), h = (e.seconds ?? 0) >= De, w = (e.seconds ?? 0) >= 60 ? Math.max(15, Math.round(Math.sqrt((e.seconds ?? 0) / r) * 100)) : 0, S = /* @__PURE__ */ a("span", { className: "line-clamp-2 break-words", children: s.title });
|
|
439
439
|
return /* @__PURE__ */ l(
|
|
440
440
|
"li",
|
|
441
441
|
{
|
|
@@ -447,7 +447,7 @@ function Ce({
|
|
|
447
447
|
{
|
|
448
448
|
dateTime: e.start,
|
|
449
449
|
className: "pt-px text-[11.5px] tabular-nums text-slate-500 dark:text-slate-400",
|
|
450
|
-
children:
|
|
450
|
+
children: fe(e.start)
|
|
451
451
|
}
|
|
452
452
|
),
|
|
453
453
|
/* @__PURE__ */ l("div", { className: "min-w-0", children: [
|
|
@@ -499,7 +499,7 @@ function Ce({
|
|
|
499
499
|
}
|
|
500
500
|
);
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function We({ profile: e }) {
|
|
503
503
|
var n;
|
|
504
504
|
const r = ((n = e.admin) == null ? void 0 : n.logins) ?? [];
|
|
505
505
|
return /* @__PURE__ */ a(
|
|
@@ -526,10 +526,10 @@ function Pe({ profile: e }) {
|
|
|
526
526
|
);
|
|
527
527
|
}
|
|
528
528
|
export {
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
529
|
+
Pe as JourneyCard,
|
|
530
|
+
We as SignInsCard,
|
|
531
|
+
Je as StatsCard,
|
|
532
|
+
Ne as fetchJourneyDays,
|
|
533
533
|
U as fmtDuration,
|
|
534
|
-
|
|
534
|
+
Be as pageLabel
|
|
535
535
|
};
|