@nivaro/react 0.2.54 → 0.2.55
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 +99 -98
- package/dist/index.d.ts +339 -2
- package/dist/index.js +644 -618
- package/dist/layout-editor.d.ts +4 -0
- package/dist/shared/components/BackgroundRunOffer.js +117 -0
- package/dist/shared/components/BroadcastView.js +214 -213
- package/dist/shared/components/CollectionBrowserView.js +2592 -2695
- package/dist/shared/components/ItemEditForm.js +4066 -3832
- package/dist/shared/components/JobsTray.js +100 -55
- package/dist/shared/components/MyWorkView.js +91 -89
- package/dist/shared/components/NotificationBell.js +80 -79
- package/dist/shared/components/ProfileView.js +568 -520
- package/dist/shared/components/RecordCompare.js +254 -0
- package/dist/shared/components/RecordReadView.js +599 -552
- package/dist/shared/components/ReportView.js +578 -543
- package/dist/shared/components/RowPresence.js +91 -0
- package/dist/shared/components/WidgetSlot.js +474 -458
- package/dist/shared/components/ai/AiAnalyticsView.js +16 -6
- package/dist/shared/components/ai/AskPanel.js +139 -119
- package/dist/shared/components/ai/FirstWeekCard.js +126 -0
- package/dist/shared/components/bulk/BulkFieldUpdate.js +289 -0
- package/dist/shared/components/bulk/bulk-field-options.js +45 -0
- package/dist/shared/components/charts/CumulativeFlowChart.js +176 -0
- package/dist/shared/components/chat/ChannelArchive.js +326 -0
- package/dist/shared/components/chat/ChannelExtras.js +141 -121
- package/dist/shared/components/chat/ChatAnalyticsView.js +112 -110
- package/dist/shared/components/chat/ChatPanel.js +1695 -1733
- package/dist/shared/components/chat/Composer.js +357 -303
- package/dist/shared/components/chat/MessageActions.js +92 -0
- package/dist/shared/components/chat/MessageFormat.js +290 -264
- package/dist/shared/components/chat/OutboxBubbles.js +146 -0
- package/dist/shared/components/chat/RequestIdCard.js +135 -0
- package/dist/shared/components/chat/RoomHeaderMenu.js +202 -0
- package/dist/shared/components/chat/RoomParts.js +213 -274
- package/dist/shared/components/chat/ScreenClip.js +184 -0
- package/dist/shared/components/chat/chat-core.js +402 -483
- package/dist/shared/components/chat/chat-drafts.js +59 -0
- package/dist/shared/components/chat/chat-emoji.js +348 -0
- package/dist/shared/components/chat/chat-local-time.js +41 -0
- package/dist/shared/components/chat/chat-outbox.js +303 -0
- package/dist/shared/components/chat/chat-window.js +163 -0
- package/dist/shared/components/chat/huddle/HuddleControls.js +143 -0
- package/dist/shared/components/chat/huddle/HuddleStage.js +164 -0
- package/dist/shared/components/chat/huddle/huddle-store.js +342 -0
- package/dist/shared/components/chat/huddle/useHuddle.js +58 -0
- package/dist/shared/components/help-videos/api.js +76 -73
- package/dist/shared/components/item-edit/CatalogPickerField.js +113 -112
- package/dist/shared/components/item-edit/ChangeReasonDialog.js +13 -13
- package/dist/shared/components/item-edit/FieldAffordances.js +2 -2
- package/dist/shared/components/item-edit/FieldRenderer.js +248 -245
- package/dist/shared/components/item-edit/FieldRow.js +292 -279
- package/dist/shared/components/item-edit/GroupSection.js +698 -574
- package/dist/shared/components/item-edit/InlineTableField.js +3 -1
- package/dist/shared/components/item-edit/RelationCombobox.js +186 -176
- package/dist/shared/components/item-edit/entry/EntryStrip.js +54 -0
- package/dist/shared/components/item-edit/entry/entry-keys.js +27 -0
- package/dist/shared/components/item-edit/entry/useEntryKeyboard.js +70 -0
- package/dist/shared/components/item-edit/entry/useEntryMode.js +59 -0
- package/dist/shared/components/item-edit/form-structure-ui.js +105 -0
- package/dist/shared/components/item-edit/lazy-sections.js +36 -0
- package/dist/shared/components/item-edit/lock-why.js +39 -32
- package/dist/shared/components/item-edit/picker-miss.js +26 -0
- package/dist/shared/components/item-edit/placement-behaviour.js +196 -0
- package/dist/shared/components/item-edit/useFormUsageBeacon.js +51 -45
- package/dist/shared/components/layout-editor/AddPanel.js +134 -117
- package/dist/shared/components/layout-editor/ChangeNote.js +25 -24
- package/dist/shared/components/layout-editor/CollabParts.js +80 -75
- package/dist/shared/components/layout-editor/DesignNode.js +126 -120
- package/dist/shared/components/layout-editor/EditorCanvas.js +30 -27
- package/dist/shared/components/layout-editor/EditorTopBar.js +203 -192
- package/dist/shared/components/layout-editor/HistoryPanel.js +120 -104
- package/dist/shared/components/layout-editor/LayoutEditor.js +768 -671
- package/dist/shared/components/layout-editor/RestorePiece.js +143 -0
- package/dist/shared/components/layout-editor/StagedChip.js +22 -0
- package/dist/shared/components/layout-editor/StructureMenu.js +237 -186
- package/dist/shared/components/layout-editor/collab/FormFollowShare.js +149 -103
- package/dist/shared/components/layout-editor/collab/collab-api.js +29 -26
- package/dist/shared/components/layout-editor/dnd/LayoutDndProvider.js +81 -80
- package/dist/shared/components/layout-editor/dnd/node.js +69 -57
- package/dist/shared/components/layout-editor/draft-recovery.js +113 -43
- package/dist/shared/components/layout-editor/entry/PlacementPresets.js +149 -0
- package/dist/shared/components/layout-editor/entry/entry-editor-context.js +10 -0
- package/dist/shared/components/layout-editor/entry/presets.js +71 -0
- package/dist/shared/components/layout-editor/entry/tab-order.js +110 -0
- package/dist/shared/components/layout-editor/entry/theme-preview.js +37 -0
- package/dist/shared/components/layout-editor/grid-guides.js +142 -0
- package/dist/shared/components/layout-editor/inspector/BehaviourSettings.js +402 -0
- package/dist/shared/components/layout-editor/inspector/BulkInspector.js +61 -57
- package/dist/shared/components/layout-editor/inspector/GroupInspector.js +247 -151
- package/dist/shared/components/layout-editor/inspector/Inspector.js +176 -155
- package/dist/shared/components/layout-editor/inspector/LookTab.js +167 -116
- package/dist/shared/components/layout-editor/inspector/PickerMisses.js +129 -0
- package/dist/shared/components/layout-editor/inspector/PickerTab.js +84 -82
- package/dist/shared/components/layout-editor/inspector/RulesTab.js +66 -62
- package/dist/shared/components/layout-editor/inspector/kit.js +69 -68
- package/dist/shared/components/layout-editor/outputs/OutputsButton.js +254 -0
- package/dist/shared/components/layout-editor/outputs/help-sheet.js +154 -0
- package/dist/shared/components/layout-editor/outputs/output-api.js +61 -0
- package/dist/shared/components/layout-editor/overview/describe-conditions.js +6 -0
- package/dist/shared/components/layout-editor/overview/purpose.js +15 -13
- package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
- package/dist/shared/components/layout-editor/restore-piece.js +192 -0
- package/dist/shared/components/layout-editor/section-structure.js +241 -0
- package/dist/shared/components/layout-editor/settings/EntrySection.js +296 -0
- package/dist/shared/components/layout-editor/settings/FormSettings.js +41 -39
- package/dist/shared/components/layout-editor/settings/ResolveSettings.js +255 -0
- package/dist/shared/components/layout-editor/settings/ToolsSection.js +147 -111
- package/dist/shared/components/layout-editor/settings/WhoSection.js +29 -26
- package/dist/shared/components/layout-editor/settings/settings-registry.js +114 -17
- package/dist/shared/components/layout-editor/staged-api.js +64 -0
- package/dist/shared/components/layout-editor/structure-ops.js +81 -77
- package/dist/shared/components/layout-editor/testing/TestingPanels.js +65 -60
- package/dist/shared/components/layout-editor/testing/testing-model.js +198 -185
- package/dist/shared/components/layout-editor/toolbar-kit.js +11 -11
- package/dist/shared/components/layout-editor/usage/AbTestSection.js +355 -0
- package/dist/shared/components/layout-editor/usage/UsagePanel.js +144 -70
- package/dist/shared/components/layout-editor/usage/ab-api.js +86 -0
- package/dist/shared/components/layout-editor/usage/suggest-collapse.js +32 -0
- package/dist/shared/components/layout-editor/useLayoutDraft.js +25 -24
- package/dist/shared/components/notifications/NotificationAnalyticsView.js +148 -77
- package/dist/shared/components/panels/ErpFailureBanner.js +18 -17
- package/dist/shared/components/panels/ExternalRequestsChip.js +63 -62
- package/dist/shared/components/pipeline/PipelineEditorView.js +106 -104
- package/dist/shared/components/profile/AgentsPanel.js +479 -0
- package/dist/shared/components/queue/QueueWorklist.js +1026 -1040
- package/dist/shared/components/support/SupportAnalytics.js +171 -0
- package/dist/shared/components/support/SupportView.js +75 -73
- package/dist/shared/lib/background-runs.js +150 -0
- package/dist/shared/lib/delivery-ack.js +9 -0
- package/dist/shared/lib/entry-badge-style.js +13 -0
- package/dist/shared/lib/entry-config.js +71 -0
- package/dist/shared/lib/form-sections.js +64 -0
- package/dist/shared/lib/form-structure.js +99 -0
- package/dist/shared/lib/form-usage-beacon.js +101 -52
- package/dist/shared/lib/jobs-tray.js +25 -23
- package/dist/shared/lib/keyset-pager.js +37 -0
- package/dist/shared/lib/layout-ops.js +84 -82
- package/dist/shared/lib/layout-resolve.js +113 -0
- package/dist/shared/lib/placement-behaviour.js +144 -0
- package/dist/shared/lib/prefetch.js +149 -0
- package/dist/shared/lib/presence-hooks.js +199 -0
- package/dist/shared/lib/record-outbox.js +82 -81
- package/dist/shared/lib/replay-socket.js +93 -0
- package/dist/shared/lib/request-gate.js +51 -50
- package/dist/shared/lib/room-gaps.js +96 -0
- package/dist/shared/lib/search-log.js +27 -0
- package/dist/shared/lib/socket-realtime.js +101 -80
- package/dist/shared/lib/worker-socket.js +200 -0
- package/package.json +1 -1
package/dist/layout-editor.d.ts
CHANGED
|
@@ -243,6 +243,10 @@ declare type LayoutPatch = Partial<{
|
|
|
243
243
|
hide_empty: boolean;
|
|
244
244
|
/** Required change note (#2654): null = off, 'note' = a reason, 'note_ticket' = reason + ticket. */
|
|
245
245
|
change_note: 'note' | 'note_ticket' | null;
|
|
246
|
+
/** How people enter data on the form (#2702 #2707 #2708 #2710 #2728): presets, keyboard, tab order, mode, badge. */
|
|
247
|
+
entry_config: Record<string, unknown> | null;
|
|
248
|
+
/** A section as an email body (#2725): the group key whose fields notification emails show. */
|
|
249
|
+
email_summary_group: string | null;
|
|
246
250
|
}>;
|
|
247
251
|
|
|
248
252
|
/**
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { AlertCircle as g, Timer as h, Loader2 as b } from "lucide-react";
|
|
3
|
+
import { useState as v, useEffect as k } from "react";
|
|
4
|
+
import { useBackgroundRun as w, clock as o, runProgress as y } from "../lib/background-runs.js";
|
|
5
|
+
import { cn as u } from "../lib/utils.js";
|
|
6
|
+
function _({
|
|
7
|
+
className: s,
|
|
8
|
+
...f
|
|
9
|
+
}) {
|
|
10
|
+
var p, m;
|
|
11
|
+
const e = w(f), d = (p = e.run) != null && p.started_at ? Date.parse(e.run.started_at) : null, [x, c] = v(() => Date.now());
|
|
12
|
+
if (k(() => {
|
|
13
|
+
if (e.phase !== "running") return;
|
|
14
|
+
c(Date.now());
|
|
15
|
+
const r = setInterval(() => c(Date.now()), 1e3);
|
|
16
|
+
return () => clearInterval(r);
|
|
17
|
+
}, [e.phase]), e.phase === "idle" || e.phase === "done") return null;
|
|
18
|
+
if (e.phase === "error")
|
|
19
|
+
return /* @__PURE__ */ a(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
"data-background-run": "error",
|
|
23
|
+
role: "alert",
|
|
24
|
+
className: u("flex flex-wrap items-center gap-x-2 gap-y-1 text-[12px]", s),
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ t(g, { className: "h-3.5 w-3.5 shrink-0 text-rose-500" }),
|
|
27
|
+
/* @__PURE__ */ t("span", { className: "min-w-0 text-rose-700 dark:text-rose-300", children: e.error ?? "The background run failed." }),
|
|
28
|
+
/* @__PURE__ */ t(
|
|
29
|
+
"button",
|
|
30
|
+
{
|
|
31
|
+
type: "button",
|
|
32
|
+
onClick: e.start,
|
|
33
|
+
className: "rounded text-[12px] font-medium text-slate-600 underline-offset-2 hover:text-slate-900 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan dark:text-slate-300 dark:hover:text-white",
|
|
34
|
+
children: "Try again"
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
if (e.phase === "running") {
|
|
41
|
+
const r = d ? Math.max(0, x - d) : 0, i = ((m = e.run) == null ? void 0 : m.expected_ms) ?? null, n = y(r, i);
|
|
42
|
+
return /* @__PURE__ */ a(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
"data-background-run": "running",
|
|
46
|
+
"aria-live": "polite",
|
|
47
|
+
className: u("flex w-full min-w-0 flex-col gap-1.5", s),
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ t(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
role: "progressbar",
|
|
53
|
+
"aria-label": "Background run",
|
|
54
|
+
"aria-valuemin": 0,
|
|
55
|
+
"aria-valuemax": 100,
|
|
56
|
+
"aria-valuenow": n == null ? void 0 : Math.round(n * 100),
|
|
57
|
+
className: "relative h-1 w-full overflow-hidden rounded-full bg-slate-100 dark:bg-slate-800",
|
|
58
|
+
children: n == null ? /* @__PURE__ */ t("div", { className: "nvr-bgrun-sweep absolute inset-y-0 left-0 w-1/3 rounded-full bg-nvr-cyan/70" }) : /* @__PURE__ */ t(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
className: "h-full w-full origin-left rounded-full bg-nvr-cyan transition-transform duration-1000 ease-linear motion-reduce:transition-none",
|
|
62
|
+
style: { transform: `scaleX(${n})` }
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ a("p", { className: "text-[12px] text-slate-600 dark:text-slate-300", children: [
|
|
68
|
+
"Running in the background",
|
|
69
|
+
/* @__PURE__ */ t("span", { className: "text-slate-400 dark:text-slate-500", children: " · " }),
|
|
70
|
+
/* @__PURE__ */ a("span", { className: "tabular-nums", children: [
|
|
71
|
+
o(r),
|
|
72
|
+
i ? ` of about ${o(i)}` : ""
|
|
73
|
+
] })
|
|
74
|
+
] }),
|
|
75
|
+
/* @__PURE__ */ t("p", { className: "text-[11.5px] text-slate-500 dark:text-slate-400", children: "You can leave this page. Your jobs tray says when it is ready." }),
|
|
76
|
+
/* @__PURE__ */ t("style", { children: N })
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
const l = e.typicalMs;
|
|
82
|
+
return /* @__PURE__ */ a(
|
|
83
|
+
"div",
|
|
84
|
+
{
|
|
85
|
+
"data-background-run": "offer",
|
|
86
|
+
className: u("flex flex-wrap items-center gap-x-3 gap-y-1.5", s),
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ a("span", { className: "inline-flex min-w-0 items-center gap-1.5 text-[12px] text-slate-600 dark:text-slate-300", children: [
|
|
89
|
+
/* @__PURE__ */ t(h, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
|
|
90
|
+
l && l >= 1e3 ? `This usually takes about ${o(l)}.` : "This is taking a while."
|
|
91
|
+
] }),
|
|
92
|
+
/* @__PURE__ */ a(
|
|
93
|
+
"button",
|
|
94
|
+
{
|
|
95
|
+
type: "button",
|
|
96
|
+
onClick: e.start,
|
|
97
|
+
disabled: e.phase === "starting",
|
|
98
|
+
"data-background-run-start": !0,
|
|
99
|
+
className: "inline-flex h-7 items-center gap-1.5 rounded-md border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-700 transition-colors duration-150 hover:bg-slate-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan disabled:pointer-events-none disabled:opacity-60 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800",
|
|
100
|
+
children: [
|
|
101
|
+
e.phase === "starting" && /* @__PURE__ */ t(b, { className: "h-3 w-3 animate-spin" }),
|
|
102
|
+
"Run in background"
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
const N = `
|
|
111
|
+
@keyframes nvr-bgrun-sweep { from { transform: translateX(-100%) } to { transform: translateX(300%) } }
|
|
112
|
+
.nvr-bgrun-sweep { animation: nvr-bgrun-sweep 1.6s cubic-bezier(0.25, 1, 0.5, 1) infinite }
|
|
113
|
+
@media (prefers-reduced-motion: reduce) { .nvr-bgrun-sweep { animation: none; width: 100%; opacity: .5 } }
|
|
114
|
+
`;
|
|
115
|
+
export {
|
|
116
|
+
_ as BackgroundRunOffer
|
|
117
|
+
};
|