@nivaro/react 0.3.8 → 0.3.10
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/replayUploadQueue.js +107 -93
- package/dist/hooks/useNivaroForm.js +129 -126
- package/dist/hooks/useSessionRecorder.js +103 -101
- package/dist/index.d.ts +115 -2
- package/dist/index.js +466 -447
- package/dist/shared/components/CollectionBrowserView.js +1058 -1059
- package/dist/shared/components/ConformanceView.js +36 -35
- package/dist/shared/components/DataTable.js +230 -223
- package/dist/shared/components/ForceReloadBanner.js +58 -34
- package/dist/shared/components/ItemEditForm.js +3687 -3580
- 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 +146 -145
- package/dist/shared/components/QueryTable.js +49 -49
- package/dist/shared/components/RecordGridEditor.js +76 -75
- 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/ChatPanel.js +288 -287
- 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/CloneDialog.js +85 -78
- package/dist/shared/components/item-edit/InlineTableField.js +301 -300
- package/dist/shared/components/item-edit/MembershipSetField.js +24 -23
- package/dist/shared/components/item-edit/QuickCreateButton.js +8 -7
- package/dist/shared/components/item-edit/RecordLiveSync.js +101 -100
- 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/CommentPanel.js +237 -236
- package/dist/shared/components/profile/AiMemoryCard.js +15 -14
- package/dist/shared/components/profile/PersonAdminTools.js +70 -67
- package/dist/shared/components/profile/usePersonPresence.js +42 -37
- package/dist/shared/components/queue/QueueItemSheet.js +36 -35
- package/dist/shared/components/queue/QueueWorklist.js +597 -598
- 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/presence-live.js +73 -0
- package/dist/shared/lib/presence-state.js +39 -31
- package/dist/shared/lib/record-outbox.js +76 -75
- package/dist/shared/lib/request-gate.js +120 -102
- package/dist/shared/lib/rum.js +45 -36
- package/dist/shared/lib/safe-error.js +39 -0
- package/dist/shared/lib/server-clock.js +11 -7
- package/dist/shared/lib/signed-out.js +114 -0
- package/dist/shared/lib/socket-realtime.js +19 -17
- package/dist/shared/lib/unsaved-work.js +62 -0
- package/dist/shared/lib/use-online-users.js +11 -10
- package/dist/shared/lib/worker-socket.js +89 -79
- package/package.json +1 -1
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { jsxs as C, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as a } from "react";
|
|
3
3
|
import { useOptionalNivaroClient as F } from "../../shared/context.js";
|
|
4
|
-
|
|
4
|
+
import { userErrorMessage as I } from "../../shared/lib/safe-error.js";
|
|
5
|
+
function N({
|
|
5
6
|
field: s,
|
|
6
7
|
value: l,
|
|
7
8
|
onChange: g,
|
|
8
9
|
error: d,
|
|
9
|
-
disabled:
|
|
10
|
-
readOnly:
|
|
10
|
+
disabled: m,
|
|
11
|
+
readOnly: h,
|
|
11
12
|
inputId: y,
|
|
12
13
|
errorId: b
|
|
13
14
|
}) {
|
|
14
|
-
const
|
|
15
|
+
const e = F(), [p, c] = a(!1), [t, u] = a(null), [U, j] = a(0), x = y ?? s.field, n = l != null && typeof l == "object" ? String(l.id ?? "") : l == null ? "" : String(l);
|
|
15
16
|
return /* @__PURE__ */ C("div", { children: [
|
|
16
17
|
/* @__PURE__ */ r(
|
|
17
18
|
"input",
|
|
@@ -19,32 +20,32 @@ function w({
|
|
|
19
20
|
type: "file",
|
|
20
21
|
id: x,
|
|
21
22
|
name: s.field,
|
|
22
|
-
disabled:
|
|
23
|
-
"aria-invalid": d != null && d.length > 0 ||
|
|
23
|
+
disabled: m || h || p || !e,
|
|
24
|
+
"aria-invalid": d != null && d.length > 0 || t != null,
|
|
24
25
|
"aria-describedby": b,
|
|
25
26
|
onChange: async (E) => {
|
|
26
27
|
var f;
|
|
27
|
-
const
|
|
28
|
-
if (!(!
|
|
29
|
-
|
|
28
|
+
const i = (f = E.target.files) == null ? void 0 : f[0];
|
|
29
|
+
if (!(!i || !e)) {
|
|
30
|
+
c(!0), u(null);
|
|
30
31
|
try {
|
|
31
|
-
const
|
|
32
|
-
g(
|
|
33
|
-
} catch (
|
|
34
|
-
u(
|
|
32
|
+
const o = await e.upload(i, { title: i.name });
|
|
33
|
+
g(o.id);
|
|
34
|
+
} catch (o) {
|
|
35
|
+
u(I(o, "Upload failed")), j((S) => S + 1);
|
|
35
36
|
} finally {
|
|
36
|
-
|
|
37
|
+
c(!1);
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
},
|
|
41
42
|
U
|
|
42
43
|
),
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
p ? /* @__PURE__ */ r("span", { "aria-live": "polite", children: "Uploading…" }) : null,
|
|
45
|
+
n && e ? /* @__PURE__ */ r("a", { href: e.fileUrl(n), target: "_blank", rel: "noreferrer", children: n }) : n ? /* @__PURE__ */ r("span", { children: n }) : null,
|
|
46
|
+
t ? /* @__PURE__ */ r("span", { role: "alert", children: t }) : null
|
|
46
47
|
] });
|
|
47
48
|
}
|
|
48
49
|
export {
|
|
49
|
-
|
|
50
|
+
N as FileField
|
|
50
51
|
};
|