@nivaro/react 0.3.9 → 0.3.11
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/fields/FileField.js +20 -19
- package/dist/full.css +1 -1
- package/dist/hooks/useNivaroForm.js +129 -126
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +103 -4
- package/dist/index.js +512 -501
- package/dist/shared/components/CollectionBrowserView.js +1632 -1564
- package/dist/shared/components/ConformanceView.js +36 -35
- package/dist/shared/components/ForceReloadBanner.js +58 -34
- package/dist/shared/components/ItemEditForm.js +4386 -4142
- package/dist/shared/components/JsonMapEditor.js +18 -17
- package/dist/shared/components/MatrixEditor.js +8 -7
- package/dist/shared/components/MyWorkView.js +32 -31
- package/dist/shared/components/PageRenderer.js +527 -479
- package/dist/shared/components/QueryStatStrip.js +74 -70
- package/dist/shared/components/RecordGridEditor.js +76 -75
- package/dist/shared/components/ReportView.js +818 -827
- package/dist/shared/components/SheetHeaderBody.js +16 -14
- package/dist/shared/components/ai/AiMemorySuggestions.js +15 -14
- package/dist/shared/components/ai/AskPanel.js +55 -54
- package/dist/shared/components/bulk/BulkActionButtons.js +30 -29
- package/dist/shared/components/bulk/PushBulkButtons.js +57 -56
- package/dist/shared/components/chat/SlashCommands.js +30 -29
- package/dist/shared/components/chat/chat-outbox.js +76 -75
- package/dist/shared/components/help-videos/recorder/useLeaveWarning.js +6 -5
- package/dist/shared/components/integrations/console/SignalCard.js +124 -123
- package/dist/shared/components/integrations/console/SnoozeMenu.js +24 -23
- package/dist/shared/components/item-edit/CatalogPickerField.js +1029 -933
- package/dist/shared/components/item-edit/CloneDialog.js +85 -78
- package/dist/shared/components/item-edit/FieldRenderer.js +161 -156
- package/dist/shared/components/item-edit/FieldRow.js +20 -19
- package/dist/shared/components/item-edit/FilePickerField.js +52 -40
- package/dist/shared/components/item-edit/GroupSection.js +221 -221
- package/dist/shared/components/item-edit/InlineGridField.js +41 -41
- package/dist/shared/components/item-edit/InlineTableField.js +2287 -2275
- package/dist/shared/components/item-edit/M2MCombobox.js +46 -44
- package/dist/shared/components/item-edit/MembershipSetField.js +24 -23
- package/dist/shared/components/item-edit/NestedRelationEditor.js +11 -11
- package/dist/shared/components/item-edit/QuickCreateButton.js +8 -7
- package/dist/shared/components/item-edit/QuickPicker.js +263 -216
- package/dist/shared/components/item-edit/RecordLiveSync.js +101 -100
- package/dist/shared/components/item-edit/RelationCombobox.js +285 -245
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +42 -32
- package/dist/shared/components/item-edit/RowHistorySheet.js +130 -134
- package/dist/shared/components/item-edit/SummaryPanel.js +305 -279
- package/dist/shared/components/item-edit/helpers.js +133 -134
- package/dist/shared/components/item-edit/line-qty.js +57 -0
- package/dist/shared/components/item-edit/option-disambiguate.js +53 -0
- package/dist/shared/components/item-edit/staged-links.js +86 -0
- package/dist/shared/components/layout-editor/LayoutEditor.js +275 -274
- package/dist/shared/components/layout-editor/editors/cascade-rule-row.js +18 -17
- package/dist/shared/components/layout-editor/inspector/HelpTab.js +37 -36
- package/dist/shared/components/layout-editor/matrix/FieldStateMatrix.js +50 -49
- package/dist/shared/components/panels/AddendumLinesDiff.js +87 -90
- package/dist/shared/components/panels/CommentPanel.js +350 -315
- package/dist/shared/components/panels/ItemLockBanner.js +297 -230
- package/dist/shared/components/panels/PipelinePanel.js +719 -701
- package/dist/shared/components/profile/AiMemoryCard.js +15 -14
- package/dist/shared/components/profile/PersonAdminTools.js +70 -67
- package/dist/shared/components/queue/QueueItemSheet.js +36 -35
- package/dist/shared/components/queue/QueueQuickFilters.js +43 -41
- package/dist/shared/components/queue/QueueWorklist.js +1026 -957
- package/dist/shared/components/widgets/ReviewListWidget.js +99 -93
- package/dist/shared/lib/client-version.js +63 -0
- package/dist/shared/lib/force-reload.js +36 -0
- package/dist/shared/lib/load-error.js +11 -10
- package/dist/shared/lib/obligation-banner.js +14 -13
- package/dist/shared/lib/obligation-reason-text.js +13 -0
- package/dist/shared/lib/presence-live.js +54 -35
- package/dist/shared/lib/query-filter-seed.js +34 -11
- package/dist/shared/lib/record-outbox.js +76 -75
- package/dist/shared/lib/safe-error.js +39 -0
- package/dist/shared/lib/sanitize-html.js +24 -15
- package/dist/shared/lib/server-clock.js +11 -7
- package/dist/shared/lib/sheet-def.js +38 -22
- package/dist/shared/lib/unique-options.js +10 -0
- package/dist/shared/lib/unsaved-work.js +62 -0
- package/dist/shared/lib/utils.js +57 -43
- package/dist/shared/lib/validation-rules.js +58 -34
- package/package.json +1 -1
|
@@ -1,42 +1,43 @@
|
|
|
1
1
|
import { jsxs as o, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { BellOff as D, Loader2 as g, EyeOff as S } from "lucide-react";
|
|
3
|
-
import { useState as
|
|
3
|
+
import { useState as l } from "react";
|
|
4
|
+
import { userErrorMessage as L } from "../../../lib/safe-error.js";
|
|
4
5
|
import { cn as C } from "../../../lib/utils.js";
|
|
5
|
-
import { Popover as
|
|
6
|
+
import { Popover as j, PopoverTrigger as T, PopoverContent as B } from "../../ui/popover.js";
|
|
6
7
|
import { useSnooze as P } from "./api.js";
|
|
7
|
-
const
|
|
8
|
+
const H = [
|
|
8
9
|
{ key: "day", label: "1 day" },
|
|
9
10
|
{ key: "week", label: "1 week" },
|
|
10
11
|
{ key: "change", label: "Until it changes" }
|
|
11
12
|
];
|
|
12
|
-
function
|
|
13
|
+
function W({ signal: r, rowKey: c }) {
|
|
13
14
|
const { add: n } = P();
|
|
14
15
|
return /* @__PURE__ */ t(
|
|
15
16
|
"button",
|
|
16
17
|
{
|
|
17
18
|
type: "button",
|
|
18
|
-
"data-ic-dismiss": `${r}:${
|
|
19
|
+
"data-ic-dismiss": `${r}:${c}`,
|
|
19
20
|
"aria-label": "Dismiss this occurrence",
|
|
20
21
|
"data-tip": "Hide until it happens again",
|
|
21
22
|
disabled: n.isPending,
|
|
22
|
-
onClick: () => n.mutate({ signal: r, row_key:
|
|
23
|
+
onClick: () => n.mutate({ signal: r, row_key: c, until_occurrence: !0 }),
|
|
23
24
|
className: "inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-60",
|
|
24
25
|
children: n.isPending ? /* @__PURE__ */ t(g, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(S, { className: "h-3.5 w-3.5" })
|
|
25
26
|
}
|
|
26
27
|
);
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
+
function J({
|
|
29
30
|
signal: r,
|
|
30
|
-
signalLabel:
|
|
31
|
+
signalLabel: c,
|
|
31
32
|
rowKey: n,
|
|
32
33
|
group: i,
|
|
33
34
|
defaultScope: $,
|
|
34
35
|
compact: h
|
|
35
36
|
}) {
|
|
36
|
-
const { add: s } = P(), [b,
|
|
37
|
+
const { add: s } = P(), [b, u] = l(!1), x = $ ?? (n ? "row" : i ? "group" : "signal"), [d, y] = l(x), [v, _] = l("day"), [k, N] = l(""), [w, p] = l(null), E = [
|
|
37
38
|
...n ? [{ key: "row", label: "This problem" }] : [],
|
|
38
39
|
...i ? [{ key: "group", label: `Everything in ${i.label}` }] : [],
|
|
39
|
-
{ key: "signal", label: `All of “${
|
|
40
|
+
{ key: "signal", label: `All of “${c}”` }
|
|
40
41
|
], z = (e) => e !== "change" || d === "row", a = z(v) ? v : "day", O = () => {
|
|
41
42
|
p(null);
|
|
42
43
|
const e = a === "change" ? null : new Date(Date.now() + (a === "day" ? 1 : 7) * 864e5).toISOString();
|
|
@@ -51,24 +52,24 @@ function U({
|
|
|
51
52
|
},
|
|
52
53
|
{
|
|
53
54
|
onSuccess: () => {
|
|
54
|
-
|
|
55
|
+
u(!1), N("");
|
|
55
56
|
},
|
|
56
|
-
onError: (
|
|
57
|
-
const f =
|
|
58
|
-
p((f == null ? void 0 : f.error) ?? (
|
|
57
|
+
onError: (m) => {
|
|
58
|
+
const f = m == null ? void 0 : m.response;
|
|
59
|
+
p((f == null ? void 0 : f.error) ?? L(m, "Could not snooze"));
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
);
|
|
62
63
|
};
|
|
63
64
|
return /* @__PURE__ */ o(
|
|
64
|
-
|
|
65
|
+
j,
|
|
65
66
|
{
|
|
66
67
|
open: b,
|
|
67
68
|
onOpenChange: (e) => {
|
|
68
|
-
|
|
69
|
+
u(e), e && (y(x), p(null));
|
|
69
70
|
},
|
|
70
71
|
children: [
|
|
71
|
-
/* @__PURE__ */ t(
|
|
72
|
+
/* @__PURE__ */ t(T, { asChild: !0, children: /* @__PURE__ */ o(
|
|
72
73
|
"button",
|
|
73
74
|
{
|
|
74
75
|
type: "button",
|
|
@@ -84,7 +85,7 @@ function U({
|
|
|
84
85
|
]
|
|
85
86
|
}
|
|
86
87
|
) }),
|
|
87
|
-
/* @__PURE__ */ o(
|
|
88
|
+
/* @__PURE__ */ o(B, { align: "end", className: "w-72 p-0", "data-ic-snooze-menu": !0, children: [
|
|
88
89
|
n && /* @__PURE__ */ t("div", { className: "border-b border-border p-1", children: /* @__PURE__ */ o(
|
|
89
90
|
"button",
|
|
90
91
|
{
|
|
@@ -94,7 +95,7 @@ function U({
|
|
|
94
95
|
onClick: () => {
|
|
95
96
|
s.mutate(
|
|
96
97
|
{ signal: r, row_key: n, until_occurrence: !0 },
|
|
97
|
-
{ onSuccess: () =>
|
|
98
|
+
{ onSuccess: () => u(!1) }
|
|
98
99
|
);
|
|
99
100
|
},
|
|
100
101
|
className: "flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-[12.5px] font-medium text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-60",
|
|
@@ -131,7 +132,7 @@ function U({
|
|
|
131
132
|
] }),
|
|
132
133
|
/* @__PURE__ */ o("fieldset", { children: [
|
|
133
134
|
/* @__PURE__ */ t("legend", { className: "mb-1.5 text-[12px] font-medium text-foreground", children: "For how long" }),
|
|
134
|
-
/* @__PURE__ */ t("div", { className: "flex flex-wrap gap-1", children:
|
|
135
|
+
/* @__PURE__ */ t("div", { className: "flex flex-wrap gap-1", children: H.filter((e) => z(e.key)).map((e) => /* @__PURE__ */ t(
|
|
135
136
|
"button",
|
|
136
137
|
{
|
|
137
138
|
type: "button",
|
|
@@ -166,7 +167,7 @@ function U({
|
|
|
166
167
|
"button",
|
|
167
168
|
{
|
|
168
169
|
type: "button",
|
|
169
|
-
onClick: () =>
|
|
170
|
+
onClick: () => u(!1),
|
|
170
171
|
className: "h-7 rounded-md px-2.5 text-[12px] text-muted-foreground hover:text-foreground",
|
|
171
172
|
children: "Cancel"
|
|
172
173
|
}
|
|
@@ -192,6 +193,6 @@ function U({
|
|
|
192
193
|
);
|
|
193
194
|
}
|
|
194
195
|
export {
|
|
195
|
-
|
|
196
|
-
|
|
196
|
+
W as DismissButton,
|
|
197
|
+
J as SnoozeMenu
|
|
197
198
|
};
|