@nivaro/react 0.3.11 → 0.3.13
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 +109 -102
- package/dist/index.d.ts +17 -0
- package/dist/index.js +583 -582
- package/dist/shared/components/ProfileView.js +115 -109
- package/dist/shared/components/chat/ChatPanel.js +492 -472
- package/dist/shared/components/item-edit/RecordLiveSync.js +196 -181
- package/dist/shared/components/item-edit/UserChip.js +301 -233
- package/dist/shared/components/profile/PersonAdminTools.js +168 -144
- package/dist/shared/components/profile/PersonProfile.js +42 -41
- package/dist/shared/components/profile/session-actions.js +52 -0
- package/dist/shared/context.js +71 -66
- package/dist/shared/lib/replay-checkout.js +20 -0
- package/package.json +1 -1
|
@@ -5,25 +5,25 @@ import { cn as l } from "../../lib/utils.js";
|
|
|
5
5
|
import { Tabs as A, TabsList as I, TabsTrigger as S, TabsContent as o } from "../ui/tabs.js";
|
|
6
6
|
import { DayTimelineCard as T } from "./DayTimeline.js";
|
|
7
7
|
import { DelegationCard as P } from "./DelegationCard.js";
|
|
8
|
-
import { SuspensionBanner as U, AccessCard as D, UserScopesCard as F, UserDirectoryCard as
|
|
9
|
-
import { AccessSummaryCard as
|
|
10
|
-
import { StatsCard as
|
|
11
|
-
import { ForceReloadCard as B,
|
|
12
|
-
import { PersonAiMemoryCard as
|
|
13
|
-
import { CompareAccessCard as
|
|
14
|
-
import { WorkingOnCard as
|
|
15
|
-
import { PersonHeader as
|
|
16
|
-
import { AboutCard as
|
|
17
|
-
import { PersonWeekCard as
|
|
18
|
-
import { usePersonProfile as
|
|
19
|
-
function
|
|
8
|
+
import { SuspensionBanner as U, AccessCard as D, UserScopesCard as F, UserDirectoryCard as O, SessionsCard as j, ApiTokenCard as E } from "./PersonAccess.js";
|
|
9
|
+
import { AccessSummaryCard as L } from "./PersonAccessSummary.js";
|
|
10
|
+
import { StatsCard as M, ActivityFeedCard as R, SignInsCard as V, JourneyCard as W } from "./PersonActivity.js";
|
|
11
|
+
import { ForceReloadCard as B, SignOutEverywhereCard as H, MergeCard as J, OffboardingCard as q } from "./PersonAdminTools.js";
|
|
12
|
+
import { PersonAiMemoryCard as z } from "./PersonAiMemory.js";
|
|
13
|
+
import { CompareAccessCard as G } from "./PersonCompare.js";
|
|
14
|
+
import { WorkingOnCard as K, TeamLoadCard as Q, WhyCard as X } from "./PersonExtras.js";
|
|
15
|
+
import { PersonHeader as Y } from "./PersonHeader.js";
|
|
16
|
+
import { AboutCard as Z, PeopleCard as $, AvailabilityCard as ee, ResponsibilitiesCard as re } from "./PersonOverview.js";
|
|
17
|
+
import { PersonWeekCard as ae } from "./PersonWeek.js";
|
|
18
|
+
import { usePersonProfile as de, useInvalidatePerson as se } from "./types.js";
|
|
19
|
+
function we({
|
|
20
20
|
userId: i,
|
|
21
21
|
className: n,
|
|
22
22
|
initialTab: f = "overview"
|
|
23
23
|
}) {
|
|
24
|
-
var
|
|
25
|
-
const t = _(), s = !!(t != null && t.isAdmin), { data: e, isLoading: h, isError: x } =
|
|
26
|
-
if (h || !e && !x) return /* @__PURE__ */ r(
|
|
24
|
+
var p, u, g;
|
|
25
|
+
const t = _(), s = !!(t != null && t.isAdmin), { data: e, isLoading: h, isError: x } = de(i), y = se(i), [N, C] = b(f), [c, k] = b("feed");
|
|
26
|
+
if (h || !e && !x) return /* @__PURE__ */ r(te, { className: n });
|
|
27
27
|
if (!e)
|
|
28
28
|
return /* @__PURE__ */ a(
|
|
29
29
|
"div",
|
|
@@ -39,19 +39,19 @@ function ke({
|
|
|
39
39
|
]
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
|
-
const w = !!(t != null && t.userId) && !!((
|
|
42
|
+
const w = !!(t != null && t.userId) && !!((p = e.manager) != null && p.id) && String(e.manager.id).toUpperCase() === String(t.userId).toUpperCase(), v = /* @__PURE__ */ a("div", { className: "grid gap-4 lg:grid-cols-2", children: [
|
|
43
43
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
44
|
-
/* @__PURE__ */ r(
|
|
45
|
-
/* @__PURE__ */ r(
|
|
44
|
+
/* @__PURE__ */ r(Z, { profile: e, isAdmin: s }),
|
|
45
|
+
/* @__PURE__ */ r(K, { profile: e }),
|
|
46
46
|
e.direct_reports.length > 0 && /* @__PURE__ */ r(
|
|
47
|
-
|
|
47
|
+
Q,
|
|
48
48
|
{
|
|
49
49
|
userId: e.id,
|
|
50
50
|
firstName: e.first_name ?? e.name,
|
|
51
51
|
expectedRows: e.direct_reports.length
|
|
52
52
|
}
|
|
53
53
|
),
|
|
54
|
-
/* @__PURE__ */ r(
|
|
54
|
+
/* @__PURE__ */ r($, { profile: e })
|
|
55
55
|
] }),
|
|
56
56
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
57
57
|
s ? /* @__PURE__ */ r(
|
|
@@ -74,13 +74,13 @@ function ke({
|
|
|
74
74
|
coversFor: e.covers_for,
|
|
75
75
|
onSaved: y
|
|
76
76
|
}
|
|
77
|
-
) : /* @__PURE__ */ r(
|
|
78
|
-
/* @__PURE__ */ r(
|
|
79
|
-
(s || w) && /* @__PURE__ */ r(
|
|
77
|
+
) : /* @__PURE__ */ r(ee, { profile: e }),
|
|
78
|
+
/* @__PURE__ */ r(re, { profile: e, isAdmin: s }),
|
|
79
|
+
(s || w) && /* @__PURE__ */ r(ae, { profile: e })
|
|
80
80
|
] })
|
|
81
81
|
] });
|
|
82
82
|
return /* @__PURE__ */ a("div", { className: l("flex flex-col gap-4", n), "data-nvr-person": e.id, children: [
|
|
83
|
-
/* @__PURE__ */ r(
|
|
83
|
+
/* @__PURE__ */ r(Y, { profile: e, isAdmin: s }),
|
|
84
84
|
s && /* @__PURE__ */ r(U, { profile: e }),
|
|
85
85
|
s ? /* @__PURE__ */ a(A, { value: N, onValueChange: (d) => C(d), children: [
|
|
86
86
|
/* @__PURE__ */ r(
|
|
@@ -105,19 +105,19 @@ function ke({
|
|
|
105
105
|
))
|
|
106
106
|
}
|
|
107
107
|
),
|
|
108
|
-
/* @__PURE__ */ r(o, { value: "overview", className: "mt-4 focus-visible:outline-none", children:
|
|
108
|
+
/* @__PURE__ */ r(o, { value: "overview", className: "mt-4 focus-visible:outline-none", children: v }),
|
|
109
109
|
/* @__PURE__ */ r(o, { value: "access", className: "mt-4 focus-visible:outline-none", children: /* @__PURE__ */ a("div", { className: "grid gap-4 lg:grid-cols-2", children: [
|
|
110
110
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
111
111
|
/* @__PURE__ */ r(D, { profile: e }),
|
|
112
|
-
/* @__PURE__ */ r(
|
|
112
|
+
/* @__PURE__ */ r(L, { userId: e.id }),
|
|
113
113
|
/* @__PURE__ */ r(F, { userId: e.id }),
|
|
114
|
-
/* @__PURE__ */ r(
|
|
115
|
-
/* @__PURE__ */ r(
|
|
114
|
+
/* @__PURE__ */ r(X, { profile: e }),
|
|
115
|
+
/* @__PURE__ */ r(G, { profile: e })
|
|
116
116
|
] }),
|
|
117
117
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
118
|
-
/* @__PURE__ */ r(
|
|
119
|
-
/* @__PURE__ */ r(
|
|
120
|
-
/* @__PURE__ */ r(
|
|
118
|
+
/* @__PURE__ */ r(O, { profile: e }),
|
|
119
|
+
/* @__PURE__ */ r(j, { userId: e.id }),
|
|
120
|
+
/* @__PURE__ */ r(E, { profile: e })
|
|
121
121
|
] })
|
|
122
122
|
] }) }),
|
|
123
123
|
/* @__PURE__ */ a(o, { value: "activity", className: "mt-4 focus-visible:outline-none", children: [
|
|
@@ -151,29 +151,30 @@ function ke({
|
|
|
151
151
|
),
|
|
152
152
|
c === "day" && s ? /* @__PURE__ */ r(T, { userId: e.id }) : /* @__PURE__ */ a("div", { className: "grid gap-4 lg:grid-cols-2", children: [
|
|
153
153
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
154
|
-
/* @__PURE__ */ r(
|
|
155
|
-
/* @__PURE__ */ r(
|
|
154
|
+
/* @__PURE__ */ r(M, { userId: e.id }),
|
|
155
|
+
/* @__PURE__ */ r(R, { userId: e.id })
|
|
156
156
|
] }),
|
|
157
157
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
158
|
-
/* @__PURE__ */ r(
|
|
159
|
-
/* @__PURE__ */ r(
|
|
158
|
+
/* @__PURE__ */ r(V, { profile: e }),
|
|
159
|
+
/* @__PURE__ */ r(W, { userId: e.id })
|
|
160
160
|
] })
|
|
161
161
|
] })
|
|
162
162
|
] }),
|
|
163
163
|
/* @__PURE__ */ r(o, { value: "tools", className: "mt-4 focus-visible:outline-none", children: /* @__PURE__ */ a("div", { className: "grid gap-4 lg:grid-cols-2", children: [
|
|
164
164
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
165
165
|
/* @__PURE__ */ r(B, { profile: e }),
|
|
166
|
-
/* @__PURE__ */ r(H, { profile: e })
|
|
166
|
+
/* @__PURE__ */ r(H, { profile: e }),
|
|
167
|
+
/* @__PURE__ */ r(J, { profile: e })
|
|
167
168
|
] }),
|
|
168
169
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
169
|
-
/* @__PURE__ */ r(
|
|
170
|
-
/* @__PURE__ */ r(
|
|
170
|
+
/* @__PURE__ */ r(q, { profile: e }),
|
|
171
|
+
/* @__PURE__ */ r(z, { profile: e })
|
|
171
172
|
] })
|
|
172
173
|
] }) })
|
|
173
|
-
] }) :
|
|
174
|
+
] }) : v
|
|
174
175
|
] });
|
|
175
176
|
}
|
|
176
|
-
function
|
|
177
|
+
function te({ className: i }) {
|
|
177
178
|
return /* @__PURE__ */ a("div", { className: l("flex animate-pulse flex-col gap-4", i), "aria-busy": "true", children: [
|
|
178
179
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-5 rounded-lg border border-slate-200 bg-white p-5 dark:border-border dark:bg-card", children: [
|
|
179
180
|
/* @__PURE__ */ r("div", { className: "h-[76px] w-[76px] rounded-full bg-slate-100 dark:bg-muted" }),
|
|
@@ -190,5 +191,5 @@ function se({ className: i }) {
|
|
|
190
191
|
] });
|
|
191
192
|
}
|
|
192
193
|
export {
|
|
193
|
-
|
|
194
|
+
we as PersonProfile
|
|
194
195
|
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { useMutation as i } from "@tanstack/react-query";
|
|
2
|
+
import { toast as s } from "sonner";
|
|
3
|
+
import { useOptionalNivaroClient as u } from "../../context.js";
|
|
4
|
+
import { post as c } from "../../lib/commands.js";
|
|
5
|
+
import { errorText as d } from "./types.js";
|
|
6
|
+
function h(e) {
|
|
7
|
+
const o = e.remembered ? ` Tabs that connect in the next ${e.remember_hours ?? 24} h reload too.` : "";
|
|
8
|
+
return (e.sockets > 0 ? `Reload pushed to ${e.sockets} open tab${e.sockets === 1 ? "" : "s"}${e.partial ? " (another server did not answer — there may be more)" : ""}.` : e.partial ? "Reload sent — another server did not answer, so their open tabs could not be counted." : e.nodes != null ? "Reload sent — they have no tab open right now." : "Reload sent to every tab they have open (tabs on other servers are not counted).") + o;
|
|
9
|
+
}
|
|
10
|
+
function l(e, o) {
|
|
11
|
+
return o > 0 ? `${e} is signed out of ${o} session${o === 1 ? "" : "s"} — every open tab goes back to sign-in.` : `${e} had no session open.`;
|
|
12
|
+
}
|
|
13
|
+
function $(e, o = {}) {
|
|
14
|
+
const r = u();
|
|
15
|
+
return i({
|
|
16
|
+
mutationFn: (n = {}) => {
|
|
17
|
+
if (!r) throw new Error("Not connected");
|
|
18
|
+
return r.request(
|
|
19
|
+
c("/realtime/force-refresh", {
|
|
20
|
+
user_ids: [e],
|
|
21
|
+
seconds: n.seconds ?? 15,
|
|
22
|
+
message: n.message ?? ""
|
|
23
|
+
})
|
|
24
|
+
).then((t) => t.data);
|
|
25
|
+
},
|
|
26
|
+
onSuccess: (n) => {
|
|
27
|
+
var t;
|
|
28
|
+
s.success(h(n)), (t = o.onDone) == null || t.call(o);
|
|
29
|
+
},
|
|
30
|
+
onError: (n) => s.error(d(n, "Failed to push the reload"))
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function w(e, o, r = {}) {
|
|
34
|
+
const n = u();
|
|
35
|
+
return i({
|
|
36
|
+
mutationFn: () => {
|
|
37
|
+
if (!n) throw new Error("Not connected");
|
|
38
|
+
return n.request(c(`/security/users/${e}/sign-out`)).then((t) => t.data);
|
|
39
|
+
},
|
|
40
|
+
onSuccess: (t) => {
|
|
41
|
+
var a;
|
|
42
|
+
s.success(l(o, t.revoked)), (a = r.onDone) == null || a.call(r);
|
|
43
|
+
},
|
|
44
|
+
onError: (t) => s.error(d(t, "Could not sign them out"))
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
h as reloadPushedText,
|
|
49
|
+
l as signedOutText,
|
|
50
|
+
$ as useReloadTheirTabs,
|
|
51
|
+
w as useSignOutEverywhere
|
|
52
|
+
};
|
package/dist/shared/context.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { jsxs as b, jsx as f } from "react/jsx-runtime";
|
|
2
2
|
import { QueryClientContext as v, QueryClient as w, QueryClientProvider as g, useQueryClient as C } from "@tanstack/react-query";
|
|
3
3
|
import { createContext as i, useContext as l, useState as m, useMemo as x, useCallback as h, useEffect as y } from "react";
|
|
4
|
-
import { restoreMetadata as
|
|
5
|
-
import { isCoalesced as
|
|
6
|
-
const
|
|
7
|
-
function
|
|
8
|
-
return l(
|
|
4
|
+
import { restoreMetadata as S, startMetadataPersistence as I } from "./lib/metadata-persist.js";
|
|
5
|
+
import { isCoalesced as N, withGetCoalescing as O, releaseGatedReadsOnSharedFetch as P } from "./lib/request-gate.js";
|
|
6
|
+
const R = i(null);
|
|
7
|
+
function L() {
|
|
8
|
+
return l(R);
|
|
9
9
|
}
|
|
10
10
|
const p = i(null);
|
|
11
|
-
function
|
|
11
|
+
function F({ identity: e }) {
|
|
12
12
|
const t = C(), { userId: n, epoch: o, version: r } = e;
|
|
13
13
|
return y(() => {
|
|
14
14
|
let u = () => {
|
|
15
15
|
}, c = !1;
|
|
16
|
-
return
|
|
17
|
-
c || (u =
|
|
16
|
+
return S(t, { userId: n, epoch: o, version: r }).then(() => {
|
|
17
|
+
c || (u = I(t, { userId: n, epoch: o, version: r }));
|
|
18
18
|
}), () => {
|
|
19
19
|
c = !0, u();
|
|
20
20
|
};
|
|
21
21
|
}, [t, n, o, r]), null;
|
|
22
22
|
}
|
|
23
23
|
const d = /* @__PURE__ */ new WeakMap();
|
|
24
|
-
function
|
|
24
|
+
function $() {
|
|
25
25
|
const e = C();
|
|
26
26
|
return y(() => {
|
|
27
27
|
const t = e.getQueryCache(), n = d.get(t);
|
|
28
|
-
return n ? n.count++ : d.set(t, { count: 1, stop:
|
|
28
|
+
return n ? n.count++ : d.set(t, { count: 1, stop: P(t) }), () => {
|
|
29
29
|
const o = d.get(t);
|
|
30
30
|
o && (o.count--, o.count <= 0 && (o.stop(), d.delete(t)));
|
|
31
31
|
};
|
|
32
32
|
}, [e]), null;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function K({
|
|
35
35
|
client: e,
|
|
36
36
|
children: t,
|
|
37
37
|
batchReads: n = !1,
|
|
@@ -42,38 +42,38 @@ function L({
|
|
|
42
42
|
defaultOptions: { queries: { retry: 1, refetchOnWindowFocus: !1 } }
|
|
43
43
|
})
|
|
44
44
|
), c = x(
|
|
45
|
-
() =>
|
|
45
|
+
() => N(e) ? e : O(e, { batchReads: n }),
|
|
46
46
|
[e, n]
|
|
47
47
|
), s = /* @__PURE__ */ b(p.Provider, { value: { client: c }, children: [
|
|
48
|
-
o ? /* @__PURE__ */ f(
|
|
49
|
-
typeof e.setOpen == "function" ? /* @__PURE__ */ f(
|
|
48
|
+
o ? /* @__PURE__ */ f(F, { identity: o }) : null,
|
|
49
|
+
typeof e.setOpen == "function" ? /* @__PURE__ */ f($, {}) : null,
|
|
50
50
|
t
|
|
51
51
|
] });
|
|
52
52
|
return r ? s : /* @__PURE__ */ f(g, { client: u, children: s });
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function X() {
|
|
55
55
|
const e = l(p);
|
|
56
56
|
if (!e) throw new Error("useNivaroClient must be used within <NivaroProvider>");
|
|
57
57
|
return e.client;
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function j() {
|
|
60
60
|
const e = l(p);
|
|
61
61
|
return (e == null ? void 0 : e.client) ?? null;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
const e =
|
|
63
|
+
function Y() {
|
|
64
|
+
const e = j(), t = e == null ? void 0 : e.getToken();
|
|
65
65
|
return {
|
|
66
66
|
apiBase: e ? `${e.url}/api` : "/api",
|
|
67
67
|
authHeaders: t ? { Authorization: `Bearer ${t}` } : {},
|
|
68
68
|
credentials: t ? "omit" : "include"
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
-
const
|
|
71
|
+
const D = i({
|
|
72
72
|
isAdmin: !1,
|
|
73
73
|
userId: ""
|
|
74
74
|
});
|
|
75
|
-
function
|
|
76
|
-
return l(
|
|
75
|
+
function Z() {
|
|
76
|
+
return l(D);
|
|
77
77
|
}
|
|
78
78
|
function A(e) {
|
|
79
79
|
const t = JSON.stringify(e), n = new TextEncoder().encode(t);
|
|
@@ -81,7 +81,7 @@ function A(e) {
|
|
|
81
81
|
for (const r of n) o += String.fromCharCode(r);
|
|
82
82
|
return encodeURIComponent(btoa(o));
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function ee(e) {
|
|
85
85
|
if (!e) return null;
|
|
86
86
|
try {
|
|
87
87
|
const t = atob(e.replace(/ /g, "+")), n = Uint8Array.from(t, (r) => r.charCodeAt(0)), o = JSON.parse(new TextDecoder().decode(n));
|
|
@@ -99,43 +99,46 @@ const Q = i({
|
|
|
99
99
|
navigate: (e) => {
|
|
100
100
|
window.location.href = e;
|
|
101
101
|
}
|
|
102
|
-
});
|
|
103
|
-
function
|
|
102
|
+
}), U = i({ active: !0 });
|
|
103
|
+
function te() {
|
|
104
|
+
return l(U);
|
|
105
|
+
}
|
|
106
|
+
function k() {
|
|
104
107
|
return l(Q);
|
|
105
108
|
}
|
|
106
|
-
function
|
|
109
|
+
function E(e) {
|
|
107
110
|
const t = `/collections/${e.collection}/${e.itemId}`, n = [];
|
|
108
111
|
e.layoutSlug && n.push(`layout=${encodeURIComponent(e.layoutSlug)}`), e.prefill && Object.keys(e.prefill).length && n.push(`prefill=${A(e.prefill)}`);
|
|
109
112
|
for (const [o, r] of Object.entries(e.query ?? {}))
|
|
110
113
|
n.push(`${encodeURIComponent(o)}=${encodeURIComponent(r)}`);
|
|
111
114
|
return n.length ? `${t}?${n.join("&")}` : t;
|
|
112
115
|
}
|
|
113
|
-
function
|
|
114
|
-
const e =
|
|
116
|
+
function ne() {
|
|
117
|
+
const e = k(), t = (o) => (e.itemUrl ?? E)(o);
|
|
115
118
|
return { urlFor: t, open: (o) => {
|
|
116
119
|
var r;
|
|
117
120
|
((r = e.openItem) == null ? void 0 : r.call(e, o)) !== !0 && e.navigate(t(o));
|
|
118
121
|
} };
|
|
119
122
|
}
|
|
120
|
-
const E = i(null);
|
|
121
|
-
function te() {
|
|
122
|
-
return l(E);
|
|
123
|
-
}
|
|
124
123
|
const G = i(null);
|
|
125
|
-
function
|
|
124
|
+
function oe() {
|
|
126
125
|
return l(G);
|
|
127
126
|
}
|
|
128
|
-
const M = i(
|
|
129
|
-
function
|
|
127
|
+
const M = i(null);
|
|
128
|
+
function re() {
|
|
130
129
|
return l(M);
|
|
131
130
|
}
|
|
132
|
-
const q = i(
|
|
133
|
-
function
|
|
131
|
+
const q = i({});
|
|
132
|
+
function le() {
|
|
134
133
|
return l(q);
|
|
135
134
|
}
|
|
136
135
|
const H = i(null);
|
|
137
|
-
function
|
|
138
|
-
|
|
136
|
+
function ie() {
|
|
137
|
+
return l(H);
|
|
138
|
+
}
|
|
139
|
+
const W = i(null);
|
|
140
|
+
function ue(e) {
|
|
141
|
+
const t = l(W), [n, o] = m([]), r = t ? t.get(e) ?? null : n[n.length - 1] ?? null, u = h(
|
|
139
142
|
(s) => {
|
|
140
143
|
t ? t.push(e, s) : o((a) => [...a, s]);
|
|
141
144
|
},
|
|
@@ -148,39 +151,41 @@ function le(e) {
|
|
|
148
151
|
);
|
|
149
152
|
return { value: r, push: u, back: c };
|
|
150
153
|
}
|
|
151
|
-
function
|
|
154
|
+
function se(e) {
|
|
152
155
|
var u;
|
|
153
156
|
const t = (u = e._overrides) == null ? void 0 : u.drilldown, n = t && typeof t == "object" ? t : null, o = e.interface === "relation-path";
|
|
154
157
|
return (n == null ? void 0 : n.enabled) ?? o ? { enabled: !0, layout_id: (n == null ? void 0 : n.layout_id) ?? null, width: (n == null ? void 0 : n.width) ?? null } : null;
|
|
155
158
|
}
|
|
156
|
-
const
|
|
159
|
+
const ce = i(null), J = i(null), ae = () => l(J);
|
|
157
160
|
export {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
161
|
+
H as DrilldownContext,
|
|
162
|
+
q as DrilldownViewsContext,
|
|
163
|
+
R as GridFlushContext,
|
|
164
|
+
D as ItemEditAuthContext,
|
|
162
165
|
Q as NavigationContext,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
166
|
+
K as NivaroProvider,
|
|
167
|
+
W as OverlayHistoryContext,
|
|
168
|
+
G as ParentDraftContext,
|
|
169
|
+
U as RecordSurfaceContext,
|
|
170
|
+
M as ReimportHandlerContext,
|
|
171
|
+
ce as RelationPathDataContext,
|
|
172
|
+
J as StaleFieldReportContext,
|
|
173
|
+
ee as decodePrefill,
|
|
174
|
+
E as defaultItemUrl,
|
|
171
175
|
A as encodePrefill,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
176
|
+
se as fieldDrilldownConfig,
|
|
177
|
+
Y as useApiFetchConfig,
|
|
178
|
+
ie as useDrilldown,
|
|
179
|
+
le as useDrilldownViews,
|
|
180
|
+
L as useGridFlush,
|
|
181
|
+
Z as useItemEditAuth,
|
|
182
|
+
ne as useItemNavigation,
|
|
183
|
+
k as useNavigation,
|
|
184
|
+
X as useNivaroClient,
|
|
185
|
+
j as useOptionalNivaroClient,
|
|
186
|
+
ue as useOverlayState,
|
|
187
|
+
oe as useParentDraft,
|
|
188
|
+
te as useRecordSurface,
|
|
189
|
+
re as useReimportHandler,
|
|
190
|
+
ae as useStaleFieldReporter
|
|
186
191
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const i = 6e4, o = 9e5;
|
|
2
|
+
const a = /* @__PURE__ */ new Set([1, 2, 3, 4, 5, 6, 12, 14]);
|
|
3
|
+
function u(e = Date.now()) {
|
|
4
|
+
return { lastFullAt: e, interacted: !1, pending: !1 };
|
|
5
|
+
}
|
|
6
|
+
function _(e, l, t = Date.now()) {
|
|
7
|
+
var E;
|
|
8
|
+
const n = l;
|
|
9
|
+
if ((n == null ? void 0 : n.type) === 2)
|
|
10
|
+
return e.lastFullAt = t, e.interacted = !1, e.pending = !1, !1;
|
|
11
|
+
if ((n == null ? void 0 : n.type) === 3 && a.has(Number((E = n.data) == null ? void 0 : E.source)) && (e.interacted = !0), e.pending) return !1;
|
|
12
|
+
const c = t - e.lastFullAt, r = e.interacted ? c >= 6e4 : c >= 9e5;
|
|
13
|
+
return r && (e.pending = !0), r;
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
i as REPLAY_CHECKOUT_ACTIVE_MS,
|
|
17
|
+
o as REPLAY_CHECKOUT_IDLE_MS,
|
|
18
|
+
u as createReplayCheckoutState,
|
|
19
|
+
_ as noteReplayEvent
|
|
20
|
+
};
|