@nivaro/react 0.3.126 → 0.3.128
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 +20 -2
- package/dist/index.js +150 -147
- package/dist/shared/components/CollectionBrowserView.js +3259 -3211
- package/dist/shared/components/DataTable.js +406 -401
- package/dist/shared/components/ItemEditForm.js +4359 -4299
- package/dist/shared/components/MatrixEditor.js +548 -490
- package/dist/shared/components/MyWorkView.js +284 -274
- package/dist/shared/components/NotificationBell.js +264 -218
- package/dist/shared/components/RecordGridEditor.js +582 -472
- package/dist/shared/components/chat/chat-core.js +331 -346
- package/dist/shared/components/chat/chat-typing.js +25 -0
- package/dist/shared/components/command-center/CommandCenterView.js +1 -1
- package/dist/shared/components/command-center/PeekPanel.js +8 -1
- package/dist/shared/components/command-center/api.js +17 -9
- package/dist/shared/components/command-center/panels/AttentionPanel.js +4 -1
- package/dist/shared/components/command-center/panels/PartnersPanel.js +2 -1
- package/dist/shared/components/item-edit/GroupSection.js +1 -1
- package/dist/shared/components/item-edit/InlineTableField.js +432 -429
- package/dist/shared/components/item-edit/RecordLiveSync.js +115 -108
- package/dist/shared/components/item-edit/RecordViewersChip.js +17 -16
- package/dist/shared/components/item-edit/RowComments.js +33 -30
- package/dist/shared/components/item-edit/cascade-clear-notice.js +30 -28
- package/dist/shared/components/item-edit/live-related.js +29 -16
- package/dist/shared/components/item-edit/record-opened-live.js +86 -0
- package/dist/shared/components/item-edit/reimport-m2m.js +17 -0
- package/dist/shared/components/panels/OwnerOpenedLine.js +24 -23
- package/dist/shared/components/panels/RecordIntegrityBanner.js +1 -1
- package/dist/shared/components/pipeline/TeamSuggestions.js +1 -1
- package/dist/shared/components/queue/QueueItemSheet.js +171 -130
- package/dist/shared/components/record-grid-guard.js +85 -0
- package/dist/shared/components/support/TicketDetailSheet.js +168 -151
- package/dist/shared/lib/at-risk-fields.js +14 -0
- package/dist/shared/lib/live-queries.js +9 -8
- package/dist/shared/lib/live-screen.js +77 -76
- package/dist/shared/lib/presence-hooks.js +190 -127
- package/dist/shared/lib/user-sync.js +78 -65
- package/dist/shared/lib/waiting-count.js +40 -29
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const a = 2500, p = 6e3;
|
|
2
|
+
function f(r, n, t, e, s = Date.now()) {
|
|
3
|
+
var l;
|
|
4
|
+
if ((n == null ? void 0 : n.room) !== t || ((l = n.user) == null ? void 0 : l.id) == null) return null;
|
|
5
|
+
const i = String(n.user.id).toUpperCase();
|
|
6
|
+
if (e && i === e.toUpperCase()) return null;
|
|
7
|
+
const u = new Map(r);
|
|
8
|
+
if (n.state === "stop") {
|
|
9
|
+
if (!u.delete(i)) return null;
|
|
10
|
+
} else {
|
|
11
|
+
const o = typeof n.user.name == "string" && n.user.name ? n.user.name : "Someone";
|
|
12
|
+
u.set(i, { name: o, until: s + 6e3 });
|
|
13
|
+
}
|
|
14
|
+
return u;
|
|
15
|
+
}
|
|
16
|
+
function g(r, n = Date.now()) {
|
|
17
|
+
const t = [...r.values()].filter((e) => e.until > n).map((e) => e.name);
|
|
18
|
+
return t.length === 0 ? null : t.length === 1 ? `${t[0]} is typing…` : t.length === 2 ? `${t[0]} and ${t[1]} are typing…` : `${t.length} people are typing…`;
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
a as TYPING_REPEAT_MS,
|
|
22
|
+
p as TYPING_TTL_MS,
|
|
23
|
+
f as applyTypingEvent,
|
|
24
|
+
g as typingSentence
|
|
25
|
+
};
|
|
@@ -225,7 +225,7 @@ function tt({
|
|
|
225
225
|
};
|
|
226
226
|
return window.addEventListener("keydown", o), () => window.removeEventListener("keydown", o);
|
|
227
227
|
}, [A]);
|
|
228
|
-
const z = Z("/attention", void 0, { enabled: !1 }), k = ke(z.data), S = K(null), [W, L] = i("");
|
|
228
|
+
const z = Z("/attention", void 0, { enabled: !1, live: !0 }), k = ke(z.data), S = K(null), [W, L] = i("");
|
|
229
229
|
B(() => {
|
|
230
230
|
if (k === null) return;
|
|
231
231
|
const o = be(S.current, k);
|
|
@@ -16,7 +16,14 @@ function H() {
|
|
|
16
16
|
const e = M(), s = e.peek, m = () => e.setPeek(null), r = S(
|
|
17
17
|
"/peek",
|
|
18
18
|
s ? { collection: s.collection, id: s.id } : {},
|
|
19
|
-
{
|
|
19
|
+
{
|
|
20
|
+
enabled: !!s,
|
|
21
|
+
lenses: !1,
|
|
22
|
+
retry: !1,
|
|
23
|
+
staleTime: 15e3,
|
|
24
|
+
// Another record's preview must never stand in for this one.
|
|
25
|
+
placeholderData: void 0
|
|
26
|
+
}
|
|
20
27
|
), a = r.data, o = r.isError && ((i = r.error) == null ? void 0 : i.status) === 404;
|
|
21
28
|
return /* @__PURE__ */ l(
|
|
22
29
|
U,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useQuery as f } from "@tanstack/react-query";
|
|
2
|
-
import { useNivaroClient as
|
|
1
|
+
import { useQuery as f, keepPreviousData as g } from "@tanstack/react-query";
|
|
2
|
+
import { useNivaroClient as l } from "../../context.js";
|
|
3
3
|
import { get as p } from "../../lib/commands.js";
|
|
4
4
|
import { useCc as y } from "./state.js";
|
|
5
5
|
function q(e, r) {
|
|
@@ -9,18 +9,26 @@ function q(e, r) {
|
|
|
9
9
|
...e.at ? { at: new Date(e.at).toISOString() } : {}
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
...
|
|
15
|
-
...
|
|
12
|
+
function v(e, r, t = {}) {
|
|
13
|
+
return {
|
|
14
|
+
...t.lenses !== !1 ? q({ region: e.region, at: t.live ? null : e.at }, r) : r ?? {},
|
|
15
|
+
...e.kiosk ? { kiosk: e.kiosk } : {}
|
|
16
16
|
};
|
|
17
|
+
}
|
|
18
|
+
function L(e, r, t) {
|
|
19
|
+
const n = l(), { region: i, at: s, kiosk: u } = y(), { lenses: c, live: a, ...m } = t ?? {}, o = v({ region: i, at: s, kiosk: u }, r, { lenses: c, live: a });
|
|
17
20
|
return f({
|
|
18
|
-
queryKey: ["command-center", e,
|
|
19
|
-
queryFn: () =>
|
|
21
|
+
queryKey: ["command-center", e, o],
|
|
22
|
+
queryFn: () => n.request(p(`/command-center${e}`, o)).then((k) => k.data),
|
|
23
|
+
// R9: a rewind scrub or a region pick keeps each panel's last answer on screen until the
|
|
24
|
+
// new one arrives, instead of blanking every panel at once. A read about ONE thing (the
|
|
25
|
+
// peek) opts out with `placeholderData: undefined`.
|
|
26
|
+
placeholderData: g,
|
|
20
27
|
...m
|
|
21
28
|
});
|
|
22
29
|
}
|
|
23
30
|
export {
|
|
24
31
|
q as ccParams,
|
|
25
|
-
|
|
32
|
+
v as ccQueryParams,
|
|
33
|
+
L as useCcQuery
|
|
26
34
|
};
|
|
@@ -12,7 +12,10 @@ const O = {
|
|
|
12
12
|
info: { Icon: I, word: "Info", tone: "text-[var(--cc-muted)]" }
|
|
13
13
|
}, k = 8;
|
|
14
14
|
function Y() {
|
|
15
|
-
const r = g(), e = $("/attention", void 0, {
|
|
15
|
+
const r = g(), e = $("/attention", void 0, {
|
|
16
|
+
refetchInterval: 6e4,
|
|
17
|
+
live: !0
|
|
18
|
+
}), n = e.data ?? [], [s, i] = w(!1), c = s ? n : n.slice(0, k), d = n.length - c.length;
|
|
16
19
|
return /* @__PURE__ */ o("section", { className: _, "data-cc-panel": "attention", "aria-busy": e.isLoading, children: [
|
|
17
20
|
/* @__PURE__ */ o("div", { className: A, children: [
|
|
18
21
|
/* @__PURE__ */ a("h2", { className: T, children: "Needs attention" }),
|
|
@@ -14,7 +14,8 @@ function $() {
|
|
|
14
14
|
const r = h(), s = r.isAdmin || !!((o = r.snapshot) != null && o.health), { data: l } = i("/partners", void 0, {
|
|
15
15
|
enabled: s,
|
|
16
16
|
refetchInterval: 6e4,
|
|
17
|
-
staleTime: 3e4
|
|
17
|
+
staleTime: 3e4,
|
|
18
|
+
live: !0
|
|
18
19
|
});
|
|
19
20
|
if (!s || !l || l.length === 0) return null;
|
|
20
21
|
const c = l.filter((e) => e.status === "down" || e.status === "degraded").length, d = (e) => r.navigate(e ?? "/integration-health?tab=partners");
|
|
@@ -311,7 +311,7 @@ function wn({
|
|
|
311
311
|
attach_field: o,
|
|
312
312
|
filename_template: l ?? void 0
|
|
313
313
|
})
|
|
314
|
-
), bn(s, [t]), s.invalidateQueries({ queryKey: ["
|
|
314
|
+
), bn(s, [t]), s.invalidateQueries({ queryKey: ["item", n, t] });
|
|
315
315
|
} catch {
|
|
316
316
|
} finally {
|
|
317
317
|
u(!1);
|