@nivaro/react 0.3.45 → 0.3.47
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 +290 -23
- package/dist/index.js +679 -659
- package/dist/shared/components/BaseMap.js +149 -103
- package/dist/shared/components/CollectionBrowserView.js +813 -826
- package/dist/shared/components/ErrorNotice.js +169 -0
- package/dist/shared/components/ErrorSurface.js +23 -17
- package/dist/shared/components/ListLoadError.js +8 -29
- package/dist/shared/components/LoadErrorNote.js +38 -21
- package/dist/shared/components/QueryErrorState.js +8 -11
- package/dist/shared/components/ReportView.js +1320 -1291
- package/dist/shared/components/chat/ChannelArchive.js +60 -60
- package/dist/shared/components/chat/ChannelExtras.js +74 -74
- package/dist/shared/components/chat/ChatPanel.js +368 -367
- package/dist/shared/components/command-center/CommandCenterView.js +313 -69
- package/dist/shared/components/command-center/Customize.js +353 -0
- package/dist/shared/components/command-center/Header.js +279 -53
- package/dist/shared/components/command-center/KioskLinks.js +198 -0
- package/dist/shared/components/command-center/PeekPanel.js +144 -3
- package/dist/shared/components/command-center/announce.js +13 -0
- package/dist/shared/components/command-center/board-prefs.js +99 -0
- package/dist/shared/components/command-center/freshness.js +29 -0
- package/dist/shared/components/command-center/layout.js +56 -0
- package/dist/shared/components/command-center/panels/AttentionPanel.js +132 -3
- package/dist/shared/components/command-center/panels/Banner.js +75 -0
- package/dist/shared/components/command-center/panels/BoardSettings.js +224 -0
- package/dist/shared/components/command-center/panels/FeedPanel.js +145 -29
- package/dist/shared/components/command-center/panels/FlowPanel.js +154 -56
- package/dist/shared/components/command-center/panels/ForecastPanel.js +244 -3
- package/dist/shared/components/command-center/panels/MapLegend.js +266 -0
- package/dist/shared/components/command-center/panels/MapPanel.js +216 -66
- package/dist/shared/components/command-center/panels/PartnersPanel.js +49 -3
- package/dist/shared/components/command-center/panels/PeoplePanel.js +258 -40
- package/dist/shared/components/command-center/panels/RegionPicker.js +88 -3
- package/dist/shared/components/command-center/panels/SystemPanel.js +158 -38
- package/dist/shared/components/command-center/panels/ThroughputPanel.js +307 -3
- package/dist/shared/components/command-center/panels/TimeBar.js +227 -6
- package/dist/shared/components/command-center/panels/TrafficPanel.js +12 -8
- package/dist/shared/components/command-center/panels/WorkloadPanel.js +82 -3
- package/dist/shared/components/command-center/panels/attention-actions.js +267 -0
- package/dist/shared/components/command-center/panels/map-shared.js +95 -0
- package/dist/shared/components/command-center/panels/registry.js +87 -19
- package/dist/shared/components/command-center/shell-hooks.js +118 -0
- package/dist/shared/components/command-center/shortcuts.js +37 -0
- package/dist/shared/components/command-center/theme.js +39 -21
- package/dist/shared/components/command-center/time.js +52 -0
- package/dist/shared/components/command-center/url-state.js +54 -0
- package/dist/shared/components/command-center/work-links.js +32 -0
- package/dist/shared/components/help-videos/editor/ClipsPanel.js +49 -48
- package/dist/shared/components/help-videos/editor/PublishButton.js +37 -36
- package/dist/shared/components/help-videos/editor/StatsTab.js +45 -44
- package/dist/shared/components/help-videos/editor/VersionsTab.js +29 -28
- package/dist/shared/components/help-videos/library/AuthorRolesButton.js +19 -18
- package/dist/shared/components/help-videos/library/HelpVideoLibrary.js +132 -129
- package/dist/shared/components/help-videos/library/LearningPathsPanel.js +42 -41
- package/dist/shared/components/help-videos/settings/HouseStyleButton.js +21 -20
- package/dist/shared/components/help-videos/settings/RenderSettingsButton.js +22 -21
- package/dist/shared/components/import/DocumentAutofillButton.js +24 -20
- package/dist/shared/components/import/ImportFromFileButton.js +61 -60
- package/dist/shared/components/imports/ImportStalenessControl.js +20 -21
- package/dist/shared/components/imports/NewImportDialog.js +29 -28
- package/dist/shared/components/imports/RunDetailSheet.js +63 -63
- package/dist/shared/components/item-edit/FieldRow.js +329 -329
- package/dist/shared/components/item-edit/InlineTableField.js +898 -898
- package/dist/shared/components/item-edit/PersonalDefaultControl.js +57 -56
- package/dist/shared/components/item-edit/PlanGrid.js +220 -221
- package/dist/shared/components/item-edit/RecordGrantTools.js +49 -48
- package/dist/shared/components/item-edit/placement-behaviour.js +68 -67
- package/dist/shared/components/layout-editor/inspector/ColumnFit.js +24 -23
- package/dist/shared/components/layout-editor/inspector/PickerPreview.js +17 -16
- package/dist/shared/components/layout-editor/matrix/FieldStateMatrix.js +41 -41
- package/dist/shared/components/layout-editor/outputs/output-api.js +33 -31
- package/dist/shared/components/layout-editor/overview/overview-api.js +84 -83
- package/dist/shared/components/layout-editor/useLayoutDraft.js +47 -42
- package/dist/shared/components/monitoring/InactiveUserLinksView.js +10 -9
- package/dist/shared/components/monitoring/TrafficMiniMap.js +111 -70
- package/dist/shared/components/panels/SlaClock.js +35 -36
- package/dist/shared/components/pipeline/PipelineEditorView.js +311 -312
- package/dist/shared/components/pipeline/TeamSuggestions.js +31 -30
- package/dist/shared/components/profile/AgentsPanel.js +73 -72
- package/dist/shared/components/profile/MailSuppressedPill.js +22 -21
- package/dist/shared/components/support/SupportRequestDialog.js +85 -81
- package/dist/shared/components/support/SupportView.js +94 -87
- package/dist/shared/lib/autofill-poll.js +21 -18
- package/dist/shared/lib/error-actions.js +85 -0
- package/dist/shared/lib/error-message.js +223 -82
- package/dist/shared/lib/error-toast.js +71 -13
- package/dist/shared/lib/safe-error.js +136 -38
- package/package.json +1 -1
|
@@ -1,45 +1,44 @@
|
|
|
1
1
|
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { useQuery as F, useQueryClient as
|
|
3
|
-
import { Clock3 as
|
|
2
|
+
import { useQuery as F, useQueryClient as E, useMutation as j } from "@tanstack/react-query";
|
|
3
|
+
import { Clock3 as L } from "lucide-react";
|
|
4
4
|
import { useState as h } from "react";
|
|
5
5
|
import { useNivaroClient as P } from "../../context.js";
|
|
6
|
-
import { get as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return ((e = t == null ? void 0 : t.response) == null ? void 0 : e.error) ?? (t == null ? void 0 : t.message) ?? null;
|
|
6
|
+
import { get as T, post as H, del as K } from "../../lib/commands.js";
|
|
7
|
+
import { userErrorMessage as Q } from "../../lib/safe-error.js";
|
|
8
|
+
import { humanHours as l, formatRelative as B } from "../../lib/utils.js";
|
|
9
|
+
import { invalidateRecordNotes as M } from "../item-edit/RecordInsights.js";
|
|
10
|
+
import { Popover as O, PopoverTrigger as z, PopoverContent as U } from "../ui/popover.js";
|
|
11
|
+
function S(t) {
|
|
12
|
+
return t ? Q(t, "Could not load the deadline") : null;
|
|
14
13
|
}
|
|
15
|
-
function q(
|
|
16
|
-
return ["sla-breach",
|
|
14
|
+
function q(t, r) {
|
|
15
|
+
return ["sla-breach", t, r];
|
|
17
16
|
}
|
|
18
|
-
function
|
|
17
|
+
function W(t, r) {
|
|
19
18
|
const e = P();
|
|
20
19
|
return F({
|
|
21
|
-
queryKey: q(
|
|
22
|
-
queryFn: () => e.request(
|
|
23
|
-
enabled: !!
|
|
20
|
+
queryKey: q(t, String(r ?? "")),
|
|
21
|
+
queryFn: () => e.request(T(`/sla/status/${t}/${r}`)).then((o) => o).catch(() => null),
|
|
22
|
+
enabled: !!r,
|
|
24
23
|
staleTime: 6e4
|
|
25
24
|
});
|
|
26
25
|
}
|
|
27
|
-
function
|
|
28
|
-
const
|
|
29
|
-
return `Clock adjusted to ${l(
|
|
26
|
+
function D(t) {
|
|
27
|
+
const r = t.set_by_name ? ` by ${t.set_by_name}` : "";
|
|
28
|
+
return `Clock adjusted to ${l(t.duration_hours)} (rule: ${l(t.rule_duration_hours)})${r}, ${B(t.set_at)}`;
|
|
30
29
|
}
|
|
31
|
-
function
|
|
32
|
-
collection:
|
|
33
|
-
itemId:
|
|
30
|
+
function G({
|
|
31
|
+
collection: t,
|
|
32
|
+
itemId: r,
|
|
34
33
|
data: e,
|
|
35
34
|
tone: o = "neutral"
|
|
36
35
|
}) {
|
|
37
36
|
var w;
|
|
38
|
-
const m = P(), u =
|
|
39
|
-
u.invalidateQueries({ queryKey: q(
|
|
37
|
+
const m = P(), u = E(), [A, x] = h(!1), [b, y] = h(""), [i, f] = h(""), [N, c] = h(null), k = ((w = e.sla_rule) == null ? void 0 : w.duration_hours) ?? null, _ = e.elapsed_hours ?? 0, $ = () => {
|
|
38
|
+
u.invalidateQueries({ queryKey: q(t, r) }), M(u, t, r);
|
|
40
39
|
}, g = j({
|
|
41
40
|
mutationFn: () => m.request(
|
|
42
|
-
H(`/sla/override/${
|
|
41
|
+
H(`/sla/override/${t}/${r}`, {
|
|
43
42
|
duration_hours: Number(b),
|
|
44
43
|
reason: i.trim()
|
|
45
44
|
})
|
|
@@ -51,7 +50,7 @@ function D({
|
|
|
51
50
|
}), v = j({
|
|
52
51
|
mutationFn: () => m.request(
|
|
53
52
|
K(
|
|
54
|
-
`/sla/override/${
|
|
53
|
+
`/sla/override/${t}/${r}${i.trim() ? `?reason=${encodeURIComponent(i.trim())}` : ""}`
|
|
55
54
|
)
|
|
56
55
|
),
|
|
57
56
|
onSuccess: () => {
|
|
@@ -77,7 +76,7 @@ function D({
|
|
|
77
76
|
children: "Adjust clock"
|
|
78
77
|
}
|
|
79
78
|
) }),
|
|
80
|
-
/* @__PURE__ */ n(
|
|
79
|
+
/* @__PURE__ */ n(U, { align: "end", className: "w-[320px] space-y-3 p-3", "data-sla-adjust-panel": !0, children: [
|
|
81
80
|
/* @__PURE__ */ n("div", { children: [
|
|
82
81
|
/* @__PURE__ */ a("p", { className: "text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children: "Adjust this record's SLA clock" }),
|
|
83
82
|
/* @__PURE__ */ n("p", { className: "mt-0.5 text-[11.5px] text-slate-500 dark:text-slate-400", children: [
|
|
@@ -147,13 +146,13 @@ function D({
|
|
|
147
146
|
}
|
|
148
147
|
);
|
|
149
148
|
}
|
|
150
|
-
function
|
|
149
|
+
function se({ collection: t, itemId: r }) {
|
|
151
150
|
var u;
|
|
152
|
-
const { data: e } =
|
|
151
|
+
const { data: e } = W(t, r);
|
|
153
152
|
if (!(e != null && e.status) || e.status === "none" || e.total_hours == null) return null;
|
|
154
153
|
const o = e.total_hours - (e.elapsed_hours ?? 0), m = e.status === "breached" ? "text-red-700 dark:text-red-300" : e.status === "warning" ? "text-amber-700 dark:text-amber-300" : "text-slate-600 dark:text-slate-300";
|
|
155
154
|
return /* @__PURE__ */ n("div", { className: "flex flex-wrap items-center gap-2", "data-sla-clock-line": e.status, children: [
|
|
156
|
-
/* @__PURE__ */ a(
|
|
155
|
+
/* @__PURE__ */ a(L, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
|
|
157
156
|
/* @__PURE__ */ n("p", { className: `min-w-0 flex-1 text-[12px] ${m}`, children: [
|
|
158
157
|
/* @__PURE__ */ a("span", { className: "font-medium", children: "SLA" }),
|
|
159
158
|
(u = e.sla_rule) != null && u.name ? ` · ${e.sla_rule.name}` : "",
|
|
@@ -168,18 +167,18 @@ function re({ collection: r, itemId: t }) {
|
|
|
168
167
|
"data-sla-override": !0,
|
|
169
168
|
children: [
|
|
170
169
|
"· ",
|
|
171
|
-
|
|
170
|
+
D(e.override)
|
|
172
171
|
]
|
|
173
172
|
}
|
|
174
173
|
)
|
|
175
174
|
] }),
|
|
176
|
-
e.can_adjust && /* @__PURE__ */ a(
|
|
175
|
+
e.can_adjust && /* @__PURE__ */ a(G, { collection: t, itemId: r, data: e })
|
|
177
176
|
] });
|
|
178
177
|
}
|
|
179
178
|
export {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
179
|
+
G as AdjustClockPopover,
|
|
180
|
+
se as SlaClockLine,
|
|
181
|
+
D as overrideSentence,
|
|
183
182
|
q as slaStatusKey,
|
|
184
|
-
|
|
183
|
+
W as useSlaStatus
|
|
185
184
|
};
|