@ixo/editor 6.21.0 → 6.22.0
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.
|
@@ -30887,8 +30887,8 @@ var EvaluateBidConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
30887
30887
|
};
|
|
30888
30888
|
|
|
30889
30889
|
// src/mantine/blocks/action/actionTypes/evaluateBid/EvaluateBidFlowDetail.tsx
|
|
30890
|
-
import
|
|
30891
|
-
import { ActionIcon as ActionIcon44, Badge as Badge49, Box as
|
|
30890
|
+
import React313, { useCallback as useCallback105, useEffect as useEffect107, useMemo as useMemo112, useRef as useRef38, useState as useState162 } from "react";
|
|
30891
|
+
import { ActionIcon as ActionIcon44, Badge as Badge49, Box as Box57, Button as Button62, Divider as Divider21, Group as Group111, Loader as Loader55, Stack as Stack205, Text as Text193, UnstyledButton as UnstyledButton4 } from "@mantine/core";
|
|
30892
30892
|
import { IconArrowLeft as IconArrowLeft8, IconCheck as IconCheck21, IconFilter } from "@tabler/icons-react";
|
|
30893
30893
|
|
|
30894
30894
|
// src/mantine/components/CollapsibleSection.tsx
|
|
@@ -30995,13 +30995,110 @@ function buildClaimRows(claims, contentsByClaimId) {
|
|
|
30995
30995
|
}
|
|
30996
30996
|
|
|
30997
30997
|
// src/mantine/blocks/action/actionTypes/_shared/ReadableKeyValues.tsx
|
|
30998
|
+
import React312, { useState as useState161 } from "react";
|
|
30999
|
+
import { Group as Group110, Stack as Stack204, Text as Text192, UnstyledButton as UnstyledButton3 } from "@mantine/core";
|
|
31000
|
+
import { IconPaperclip } from "@tabler/icons-react";
|
|
31001
|
+
|
|
31002
|
+
// src/mantine/components/MediaPreviewModal.tsx
|
|
30998
31003
|
import React311 from "react";
|
|
30999
|
-
import { Group as Group109, Stack as Stack203, Text as Text191 } from "@mantine/core";
|
|
31004
|
+
import { Anchor, Box as Box56, Center as Center13, Group as Group109, Modal as Modal3, Stack as Stack203, Text as Text191 } from "@mantine/core";
|
|
31005
|
+
import { useMediaQuery as useMediaQuery2 } from "@mantine/hooks";
|
|
31006
|
+
import { IconDownload as IconDownload5 } from "@tabler/icons-react";
|
|
31007
|
+
function detectKind(type, name) {
|
|
31008
|
+
const t = (type || "").toLowerCase();
|
|
31009
|
+
const ext = (name || "").toLowerCase().split(".").pop() || "";
|
|
31010
|
+
if (t.startsWith("image/") || ["png", "jpg", "jpeg", "gif", "webp", "svg", "bmp"].includes(ext)) return "image";
|
|
31011
|
+
if (t.startsWith("video/") || ["mp4", "webm", "mov", "mkv"].includes(ext)) return "video";
|
|
31012
|
+
if (t.startsWith("audio/") || ["mp3", "wav", "ogg", "m4a", "flac"].includes(ext)) return "audio";
|
|
31013
|
+
if (t === "application/pdf" || ext === "pdf") return "pdf";
|
|
31014
|
+
return "other";
|
|
31015
|
+
}
|
|
31016
|
+
var MediaPreviewModal = ({ file, onClose }) => {
|
|
31017
|
+
const isMobile = useMediaQuery2("(max-width: 992px)");
|
|
31018
|
+
const opened = !!file;
|
|
31019
|
+
const kind = file ? detectKind(file.type, file.name) : "other";
|
|
31020
|
+
const wide = kind === "pdf" || kind === "image" || kind === "video";
|
|
31021
|
+
return /* @__PURE__ */ React311.createElement(
|
|
31022
|
+
Modal3,
|
|
31023
|
+
{
|
|
31024
|
+
opened,
|
|
31025
|
+
onClose,
|
|
31026
|
+
zIndex: 1e4,
|
|
31027
|
+
portalProps: typeof document !== "undefined" ? { target: document.body } : void 0,
|
|
31028
|
+
title: /* @__PURE__ */ React311.createElement(Group109, { gap: "sm", wrap: "nowrap", style: { width: "100%" } }, /* @__PURE__ */ React311.createElement(Text191, { fw: 500, size: "sm", truncate: true, style: { flex: 1, minWidth: 0 } }, file?.name || "Preview"), file && /* @__PURE__ */ React311.createElement(Anchor, { href: file.content, target: "_blank", rel: "noopener noreferrer", download: file.name, size: "xs", c: "dimmed", style: { flexShrink: 0 } }, /* @__PURE__ */ React311.createElement(Box56, { style: { display: "inline-flex", alignItems: "center", gap: 4 } }, icon(IconDownload5, 14), "Download"))),
|
|
31029
|
+
size: wide ? "95vw" : "xl",
|
|
31030
|
+
centered: true,
|
|
31031
|
+
styles: wide ? {
|
|
31032
|
+
content: {
|
|
31033
|
+
height: "95vh",
|
|
31034
|
+
maxWidth: isMobile ? "100%" : 1400,
|
|
31035
|
+
display: "flex",
|
|
31036
|
+
flexDirection: "column",
|
|
31037
|
+
overflow: "hidden"
|
|
31038
|
+
},
|
|
31039
|
+
body: {
|
|
31040
|
+
flex: 1,
|
|
31041
|
+
minHeight: 0,
|
|
31042
|
+
display: "flex",
|
|
31043
|
+
flexDirection: "column",
|
|
31044
|
+
overflow: "hidden"
|
|
31045
|
+
}
|
|
31046
|
+
} : void 0
|
|
31047
|
+
},
|
|
31048
|
+
file && /* @__PURE__ */ React311.createElement(Stack203, { gap: "sm", style: wide ? { flex: 1, minHeight: 0 } : void 0 }, kind === "image" && /* @__PURE__ */ React311.createElement(Center13, { style: { flex: 1, minHeight: 0, overflow: "hidden" } }, /* @__PURE__ */ React311.createElement(
|
|
31049
|
+
"img",
|
|
31050
|
+
{
|
|
31051
|
+
src: file.content,
|
|
31052
|
+
alt: file.name,
|
|
31053
|
+
style: { display: "block", maxWidth: "100%", maxHeight: "100%", width: "auto", height: "auto", objectFit: "contain", borderRadius: 8 }
|
|
31054
|
+
}
|
|
31055
|
+
)), kind === "video" && // eslint-disable-next-line jsx-a11y/media-has-caption
|
|
31056
|
+
/* @__PURE__ */ React311.createElement("video", { src: file.content, controls: true, style: { width: "100%", flex: 1, minHeight: 0, borderRadius: 8, background: "var(--mantine-color-neutralColor-3)" } }), kind === "audio" && /* @__PURE__ */ React311.createElement("audio", { src: file.content, controls: true, style: { width: "100%" } }), kind === "pdf" && /* @__PURE__ */ React311.createElement(Box56, { style: { flex: 1, minHeight: 0, borderRadius: 8, overflow: "hidden" } }, /* @__PURE__ */ React311.createElement("iframe", { src: file.content, title: file.name, style: { width: "100%", height: "100%", border: "none" } })), kind === "other" && /* @__PURE__ */ React311.createElement(Center13, { p: "xl" }, /* @__PURE__ */ React311.createElement(Text191, { size: "sm", c: "dimmed" }, "This file type can't be previewed inline. Use Download above.")))
|
|
31057
|
+
);
|
|
31058
|
+
};
|
|
31059
|
+
|
|
31060
|
+
// src/mantine/blocks/action/actionTypes/_shared/ReadableKeyValues.tsx
|
|
31000
31061
|
function humanizeKey(key) {
|
|
31001
31062
|
const bare = key.includes(":") ? key.split(":").pop() || key : key;
|
|
31002
31063
|
const spaced = bare.replace(/[_-]+/g, " ").replace(/([a-z0-9])([A-Z])/g, "$1 $2").trim();
|
|
31003
31064
|
return spaced.charAt(0).toUpperCase() + spaced.slice(1);
|
|
31004
31065
|
}
|
|
31066
|
+
function nameFromContent(content) {
|
|
31067
|
+
if (content.startsWith("data:")) return "file";
|
|
31068
|
+
return content.split(/[?#]/)[0].split("/").pop() || "file";
|
|
31069
|
+
}
|
|
31070
|
+
function detectFile(value) {
|
|
31071
|
+
if (typeof value === "string") {
|
|
31072
|
+
const trimmed = value.trim();
|
|
31073
|
+
if (trimmed.startsWith("{")) {
|
|
31074
|
+
try {
|
|
31075
|
+
return detectFile(JSON.parse(trimmed));
|
|
31076
|
+
} catch {
|
|
31077
|
+
return null;
|
|
31078
|
+
}
|
|
31079
|
+
}
|
|
31080
|
+
if (trimmed.startsWith("data:")) return { name: "file", type: trimmed.slice(5).split(/[;,]/)[0] || "", content: trimmed };
|
|
31081
|
+
if (/^https?:\/\//i.test(trimmed) && /\.(png|jpe?g|gif|webp|svg|bmp|mp4|webm|mov|mp3|wav|ogg|pdf)$/.test(trimmed.split(/[?#]/)[0].toLowerCase())) {
|
|
31082
|
+
return { name: nameFromContent(trimmed), type: "", content: trimmed };
|
|
31083
|
+
}
|
|
31084
|
+
return null;
|
|
31085
|
+
}
|
|
31086
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
31087
|
+
const obj = value;
|
|
31088
|
+
if (typeof obj.content === "string" && (obj.content.startsWith("data:") || /^https?:\/\//i.test(obj.content))) {
|
|
31089
|
+
const type = typeof obj.type === "string" ? obj.type : obj.content.startsWith("data:") ? obj.content.slice(5).split(/[;,]/)[0] || "" : "";
|
|
31090
|
+
const name = typeof obj.name === "string" && obj.name ? obj.name : nameFromContent(obj.content);
|
|
31091
|
+
return { name, type, content: obj.content };
|
|
31092
|
+
}
|
|
31093
|
+
}
|
|
31094
|
+
return null;
|
|
31095
|
+
}
|
|
31096
|
+
function isImageFile(file) {
|
|
31097
|
+
if (file.type.toLowerCase().startsWith("image/")) return true;
|
|
31098
|
+
if (file.content.startsWith("data:image/")) return true;
|
|
31099
|
+
const ext = file.name.toLowerCase().split(".").pop() || "";
|
|
31100
|
+
return ["png", "jpg", "jpeg", "gif", "webp", "svg", "bmp"].includes(ext);
|
|
31101
|
+
}
|
|
31005
31102
|
function formatValue2(value) {
|
|
31006
31103
|
if (value === null || value === void 0 || value === "") return "\u2014";
|
|
31007
31104
|
if (Array.isArray(value)) return value.map((item) => formatValue2(item)).join(", ");
|
|
@@ -31015,7 +31112,37 @@ function formatValue2(value) {
|
|
|
31015
31112
|
if (typeof value === "boolean") return value ? "Yes" : "No";
|
|
31016
31113
|
return String(value);
|
|
31017
31114
|
}
|
|
31018
|
-
var
|
|
31115
|
+
var FilePreview = ({ file, onOpen }) => isImageFile(file) ? /* @__PURE__ */ React312.createElement(UnstyledButton3, { onClick: () => onOpen(file), "aria-label": `View ${file.name}`, style: { display: "block" } }, /* @__PURE__ */ React312.createElement(
|
|
31116
|
+
"img",
|
|
31117
|
+
{
|
|
31118
|
+
src: file.content,
|
|
31119
|
+
alt: file.name,
|
|
31120
|
+
style: {
|
|
31121
|
+
display: "block",
|
|
31122
|
+
height: 56,
|
|
31123
|
+
maxWidth: 112,
|
|
31124
|
+
objectFit: "cover",
|
|
31125
|
+
borderRadius: 6,
|
|
31126
|
+
border: "1px solid var(--mantine-color-neutralColor-5)",
|
|
31127
|
+
cursor: "zoom-in"
|
|
31128
|
+
}
|
|
31129
|
+
}
|
|
31130
|
+
)) : /* @__PURE__ */ React312.createElement(UnstyledButton3, { onClick: () => onOpen(file), "aria-label": `Preview ${file.name}`, style: { maxWidth: "100%" } }, /* @__PURE__ */ React312.createElement(Group110, { gap: 4, wrap: "nowrap" }, /* @__PURE__ */ React312.createElement(IconPaperclip, { size: 12, style: { flexShrink: 0, color: "var(--mantine-color-dimmed)" } }), /* @__PURE__ */ React312.createElement(Text192, { size: "xs", td: "underline", truncate: true }, file.name)));
|
|
31131
|
+
function renderValue(value, onOpen) {
|
|
31132
|
+
const file = detectFile(value);
|
|
31133
|
+
if (file) return /* @__PURE__ */ React312.createElement(FilePreview, { file, onOpen });
|
|
31134
|
+
if (Array.isArray(value) && value.some((item) => detectFile(item))) {
|
|
31135
|
+
return /* @__PURE__ */ React312.createElement(Group110, { gap: 6, justify: "flex-end" }, value.map((item, index) => {
|
|
31136
|
+
const itemFile = detectFile(item);
|
|
31137
|
+
return itemFile ? /* @__PURE__ */ React312.createElement(FilePreview, { key: index, file: itemFile, onOpen }) : /* @__PURE__ */ React312.createElement(Text192, { key: index, size: "xs", ta: "right", style: { wordBreak: "break-word" } }, formatValue2(item));
|
|
31138
|
+
}));
|
|
31139
|
+
}
|
|
31140
|
+
return /* @__PURE__ */ React312.createElement(Text192, { size: "xs", ta: "right", style: { wordBreak: "break-word", minWidth: 0 } }, formatValue2(value));
|
|
31141
|
+
}
|
|
31142
|
+
var ReadableKeyValues = ({ data }) => {
|
|
31143
|
+
const [activeFile, setActiveFile] = useState161(null);
|
|
31144
|
+
return /* @__PURE__ */ React312.createElement(React312.Fragment, null, /* @__PURE__ */ React312.createElement(Stack204, { gap: "xs" }, Object.entries(data).map(([key, value]) => /* @__PURE__ */ React312.createElement(Group110, { key, justify: "space-between", align: "flex-start", wrap: "nowrap", gap: "md" }, /* @__PURE__ */ React312.createElement(Text192, { size: "xs", c: "dimmed", style: { flexShrink: 0 } }, humanizeKey(key)), renderValue(value, setActiveFile)))), /* @__PURE__ */ React312.createElement(MediaPreviewModal, { file: activeFile, onClose: () => setActiveFile(null) }));
|
|
31145
|
+
};
|
|
31019
31146
|
|
|
31020
31147
|
// src/mantine/blocks/action/actionTypes/evaluateBid/EvaluateBidFlowDetail.tsx
|
|
31021
31148
|
function getRoleColor2(role) {
|
|
@@ -31084,7 +31211,7 @@ var EvaluateBidFlowDetail = ({
|
|
|
31084
31211
|
registerRuntimeInputs,
|
|
31085
31212
|
executeAction
|
|
31086
31213
|
}) => {
|
|
31087
|
-
const [actAs, setActAs] =
|
|
31214
|
+
const [actAs, setActAs] = useState162(emptyActAsGroupState());
|
|
31088
31215
|
const t = useTranslate();
|
|
31089
31216
|
const handlers = useBlocknoteHandlers();
|
|
31090
31217
|
const handlersRef = useRef38(handlers);
|
|
@@ -31096,17 +31223,17 @@ var EvaluateBidFlowDetail = ({
|
|
|
31096
31223
|
const resolveOpts = useMemo112(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
31097
31224
|
const deedDid = resolveReferences(parsed.deedDid, editorDocument, resolveOpts).trim();
|
|
31098
31225
|
const collectionId = resolveReferences(parsed.collectionId, editorDocument, resolveOpts).trim();
|
|
31099
|
-
const [bids, setBids] =
|
|
31100
|
-
const [selectedBidId, setSelectedBidId] =
|
|
31101
|
-
const [decision, setDecision] =
|
|
31102
|
-
const [loadingBids, setLoadingBids] =
|
|
31103
|
-
const [submitting, setSubmitting] =
|
|
31104
|
-
const [error, setError] =
|
|
31105
|
-
const [rejectReason, setRejectReason] =
|
|
31106
|
-
const [adminAddress, setAdminAddress] =
|
|
31107
|
-
const [activeFilter, setActiveFilter] =
|
|
31108
|
-
const [paymentRows, setPaymentRows] =
|
|
31109
|
-
const [profilesByDid, setProfilesByDid] =
|
|
31226
|
+
const [bids, setBids] = useState162([]);
|
|
31227
|
+
const [selectedBidId, setSelectedBidId] = useState162("");
|
|
31228
|
+
const [decision, setDecision] = useState162("");
|
|
31229
|
+
const [loadingBids, setLoadingBids] = useState162(false);
|
|
31230
|
+
const [submitting, setSubmitting] = useState162(false);
|
|
31231
|
+
const [error, setError] = useState162(null);
|
|
31232
|
+
const [rejectReason, setRejectReason] = useState162("");
|
|
31233
|
+
const [adminAddress, setAdminAddress] = useState162("");
|
|
31234
|
+
const [activeFilter, setActiveFilter] = useState162("pending");
|
|
31235
|
+
const [paymentRows, setPaymentRows] = useState162([createPaymentRow()]);
|
|
31236
|
+
const [profilesByDid, setProfilesByDid] = useState162({});
|
|
31110
31237
|
const selectedBid = useMemo112(() => bids.find((bid) => bid.id === selectedBidId) || null, [bids, selectedBidId]);
|
|
31111
31238
|
const filteredBids = useMemo112(() => {
|
|
31112
31239
|
if (activeFilter === "all") return bids;
|
|
@@ -31305,8 +31432,8 @@ var EvaluateBidFlowDetail = ({
|
|
|
31305
31432
|
bidData = typeof selectedBid.data === "string" ? JSON.parse(selectedBid.data) : selectedBid.data;
|
|
31306
31433
|
} catch {
|
|
31307
31434
|
}
|
|
31308
|
-
return /* @__PURE__ */
|
|
31309
|
-
|
|
31435
|
+
return /* @__PURE__ */ React313.createElement(Stack205, { gap: "md" }, /* @__PURE__ */ React313.createElement(Group111, { gap: "xs", align: "center" }, /* @__PURE__ */ React313.createElement(ActionIcon44, { variant: "subtle", color: "gray", size: "sm", onClick: () => setSelectedBidId("") }, /* @__PURE__ */ React313.createElement(IconArrowLeft8, { size: 16 })), /* @__PURE__ */ React313.createElement(Text193, { fw: 500, size: "sm", truncate: true, style: { flex: 1, minWidth: 0 } }, t("actionTypes.evaluateBid.flow.bidNumber", { id: selectedBid.id, defaultValue: `Bid #${selectedBid.id}` })), /* @__PURE__ */ React313.createElement(DownloadCsvButton, { onDownload: () => downloadBidsCsv([selectedBid], `bid-${selectedBid.id}.csv`), label: "Download bid CSV" })), /* @__PURE__ */ React313.createElement(Group111, { gap: 16, align: "center", style: { width: "100%" } }, /* @__PURE__ */ React313.createElement(
|
|
31436
|
+
Box57,
|
|
31310
31437
|
{
|
|
31311
31438
|
style: {
|
|
31312
31439
|
width: 40,
|
|
@@ -31326,7 +31453,7 @@ var EvaluateBidFlowDetail = ({
|
|
|
31326
31453
|
}
|
|
31327
31454
|
},
|
|
31328
31455
|
selectedBidProfile?.avatarUrl ? null : selectedAvatarLabel
|
|
31329
|
-
), /* @__PURE__ */
|
|
31456
|
+
), /* @__PURE__ */ React313.createElement(Stack205, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React313.createElement(Text193, { fw: 500, size: "md", truncate: true }, selectedDisplayName), /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed", truncate: true }, truncateAddress2(selectedBid.address))), /* @__PURE__ */ React313.createElement(Stack205, { gap: 0, align: "flex-end", style: { flexShrink: 0 } }, /* @__PURE__ */ React313.createElement(Text193, { fw: 500, size: "md", c: bidStatus.color === "green" ? "green" : bidStatus.color === "red" ? "red" : void 0 }, bidStatus.color === "green" && /* @__PURE__ */ React313.createElement(IconCheck21, { size: 14, style: { verticalAlign: "middle", marginRight: 4 } }), bidStatus.label), /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, getTimeAgo(selectedBid.created || "")))), /* @__PURE__ */ React313.createElement(CollapsibleSection, { title: t("actionTypes.evaluateBid.flow.section.details", { defaultValue: "Details" }) }, /* @__PURE__ */ React313.createElement(Stack205, { gap: "xs" }, /* @__PURE__ */ React313.createElement(Group111, { justify: "space-between" }, /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, "Bid ID"), /* @__PURE__ */ React313.createElement(Text193, { size: "xs", truncate: true }, selectedBid.id)), /* @__PURE__ */ React313.createElement(Group111, { justify: "space-between" }, /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, "Collection"), /* @__PURE__ */ React313.createElement(Text193, { size: "xs" }, selectedBid.collection || collectionId)), /* @__PURE__ */ React313.createElement(Group111, { justify: "space-between" }, /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateBid.flow.details.role", { defaultValue: "Role" })), /* @__PURE__ */ React313.createElement(Badge49, { size: "xs", variant: "light", color: getRoleColor2(selectedBid.role) }, getRoleLabel2(selectedBid.role, t))), /* @__PURE__ */ React313.createElement(Group111, { justify: "space-between" }, /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateBid.flow.details.address", { defaultValue: "Address" })), /* @__PURE__ */ React313.createElement(Text193, { size: "xs" }, selectedBid.address)))), /* @__PURE__ */ React313.createElement(CollapsibleSection, { title: t("actionTypes.evaluateBid.flow.section.inputs", { defaultValue: "Inputs" }) }, bidData && typeof bidData === "object" && Object.keys(bidData).length > 0 ? /* @__PURE__ */ React313.createElement(ReadableKeyValues, { data: bidData }) : /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateBid.flow.noInputData", { defaultValue: "No input data available." }))), /* @__PURE__ */ React313.createElement(
|
|
31330
31457
|
BaseSelect,
|
|
31331
31458
|
{
|
|
31332
31459
|
label: t("actionTypes.evaluateClaim.flow.decision.label", { defaultValue: "Decision" }),
|
|
@@ -31339,7 +31466,7 @@ var EvaluateBidFlowDetail = ({
|
|
|
31339
31466
|
],
|
|
31340
31467
|
disabled: isDisabled || submitting
|
|
31341
31468
|
}
|
|
31342
|
-
), decision && (decision === "reject" || decision === "approve" && bidIsEvaluator) && /* @__PURE__ */
|
|
31469
|
+
), decision && (decision === "reject" || decision === "approve" && bidIsEvaluator) && /* @__PURE__ */ React313.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.section.evaluation", { defaultValue: "Evaluation" }), defaultOpen: true }, /* @__PURE__ */ React313.createElement(Stack205, { gap: "md" }, decision === "reject" && /* @__PURE__ */ React313.createElement(Stack205, { gap: 4 }, /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateBid.flow.reason", { defaultValue: "Reason" }), " ", bidIsEvaluator && /* @__PURE__ */ React313.createElement(Text193, { span: true, c: "red", size: "xs" }, "*")), /* @__PURE__ */ React313.createElement(
|
|
31343
31470
|
BaseTextArea,
|
|
31344
31471
|
{
|
|
31345
31472
|
placeholder: t("actionTypes.evaluateBid.flow.startTyping", { defaultValue: "Start Typing" }),
|
|
@@ -31348,7 +31475,7 @@ var EvaluateBidFlowDetail = ({
|
|
|
31348
31475
|
minRows: 2,
|
|
31349
31476
|
disabled: isDisabled || submitting
|
|
31350
31477
|
}
|
|
31351
|
-
)), decision === "approve" && bidIsEvaluator && /* @__PURE__ */
|
|
31478
|
+
)), decision === "approve" && bidIsEvaluator && /* @__PURE__ */ React313.createElement(React313.Fragment, null, /* @__PURE__ */ React313.createElement(Divider21, { color: "color-mix(in srgb, var(--mantine-color-text) 6%, transparent)" }), /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateBid.flow.paymentLabel", { defaultValue: "Payment (used as evaluator max amount)" })), paymentRows.map((row, index) => /* @__PURE__ */ React313.createElement(Stack205, { key: row.id, gap: 8 }, /* @__PURE__ */ React313.createElement(Group111, { justify: "space-between", align: "center" }, /* @__PURE__ */ React313.createElement(Text193, { size: "sm" }, t("actionTypes.evaluateClaim.flow.payment.token", { index: index + 1, defaultValue: `Token ${index + 1}` })), /* @__PURE__ */ React313.createElement(Group111, { gap: "xs" }, paymentRows.length > 1 && /* @__PURE__ */ React313.createElement(Button62, { variant: "subtle", size: "compact-xs", color: "red", onClick: () => removePaymentRow(row.id), disabled: isDisabled || submitting }, t("actionTypes.evaluateClaim.flow.payment.remove", { defaultValue: "Remove" })))), /* @__PURE__ */ React313.createElement(
|
|
31352
31479
|
BaseSelect,
|
|
31353
31480
|
{
|
|
31354
31481
|
value: row.denom,
|
|
@@ -31361,7 +31488,7 @@ var EvaluateBidFlowDetail = ({
|
|
|
31361
31488
|
clearable: false,
|
|
31362
31489
|
disabled: isDisabled || submitting
|
|
31363
31490
|
}
|
|
31364
|
-
), row.denom === CUSTOM_DENOM && /* @__PURE__ */
|
|
31491
|
+
), row.denom === CUSTOM_DENOM && /* @__PURE__ */ React313.createElement(
|
|
31365
31492
|
BaseTextInput,
|
|
31366
31493
|
{
|
|
31367
31494
|
placeholder: t("actionTypes.evaluateClaim.flow.payment.customDenomPlaceholder", { defaultValue: "Custom denom (e.g. ibc/... or uixo)" }),
|
|
@@ -31369,7 +31496,7 @@ var EvaluateBidFlowDetail = ({
|
|
|
31369
31496
|
onChange: (event) => updatePaymentRow(row.id, { customDenom: event.currentTarget.value }),
|
|
31370
31497
|
disabled: isDisabled || submitting
|
|
31371
31498
|
}
|
|
31372
|
-
), /* @__PURE__ */
|
|
31499
|
+
), /* @__PURE__ */ React313.createElement(
|
|
31373
31500
|
BaseNumberInput,
|
|
31374
31501
|
{
|
|
31375
31502
|
min: 0,
|
|
@@ -31378,15 +31505,15 @@ var EvaluateBidFlowDetail = ({
|
|
|
31378
31505
|
placeholder: t("actionTypes.evaluateClaim.flow.payment.amountPlaceholder", { defaultValue: "Amount" }),
|
|
31379
31506
|
disabled: isDisabled || submitting
|
|
31380
31507
|
}
|
|
31381
|
-
))), /* @__PURE__ */
|
|
31508
|
+
))), /* @__PURE__ */ React313.createElement(Button62, { variant: "light", size: "xs", onClick: addPaymentRow, disabled: isDisabled || submitting }, t("actionTypes.evaluateClaim.flow.payment.addPayment", { defaultValue: "Add Payment" }))))), error && /* @__PURE__ */ React313.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, error));
|
|
31382
31509
|
}
|
|
31383
31510
|
const filterTabs = [{ value: "pending", label: t("actionTypes.evaluateBid.flow.status.pending", { defaultValue: "Pending" }) }];
|
|
31384
|
-
return /* @__PURE__ */
|
|
31511
|
+
return /* @__PURE__ */ React313.createElement(Stack205, { gap: "md" }, /* @__PURE__ */ React313.createElement(GroupProposalStatus, { editor, block, runtime }), runtime?.state !== "awaiting_readback" && /* @__PURE__ */ React313.createElement(ActAsGroupSection, { value: actAs, onChange: setActAs, isDisabled, actionLabel: "decide this application" }), !deedDid || !collectionId ? /* @__PURE__ */ React313.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, t("actionTypes.shared.errors.configRequired", {
|
|
31385
31512
|
defaultValue: "Configure {{did}} and {{claimCollection}} in template mode before running this action.",
|
|
31386
31513
|
did: "DID",
|
|
31387
31514
|
claimCollection: "claim collection"
|
|
31388
|
-
})) : /* @__PURE__ */
|
|
31389
|
-
|
|
31515
|
+
})) : /* @__PURE__ */ React313.createElement(React313.Fragment, null, /* @__PURE__ */ React313.createElement(Group111, { justify: "space-between", align: "center" }, /* @__PURE__ */ React313.createElement(Group111, { gap: 0 }, filterTabs.map((tab) => /* @__PURE__ */ React313.createElement(
|
|
31516
|
+
UnstyledButton4,
|
|
31390
31517
|
{
|
|
31391
31518
|
key: tab.value,
|
|
31392
31519
|
onClick: () => setActiveFilter(tab.value),
|
|
@@ -31398,14 +31525,14 @@ var EvaluateBidFlowDetail = ({
|
|
|
31398
31525
|
transition: "background 150ms ease"
|
|
31399
31526
|
}
|
|
31400
31527
|
},
|
|
31401
|
-
/* @__PURE__ */
|
|
31402
|
-
))), /* @__PURE__ */
|
|
31528
|
+
/* @__PURE__ */ React313.createElement(Text193, { size: "sm", fw: 500, c: activeFilter === tab.value ? "var(--mantine-color-text)" : "dimmed" }, tab.label)
|
|
31529
|
+
))), /* @__PURE__ */ React313.createElement(Group111, { gap: 4 }, /* @__PURE__ */ React313.createElement(DownloadCsvButton, { onDownload: handleDownloadBidsCsv, disabled: loadingBids || bids.length === 0, label: "Download bids CSV" }), /* @__PURE__ */ React313.createElement(ActionIcon44, { variant: "subtle", color: "gray", size: "sm" }, /* @__PURE__ */ React313.createElement(IconFilter, { size: 16 })))), loadingBids && /* @__PURE__ */ React313.createElement(Group111, { gap: "xs", justify: "center", py: "md" }, /* @__PURE__ */ React313.createElement(Loader55, { size: "xs" }), /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateBid.flow.loadingBids", { defaultValue: "Loading bids..." }))), !loadingBids && filteredBids.length === 0 && /* @__PURE__ */ React313.createElement(Text193, { size: "sm", c: "dimmed", ta: "center", py: "md" }, bids.length === 0 ? t("actionTypes.evaluateBid.flow.empty.allCollections", { defaultValue: "No bids available for this collection." }) : t("actionTypes.evaluateBid.flow.empty.filtered", { filter: activeFilter, defaultValue: `No ${activeFilter} bids found.` })), filteredBids.length > 0 && /* @__PURE__ */ React313.createElement(Stack205, { gap: 12 }, filteredBids.map((bid) => {
|
|
31403
31530
|
const status = getBidStatus(bid, t);
|
|
31404
31531
|
const profile = profilesByDid[bid.did];
|
|
31405
31532
|
const displayName = profile?.displayname || bid.did || bid.address;
|
|
31406
31533
|
const avatarLabel = (profile?.displayname || bid.did || bid.address || "?")[0]?.toUpperCase();
|
|
31407
|
-
return /* @__PURE__ */
|
|
31408
|
-
|
|
31534
|
+
return /* @__PURE__ */ React313.createElement(ListItemContainer, { key: bid.id, isChecked: false, onClick: () => setSelectedBidId(bid.id) }, /* @__PURE__ */ React313.createElement(Group111, { gap: 16, align: "center", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React313.createElement(
|
|
31535
|
+
Box57,
|
|
31409
31536
|
{
|
|
31410
31537
|
style: {
|
|
31411
31538
|
width: 32,
|
|
@@ -31425,8 +31552,8 @@ var EvaluateBidFlowDetail = ({
|
|
|
31425
31552
|
}
|
|
31426
31553
|
},
|
|
31427
31554
|
profile?.avatarUrl ? null : avatarLabel
|
|
31428
|
-
), /* @__PURE__ */
|
|
31429
|
-
}))), error && /* @__PURE__ */
|
|
31555
|
+
), /* @__PURE__ */ React313.createElement(Stack205, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React313.createElement(Text193, { fw: 500, size: "md", truncate: true, style: { lineHeight: 1.5 } }, displayName), /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed", truncate: true }, truncateAddress2(bid.address)))), /* @__PURE__ */ React313.createElement(Stack205, { gap: 0, align: "flex-end", style: { flexShrink: 0, minWidth: 80 } }, /* @__PURE__ */ React313.createElement(Text193, { fw: 500, size: "md", c: status.color === "green" ? "green" : status.color === "red" ? "red" : void 0, style: { lineHeight: 1.5 } }, status.color === "green" && /* @__PURE__ */ React313.createElement(IconCheck21, { size: 14, style: { verticalAlign: "middle", marginRight: 2 } }), status.label), /* @__PURE__ */ React313.createElement(Text193, { size: "xs", c: "dimmed" }, getTimeAgo(bid.created || ""))));
|
|
31556
|
+
}))), error && /* @__PURE__ */ React313.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, error));
|
|
31430
31557
|
};
|
|
31431
31558
|
|
|
31432
31559
|
// src/mantine/blocks/action/actionTypes/evaluateBid/index.ts
|
|
@@ -31443,8 +31570,8 @@ registerActionTypeUI("qi/bid.evaluate", {
|
|
|
31443
31570
|
import { IconFileText as IconFileText5 } from "@tabler/icons-react";
|
|
31444
31571
|
|
|
31445
31572
|
// src/mantine/blocks/action/actionTypes/claim/ClaimConfig.tsx
|
|
31446
|
-
import
|
|
31447
|
-
import { Alert as Alert46, Button as Button63, Loader as Loader56, Stack as
|
|
31573
|
+
import React314, { useCallback as useCallback106, useEffect as useEffect108, useMemo as useMemo113, useRef as useRef39, useState as useState163 } from "react";
|
|
31574
|
+
import { Alert as Alert46, Button as Button63, Loader as Loader56, Stack as Stack206, Text as Text194 } from "@mantine/core";
|
|
31448
31575
|
|
|
31449
31576
|
// src/mantine/blocks/action/actionTypes/claim/types.ts
|
|
31450
31577
|
function parseClaimActionInputs(json) {
|
|
@@ -31471,10 +31598,10 @@ function serializeClaimActionInputs(inputs) {
|
|
|
31471
31598
|
var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
31472
31599
|
const t = useTranslate();
|
|
31473
31600
|
const handlers = useBlocknoteHandlers();
|
|
31474
|
-
const [local, setLocal] =
|
|
31475
|
-
const [collections, setCollections] =
|
|
31476
|
-
const [loadingCollections, setLoadingCollections] =
|
|
31477
|
-
const [error, setError] =
|
|
31601
|
+
const [local, setLocal] = useState163(() => parseClaimActionInputs(inputs));
|
|
31602
|
+
const [collections, setCollections] = useState163([]);
|
|
31603
|
+
const [loadingCollections, setLoadingCollections] = useState163(false);
|
|
31604
|
+
const [error, setError] = useState163(null);
|
|
31478
31605
|
const localRef = useRef39(local);
|
|
31479
31606
|
useEffect108(() => {
|
|
31480
31607
|
localRef.current = local;
|
|
@@ -31493,8 +31620,8 @@ var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
31493
31620
|
},
|
|
31494
31621
|
[onInputsChange]
|
|
31495
31622
|
);
|
|
31496
|
-
const [schemaLoading, setSchemaLoading] =
|
|
31497
|
-
const [schemaError, setSchemaError] =
|
|
31623
|
+
const [schemaLoading, setSchemaLoading] = useState163(false);
|
|
31624
|
+
const [schemaError, setSchemaError] = useState163(null);
|
|
31498
31625
|
const fetchGenRef = useRef39(0);
|
|
31499
31626
|
const materialiseSurveySchema = useCallback106(
|
|
31500
31627
|
async (deedDid, collectionId) => {
|
|
@@ -31571,7 +31698,7 @@ var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
31571
31698
|
})),
|
|
31572
31699
|
[collections]
|
|
31573
31700
|
);
|
|
31574
|
-
return /* @__PURE__ */
|
|
31701
|
+
return /* @__PURE__ */ React314.createElement(Stack206, { gap: "md" }, /* @__PURE__ */ React314.createElement(
|
|
31575
31702
|
DataInput,
|
|
31576
31703
|
{
|
|
31577
31704
|
label: "DID",
|
|
@@ -31587,7 +31714,7 @@ var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
31587
31714
|
currentBlockId: blockId,
|
|
31588
31715
|
required: true
|
|
31589
31716
|
}
|
|
31590
|
-
), /* @__PURE__ */
|
|
31717
|
+
), /* @__PURE__ */ React314.createElement(
|
|
31591
31718
|
Button63,
|
|
31592
31719
|
{
|
|
31593
31720
|
size: "xs",
|
|
@@ -31598,7 +31725,7 @@ var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
31598
31725
|
}
|
|
31599
31726
|
},
|
|
31600
31727
|
t("actionTypes.shared.useCurrentEntity", { defaultValue: "Use Current {{entity}}", entity: "Entity" })
|
|
31601
|
-
), /* @__PURE__ */
|
|
31728
|
+
), /* @__PURE__ */ React314.createElement(BasePrimaryButton, { onClick: fetchCollections, disabled: !local.deedDid.trim() || loadingCollections }, loadingCollections ? /* @__PURE__ */ React314.createElement(Loader56, { size: "xs", color: "dark" }) : t("actionTypes.shared.getCollections", { defaultValue: "Get {{collections}}", collections: "Collections" })), error && /* @__PURE__ */ React314.createElement(Alert46, { color: "red", styles: actionAlertStyles }, error), collectionOptions.length > 0 && /* @__PURE__ */ React314.createElement(
|
|
31602
31729
|
BaseSelect,
|
|
31603
31730
|
{
|
|
31604
31731
|
label: "Claim Collection",
|
|
@@ -31612,15 +31739,15 @@ var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
31612
31739
|
required: true,
|
|
31613
31740
|
searchable: true
|
|
31614
31741
|
}
|
|
31615
|
-
), local.collectionId && /* @__PURE__ */
|
|
31742
|
+
), local.collectionId && /* @__PURE__ */ React314.createElement(Stack206, { gap: 4 }, schemaLoading && /* @__PURE__ */ React314.createElement(Text194, { size: "xs", c: "dimmed" }, t("actionTypes.shared.loadingSurveySchema", { defaultValue: "Loading survey schema..." })), !schemaLoading && local.surveyAnswersSchema.length > 0 && /* @__PURE__ */ React314.createElement(Text194, { size: "xs", c: "dimmed" }, t("actionTypes.claim.config.emitsPrefix", { defaultValue: "Emits" }), " ", /* @__PURE__ */ React314.createElement("code", null, "submitted"), " ", t("actionTypes.claim.config.emitsWith", { defaultValue: "with" }), " ", local.surveyAnswersSchema.length, " ", t("actionTypes.claim.config.typedSurveyField", {
|
|
31616
31743
|
count: local.surveyAnswersSchema.length,
|
|
31617
31744
|
defaultValue: local.surveyAnswersSchema.length === 1 ? "typed survey field" : "typed survey fields"
|
|
31618
|
-
}), ". ", t("actionTypes.claim.config.listenerBlocksCanReference", { defaultValue: "Listener blocks can reference" }), " ", /* @__PURE__ */
|
|
31745
|
+
}), ". ", t("actionTypes.claim.config.listenerBlocksCanReference", { defaultValue: "Listener blocks can reference" }), " ", /* @__PURE__ */ React314.createElement("code", null, "$", "{", "sourceBlock.payload.surveyAnswers.<field>", "}"), "."), schemaError && /* @__PURE__ */ React314.createElement(Alert46, { color: "yellow", styles: actionAlertStyles }, schemaError)));
|
|
31619
31746
|
};
|
|
31620
31747
|
|
|
31621
31748
|
// src/mantine/blocks/action/actionTypes/claim/ClaimFlowDetail.tsx
|
|
31622
|
-
import
|
|
31623
|
-
import { ActionIcon as ActionIcon45, Box as
|
|
31749
|
+
import React315, { useCallback as useCallback107, useEffect as useEffect109, useMemo as useMemo114, useRef as useRef40, useState as useState164 } from "react";
|
|
31750
|
+
import { ActionIcon as ActionIcon45, Box as Box58, Group as Group112, Loader as Loader57, Stack as Stack207, Text as Text195 } from "@mantine/core";
|
|
31624
31751
|
import { IconArrowLeft as IconArrowLeft9, IconCheck as IconCheck22, IconPlayerPlay as IconPlayerPlay6 } from "@tabler/icons-react";
|
|
31625
31752
|
import { SurveyModel as SurveyModel10 } from "@ixo/surveys";
|
|
31626
31753
|
|
|
@@ -31751,7 +31878,7 @@ var ClaimFlowDetail = ({
|
|
|
31751
31878
|
registerRuntimeInputs,
|
|
31752
31879
|
executeAction
|
|
31753
31880
|
}) => {
|
|
31754
|
-
const [actAs, setActAs] =
|
|
31881
|
+
const [actAs, setActAs] = useState164(emptyActAsGroupState());
|
|
31755
31882
|
const t = useTranslate();
|
|
31756
31883
|
const handlers = useBlocknoteHandlers();
|
|
31757
31884
|
const handlersRef = useRef40(handlers);
|
|
@@ -31770,25 +31897,25 @@ var ClaimFlowDetail = ({
|
|
|
31770
31897
|
const resolveOpts = useMemo114(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
31771
31898
|
const deedDid = resolveReferences(parsed.deedDid, editorDocument, resolveOpts).trim();
|
|
31772
31899
|
const collectionId = resolveReferences(parsed.collectionId, editorDocument, resolveOpts).trim();
|
|
31773
|
-
const [claims, setClaims] =
|
|
31774
|
-
const [loadingClaims, setLoadingClaims] =
|
|
31775
|
-
const [adminAddress, setAdminAddress] =
|
|
31776
|
-
const [surveyJson, setSurveyJson] =
|
|
31777
|
-
const [prefillData, setPrefillData] =
|
|
31778
|
-
const [loadingSurvey, setLoadingSurvey] =
|
|
31779
|
-
const [submitting, setSubmitting] =
|
|
31780
|
-
const [error, setError] =
|
|
31781
|
-
const [profilesByDid, setProfilesByDid] =
|
|
31782
|
-
const [isServiceAgentAuthorized, setIsServiceAgentAuthorized] =
|
|
31783
|
-
const [authChecking, setAuthChecking] =
|
|
31784
|
-
const [authError, setAuthError] =
|
|
31785
|
-
const [authRetryKey, setAuthRetryKey] =
|
|
31786
|
-
const [surveyComplete, setSurveyComplete] =
|
|
31787
|
-
const [selectedClaimId, setSelectedClaimId] =
|
|
31788
|
-
const [selectedClaimData, setSelectedClaimData] =
|
|
31789
|
-
const [loadingClaimDetail, setLoadingClaimDetail] =
|
|
31790
|
-
const [disputeDetails, setDisputeDetails] =
|
|
31791
|
-
const [loadingDispute, setLoadingDispute] =
|
|
31900
|
+
const [claims, setClaims] = useState164([]);
|
|
31901
|
+
const [loadingClaims, setLoadingClaims] = useState164(false);
|
|
31902
|
+
const [adminAddress, setAdminAddress] = useState164("");
|
|
31903
|
+
const [surveyJson, setSurveyJson] = useState164(null);
|
|
31904
|
+
const [prefillData, setPrefillData] = useState164(null);
|
|
31905
|
+
const [loadingSurvey, setLoadingSurvey] = useState164(false);
|
|
31906
|
+
const [submitting, setSubmitting] = useState164(false);
|
|
31907
|
+
const [error, setError] = useState164(null);
|
|
31908
|
+
const [profilesByDid, setProfilesByDid] = useState164({});
|
|
31909
|
+
const [isServiceAgentAuthorized, setIsServiceAgentAuthorized] = useState164(false);
|
|
31910
|
+
const [authChecking, setAuthChecking] = useState164(true);
|
|
31911
|
+
const [authError, setAuthError] = useState164(null);
|
|
31912
|
+
const [authRetryKey, setAuthRetryKey] = useState164(0);
|
|
31913
|
+
const [surveyComplete, setSurveyComplete] = useState164(false);
|
|
31914
|
+
const [selectedClaimId, setSelectedClaimId] = useState164("");
|
|
31915
|
+
const [selectedClaimData, setSelectedClaimData] = useState164(null);
|
|
31916
|
+
const [loadingClaimDetail, setLoadingClaimDetail] = useState164(false);
|
|
31917
|
+
const [disputeDetails, setDisputeDetails] = useState164(null);
|
|
31918
|
+
const [loadingDispute, setLoadingDispute] = useState164(false);
|
|
31792
31919
|
const selectedClaim = useMemo114(() => claims.find((c) => c.claimId === selectedClaimId) || null, [claims, selectedClaimId]);
|
|
31793
31920
|
const selectedClaimStatus = useMemo114(() => selectedClaim ? getClaimStatusInfo(selectedClaim) : null, [selectedClaim]);
|
|
31794
31921
|
const isSelectedDisputed = selectedClaimStatus?.key === "disputed";
|
|
@@ -32213,30 +32340,30 @@ var ClaimFlowDetail = ({
|
|
|
32213
32340
|
});
|
|
32214
32341
|
}, [surveyModel, handlers, editor, deedDid, collectionId, block.id, block?.props?.title]);
|
|
32215
32342
|
if (selectedClaim) {
|
|
32216
|
-
return /* @__PURE__ */
|
|
32343
|
+
return /* @__PURE__ */ React315.createElement(Stack207, { gap: "md" }, /* @__PURE__ */ React315.createElement(Group112, { gap: "xs", align: "center" }, /* @__PURE__ */ React315.createElement(ActionIcon45, { variant: "subtle", color: "gray", size: "sm", onClick: () => setSelectedClaimId("") }, /* @__PURE__ */ React315.createElement(IconArrowLeft9, { size: 16 })), /* @__PURE__ */ React315.createElement(Text195, { fw: 500, size: "sm", title: selectedClaim.claimId }, t("actionTypes.claim.flow.claimNumber", { id: truncateId(selectedClaim.claimId), defaultValue: `Claim #${truncateId(selectedClaim.claimId)}` }))), selectedClaimStatus && /* @__PURE__ */ React315.createElement(Group112, { gap: "xs", align: "center" }, /* @__PURE__ */ React315.createElement(Text195, { size: "sm", c: "dimmed" }, t("actionTypes.claim.flow.statusLabel", { defaultValue: "Status:" })), /* @__PURE__ */ React315.createElement(Text195, { fw: 500, size: "sm", c: selectedClaimStatus.color }, selectedClaimStatus.label), /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, "\xB7 ", getTimeAgo2(selectedClaim.submissionDate || ""))), isSelectedDisputed && /* @__PURE__ */ React315.createElement(DismissibleAlert, { color: "orange", title: t("actionTypes.claim.flow.disputed.title", { defaultValue: "Claim disputed" }), styles: actionAlertStyles }, loadingDispute ? /* @__PURE__ */ React315.createElement(Group112, { gap: "xs" }, /* @__PURE__ */ React315.createElement(Loader57, { size: "xs" }), /* @__PURE__ */ React315.createElement(Text195, { size: "xs" }, t("actionTypes.claim.flow.disputed.loadingDetails", { defaultValue: "Loading dispute details\u2026" }))) : disputeDetails ? /* @__PURE__ */ React315.createElement(Stack207, { gap: 6 }, disputeDetails.reason ? /* @__PURE__ */ React315.createElement(Text195, { size: "sm" }, disputeDetails.reason) : /* @__PURE__ */ React315.createElement(Text195, { size: "sm", c: "dimmed" }, t("actionTypes.claim.flow.disputed.noMessage", { defaultValue: "The evaluator disputed this claim but did not provide a message." })), (disputeDetails.evaluatorDid || disputeDetails.disputedAt) && /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, disputeDetails.evaluatorDid ? t("actionTypes.claim.flow.disputed.byEvaluator", {
|
|
32217
32344
|
address: truncateAddress3(disputeDetails.evaluatorDid),
|
|
32218
32345
|
defaultValue: `By ${truncateAddress3(disputeDetails.evaluatorDid)}`
|
|
32219
|
-
}) : "", disputeDetails.evaluatorDid && disputeDetails.disputedAt ? " \xB7 " : "", disputeDetails.disputedAt ? new Date(disputeDetails.disputedAt).toLocaleString() : ""), /* @__PURE__ */
|
|
32346
|
+
}) : "", disputeDetails.evaluatorDid && disputeDetails.disputedAt ? " \xB7 " : "", disputeDetails.disputedAt ? new Date(disputeDetails.disputedAt).toLocaleString() : ""), /* @__PURE__ */ React315.createElement(BasePrimaryButton, { onClick: amendAndResubmit, disabled: isDisabled || submitting || !isServiceAgentAuthorized || !selectedClaimData }, t("actionTypes.claim.flow.disputed.amendAndResubmit", { defaultValue: "Amend & Resubmit" }))) : typeof handlers.getClaimDisputeDetails !== "function" ? /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.disputed.unavailable", { defaultValue: "Dispute details unavailable in this environment." })) : /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.disputed.noRecord", { defaultValue: "No dispute record found on-chain for this claim." }))), loadingClaimDetail ? /* @__PURE__ */ React315.createElement(Group112, { gap: "xs" }, /* @__PURE__ */ React315.createElement(Loader57, { size: "xs" }), /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.loadingSubmission", { defaultValue: "Loading submission\u2026" }))) : detailSurveyModel ? /* @__PURE__ */ React315.createElement(StableSurvey, { model: detailSurveyModel }) : /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.noSubmissionData", { defaultValue: "No submission data available." })), error && /* @__PURE__ */ React315.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, error));
|
|
32220
32347
|
}
|
|
32221
|
-
return /* @__PURE__ */
|
|
32348
|
+
return /* @__PURE__ */ React315.createElement(Stack207, { gap: "md" }, /* @__PURE__ */ React315.createElement(GroupProposalStatus, { editor, block, runtime }), runtime?.state !== "awaiting_readback" && /* @__PURE__ */ React315.createElement(ActAsGroupSection, { value: actAs, onChange: setActAs, isDisabled, actionLabel: "submit this claim", authzFilter: collectionId ? { requiresAuthz: "submitClaim", collectionId } : void 0 }), !deedDid || !collectionId ? /* @__PURE__ */ React315.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, t("actionTypes.shared.errors.configRequired", {
|
|
32222
32349
|
defaultValue: "Configure {{did}} and {{claimCollection}} in template mode before running this action.",
|
|
32223
32350
|
did: "DID",
|
|
32224
32351
|
claimCollection: "claim collection"
|
|
32225
|
-
})) : /* @__PURE__ */
|
|
32352
|
+
})) : /* @__PURE__ */ React315.createElement(React315.Fragment, null, /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, t("actionTypes.shared.collectionPrefix", { id: collectionId, defaultValue: `Collection: ${collectionId}` })), prefillData && /* @__PURE__ */ React315.createElement(DismissibleAlert, { color: "orange", styles: actionAlertStyles }, t("actionTypes.claim.flow.amendingNotice", { defaultValue: "Amending a previously disputed claim \u2014 edit the fields below and submit to resubmit." })), /* @__PURE__ */ React315.createElement(
|
|
32226
32353
|
BasePrimaryButton,
|
|
32227
32354
|
{
|
|
32228
|
-
leftSection: loadingSurvey || authChecking ? /* @__PURE__ */
|
|
32355
|
+
leftSection: loadingSurvey || authChecking ? /* @__PURE__ */ React315.createElement(Loader57, { size: 14 }) : /* @__PURE__ */ React315.createElement(IconPlayerPlay6, { size: 14 }),
|
|
32229
32356
|
onClick: startSurvey,
|
|
32230
32357
|
disabled: isDisabled || loadingSurvey || submitting || authChecking || !isServiceAgentAuthorized && !actAs.actAsGroup || !adminAddress
|
|
32231
32358
|
},
|
|
32232
32359
|
authChecking ? t("actionTypes.claim.flow.checkingAuthorization", { defaultValue: "Checking authorization..." }) : loadingSurvey ? t("actionTypes.shared.loadingSurvey", { defaultValue: "Loading Survey..." }) : t("actionTypes.claim.flow.startNewClaim", { defaultValue: "Start New Claim" })
|
|
32233
|
-
), !authChecking && authError && /* @__PURE__ */
|
|
32360
|
+
), !authChecking && authError && /* @__PURE__ */ React315.createElement(DismissibleAlert, { color: "orange", styles: actionAlertStyles }, /* @__PURE__ */ React315.createElement(Stack207, { gap: "xs" }, /* @__PURE__ */ React315.createElement(Text195, { size: "sm" }, t("actionTypes.claim.flow.authVerifyFailed", { defaultValue: "Couldn't verify your authorization \u2014 the chain RPC is unreachable." })), /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, authError), /* @__PURE__ */ React315.createElement(BasePrimaryButton, { size: "xs", onClick: () => setAuthRetryKey((k) => k + 1) }, t("actionTypes.claim.flow.retry", { defaultValue: "Retry" })))), !authChecking && !authError && !isServiceAgentAuthorized && !actAs.actAsGroup && /* @__PURE__ */ React315.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, t("actionTypes.claim.flow.errors.notAuthorized", { defaultValue: "You need service agent authorization for this collection to submit claims." })), loadingClaims ? /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.loadingYourClaims", { defaultValue: "Loading your claims..." })) : claims.length === 0 ? /* @__PURE__ */ React315.createElement(Text195, { size: "sm", c: "dimmed" }, t("actionTypes.claim.flow.noClaimsYet", { defaultValue: "No claims submitted for this collection yet." })) : /* @__PURE__ */ React315.createElement(Stack207, { gap: "xs" }, /* @__PURE__ */ React315.createElement(Text195, { size: "sm", fw: 600 }, t("actionTypes.claim.flow.yourClaims", { defaultValue: "Your Claims" })), claims.map((claim) => {
|
|
32234
32361
|
const status = getClaimStatusInfo(claim);
|
|
32235
32362
|
const profile = profilesByDid[claim.agentDid];
|
|
32236
32363
|
const displayName = profile?.displayname || claim.agentDid || claim.agentAddress;
|
|
32237
32364
|
const avatarLabel = (profile?.displayname || claim.agentDid || claim.agentAddress || "?")[0]?.toUpperCase();
|
|
32238
|
-
return /* @__PURE__ */
|
|
32239
|
-
|
|
32365
|
+
return /* @__PURE__ */ React315.createElement(ListItemContainer, { key: claim.claimId, isChecked: false, onClick: () => setSelectedClaimId(claim.claimId) }, /* @__PURE__ */ React315.createElement(Group112, { gap: 16, align: "center", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React315.createElement(
|
|
32366
|
+
Box58,
|
|
32240
32367
|
{
|
|
32241
32368
|
style: {
|
|
32242
32369
|
width: 32,
|
|
@@ -32256,8 +32383,8 @@ var ClaimFlowDetail = ({
|
|
|
32256
32383
|
}
|
|
32257
32384
|
},
|
|
32258
32385
|
profile?.avatarUrl ? null : avatarLabel
|
|
32259
|
-
), /* @__PURE__ */
|
|
32260
|
-
}))), surveyModel && !loadingSurvey && /* @__PURE__ */
|
|
32386
|
+
), /* @__PURE__ */ React315.createElement(Stack207, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React315.createElement(Text195, { fw: 500, size: "md", truncate: true, style: { lineHeight: 1.5 } }, displayName), /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed", truncate: true }, truncateAddress3(claim.agentAddress)))), /* @__PURE__ */ React315.createElement(Stack207, { gap: 0, align: "flex-end", style: { flexShrink: 0, minWidth: 80 } }, /* @__PURE__ */ React315.createElement(Text195, { fw: 500, size: "md", c: status.color, style: { lineHeight: 1.5 } }, status.key === "approved" && /* @__PURE__ */ React315.createElement(IconCheck22, { size: 14, style: { verticalAlign: "middle", marginRight: 2 } }), status.label), /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, getTimeAgo2(claim.submissionDate || ""))));
|
|
32387
|
+
}))), surveyModel && !loadingSurvey && /* @__PURE__ */ React315.createElement(React315.Fragment, null, /* @__PURE__ */ React315.createElement(SurveyAiFillButton, { surveyId: openSurveyId, title: openSurveyTitle }), /* @__PURE__ */ React315.createElement(StableSurvey, { model: surveyModel })), submitting && /* @__PURE__ */ React315.createElement(Group112, { gap: "xs" }, /* @__PURE__ */ React315.createElement(Loader57, { size: "xs" }), /* @__PURE__ */ React315.createElement(Text195, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.submittingClaim", { defaultValue: "Submitting claim..." }))), error && /* @__PURE__ */ React315.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, error));
|
|
32261
32388
|
};
|
|
32262
32389
|
|
|
32263
32390
|
// src/mantine/blocks/action/actionTypes/claim/index.ts
|
|
@@ -32274,8 +32401,8 @@ registerActionTypeUI("qi/claim.submit", {
|
|
|
32274
32401
|
import { IconFolders as IconFolders2 } from "@tabler/icons-react";
|
|
32275
32402
|
|
|
32276
32403
|
// src/mantine/blocks/action/actionTypes/collection/CollectionLifecycleConfig.tsx
|
|
32277
|
-
import
|
|
32278
|
-
import { Alert as Alert47, Badge as Badge50, Button as Button64, Group as
|
|
32404
|
+
import React316, { useCallback as useCallback108, useEffect as useEffect110, useMemo as useMemo115, useState as useState165 } from "react";
|
|
32405
|
+
import { Alert as Alert47, Badge as Badge50, Button as Button64, Group as Group113, Loader as Loader58, Stack as Stack208, Text as Text196 } from "@mantine/core";
|
|
32279
32406
|
import { IconInfoCircle as IconInfoCircle9 } from "@tabler/icons-react";
|
|
32280
32407
|
var DEFAULT7 = {
|
|
32281
32408
|
entity: "",
|
|
@@ -32296,10 +32423,10 @@ function parseInputs(json) {
|
|
|
32296
32423
|
}
|
|
32297
32424
|
var CollectionLifecycleConfig = ({ inputs, onInputsChange }) => {
|
|
32298
32425
|
const handlers = useBlocknoteHandlers();
|
|
32299
|
-
const [local, setLocal] =
|
|
32300
|
-
const [protocols, setProtocols] =
|
|
32301
|
-
const [loadingProtocols, setLoadingProtocols] =
|
|
32302
|
-
const [protocolError, setProtocolError] =
|
|
32426
|
+
const [local, setLocal] = useState165(() => parseInputs(inputs));
|
|
32427
|
+
const [protocols, setProtocols] = useState165([]);
|
|
32428
|
+
const [loadingProtocols, setLoadingProtocols] = useState165(false);
|
|
32429
|
+
const [protocolError, setProtocolError] = useState165(null);
|
|
32303
32430
|
useEffect110(() => {
|
|
32304
32431
|
setLocal(parseInputs(inputs));
|
|
32305
32432
|
}, [inputs]);
|
|
@@ -32356,7 +32483,7 @@ var CollectionLifecycleConfig = ({ inputs, onInputsChange }) => {
|
|
|
32356
32483
|
[protocols]
|
|
32357
32484
|
);
|
|
32358
32485
|
const isManageMode = local.collectionId.trim().length > 0;
|
|
32359
|
-
return /* @__PURE__ */
|
|
32486
|
+
return /* @__PURE__ */ React316.createElement(Stack208, { gap: "md" }, /* @__PURE__ */ React316.createElement(Group113, { justify: "space-between", align: "center" }, /* @__PURE__ */ React316.createElement(Text196, { size: "sm", fw: 600 }, "Collection Context"), /* @__PURE__ */ React316.createElement(Badge50, { color: isManageMode ? "accent" : "neutralColor", variant: "light", size: "sm" }, isManageMode ? "Manage existing" : "Create new")), /* @__PURE__ */ React316.createElement(Stack208, { gap: "xs" }, /* @__PURE__ */ React316.createElement(Text196, { size: "sm", fw: 600 }, "Entity DID"), /* @__PURE__ */ React316.createElement(Text196, { size: "xs", c: "dimmed" }, "The entity DID that owns the collection. Its linked claim protocols are fetched below."), /* @__PURE__ */ React316.createElement(
|
|
32360
32487
|
BaseTextInput,
|
|
32361
32488
|
{
|
|
32362
32489
|
placeholder: "did:ixo:entity:...",
|
|
@@ -32367,7 +32494,7 @@ var CollectionLifecycleConfig = ({ inputs, onInputsChange }) => {
|
|
|
32367
32494
|
update({ entity: e.currentTarget.value });
|
|
32368
32495
|
}
|
|
32369
32496
|
}
|
|
32370
|
-
), /* @__PURE__ */
|
|
32497
|
+
), /* @__PURE__ */ React316.createElement(
|
|
32371
32498
|
Button64,
|
|
32372
32499
|
{
|
|
32373
32500
|
size: "xs",
|
|
@@ -32382,7 +32509,7 @@ var CollectionLifecycleConfig = ({ inputs, onInputsChange }) => {
|
|
|
32382
32509
|
}
|
|
32383
32510
|
},
|
|
32384
32511
|
"Use Current Entity"
|
|
32385
|
-
)), /* @__PURE__ */
|
|
32512
|
+
)), /* @__PURE__ */ React316.createElement(Stack208, { gap: "xs" }, /* @__PURE__ */ React316.createElement(Text196, { size: "sm", fw: 600 }, "Claim Protocol"), /* @__PURE__ */ React316.createElement(Text196, { size: "xs", c: "dimmed" }, "The verifiableClaim protocol for claims in this collection. Fetched from the entity's linked claims, so the selected protocol always matches the chosen entity."), /* @__PURE__ */ React316.createElement(BasePrimaryButton, { onClick: fetchProtocols, disabled: !local.entity.trim() || loadingProtocols }, loadingProtocols ? /* @__PURE__ */ React316.createElement(Loader58, { size: "xs", color: "dark" }) : "Get Protocols"), protocolError && /* @__PURE__ */ React316.createElement(Alert47, { color: "red", styles: actionAlertStyles }, protocolError), protocolOptions.length > 0 && /* @__PURE__ */ React316.createElement(
|
|
32386
32513
|
BaseSelect,
|
|
32387
32514
|
{
|
|
32388
32515
|
label: "Protocol",
|
|
@@ -32393,12 +32520,12 @@ var CollectionLifecycleConfig = ({ inputs, onInputsChange }) => {
|
|
|
32393
32520
|
required: true,
|
|
32394
32521
|
searchable: true
|
|
32395
32522
|
}
|
|
32396
|
-
), local.protocol && protocolOptions.length === 0 && /* @__PURE__ */
|
|
32523
|
+
), local.protocol && protocolOptions.length === 0 && /* @__PURE__ */ React316.createElement(Text196, { size: "xs", c: "dimmed" }, "Currently selected: ", /* @__PURE__ */ React316.createElement("code", null, local.protocol), " \u2014 press \u201CGet Protocols\u201D to change it."), local.protocol && (!local.protocol.startsWith("did:") || local.protocol.includes("#")) && /* @__PURE__ */ React316.createElement(Alert47, { color: "red", styles: actionAlertStyles }, "The saved protocol ", /* @__PURE__ */ React316.createElement("code", null, local.protocol), " is not a valid DID, so creating a collection will fail. This is usually an unresolved claim-template reference \u2014 press \u201CGet Protocols\u201D and pick the protocol again.")), /* @__PURE__ */ React316.createElement(Stack208, { gap: "xs" }, /* @__PURE__ */ React316.createElement(Text196, { size: "sm", fw: 600 }, "Collection ID (optional)"), /* @__PURE__ */ React316.createElement(Text196, { size: "xs", c: "dimmed" }, "Leave empty to make this block a create entry point. Set an existing collection id (or a ", /* @__PURE__ */ React316.createElement("code", null, "{{block.output.collectionId}}"), " reference) to manage an existing collection."), /* @__PURE__ */ React316.createElement(BaseTextInput, { placeholder: "Leave empty to create a new collection", value: local.collectionId, onChange: (e) => update({ collectionId: e.currentTarget.value }) })), /* @__PURE__ */ React316.createElement(Alert47, { color: "neutralColor", variant: "light", icon: icon(IconInfoCircle9, 16) }, /* @__PURE__ */ React316.createElement(Text196, { size: "xs" }, isManageMode ? "Manage-only mode: the block loads this collection and exposes lifecycle operations (state, dates, quota, payments, intents). Entity and protocol are only used for creation." : "Create mode: the block creates a new collection from the entity and protocol above. Schedule, quota, payments, and intents are chosen at run time.")));
|
|
32397
32524
|
};
|
|
32398
32525
|
|
|
32399
32526
|
// src/mantine/blocks/action/actionTypes/collection/CollectionLifecycleFlowDetail.tsx
|
|
32400
|
-
import
|
|
32401
|
-
import { Badge as Badge51, Box as
|
|
32527
|
+
import React317, { useCallback as useCallback109, useEffect as useEffect111, useMemo as useMemo116, useRef as useRef41, useState as useState166 } from "react";
|
|
32528
|
+
import { Badge as Badge51, Box as Box59, Button as Button65, Group as Group114, Loader as Loader59, Overlay, SegmentedControl as SegmentedControl14, Stack as Stack209, Text as Text197 } from "@mantine/core";
|
|
32402
32529
|
import { DateTimePicker as DateTimePicker2 } from "@mantine/dates";
|
|
32403
32530
|
import { IconAlertCircle as IconAlertCircle27, IconCheck as IconCheck23, IconRefresh as IconRefresh8 } from "@tabler/icons-react";
|
|
32404
32531
|
|
|
@@ -32551,7 +32678,7 @@ var CollectionLifecycleFlowDetail = ({
|
|
|
32551
32678
|
registerRuntimeInputs,
|
|
32552
32679
|
executeAction
|
|
32553
32680
|
}) => {
|
|
32554
|
-
const [actAs, setActAs] =
|
|
32681
|
+
const [actAs, setActAs] = useState166(emptyActAsGroupState());
|
|
32555
32682
|
const parsed = useMemo116(() => parseTemplateInputs(inputs), [inputs]);
|
|
32556
32683
|
const editorDocument = editor?.document || [];
|
|
32557
32684
|
const resolveOpts = useMemo116(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
@@ -32567,22 +32694,22 @@ var CollectionLifecycleFlowDetail = ({
|
|
|
32567
32694
|
const hasSnapshot = !!outputCollectionId;
|
|
32568
32695
|
const isManageMode = !!boundCollectionId || hasSnapshot;
|
|
32569
32696
|
const isCreateMode = !isManageMode;
|
|
32570
|
-
const [operation, setOperation] =
|
|
32697
|
+
const [operation, setOperation] = useState166(isCreateMode ? "create" : "updateState");
|
|
32571
32698
|
useEffect111(() => {
|
|
32572
32699
|
if (hasSnapshot && operation === "create") {
|
|
32573
32700
|
setOperation("updateState");
|
|
32574
32701
|
}
|
|
32575
32702
|
}, [hasSnapshot, operation]);
|
|
32576
|
-
const [createQuota, setCreateQuota] =
|
|
32577
|
-
const [createStartDate, setCreateStartDate] =
|
|
32578
|
-
const [createEndDate, setCreateEndDate] =
|
|
32579
|
-
const [createPayments, setCreatePayments] =
|
|
32580
|
-
const [targetState, setTargetState] =
|
|
32581
|
-
const [editStartDate, setEditStartDate] =
|
|
32582
|
-
const [editEndDate, setEditEndDate] =
|
|
32583
|
-
const [editQuota, setEditQuota] =
|
|
32584
|
-
const [editPayments, setEditPayments] =
|
|
32585
|
-
const [editIntentsJson, setEditIntentsJson] =
|
|
32703
|
+
const [createQuota, setCreateQuota] = useState166(parsed.quota || "0");
|
|
32704
|
+
const [createStartDate, setCreateStartDate] = useState166(parsed.startDate || "");
|
|
32705
|
+
const [createEndDate, setCreateEndDate] = useState166(parsed.endDate || "");
|
|
32706
|
+
const [createPayments, setCreatePayments] = useState166(() => paymentsToInput(parsed.payments));
|
|
32707
|
+
const [targetState, setTargetState] = useState166(output?.state ?? 0 /* OPEN */);
|
|
32708
|
+
const [editStartDate, setEditStartDate] = useState166("");
|
|
32709
|
+
const [editEndDate, setEditEndDate] = useState166("");
|
|
32710
|
+
const [editQuota, setEditQuota] = useState166("");
|
|
32711
|
+
const [editPayments, setEditPayments] = useState166(() => paymentsToInput(output?.payments));
|
|
32712
|
+
const [editIntentsJson, setEditIntentsJson] = useState166("");
|
|
32586
32713
|
const seededFromRef = useRef41("");
|
|
32587
32714
|
useEffect111(() => {
|
|
32588
32715
|
if (!hasSnapshot) return;
|
|
@@ -32836,7 +32963,7 @@ var CollectionLifecycleFlowDetail = ({
|
|
|
32836
32963
|
}, [runRefresh]);
|
|
32837
32964
|
const title = block?.props?.title || (isCreateMode ? "Create Claim Collection" : "Manage Claim Collection");
|
|
32838
32965
|
const description = block?.props?.description || "";
|
|
32839
|
-
return /* @__PURE__ */
|
|
32966
|
+
return /* @__PURE__ */ React317.createElement(Stack209, { gap: "md", pos: "relative" }, /* @__PURE__ */ React317.createElement(GroupProposalStatus, { editor, block, runtime }), runtime?.state !== "awaiting_readback" && /* @__PURE__ */ React317.createElement(ActAsGroupSection, { value: actAs, onChange: setActAs, isDisabled, actionLabel: "update this collection" }), /* @__PURE__ */ React317.createElement(Stack209, { gap: 2 }, /* @__PURE__ */ React317.createElement(Text197, { fw: 600 }, title), description && /* @__PURE__ */ React317.createElement(Text197, { size: "sm", c: "dimmed" }, description)), isStale && /* @__PURE__ */ React317.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React317.createElement(IconAlertCircle27, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React317.createElement(Stack209, { gap: "xs" }, /* @__PURE__ */ React317.createElement(Text197, { size: "sm" }, "Block was marked completed but no collection state was recorded. This is stale state from a previous run \u2014 reset and re-run."), /* @__PURE__ */ React317.createElement(Group114, null, /* @__PURE__ */ React317.createElement(Button65, { variant: "outline", size: "xs", onClick: handleReset }, "Reset"), /* @__PURE__ */ React317.createElement(Button65, { variant: "filled", size: "xs", onClick: handleForceRun, disabled: !validation.ok }, "Force Run Now")))), isFailed && /* @__PURE__ */ React317.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React317.createElement(IconAlertCircle27, { size: 16 }), color: "red", title: "Action Failed", styles: actionAlertStyles }, /* @__PURE__ */ React317.createElement(Stack209, { gap: "xs" }, errorMessage && /* @__PURE__ */ React317.createElement(Text197, { size: "sm" }, errorMessage), /* @__PURE__ */ React317.createElement(Group114, null, /* @__PURE__ */ React317.createElement(Button65, { variant: "outline", size: "xs", onClick: handleReset }, "Reset"), !!effectiveCollectionId && /* @__PURE__ */ React317.createElement(Button65, { variant: "filled", size: "xs", leftSection: /* @__PURE__ */ React317.createElement(IconRefresh8, { size: 14 }), onClick: handleManualRefresh }, "Refresh State")))), isManageMode && !hasSnapshot && !isRunning && !isFailed && /* @__PURE__ */ React317.createElement(Group114, { gap: "xs" }, /* @__PURE__ */ React317.createElement(Loader59, { size: 14 }), /* @__PURE__ */ React317.createElement(Text197, { size: "sm", c: "dimmed" }, "Loading collection ", effectiveCollectionId ? `(${effectiveCollectionId})` : "", "\u2026")), hasSnapshot && /* @__PURE__ */ React317.createElement(Stack209, { gap: "md" }, /* @__PURE__ */ React317.createElement(StatsStrip, { output }), isCompletedWithProof && /* @__PURE__ */ React317.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React317.createElement(IconCheck23, { size: 16 }), color: "green", styles: actionAlertStyles }, "Collection ", outputCollectionId, " synced \u2014 ", stateLabel(output?.state), "."), /* @__PURE__ */ React317.createElement(
|
|
32840
32967
|
SegmentedControl14,
|
|
32841
32968
|
{
|
|
32842
32969
|
fullWidth: true,
|
|
@@ -32851,7 +32978,7 @@ var CollectionLifecycleFlowDetail = ({
|
|
|
32851
32978
|
{ label: "Intents", value: "updateIntents" }
|
|
32852
32979
|
]
|
|
32853
32980
|
}
|
|
32854
|
-
), operation === "updateState" && /* @__PURE__ */
|
|
32981
|
+
), operation === "updateState" && /* @__PURE__ */ React317.createElement(
|
|
32855
32982
|
SegmentedControl14,
|
|
32856
32983
|
{
|
|
32857
32984
|
fullWidth: true,
|
|
@@ -32864,7 +32991,7 @@ var CollectionLifecycleFlowDetail = ({
|
|
|
32864
32991
|
{ label: "Closed", value: String(2 /* CLOSED */) }
|
|
32865
32992
|
]
|
|
32866
32993
|
}
|
|
32867
|
-
), operation === "updateDates" && /* @__PURE__ */
|
|
32994
|
+
), operation === "updateDates" && /* @__PURE__ */ React317.createElement(Group114, { grow: true, align: "flex-start" }, /* @__PURE__ */ React317.createElement(
|
|
32868
32995
|
DateTimePicker2,
|
|
32869
32996
|
{
|
|
32870
32997
|
label: "Start date",
|
|
@@ -32875,7 +33002,7 @@ var CollectionLifecycleFlowDetail = ({
|
|
|
32875
33002
|
onChange: (date) => setEditStartDate(dateToIso2(date)),
|
|
32876
33003
|
disabled: isDisabled || isRunning
|
|
32877
33004
|
}
|
|
32878
|
-
), /* @__PURE__ */
|
|
33005
|
+
), /* @__PURE__ */ React317.createElement(
|
|
32879
33006
|
DateTimePicker2,
|
|
32880
33007
|
{
|
|
32881
33008
|
label: "End date",
|
|
@@ -32887,7 +33014,7 @@ var CollectionLifecycleFlowDetail = ({
|
|
|
32887
33014
|
onChange: (date) => setEditEndDate(dateToIso2(date)),
|
|
32888
33015
|
disabled: isDisabled || isRunning
|
|
32889
33016
|
}
|
|
32890
|
-
)), operation === "updateQuota" && /* @__PURE__ */
|
|
33017
|
+
)), operation === "updateQuota" && /* @__PURE__ */ React317.createElement(
|
|
32891
33018
|
BaseNumberInput,
|
|
32892
33019
|
{
|
|
32893
33020
|
label: "Quota (0 = unlimited)",
|
|
@@ -32897,7 +33024,7 @@ var CollectionLifecycleFlowDetail = ({
|
|
|
32897
33024
|
onChange: (value) => setEditQuota(value === "" || value == null ? "" : String(value)),
|
|
32898
33025
|
disabled: isDisabled || isRunning
|
|
32899
33026
|
}
|
|
32900
|
-
), operation === "updatePayments" && /* @__PURE__ */
|
|
33027
|
+
), operation === "updatePayments" && /* @__PURE__ */ React317.createElement(PaymentsEditor, { value: editPayments, onChange: setEditPayments, disabled: isDisabled || isRunning }), operation === "updateIntents" && /* @__PURE__ */ React317.createElement(
|
|
32901
33028
|
BaseTextInput,
|
|
32902
33029
|
{
|
|
32903
33030
|
label: "Intents (JSON)",
|
|
@@ -32906,7 +33033,7 @@ var CollectionLifecycleFlowDetail = ({
|
|
|
32906
33033
|
onChange: (e) => setEditIntentsJson(e.currentTarget.value),
|
|
32907
33034
|
disabled: isDisabled || isRunning
|
|
32908
33035
|
}
|
|
32909
|
-
), !validation.ok && validation.error && /* @__PURE__ */
|
|
33036
|
+
), !validation.ok && validation.error && /* @__PURE__ */ React317.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, validation.error)), isCreateMode && !hasSnapshot && /* @__PURE__ */ React317.createElement(Stack209, { gap: "md" }, (!parsed.entity || !parsed.protocol) && /* @__PURE__ */ React317.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, "Configure the entity DID and protocol in template mode before creating a collection."), /* @__PURE__ */ React317.createElement(
|
|
32910
33037
|
BaseNumberInput,
|
|
32911
33038
|
{
|
|
32912
33039
|
label: "Quota (0 = unlimited)",
|
|
@@ -32915,7 +33042,7 @@ var CollectionLifecycleFlowDetail = ({
|
|
|
32915
33042
|
onChange: (value) => setCreateQuota(value === "" || value == null ? "" : String(value)),
|
|
32916
33043
|
disabled: isDisabled || isRunning
|
|
32917
33044
|
}
|
|
32918
|
-
), /* @__PURE__ */
|
|
33045
|
+
), /* @__PURE__ */ React317.createElement(Group114, { grow: true, align: "flex-start" }, /* @__PURE__ */ React317.createElement(
|
|
32919
33046
|
DateTimePicker2,
|
|
32920
33047
|
{
|
|
32921
33048
|
label: "Start date",
|
|
@@ -32926,7 +33053,7 @@ var CollectionLifecycleFlowDetail = ({
|
|
|
32926
33053
|
onChange: (date) => setCreateStartDate(dateToIso2(date)),
|
|
32927
33054
|
disabled: isDisabled || isRunning
|
|
32928
33055
|
}
|
|
32929
|
-
), /* @__PURE__ */
|
|
33056
|
+
), /* @__PURE__ */ React317.createElement(
|
|
32930
33057
|
DateTimePicker2,
|
|
32931
33058
|
{
|
|
32932
33059
|
label: "End date",
|
|
@@ -32938,13 +33065,13 @@ var CollectionLifecycleFlowDetail = ({
|
|
|
32938
33065
|
onChange: (date) => setCreateEndDate(dateToIso2(date)),
|
|
32939
33066
|
disabled: isDisabled || isRunning
|
|
32940
33067
|
}
|
|
32941
|
-
)), /* @__PURE__ */
|
|
33068
|
+
)), /* @__PURE__ */ React317.createElement(PaymentsEditor, { value: createPayments, onChange: setCreatePayments, disabled: isDisabled || isRunning }), !validation.ok && validation.error && /* @__PURE__ */ React317.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, validation.error)), isDisabled && /* @__PURE__ */ React317.createElement(Text197, { size: "xs", c: "dimmed" }, "This block is currently disabled."), isRunning && /* @__PURE__ */ React317.createElement(Overlay, { color: "var(--mantine-color-body)", backgroundOpacity: 0.6, blur: 1, zIndex: 5, radius: "md" }, /* @__PURE__ */ React317.createElement(Group114, { gap: "xs", justify: "center", h: "100%" }, /* @__PURE__ */ React317.createElement(Loader59, { size: 16 }), /* @__PURE__ */ React317.createElement(Text197, { size: "sm" }, "Syncing collection state\u2026"))));
|
|
32942
33069
|
};
|
|
32943
33070
|
var PaymentsEditor = ({ value, onChange, disabled }) => {
|
|
32944
33071
|
const setLeg = (key, patch) => {
|
|
32945
33072
|
onChange({ ...value, [key]: { ...value[key], ...patch } });
|
|
32946
33073
|
};
|
|
32947
|
-
return /* @__PURE__ */
|
|
33074
|
+
return /* @__PURE__ */ React317.createElement(Stack209, { gap: "sm" }, /* @__PURE__ */ React317.createElement(Stack209, { gap: 2 }, /* @__PURE__ */ React317.createElement(Text197, { size: "sm", fw: 500 }, "Payouts"), /* @__PURE__ */ React317.createElement(Text197, { size: "xs", c: "dimmed" }, "Optional payout per claim stage, paid from the entity admin account. Leave blank for no payout.")), PAYMENT_LEGS.map(({ key, label, description }) => /* @__PURE__ */ React317.createElement(Group114, { key, align: "flex-end", gap: "sm", wrap: "nowrap" }, /* @__PURE__ */ React317.createElement(
|
|
32948
33075
|
BaseNumberInput,
|
|
32949
33076
|
{
|
|
32950
33077
|
label,
|
|
@@ -32957,7 +33084,7 @@ var PaymentsEditor = ({ value, onChange, disabled }) => {
|
|
|
32957
33084
|
onChange: (v) => setLeg(key, { amount: v === "" || v == null ? "" : String(v) }),
|
|
32958
33085
|
disabled
|
|
32959
33086
|
}
|
|
32960
|
-
), /* @__PURE__ */
|
|
33087
|
+
), /* @__PURE__ */ React317.createElement(
|
|
32961
33088
|
BaseSelect,
|
|
32962
33089
|
{
|
|
32963
33090
|
label: "Token",
|
|
@@ -32971,8 +33098,8 @@ var PaymentsEditor = ({ value, onChange, disabled }) => {
|
|
|
32971
33098
|
))));
|
|
32972
33099
|
};
|
|
32973
33100
|
var StatsStrip = ({ output }) => {
|
|
32974
|
-
return /* @__PURE__ */
|
|
32975
|
-
|
|
33101
|
+
return /* @__PURE__ */ React317.createElement(
|
|
33102
|
+
Box59,
|
|
32976
33103
|
{
|
|
32977
33104
|
style: {
|
|
32978
33105
|
border: "1px solid var(--mantine-color-neutralColor-6)",
|
|
@@ -32981,12 +33108,12 @@ var StatsStrip = ({ output }) => {
|
|
|
32981
33108
|
background: "var(--mantine-color-neutralColor-5)"
|
|
32982
33109
|
}
|
|
32983
33110
|
},
|
|
32984
|
-
/* @__PURE__ */
|
|
33111
|
+
/* @__PURE__ */ React317.createElement(Group114, { justify: "space-between", wrap: "wrap", gap: "md" }, /* @__PURE__ */ React317.createElement(Stat, { label: "Collection", value: output.collectionId, mono: true }), /* @__PURE__ */ React317.createElement(Stat, { label: "State", value: stateLabel(output.state), badge: true, stateValue: output.state }), /* @__PURE__ */ React317.createElement(Stat, { label: "Count", value: String(output.count ?? "0") }), /* @__PURE__ */ React317.createElement(Stat, { label: "Quota", value: formatQuota(output.quota) }), output.startDate && /* @__PURE__ */ React317.createElement(Stat, { label: "Start", value: output.startDate }), output.endDate && /* @__PURE__ */ React317.createElement(Stat, { label: "End", value: output.endDate }))
|
|
32985
33112
|
);
|
|
32986
33113
|
};
|
|
32987
33114
|
var Stat = ({ label, value, mono, badge, stateValue }) => {
|
|
32988
33115
|
const badgeColor = stateValue === 0 /* OPEN */ ? "green" : stateValue === 1 /* PAUSED */ ? "yellow" : "red";
|
|
32989
|
-
return /* @__PURE__ */
|
|
33116
|
+
return /* @__PURE__ */ React317.createElement(Stack209, { gap: 2, style: { minWidth: 0 } }, /* @__PURE__ */ React317.createElement(Text197, { size: "xs", c: "dimmed" }, label), badge ? /* @__PURE__ */ React317.createElement(Badge51, { color: badgeColor, variant: "light" }, value) : /* @__PURE__ */ React317.createElement(Text197, { size: "sm", fw: 600, style: mono ? { wordBreak: "break-all", fontFamily: "var(--mantine-font-family-monospace)" } : void 0 }, value));
|
|
32990
33117
|
};
|
|
32991
33118
|
|
|
32992
33119
|
// src/mantine/blocks/action/actionTypes/collection/index.ts
|
|
@@ -33003,8 +33130,8 @@ registerActionTypeUI("qi/collection.lifecycle", {
|
|
|
33003
33130
|
import { IconUsers as IconUsers8 } from "@tabler/icons-react";
|
|
33004
33131
|
|
|
33005
33132
|
// src/mantine/blocks/action/actionTypes/collectionUsers/CollectionUsersConfig.tsx
|
|
33006
|
-
import
|
|
33007
|
-
import { Alert as Alert48, Button as Button66, Group as
|
|
33133
|
+
import React318, { useCallback as useCallback110, useEffect as useEffect112, useMemo as useMemo117, useState as useState167 } from "react";
|
|
33134
|
+
import { Alert as Alert48, Button as Button66, Group as Group115, Loader as Loader60, Paper as Paper24, Select as Select9, Stack as Stack210, Text as Text198 } from "@mantine/core";
|
|
33008
33135
|
import { IconBolt as IconBolt11, IconClock as IconClock13, IconPencil } from "@tabler/icons-react";
|
|
33009
33136
|
|
|
33010
33137
|
// src/mantine/blocks/action/actionTypes/collectionUsers/types.ts
|
|
@@ -33024,7 +33151,7 @@ function serializeCollectionUsersActionInputs(inputs) {
|
|
|
33024
33151
|
}
|
|
33025
33152
|
|
|
33026
33153
|
// src/mantine/blocks/action/actionTypes/collectionUsers/CollectionUsersConfig.tsx
|
|
33027
|
-
var ModeCard = ({ active, icon: icon2, title, description, onClick }) => /* @__PURE__ */
|
|
33154
|
+
var ModeCard = ({ active, icon: icon2, title, description, onClick }) => /* @__PURE__ */ React318.createElement(
|
|
33028
33155
|
Paper24,
|
|
33029
33156
|
{
|
|
33030
33157
|
withBorder: true,
|
|
@@ -33047,20 +33174,20 @@ var ModeCard = ({ active, icon: icon2, title, description, onClick }) => /* @__P
|
|
|
33047
33174
|
transition: "border-color 120ms ease, background 120ms ease"
|
|
33048
33175
|
}
|
|
33049
33176
|
},
|
|
33050
|
-
/* @__PURE__ */
|
|
33177
|
+
/* @__PURE__ */ React318.createElement(Stack210, { gap: 4 }, /* @__PURE__ */ React318.createElement(Group115, { gap: 6, align: "center", wrap: "nowrap" }, icon2, /* @__PURE__ */ React318.createElement(Text198, { size: "sm", fw: 600 }, title)), /* @__PURE__ */ React318.createElement(Text198, { size: "xs", c: "dimmed" }, description))
|
|
33051
33178
|
);
|
|
33052
33179
|
var CollectionUsersConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
33053
33180
|
const t = useTranslate();
|
|
33054
33181
|
const handlers = useBlocknoteHandlers();
|
|
33055
|
-
const [local, setLocal] =
|
|
33056
|
-
const [collections, setCollections] =
|
|
33057
|
-
const [loadingCollections, setLoadingCollections] =
|
|
33058
|
-
const [error, setError] =
|
|
33182
|
+
const [local, setLocal] = useState167(() => parseCollectionUsersActionInputs(inputs));
|
|
33183
|
+
const [collections, setCollections] = useState167([]);
|
|
33184
|
+
const [loadingCollections, setLoadingCollections] = useState167(false);
|
|
33185
|
+
const [error, setError] = useState167(null);
|
|
33059
33186
|
const readTriggerRaw = useCallback110(() => {
|
|
33060
33187
|
const b = (editor?.document || []).find((x) => x?.id === blockId);
|
|
33061
33188
|
return typeof b?.props?.trigger === "string" ? b.props.trigger : "";
|
|
33062
33189
|
}, [editor, blockId]);
|
|
33063
|
-
const [triggerRaw, setTriggerRaw] =
|
|
33190
|
+
const [triggerRaw, setTriggerRaw] = useState167(() => readTriggerRaw());
|
|
33064
33191
|
useEffect112(() => {
|
|
33065
33192
|
setLocal(parseCollectionUsersActionInputs(inputs));
|
|
33066
33193
|
setTriggerRaw(readTriggerRaw());
|
|
@@ -33168,25 +33295,25 @@ var CollectionUsersConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
33168
33295
|
})),
|
|
33169
33296
|
[collections]
|
|
33170
33297
|
);
|
|
33171
|
-
return /* @__PURE__ */
|
|
33298
|
+
return /* @__PURE__ */ React318.createElement(Stack210, { gap: "md" }, /* @__PURE__ */ React318.createElement(Stack210, { gap: 6 }, /* @__PURE__ */ React318.createElement(Text198, { size: "sm", fw: 600 }, "How is the collection chosen?"), /* @__PURE__ */ React318.createElement(Group115, { gap: "sm", align: "stretch", grow: true }, /* @__PURE__ */ React318.createElement(
|
|
33172
33299
|
ModeCard,
|
|
33173
33300
|
{
|
|
33174
33301
|
active: mode === "trigger",
|
|
33175
|
-
icon: /* @__PURE__ */
|
|
33302
|
+
icon: /* @__PURE__ */ React318.createElement(IconBolt11, { size: 16, color: "var(--mantine-color-accent-5)" }),
|
|
33176
33303
|
title: "From a created collection",
|
|
33177
33304
|
description: "Wait for a Claim Collection block to create a collection, then manage it automatically.",
|
|
33178
33305
|
onClick: switchToTrigger
|
|
33179
33306
|
}
|
|
33180
|
-
), /* @__PURE__ */
|
|
33307
|
+
), /* @__PURE__ */ React318.createElement(
|
|
33181
33308
|
ModeCard,
|
|
33182
33309
|
{
|
|
33183
33310
|
active: mode === "manual",
|
|
33184
|
-
icon: /* @__PURE__ */
|
|
33311
|
+
icon: /* @__PURE__ */ React318.createElement(IconPencil, { size: 16 }),
|
|
33185
33312
|
title: "Enter manually",
|
|
33186
33313
|
description: "Pick the entity and an existing collection yourself.",
|
|
33187
33314
|
onClick: switchToManual
|
|
33188
33315
|
}
|
|
33189
|
-
))), mode === "trigger" ? /* @__PURE__ */
|
|
33316
|
+
))), mode === "trigger" ? /* @__PURE__ */ React318.createElement(Stack210, { gap: "sm" }, /* @__PURE__ */ React318.createElement(
|
|
33190
33317
|
Select9,
|
|
33191
33318
|
{
|
|
33192
33319
|
label: "Source collection block",
|
|
@@ -33200,7 +33327,7 @@ var CollectionUsersConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
33200
33327
|
disabled: sourceOptions.length === 0,
|
|
33201
33328
|
searchable: true
|
|
33202
33329
|
}
|
|
33203
|
-
), selectedSource ? /* @__PURE__ */
|
|
33330
|
+
), selectedSource ? /* @__PURE__ */ React318.createElement(Alert48, { icon: /* @__PURE__ */ React318.createElement(IconClock13, { size: 16 }), color: "accent", styles: actionAlertStyles }, /* @__PURE__ */ React318.createElement(Text198, { size: "xs" }, "Activates when ", /* @__PURE__ */ React318.createElement("b", null, selectedSource.label), " creates a collection. The entity and collection are taken from that event \u2014 there's nothing to enter here.")) : /* @__PURE__ */ React318.createElement(Text198, { size: "xs", c: "dimmed" }, "Choose the Claim Collection block whose \u201Ccreated\u201D event should activate this one. Until it fires, this block waits.")) : /* @__PURE__ */ React318.createElement(Stack210, { gap: "md" }, /* @__PURE__ */ React318.createElement(
|
|
33204
33331
|
DataInput,
|
|
33205
33332
|
{
|
|
33206
33333
|
label: "DID",
|
|
@@ -33216,7 +33343,7 @@ var CollectionUsersConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
33216
33343
|
currentBlockId: blockId,
|
|
33217
33344
|
required: true
|
|
33218
33345
|
}
|
|
33219
|
-
), /* @__PURE__ */
|
|
33346
|
+
), /* @__PURE__ */ React318.createElement(
|
|
33220
33347
|
Button66,
|
|
33221
33348
|
{
|
|
33222
33349
|
size: "xs",
|
|
@@ -33227,7 +33354,7 @@ var CollectionUsersConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
33227
33354
|
}
|
|
33228
33355
|
},
|
|
33229
33356
|
t("actionTypes.shared.useCurrentEntity", { defaultValue: "Use Current {{entity}}", entity: "Entity" })
|
|
33230
|
-
), /* @__PURE__ */
|
|
33357
|
+
), /* @__PURE__ */ React318.createElement(BasePrimaryButton, { onClick: fetchCollections, disabled: !local.deedDid.trim() || loadingCollections }, loadingCollections ? /* @__PURE__ */ React318.createElement(Loader60, { size: "xs", color: "dark" }) : t("actionTypes.shared.getCollections", { defaultValue: "Get {{collections}}", collections: "Collections" })), error && /* @__PURE__ */ React318.createElement(Alert48, { color: "red", styles: actionAlertStyles }, error), collectionOptions.length > 0 && /* @__PURE__ */ React318.createElement(
|
|
33231
33358
|
BaseSelect,
|
|
33232
33359
|
{
|
|
33233
33360
|
label: "Claim Collection",
|
|
@@ -33242,8 +33369,8 @@ var CollectionUsersConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
33242
33369
|
};
|
|
33243
33370
|
|
|
33244
33371
|
// src/mantine/blocks/action/actionTypes/collectionUsers/CollectionUsersFlowDetail.tsx
|
|
33245
|
-
import
|
|
33246
|
-
import { ActionIcon as ActionIcon46, Badge as Badge52, Box as
|
|
33372
|
+
import React319, { useCallback as useCallback111, useEffect as useEffect113, useMemo as useMemo118, useRef as useRef42, useState as useState168 } from "react";
|
|
33373
|
+
import { ActionIcon as ActionIcon46, Badge as Badge52, Box as Box60, Button as Button67, Divider as Divider22, Group as Group116, Loader as Loader61, Radio as Radio5, SegmentedControl as SegmentedControl15, Stack as Stack211, Text as Text199 } from "@mantine/core";
|
|
33247
33374
|
import { useDebouncedValue } from "@mantine/hooks";
|
|
33248
33375
|
import { IconAlertCircle as IconAlertCircle28, IconArrowLeft as IconArrowLeft10, IconCheck as IconCheck24, IconRefresh as IconRefresh9, IconTrash as IconTrash10 } from "@tabler/icons-react";
|
|
33249
33376
|
var LOG2 = "[collection.users]";
|
|
@@ -33301,7 +33428,7 @@ function formatCoin3(coin) {
|
|
|
33301
33428
|
return `${fromBaseUnits(coin.amount)} ${denom}`;
|
|
33302
33429
|
}
|
|
33303
33430
|
function MaxAmountsInput({ value, onChange, disabled }) {
|
|
33304
|
-
return /* @__PURE__ */
|
|
33431
|
+
return /* @__PURE__ */ React319.createElement(Stack211, { gap: "xs" }, /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, "Evaluator max amounts"), /* @__PURE__ */ React319.createElement(Group116, { grow: true, align: "flex-start" }, /* @__PURE__ */ React319.createElement(
|
|
33305
33432
|
BaseNumberInput,
|
|
33306
33433
|
{
|
|
33307
33434
|
label: "IXO",
|
|
@@ -33310,7 +33437,7 @@ function MaxAmountsInput({ value, onChange, disabled }) {
|
|
|
33310
33437
|
onChange: (amount) => onChange({ ...value, ixo: amount === "" || amount == null ? "" : String(amount) }),
|
|
33311
33438
|
disabled
|
|
33312
33439
|
}
|
|
33313
|
-
), /* @__PURE__ */
|
|
33440
|
+
), /* @__PURE__ */ React319.createElement(
|
|
33314
33441
|
BaseNumberInput,
|
|
33315
33442
|
{
|
|
33316
33443
|
label: "USDC",
|
|
@@ -33369,7 +33496,7 @@ var CollectionUsersFlowDetail = ({
|
|
|
33369
33496
|
executeAction,
|
|
33370
33497
|
activePendingInvocation
|
|
33371
33498
|
}) => {
|
|
33372
|
-
const [actAs, setActAs] =
|
|
33499
|
+
const [actAs, setActAs] = useState168(emptyActAsGroupState());
|
|
33373
33500
|
const t = useTranslate();
|
|
33374
33501
|
const handlers = useBlocknoteHandlers();
|
|
33375
33502
|
const handlersRef = useRef42(handlers);
|
|
@@ -33391,8 +33518,8 @@ var CollectionUsersFlowDetail = ({
|
|
|
33391
33518
|
}, [activePendingInvocation]);
|
|
33392
33519
|
const deedDid = useMemo118(() => String(pendingPayload?.entity || "").trim() || templateDeedDid, [pendingPayload, templateDeedDid]);
|
|
33393
33520
|
const collectionId = useMemo118(() => String(pendingPayload?.collectionId || "").trim() || templateCollectionId, [pendingPayload, templateCollectionId]);
|
|
33394
|
-
const [adminAddress, setAdminAddress] =
|
|
33395
|
-
const [adminError, setAdminError] =
|
|
33521
|
+
const [adminAddress, setAdminAddress] = useState168("");
|
|
33522
|
+
const [adminError, setAdminError] = useState168(null);
|
|
33396
33523
|
useEffect113(() => {
|
|
33397
33524
|
let mounted = true;
|
|
33398
33525
|
if (!deedDid) {
|
|
@@ -33423,7 +33550,7 @@ var CollectionUsersFlowDetail = ({
|
|
|
33423
33550
|
const out = output;
|
|
33424
33551
|
return Array.isArray(out?.grantees) ? out.grantees : [];
|
|
33425
33552
|
}, [output]);
|
|
33426
|
-
const [granteeProfilesByDid, setGranteeProfilesByDid] =
|
|
33553
|
+
const [granteeProfilesByDid, setGranteeProfilesByDid] = useState168({});
|
|
33427
33554
|
const isRunning = runtime.state === "running";
|
|
33428
33555
|
const isFailed = runtime.state === "failed";
|
|
33429
33556
|
const errorMessage = runtime.error?.message || null;
|
|
@@ -33432,22 +33559,22 @@ var CollectionUsersFlowDetail = ({
|
|
|
33432
33559
|
const hasProof = hasTxProof || hasListProof;
|
|
33433
33560
|
const isCompletedWithProof = runtime.state === "completed" && hasProof;
|
|
33434
33561
|
const isStale = runtime.state === "completed" && !hasProof;
|
|
33435
|
-
const [section, setSection] =
|
|
33436
|
-
const [activeOp, setActiveOp] =
|
|
33437
|
-
const [addAddress, setAddAddress] =
|
|
33438
|
-
const [addRole, setAddRole] =
|
|
33439
|
-
const [addQuota, setAddQuota] =
|
|
33440
|
-
const [addMaxAmounts, setAddMaxAmounts] =
|
|
33441
|
-
const [granteeKind, setGranteeKind] =
|
|
33442
|
-
const [members, setMembers] =
|
|
33443
|
-
const [revokeTarget, setRevokeTarget] =
|
|
33562
|
+
const [section, setSection] = useState168("list");
|
|
33563
|
+
const [activeOp, setActiveOp] = useState168("add");
|
|
33564
|
+
const [addAddress, setAddAddress] = useState168("");
|
|
33565
|
+
const [addRole, setAddRole] = useState168("submit");
|
|
33566
|
+
const [addQuota, setAddQuota] = useState168(String(DEFAULT_CONTRIBUTOR_QUOTA));
|
|
33567
|
+
const [addMaxAmounts, setAddMaxAmounts] = useState168(EMPTY_MAX_AMOUNTS);
|
|
33568
|
+
const [granteeKind, setGranteeKind] = useState168("user");
|
|
33569
|
+
const [members, setMembers] = useState168([]);
|
|
33570
|
+
const [revokeTarget, setRevokeTarget] = useState168(null);
|
|
33444
33571
|
const classifyHandler = handlers.classifyAddress;
|
|
33445
33572
|
const enumerateHandler = handlers.enumerateMembers;
|
|
33446
33573
|
const canClassify = typeof classifyHandler === "function";
|
|
33447
33574
|
const canEnumerate = typeof enumerateHandler === "function";
|
|
33448
|
-
const [classification, setClassification] =
|
|
33449
|
-
const [classifying, setClassifying] =
|
|
33450
|
-
const [classifyError, setClassifyError] =
|
|
33575
|
+
const [classification, setClassification] = useState168(null);
|
|
33576
|
+
const [classifying, setClassifying] = useState168(false);
|
|
33577
|
+
const [classifyError, setClassifyError] = useState168(null);
|
|
33451
33578
|
const [debouncedAddress] = useDebouncedValue(addAddress.trim(), 400);
|
|
33452
33579
|
useEffect113(() => {
|
|
33453
33580
|
setClassification(null);
|
|
@@ -33716,11 +33843,11 @@ var CollectionUsersFlowDetail = ({
|
|
|
33716
33843
|
const title = block?.props?.title || "Collection Users";
|
|
33717
33844
|
const description = block?.props?.description || "";
|
|
33718
33845
|
const configMissing = !collectionId;
|
|
33719
|
-
return /* @__PURE__ */
|
|
33846
|
+
return /* @__PURE__ */ React319.createElement(Stack211, { gap: "md" }, /* @__PURE__ */ React319.createElement(GroupProposalStatus, { editor, block, runtime }), runtime?.state !== "awaiting_readback" && /* @__PURE__ */ React319.createElement(ActAsGroupSection, { value: actAs, onChange: setActAs, isDisabled, actionLabel: "change this collection's users" }), /* @__PURE__ */ React319.createElement(Stack211, { gap: 2 }, /* @__PURE__ */ React319.createElement(Text199, { fw: 600 }, title), description && /* @__PURE__ */ React319.createElement(Text199, { size: "sm", c: "dimmed" }, description)), configMissing && /* @__PURE__ */ React319.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, t("actionTypes.collectionUsers.flow.errors.configRequired", {
|
|
33720
33847
|
defaultValue: "Configure the {{did}} and {{claimCollection}} in template mode before running this action.",
|
|
33721
33848
|
did: "DID",
|
|
33722
33849
|
claimCollection: "claim collection"
|
|
33723
|
-
})), isStale && /* @__PURE__ */
|
|
33850
|
+
})), isStale && /* @__PURE__ */ React319.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React319.createElement(IconAlertCircle28, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React319.createElement(Stack211, { gap: "xs" }, /* @__PURE__ */ React319.createElement(Text199, { size: "sm" }, "Block was marked completed but no result was recorded. This is stale state from a previous run \u2014 reset and re-run."), /* @__PURE__ */ React319.createElement(Group116, null, /* @__PURE__ */ React319.createElement(Button67, { variant: "outline", size: "xs", onClick: handleReset }, "Reset"), /* @__PURE__ */ React319.createElement(Button67, { variant: "filled", size: "xs", onClick: handleForceRun, disabled: !validation.ok }, "Force Run Now")))), isFailed && /* @__PURE__ */ React319.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React319.createElement(IconAlertCircle28, { size: 16 }), color: "red", title: "Action Failed", styles: actionAlertStyles }, /* @__PURE__ */ React319.createElement(Stack211, { gap: "xs" }, errorMessage && /* @__PURE__ */ React319.createElement(Text199, { size: "sm" }, errorMessage), /* @__PURE__ */ React319.createElement(Group116, null, /* @__PURE__ */ React319.createElement(Button67, { variant: "outline", size: "xs", onClick: handleReset }, "Reset"), !!collectionId && !!adminAddress && /* @__PURE__ */ React319.createElement(Button67, { variant: "filled", size: "xs", leftSection: /* @__PURE__ */ React319.createElement(IconRefresh9, { size: 14 }), onClick: handleManualRefreshList }, "Refresh List")))), isCompletedWithProof && hasTxProof && (lastOp === "add" || lastOp === "revoke") && /* @__PURE__ */ React319.createElement(DismissibleAlert, { icon: /* @__PURE__ */ React319.createElement(IconCheck24, { size: 16 }), color: "green", styles: actionAlertStyles }, lastOp === "add" ? "Grant broadcast" : "Revoke broadcast", " \u2014 tx ", truncateAddress4(String(output?.transactionHash || "")), "."), !configMissing && /* @__PURE__ */ React319.createElement(
|
|
33724
33851
|
SegmentedControl15,
|
|
33725
33852
|
{
|
|
33726
33853
|
fullWidth: true,
|
|
@@ -33733,13 +33860,13 @@ var CollectionUsersFlowDetail = ({
|
|
|
33733
33860
|
{ label: "Bids", value: "bids" }
|
|
33734
33861
|
]
|
|
33735
33862
|
}
|
|
33736
|
-
), !configMissing && section === "list" && /* @__PURE__ */
|
|
33863
|
+
), !configMissing && section === "list" && /* @__PURE__ */ React319.createElement(Stack211, { gap: "sm" }, /* @__PURE__ */ React319.createElement(Group116, { justify: "space-between", align: "center" }, /* @__PURE__ */ React319.createElement(Text199, { size: "sm", fw: 600 }, "Grantees"), /* @__PURE__ */ React319.createElement(Group116, { gap: 4 }, /* @__PURE__ */ React319.createElement(DownloadCsvButton, { onDownload: handleDownloadGranteesCsv, disabled: isRunning || listGrantees.length === 0, label: "Download members CSV" }), /* @__PURE__ */ React319.createElement(ActionIcon46, { variant: "subtle", color: "gray", size: "sm", onClick: handleManualRefreshList, disabled: isRunning || !adminAddress }, /* @__PURE__ */ React319.createElement(IconRefresh9, { size: 16 })))), isRunning && lastOp !== "add" && lastOp !== "revoke" && /* @__PURE__ */ React319.createElement(Group116, { gap: "xs", justify: "center", py: "sm" }, /* @__PURE__ */ React319.createElement(Loader61, { size: "xs" }), /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, "Loading grantees\u2026")), !isRunning && listGrantees.length === 0 && /* @__PURE__ */ React319.createElement(Text199, { size: "sm", c: "dimmed", ta: "center", py: "sm" }, "No grantees hold a constraint for this collection yet."), listGrantees.map((grantee) => {
|
|
33737
33864
|
const isTarget = revokeTarget?.address === grantee.address && revokeTarget?.role === grantee.role;
|
|
33738
33865
|
const granteeDid = getGranteeDid(grantee);
|
|
33739
33866
|
const profile = granteeProfilesByDid[granteeDid];
|
|
33740
33867
|
const displayName = profile?.displayname || truncateAddress4(grantee.address);
|
|
33741
|
-
return /* @__PURE__ */
|
|
33742
|
-
|
|
33868
|
+
return /* @__PURE__ */ React319.createElement(
|
|
33869
|
+
Box60,
|
|
33743
33870
|
{
|
|
33744
33871
|
key: `${grantee.address}-${grantee.role}`,
|
|
33745
33872
|
style: {
|
|
@@ -33749,20 +33876,20 @@ var CollectionUsersFlowDetail = ({
|
|
|
33749
33876
|
background: "var(--mantine-color-neutralColor-5)"
|
|
33750
33877
|
}
|
|
33751
33878
|
},
|
|
33752
|
-
/* @__PURE__ */
|
|
33879
|
+
/* @__PURE__ */ React319.createElement(Group116, { justify: "space-between", align: "center", wrap: "nowrap" }, /* @__PURE__ */ React319.createElement(Stack211, { gap: 2, style: { minWidth: 0 } }, /* @__PURE__ */ React319.createElement(Text199, { size: "sm", fw: 600, truncate: true }, displayName), profile?.displayname && /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed", truncate: true }, truncateAddress4(grantee.address)), /* @__PURE__ */ React319.createElement(Group116, { gap: "xs" }, /* @__PURE__ */ React319.createElement(Badge52, { size: "xs", variant: "light", color: grantee.role === "submit" ? "blue" : "green" }, roleLabel(grantee.role)), /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, "Quota: ", formatQuota2(grantee.agentQuota)))), isTarget ? /* @__PURE__ */ React319.createElement(Button67, { size: "compact-xs", variant: "subtle", color: "gray", onClick: cancelRevoke, disabled: isDisabled || isRunning }, "Cancel") : /* @__PURE__ */ React319.createElement(
|
|
33753
33880
|
Button67,
|
|
33754
33881
|
{
|
|
33755
33882
|
size: "compact-xs",
|
|
33756
33883
|
variant: "light",
|
|
33757
33884
|
color: "red",
|
|
33758
|
-
leftSection: /* @__PURE__ */
|
|
33885
|
+
leftSection: /* @__PURE__ */ React319.createElement(IconTrash10, { size: 12 }),
|
|
33759
33886
|
onClick: () => handleSelectRevoke(grantee),
|
|
33760
33887
|
disabled: isDisabled || isRunning
|
|
33761
33888
|
},
|
|
33762
33889
|
"Revoke"
|
|
33763
33890
|
))
|
|
33764
33891
|
);
|
|
33765
|
-
}), revokeTarget && /* @__PURE__ */
|
|
33892
|
+
}), revokeTarget && /* @__PURE__ */ React319.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, "Slide to sign to revoke ", roleLabel(revokeTarget.role), " from ", truncateAddress4(revokeTarget.address), ".")), !configMissing && section === "add" && /* @__PURE__ */ React319.createElement(Stack211, { gap: "sm" }, revokeTarget && /* @__PURE__ */ React319.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, "A revoke is currently armed. Switch to the Users tab to sign it, or change the grantee below to arm an add instead."), /* @__PURE__ */ React319.createElement(Stack211, { gap: 4 }, /* @__PURE__ */ React319.createElement(Text199, { size: "sm", fw: 500 }, "Grantee address"), /* @__PURE__ */ React319.createElement(
|
|
33766
33893
|
RecipientInput,
|
|
33767
33894
|
{
|
|
33768
33895
|
value: addAddress,
|
|
@@ -33774,21 +33901,21 @@ var CollectionUsersFlowDetail = ({
|
|
|
33774
33901
|
isDisabled: isDisabled || isRunning,
|
|
33775
33902
|
placeholder: "Search by name / @user:\u2026, or paste an ixo1\u2026 address"
|
|
33776
33903
|
}
|
|
33777
|
-
)), canClassify ? /* @__PURE__ */
|
|
33904
|
+
)), canClassify ? /* @__PURE__ */ React319.createElement(Button67, { size: "xs", variant: "light", onClick: runClassify, disabled: !addAddress.trim() || classifying || isRunning, loading: classifying }, "Check address") : /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, "Address classification is unavailable in this host \u2014 the grantee will be added as a plain account."), classifyError && /* @__PURE__ */ React319.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, classifyError), isGroup && /* @__PURE__ */ React319.createElement(Box60, { style: { border: "1px solid var(--mantine-color-neutralColor-6)", borderRadius: 8, padding: 12 } }, /* @__PURE__ */ React319.createElement(Stack211, { gap: "xs" }, /* @__PURE__ */ React319.createElement(Text199, { size: "sm", fw: 600 }, "Add the group, or all the members of the POD?"), /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, "Detected a DAO DAO group (", classification?.daodao?.type, "). Choose how to grant access."), /* @__PURE__ */ React319.createElement(Radio5.Group, { value: granteeKind, onChange: (value) => setGranteeKind(value) }, /* @__PURE__ */ React319.createElement(Stack211, { gap: "xs", mt: "xs" }, /* @__PURE__ */ React319.createElement(
|
|
33778
33905
|
Radio5,
|
|
33779
33906
|
{
|
|
33780
33907
|
value: "group-account",
|
|
33781
33908
|
disabled: !canExerciseGrant || isDisabled || isRunning,
|
|
33782
|
-
label: /* @__PURE__ */
|
|
33909
|
+
label: /* @__PURE__ */ React319.createElement(Stack211, { gap: 0 }, /* @__PURE__ */ React319.createElement(Text199, { size: "sm" }, "Add the group"), /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, canExerciseGrant ? "Grant the group account directly (it can exercise the grant)." : "Unavailable \u2014 this group cannot exercise the grant."))
|
|
33783
33910
|
}
|
|
33784
|
-
), /* @__PURE__ */
|
|
33911
|
+
), /* @__PURE__ */ React319.createElement(
|
|
33785
33912
|
Radio5,
|
|
33786
33913
|
{
|
|
33787
33914
|
value: "group-members",
|
|
33788
33915
|
disabled: isDisabled || isRunning,
|
|
33789
|
-
label: /* @__PURE__ */
|
|
33916
|
+
label: /* @__PURE__ */ React319.createElement(Stack211, { gap: 0 }, /* @__PURE__ */ React319.createElement(Text199, { size: "sm" }, "Add all members of the POD"), /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, canEnumerate ? `Fan out: grant each member individually${members.length ? ` (${members.length} resolved)` : ""}.` : "Member enumeration is unavailable in this host."))
|
|
33790
33917
|
}
|
|
33791
|
-
))))), /* @__PURE__ */
|
|
33918
|
+
))))), /* @__PURE__ */ React319.createElement(
|
|
33792
33919
|
BaseSelect,
|
|
33793
33920
|
{
|
|
33794
33921
|
label: "Role",
|
|
@@ -33801,7 +33928,7 @@ var CollectionUsersFlowDetail = ({
|
|
|
33801
33928
|
],
|
|
33802
33929
|
disabled: isDisabled || isRunning
|
|
33803
33930
|
}
|
|
33804
|
-
), /* @__PURE__ */
|
|
33931
|
+
), /* @__PURE__ */ React319.createElement(
|
|
33805
33932
|
BaseNumberInput,
|
|
33806
33933
|
{
|
|
33807
33934
|
label: "Agent quota (max claims, at least 1)",
|
|
@@ -33810,19 +33937,19 @@ var CollectionUsersFlowDetail = ({
|
|
|
33810
33937
|
onChange: (value) => setAddQuota(value === "" || value == null ? "" : String(value)),
|
|
33811
33938
|
disabled: isDisabled || isRunning
|
|
33812
33939
|
}
|
|
33813
|
-
), addRole === "evaluate" && /* @__PURE__ */
|
|
33940
|
+
), addRole === "evaluate" && /* @__PURE__ */ React319.createElement(MaxAmountsInput, { value: addMaxAmounts, onChange: setAddMaxAmounts, disabled: isDisabled || isRunning }), !validation.ok && validation.error && activeOp === "add" && /* @__PURE__ */ React319.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, validation.error)), !configMissing && section === "bids" && /* @__PURE__ */ React319.createElement(BidInboxSection, { deedDid, collectionId, adminAddress, isDisabled, handlersRef, grantees: listGrantees }), isDisabled && /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, "This block is currently disabled."));
|
|
33814
33941
|
};
|
|
33815
33942
|
var BidInboxSection = ({ deedDid, collectionId, adminAddress, isDisabled, handlersRef, grantees }) => {
|
|
33816
|
-
const [bids, setBids] =
|
|
33817
|
-
const [loading, setLoading] =
|
|
33818
|
-
const [error, setError] =
|
|
33819
|
-
const [selectedBidId, setSelectedBidId] =
|
|
33820
|
-
const [decision, setDecision] =
|
|
33821
|
-
const [rejectReason, setRejectReason] =
|
|
33822
|
-
const [approveQuota, setApproveQuota] =
|
|
33823
|
-
const [approveMaxAmounts, setApproveMaxAmounts] =
|
|
33824
|
-
const [submitting, setSubmitting] =
|
|
33825
|
-
const [profilesByDid, setProfilesByDid] =
|
|
33943
|
+
const [bids, setBids] = useState168([]);
|
|
33944
|
+
const [loading, setLoading] = useState168(false);
|
|
33945
|
+
const [error, setError] = useState168(null);
|
|
33946
|
+
const [selectedBidId, setSelectedBidId] = useState168("");
|
|
33947
|
+
const [decision, setDecision] = useState168("");
|
|
33948
|
+
const [rejectReason, setRejectReason] = useState168("");
|
|
33949
|
+
const [approveQuota, setApproveQuota] = useState168(String(DEFAULT_CONTRIBUTOR_QUOTA));
|
|
33950
|
+
const [approveMaxAmounts, setApproveMaxAmounts] = useState168(EMPTY_MAX_AMOUNTS);
|
|
33951
|
+
const [submitting, setSubmitting] = useState168(false);
|
|
33952
|
+
const [profilesByDid, setProfilesByDid] = useState168({});
|
|
33826
33953
|
const selectedBid = useMemo118(() => bids.find((b) => b.id === selectedBidId) || null, [bids, selectedBidId]);
|
|
33827
33954
|
const selectedBidIsEvaluator = useMemo118(() => {
|
|
33828
33955
|
const role = String(selectedBid?.role || "").toLowerCase();
|
|
@@ -33971,7 +34098,7 @@ var BidInboxSection = ({ deedDid, collectionId, adminAddress, isDisabled, handle
|
|
|
33971
34098
|
}
|
|
33972
34099
|
] : []
|
|
33973
34100
|
];
|
|
33974
|
-
return /* @__PURE__ */
|
|
34101
|
+
return /* @__PURE__ */ React319.createElement(Stack211, { gap: "md" }, /* @__PURE__ */ React319.createElement(Group116, { gap: "xs", align: "center" }, /* @__PURE__ */ React319.createElement(ActionIcon46, { variant: "subtle", color: "gray", size: "sm", onClick: () => setSelectedBidId("") }, /* @__PURE__ */ React319.createElement(IconArrowLeft10, { size: 16 })), /* @__PURE__ */ React319.createElement(Text199, { fw: 500, size: "sm", truncate: true, style: { flex: 1, minWidth: 0 } }, "Bid #", selectedBid.id), /* @__PURE__ */ React319.createElement(DownloadCsvButton, { onDownload: () => downloadBidsCsv([selectedBid], `bid-${selectedBid.id}.csv`), label: "Download bid CSV" })), /* @__PURE__ */ React319.createElement(Stack211, { gap: 4 }, /* @__PURE__ */ React319.createElement(Text199, { size: "sm", fw: 600, truncate: true }, displayName), /* @__PURE__ */ React319.createElement(Group116, { gap: "xs" }, /* @__PURE__ */ React319.createElement(Badge52, { size: "xs", variant: "light", color: getRoleColor3(selectedBid.role) }, getBidRoleLabel(selectedBid.role)), /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, truncateAddress4(selectedBid.address)))), /* @__PURE__ */ React319.createElement(CollapsibleSection, { title: "Inputs" }, bidData && typeof bidData === "object" && Object.keys(bidData).length > 0 ? /* @__PURE__ */ React319.createElement(ReadableKeyValues, { data: bidData }) : /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, "No input data available.")), /* @__PURE__ */ React319.createElement(
|
|
33975
34102
|
BaseSelect,
|
|
33976
34103
|
{
|
|
33977
34104
|
label: "Decision",
|
|
@@ -33984,7 +34111,7 @@ var BidInboxSection = ({ deedDid, collectionId, adminAddress, isDisabled, handle
|
|
|
33984
34111
|
],
|
|
33985
34112
|
disabled: isDisabled || submitting
|
|
33986
34113
|
}
|
|
33987
|
-
), decision === "approve" && /* @__PURE__ */
|
|
34114
|
+
), decision === "approve" && /* @__PURE__ */ React319.createElement(React319.Fragment, null, /* @__PURE__ */ React319.createElement(
|
|
33988
34115
|
BaseNumberInput,
|
|
33989
34116
|
{
|
|
33990
34117
|
label: "Agent quota (max claims, at least 1)",
|
|
@@ -33993,7 +34120,7 @@ var BidInboxSection = ({ deedDid, collectionId, adminAddress, isDisabled, handle
|
|
|
33993
34120
|
onChange: (value) => setApproveQuota(value === "" || value == null ? "" : String(value)),
|
|
33994
34121
|
disabled: isDisabled || submitting
|
|
33995
34122
|
}
|
|
33996
|
-
), isEvaluator && /* @__PURE__ */
|
|
34123
|
+
), isEvaluator && /* @__PURE__ */ React319.createElement(MaxAmountsInput, { value: approveMaxAmounts, onChange: setApproveMaxAmounts, disabled: isDisabled || submitting }), /* @__PURE__ */ React319.createElement(ActionDiffView, { diffs: approvalDiffs })), decision === "reject" && /* @__PURE__ */ React319.createElement(
|
|
33997
34124
|
BaseTextInput,
|
|
33998
34125
|
{
|
|
33999
34126
|
label: `Reason${isEvaluator ? " *" : ""}`,
|
|
@@ -34002,7 +34129,7 @@ var BidInboxSection = ({ deedDid, collectionId, adminAddress, isDisabled, handle
|
|
|
34002
34129
|
onChange: (e) => setRejectReason(e.currentTarget.value),
|
|
34003
34130
|
disabled: isDisabled || submitting
|
|
34004
34131
|
}
|
|
34005
|
-
), error && /* @__PURE__ */
|
|
34132
|
+
), error && /* @__PURE__ */ React319.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, error), /* @__PURE__ */ React319.createElement(
|
|
34006
34133
|
Button67,
|
|
34007
34134
|
{
|
|
34008
34135
|
onClick: submitDecision,
|
|
@@ -34013,11 +34140,11 @@ var BidInboxSection = ({ deedDid, collectionId, adminAddress, isDisabled, handle
|
|
|
34013
34140
|
decision === "reject" ? "Reject bid" : "Approve bid"
|
|
34014
34141
|
));
|
|
34015
34142
|
}
|
|
34016
|
-
return /* @__PURE__ */
|
|
34143
|
+
return /* @__PURE__ */ React319.createElement(Stack211, { gap: "sm" }, /* @__PURE__ */ React319.createElement(Group116, { justify: "space-between", align: "center" }, /* @__PURE__ */ React319.createElement(Text199, { size: "sm", fw: 600 }, "Incoming bids"), /* @__PURE__ */ React319.createElement(Group116, { gap: 4 }, /* @__PURE__ */ React319.createElement(DownloadCsvButton, { onDownload: handleDownloadBidsCsv, disabled: loading || bids.length === 0, label: "Download bids CSV" }), /* @__PURE__ */ React319.createElement(ActionIcon46, { variant: "subtle", color: "gray", size: "sm", onClick: refreshBids, disabled: loading }, /* @__PURE__ */ React319.createElement(IconRefresh9, { size: 16 })))), /* @__PURE__ */ React319.createElement(Divider22, { color: "color-mix(in srgb, var(--mantine-color-text) 6%, transparent)" }), loading && /* @__PURE__ */ React319.createElement(Group116, { gap: "xs", justify: "center", py: "sm" }, /* @__PURE__ */ React319.createElement(Loader61, { size: "xs" }), /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, "Loading bids\u2026")), !loading && bids.length === 0 && /* @__PURE__ */ React319.createElement(Text199, { size: "sm", c: "dimmed", ta: "center", py: "sm" }, "No bids available for this collection."), bids.map((bid) => {
|
|
34017
34144
|
const profile = profilesByDid[bid.did];
|
|
34018
34145
|
const displayName = profile?.displayname || bid.did || bid.address;
|
|
34019
|
-
return /* @__PURE__ */
|
|
34020
|
-
}), error && /* @__PURE__ */
|
|
34146
|
+
return /* @__PURE__ */ React319.createElement(ListItemContainer, { key: bid.id, isChecked: false, onClick: () => setSelectedBidId(bid.id) }, /* @__PURE__ */ React319.createElement(Stack211, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React319.createElement(Text199, { fw: 500, size: "sm", truncate: true }, displayName), /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed", truncate: true }, truncateAddress4(bid.address))), /* @__PURE__ */ React319.createElement(Stack211, { gap: 0, align: "flex-end", style: { flexShrink: 0 } }, /* @__PURE__ */ React319.createElement(Badge52, { size: "xs", variant: "light", color: getRoleColor3(bid.role) }, getBidRoleLabel(bid.role)), /* @__PURE__ */ React319.createElement(Text199, { size: "xs", c: "dimmed" }, getTimeAgo3(bid.created || ""))));
|
|
34147
|
+
}), error && /* @__PURE__ */ React319.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, error));
|
|
34021
34148
|
};
|
|
34022
34149
|
|
|
34023
34150
|
// src/mantine/blocks/action/actionTypes/collectionUsers/index.ts
|
|
@@ -34044,8 +34171,8 @@ registerActionTypeUI("qi/collection.users", {
|
|
|
34044
34171
|
import { IconChecks as IconChecks4 } from "@tabler/icons-react";
|
|
34045
34172
|
|
|
34046
34173
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/EvaluateClaimConfig.tsx
|
|
34047
|
-
import
|
|
34048
|
-
import { Alert as Alert49, Button as Button68, Group as
|
|
34174
|
+
import React320, { useCallback as useCallback112, useEffect as useEffect114, useMemo as useMemo119, useRef as useRef43, useState as useState169 } from "react";
|
|
34175
|
+
import { Alert as Alert49, Button as Button68, Group as Group117, Loader as Loader62, Stack as Stack212, Switch as Switch12, Text as Text200 } from "@mantine/core";
|
|
34049
34176
|
|
|
34050
34177
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/types.ts
|
|
34051
34178
|
var EMPTY_XERO_INVOICE_DEFAULTS = {
|
|
@@ -34097,10 +34224,10 @@ function serializeEvaluateClaimActionInputs(inputs) {
|
|
|
34097
34224
|
var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
34098
34225
|
const t = useTranslate();
|
|
34099
34226
|
const handlers = useBlocknoteHandlers();
|
|
34100
|
-
const [local, setLocal] =
|
|
34101
|
-
const [collections, setCollections] =
|
|
34102
|
-
const [loadingCollections, setLoadingCollections] =
|
|
34103
|
-
const [error, setError] =
|
|
34227
|
+
const [local, setLocal] = useState169(() => parseEvaluateClaimActionInputs(inputs));
|
|
34228
|
+
const [collections, setCollections] = useState169([]);
|
|
34229
|
+
const [loadingCollections, setLoadingCollections] = useState169(false);
|
|
34230
|
+
const [error, setError] = useState169(null);
|
|
34104
34231
|
const localRef = useRef43(local);
|
|
34105
34232
|
useEffect114(() => {
|
|
34106
34233
|
localRef.current = local;
|
|
@@ -34119,8 +34246,8 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
34119
34246
|
},
|
|
34120
34247
|
[onInputsChange]
|
|
34121
34248
|
);
|
|
34122
|
-
const [schemaLoading, setSchemaLoading] =
|
|
34123
|
-
const [schemaError, setSchemaError] =
|
|
34249
|
+
const [schemaLoading, setSchemaLoading] = useState169(false);
|
|
34250
|
+
const [schemaError, setSchemaError] = useState169(null);
|
|
34124
34251
|
const fetchGenRef = useRef43(0);
|
|
34125
34252
|
const materialiseSurveySchema = useCallback112(
|
|
34126
34253
|
async (deedDid, collectionId) => {
|
|
@@ -34205,7 +34332,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
34205
34332
|
},
|
|
34206
34333
|
[update]
|
|
34207
34334
|
);
|
|
34208
|
-
return /* @__PURE__ */
|
|
34335
|
+
return /* @__PURE__ */ React320.createElement(Stack212, { gap: "md" }, /* @__PURE__ */ React320.createElement(
|
|
34209
34336
|
DataInput,
|
|
34210
34337
|
{
|
|
34211
34338
|
label: "DID",
|
|
@@ -34221,7 +34348,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
34221
34348
|
currentBlockId: blockId,
|
|
34222
34349
|
required: true
|
|
34223
34350
|
}
|
|
34224
|
-
), /* @__PURE__ */
|
|
34351
|
+
), /* @__PURE__ */ React320.createElement(
|
|
34225
34352
|
Button68,
|
|
34226
34353
|
{
|
|
34227
34354
|
size: "xs",
|
|
@@ -34232,7 +34359,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
34232
34359
|
}
|
|
34233
34360
|
},
|
|
34234
34361
|
t("actionTypes.shared.useCurrentEntity", { defaultValue: "Use Current {{entity}}", entity: "Entity" })
|
|
34235
|
-
), /* @__PURE__ */
|
|
34362
|
+
), /* @__PURE__ */ React320.createElement(BasePrimaryButton, { onClick: fetchCollections, disabled: !local.deedDid.trim() || loadingCollections }, loadingCollections ? /* @__PURE__ */ React320.createElement(Loader62, { size: "xs", color: "dark" }) : t("actionTypes.shared.getCollections", { defaultValue: "Get {{collections}}", collections: "Collections" })), error && /* @__PURE__ */ React320.createElement(Alert49, { color: "red", styles: actionAlertStyles }, error), collectionOptions.length > 0 && /* @__PURE__ */ React320.createElement(
|
|
34236
34363
|
BaseSelect,
|
|
34237
34364
|
{
|
|
34238
34365
|
label: "Claim Collection",
|
|
@@ -34246,10 +34373,10 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
34246
34373
|
required: true,
|
|
34247
34374
|
searchable: true
|
|
34248
34375
|
}
|
|
34249
|
-
), local.collectionId && /* @__PURE__ */
|
|
34376
|
+
), local.collectionId && /* @__PURE__ */ React320.createElement(Stack212, { gap: 4 }, schemaLoading && /* @__PURE__ */ React320.createElement(Text200, { size: "xs", c: "dimmed" }, t("actionTypes.shared.loadingSurveySchema", { defaultValue: "Loading survey schema..." })), !schemaLoading && local.surveyAnswersSchema.length > 0 && /* @__PURE__ */ React320.createElement(Text200, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.config.outputsPrefix", { defaultValue: "Outputs" }), " ", /* @__PURE__ */ React320.createElement("code", null, "surveyAnswers"), " ", t("actionTypes.evaluateClaim.config.outputsWith", { defaultValue: "with" }), " ", local.surveyAnswersSchema.length, " ", t("actionTypes.evaluateClaim.config.typedField", {
|
|
34250
34377
|
count: local.surveyAnswersSchema.length,
|
|
34251
34378
|
defaultValue: local.surveyAnswersSchema.length === 1 ? "typed field" : "typed fields"
|
|
34252
|
-
}), ". ", t("actionTypes.evaluateClaim.config.listenerBlocksCanReference", { defaultValue: "Listener blocks can reference" }), " ", /* @__PURE__ */
|
|
34379
|
+
}), ". ", t("actionTypes.evaluateClaim.config.listenerBlocksCanReference", { defaultValue: "Listener blocks can reference" }), " ", /* @__PURE__ */ React320.createElement("code", null, "$", "{", "thisBlock.output.surveyAnswers.<field>", "}"), "."), schemaError && /* @__PURE__ */ React320.createElement(Alert49, { color: "yellow", styles: actionAlertStyles }, schemaError)), local.collectionId && /* @__PURE__ */ React320.createElement(Stack212, { gap: "xs" }, /* @__PURE__ */ React320.createElement(Text200, { size: "sm", fw: 600, mt: "md" }, t("actionTypes.evaluateClaim.config.xeroSectionTitle", { defaultValue: "{{xero}} bookkeeping (optional)", xero: "Xero" })), /* @__PURE__ */ React320.createElement(
|
|
34253
34380
|
Switch12,
|
|
34254
34381
|
{
|
|
34255
34382
|
label: t("actionTypes.evaluateClaim.config.xeroOracleInvoiceOnApprove", { defaultValue: "{{xero}} oracle invoice on approval", xero: "Xero" }),
|
|
@@ -34260,9 +34387,9 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
34260
34387
|
checked: local.xeroOracleInvoiceOnApprove,
|
|
34261
34388
|
onChange: (event) => update({ xeroOracleInvoiceOnApprove: event.currentTarget.checked })
|
|
34262
34389
|
}
|
|
34263
|
-
), local.xeroOracleInvoiceOnApprove && /* @__PURE__ */
|
|
34390
|
+
), local.xeroOracleInvoiceOnApprove && /* @__PURE__ */ React320.createElement(Stack212, { gap: "xs", mt: 4 }, /* @__PURE__ */ React320.createElement(Text200, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.config.xeroInvoiceDefaultsDescription", {
|
|
34264
34391
|
defaultValue: "Optional invoice defaults pinned into the oracle payload. Anything left empty is extracted from the claim material; Status defaults to Draft."
|
|
34265
|
-
})), /* @__PURE__ */
|
|
34392
|
+
})), /* @__PURE__ */ React320.createElement(Group117, { grow: true }, /* @__PURE__ */ React320.createElement(
|
|
34266
34393
|
BaseSelect,
|
|
34267
34394
|
{
|
|
34268
34395
|
label: t("actionTypes.evaluateClaim.config.xeroInvoiceType", { defaultValue: "Type" }),
|
|
@@ -34273,7 +34400,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
34273
34400
|
value: local.xeroInvoiceDefaults.Type || "ACCREC",
|
|
34274
34401
|
onChange: (value) => updateXeroDefaults({ Type: value || "ACCREC" })
|
|
34275
34402
|
}
|
|
34276
|
-
), /* @__PURE__ */
|
|
34403
|
+
), /* @__PURE__ */ React320.createElement(
|
|
34277
34404
|
BaseSelect,
|
|
34278
34405
|
{
|
|
34279
34406
|
label: t("actionTypes.evaluateClaim.config.xeroInvoiceStatus", { defaultValue: "Status" }),
|
|
@@ -34284,7 +34411,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
34284
34411
|
value: local.xeroInvoiceDefaults.Status || "DRAFT",
|
|
34285
34412
|
onChange: (value) => updateXeroDefaults({ Status: value || "DRAFT" })
|
|
34286
34413
|
}
|
|
34287
|
-
)), /* @__PURE__ */
|
|
34414
|
+
)), /* @__PURE__ */ React320.createElement(Group117, { grow: true }, /* @__PURE__ */ React320.createElement(
|
|
34288
34415
|
DataInput,
|
|
34289
34416
|
{
|
|
34290
34417
|
label: t("actionTypes.evaluateClaim.config.xeroCurrencyCode", { defaultValue: "Currency (optional)" }),
|
|
@@ -34294,7 +34421,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
34294
34421
|
editorDocument: editor?.document || [],
|
|
34295
34422
|
currentBlockId: blockId
|
|
34296
34423
|
}
|
|
34297
|
-
), /* @__PURE__ */
|
|
34424
|
+
), /* @__PURE__ */ React320.createElement(
|
|
34298
34425
|
DataInput,
|
|
34299
34426
|
{
|
|
34300
34427
|
label: t("actionTypes.evaluateClaim.config.xeroTenantId", { defaultValue: "{{xero}} org (optional)", xero: "Xero" }),
|
|
@@ -34303,7 +34430,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
34303
34430
|
editorDocument: editor?.document || [],
|
|
34304
34431
|
currentBlockId: blockId
|
|
34305
34432
|
}
|
|
34306
|
-
)), /* @__PURE__ */
|
|
34433
|
+
)), /* @__PURE__ */ React320.createElement(Group117, { grow: true }, /* @__PURE__ */ React320.createElement(
|
|
34307
34434
|
DataInput,
|
|
34308
34435
|
{
|
|
34309
34436
|
label: t("actionTypes.evaluateClaim.config.xeroContactId", { defaultValue: "Contact ID (optional)" }),
|
|
@@ -34316,7 +34443,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
34316
34443
|
editorDocument: editor?.document || [],
|
|
34317
34444
|
currentBlockId: blockId
|
|
34318
34445
|
}
|
|
34319
|
-
), /* @__PURE__ */
|
|
34446
|
+
), /* @__PURE__ */ React320.createElement(
|
|
34320
34447
|
DataInput,
|
|
34321
34448
|
{
|
|
34322
34449
|
label: t("actionTypes.evaluateClaim.config.xeroContactName", { defaultValue: "Contact name (optional)" }),
|
|
@@ -34325,7 +34452,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
34325
34452
|
editorDocument: editor?.document || [],
|
|
34326
34453
|
currentBlockId: blockId
|
|
34327
34454
|
}
|
|
34328
|
-
)), /* @__PURE__ */
|
|
34455
|
+
)), /* @__PURE__ */ React320.createElement(Group117, { grow: true }, /* @__PURE__ */ React320.createElement(
|
|
34329
34456
|
DataInput,
|
|
34330
34457
|
{
|
|
34331
34458
|
label: t("actionTypes.evaluateClaim.config.xeroAccountCode", { defaultValue: "Account code (optional)" }),
|
|
@@ -34342,14 +34469,14 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
34342
34469
|
};
|
|
34343
34470
|
|
|
34344
34471
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/EvaluateClaimFlowDetail.tsx
|
|
34345
|
-
import React323, { useCallback as useCallback114, useEffect as useEffect116, useMemo as useMemo121, useRef as useRef45, useState as
|
|
34346
|
-
import { ActionIcon as ActionIcon48, Box as Box62, Button as Button69, Checkbox as Checkbox14, Divider as Divider23, Group as Group120, Loader as Loader64, ScrollArea as ScrollArea8, Stack as Stack215, Text as Text203, UnstyledButton as
|
|
34472
|
+
import React323, { useCallback as useCallback114, useEffect as useEffect116, useMemo as useMemo121, useRef as useRef45, useState as useState172 } from "react";
|
|
34473
|
+
import { ActionIcon as ActionIcon48, Box as Box62, Button as Button69, Checkbox as Checkbox14, Divider as Divider23, Group as Group120, Loader as Loader64, ScrollArea as ScrollArea8, Stack as Stack215, Text as Text203, UnstyledButton as UnstyledButton6 } from "@mantine/core";
|
|
34347
34474
|
import { IconArrowLeft as IconArrowLeft11, IconCheck as IconCheck26, IconFilter as IconFilter2 } from "@tabler/icons-react";
|
|
34348
34475
|
import { SurveyModel as SurveyModel11 } from "@ixo/surveys";
|
|
34349
34476
|
|
|
34350
34477
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/FlowManagerAdvisorySections.tsx
|
|
34351
|
-
import
|
|
34352
|
-
import { ActionIcon as ActionIcon47, Badge as Badge53, Group as
|
|
34478
|
+
import React321, { useState as useState170 } from "react";
|
|
34479
|
+
import { ActionIcon as ActionIcon47, Badge as Badge53, Group as Group118, Stack as Stack213, Text as Text201, Tooltip as Tooltip30 } from "@mantine/core";
|
|
34353
34480
|
import { IconCheck as IconCheck25, IconLink as IconLink5, IconPencil as IconPencil2, IconSparkles as IconSparkles7, IconUser as IconUser14, IconX as IconX18 } from "@tabler/icons-react";
|
|
34354
34481
|
|
|
34355
34482
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/evaluationReportModel.ts
|
|
@@ -34444,12 +34571,12 @@ function ProvenanceHint({ provenance }) {
|
|
|
34444
34571
|
const t = useTranslate();
|
|
34445
34572
|
if (provenance !== "derived" && provenance !== "inferred" && provenance !== "human") return null;
|
|
34446
34573
|
const hint = provenance === "human" ? { Icon: IconUser14, label: t("actionTypes.evaluateClaim.flow.flowManager.provenance.human", { defaultValue: "Set by human" }) } : provenance === "derived" ? { Icon: IconLink5, label: t("actionTypes.evaluateClaim.flow.flowManager.provenance.derived", { defaultValue: "Derived from inputs" }) } : { Icon: IconSparkles7, label: t("actionTypes.evaluateClaim.flow.flowManager.provenance.inferred", { defaultValue: "Inferred by LLM" }) };
|
|
34447
|
-
return /* @__PURE__ */
|
|
34574
|
+
return /* @__PURE__ */ React321.createElement(Tooltip30, { label: hint.label, withArrow: true }, /* @__PURE__ */ React321.createElement("span", { style: { display: "inline-flex", alignItems: "center" }, "aria-label": hint.label }, icon(hint.Icon, 12, "var(--mantine-color-dimmed)")));
|
|
34448
34575
|
}
|
|
34449
34576
|
var FlowManagerContextSection = ({ record, onOverride, disabled }) => {
|
|
34450
34577
|
const t = useTranslate();
|
|
34451
|
-
const [editingTheme, setEditingTheme] =
|
|
34452
|
-
const [themeDraft, setThemeDraft] =
|
|
34578
|
+
const [editingTheme, setEditingTheme] = useState170(false);
|
|
34579
|
+
const [themeDraft, setThemeDraft] = useState170("");
|
|
34453
34580
|
if (!record) return null;
|
|
34454
34581
|
const values = record.values && typeof record.values === "object" ? record.values : {};
|
|
34455
34582
|
const provenance = record.fieldProvenance && typeof record.fieldProvenance === "object" ? record.fieldProvenance : {};
|
|
@@ -34471,7 +34598,7 @@ var FlowManagerContextSection = ({ record, onOverride, disabled }) => {
|
|
|
34471
34598
|
setEditingTheme(false);
|
|
34472
34599
|
setThemeDraft("");
|
|
34473
34600
|
};
|
|
34474
|
-
return /* @__PURE__ */
|
|
34601
|
+
return /* @__PURE__ */ React321.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.flowManager.understanding", { defaultValue: "Flow Manager understanding" }) }, /* @__PURE__ */ React321.createElement(Stack213, { gap: "xs" }, (theme || editingTheme) && /* @__PURE__ */ React321.createElement(Group118, { gap: "xs", align: "center", wrap: "nowrap" }, /* @__PURE__ */ React321.createElement(Text201, { size: "xs", c: "dimmed", style: { flexShrink: 0 } }, t("actionTypes.evaluateClaim.flow.flowManager.theme", { defaultValue: "Theme" })), editingTheme ? /* @__PURE__ */ React321.createElement(React321.Fragment, null, /* @__PURE__ */ React321.createElement("span", { ref: (node) => node?.querySelector("input")?.focus(), style: { flex: 1, display: "flex", minWidth: 0 } }, /* @__PURE__ */ React321.createElement(
|
|
34475
34602
|
BaseTextInput,
|
|
34476
34603
|
{
|
|
34477
34604
|
size: "xs",
|
|
@@ -34484,7 +34611,7 @@ var FlowManagerContextSection = ({ record, onOverride, disabled }) => {
|
|
|
34484
34611
|
style: { flex: 1 },
|
|
34485
34612
|
"aria-label": t("actionTypes.evaluateClaim.flow.flowManager.themeEditLabel", { defaultValue: "Edit theme" })
|
|
34486
34613
|
}
|
|
34487
|
-
)), /* @__PURE__ */
|
|
34614
|
+
)), /* @__PURE__ */ React321.createElement(
|
|
34488
34615
|
ActionIcon47,
|
|
34489
34616
|
{
|
|
34490
34617
|
variant: "subtle",
|
|
@@ -34494,7 +34621,7 @@ var FlowManagerContextSection = ({ record, onOverride, disabled }) => {
|
|
|
34494
34621
|
"aria-label": t("actionTypes.evaluateClaim.flow.flowManager.saveTheme", { defaultValue: "Save theme" })
|
|
34495
34622
|
},
|
|
34496
34623
|
icon(IconCheck25, 14)
|
|
34497
|
-
), /* @__PURE__ */
|
|
34624
|
+
), /* @__PURE__ */ React321.createElement(
|
|
34498
34625
|
ActionIcon47,
|
|
34499
34626
|
{
|
|
34500
34627
|
variant: "subtle",
|
|
@@ -34504,7 +34631,7 @@ var FlowManagerContextSection = ({ record, onOverride, disabled }) => {
|
|
|
34504
34631
|
"aria-label": t("actionTypes.evaluateClaim.flow.flowManager.cancelThemeEdit", { defaultValue: "Cancel theme edit" })
|
|
34505
34632
|
},
|
|
34506
34633
|
icon(IconX18, 14)
|
|
34507
|
-
)) : /* @__PURE__ */
|
|
34634
|
+
)) : /* @__PURE__ */ React321.createElement(React321.Fragment, null, /* @__PURE__ */ React321.createElement(Text201, { size: "sm", style: { flex: 1, minWidth: 0 }, truncate: true }, theme), /* @__PURE__ */ React321.createElement(ProvenanceHint, { provenance: provenance.theme }), !disabled && /* @__PURE__ */ React321.createElement(
|
|
34508
34635
|
ActionIcon47,
|
|
34509
34636
|
{
|
|
34510
34637
|
variant: "subtle",
|
|
@@ -34514,7 +34641,7 @@ var FlowManagerContextSection = ({ record, onOverride, disabled }) => {
|
|
|
34514
34641
|
"aria-label": t("actionTypes.evaluateClaim.flow.flowManager.editTheme", { defaultValue: "Edit theme" })
|
|
34515
34642
|
},
|
|
34516
34643
|
icon(IconPencil2, 14)
|
|
34517
|
-
))), topics.length > 0 && /* @__PURE__ */
|
|
34644
|
+
))), topics.length > 0 && /* @__PURE__ */ React321.createElement(Group118, { gap: "xs", align: "center" }, /* @__PURE__ */ React321.createElement(Text201, { size: "xs", c: "dimmed", style: { flexShrink: 0 } }, t("actionTypes.evaluateClaim.flow.flowManager.topics", { defaultValue: "Topics" })), /* @__PURE__ */ React321.createElement(Group118, { gap: 4 }, topics.map((topic) => /* @__PURE__ */ React321.createElement(Badge53, { key: topic, variant: "light", color: "gray", size: "sm", style: { textTransform: "none" } }, topic))), /* @__PURE__ */ React321.createElement(ProvenanceHint, { provenance: provenance.topics })), summary && /* @__PURE__ */ React321.createElement(Group118, { gap: "xs", align: "flex-start", wrap: "nowrap" }, /* @__PURE__ */ React321.createElement(Text201, { size: "xs", c: "dimmed", style: { flexShrink: 0 } }, t("actionTypes.evaluateClaim.flow.flowManager.summary", { defaultValue: "Summary" })), /* @__PURE__ */ React321.createElement(Text201, { size: "sm", style: { flex: 1, minWidth: 0 } }, summary), /* @__PURE__ */ React321.createElement(ProvenanceHint, { provenance: provenance.summary }))));
|
|
34518
34645
|
};
|
|
34519
34646
|
function truncateClaimId(value) {
|
|
34520
34647
|
if (value.length <= 17) return value;
|
|
@@ -34525,18 +34652,18 @@ var EvaluationReportSection = ({ runtime, selectedClaimId }) => {
|
|
|
34525
34652
|
const model = buildEvaluationReportModel(runtime);
|
|
34526
34653
|
if (!model) return null;
|
|
34527
34654
|
if (selectedClaimId && model.claimId && model.claimId !== selectedClaimId) return null;
|
|
34528
|
-
const headerClaimBadge = !selectedClaimId && model.claimId ? /* @__PURE__ */
|
|
34655
|
+
const headerClaimBadge = !selectedClaimId && model.claimId ? /* @__PURE__ */ React321.createElement(Text201, { size: "xs", c: "dimmed", title: model.claimId }, t("actionTypes.evaluateClaim.flow.flowManager.reportClaimBadge", {
|
|
34529
34656
|
id: truncateClaimId(model.claimId),
|
|
34530
34657
|
defaultValue: `Claim ${truncateClaimId(model.claimId)}`
|
|
34531
34658
|
})) : void 0;
|
|
34532
|
-
return /* @__PURE__ */
|
|
34659
|
+
return /* @__PURE__ */ React321.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.flowManager.evaluationReport", { defaultValue: "Evaluation report" }), badge: headerClaimBadge }, /* @__PURE__ */ React321.createElement(Stack213, { gap: "xs" }, model.recommendation && /* @__PURE__ */ React321.createElement(Group118, { gap: "xs", align: "center" }, /* @__PURE__ */ React321.createElement(Text201, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.flowManager.recommendation", { defaultValue: "Recommendation" })), /* @__PURE__ */ React321.createElement(Badge53, { variant: "light", color: recommendationColor(model.recommendation), size: "sm" }, model.recommendation)), model.completeness && /* @__PURE__ */ React321.createElement(Stack213, { gap: 2 }, (model.completeness.answered !== null || model.completeness.total !== null) && /* @__PURE__ */ React321.createElement(Text201, { size: "sm" }, t("actionTypes.evaluateClaim.flow.flowManager.completeness", {
|
|
34533
34660
|
answered: model.completeness.answered ?? "?",
|
|
34534
34661
|
total: model.completeness.total ?? "?",
|
|
34535
34662
|
defaultValue: `Completeness: ${model.completeness.answered ?? "?"}/${model.completeness.total ?? "?"} answered`
|
|
34536
|
-
})), model.completeness.missingRequired.length > 0 && /* @__PURE__ */
|
|
34663
|
+
})), model.completeness.missingRequired.length > 0 && /* @__PURE__ */ React321.createElement(Text201, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.flowManager.missingRequired", {
|
|
34537
34664
|
fields: model.completeness.missingRequired.join(", "),
|
|
34538
34665
|
defaultValue: `Missing required: ${model.completeness.missingRequired.join(", ")}`
|
|
34539
|
-
}))), model.findings.length > 0 && /* @__PURE__ */
|
|
34666
|
+
}))), model.findings.length > 0 && /* @__PURE__ */ React321.createElement(Stack213, { gap: 4 }, /* @__PURE__ */ React321.createElement(Text201, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.flowManager.findings", { defaultValue: "Findings" })), model.findings.map((finding, index) => /* @__PURE__ */ React321.createElement(Group118, { key: `${finding.severity}-${finding.issue}-${index}`, gap: "xs", align: "flex-start", wrap: "nowrap" }, finding.severity && /* @__PURE__ */ React321.createElement(Badge53, { variant: "light", color: findingSeverityColor(finding.severity), size: "sm", style: { flexShrink: 0 } }, finding.severity), /* @__PURE__ */ React321.createElement(Text201, { size: "sm", style: { flex: 1, minWidth: 0 } }, finding.issue)))), model.rationale && /* @__PURE__ */ React321.createElement(Group118, { gap: "xs", align: "flex-start", wrap: "nowrap" }, /* @__PURE__ */ React321.createElement(Text201, { size: "xs", c: "dimmed", style: { flexShrink: 0 } }, t("actionTypes.evaluateClaim.flow.flowManager.rationale", { defaultValue: "Rationale" })), /* @__PURE__ */ React321.createElement(Text201, { size: "sm", style: { flex: 1, minWidth: 0 } }, model.rationale)), model.narrative && /* @__PURE__ */ React321.createElement(Text201, { size: "sm", c: "dimmed" }, model.narrative), /* @__PURE__ */ React321.createElement(Text201, { size: "xs", c: "dimmed", title: model.invocationId }, t("actionTypes.evaluateClaim.flow.flowManager.reportAttribution", {
|
|
34540
34667
|
oracleDid: model.oracleDid,
|
|
34541
34668
|
receivedAt: new Date(model.receivedAt).toLocaleString(),
|
|
34542
34669
|
defaultValue: `By ${model.oracleDid} \xB7 ${new Date(model.receivedAt).toLocaleString()}`
|
|
@@ -34544,69 +34671,9 @@ var EvaluationReportSection = ({ runtime, selectedClaimId }) => {
|
|
|
34544
34671
|
};
|
|
34545
34672
|
|
|
34546
34673
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/ClaimAttachments.tsx
|
|
34547
|
-
import React322, { useCallback as useCallback113, useEffect as useEffect115, useMemo as useMemo120, useRef as useRef44, useState as
|
|
34548
|
-
import { Box as Box61, Group as Group119, Loader as Loader63, SimpleGrid as SimpleGrid4, Stack as Stack214, Text as Text202, Tooltip as Tooltip31, UnstyledButton as
|
|
34674
|
+
import React322, { useCallback as useCallback113, useEffect as useEffect115, useMemo as useMemo120, useRef as useRef44, useState as useState171 } from "react";
|
|
34675
|
+
import { Box as Box61, Group as Group119, Loader as Loader63, SimpleGrid as SimpleGrid4, Stack as Stack214, Text as Text202, Tooltip as Tooltip31, UnstyledButton as UnstyledButton5 } from "@mantine/core";
|
|
34549
34676
|
import { IconFile as IconFile5, IconFileText as IconFileText6, IconMusic, IconPhoto as IconPhoto5, IconVideo } from "@tabler/icons-react";
|
|
34550
|
-
|
|
34551
|
-
// src/mantine/components/MediaPreviewModal.tsx
|
|
34552
|
-
import React321 from "react";
|
|
34553
|
-
import { Anchor, Box as Box60, Center as Center13, Group as Group118, Modal as Modal3, Stack as Stack213, Text as Text201 } from "@mantine/core";
|
|
34554
|
-
import { useMediaQuery as useMediaQuery2 } from "@mantine/hooks";
|
|
34555
|
-
import { IconDownload as IconDownload5 } from "@tabler/icons-react";
|
|
34556
|
-
function detectKind(type, name) {
|
|
34557
|
-
const t = (type || "").toLowerCase();
|
|
34558
|
-
const ext = (name || "").toLowerCase().split(".").pop() || "";
|
|
34559
|
-
if (t.startsWith("image/") || ["png", "jpg", "jpeg", "gif", "webp", "svg", "bmp"].includes(ext)) return "image";
|
|
34560
|
-
if (t.startsWith("video/") || ["mp4", "webm", "mov", "mkv"].includes(ext)) return "video";
|
|
34561
|
-
if (t.startsWith("audio/") || ["mp3", "wav", "ogg", "m4a", "flac"].includes(ext)) return "audio";
|
|
34562
|
-
if (t === "application/pdf" || ext === "pdf") return "pdf";
|
|
34563
|
-
return "other";
|
|
34564
|
-
}
|
|
34565
|
-
var MediaPreviewModal = ({ file, onClose }) => {
|
|
34566
|
-
const isMobile = useMediaQuery2("(max-width: 992px)");
|
|
34567
|
-
const opened = !!file;
|
|
34568
|
-
const kind = file ? detectKind(file.type, file.name) : "other";
|
|
34569
|
-
const wide = kind === "pdf" || kind === "image" || kind === "video";
|
|
34570
|
-
return /* @__PURE__ */ React321.createElement(
|
|
34571
|
-
Modal3,
|
|
34572
|
-
{
|
|
34573
|
-
opened,
|
|
34574
|
-
onClose,
|
|
34575
|
-
zIndex: 1e4,
|
|
34576
|
-
portalProps: typeof document !== "undefined" ? { target: document.body } : void 0,
|
|
34577
|
-
title: /* @__PURE__ */ React321.createElement(Group118, { gap: "sm", wrap: "nowrap", style: { width: "100%" } }, /* @__PURE__ */ React321.createElement(Text201, { fw: 500, size: "sm", truncate: true, style: { flex: 1, minWidth: 0 } }, file?.name || "Preview"), file && /* @__PURE__ */ React321.createElement(Anchor, { href: file.content, target: "_blank", rel: "noopener noreferrer", download: file.name, size: "xs", c: "dimmed", style: { flexShrink: 0 } }, /* @__PURE__ */ React321.createElement(Box60, { style: { display: "inline-flex", alignItems: "center", gap: 4 } }, icon(IconDownload5, 14), "Download"))),
|
|
34578
|
-
size: wide ? "95vw" : "xl",
|
|
34579
|
-
centered: true,
|
|
34580
|
-
styles: wide ? {
|
|
34581
|
-
content: {
|
|
34582
|
-
height: "95vh",
|
|
34583
|
-
maxWidth: isMobile ? "100%" : 1400,
|
|
34584
|
-
display: "flex",
|
|
34585
|
-
flexDirection: "column",
|
|
34586
|
-
overflow: "hidden"
|
|
34587
|
-
},
|
|
34588
|
-
body: {
|
|
34589
|
-
flex: 1,
|
|
34590
|
-
minHeight: 0,
|
|
34591
|
-
display: "flex",
|
|
34592
|
-
flexDirection: "column",
|
|
34593
|
-
overflow: "hidden"
|
|
34594
|
-
}
|
|
34595
|
-
} : void 0
|
|
34596
|
-
},
|
|
34597
|
-
file && /* @__PURE__ */ React321.createElement(Stack213, { gap: "sm", style: wide ? { flex: 1, minHeight: 0 } : void 0 }, kind === "image" && /* @__PURE__ */ React321.createElement(Center13, { style: { flex: 1, minHeight: 0, overflow: "hidden" } }, /* @__PURE__ */ React321.createElement(
|
|
34598
|
-
"img",
|
|
34599
|
-
{
|
|
34600
|
-
src: file.content,
|
|
34601
|
-
alt: file.name,
|
|
34602
|
-
style: { display: "block", maxWidth: "100%", maxHeight: "100%", width: "auto", height: "auto", objectFit: "contain", borderRadius: 8 }
|
|
34603
|
-
}
|
|
34604
|
-
)), kind === "video" && // eslint-disable-next-line jsx-a11y/media-has-caption
|
|
34605
|
-
/* @__PURE__ */ React321.createElement("video", { src: file.content, controls: true, style: { width: "100%", flex: 1, minHeight: 0, borderRadius: 8, background: "var(--mantine-color-neutralColor-3)" } }), kind === "audio" && /* @__PURE__ */ React321.createElement("audio", { src: file.content, controls: true, style: { width: "100%" } }), kind === "pdf" && /* @__PURE__ */ React321.createElement(Box60, { style: { flex: 1, minHeight: 0, borderRadius: 8, overflow: "hidden" } }, /* @__PURE__ */ React321.createElement("iframe", { src: file.content, title: file.name, style: { width: "100%", height: "100%", border: "none" } })), kind === "other" && /* @__PURE__ */ React321.createElement(Center13, { p: "xl" }, /* @__PURE__ */ React321.createElement(Text201, { size: "sm", c: "dimmed" }, "This file type can't be previewed inline. Use Download above.")))
|
|
34606
|
-
);
|
|
34607
|
-
};
|
|
34608
|
-
|
|
34609
|
-
// src/mantine/blocks/action/actionTypes/evaluateClaim/ClaimAttachments.tsx
|
|
34610
34677
|
function toMediaFile(raw) {
|
|
34611
34678
|
if (!raw) return null;
|
|
34612
34679
|
if (typeof raw === "object" && typeof raw.content === "string") {
|
|
@@ -34652,10 +34719,10 @@ function isImage(file) {
|
|
|
34652
34719
|
var ClaimAttachments = ({ surveyModel, credentialSubject, entityDid }) => {
|
|
34653
34720
|
const t = useTranslate();
|
|
34654
34721
|
const { fetchClaimMedia } = useBlocknoteHandlers();
|
|
34655
|
-
const [active, setActive] =
|
|
34656
|
-
const [resolved, setResolved] =
|
|
34657
|
-
const [pending, setPending] =
|
|
34658
|
-
const [openingKey, setOpeningKey] =
|
|
34722
|
+
const [active, setActive] = useState171(null);
|
|
34723
|
+
const [resolved, setResolved] = useState171({});
|
|
34724
|
+
const [pending, setPending] = useState171({});
|
|
34725
|
+
const [openingKey, setOpeningKey] = useState171(null);
|
|
34659
34726
|
const cacheRef = useRef44(/* @__PURE__ */ new Map());
|
|
34660
34727
|
const inflightRef = useRef44(/* @__PURE__ */ new Map());
|
|
34661
34728
|
useEffect115(() => {
|
|
@@ -34761,7 +34828,7 @@ var ClaimAttachments = ({ surveyModel, credentialSubject, entityDid }) => {
|
|
|
34761
34828
|
const displayUrl = resolved[item.content] || (!fetchClaimMedia ? item.content : "");
|
|
34762
34829
|
const isFetching = !!pending[item.content] || openingKey === item.content;
|
|
34763
34830
|
return /* @__PURE__ */ React322.createElement(Tooltip31, { key: `${item.content}-${index}`, label: item.label, openDelay: 400, disabled: !item.label || item.label === item.name }, /* @__PURE__ */ React322.createElement(
|
|
34764
|
-
|
|
34831
|
+
UnstyledButton5,
|
|
34765
34832
|
{
|
|
34766
34833
|
onClick: () => handleOpen(item),
|
|
34767
34834
|
style: {
|
|
@@ -34851,7 +34918,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
34851
34918
|
registerRuntimeInputs,
|
|
34852
34919
|
executeAction
|
|
34853
34920
|
}) => {
|
|
34854
|
-
const [actAs, setActAs] =
|
|
34921
|
+
const [actAs, setActAs] = useState172(emptyActAsGroupState());
|
|
34855
34922
|
const t = useTranslate();
|
|
34856
34923
|
const handlers = useBlocknoteHandlers();
|
|
34857
34924
|
const handlersRef = useRef45(handlers);
|
|
@@ -34872,35 +34939,35 @@ var EvaluateClaimFlowDetail = ({
|
|
|
34872
34939
|
const resolveOpts = useMemo121(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
34873
34940
|
const deedDid = resolveReferences(parsed.deedDid, editorDocument, resolveOpts).trim();
|
|
34874
34941
|
const collectionId = resolveReferences(parsed.collectionId, editorDocument, resolveOpts).trim();
|
|
34875
|
-
const [claims, setClaims] =
|
|
34876
|
-
const [selectedClaimId, setSelectedClaimId] =
|
|
34877
|
-
const [decision, setDecision] =
|
|
34878
|
-
const [disputeReason, setDisputeReason] =
|
|
34879
|
-
const [loadingClaims, setLoadingClaims] =
|
|
34880
|
-
const [submitting, setSubmitting] =
|
|
34881
|
-
const [error, setError] =
|
|
34882
|
-
const [adminAddress, setAdminAddress] =
|
|
34883
|
-
const [paymentRows, setPaymentRows] =
|
|
34884
|
-
const [createUdid, setCreateUdid] =
|
|
34885
|
-
const [claimData, setClaimData] =
|
|
34886
|
-
const [surveyJson, setSurveyJson] =
|
|
34887
|
-
const [surveyLoading, setSurveyLoading] =
|
|
34888
|
-
const [evaluationLoading, setEvaluationLoading] =
|
|
34889
|
-
const [evaluationResult, setEvaluationResult] =
|
|
34890
|
-
const [activeFilter, setActiveFilter] =
|
|
34891
|
-
const [outcomeTemplateJson, setOutcomeTemplateJson] =
|
|
34892
|
-
const [outcomeTemplateLoading, setOutcomeTemplateLoading] =
|
|
34893
|
-
const [outcomeResponses, setOutcomeResponses] =
|
|
34894
|
-
const [outcomeComplete, setOutcomeComplete] =
|
|
34895
|
-
const [isEvaluatorAuthorized] =
|
|
34896
|
-
const [authChecking] =
|
|
34897
|
-
const [authError] =
|
|
34898
|
-
const [, setAuthRetryKey] =
|
|
34899
|
-
const [profilesByDid, setProfilesByDid] =
|
|
34900
|
-
const [disputeDetails] =
|
|
34901
|
-
const [loadingDispute] =
|
|
34902
|
-
const [evaluationOutcomePatch] =
|
|
34903
|
-
const [evaluationAmount] =
|
|
34942
|
+
const [claims, setClaims] = useState172([]);
|
|
34943
|
+
const [selectedClaimId, setSelectedClaimId] = useState172("");
|
|
34944
|
+
const [decision, setDecision] = useState172("");
|
|
34945
|
+
const [disputeReason, setDisputeReason] = useState172("");
|
|
34946
|
+
const [loadingClaims, setLoadingClaims] = useState172(false);
|
|
34947
|
+
const [submitting, setSubmitting] = useState172(false);
|
|
34948
|
+
const [error, setError] = useState172(null);
|
|
34949
|
+
const [adminAddress, setAdminAddress] = useState172("");
|
|
34950
|
+
const [paymentRows, setPaymentRows] = useState172([createPaymentRow2()]);
|
|
34951
|
+
const [createUdid, setCreateUdid] = useState172(true);
|
|
34952
|
+
const [claimData, setClaimData] = useState172(null);
|
|
34953
|
+
const [surveyJson, setSurveyJson] = useState172(null);
|
|
34954
|
+
const [surveyLoading, setSurveyLoading] = useState172(false);
|
|
34955
|
+
const [evaluationLoading, setEvaluationLoading] = useState172(false);
|
|
34956
|
+
const [evaluationResult, setEvaluationResult] = useState172(null);
|
|
34957
|
+
const [activeFilter, setActiveFilter] = useState172("all");
|
|
34958
|
+
const [outcomeTemplateJson, setOutcomeTemplateJson] = useState172(null);
|
|
34959
|
+
const [outcomeTemplateLoading, setOutcomeTemplateLoading] = useState172(false);
|
|
34960
|
+
const [outcomeResponses, setOutcomeResponses] = useState172({});
|
|
34961
|
+
const [outcomeComplete, setOutcomeComplete] = useState172(false);
|
|
34962
|
+
const [isEvaluatorAuthorized] = useState172(true);
|
|
34963
|
+
const [authChecking] = useState172(false);
|
|
34964
|
+
const [authError] = useState172(null);
|
|
34965
|
+
const [, setAuthRetryKey] = useState172(0);
|
|
34966
|
+
const [profilesByDid, setProfilesByDid] = useState172({});
|
|
34967
|
+
const [disputeDetails] = useState172(null);
|
|
34968
|
+
const [loadingDispute] = useState172(false);
|
|
34969
|
+
const [evaluationOutcomePatch] = useState172(null);
|
|
34970
|
+
const [evaluationAmount] = useState172(null);
|
|
34904
34971
|
const selectedClaim = useMemo121(() => claims.find((claim) => claim.claimId === selectedClaimId) || null, [claims, selectedClaimId]);
|
|
34905
34972
|
const filteredClaims = useMemo121(() => {
|
|
34906
34973
|
if (activeFilter === "all") return claims;
|
|
@@ -34912,7 +34979,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
34912
34979
|
return resolveFilesInCredentialSubject(cs);
|
|
34913
34980
|
}, [claimData]);
|
|
34914
34981
|
const mediaBlobCacheRef = React323.useRef(/* @__PURE__ */ new Map());
|
|
34915
|
-
const [surveyActiveFile, setSurveyActiveFile] =
|
|
34982
|
+
const [surveyActiveFile, setSurveyActiveFile] = useState172(null);
|
|
34916
34983
|
const openFileRef = React323.useRef(() => {
|
|
34917
34984
|
});
|
|
34918
34985
|
useEffect116(() => {
|
|
@@ -35512,7 +35579,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
35512
35579
|
did: "DID",
|
|
35513
35580
|
claimCollection: "claim collection"
|
|
35514
35581
|
})) : /* @__PURE__ */ React323.createElement(React323.Fragment, null, flowManagerContext, /* @__PURE__ */ React323.createElement(EvaluationReportSection, { runtime }), /* @__PURE__ */ React323.createElement(Group120, { justify: "space-between", align: "center" }, /* @__PURE__ */ React323.createElement(Group120, { gap: 0 }, filterTabs.map((tab) => /* @__PURE__ */ React323.createElement(
|
|
35515
|
-
|
|
35582
|
+
UnstyledButton6,
|
|
35516
35583
|
{
|
|
35517
35584
|
key: tab.value,
|
|
35518
35585
|
onClick: () => setActiveFilter(tab.value),
|
|
@@ -35569,7 +35636,7 @@ registerActionTypeUI("qi/claim.evaluate", {
|
|
|
35569
35636
|
import { IconFileText as IconFileText7 } from "@tabler/icons-react";
|
|
35570
35637
|
|
|
35571
35638
|
// src/mantine/blocks/action/actionTypes/proposalCreate/ProposalCreateConfig.tsx
|
|
35572
|
-
import React324, { useCallback as useCallback115, useEffect as useEffect117, useState as
|
|
35639
|
+
import React324, { useCallback as useCallback115, useEffect as useEffect117, useState as useState173 } from "react";
|
|
35573
35640
|
import { Divider as Divider24, Loader as Loader65, SegmentedControl as SegmentedControl16, Stack as Stack216, Text as Text204 } from "@mantine/core";
|
|
35574
35641
|
|
|
35575
35642
|
// src/mantine/blocks/action/actionTypes/proposalCreate/types.ts
|
|
@@ -35598,11 +35665,11 @@ function serializeProposalCreateInputs(inputs) {
|
|
|
35598
35665
|
// src/mantine/blocks/action/actionTypes/proposalCreate/ProposalCreateConfig.tsx
|
|
35599
35666
|
var ProposalCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
35600
35667
|
const handlers = useBlocknoteHandlers();
|
|
35601
|
-
const [local, setLocal] =
|
|
35602
|
-
const [groups, setGroups] =
|
|
35603
|
-
const [loadingGroups, setLoadingGroups] =
|
|
35604
|
-
const [inputMode, setInputMode] =
|
|
35605
|
-
const [manualAddress, setManualAddress] =
|
|
35668
|
+
const [local, setLocal] = useState173(() => parseProposalCreateInputs(inputs));
|
|
35669
|
+
const [groups, setGroups] = useState173([]);
|
|
35670
|
+
const [loadingGroups, setLoadingGroups] = useState173(false);
|
|
35671
|
+
const [inputMode, setInputMode] = useState173("select");
|
|
35672
|
+
const [manualAddress, setManualAddress] = useState173("");
|
|
35606
35673
|
useEffect117(() => {
|
|
35607
35674
|
setLocal(parseProposalCreateInputs(inputs));
|
|
35608
35675
|
}, [inputs]);
|
|
@@ -35714,7 +35781,7 @@ var ProposalCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
35714
35781
|
};
|
|
35715
35782
|
|
|
35716
35783
|
// src/mantine/blocks/action/actionTypes/proposalCreate/ProposalCreateFlowDetail.tsx
|
|
35717
|
-
import React325, { useCallback as useCallback116, useEffect as useEffect118, useMemo as useMemo123, useState as
|
|
35784
|
+
import React325, { useCallback as useCallback116, useEffect as useEffect118, useMemo as useMemo123, useState as useState174 } from "react";
|
|
35718
35785
|
import { Badge as Badge54, Button as Button70, Card as Card29, Group as Group121, Loader as Loader66, Stack as Stack217, Text as Text205 } from "@mantine/core";
|
|
35719
35786
|
import { IconPlus as IconPlus9, IconPlayerPlay as IconPlayerPlay7 } from "@tabler/icons-react";
|
|
35720
35787
|
|
|
@@ -35789,10 +35856,10 @@ var ProposalCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime,
|
|
|
35789
35856
|
const coreAddress = resolvedInputs.coreAddress;
|
|
35790
35857
|
const proposalTitle = resolvedInputs.proposalTitle;
|
|
35791
35858
|
const proposalDescription = resolvedInputs.proposalDescription;
|
|
35792
|
-
const [isCreating, setIsCreating] =
|
|
35793
|
-
const [isExecuting, setIsExecuting] =
|
|
35794
|
-
const [error, setError] =
|
|
35795
|
-
const [proposalContractAddress, setProposalContractAddress] =
|
|
35859
|
+
const [isCreating, setIsCreating] = useState174(false);
|
|
35860
|
+
const [isExecuting, setIsExecuting] = useState174(false);
|
|
35861
|
+
const [error, setError] = useState174(null);
|
|
35862
|
+
const [proposalContractAddress, setProposalContractAddress] = useState174(null);
|
|
35796
35863
|
const proposalId = runtime.output?.proposalId || "";
|
|
35797
35864
|
const currentStatus = parseStatus2(runtime.output?.status);
|
|
35798
35865
|
const isProposalCreated = !!proposalId;
|
|
@@ -35963,7 +36030,7 @@ registerActionTypeUI("qi/proposal.create", {
|
|
|
35963
36030
|
import { IconThumbUp as IconThumbUp2 } from "@tabler/icons-react";
|
|
35964
36031
|
|
|
35965
36032
|
// src/mantine/blocks/action/actionTypes/proposalVote/ProposalVoteConfig.tsx
|
|
35966
|
-
import React326, { useCallback as useCallback117, useEffect as useEffect119, useState as
|
|
36033
|
+
import React326, { useCallback as useCallback117, useEffect as useEffect119, useState as useState175 } from "react";
|
|
35967
36034
|
import { Divider as Divider25, Loader as Loader67, SegmentedControl as SegmentedControl17, Stack as Stack218, Text as Text206 } from "@mantine/core";
|
|
35968
36035
|
|
|
35969
36036
|
// src/mantine/blocks/action/actionTypes/proposalVote/types.ts
|
|
@@ -35990,11 +36057,11 @@ function serializeProposalVoteInputs(inputs) {
|
|
|
35990
36057
|
// src/mantine/blocks/action/actionTypes/proposalVote/ProposalVoteConfig.tsx
|
|
35991
36058
|
var ProposalVoteConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
35992
36059
|
const handlers = useBlocknoteHandlers();
|
|
35993
|
-
const [local, setLocal] =
|
|
35994
|
-
const [groups, setGroups] =
|
|
35995
|
-
const [loadingGroups, setLoadingGroups] =
|
|
35996
|
-
const [inputMode, setInputMode] =
|
|
35997
|
-
const [manualAddress, setManualAddress] =
|
|
36060
|
+
const [local, setLocal] = useState175(() => parseProposalVoteInputs(inputs));
|
|
36061
|
+
const [groups, setGroups] = useState175([]);
|
|
36062
|
+
const [loadingGroups, setLoadingGroups] = useState175(false);
|
|
36063
|
+
const [inputMode, setInputMode] = useState175("select");
|
|
36064
|
+
const [manualAddress, setManualAddress] = useState175("");
|
|
35998
36065
|
useEffect119(() => {
|
|
35999
36066
|
setLocal(parseProposalVoteInputs(inputs));
|
|
36000
36067
|
}, [inputs]);
|
|
@@ -36101,7 +36168,7 @@ var ProposalVoteConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
36101
36168
|
};
|
|
36102
36169
|
|
|
36103
36170
|
// src/mantine/blocks/action/actionTypes/proposalVote/ProposalVoteFlowDetail.tsx
|
|
36104
|
-
import React327, { useCallback as useCallback118, useEffect as useEffect120, useMemo as useMemo124, useState as
|
|
36171
|
+
import React327, { useCallback as useCallback118, useEffect as useEffect120, useMemo as useMemo124, useState as useState176 } from "react";
|
|
36105
36172
|
import { Box as Box63, Button as Button71, Card as Card30, Group as Group122, Progress as Progress5, Stack as Stack219, Text as Text207, Tooltip as Tooltip32 } from "@mantine/core";
|
|
36106
36173
|
var getVoteIcon2 = (voteType) => {
|
|
36107
36174
|
switch (voteType) {
|
|
@@ -36123,12 +36190,12 @@ var ProposalVoteFlowDetail = ({ inputs, editor, block, runtime, isDisabled, exec
|
|
|
36123
36190
|
const proposalId = resolveReferences(parsed.proposalId, editorDocument, resolveOpts).trim();
|
|
36124
36191
|
const coreAddress = resolveReferences(parsed.coreAddress, editorDocument, resolveOpts).trim();
|
|
36125
36192
|
const inputContractAddress = resolveReferences(parsed.proposalContractAddress, editorDocument, resolveOpts).trim();
|
|
36126
|
-
const [selectedVote, setSelectedVote] =
|
|
36127
|
-
const [rationale, setRationale] =
|
|
36128
|
-
const [submitting, setSubmitting] =
|
|
36129
|
-
const [error, setError] =
|
|
36130
|
-
const [userVote, setUserVote] =
|
|
36131
|
-
const [proposalContractAddress, setProposalContractAddress] =
|
|
36193
|
+
const [selectedVote, setSelectedVote] = useState176("");
|
|
36194
|
+
const [rationale, setRationale] = useState176("");
|
|
36195
|
+
const [submitting, setSubmitting] = useState176(false);
|
|
36196
|
+
const [error, setError] = useState176(null);
|
|
36197
|
+
const [userVote, setUserVote] = useState176(null);
|
|
36198
|
+
const [proposalContractAddress, setProposalContractAddress] = useState176(inputContractAddress || null);
|
|
36132
36199
|
const hasSubmittedProposal = Boolean(proposalId);
|
|
36133
36200
|
const hasVoted = Boolean(userVote?.vote);
|
|
36134
36201
|
useEffect120(() => {
|
|
@@ -36358,7 +36425,7 @@ registerActionTypeUI("qi/proposal.vote", {
|
|
|
36358
36425
|
import { IconBolt as IconBolt12 } from "@tabler/icons-react";
|
|
36359
36426
|
|
|
36360
36427
|
// src/mantine/blocks/action/actionTypes/protocolSelect/ProtocolSelectConfig.tsx
|
|
36361
|
-
import React328, { useMemo as useMemo125, useState as
|
|
36428
|
+
import React328, { useMemo as useMemo125, useState as useState177 } from "react";
|
|
36362
36429
|
import { Box as Box64, Pill as Pill3, PillsInput as PillsInput3, Stack as Stack220, Text as Text208 } from "@mantine/core";
|
|
36363
36430
|
function parseInputs2(json) {
|
|
36364
36431
|
try {
|
|
@@ -36372,7 +36439,7 @@ function parseInputs2(json) {
|
|
|
36372
36439
|
}
|
|
36373
36440
|
var ProtocolSelectConfig = ({ inputs, onInputsChange }) => {
|
|
36374
36441
|
const local = useMemo125(() => parseInputs2(inputs), [inputs]);
|
|
36375
|
-
const [inputValue, setInputValue] =
|
|
36442
|
+
const [inputValue, setInputValue] = useState177("");
|
|
36376
36443
|
const update = (dids) => {
|
|
36377
36444
|
onInputsChange(JSON.stringify({ ...local, protocolDids: dids }));
|
|
36378
36445
|
};
|
|
@@ -36403,7 +36470,7 @@ var ProtocolSelectConfig = ({ inputs, onInputsChange }) => {
|
|
|
36403
36470
|
};
|
|
36404
36471
|
|
|
36405
36472
|
// src/mantine/blocks/action/actionTypes/protocolSelect/ProtocolSelectFlowDetail.tsx
|
|
36406
|
-
import React329, { useCallback as useCallback119, useEffect as useEffect121, useMemo as useMemo126, useState as
|
|
36473
|
+
import React329, { useCallback as useCallback119, useEffect as useEffect121, useMemo as useMemo126, useState as useState178 } from "react";
|
|
36407
36474
|
import { Box as Box65, Group as Group123, Loader as Loader68, Stack as Stack221, Text as Text209 } from "@mantine/core";
|
|
36408
36475
|
function parseInputs3(json) {
|
|
36409
36476
|
try {
|
|
@@ -36418,7 +36485,7 @@ function parseInputs3(json) {
|
|
|
36418
36485
|
var ProtocolSelectFlowDetail = ({ inputs, block, runtime, isDisabled, executeAction }) => {
|
|
36419
36486
|
const handlers = useBlocknoteHandlers();
|
|
36420
36487
|
const { protocolDids } = useMemo126(() => parseInputs3(inputs), [inputs]);
|
|
36421
|
-
const [protocols, setProtocols] =
|
|
36488
|
+
const [protocols, setProtocols] = useState178([]);
|
|
36422
36489
|
const selectedDid = runtime.output?.selectedProtocolDid;
|
|
36423
36490
|
useEffect121(() => {
|
|
36424
36491
|
if (protocolDids.length === 0) {
|
|
@@ -36519,7 +36586,7 @@ registerActionTypeUI("qi/protocol.select", {
|
|
|
36519
36586
|
import { IconSignature as IconSignature3 } from "@tabler/icons-react";
|
|
36520
36587
|
|
|
36521
36588
|
// src/mantine/blocks/action/actionTypes/domainSign/DomainSignConfig.tsx
|
|
36522
|
-
import React330, { useCallback as useCallback120, useEffect as useEffect122, useState as
|
|
36589
|
+
import React330, { useCallback as useCallback120, useEffect as useEffect122, useState as useState179 } from "react";
|
|
36523
36590
|
import { Stack as Stack222, Text as Text210 } from "@mantine/core";
|
|
36524
36591
|
|
|
36525
36592
|
// src/mantine/blocks/action/actionTypes/domainSign/types.ts
|
|
@@ -36549,7 +36616,7 @@ var ENTITY_TYPE_OPTIONS = [
|
|
|
36549
36616
|
{ value: "asset", label: "Asset" }
|
|
36550
36617
|
];
|
|
36551
36618
|
var DomainSignConfig = ({ inputs, onInputsChange }) => {
|
|
36552
|
-
const [local, setLocal] =
|
|
36619
|
+
const [local, setLocal] = useState179(() => parseDomainSignInputs(inputs));
|
|
36553
36620
|
useEffect122(() => {
|
|
36554
36621
|
setLocal(parseDomainSignInputs(inputs));
|
|
36555
36622
|
}, [inputs]);
|
|
@@ -36574,7 +36641,7 @@ var DomainSignConfig = ({ inputs, onInputsChange }) => {
|
|
|
36574
36641
|
};
|
|
36575
36642
|
|
|
36576
36643
|
// src/mantine/blocks/action/actionTypes/domainSign/DomainSignFlowDetail.tsx
|
|
36577
|
-
import React331, { useCallback as useCallback121, useEffect as useEffect123, useMemo as useMemo127, useState as
|
|
36644
|
+
import React331, { useCallback as useCallback121, useEffect as useEffect123, useMemo as useMemo127, useState as useState180 } from "react";
|
|
36578
36645
|
import { Button as Button72, Group as Group124, Loader as Loader69, Stack as Stack223, Text as Text211 } from "@mantine/core";
|
|
36579
36646
|
import { IconCheck as IconCheck27, IconAlertCircle as IconAlertCircle29, IconExternalLink as IconExternalLink2 } from "@tabler/icons-react";
|
|
36580
36647
|
var STEP_LABELS = {
|
|
@@ -36625,9 +36692,9 @@ var DomainSignFlowDetail = ({
|
|
|
36625
36692
|
const flowTemplateConfig = pendingPayload?.flowTemplateConfig && typeof pendingPayload.flowTemplateConfig === "object" ? pendingPayload.flowTemplateConfig : null;
|
|
36626
36693
|
const selectedTemplateCount = Number(flowTemplateConfig?.templateCount || 0);
|
|
36627
36694
|
const selectedTemplateProtocolCount = Number(flowTemplateConfig?.protocolCount || 0);
|
|
36628
|
-
const [activeStep, setActiveStep] =
|
|
36629
|
-
const [isSigning, setIsSigning] =
|
|
36630
|
-
const [localError, setLocalError] =
|
|
36695
|
+
const [activeStep, setActiveStep] = useState180("");
|
|
36696
|
+
const [isSigning, setIsSigning] = useState180(false);
|
|
36697
|
+
const [localError, setLocalError] = useState180(null);
|
|
36631
36698
|
const domainSignCheckpoint = useMemo127(() => {
|
|
36632
36699
|
const bucket = runtime.cache?.domainSign;
|
|
36633
36700
|
if (!bucket || typeof bucket !== "object") return null;
|
|
@@ -36760,7 +36827,7 @@ registerActionTypeUI("qi/domain.sign", {
|
|
|
36760
36827
|
import { IconBuildingEstate as IconBuildingEstate2 } from "@tabler/icons-react";
|
|
36761
36828
|
|
|
36762
36829
|
// src/mantine/blocks/action/actionTypes/domainCardPreview/DomainCardPreviewConfig.tsx
|
|
36763
|
-
import React332, { useCallback as useCallback122, useEffect as useEffect124, useState as
|
|
36830
|
+
import React332, { useCallback as useCallback122, useEffect as useEffect124, useState as useState181 } from "react";
|
|
36764
36831
|
import { Stack as Stack224, Text as Text212, Textarea as Textarea3 } from "@mantine/core";
|
|
36765
36832
|
|
|
36766
36833
|
// src/mantine/blocks/action/actionTypes/domainCardPreview/types.ts
|
|
@@ -36813,7 +36880,7 @@ function buildCardDataFromInputs(inputs) {
|
|
|
36813
36880
|
|
|
36814
36881
|
// src/mantine/blocks/action/actionTypes/domainCardPreview/DomainCardPreviewConfig.tsx
|
|
36815
36882
|
var DomainCardPreviewConfig = ({ inputs, onInputsChange }) => {
|
|
36816
|
-
const [local, setLocal] =
|
|
36883
|
+
const [local, setLocal] = useState181(() => parseDomainCardPreviewInputs(inputs));
|
|
36817
36884
|
useEffect124(() => {
|
|
36818
36885
|
setLocal(parseDomainCardPreviewInputs(inputs));
|
|
36819
36886
|
}, [inputs]);
|
|
@@ -36839,7 +36906,7 @@ var DomainCardPreviewConfig = ({ inputs, onInputsChange }) => {
|
|
|
36839
36906
|
};
|
|
36840
36907
|
|
|
36841
36908
|
// src/mantine/blocks/action/actionTypes/domainCardPreview/DomainCardPreviewFlowDetail.tsx
|
|
36842
|
-
import React333, { useCallback as useCallback123, useMemo as useMemo128, useState as
|
|
36909
|
+
import React333, { useCallback as useCallback123, useMemo as useMemo128, useState as useState182 } from "react";
|
|
36843
36910
|
import { Badge as Badge55, Box as Box66, Button as Button73, Code as Code12, Group as Group125, Loader as Loader70, ScrollArea as ScrollArea9, Stack as Stack225, Text as Text213 } from "@mantine/core";
|
|
36844
36911
|
import { IconAlertCircle as IconAlertCircle30, IconCheck as IconCheck28, IconSparkles as IconSparkles8 } from "@tabler/icons-react";
|
|
36845
36912
|
var JsonViewer2 = ({ data }) => /* @__PURE__ */ React333.createElement(ScrollArea9.Autosize, { mah: 360, offsetScrollbars: true }, /* @__PURE__ */ React333.createElement(Stack225, { gap: "md" }, data.name && /* @__PURE__ */ React333.createElement(Box66, null, /* @__PURE__ */ React333.createElement(Text213, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Name"), /* @__PURE__ */ React333.createElement(Text213, { size: "lg", fw: 600 }, data.name)), data.summary && /* @__PURE__ */ React333.createElement(Box66, null, /* @__PURE__ */ React333.createElement(Text213, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Summary"), /* @__PURE__ */ React333.createElement(Text213, { size: "sm" }, data.summary)), data.description && /* @__PURE__ */ React333.createElement(Box66, null, /* @__PURE__ */ React333.createElement(Text213, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Description"), /* @__PURE__ */ React333.createElement(Text213, { size: "sm" }, data.description)), data.entity_type && data.entity_type.length > 0 && /* @__PURE__ */ React333.createElement(Box66, null, /* @__PURE__ */ React333.createElement(Text213, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Type"), /* @__PURE__ */ React333.createElement(Text213, { size: "sm" }, data.entity_type.join(", "))), data.keywords && data.keywords.length > 0 && /* @__PURE__ */ React333.createElement(Box66, null, /* @__PURE__ */ React333.createElement(Text213, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Keywords"), /* @__PURE__ */ React333.createElement(Text213, { size: "sm" }, data.keywords.join(", "))), data.faq && data.faq.length > 0 && /* @__PURE__ */ React333.createElement(Box66, null, /* @__PURE__ */ React333.createElement(Text213, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, mb: "xs" }, "FAQ"), /* @__PURE__ */ React333.createElement(Stack225, { gap: "sm" }, data.faq.map((item, index) => /* @__PURE__ */ React333.createElement(Box66, { key: index, p: "sm", style: { borderRadius: 8, backgroundColor: "var(--mantine-color-dark-6)" } }, /* @__PURE__ */ React333.createElement(Text213, { size: "sm", fw: 500, mb: 4 }, item.question), /* @__PURE__ */ React333.createElement(Text213, { size: "xs", c: "dimmed" }, item.answer))))), /* @__PURE__ */ React333.createElement(Box66, null, /* @__PURE__ */ React333.createElement(Text213, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, mb: "xs" }, "Raw Data"), /* @__PURE__ */ React333.createElement(Code12, { block: true, style: { fontSize: 11, maxHeight: 200, overflow: "auto" } }, JSON.stringify(data, null, 2)))));
|
|
@@ -36865,8 +36932,8 @@ function coerce(value, fallback) {
|
|
|
36865
36932
|
var DomainCardPreviewFlowDetail = ({ inputs, editor, block, runtime, isDisabled, executeAction }) => {
|
|
36866
36933
|
const { domainCardRenderer } = useBlocknoteContext();
|
|
36867
36934
|
const handlers = useBlocknoteHandlers();
|
|
36868
|
-
const [isAskingCompanion, setIsAskingCompanion] =
|
|
36869
|
-
const [companionError, setCompanionError] =
|
|
36935
|
+
const [isAskingCompanion, setIsAskingCompanion] = useState182(false);
|
|
36936
|
+
const [companionError, setCompanionError] = useState182(null);
|
|
36870
36937
|
const parsed = useMemo128(() => parseDomainCardPreviewInputs(inputs), [inputs]);
|
|
36871
36938
|
const editorDocument = editor?.document || [];
|
|
36872
36939
|
const resolveOpts = useMemo128(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
@@ -36950,7 +37017,7 @@ registerActionTypeUI("qi/domain.card-preview", {
|
|
|
36950
37017
|
import { IconSparkles as IconSparkles10 } from "@tabler/icons-react";
|
|
36951
37018
|
|
|
36952
37019
|
// src/mantine/blocks/action/actionTypes/oracle/OracleConfig.tsx
|
|
36953
|
-
import React334, { useCallback as useCallback124, useEffect as useEffect125, useState as
|
|
37020
|
+
import React334, { useCallback as useCallback124, useEffect as useEffect125, useState as useState183 } from "react";
|
|
36954
37021
|
import { Stack as Stack226 } from "@mantine/core";
|
|
36955
37022
|
|
|
36956
37023
|
// src/mantine/blocks/action/actionTypes/oracle/types.ts
|
|
@@ -36972,7 +37039,7 @@ function serializeOracleInputs(inputs) {
|
|
|
36972
37039
|
|
|
36973
37040
|
// src/mantine/blocks/action/actionTypes/oracle/OracleConfig.tsx
|
|
36974
37041
|
var OracleConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
36975
|
-
const [local, setLocal] =
|
|
37042
|
+
const [local, setLocal] = useState183(() => parseOracleInputs(inputs));
|
|
36976
37043
|
useEffect125(() => {
|
|
36977
37044
|
setLocal(parseOracleInputs(inputs));
|
|
36978
37045
|
}, [inputs]);
|
|
@@ -37000,7 +37067,7 @@ var OracleConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
37000
37067
|
};
|
|
37001
37068
|
|
|
37002
37069
|
// src/mantine/blocks/action/actionTypes/oracle/OracleFlowDetail.tsx
|
|
37003
|
-
import React335, { useCallback as useCallback125, useMemo as useMemo129, useState as
|
|
37070
|
+
import React335, { useCallback as useCallback125, useMemo as useMemo129, useState as useState184 } from "react";
|
|
37004
37071
|
import { Button as Button74, Stack as Stack227 } from "@mantine/core";
|
|
37005
37072
|
import { IconCheck as IconCheck29, IconAlertCircle as IconAlertCircle31, IconSparkles as IconSparkles9 } from "@tabler/icons-react";
|
|
37006
37073
|
var OracleFlowDetail = ({ inputs, editor, runtime, updateRuntime, isDisabled }) => {
|
|
@@ -37009,8 +37076,8 @@ var OracleFlowDetail = ({ inputs, editor, runtime, updateRuntime, isDisabled })
|
|
|
37009
37076
|
const editorDocument = editor?.document || [];
|
|
37010
37077
|
const resolveOpts = useMemo129(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
37011
37078
|
const resolvedPrompt = resolveReferences(parsed.prompt, editorDocument, resolveOpts).trim();
|
|
37012
|
-
const [isLoading, setIsLoading] =
|
|
37013
|
-
const [error, setError] =
|
|
37079
|
+
const [isLoading, setIsLoading] = useState184(false);
|
|
37080
|
+
const [error, setError] = useState184(null);
|
|
37014
37081
|
const isCompleted = runtime.state === "completed";
|
|
37015
37082
|
const handleExecute = useCallback125(async () => {
|
|
37016
37083
|
if (isDisabled || isLoading || isCompleted) return;
|
|
@@ -37059,7 +37126,7 @@ registerActionTypeUI("oracle", {
|
|
|
37059
37126
|
import { IconMessage } from "@tabler/icons-react";
|
|
37060
37127
|
|
|
37061
37128
|
// src/mantine/blocks/action/actionTypes/oraclePrompt/OraclePromptConfig.tsx
|
|
37062
|
-
import React336, { useCallback as useCallback126, useEffect as useEffect126, useState as
|
|
37129
|
+
import React336, { useCallback as useCallback126, useEffect as useEffect126, useState as useState185 } from "react";
|
|
37063
37130
|
import { Stack as Stack228 } from "@mantine/core";
|
|
37064
37131
|
|
|
37065
37132
|
// src/mantine/blocks/action/actionTypes/oraclePrompt/types.ts
|
|
@@ -37079,7 +37146,7 @@ function serializeOraclePromptInputs(inputs) {
|
|
|
37079
37146
|
|
|
37080
37147
|
// src/mantine/blocks/action/actionTypes/oraclePrompt/OraclePromptConfig.tsx
|
|
37081
37148
|
var OraclePromptConfig = ({ inputs, onInputsChange }) => {
|
|
37082
|
-
const [localPrompt, setLocalPrompt] =
|
|
37149
|
+
const [localPrompt, setLocalPrompt] = useState185(() => parseOraclePromptInputs(inputs).prompt);
|
|
37083
37150
|
useEffect126(() => {
|
|
37084
37151
|
setLocalPrompt(parseOraclePromptInputs(inputs).prompt);
|
|
37085
37152
|
}, [inputs]);
|
|
@@ -37104,7 +37171,7 @@ var OraclePromptConfig = ({ inputs, onInputsChange }) => {
|
|
|
37104
37171
|
};
|
|
37105
37172
|
|
|
37106
37173
|
// src/mantine/blocks/action/actionTypes/oraclePrompt/OraclePromptFlowDetail.tsx
|
|
37107
|
-
import React337, { useCallback as useCallback127, useMemo as useMemo130, useState as
|
|
37174
|
+
import React337, { useCallback as useCallback127, useMemo as useMemo130, useState as useState186 } from "react";
|
|
37108
37175
|
import { Loader as Loader71, Stack as Stack229, Text as Text214 } from "@mantine/core";
|
|
37109
37176
|
import { IconSend as IconSend8 } from "@tabler/icons-react";
|
|
37110
37177
|
function parsePrimarySkill(rawSkill) {
|
|
@@ -37148,8 +37215,8 @@ var OraclePromptFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, i
|
|
|
37148
37215
|
const editorDocument = editor?.document || [];
|
|
37149
37216
|
const resolveOpts = useMemo130(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
37150
37217
|
const resolvedPrompt = useMemo130(() => resolveReferences(parsed.prompt || "", editorDocument, resolveOpts).trim(), [parsed.prompt, editorDocument, resolveOpts]);
|
|
37151
|
-
const [submitting, setSubmitting] =
|
|
37152
|
-
const [error, setError] =
|
|
37218
|
+
const [submitting, setSubmitting] = useState186(false);
|
|
37219
|
+
const [error, setError] = useState186(null);
|
|
37153
37220
|
const handleExecute = useCallback127(async () => {
|
|
37154
37221
|
if (isDisabled || submitting || !resolvedPrompt) return;
|
|
37155
37222
|
if (typeof handlers?.askCompanion !== "function") {
|
|
@@ -37196,7 +37263,7 @@ registerActionTypeUI("oracle.prompt", {
|
|
|
37196
37263
|
import { IconClipboard, IconClipboardCheck } from "@tabler/icons-react";
|
|
37197
37264
|
|
|
37198
37265
|
// src/mantine/blocks/action/actionTypes/formSubmit/FormSubmitConfig.tsx
|
|
37199
|
-
import React338, { useCallback as useCallback128, useEffect as useEffect127, useState as
|
|
37266
|
+
import React338, { useCallback as useCallback128, useEffect as useEffect127, useState as useState187 } from "react";
|
|
37200
37267
|
import { Stack as Stack230, Text as Text215 } from "@mantine/core";
|
|
37201
37268
|
|
|
37202
37269
|
// src/mantine/blocks/action/actionTypes/formSubmit/types.ts
|
|
@@ -37231,8 +37298,8 @@ function isValidSchemaJson(value) {
|
|
|
37231
37298
|
}
|
|
37232
37299
|
}
|
|
37233
37300
|
var FormSubmitConfig = ({ inputs, onInputsChange }) => {
|
|
37234
|
-
const [localSchema, setLocalSchema] =
|
|
37235
|
-
const [error, setError] =
|
|
37301
|
+
const [localSchema, setLocalSchema] = useState187(() => parseFormSubmitActionInputs(inputs).surveySchema);
|
|
37302
|
+
const [error, setError] = useState187(null);
|
|
37236
37303
|
useEffect127(() => {
|
|
37237
37304
|
setLocalSchema(parseFormSubmitActionInputs(inputs).surveySchema);
|
|
37238
37305
|
setError(null);
|
|
@@ -37268,7 +37335,7 @@ var FormSubmitConfig = ({ inputs, onInputsChange }) => {
|
|
|
37268
37335
|
};
|
|
37269
37336
|
|
|
37270
37337
|
// src/mantine/blocks/action/actionTypes/formSubmit/FormSubmitFlowDetail.tsx
|
|
37271
|
-
import React339, { useCallback as useCallback129, useEffect as useEffect128, useMemo as useMemo131, useState as
|
|
37338
|
+
import React339, { useCallback as useCallback129, useEffect as useEffect128, useMemo as useMemo131, useState as useState188 } from "react";
|
|
37272
37339
|
import { Loader as Loader72, Stack as Stack231, Text as Text216 } from "@mantine/core";
|
|
37273
37340
|
import { SurveyModel as SurveyModel12 } from "@ixo/surveys";
|
|
37274
37341
|
function parsePrimarySkill2(rawSkill) {
|
|
@@ -37321,8 +37388,8 @@ var FormSubmitFlowDetail = ({ inputs, editor, block, runtime, isDisabled, execut
|
|
|
37321
37388
|
const editorDocument = editor?.document || [];
|
|
37322
37389
|
const resolveOpts = useMemo131(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
37323
37390
|
const resolvedSchemaString = useMemo131(() => resolveReferences(parsed.surveySchema || "", editorDocument, resolveOpts).trim(), [parsed.surveySchema, editorDocument, resolveOpts]);
|
|
37324
|
-
const [submitting, setSubmitting] =
|
|
37325
|
-
const [error, setError] =
|
|
37391
|
+
const [submitting, setSubmitting] = useState188(false);
|
|
37392
|
+
const [error, setError] = useState188(null);
|
|
37326
37393
|
const parsedSchema = useMemo131(() => {
|
|
37327
37394
|
if (!resolvedSchemaString) return null;
|
|
37328
37395
|
try {
|
|
@@ -37421,7 +37488,7 @@ registerActionTypeUI("qi/human.form.submit", {
|
|
|
37421
37488
|
import { IconShieldCheck as IconShieldCheck18 } from "@tabler/icons-react";
|
|
37422
37489
|
|
|
37423
37490
|
// src/mantine/blocks/action/actionTypes/credentialStore/CredentialStoreConfig.tsx
|
|
37424
|
-
import React340, { useCallback as useCallback130, useEffect as useEffect129, useState as
|
|
37491
|
+
import React340, { useCallback as useCallback130, useEffect as useEffect129, useState as useState189 } from "react";
|
|
37425
37492
|
import { Stack as Stack232, Text as Text217 } from "@mantine/core";
|
|
37426
37493
|
|
|
37427
37494
|
// src/mantine/blocks/action/actionTypes/credentialStore/types.ts
|
|
@@ -37453,7 +37520,7 @@ function serializeCredentialStoreInputs(inputs) {
|
|
|
37453
37520
|
|
|
37454
37521
|
// src/mantine/blocks/action/actionTypes/credentialStore/CredentialStoreConfig.tsx
|
|
37455
37522
|
var CredentialStoreConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
37456
|
-
const [local, setLocal] =
|
|
37523
|
+
const [local, setLocal] = useState189(() => parseCredentialStoreInputs(inputs));
|
|
37457
37524
|
useEffect129(() => {
|
|
37458
37525
|
setLocal(parseCredentialStoreInputs(inputs));
|
|
37459
37526
|
}, [inputs]);
|
|
@@ -37497,7 +37564,7 @@ var CredentialStoreConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
37497
37564
|
};
|
|
37498
37565
|
|
|
37499
37566
|
// src/mantine/blocks/action/actionTypes/credentialStore/CredentialStoreFlowDetail.tsx
|
|
37500
|
-
import React341, { useCallback as useCallback131, useMemo as useMemo132, useState as
|
|
37567
|
+
import React341, { useCallback as useCallback131, useMemo as useMemo132, useState as useState190 } from "react";
|
|
37501
37568
|
import { Button as Button75, Code as Code13, Loader as Loader73, Stack as Stack233, Text as Text218 } from "@mantine/core";
|
|
37502
37569
|
import { IconShieldCheck as IconShieldCheck17 } from "@tabler/icons-react";
|
|
37503
37570
|
function safeParse(value) {
|
|
@@ -37534,8 +37601,8 @@ var CredentialStoreFlowDetail = ({ inputs, editor, runtime, isDisabled, executeA
|
|
|
37534
37601
|
);
|
|
37535
37602
|
const resolvedCredential = useMemo132(() => resolveReferences(parsed.credential || "", editorDocument, resolveOpts).trim(), [parsed.credential, editorDocument, resolveOpts]);
|
|
37536
37603
|
const resolvedRoomId = useMemo132(() => resolveReferences(parsed.roomId || "", editorDocument, resolveOpts).trim(), [parsed.roomId, editorDocument, resolveOpts]);
|
|
37537
|
-
const [submitting, setSubmitting] =
|
|
37538
|
-
const [error, setError] =
|
|
37604
|
+
const [submitting, setSubmitting] = useState190(false);
|
|
37605
|
+
const [error, setError] = useState190(null);
|
|
37539
37606
|
const hasCredential = !!resolvedCredential;
|
|
37540
37607
|
const hasKey = !!resolvedCredentialKey;
|
|
37541
37608
|
const isCompleted = runtime.state === "completed";
|
|
@@ -37581,7 +37648,7 @@ registerActionTypeUI("qi/credential.store", {
|
|
|
37581
37648
|
import { IconMessageCircle } from "@tabler/icons-react";
|
|
37582
37649
|
|
|
37583
37650
|
// src/mantine/blocks/action/actionTypes/matrixDm/MatrixDmConfig.tsx
|
|
37584
|
-
import React342, { useCallback as useCallback132, useEffect as useEffect130, useMemo as useMemo133, useState as
|
|
37651
|
+
import React342, { useCallback as useCallback132, useEffect as useEffect130, useMemo as useMemo133, useState as useState191 } from "react";
|
|
37585
37652
|
import { Flex as Flex38, Stack as Stack234, Text as Text219 } from "@mantine/core";
|
|
37586
37653
|
|
|
37587
37654
|
// src/mantine/blocks/action/actionTypes/matrixDm/types.ts
|
|
@@ -37606,9 +37673,9 @@ function serializeMatrixDmInputs(inputs) {
|
|
|
37606
37673
|
// src/mantine/blocks/action/actionTypes/matrixDm/MatrixDmConfig.tsx
|
|
37607
37674
|
var MatrixDmConfig = ({ inputs, onInputsChange, editor }) => {
|
|
37608
37675
|
const handlers = useBlocknoteHandlers();
|
|
37609
|
-
const [local, setLocal] =
|
|
37610
|
-
const [roomMembers, setRoomMembers] =
|
|
37611
|
-
const [searchValue, setSearchValue] =
|
|
37676
|
+
const [local, setLocal] = useState191(() => parseMatrixDmInputs(inputs));
|
|
37677
|
+
const [roomMembers, setRoomMembers] = useState191([]);
|
|
37678
|
+
const [searchValue, setSearchValue] = useState191("");
|
|
37612
37679
|
const roomId = editor?.getRoomId?.() || null;
|
|
37613
37680
|
const mx = editor?.getMatrixClient?.() || null;
|
|
37614
37681
|
useEffect130(() => {
|
|
@@ -37694,11 +37761,11 @@ registerActionTypeUI("qi/matrix.dm", {
|
|
|
37694
37761
|
import { IconCalendarPlus } from "@tabler/icons-react";
|
|
37695
37762
|
|
|
37696
37763
|
// src/mantine/blocks/action/actionTypes/calendar/eventCreate/CalendarEventCreateConfig.tsx
|
|
37697
|
-
import React344, { useCallback as useCallback134, useEffect as useEffect132, useState as
|
|
37764
|
+
import React344, { useCallback as useCallback134, useEffect as useEffect132, useState as useState193 } from "react";
|
|
37698
37765
|
import { Divider as Divider26, Stack as Stack236, Text as Text221 } from "@mantine/core";
|
|
37699
37766
|
|
|
37700
37767
|
// src/mantine/blocks/action/actionTypes/_shared/ConnectionSelector.tsx
|
|
37701
|
-
import React343, { useCallback as useCallback133, useEffect as useEffect131, useMemo as useMemo134, useRef as useRef46, useState as
|
|
37768
|
+
import React343, { useCallback as useCallback133, useEffect as useEffect131, useMemo as useMemo134, useRef as useRef46, useState as useState192 } from "react";
|
|
37702
37769
|
import { Alert as Alert50, Button as Button76, Group as Group126, Loader as Loader74, Stack as Stack235, Text as Text220 } from "@mantine/core";
|
|
37703
37770
|
import { IconPlug, IconRefresh as IconRefresh10 } from "@tabler/icons-react";
|
|
37704
37771
|
var POLL_INTERVAL_MS2 = 2e3;
|
|
@@ -37706,11 +37773,11 @@ var CONNECT_TIMEOUT_MS = 12e4;
|
|
|
37706
37773
|
var ConnectionSelector = ({ toolkit, toolkitLabel, value, onChange, disabled }) => {
|
|
37707
37774
|
const handlers = useBlocknoteHandlers();
|
|
37708
37775
|
const entityDid = useMemo134(() => handlers?.getEntityDid?.() || "", [handlers]);
|
|
37709
|
-
const [connections, setConnections] =
|
|
37710
|
-
const [loading, setLoading] =
|
|
37711
|
-
const [hasLoaded, setHasLoaded] =
|
|
37712
|
-
const [connecting, setConnecting] =
|
|
37713
|
-
const [error, setError] =
|
|
37776
|
+
const [connections, setConnections] = useState192([]);
|
|
37777
|
+
const [loading, setLoading] = useState192(false);
|
|
37778
|
+
const [hasLoaded, setHasLoaded] = useState192(false);
|
|
37779
|
+
const [connecting, setConnecting] = useState192(false);
|
|
37780
|
+
const [error, setError] = useState192(null);
|
|
37714
37781
|
const cleanupRef = useRef46(null);
|
|
37715
37782
|
const loadConnections = useCallback133(async () => {
|
|
37716
37783
|
if (!handlers?.integrations?.listConnections) {
|
|
@@ -37858,7 +37925,7 @@ var ConnectionSelector = ({ toolkit, toolkitLabel, value, onChange, disabled })
|
|
|
37858
37925
|
|
|
37859
37926
|
// src/mantine/blocks/action/actionTypes/calendar/eventCreate/CalendarEventCreateConfig.tsx
|
|
37860
37927
|
var CalendarEventCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
37861
|
-
const [local, setLocal] =
|
|
37928
|
+
const [local, setLocal] = useState193(() => parseCalendarEventCreateInputs(inputs));
|
|
37862
37929
|
useEffect132(() => {
|
|
37863
37930
|
setLocal(parseCalendarEventCreateInputs(inputs));
|
|
37864
37931
|
}, [inputs]);
|
|
@@ -37976,7 +38043,7 @@ var CalendarEventCreateConfig = ({ inputs, onInputsChange, editor, blockId }) =>
|
|
|
37976
38043
|
};
|
|
37977
38044
|
|
|
37978
38045
|
// src/mantine/blocks/action/actionTypes/calendar/eventCreate/CalendarEventCreateFlowDetail.tsx
|
|
37979
|
-
import React345, { useCallback as useCallback135, useEffect as useEffect133, useMemo as useMemo135, useState as
|
|
38046
|
+
import React345, { useCallback as useCallback135, useEffect as useEffect133, useMemo as useMemo135, useState as useState194 } from "react";
|
|
37980
38047
|
import { Anchor as Anchor2, Stack as Stack237, Text as Text222 } from "@mantine/core";
|
|
37981
38048
|
var CalendarEventCreateFlowDetail = ({
|
|
37982
38049
|
inputs,
|
|
@@ -38002,7 +38069,7 @@ var CalendarEventCreateFlowDetail = ({
|
|
|
38002
38069
|
},
|
|
38003
38070
|
[parsed, editorDocument, resolveOpts]
|
|
38004
38071
|
);
|
|
38005
|
-
const [local, setLocal] =
|
|
38072
|
+
const [local, setLocal] = useState194(() => ({
|
|
38006
38073
|
summary: resolve("summary"),
|
|
38007
38074
|
start_datetime: resolve("start_datetime"),
|
|
38008
38075
|
end_datetime: resolve("end_datetime"),
|
|
@@ -38038,7 +38105,7 @@ var CalendarEventCreateFlowDetail = ({
|
|
|
38038
38105
|
useEffect133(() => {
|
|
38039
38106
|
registerRuntimeInputs?.(local);
|
|
38040
38107
|
}, [registerRuntimeInputs, local]);
|
|
38041
|
-
const [error, setError] =
|
|
38108
|
+
const [error, setError] = useState194(null);
|
|
38042
38109
|
const execute = useCallback135(async () => {
|
|
38043
38110
|
if (!executeAction) {
|
|
38044
38111
|
setError("Shared action executor is unavailable");
|
|
@@ -38123,7 +38190,7 @@ registerActionTypeUI("qi/calendar.event.create", {
|
|
|
38123
38190
|
import { IconCalendarEvent } from "@tabler/icons-react";
|
|
38124
38191
|
|
|
38125
38192
|
// src/mantine/blocks/action/actionTypes/calendar/eventUpdate/CalendarEventUpdateConfig.tsx
|
|
38126
|
-
import React346, { useCallback as useCallback136, useEffect as useEffect134, useState as
|
|
38193
|
+
import React346, { useCallback as useCallback136, useEffect as useEffect134, useState as useState195 } from "react";
|
|
38127
38194
|
import { Divider as Divider27, Stack as Stack238, Text as Text223 } from "@mantine/core";
|
|
38128
38195
|
|
|
38129
38196
|
// src/core/lib/actionRegistry/actions/calendar/eventUpdate.types.ts
|
|
@@ -38168,7 +38235,7 @@ function serializeCalendarEventUpdateInputs(inputs) {
|
|
|
38168
38235
|
|
|
38169
38236
|
// src/mantine/blocks/action/actionTypes/calendar/eventUpdate/CalendarEventUpdateConfig.tsx
|
|
38170
38237
|
var CalendarEventUpdateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
38171
|
-
const [local, setLocal] =
|
|
38238
|
+
const [local, setLocal] = useState195(() => parseCalendarEventUpdateInputs(inputs));
|
|
38172
38239
|
useEffect134(() => {
|
|
38173
38240
|
setLocal(parseCalendarEventUpdateInputs(inputs));
|
|
38174
38241
|
}, [inputs]);
|
|
@@ -38263,7 +38330,7 @@ var CalendarEventUpdateConfig = ({ inputs, onInputsChange, editor, blockId }) =>
|
|
|
38263
38330
|
};
|
|
38264
38331
|
|
|
38265
38332
|
// src/mantine/blocks/action/actionTypes/calendar/eventUpdate/CalendarEventUpdateFlowDetail.tsx
|
|
38266
|
-
import React347, { useCallback as useCallback137, useEffect as useEffect135, useMemo as useMemo136, useState as
|
|
38333
|
+
import React347, { useCallback as useCallback137, useEffect as useEffect135, useMemo as useMemo136, useState as useState196 } from "react";
|
|
38267
38334
|
import { Anchor as Anchor3, Stack as Stack239, Text as Text224 } from "@mantine/core";
|
|
38268
38335
|
var CalendarEventUpdateFlowDetail = ({
|
|
38269
38336
|
inputs,
|
|
@@ -38289,7 +38356,7 @@ var CalendarEventUpdateFlowDetail = ({
|
|
|
38289
38356
|
},
|
|
38290
38357
|
[parsed, editorDocument, resolveOpts]
|
|
38291
38358
|
);
|
|
38292
|
-
const [local, setLocal] =
|
|
38359
|
+
const [local, setLocal] = useState196(() => ({
|
|
38293
38360
|
event_id: resolve("event_id"),
|
|
38294
38361
|
summary: resolve("summary"),
|
|
38295
38362
|
start_datetime: resolve("start_datetime"),
|
|
@@ -38327,7 +38394,7 @@ var CalendarEventUpdateFlowDetail = ({
|
|
|
38327
38394
|
useEffect135(() => {
|
|
38328
38395
|
registerRuntimeInputs?.(local);
|
|
38329
38396
|
}, [registerRuntimeInputs, local]);
|
|
38330
|
-
const [error, setError] =
|
|
38397
|
+
const [error, setError] = useState196(null);
|
|
38331
38398
|
const execute = useCallback137(async () => {
|
|
38332
38399
|
if (!executeAction) {
|
|
38333
38400
|
setError("Shared action executor is unavailable");
|
|
@@ -38391,7 +38458,7 @@ registerActionTypeUI("qi/calendar.event.update", {
|
|
|
38391
38458
|
import { IconCalendarStats } from "@tabler/icons-react";
|
|
38392
38459
|
|
|
38393
38460
|
// src/mantine/blocks/action/actionTypes/calendar/eventList/CalendarEventListConfig.tsx
|
|
38394
|
-
import React348, { useCallback as useCallback138, useEffect as useEffect136, useState as
|
|
38461
|
+
import React348, { useCallback as useCallback138, useEffect as useEffect136, useState as useState197 } from "react";
|
|
38395
38462
|
import { Divider as Divider28, Group as Group127, Stack as Stack240, Switch as Switch13, Text as Text225 } from "@mantine/core";
|
|
38396
38463
|
|
|
38397
38464
|
// src/core/lib/actionRegistry/actions/calendar/eventList.types.ts
|
|
@@ -38432,7 +38499,7 @@ function serializeCalendarEventListInputs(inputs) {
|
|
|
38432
38499
|
|
|
38433
38500
|
// src/mantine/blocks/action/actionTypes/calendar/eventList/CalendarEventListConfig.tsx
|
|
38434
38501
|
var CalendarEventListConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
38435
|
-
const [local, setLocal] =
|
|
38502
|
+
const [local, setLocal] = useState197(() => parseCalendarEventListInputs(inputs));
|
|
38436
38503
|
useEffect136(() => {
|
|
38437
38504
|
setLocal(parseCalendarEventListInputs(inputs));
|
|
38438
38505
|
}, [inputs]);
|
|
@@ -38510,7 +38577,7 @@ var CalendarEventListConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
38510
38577
|
};
|
|
38511
38578
|
|
|
38512
38579
|
// src/mantine/blocks/action/actionTypes/calendar/eventList/CalendarEventListFlowDetail.tsx
|
|
38513
|
-
import React349, { useCallback as useCallback139, useMemo as useMemo137, useState as
|
|
38580
|
+
import React349, { useCallback as useCallback139, useMemo as useMemo137, useState as useState198 } from "react";
|
|
38514
38581
|
import { Badge as Badge56, Button as Button77, Loader as Loader75, Stack as Stack241 } from "@mantine/core";
|
|
38515
38582
|
import { IconRefresh as IconRefresh11 } from "@tabler/icons-react";
|
|
38516
38583
|
var CalendarEventListFlowDetail = ({ inputs, runtime, isDisabled, executeAction }) => {
|
|
@@ -38520,8 +38587,8 @@ var CalendarEventListFlowDetail = ({ inputs, runtime, isDisabled, executeAction
|
|
|
38520
38587
|
const connection = parsed.connection;
|
|
38521
38588
|
const hasConnection = !!connection?.connectedAccountId;
|
|
38522
38589
|
const entityMismatch = hasConnection && entityDid && connection.entityDid && connection.entityDid !== entityDid;
|
|
38523
|
-
const [loading, setLoading] =
|
|
38524
|
-
const [error, setError] =
|
|
38590
|
+
const [loading, setLoading] = useState198(false);
|
|
38591
|
+
const [error, setError] = useState198(null);
|
|
38525
38592
|
const execute = useCallback139(async () => {
|
|
38526
38593
|
if (!executeAction) {
|
|
38527
38594
|
setError("Shared action executor is unavailable");
|
|
@@ -38563,7 +38630,7 @@ registerActionTypeUI("qi/calendar.event.list", {
|
|
|
38563
38630
|
import { IconUserPlus as IconUserPlus3 } from "@tabler/icons-react";
|
|
38564
38631
|
|
|
38565
38632
|
// src/mantine/blocks/action/actionTypes/xero/contactCreate/XeroContactCreateConfig.tsx
|
|
38566
|
-
import React350, { useCallback as useCallback140, useEffect as useEffect137, useState as
|
|
38633
|
+
import React350, { useCallback as useCallback140, useEffect as useEffect137, useState as useState199 } from "react";
|
|
38567
38634
|
import { Divider as Divider29, Group as Group128, Stack as Stack242, Switch as Switch14, Text as Text226 } from "@mantine/core";
|
|
38568
38635
|
|
|
38569
38636
|
// src/core/lib/actionRegistry/actions/xero/contactCreate.types.ts
|
|
@@ -38616,7 +38683,7 @@ function serializeXeroContactCreateInputs(inputs) {
|
|
|
38616
38683
|
|
|
38617
38684
|
// src/mantine/blocks/action/actionTypes/xero/contactCreate/XeroContactCreateConfig.tsx
|
|
38618
38685
|
var XeroContactCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
38619
|
-
const [local, setLocal] =
|
|
38686
|
+
const [local, setLocal] = useState199(() => parseXeroContactCreateInputs(inputs));
|
|
38620
38687
|
useEffect137(() => {
|
|
38621
38688
|
setLocal(parseXeroContactCreateInputs(inputs));
|
|
38622
38689
|
}, [inputs]);
|
|
@@ -38682,7 +38749,7 @@ var XeroContactCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
38682
38749
|
};
|
|
38683
38750
|
|
|
38684
38751
|
// src/mantine/blocks/action/actionTypes/xero/contactCreate/XeroContactCreateFlowDetail.tsx
|
|
38685
|
-
import React351, { useCallback as useCallback141, useEffect as useEffect138, useMemo as useMemo138, useState as
|
|
38752
|
+
import React351, { useCallback as useCallback141, useEffect as useEffect138, useMemo as useMemo138, useState as useState200 } from "react";
|
|
38686
38753
|
import { Stack as Stack243, Text as Text227 } from "@mantine/core";
|
|
38687
38754
|
var XeroContactCreateFlowDetail = ({
|
|
38688
38755
|
inputs,
|
|
@@ -38708,7 +38775,7 @@ var XeroContactCreateFlowDetail = ({
|
|
|
38708
38775
|
},
|
|
38709
38776
|
[parsed, editorDocument, resolveOpts]
|
|
38710
38777
|
);
|
|
38711
|
-
const [local, setLocal] =
|
|
38778
|
+
const [local, setLocal] = useState200(() => ({
|
|
38712
38779
|
Name: resolve("Name"),
|
|
38713
38780
|
EmailAddress: resolve("EmailAddress"),
|
|
38714
38781
|
FirstName: resolve("FirstName"),
|
|
@@ -38740,7 +38807,7 @@ var XeroContactCreateFlowDetail = ({
|
|
|
38740
38807
|
useEffect138(() => {
|
|
38741
38808
|
registerRuntimeInputs?.(local);
|
|
38742
38809
|
}, [registerRuntimeInputs, local]);
|
|
38743
|
-
const [error, setError] =
|
|
38810
|
+
const [error, setError] = useState200(null);
|
|
38744
38811
|
const execute = useCallback141(async () => {
|
|
38745
38812
|
if (!executeAction) {
|
|
38746
38813
|
setError("Shared action executor is unavailable");
|
|
@@ -38782,7 +38849,7 @@ registerActionTypeUI("qi/xero.contact.create", {
|
|
|
38782
38849
|
import { IconReceipt } from "@tabler/icons-react";
|
|
38783
38850
|
|
|
38784
38851
|
// src/mantine/blocks/action/actionTypes/xero/invoiceCreate/XeroInvoiceCreateConfig.tsx
|
|
38785
|
-
import React353, { useCallback as useCallback143, useEffect as useEffect139, useState as
|
|
38852
|
+
import React353, { useCallback as useCallback143, useEffect as useEffect139, useState as useState201 } from "react";
|
|
38786
38853
|
import { Divider as Divider31, Group as Group130, Stack as Stack245, Text as Text229 } from "@mantine/core";
|
|
38787
38854
|
|
|
38788
38855
|
// src/core/lib/actionRegistry/actions/xero/invoiceCreate.types.ts
|
|
@@ -39150,7 +39217,7 @@ function IterativeMapEditor({
|
|
|
39150
39217
|
|
|
39151
39218
|
// src/mantine/blocks/action/actionTypes/xero/invoiceCreate/XeroInvoiceCreateConfig.tsx
|
|
39152
39219
|
var XeroInvoiceCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
39153
|
-
const [local, setLocal] =
|
|
39220
|
+
const [local, setLocal] = useState201(() => parseXeroInvoiceCreateInputs(inputs));
|
|
39154
39221
|
useEffect139(() => {
|
|
39155
39222
|
setLocal(parseXeroInvoiceCreateInputs(inputs));
|
|
39156
39223
|
}, [inputs]);
|
|
@@ -39258,16 +39325,16 @@ var XeroInvoiceCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
39258
39325
|
};
|
|
39259
39326
|
|
|
39260
39327
|
// src/mantine/blocks/action/actionTypes/xero/invoiceCreate/XeroInvoiceCreateFlowDetail.tsx
|
|
39261
|
-
import React354, { useCallback as useCallback145, useEffect as useEffect142, useMemo as useMemo141, useState as
|
|
39328
|
+
import React354, { useCallback as useCallback145, useEffect as useEffect142, useMemo as useMemo141, useState as useState204 } from "react";
|
|
39262
39329
|
import { Badge as Badge57, Box as Box68, Button as Button79, Group as Group131, Stack as Stack246, Text as Text230 } from "@mantine/core";
|
|
39263
39330
|
import { IconX as IconX19 } from "@tabler/icons-react";
|
|
39264
39331
|
|
|
39265
39332
|
// src/mantine/hooks/useXeroWorkItems.ts
|
|
39266
|
-
import { useEffect as useEffect140, useMemo as useMemo140, useState as
|
|
39333
|
+
import { useEffect as useEffect140, useMemo as useMemo140, useState as useState202 } from "react";
|
|
39267
39334
|
function useXeroWorkItems(editor, filter) {
|
|
39268
39335
|
const workItemsMap = editor?._yXeroWorkItems || null;
|
|
39269
39336
|
const terminalMap = workItemsMap?.doc?.getMap?.(XERO_WORK_TERMINAL_MAP_NAME) || null;
|
|
39270
|
-
const [rev, setRev] =
|
|
39337
|
+
const [rev, setRev] = useState202(0);
|
|
39271
39338
|
useEffect140(() => {
|
|
39272
39339
|
if (!workItemsMap?.observe) return;
|
|
39273
39340
|
const handler = () => setRev((value) => value + 1);
|
|
@@ -39393,11 +39460,11 @@ function getInvoiceTotal(output) {
|
|
|
39393
39460
|
}
|
|
39394
39461
|
|
|
39395
39462
|
// src/mantine/blocks/action/actionTypes/xero/_shared/useFlowXeroConnection.ts
|
|
39396
|
-
import { useCallback as useCallback144, useEffect as useEffect141, useState as
|
|
39463
|
+
import { useCallback as useCallback144, useEffect as useEffect141, useState as useState203 } from "react";
|
|
39397
39464
|
var CONNECTION_KEY = "connection";
|
|
39398
39465
|
function useFlowXeroConnection(editor) {
|
|
39399
39466
|
const connectionMap = editor?._yXeroConnection || null;
|
|
39400
|
-
const [connection, setConnection] =
|
|
39467
|
+
const [connection, setConnection] = useState203(() => connectionMap?.get(CONNECTION_KEY) || null);
|
|
39401
39468
|
useEffect141(() => {
|
|
39402
39469
|
if (!connectionMap?.observe) return;
|
|
39403
39470
|
const sync = () => setConnection(connectionMap.get(CONNECTION_KEY) || null);
|
|
@@ -39515,7 +39582,7 @@ var XeroInvoiceCreateFlowDetail = ({
|
|
|
39515
39582
|
},
|
|
39516
39583
|
[parsed, editor, resolveOpts]
|
|
39517
39584
|
);
|
|
39518
|
-
const [local, setLocal] =
|
|
39585
|
+
const [local, setLocal] = useState204(() => ({
|
|
39519
39586
|
Status: seedFromTemplate("Status"),
|
|
39520
39587
|
ContactID: seedFromTemplate("ContactID"),
|
|
39521
39588
|
ContactName: seedFromTemplate("ContactName"),
|
|
@@ -39525,7 +39592,7 @@ var XeroInvoiceCreateFlowDetail = ({
|
|
|
39525
39592
|
Reference: seedFromTemplate("Reference"),
|
|
39526
39593
|
CurrencyCode: seedFromTemplate("CurrencyCode")
|
|
39527
39594
|
}));
|
|
39528
|
-
const [reviewLineItems, setReviewLineItems] =
|
|
39595
|
+
const [reviewLineItems, setReviewLineItems] = useState204([]);
|
|
39529
39596
|
useEffect142(() => {
|
|
39530
39597
|
setLocal((prev) => {
|
|
39531
39598
|
const next = {
|
|
@@ -39548,7 +39615,7 @@ var XeroInvoiceCreateFlowDetail = ({
|
|
|
39548
39615
|
setLocal((prev) => ({ ...prev, ...patch }));
|
|
39549
39616
|
}, []);
|
|
39550
39617
|
const workItems = useXeroWorkItems(editor, { kind: "invoice.create", assignedBlockId: block.id, statuses: ["pending", "failed", "completed"] });
|
|
39551
|
-
const [selectedWorkItemId, setSelectedWorkItemId] =
|
|
39618
|
+
const [selectedWorkItemId, setSelectedWorkItemId] = useState204("");
|
|
39552
39619
|
const selectedWorkItem = useMemo141(() => workItems.find((item) => item.id === selectedWorkItemId) || null, [workItems, selectedWorkItemId]);
|
|
39553
39620
|
const selectedWorkItemCompleted = selectedWorkItem?.status === "completed";
|
|
39554
39621
|
useEffect142(() => {
|
|
@@ -39608,7 +39675,7 @@ var XeroInvoiceCreateFlowDetail = ({
|
|
|
39608
39675
|
__xeroSelectedWorkItemId: selectedWorkItem && !selectedWorkItemCompleted ? selectedWorkItem.id : ""
|
|
39609
39676
|
});
|
|
39610
39677
|
}, [registerRuntimeInputs, local, selectedWorkItem?.id, selectedWorkItemCompleted, workItems.length]);
|
|
39611
|
-
const [error, setError] =
|
|
39678
|
+
const [error, setError] = useState204(null);
|
|
39612
39679
|
const execute = useCallback145(async () => {
|
|
39613
39680
|
if (selectedWorkItemCompleted) {
|
|
39614
39681
|
return;
|
|
@@ -39894,7 +39961,7 @@ registerActionTypeUI("qi/xero.invoice.create", {
|
|
|
39894
39961
|
import { IconListDetails as IconListDetails2 } from "@tabler/icons-react";
|
|
39895
39962
|
|
|
39896
39963
|
// src/mantine/blocks/action/actionTypes/xero/invoiceList/XeroInvoiceListConfig.tsx
|
|
39897
|
-
import React355, { useCallback as useCallback146, useEffect as useEffect143, useState as
|
|
39964
|
+
import React355, { useCallback as useCallback146, useEffect as useEffect143, useState as useState205 } from "react";
|
|
39898
39965
|
import { Divider as Divider32, Group as Group132, Stack as Stack247, Switch as Switch15, Text as Text231 } from "@mantine/core";
|
|
39899
39966
|
|
|
39900
39967
|
// src/core/lib/actionRegistry/actions/xero/invoiceList.types.ts
|
|
@@ -39937,7 +40004,7 @@ function serializeXeroInvoiceListInputs(inputs) {
|
|
|
39937
40004
|
|
|
39938
40005
|
// src/mantine/blocks/action/actionTypes/xero/invoiceList/XeroInvoiceListConfig.tsx
|
|
39939
40006
|
var XeroInvoiceListConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
39940
|
-
const [local, setLocal] =
|
|
40007
|
+
const [local, setLocal] = useState205(() => parseXeroInvoiceListInputs(inputs));
|
|
39941
40008
|
useEffect143(() => {
|
|
39942
40009
|
setLocal(parseXeroInvoiceListInputs(inputs));
|
|
39943
40010
|
}, [inputs]);
|
|
@@ -40014,7 +40081,7 @@ var XeroInvoiceListConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
40014
40081
|
};
|
|
40015
40082
|
|
|
40016
40083
|
// src/mantine/blocks/action/actionTypes/xero/invoiceList/XeroInvoiceListFlowDetail.tsx
|
|
40017
|
-
import React356, { useCallback as useCallback147, useMemo as useMemo142, useState as
|
|
40084
|
+
import React356, { useCallback as useCallback147, useMemo as useMemo142, useState as useState206 } from "react";
|
|
40018
40085
|
import { Badge as Badge58, Button as Button80, Loader as Loader76, Stack as Stack248 } from "@mantine/core";
|
|
40019
40086
|
import { IconRefresh as IconRefresh12 } from "@tabler/icons-react";
|
|
40020
40087
|
var XeroInvoiceListFlowDetail = ({ inputs, runtime, isDisabled, executeAction }) => {
|
|
@@ -40024,8 +40091,8 @@ var XeroInvoiceListFlowDetail = ({ inputs, runtime, isDisabled, executeAction })
|
|
|
40024
40091
|
const connection = parsed.connection;
|
|
40025
40092
|
const hasConnection = !!connection?.connectedAccountId;
|
|
40026
40093
|
const entityMismatch = hasConnection && entityDid && connection.entityDid && connection.entityDid !== entityDid;
|
|
40027
|
-
const [loading, setLoading] =
|
|
40028
|
-
const [error, setError] =
|
|
40094
|
+
const [loading, setLoading] = useState206(false);
|
|
40095
|
+
const [error, setError] = useState206(null);
|
|
40029
40096
|
const execute = useCallback147(async () => {
|
|
40030
40097
|
if (!executeAction) {
|
|
40031
40098
|
setError("Shared action executor is unavailable");
|
|
@@ -40067,11 +40134,11 @@ registerActionTypeUI("qi/xero.invoice.list", {
|
|
|
40067
40134
|
import { IconReceipt as IconReceipt2 } from "@tabler/icons-react";
|
|
40068
40135
|
|
|
40069
40136
|
// src/mantine/blocks/action/actionTypes/xero/paymentCreate/XeroPaymentCreateConfig.tsx
|
|
40070
|
-
import React358, { useCallback as useCallback149, useEffect as useEffect145, useState as
|
|
40137
|
+
import React358, { useCallback as useCallback149, useEffect as useEffect145, useState as useState208 } from "react";
|
|
40071
40138
|
import { Divider as Divider33, Group as Group134, Stack as Stack250, Switch as Switch16, Text as Text233 } from "@mantine/core";
|
|
40072
40139
|
|
|
40073
40140
|
// src/mantine/blocks/action/actionTypes/xero/_shared/XeroBankAccountPicker.tsx
|
|
40074
|
-
import React357, { useCallback as useCallback148, useEffect as useEffect144, useRef as useRef47, useState as
|
|
40141
|
+
import React357, { useCallback as useCallback148, useEffect as useEffect144, useRef as useRef47, useState as useState207 } from "react";
|
|
40075
40142
|
import { ActionIcon as ActionIcon50, Group as Group133, Loader as Loader77, Stack as Stack249, Text as Text232 } from "@mantine/core";
|
|
40076
40143
|
import { IconRefresh as IconRefresh13 } from "@tabler/icons-react";
|
|
40077
40144
|
var XERO_LIST_ACCOUNTS_SLUG = "XERO_LIST_ACCOUNTS";
|
|
@@ -40087,9 +40154,9 @@ var XeroBankAccountPicker = ({
|
|
|
40087
40154
|
disabled
|
|
40088
40155
|
}) => {
|
|
40089
40156
|
const handlers = useBlocknoteHandlers();
|
|
40090
|
-
const [bankAccounts, setBankAccounts] =
|
|
40091
|
-
const [loading, setLoading] =
|
|
40092
|
-
const [error, setError] =
|
|
40157
|
+
const [bankAccounts, setBankAccounts] = useState207([]);
|
|
40158
|
+
const [loading, setLoading] = useState207(false);
|
|
40159
|
+
const [error, setError] = useState207(null);
|
|
40093
40160
|
const fetchBankAccounts = useCallback148(async () => {
|
|
40094
40161
|
if (!connectedAccountId || !handlers?.integrations?.executeTool) {
|
|
40095
40162
|
setBankAccounts([]);
|
|
@@ -40170,7 +40237,7 @@ var XeroBankAccountPicker = ({
|
|
|
40170
40237
|
|
|
40171
40238
|
// src/mantine/blocks/action/actionTypes/xero/paymentCreate/XeroPaymentCreateConfig.tsx
|
|
40172
40239
|
var XeroPaymentCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
40173
|
-
const [local, setLocal] =
|
|
40240
|
+
const [local, setLocal] = useState208(() => parseXeroPaymentCreateInputs(inputs));
|
|
40174
40241
|
useEffect145(() => {
|
|
40175
40242
|
setLocal(parseXeroPaymentCreateInputs(inputs));
|
|
40176
40243
|
}, [inputs]);
|
|
@@ -40270,7 +40337,7 @@ var XeroPaymentCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
40270
40337
|
};
|
|
40271
40338
|
|
|
40272
40339
|
// src/mantine/blocks/action/actionTypes/xero/paymentCreate/XeroPaymentCreateFlowDetail.tsx
|
|
40273
|
-
import React359, { useCallback as useCallback150, useEffect as useEffect146, useMemo as useMemo143, useState as
|
|
40340
|
+
import React359, { useCallback as useCallback150, useEffect as useEffect146, useMemo as useMemo143, useState as useState209 } from "react";
|
|
40274
40341
|
import { Badge as Badge59, Box as Box69, Button as Button81, Group as Group135, Stack as Stack251, Text as Text234 } from "@mantine/core";
|
|
40275
40342
|
import { IconX as IconX20 } from "@tabler/icons-react";
|
|
40276
40343
|
function shortId2(value, length = 10) {
|
|
@@ -40315,7 +40382,7 @@ var XeroPaymentCreateFlowDetail = ({
|
|
|
40315
40382
|
},
|
|
40316
40383
|
[parsed, editor, resolveOpts]
|
|
40317
40384
|
);
|
|
40318
|
-
const [local, setLocal] =
|
|
40385
|
+
const [local, setLocal] = useState209(() => ({
|
|
40319
40386
|
InvoiceID: seedFromTemplate("InvoiceID"),
|
|
40320
40387
|
AccountID: seedFromTemplate("AccountID"),
|
|
40321
40388
|
Amount: seedFromTemplate("Amount"),
|
|
@@ -40353,7 +40420,7 @@ var XeroPaymentCreateFlowDetail = ({
|
|
|
40353
40420
|
);
|
|
40354
40421
|
const managedByOracle = parsed.managedByOracle;
|
|
40355
40422
|
const workItems = useXeroWorkItems(editor, { kind: "payment.create", assignedBlockId: block.id, statuses: ["pending", "approved", "failed", "completed"] });
|
|
40356
|
-
const [selectedWorkItemId, setSelectedWorkItemId] =
|
|
40423
|
+
const [selectedWorkItemId, setSelectedWorkItemId] = useState209("");
|
|
40357
40424
|
const selectedWorkItem = useMemo143(() => workItems.find((item) => item.id === selectedWorkItemId) || null, [workItems, selectedWorkItemId]);
|
|
40358
40425
|
const selectedWorkItemCompleted = selectedWorkItem?.status === "completed";
|
|
40359
40426
|
const selectedWorkItemApproved = selectedWorkItem?.status === "approved";
|
|
@@ -40404,7 +40471,7 @@ var XeroPaymentCreateFlowDetail = ({
|
|
|
40404
40471
|
__xeroSelectedWorkItemId: selectedWorkItem && !selectedWorkItemCompleted ? selectedWorkItem.id : ""
|
|
40405
40472
|
});
|
|
40406
40473
|
}, [registerRuntimeInputs, local, selectedWorkItem?.id, selectedWorkItemCompleted, workItems.length]);
|
|
40407
|
-
const [error, setError] =
|
|
40474
|
+
const [error, setError] = useState209(null);
|
|
40408
40475
|
const execute = useCallback150(async () => {
|
|
40409
40476
|
if (selectedWorkItemCompleted) {
|
|
40410
40477
|
return;
|
|
@@ -40602,22 +40669,22 @@ import { IconBrandGmail } from "@tabler/icons-react";
|
|
|
40602
40669
|
import { createElement } from "react";
|
|
40603
40670
|
|
|
40604
40671
|
// src/mantine/blocks/action/actionTypes/_shared/DelegatedActionConfig.tsx
|
|
40605
|
-
import React362, { useCallback as useCallback152, useEffect as useEffect148, useState as
|
|
40672
|
+
import React362, { useCallback as useCallback152, useEffect as useEffect148, useState as useState212 } from "react";
|
|
40606
40673
|
import { Divider as Divider34, Stack as Stack254 } from "@mantine/core";
|
|
40607
40674
|
|
|
40608
40675
|
// src/mantine/blocks/action/actionTypes/_shared/BoundConnectionSelector.tsx
|
|
40609
|
-
import React360, { useCallback as useCallback151, useEffect as useEffect147, useRef as useRef48, useState as
|
|
40676
|
+
import React360, { useCallback as useCallback151, useEffect as useEffect147, useRef as useRef48, useState as useState210 } from "react";
|
|
40610
40677
|
import { Alert as Alert52, Badge as Badge60, Button as Button82, Group as Group136, Loader as Loader78, Stack as Stack252, Text as Text235 } from "@mantine/core";
|
|
40611
40678
|
import { IconCheck as IconCheck30, IconPlug as IconPlug2, IconRefresh as IconRefresh14, IconTrash as IconTrash12 } from "@tabler/icons-react";
|
|
40612
40679
|
var POLL_INTERVAL_MS3 = 2e3;
|
|
40613
40680
|
var CONNECT_TIMEOUT_MS2 = 12e4;
|
|
40614
40681
|
var BoundConnectionSelector = ({ toolkit, toolkitLabel, templateId, connection, onConnectionChange, mode, disabled }) => {
|
|
40615
40682
|
const handlers = useBlocknoteHandlers();
|
|
40616
|
-
const [manifest, setManifest] =
|
|
40617
|
-
const [loading, setLoading] =
|
|
40618
|
-
const [connecting, setConnecting] =
|
|
40619
|
-
const [binding, setBinding] =
|
|
40620
|
-
const [error, setError] =
|
|
40683
|
+
const [manifest, setManifest] = useState210(null);
|
|
40684
|
+
const [loading, setLoading] = useState210(false);
|
|
40685
|
+
const [connecting, setConnecting] = useState210(false);
|
|
40686
|
+
const [binding, setBinding] = useState210(false);
|
|
40687
|
+
const [error, setError] = useState210(null);
|
|
40621
40688
|
const cleanupRef = useRef48(null);
|
|
40622
40689
|
const loadManifest = useCallback151(async () => {
|
|
40623
40690
|
if (mode !== "template") return;
|
|
@@ -40781,7 +40848,7 @@ var BoundConnectionSelector = ({ toolkit, toolkitLabel, templateId, connection,
|
|
|
40781
40848
|
};
|
|
40782
40849
|
|
|
40783
40850
|
// src/mantine/blocks/action/actionTypes/_shared/DynamicToolForm.tsx
|
|
40784
|
-
import React361, { useMemo as useMemo144, useState as
|
|
40851
|
+
import React361, { useMemo as useMemo144, useState as useState211 } from "react";
|
|
40785
40852
|
import { Button as Button83, Collapse as Collapse11, Stack as Stack253 } from "@mantine/core";
|
|
40786
40853
|
import { IconChevronDown as IconChevronDown11, IconChevronRight as IconChevronRight13 } from "@tabler/icons-react";
|
|
40787
40854
|
var ALWAYS_EXCLUDE = /* @__PURE__ */ new Set(["user_id", "connected_account_id"]);
|
|
@@ -40808,7 +40875,7 @@ var DynamicToolForm = ({ schema, values, onChange, editorDocument, blockId, read
|
|
|
40808
40875
|
}
|
|
40809
40876
|
return { required: req, optional: opt };
|
|
40810
40877
|
}, [schema, exclude]);
|
|
40811
|
-
const [showOptional, setShowOptional] =
|
|
40878
|
+
const [showOptional, setShowOptional] = useState211(false);
|
|
40812
40879
|
const renderField = (field) => {
|
|
40813
40880
|
if (field.type === "boolean") {
|
|
40814
40881
|
return /* @__PURE__ */ React361.createElement(
|
|
@@ -40864,7 +40931,7 @@ var DynamicToolForm = ({ schema, values, onChange, editorDocument, blockId, read
|
|
|
40864
40931
|
|
|
40865
40932
|
// src/mantine/blocks/action/actionTypes/_shared/DelegatedActionConfig.tsx
|
|
40866
40933
|
var DelegatedActionConfig = ({ inputs, onInputsChange, editor, blockId, toolkit, toolkitLabel, schema }) => {
|
|
40867
|
-
const [local, setLocal] =
|
|
40934
|
+
const [local, setLocal] = useState212(() => parseDelegatedToolInputs(inputs));
|
|
40868
40935
|
useEffect148(() => {
|
|
40869
40936
|
setLocal(parseDelegatedToolInputs(inputs));
|
|
40870
40937
|
}, [inputs]);
|
|
@@ -40892,7 +40959,7 @@ var DelegatedActionConfig = ({ inputs, onInputsChange, editor, blockId, toolkit,
|
|
|
40892
40959
|
};
|
|
40893
40960
|
|
|
40894
40961
|
// src/mantine/blocks/action/actionTypes/_shared/DelegatedActionFlowDetail.tsx
|
|
40895
|
-
import React363, { useCallback as useCallback153, useEffect as useEffect149, useMemo as useMemo145, useRef as useRef49, useState as
|
|
40962
|
+
import React363, { useCallback as useCallback153, useEffect as useEffect149, useMemo as useMemo145, useRef as useRef49, useState as useState213 } from "react";
|
|
40896
40963
|
import { Button as Button84, Loader as Loader79, Stack as Stack255, Text as Text236 } from "@mantine/core";
|
|
40897
40964
|
import { IconSend as IconSend9 } from "@tabler/icons-react";
|
|
40898
40965
|
var DelegatedActionFlowDetail = ({
|
|
@@ -40923,7 +40990,7 @@ var DelegatedActionFlowDetail = ({
|
|
|
40923
40990
|
},
|
|
40924
40991
|
[parsed, editorDocument, resolveOpts]
|
|
40925
40992
|
);
|
|
40926
|
-
const [local, setLocal] =
|
|
40993
|
+
const [local, setLocal] = useState213(() => {
|
|
40927
40994
|
const seed = {};
|
|
40928
40995
|
for (const name of fieldNames) seed[name] = resolve(name);
|
|
40929
40996
|
return seed;
|
|
@@ -40946,8 +41013,8 @@ var DelegatedActionFlowDetail = ({
|
|
|
40946
41013
|
const isCompleted = runtime.state === "completed";
|
|
40947
41014
|
const missing = useMemo145(() => missingRequired(schema, local), [schema, local]);
|
|
40948
41015
|
const canRun = hasBinding && missing.length === 0 && !isCompleted && !isDisabled;
|
|
40949
|
-
const [error, setError] =
|
|
40950
|
-
const [submitting, setSubmitting] =
|
|
41016
|
+
const [error, setError] = useState213(null);
|
|
41017
|
+
const [submitting, setSubmitting] = useState213(false);
|
|
40951
41018
|
const run = useCallback153(
|
|
40952
41019
|
async (pendingInvocationId) => {
|
|
40953
41020
|
if (!executeAction) {
|
|
@@ -41042,7 +41109,7 @@ registerActionTypeUI("qi/googlecalendar.event.create", {
|
|
|
41042
41109
|
import { IconLeaf as IconLeaf4 } from "@tabler/icons-react";
|
|
41043
41110
|
|
|
41044
41111
|
// src/mantine/blocks/action/actionTypes/carbon/loadBatches/LoadBatchesConfig.tsx
|
|
41045
|
-
import React364, { useCallback as useCallback154, useEffect as useEffect150, useState as
|
|
41112
|
+
import React364, { useCallback as useCallback154, useEffect as useEffect150, useState as useState214 } from "react";
|
|
41046
41113
|
import { Stack as Stack256, Text as Text237 } from "@mantine/core";
|
|
41047
41114
|
|
|
41048
41115
|
// src/mantine/blocks/action/actionTypes/carbon/loadBatches/types.ts
|
|
@@ -41060,7 +41127,7 @@ function serializeLoadBatchesInputs(inputs) {
|
|
|
41060
41127
|
|
|
41061
41128
|
// src/mantine/blocks/action/actionTypes/carbon/loadBatches/LoadBatchesConfig.tsx
|
|
41062
41129
|
var LoadBatchesConfig = ({ inputs, onInputsChange }) => {
|
|
41063
|
-
const [local, setLocal] =
|
|
41130
|
+
const [local, setLocal] = useState214(() => parseLoadBatchesInputs(inputs));
|
|
41064
41131
|
useEffect150(() => {
|
|
41065
41132
|
setLocal(parseLoadBatchesInputs(inputs));
|
|
41066
41133
|
}, [inputs]);
|
|
@@ -41168,11 +41235,11 @@ registerActionTypeUI("qi/carbon.loadBatches", {
|
|
|
41168
41235
|
import { IconLeaf as IconLeaf5 } from "@tabler/icons-react";
|
|
41169
41236
|
|
|
41170
41237
|
// src/mantine/blocks/action/actionTypes/carbon/harvest/HarvestConfig.tsx
|
|
41171
|
-
import React367, { useCallback as useCallback156, useEffect as useEffect152, useState as
|
|
41238
|
+
import React367, { useCallback as useCallback156, useEffect as useEffect152, useState as useState216 } from "react";
|
|
41172
41239
|
import { Stack as Stack259, Text as Text240 } from "@mantine/core";
|
|
41173
41240
|
|
|
41174
41241
|
// src/mantine/blocks/action/actionTypes/carbon/BatchesSourceSelect.tsx
|
|
41175
|
-
import React366, { useMemo as useMemo147, useState as
|
|
41242
|
+
import React366, { useMemo as useMemo147, useState as useState215 } from "react";
|
|
41176
41243
|
import { Anchor as Anchor4, Select as Select10, Stack as Stack258, Text as Text239 } from "@mantine/core";
|
|
41177
41244
|
var LOAD_BATCHES_ACTION_TYPE = "qi/carbon.loadBatches";
|
|
41178
41245
|
function refFor(blockId, field) {
|
|
@@ -41188,7 +41255,7 @@ var BatchesSourceSelect = ({ outputField, value, onChange, editorDocument, curre
|
|
|
41188
41255
|
return blocks.filter((b) => b?.id && b.id !== currentBlockId && b.props?.actionType === LOAD_BATCHES_ACTION_TYPE).map((b) => ({ value: b.id, label: String(b.props?.title || "Load Carbon Batches") }));
|
|
41189
41256
|
}, [editorDocument, currentBlockId]);
|
|
41190
41257
|
const selectedBlockId = useMemo147(() => matchBlockId(value, outputField), [value, outputField]);
|
|
41191
|
-
const [manual, setManual] =
|
|
41258
|
+
const [manual, setManual] = useState215(!!value && !selectedBlockId);
|
|
41192
41259
|
if (manual || options.length === 0 && !selectedBlockId) {
|
|
41193
41260
|
return /* @__PURE__ */ React366.createElement(Stack258, { gap: 4 }, /* @__PURE__ */ React366.createElement(
|
|
41194
41261
|
DataInput,
|
|
@@ -41233,7 +41300,7 @@ function serializeHarvestConfigInputs(inputs) {
|
|
|
41233
41300
|
|
|
41234
41301
|
// src/mantine/blocks/action/actionTypes/carbon/harvest/HarvestConfig.tsx
|
|
41235
41302
|
var HarvestConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
41236
|
-
const [local, setLocal] =
|
|
41303
|
+
const [local, setLocal] = useState216(() => parseHarvestConfigInputs(inputs));
|
|
41237
41304
|
useEffect152(() => {
|
|
41238
41305
|
setLocal(parseHarvestConfigInputs(inputs));
|
|
41239
41306
|
}, [inputs]);
|
|
@@ -41260,7 +41327,7 @@ var HarvestConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
41260
41327
|
};
|
|
41261
41328
|
|
|
41262
41329
|
// src/mantine/blocks/action/actionTypes/carbon/harvest/HarvestFlowDetail.tsx
|
|
41263
|
-
import React368, { useCallback as useCallback157, useEffect as useEffect153, useMemo as useMemo148, useState as
|
|
41330
|
+
import React368, { useCallback as useCallback157, useEffect as useEffect153, useMemo as useMemo148, useState as useState217 } from "react";
|
|
41264
41331
|
import { Checkbox as Checkbox15, Stack as Stack260, Switch as Switch17, Text as Text241 } from "@mantine/core";
|
|
41265
41332
|
import { IconAlertCircle as IconAlertCircle33, IconCheck as IconCheck31 } from "@tabler/icons-react";
|
|
41266
41333
|
function parseBatches(resolved) {
|
|
@@ -41296,9 +41363,9 @@ var HarvestFlowDetail = ({
|
|
|
41296
41363
|
const editorDocument = editor?.document || [];
|
|
41297
41364
|
const resolveOpts = useMemo148(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
41298
41365
|
const batches = useMemo148(() => parseBatches(resolveReferences(parsed.batchesRef || "", editorDocument, resolveOpts)), [parsed.batchesRef, editorDocument, resolveOpts]);
|
|
41299
|
-
const [harvestAll, setHarvestAll] =
|
|
41300
|
-
const [selectedIds, setSelectedIds] =
|
|
41301
|
-
const [error, setError] =
|
|
41366
|
+
const [harvestAll, setHarvestAll] = useState217(true);
|
|
41367
|
+
const [selectedIds, setSelectedIds] = useState217(/* @__PURE__ */ new Set());
|
|
41368
|
+
const [error, setError] = useState217(null);
|
|
41302
41369
|
const effectiveBatches = useMemo148(() => harvestAll ? batches : batches.filter((b) => selectedIds.has(b.id)), [harvestAll, batches, selectedIds]);
|
|
41303
41370
|
const effectiveCount = effectiveBatches.length;
|
|
41304
41371
|
const txHash = runtime.output?.transactionHash || "";
|
|
@@ -41375,7 +41442,7 @@ registerActionTypeUI("qi/carbon.harvest", {
|
|
|
41375
41442
|
import { IconFlame as IconFlame3 } from "@tabler/icons-react";
|
|
41376
41443
|
|
|
41377
41444
|
// src/mantine/blocks/action/actionTypes/carbon/retire/RetireConfig.tsx
|
|
41378
|
-
import React369, { useCallback as useCallback158, useEffect as useEffect154, useState as
|
|
41445
|
+
import React369, { useCallback as useCallback158, useEffect as useEffect154, useState as useState218 } from "react";
|
|
41379
41446
|
import { Stack as Stack261, Text as Text242 } from "@mantine/core";
|
|
41380
41447
|
|
|
41381
41448
|
// src/mantine/blocks/action/actionTypes/carbon/retire/types.ts
|
|
@@ -41393,7 +41460,7 @@ function serializeRetireConfigInputs(inputs) {
|
|
|
41393
41460
|
|
|
41394
41461
|
// src/mantine/blocks/action/actionTypes/carbon/retire/RetireConfig.tsx
|
|
41395
41462
|
var RetireConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
41396
|
-
const [local, setLocal] =
|
|
41463
|
+
const [local, setLocal] = useState218(() => parseRetireConfigInputs(inputs));
|
|
41397
41464
|
useEffect154(() => {
|
|
41398
41465
|
setLocal(parseRetireConfigInputs(inputs));
|
|
41399
41466
|
}, [inputs]);
|
|
@@ -41420,7 +41487,7 @@ var RetireConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
41420
41487
|
};
|
|
41421
41488
|
|
|
41422
41489
|
// src/mantine/blocks/action/actionTypes/carbon/retire/RetireFlowDetail.tsx
|
|
41423
|
-
import React370, { useCallback as useCallback159, useEffect as useEffect155, useMemo as useMemo149, useState as
|
|
41490
|
+
import React370, { useCallback as useCallback159, useEffect as useEffect155, useMemo as useMemo149, useState as useState219 } from "react";
|
|
41424
41491
|
import { Group as Group138, NumberInput as NumberInput14, Stack as Stack262, Switch as Switch18, Text as Text243 } from "@mantine/core";
|
|
41425
41492
|
import { IconAlertTriangle as IconAlertTriangle12, IconCheck as IconCheck32, IconAlertCircle as IconAlertCircle34 } from "@tabler/icons-react";
|
|
41426
41493
|
function parseBatches2(resolved) {
|
|
@@ -41460,13 +41527,13 @@ var RetireFlowDetail = ({
|
|
|
41460
41527
|
const editorDocument = editor?.document || [];
|
|
41461
41528
|
const resolveOpts = useMemo149(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
41462
41529
|
const batches = useMemo149(() => parseBatches2(resolveReferences(parsed.batchesRef || "", editorDocument, resolveOpts)), [parsed.batchesRef, editorDocument, resolveOpts]);
|
|
41463
|
-
const [retireAll, setRetireAll] =
|
|
41464
|
-
const [amounts, setAmounts] =
|
|
41465
|
-
const [reason, setReason] =
|
|
41466
|
-
const [country, setCountry] =
|
|
41467
|
-
const [stateRegion, setStateRegion] =
|
|
41468
|
-
const [postal, setPostal] =
|
|
41469
|
-
const [error, setError] =
|
|
41530
|
+
const [retireAll, setRetireAll] = useState219(true);
|
|
41531
|
+
const [amounts, setAmounts] = useState219({});
|
|
41532
|
+
const [reason, setReason] = useState219(parsed.reason || "offset");
|
|
41533
|
+
const [country, setCountry] = useState219("");
|
|
41534
|
+
const [stateRegion, setStateRegion] = useState219("");
|
|
41535
|
+
const [postal, setPostal] = useState219("");
|
|
41536
|
+
const [error, setError] = useState219(null);
|
|
41470
41537
|
const effectiveSelections = useMemo149(() => {
|
|
41471
41538
|
if (retireAll) return batches.map((b) => ({ id: b.id, amount: Number(b.amount) || 0 })).filter((s) => s.amount > 0);
|
|
41472
41539
|
return batches.map((b) => ({ id: b.id, amount: Number(amounts[b.id]) || 0 })).filter((s) => s.amount > 0);
|
|
@@ -41548,7 +41615,7 @@ registerActionTypeUI("qi/carbon.retire", {
|
|
|
41548
41615
|
import { IconTransfer } from "@tabler/icons-react";
|
|
41549
41616
|
|
|
41550
41617
|
// src/mantine/blocks/action/actionTypes/entityTransfer/EntityTransferConfig.tsx
|
|
41551
|
-
import React371, { useCallback as useCallback160, useEffect as useEffect156, useState as
|
|
41618
|
+
import React371, { useCallback as useCallback160, useEffect as useEffect156, useState as useState220 } from "react";
|
|
41552
41619
|
import { Stack as Stack263, Text as Text244 } from "@mantine/core";
|
|
41553
41620
|
|
|
41554
41621
|
// src/mantine/blocks/action/actionTypes/entityTransfer/types.ts
|
|
@@ -41571,7 +41638,7 @@ function serializeEntityTransferConfigInputs(inputs) {
|
|
|
41571
41638
|
|
|
41572
41639
|
// src/mantine/blocks/action/actionTypes/entityTransfer/EntityTransferConfig.tsx
|
|
41573
41640
|
var EntityTransferConfig = ({ inputs, onInputsChange }) => {
|
|
41574
|
-
const [local, setLocal] =
|
|
41641
|
+
const [local, setLocal] = useState220(() => parseEntityTransferConfigInputs(inputs));
|
|
41575
41642
|
useEffect156(() => {
|
|
41576
41643
|
setLocal(parseEntityTransferConfigInputs(inputs));
|
|
41577
41644
|
}, [inputs]);
|
|
@@ -41619,7 +41686,7 @@ var EntityTransferConfig = ({ inputs, onInputsChange }) => {
|
|
|
41619
41686
|
};
|
|
41620
41687
|
|
|
41621
41688
|
// src/mantine/blocks/action/actionTypes/entityTransfer/EntityTransferFlowDetail.tsx
|
|
41622
|
-
import React372, { useCallback as useCallback161, useEffect as useEffect157, useMemo as useMemo150, useState as
|
|
41689
|
+
import React372, { useCallback as useCallback161, useEffect as useEffect157, useMemo as useMemo150, useState as useState221 } from "react";
|
|
41623
41690
|
import { Button as Button86, Group as Group139, Loader as Loader81, Stack as Stack264, Text as Text245 } from "@mantine/core";
|
|
41624
41691
|
import { IconAlertTriangle as IconAlertTriangle13, IconCheck as IconCheck33, IconAlertCircle as IconAlertCircle35 } from "@tabler/icons-react";
|
|
41625
41692
|
var EntityTransferFlowDetail = ({
|
|
@@ -41650,8 +41717,8 @@ var EntityTransferFlowDetail = ({
|
|
|
41650
41717
|
const templateRecipient = useMemo150(() => resolve(parsed.recipientDid), [resolve, parsed.recipientDid]);
|
|
41651
41718
|
const resolvedOwnerDid = useMemo150(() => resolve(parsed.ownerDid) || currentUser?.did || "", [resolve, parsed.ownerDid, currentUser]);
|
|
41652
41719
|
const resolvedOwnerAddress = useMemo150(() => resolve(parsed.ownerAddress) || currentUser?.address || "", [resolve, parsed.ownerAddress, currentUser]);
|
|
41653
|
-
const [recipientInput, setRecipientInput] =
|
|
41654
|
-
const [error, setError] =
|
|
41720
|
+
const [recipientInput, setRecipientInput] = useState221("");
|
|
41721
|
+
const [error, setError] = useState221(null);
|
|
41655
41722
|
const effectiveRecipient = (recipientInput.trim() || templateRecipient).trim();
|
|
41656
41723
|
const inputsReady = !!(resolvedEntityDid && effectiveRecipient);
|
|
41657
41724
|
const txHash = runtime.output?.transactionHash || "";
|
|
@@ -41732,7 +41799,7 @@ registerActionTypeUI("qi/entity.transfer", {
|
|
|
41732
41799
|
import { IconId as IconId2 } from "@tabler/icons-react";
|
|
41733
41800
|
|
|
41734
41801
|
// src/mantine/blocks/action/actionTypes/kycVerify/KycVerifyConfig.tsx
|
|
41735
|
-
import React373, { useCallback as useCallback162, useEffect as useEffect158, useState as
|
|
41802
|
+
import React373, { useCallback as useCallback162, useEffect as useEffect158, useState as useState222 } from "react";
|
|
41736
41803
|
import { Stack as Stack265, Text as Text246 } from "@mantine/core";
|
|
41737
41804
|
|
|
41738
41805
|
// src/mantine/blocks/action/actionTypes/kycVerify/types.ts
|
|
@@ -41775,7 +41842,7 @@ function kycStepperIndex(status) {
|
|
|
41775
41842
|
|
|
41776
41843
|
// src/mantine/blocks/action/actionTypes/kycVerify/KycVerifyConfig.tsx
|
|
41777
41844
|
var KycVerifyConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
41778
|
-
const [local, setLocal] =
|
|
41845
|
+
const [local, setLocal] = useState222(() => parseKycVerifyInputs(inputs));
|
|
41779
41846
|
useEffect158(() => {
|
|
41780
41847
|
setLocal(parseKycVerifyInputs(inputs));
|
|
41781
41848
|
}, [inputs]);
|
|
@@ -41812,7 +41879,7 @@ var KycVerifyConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
41812
41879
|
};
|
|
41813
41880
|
|
|
41814
41881
|
// src/mantine/blocks/action/actionTypes/kycVerify/KycVerifyFlowDetail.tsx
|
|
41815
|
-
import React374, { useCallback as useCallback163, useEffect as useEffect159, useMemo as useMemo151, useRef as useRef51, useState as
|
|
41882
|
+
import React374, { useCallback as useCallback163, useEffect as useEffect159, useMemo as useMemo151, useRef as useRef51, useState as useState223 } from "react";
|
|
41816
41883
|
import { Button as Button87, Group as Group140, Loader as Loader82, Radio as Radio6, Stack as Stack266, Stepper, Text as Text247 } from "@mantine/core";
|
|
41817
41884
|
import { IconAlertCircle as IconAlertCircle36, IconCheck as IconCheck34, IconExternalLink as IconExternalLink3, IconId, IconRefresh as IconRefresh15 } from "@tabler/icons-react";
|
|
41818
41885
|
import { SurveyModel as SurveyModel13 } from "@ixo/surveys";
|
|
@@ -41852,15 +41919,15 @@ var KycVerifyFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDi
|
|
|
41852
41919
|
const isStale = runtime.state === "completed" && !hasProof;
|
|
41853
41920
|
const isFailed = runtime.state === "failed";
|
|
41854
41921
|
const runtimeError = runtime.error?.message || null;
|
|
41855
|
-
const [form, setForm] =
|
|
41856
|
-
const [serverStatus, setServerStatus] =
|
|
41857
|
-
const [loadingForm, setLoadingForm] =
|
|
41858
|
-
const [loadError, setLoadError] =
|
|
41859
|
-
const [loadRetryKey, setLoadRetryKey] =
|
|
41860
|
-
const [busy, setBusy] =
|
|
41861
|
-
const [actionError, setActionError] =
|
|
41862
|
-
const [fallbackUrl, setFallbackUrl] =
|
|
41863
|
-
const [selectedCredentialCid, setSelectedCredentialCid] =
|
|
41922
|
+
const [form, setForm] = useState223(null);
|
|
41923
|
+
const [serverStatus, setServerStatus] = useState223(null);
|
|
41924
|
+
const [loadingForm, setLoadingForm] = useState223(false);
|
|
41925
|
+
const [loadError, setLoadError] = useState223(null);
|
|
41926
|
+
const [loadRetryKey, setLoadRetryKey] = useState223(0);
|
|
41927
|
+
const [busy, setBusy] = useState223(null);
|
|
41928
|
+
const [actionError, setActionError] = useState223(null);
|
|
41929
|
+
const [fallbackUrl, setFallbackUrl] = useState223(null);
|
|
41930
|
+
const [selectedCredentialCid, setSelectedCredentialCid] = useState223(null);
|
|
41864
41931
|
const surveyDataRef = useRef51(null);
|
|
41865
41932
|
useEffect159(() => {
|
|
41866
41933
|
if (!kycAvailable || !inputsReady || !protocolDid) return;
|
|
@@ -42262,7 +42329,7 @@ registerActionTypeUI("qi/wallet.generate", {
|
|
|
42262
42329
|
import { IconCoin as IconCoin6 } from "@tabler/icons-react";
|
|
42263
42330
|
|
|
42264
42331
|
// src/mantine/blocks/action/actionTypes/walletFund/WalletFundConfig.tsx
|
|
42265
|
-
import React377, { useCallback as useCallback165, useEffect as useEffect160, useState as
|
|
42332
|
+
import React377, { useCallback as useCallback165, useEffect as useEffect160, useState as useState224 } from "react";
|
|
42266
42333
|
import { Stack as Stack269, Text as Text250, NumberInput as NumberInput15 } from "@mantine/core";
|
|
42267
42334
|
|
|
42268
42335
|
// src/mantine/blocks/action/actionTypes/walletFund/types.ts
|
|
@@ -42287,7 +42354,7 @@ function serializeWalletFundInputs(inputs) {
|
|
|
42287
42354
|
|
|
42288
42355
|
// src/mantine/blocks/action/actionTypes/walletFund/WalletFundConfig.tsx
|
|
42289
42356
|
var WalletFundConfig = ({ inputs, onInputsChange }) => {
|
|
42290
|
-
const [local, setLocal] =
|
|
42357
|
+
const [local, setLocal] = useState224(() => parseWalletFundInputs(inputs));
|
|
42291
42358
|
useEffect160(() => {
|
|
42292
42359
|
setLocal(parseWalletFundInputs(inputs));
|
|
42293
42360
|
}, [inputs]);
|
|
@@ -42448,7 +42515,7 @@ registerActionTypeUI("qi/wallet.generateAndFund", {
|
|
|
42448
42515
|
import { IconFingerprint } from "@tabler/icons-react";
|
|
42449
42516
|
|
|
42450
42517
|
// src/mantine/blocks/action/actionTypes/iidCreate/IidCreateConfig.tsx
|
|
42451
|
-
import React381, { useCallback as useCallback168, useEffect as useEffect162, useState as
|
|
42518
|
+
import React381, { useCallback as useCallback168, useEffect as useEffect162, useState as useState225 } from "react";
|
|
42452
42519
|
import { Stack as Stack273, Text as Text254 } from "@mantine/core";
|
|
42453
42520
|
|
|
42454
42521
|
// src/mantine/blocks/action/actionTypes/iidCreate/types.ts
|
|
@@ -42476,7 +42543,7 @@ function serializeIidCreateInputs(inputs) {
|
|
|
42476
42543
|
|
|
42477
42544
|
// src/mantine/blocks/action/actionTypes/iidCreate/IidCreateConfig.tsx
|
|
42478
42545
|
var IidCreateConfig = ({ inputs, onInputsChange }) => {
|
|
42479
|
-
const [local, setLocal] =
|
|
42546
|
+
const [local, setLocal] = useState225(() => parseIidCreateInputs(inputs));
|
|
42480
42547
|
useEffect162(() => {
|
|
42481
42548
|
setLocal(parseIidCreateInputs(inputs));
|
|
42482
42549
|
}, [inputs]);
|
|
@@ -42638,7 +42705,7 @@ registerActionTypeUI("qi/iid.create", {
|
|
|
42638
42705
|
import { IconUserPlus as IconUserPlus4 } from "@tabler/icons-react";
|
|
42639
42706
|
|
|
42640
42707
|
// src/mantine/blocks/action/actionTypes/matrixRegister/MatrixRegisterConfig.tsx
|
|
42641
|
-
import React383, { useCallback as useCallback170, useEffect as useEffect163, useState as
|
|
42708
|
+
import React383, { useCallback as useCallback170, useEffect as useEffect163, useState as useState226 } from "react";
|
|
42642
42709
|
import { Stack as Stack275, Text as Text256 } from "@mantine/core";
|
|
42643
42710
|
|
|
42644
42711
|
// src/mantine/blocks/action/actionTypes/matrixRegister/types.ts
|
|
@@ -42670,7 +42737,7 @@ function serializeMatrixRegisterInputs(inputs) {
|
|
|
42670
42737
|
|
|
42671
42738
|
// src/mantine/blocks/action/actionTypes/matrixRegister/MatrixRegisterConfig.tsx
|
|
42672
42739
|
var MatrixRegisterConfig = ({ inputs, onInputsChange }) => {
|
|
42673
|
-
const [local, setLocal] =
|
|
42740
|
+
const [local, setLocal] = useState226(() => parseMatrixRegisterInputs(inputs));
|
|
42674
42741
|
useEffect163(() => {
|
|
42675
42742
|
setLocal(parseMatrixRegisterInputs(inputs));
|
|
42676
42743
|
}, [inputs]);
|
|
@@ -42789,7 +42856,7 @@ registerActionTypeUI("qi/matrix.register", {
|
|
|
42789
42856
|
import { IconId as IconId3 } from "@tabler/icons-react";
|
|
42790
42857
|
|
|
42791
42858
|
// src/mantine/blocks/action/actionTypes/identityCreate/IdentityCreateConfig.tsx
|
|
42792
|
-
import React385, { useCallback as useCallback172, useEffect as useEffect164, useState as
|
|
42859
|
+
import React385, { useCallback as useCallback172, useEffect as useEffect164, useState as useState227 } from "react";
|
|
42793
42860
|
import { Stack as Stack277, Text as Text258 } from "@mantine/core";
|
|
42794
42861
|
|
|
42795
42862
|
// src/mantine/blocks/action/actionTypes/identityCreate/types.ts
|
|
@@ -42820,7 +42887,7 @@ function serializeIdentityCreateInputs(inputs) {
|
|
|
42820
42887
|
|
|
42821
42888
|
// src/mantine/blocks/action/actionTypes/identityCreate/IdentityCreateConfig.tsx
|
|
42822
42889
|
var IdentityCreateConfig = ({ inputs, onInputsChange }) => {
|
|
42823
|
-
const [local, setLocal] =
|
|
42890
|
+
const [local, setLocal] = useState227(() => parseIdentityCreateInputs(inputs));
|
|
42824
42891
|
useEffect164(() => {
|
|
42825
42892
|
setLocal(parseIdentityCreateInputs(inputs));
|
|
42826
42893
|
}, [inputs]);
|
|
@@ -42938,7 +43005,7 @@ registerActionTypeUI("qi/identity.create", {
|
|
|
42938
43005
|
import { IconRobot as IconRobot4 } from "@tabler/icons-react";
|
|
42939
43006
|
|
|
42940
43007
|
// src/mantine/blocks/action/actionTypes/entityCreateOracle/EntityCreateOracleConfig.tsx
|
|
42941
|
-
import React387, { useCallback as useCallback173, useEffect as useEffect165, useState as
|
|
43008
|
+
import React387, { useCallback as useCallback173, useEffect as useEffect165, useState as useState228 } from "react";
|
|
42942
43009
|
import { Divider as Divider35, Stack as Stack279, Text as Text260 } from "@mantine/core";
|
|
42943
43010
|
|
|
42944
43011
|
// src/mantine/blocks/action/actionTypes/entityCreateOracle/types.ts
|
|
@@ -43002,7 +43069,7 @@ function serializeEntityCreateOracleInputs(inputs) {
|
|
|
43002
43069
|
|
|
43003
43070
|
// src/mantine/blocks/action/actionTypes/entityCreateOracle/EntityCreateOracleConfig.tsx
|
|
43004
43071
|
var EntityCreateOracleConfig = ({ inputs, onInputsChange }) => {
|
|
43005
|
-
const [local, setLocal] =
|
|
43072
|
+
const [local, setLocal] = useState228(() => parseEntityCreateOracleInputs(inputs));
|
|
43006
43073
|
useEffect165(() => {
|
|
43007
43074
|
setLocal(parseEntityCreateOracleInputs(inputs));
|
|
43008
43075
|
}, [inputs]);
|
|
@@ -43243,7 +43310,7 @@ registerActionTypeUI("qi/entity.createOracle", {
|
|
|
43243
43310
|
import { IconBox } from "@tabler/icons-react";
|
|
43244
43311
|
|
|
43245
43312
|
// src/mantine/blocks/action/actionTypes/sandboxProvision/SandboxProvisionConfig.tsx
|
|
43246
|
-
import React389, { useCallback as useCallback175, useEffect as useEffect166, useState as
|
|
43313
|
+
import React389, { useCallback as useCallback175, useEffect as useEffect166, useState as useState229 } from "react";
|
|
43247
43314
|
import { Stack as Stack281, Text as Text262 } from "@mantine/core";
|
|
43248
43315
|
|
|
43249
43316
|
// src/mantine/blocks/action/actionTypes/sandboxProvision/types.ts
|
|
@@ -43267,7 +43334,7 @@ function serializeSandboxProvisionInputs(inputs) {
|
|
|
43267
43334
|
|
|
43268
43335
|
// src/mantine/blocks/action/actionTypes/sandboxProvision/SandboxProvisionConfig.tsx
|
|
43269
43336
|
var SandboxProvisionConfig = ({ inputs, onInputsChange }) => {
|
|
43270
|
-
const [local, setLocal] =
|
|
43337
|
+
const [local, setLocal] = useState229(() => parseSandboxProvisionInputs(inputs));
|
|
43271
43338
|
useEffect166(() => {
|
|
43272
43339
|
setLocal(parseSandboxProvisionInputs(inputs));
|
|
43273
43340
|
}, [inputs]);
|
|
@@ -43363,7 +43430,7 @@ registerActionTypeUI("qi/sandbox.provision", {
|
|
|
43363
43430
|
import { IconLicense } from "@tabler/icons-react";
|
|
43364
43431
|
|
|
43365
43432
|
// src/mantine/blocks/action/actionTypes/oracleContract/OracleContractConfig.tsx
|
|
43366
|
-
import React391, { useCallback as useCallback177, useEffect as useEffect167, useState as
|
|
43433
|
+
import React391, { useCallback as useCallback177, useEffect as useEffect167, useState as useState230 } from "react";
|
|
43367
43434
|
import { Stack as Stack283, Text as Text264 } from "@mantine/core";
|
|
43368
43435
|
|
|
43369
43436
|
// src/mantine/blocks/action/actionTypes/oracleContract/types.ts
|
|
@@ -43385,7 +43452,7 @@ function serializeOracleContractInputs(inputs) {
|
|
|
43385
43452
|
|
|
43386
43453
|
// src/mantine/blocks/action/actionTypes/oracleContract/OracleContractConfig.tsx
|
|
43387
43454
|
var OracleContractConfig = ({ inputs, onInputsChange }) => {
|
|
43388
|
-
const [local, setLocal] =
|
|
43455
|
+
const [local, setLocal] = useState230(() => parseOracleContractInputs(inputs));
|
|
43389
43456
|
useEffect167(() => {
|
|
43390
43457
|
setLocal(parseOracleContractInputs(inputs));
|
|
43391
43458
|
}, [inputs]);
|
|
@@ -43472,7 +43539,7 @@ registerActionTypeUI("qi/oracle.contract", {
|
|
|
43472
43539
|
import { IconKey as IconKey4 } from "@tabler/icons-react";
|
|
43473
43540
|
|
|
43474
43541
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecrets/OracleStoreSecretsConfig.tsx
|
|
43475
|
-
import React393, { useCallback as useCallback179, useEffect as useEffect168, useState as
|
|
43542
|
+
import React393, { useCallback as useCallback179, useEffect as useEffect168, useState as useState231 } from "react";
|
|
43476
43543
|
import { Divider as Divider36, Stack as Stack285, Text as Text266 } from "@mantine/core";
|
|
43477
43544
|
|
|
43478
43545
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecrets/types.ts
|
|
@@ -43520,7 +43587,7 @@ function serializeOracleStoreSecretsInputs(inputs) {
|
|
|
43520
43587
|
|
|
43521
43588
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecrets/OracleStoreSecretsConfig.tsx
|
|
43522
43589
|
var OracleStoreSecretsConfig = ({ inputs, onInputsChange }) => {
|
|
43523
|
-
const [local, setLocal] =
|
|
43590
|
+
const [local, setLocal] = useState231(() => parseOracleStoreSecretsInputs(inputs));
|
|
43524
43591
|
useEffect168(() => {
|
|
43525
43592
|
setLocal(parseOracleStoreSecretsInputs(inputs));
|
|
43526
43593
|
}, [inputs]);
|
|
@@ -43656,15 +43723,15 @@ var OracleStoreSecretsConfig = ({ inputs, onInputsChange }) => {
|
|
|
43656
43723
|
};
|
|
43657
43724
|
|
|
43658
43725
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecrets/OracleStoreSecretsFlowDetail.tsx
|
|
43659
|
-
import React394, { useCallback as useCallback180, useEffect as useEffect170, useMemo as useMemo158, useRef as useRef53, useState as
|
|
43726
|
+
import React394, { useCallback as useCallback180, useEffect as useEffect170, useMemo as useMemo158, useRef as useRef53, useState as useState233 } from "react";
|
|
43660
43727
|
import { Button as Button96, Collapse as Collapse12, Divider as Divider37, Group as Group150, Loader as Loader92, Stack as Stack286, Text as Text267 } from "@mantine/core";
|
|
43661
43728
|
import { IconAlertCircle as IconAlertCircle46, IconCheck as IconCheck44, IconChevronDown as IconChevronDown12, IconChevronUp as IconChevronUp5, IconLock } from "@tabler/icons-react";
|
|
43662
43729
|
|
|
43663
43730
|
// src/mantine/blocks/action/hooks/useIdempotencyCheck.ts
|
|
43664
|
-
import { useEffect as useEffect169, useRef as useRef52, useState as
|
|
43731
|
+
import { useEffect as useEffect169, useRef as useRef52, useState as useState232 } from "react";
|
|
43665
43732
|
function useIdempotencyCheck({ enabled, check, markCompleted, logTag }) {
|
|
43666
43733
|
const firedRef = useRef52(false);
|
|
43667
|
-
const [isChecking, setIsChecking] =
|
|
43734
|
+
const [isChecking, setIsChecking] = useState232(false);
|
|
43668
43735
|
useEffect169(() => {
|
|
43669
43736
|
if (firedRef.current) return;
|
|
43670
43737
|
if (!enabled) return;
|
|
@@ -43742,12 +43809,12 @@ var OracleStoreSecretsFlowDetail = ({ inputs, editor, block, runtime, updateRunt
|
|
|
43742
43809
|
logTag: "oracle.storeSecrets",
|
|
43743
43810
|
failureMessage: "Failed to store secrets"
|
|
43744
43811
|
});
|
|
43745
|
-
const [openRouterDraft, setOpenRouterDraft] =
|
|
43746
|
-
const [isEditingOpenRouter, setIsEditingOpenRouter] =
|
|
43747
|
-
const [isEncryptingOpenRouter, setIsEncryptingOpenRouter] =
|
|
43748
|
-
const [showAdditional, setShowAdditional] =
|
|
43749
|
-
const [networkConstants, setNetworkConstants] =
|
|
43750
|
-
const [isLoadingConstants, setIsLoadingConstants] =
|
|
43812
|
+
const [openRouterDraft, setOpenRouterDraft] = useState233("");
|
|
43813
|
+
const [isEditingOpenRouter, setIsEditingOpenRouter] = useState233(!hasOpenRouter);
|
|
43814
|
+
const [isEncryptingOpenRouter, setIsEncryptingOpenRouter] = useState233(false);
|
|
43815
|
+
const [showAdditional, setShowAdditional] = useState233(false);
|
|
43816
|
+
const [networkConstants, setNetworkConstants] = useState233(null);
|
|
43817
|
+
const [isLoadingConstants, setIsLoadingConstants] = useState233(false);
|
|
43751
43818
|
const constantsFetchRef = useRef53(false);
|
|
43752
43819
|
const handleSaveOpenRouter = useCallback180(async () => {
|
|
43753
43820
|
if (!openRouterDraft) return;
|
|
@@ -43854,7 +43921,7 @@ registerActionTypeUI("qi/oracle.storeSecrets", {
|
|
|
43854
43921
|
import { IconSettings as IconSettings20 } from "@tabler/icons-react";
|
|
43855
43922
|
|
|
43856
43923
|
// src/mantine/blocks/action/actionTypes/oracleStoreConfig/OracleStoreConfigConfig.tsx
|
|
43857
|
-
import React395, { useCallback as useCallback181, useEffect as useEffect171, useState as
|
|
43924
|
+
import React395, { useCallback as useCallback181, useEffect as useEffect171, useState as useState234 } from "react";
|
|
43858
43925
|
import { Divider as Divider38, Stack as Stack287, Text as Text268 } from "@mantine/core";
|
|
43859
43926
|
|
|
43860
43927
|
// src/mantine/blocks/action/actionTypes/oracleStoreConfig/types.ts
|
|
@@ -43924,7 +43991,7 @@ function serializeOracleStoreConfigInputs(inputs) {
|
|
|
43924
43991
|
|
|
43925
43992
|
// src/mantine/blocks/action/actionTypes/oracleStoreConfig/OracleStoreConfigConfig.tsx
|
|
43926
43993
|
var OracleStoreConfigConfig = ({ inputs, onInputsChange }) => {
|
|
43927
|
-
const [local, setLocal] =
|
|
43994
|
+
const [local, setLocal] = useState234(() => parseOracleStoreConfigInputs(inputs));
|
|
43928
43995
|
useEffect171(() => {
|
|
43929
43996
|
setLocal(parseOracleStoreConfigInputs(inputs));
|
|
43930
43997
|
}, [inputs]);
|
|
@@ -44128,7 +44195,7 @@ registerActionTypeUI("qi/oracle.storeConfig", {
|
|
|
44128
44195
|
import { IconLock as IconLock3 } from "@tabler/icons-react";
|
|
44129
44196
|
|
|
44130
44197
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecretsAndConfig/OracleStoreSecretsAndConfigConfig.tsx
|
|
44131
|
-
import React397, { useCallback as useCallback183, useEffect as useEffect172, useState as
|
|
44198
|
+
import React397, { useCallback as useCallback183, useEffect as useEffect172, useState as useState235 } from "react";
|
|
44132
44199
|
import { Divider as Divider39, Stack as Stack289, Text as Text270 } from "@mantine/core";
|
|
44133
44200
|
|
|
44134
44201
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecretsAndConfig/types.ts
|
|
@@ -44203,7 +44270,7 @@ function serializeOracleStoreSecretsAndConfigInputs(inputs) {
|
|
|
44203
44270
|
|
|
44204
44271
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecretsAndConfig/OracleStoreSecretsAndConfigConfig.tsx
|
|
44205
44272
|
var OracleStoreSecretsAndConfigConfig = ({ inputs, onInputsChange }) => {
|
|
44206
|
-
const [local, setLocal] =
|
|
44273
|
+
const [local, setLocal] = useState235(() => parseOracleStoreSecretsAndConfigInputs(inputs));
|
|
44207
44274
|
useEffect172(() => {
|
|
44208
44275
|
setLocal(parseOracleStoreSecretsAndConfigInputs(inputs));
|
|
44209
44276
|
}, [inputs]);
|
|
@@ -44387,7 +44454,7 @@ var OracleStoreSecretsAndConfigConfig = ({ inputs, onInputsChange }) => {
|
|
|
44387
44454
|
};
|
|
44388
44455
|
|
|
44389
44456
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecretsAndConfig/OracleStoreSecretsAndConfigFlowDetail.tsx
|
|
44390
|
-
import React398, { useCallback as useCallback184, useEffect as useEffect173, useMemo as useMemo160, useRef as useRef54, useState as
|
|
44457
|
+
import React398, { useCallback as useCallback184, useEffect as useEffect173, useMemo as useMemo160, useRef as useRef54, useState as useState236 } from "react";
|
|
44391
44458
|
import { Button as Button98, Collapse as Collapse13, Divider as Divider40, Group as Group152, Loader as Loader94, Stack as Stack290, Text as Text271 } from "@mantine/core";
|
|
44392
44459
|
import { IconAlertCircle as IconAlertCircle48, IconCheck as IconCheck46, IconChevronDown as IconChevronDown13, IconChevronUp as IconChevronUp6, IconLock as IconLock2 } from "@tabler/icons-react";
|
|
44393
44460
|
var EXPECTED_SECRETS2 = ["SECP_MNEMONIC", "MATRIX_ORACLE_ADMIN_PASSWORD", "MATRIX_ORACLE_ADMIN_ACCESS_TOKEN", "MATRIX_RECOVERY_PHRASE", "MATRIX_VALUE_PIN", "OPEN_ROUTER_API_KEY"];
|
|
@@ -44471,12 +44538,12 @@ var OracleStoreSecretsAndConfigFlowDetail = ({ inputs, editor, block, runtime, u
|
|
|
44471
44538
|
logTag: "oracle.storeSecretsAndConfig",
|
|
44472
44539
|
failureMessage: "Failed to store secrets and config"
|
|
44473
44540
|
});
|
|
44474
|
-
const [openRouterDraft, setOpenRouterDraft] =
|
|
44475
|
-
const [isEditingOpenRouter, setIsEditingOpenRouter] =
|
|
44476
|
-
const [isEncryptingOpenRouter, setIsEncryptingOpenRouter] =
|
|
44477
|
-
const [showAdditional, setShowAdditional] =
|
|
44478
|
-
const [networkConstants, setNetworkConstants] =
|
|
44479
|
-
const [isLoadingConstants, setIsLoadingConstants] =
|
|
44541
|
+
const [openRouterDraft, setOpenRouterDraft] = useState236("");
|
|
44542
|
+
const [isEditingOpenRouter, setIsEditingOpenRouter] = useState236(!hasOpenRouter);
|
|
44543
|
+
const [isEncryptingOpenRouter, setIsEncryptingOpenRouter] = useState236(false);
|
|
44544
|
+
const [showAdditional, setShowAdditional] = useState236(false);
|
|
44545
|
+
const [networkConstants, setNetworkConstants] = useState236(null);
|
|
44546
|
+
const [isLoadingConstants, setIsLoadingConstants] = useState236(false);
|
|
44480
44547
|
const constantsFetchRef = useRef54(false);
|
|
44481
44548
|
const handleSaveOpenRouter = useCallback184(async () => {
|
|
44482
44549
|
if (!openRouterDraft) return;
|
|
@@ -44573,7 +44640,7 @@ registerActionTypeUI("qi/oracle.storeSecretsAndConfig", {
|
|
|
44573
44640
|
import { IconAdjustments as IconAdjustments2 } from "@tabler/icons-react";
|
|
44574
44641
|
|
|
44575
44642
|
// src/mantine/blocks/action/actionTypes/oracleConfigureOracle/OracleConfigureOracleConfig.tsx
|
|
44576
|
-
import React399, { useCallback as useCallback185, useEffect as useEffect174, useState as
|
|
44643
|
+
import React399, { useCallback as useCallback185, useEffect as useEffect174, useState as useState237 } from "react";
|
|
44577
44644
|
import { Divider as Divider41, Stack as Stack291, Text as Text272 } from "@mantine/core";
|
|
44578
44645
|
|
|
44579
44646
|
// src/mantine/blocks/action/actionTypes/oracleConfigureOracle/types.ts
|
|
@@ -44649,7 +44716,7 @@ function serializeOracleConfigureOracleInputs(inputs) {
|
|
|
44649
44716
|
|
|
44650
44717
|
// src/mantine/blocks/action/actionTypes/oracleConfigureOracle/OracleConfigureOracleConfig.tsx
|
|
44651
44718
|
var OracleConfigureOracleConfig = ({ inputs, onInputsChange }) => {
|
|
44652
|
-
const [local, setLocal] =
|
|
44719
|
+
const [local, setLocal] = useState237(() => parseOracleConfigureOracleInputs(inputs));
|
|
44653
44720
|
useEffect174(() => {
|
|
44654
44721
|
setLocal(parseOracleConfigureOracleInputs(inputs));
|
|
44655
44722
|
}, [inputs]);
|
|
@@ -44833,7 +44900,7 @@ var OracleConfigureOracleConfig = ({ inputs, onInputsChange }) => {
|
|
|
44833
44900
|
};
|
|
44834
44901
|
|
|
44835
44902
|
// src/mantine/blocks/action/actionTypes/oracleConfigureOracle/OracleConfigureOracleFlowDetail.tsx
|
|
44836
|
-
import React400, { useCallback as useCallback186, useEffect as useEffect175, useMemo as useMemo161, useRef as useRef55, useState as
|
|
44903
|
+
import React400, { useCallback as useCallback186, useEffect as useEffect175, useMemo as useMemo161, useRef as useRef55, useState as useState238 } from "react";
|
|
44837
44904
|
import { Button as Button99, Collapse as Collapse14, Divider as Divider42, Group as Group153, Loader as Loader95, Stack as Stack292, Text as Text273 } from "@mantine/core";
|
|
44838
44905
|
import { IconAlertCircle as IconAlertCircle49, IconCheck as IconCheck47, IconChevronDown as IconChevronDown14, IconChevronUp as IconChevronUp7, IconLock as IconLock4 } from "@tabler/icons-react";
|
|
44839
44906
|
var EXPECTED_SECRETS3 = ["SECP_MNEMONIC", "MATRIX_ORACLE_ADMIN_PASSWORD", "MATRIX_ORACLE_ADMIN_ACCESS_TOKEN", "MATRIX_RECOVERY_PHRASE", "MATRIX_VALUE_PIN", "OPEN_ROUTER_API_KEY"];
|
|
@@ -44952,12 +45019,12 @@ var OracleConfigureOracleFlowDetail = ({ inputs, editor, block, runtime, updateR
|
|
|
44952
45019
|
logTag: "oracle.configureOracle",
|
|
44953
45020
|
failureMessage: "Failed to configure oracle"
|
|
44954
45021
|
});
|
|
44955
|
-
const [openRouterDraft, setOpenRouterDraft] =
|
|
44956
|
-
const [isEditingOpenRouter, setIsEditingOpenRouter] =
|
|
44957
|
-
const [isEncryptingOpenRouter, setIsEncryptingOpenRouter] =
|
|
44958
|
-
const [showAdditional, setShowAdditional] =
|
|
44959
|
-
const [networkConstants, setNetworkConstants] =
|
|
44960
|
-
const [isLoadingConstants, setIsLoadingConstants] =
|
|
45022
|
+
const [openRouterDraft, setOpenRouterDraft] = useState238("");
|
|
45023
|
+
const [isEditingOpenRouter, setIsEditingOpenRouter] = useState238(!hasOpenRouter);
|
|
45024
|
+
const [isEncryptingOpenRouter, setIsEncryptingOpenRouter] = useState238(false);
|
|
45025
|
+
const [showAdditional, setShowAdditional] = useState238(false);
|
|
45026
|
+
const [networkConstants, setNetworkConstants] = useState238(null);
|
|
45027
|
+
const [isLoadingConstants, setIsLoadingConstants] = useState238(false);
|
|
44961
45028
|
const constantsFetchRef = useRef55(false);
|
|
44962
45029
|
const handleSaveOpenRouter = useCallback186(async () => {
|
|
44963
45030
|
if (!openRouterDraft) return;
|
|
@@ -45630,13 +45697,13 @@ import React411, { useCallback as useCallback191 } from "react";
|
|
|
45630
45697
|
import { IconSettings as IconSettings21 } from "@tabler/icons-react";
|
|
45631
45698
|
|
|
45632
45699
|
// src/mantine/blocks/location/template/GeneralTab.tsx
|
|
45633
|
-
import React410, { useEffect as useEffect177, useRef as useRef56, useState as
|
|
45700
|
+
import React410, { useEffect as useEffect177, useRef as useRef56, useState as useState241 } from "react";
|
|
45634
45701
|
import { Box as Box70, Divider as Divider43, Stack as Stack299, Text as Text280 } from "@mantine/core";
|
|
45635
45702
|
|
|
45636
45703
|
// src/core/hooks/useUnlMap.ts
|
|
45637
|
-
import { useEffect as useEffect176, useState as
|
|
45704
|
+
import { useEffect as useEffect176, useState as useState239 } from "react";
|
|
45638
45705
|
function useUnlMap() {
|
|
45639
|
-
const [status, setStatus] =
|
|
45706
|
+
const [status, setStatus] = useState239("loading");
|
|
45640
45707
|
useEffect176(() => {
|
|
45641
45708
|
if (typeof window === "undefined") {
|
|
45642
45709
|
return;
|
|
@@ -45692,7 +45759,7 @@ function useUnlMap() {
|
|
|
45692
45759
|
}
|
|
45693
45760
|
|
|
45694
45761
|
// src/mantine/blocks/location/components/TileSelector.tsx
|
|
45695
|
-
import React409, { useState as
|
|
45762
|
+
import React409, { useState as useState240, useCallback as useCallback190 } from "react";
|
|
45696
45763
|
import { ActionIcon as ActionIcon52, Group as Group157, Tooltip as Tooltip35 } from "@mantine/core";
|
|
45697
45764
|
import { IconMap, IconMoon, IconSatellite, IconMountain } from "@tabler/icons-react";
|
|
45698
45765
|
var TILE_LAYERS = {
|
|
@@ -45745,7 +45812,7 @@ function ensureLayer(map, config) {
|
|
|
45745
45812
|
);
|
|
45746
45813
|
}
|
|
45747
45814
|
var TileSelector = ({ mapRef }) => {
|
|
45748
|
-
const [active, setActive] =
|
|
45815
|
+
const [active, setActive] = useState240("map");
|
|
45749
45816
|
const switchTo = useCallback190(
|
|
45750
45817
|
(type) => {
|
|
45751
45818
|
const map = mapRef.current;
|
|
@@ -45802,9 +45869,9 @@ var DEFAULT_CENTER = [0, 20];
|
|
|
45802
45869
|
var DEFAULT_ZOOM = 2;
|
|
45803
45870
|
var PLACED_ZOOM = 14;
|
|
45804
45871
|
var GeneralTab17 = ({ title, description, latitude, longitude, onTitleChange, onDescriptionChange, onCoordinatesChange }) => {
|
|
45805
|
-
const [localTitle, setLocalTitle] =
|
|
45806
|
-
const [localDescription, setLocalDescription] =
|
|
45807
|
-
const [mapError, setMapError] =
|
|
45872
|
+
const [localTitle, setLocalTitle] = useState241(title);
|
|
45873
|
+
const [localDescription, setLocalDescription] = useState241(description);
|
|
45874
|
+
const [mapError, setMapError] = useState241(null);
|
|
45808
45875
|
const { status, UnlSdk } = useUnlMap();
|
|
45809
45876
|
const { mapConfig } = useBlocknoteContext();
|
|
45810
45877
|
const markerRef = useRef56(null);
|
|
@@ -45943,10 +46010,10 @@ var TemplateConfig17 = ({ editor, block }) => {
|
|
|
45943
46010
|
};
|
|
45944
46011
|
|
|
45945
46012
|
// src/mantine/blocks/location/components/LocationMap.tsx
|
|
45946
|
-
import React412, { useEffect as useEffect178, useRef as useRef57, useState as
|
|
46013
|
+
import React412, { useEffect as useEffect178, useRef as useRef57, useState as useState242 } from "react";
|
|
45947
46014
|
import { Box as Box71, Flex as Flex39, Loader as Loader99, Text as Text281 } from "@mantine/core";
|
|
45948
46015
|
var UnlMap = ({ w = "100%", h = 200, latitude, longitude, zoom = 5, showMarker = true, showTilesControl = false }) => {
|
|
45949
|
-
const [mapError, setMapError] =
|
|
46016
|
+
const [mapError, setMapError] = useState242(null);
|
|
45950
46017
|
const { mapConfig } = useBlocknoteContext();
|
|
45951
46018
|
const wrapperRef = useRef57(null);
|
|
45952
46019
|
const containerRef = useRef57(null);
|
|
@@ -46124,7 +46191,7 @@ import React419, { useCallback as useCallback192 } from "react";
|
|
|
46124
46191
|
import { IconSettings as IconSettings22 } from "@tabler/icons-react";
|
|
46125
46192
|
|
|
46126
46193
|
// src/mantine/blocks/embed/template/GeneralTab.tsx
|
|
46127
|
-
import React418, { useEffect as useEffect179, useState as
|
|
46194
|
+
import React418, { useEffect as useEffect179, useState as useState243 } from "react";
|
|
46128
46195
|
import { Stack as Stack302, Switch as Switch19, Text as Text284 } from "@mantine/core";
|
|
46129
46196
|
var GeneralTab18 = ({
|
|
46130
46197
|
url,
|
|
@@ -46140,8 +46207,8 @@ var GeneralTab18 = ({
|
|
|
46140
46207
|
onHeightChange,
|
|
46141
46208
|
onAllowAuthChange
|
|
46142
46209
|
}) => {
|
|
46143
|
-
const [localUrl, setLocalUrl] =
|
|
46144
|
-
const [localHeight, setLocalHeight] =
|
|
46210
|
+
const [localUrl, setLocalUrl] = useState243(url);
|
|
46211
|
+
const [localHeight, setLocalHeight] = useState243(height);
|
|
46145
46212
|
const iconOptions = Object.keys(ICON_MAP).map((key) => ({
|
|
46146
46213
|
value: key,
|
|
46147
46214
|
label: key.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ")
|
|
@@ -46368,7 +46435,7 @@ import React426 from "react";
|
|
|
46368
46435
|
import { createReactBlockSpec as createReactBlockSpec23 } from "@blocknote/react";
|
|
46369
46436
|
|
|
46370
46437
|
// src/mantine/blocks/secrets/SecretsBlock.tsx
|
|
46371
|
-
import React425, { useCallback as useCallback194, useMemo as useMemo169, useState as
|
|
46438
|
+
import React425, { useCallback as useCallback194, useMemo as useMemo169, useState as useState244 } from "react";
|
|
46372
46439
|
import { Anchor as Anchor6, ActionIcon as ActionIcon53, Button as Button103, Collapse as Collapse15, CopyButton as CopyButton3, Group as Group162, Paper as Paper25, Stack as Stack305, Text as Text287, Tooltip as Tooltip36 } from "@mantine/core";
|
|
46373
46440
|
import { IconCheck as IconCheck51, IconCopy as IconCopy3, IconDownload as IconDownload6, IconEye, IconEyeOff, IconKey as IconKey5 } from "@tabler/icons-react";
|
|
46374
46441
|
var SENSITIVE_KEYS = /* @__PURE__ */ new Set(["mnemonic", "matrixPassword", "matrixRecoveryPhrase", "matrixAccessToken", "pin", "openRouterApiKeyJwe", "authToken"]);
|
|
@@ -46467,7 +46534,7 @@ function flattenForDownload(outputs) {
|
|
|
46467
46534
|
return result;
|
|
46468
46535
|
}
|
|
46469
46536
|
function MaskedValue({ value, isSensitive }) {
|
|
46470
|
-
const [visible, setVisible] =
|
|
46537
|
+
const [visible, setVisible] = useState244(false);
|
|
46471
46538
|
if (!isSensitive) {
|
|
46472
46539
|
return /* @__PURE__ */ React425.createElement(Text287, { size: "xs", ff: "monospace", style: { wordBreak: "break-all" } }, String(value));
|
|
46473
46540
|
}
|
|
@@ -46480,7 +46547,7 @@ function OutputEntry({ label, value, isSensitive }) {
|
|
|
46480
46547
|
}
|
|
46481
46548
|
function SecretsBlock({ editor, block }) {
|
|
46482
46549
|
const { docType } = useBlocknoteContext();
|
|
46483
|
-
const [showOutput, setShowOutput] =
|
|
46550
|
+
const [showOutput, setShowOutput] = useState244(false);
|
|
46484
46551
|
const outputs = useMemo169(() => collectOutputs(editor), [editor, showOutput]);
|
|
46485
46552
|
const editorDocument = editor?.document || [];
|
|
46486
46553
|
const resolveOpts = useMemo169(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
@@ -46570,7 +46637,7 @@ var SkillsTemplateView = ({ editor: _editor, block }) => {
|
|
|
46570
46637
|
// src/mantine/blocks/skills/flow/SkillsFlowView.tsx
|
|
46571
46638
|
import { ActionIcon as ActionIcon54, Badge as Badge62, Button as Button104, Collapse as Collapse16, Group as Group164, Loader as Loader100, Paper as Paper26, Stack as Stack307, Text as Text289, Tooltip as Tooltip37 } from "@mantine/core";
|
|
46572
46639
|
import { IconBrain as IconBrain3, IconCheck as IconCheck52, IconPencil as IconPencil3, IconPlus as IconPlus11, IconTrash as IconTrash13, IconX as IconX21 } from "@tabler/icons-react";
|
|
46573
|
-
import React430, { useCallback as useCallback195, useEffect as useEffect180, useMemo as useMemo171, useRef as useRef58, useState as
|
|
46640
|
+
import React430, { useCallback as useCallback195, useEffect as useEffect180, useMemo as useMemo171, useRef as useRef58, useState as useState245 } from "react";
|
|
46574
46641
|
function parseSkills2(raw) {
|
|
46575
46642
|
try {
|
|
46576
46643
|
const parsed = JSON.parse(raw || "[]");
|
|
@@ -46593,15 +46660,15 @@ var SkillsFlowView = ({ editor, block }) => {
|
|
|
46593
46660
|
const isCompleted = runtime.state === "completed" && runtime.evaluationStatus === "approved";
|
|
46594
46661
|
const skills = useMemo171(() => parseSkills2(block.props.skills), [block.props.skills]);
|
|
46595
46662
|
const mcpServers = useMemo171(() => parseMcpServers(block.props.mcpServers), [block.props.mcpServers]);
|
|
46596
|
-
const [showAddMcp, setShowAddMcp] =
|
|
46597
|
-
const [mcpName, setMcpName] =
|
|
46598
|
-
const [mcpUrl, setMcpUrl] =
|
|
46599
|
-
const [mcpDescription, setMcpDescription] =
|
|
46600
|
-
const [editingMcpIndex, setEditingMcpIndex] =
|
|
46601
|
-
const [validationResults, setValidationResults] =
|
|
46602
|
-
const [validatingUrls, setValidatingUrls] =
|
|
46603
|
-
const [capsules, setCapsules] =
|
|
46604
|
-
const [loadingCapsules, setLoadingCapsules] =
|
|
46663
|
+
const [showAddMcp, setShowAddMcp] = useState245(false);
|
|
46664
|
+
const [mcpName, setMcpName] = useState245("");
|
|
46665
|
+
const [mcpUrl, setMcpUrl] = useState245("");
|
|
46666
|
+
const [mcpDescription, setMcpDescription] = useState245("");
|
|
46667
|
+
const [editingMcpIndex, setEditingMcpIndex] = useState245(null);
|
|
46668
|
+
const [validationResults, setValidationResults] = useState245({});
|
|
46669
|
+
const [validatingUrls, setValidatingUrls] = useState245({});
|
|
46670
|
+
const [capsules, setCapsules] = useState245([]);
|
|
46671
|
+
const [loadingCapsules, setLoadingCapsules] = useState245(false);
|
|
46605
46672
|
const capsulesFetchedRef = useRef58(false);
|
|
46606
46673
|
useEffect180(() => {
|
|
46607
46674
|
if (capsulesFetchedRef.current || !handlers.getSkills) return;
|
|
@@ -46609,7 +46676,7 @@ var SkillsFlowView = ({ editor, block }) => {
|
|
|
46609
46676
|
setLoadingCapsules(true);
|
|
46610
46677
|
handlers.getSkills().then((r) => setCapsules(r.capsules || [])).catch((err) => console.error("[skills] Failed to fetch capsules:", err)).finally(() => setLoadingCapsules(false));
|
|
46611
46678
|
}, [handlers.getSkills]);
|
|
46612
|
-
const [network, setNetwork] =
|
|
46679
|
+
const [network, setNetwork] = useState245("");
|
|
46613
46680
|
const networkFetchedRef = useRef58(false);
|
|
46614
46681
|
useEffect180(() => {
|
|
46615
46682
|
if (networkFetchedRef.current || !handlers.getNetwork) return;
|
|
@@ -46722,8 +46789,8 @@ var SkillsFlowView = ({ editor, block }) => {
|
|
|
46722
46789
|
const cur = getCurrentBlock();
|
|
46723
46790
|
editor.updateBlock(cur, { props: { ...cur.props, status: "pending" } });
|
|
46724
46791
|
}, [updateRuntime, getCurrentBlock, editor]);
|
|
46725
|
-
const [savingMcp, setSavingMcp] =
|
|
46726
|
-
const [mcpSaveError, setMcpSaveError] =
|
|
46792
|
+
const [savingMcp, setSavingMcp] = useState245(false);
|
|
46793
|
+
const [mcpSaveError, setMcpSaveError] = useState245(null);
|
|
46727
46794
|
const handleSaveMcp = useCallback195(async () => {
|
|
46728
46795
|
const url = mcpUrl.trim();
|
|
46729
46796
|
if (!mcpName.trim() || !url) return;
|
|
@@ -47147,7 +47214,7 @@ blockRegistry.register({
|
|
|
47147
47214
|
});
|
|
47148
47215
|
|
|
47149
47216
|
// src/mantine/blocks/hooks/useBlockDependencies.ts
|
|
47150
|
-
import { useMemo as useMemo172, useEffect as useEffect181, useState as
|
|
47217
|
+
import { useMemo as useMemo172, useEffect as useEffect181, useState as useState246, useCallback as useCallback196 } from "react";
|
|
47151
47218
|
|
|
47152
47219
|
// src/mantine/blocks/hooks/useDependsOn.ts
|
|
47153
47220
|
import { useMemo as useMemo173 } from "react";
|
|
@@ -47655,13 +47722,13 @@ var getExtraSlashMenuItems = (editor, translate) => {
|
|
|
47655
47722
|
};
|
|
47656
47723
|
|
|
47657
47724
|
// src/mantine/inline/FlowStepRefSpec.tsx
|
|
47658
|
-
import React433, { useEffect as useEffect182, useState as
|
|
47725
|
+
import React433, { useEffect as useEffect182, useState as useState247 } from "react";
|
|
47659
47726
|
import { createReactInlineContentSpec } from "@blocknote/react";
|
|
47660
47727
|
import { IconBolt as IconBolt14, IconCheck as IconCheck53 } from "@tabler/icons-react";
|
|
47661
47728
|
function useStepRefState(nodeId, fallbackLabel) {
|
|
47662
47729
|
const { editor } = useBlocknoteContext();
|
|
47663
47730
|
const initial = fallbackLabel || nodeId || "Step";
|
|
47664
|
-
const [state, setState] =
|
|
47731
|
+
const [state, setState] = useState247({ text: initial, missing: false, completed: false });
|
|
47665
47732
|
useEffect182(() => {
|
|
47666
47733
|
const ed = editor;
|
|
47667
47734
|
if (!ed) return;
|
|
@@ -47931,11 +47998,11 @@ import { useCreateBlockNote as useCreateBlockNote2 } from "@blocknote/react";
|
|
|
47931
47998
|
import { BlockNoteSchema as BlockNoteSchema2, defaultBlockSpecs as defaultBlockSpecs2, defaultInlineContentSpecs as defaultInlineContentSpecs2 } from "@blocknote/core";
|
|
47932
47999
|
|
|
47933
48000
|
// src/core/hooks/useMatrixProvider.ts
|
|
47934
|
-
import { useEffect as useEffect183, useState as
|
|
48001
|
+
import { useEffect as useEffect183, useState as useState248, useRef as useRef59, useCallback as useCallback197, useMemo as useMemo174 } from "react";
|
|
47935
48002
|
import { MatrixProvider } from "@ixo/matrix-crdt";
|
|
47936
48003
|
function useMatrixProvider({ matrixClient, roomId, yDoc }) {
|
|
47937
|
-
const [matrixProvider, setProvider] =
|
|
47938
|
-
const [status, setStatus] =
|
|
48004
|
+
const [matrixProvider, setProvider] = useState248(null);
|
|
48005
|
+
const [status, setStatus] = useState248("disconnected");
|
|
47939
48006
|
const isMountedRef = useRef59(true);
|
|
47940
48007
|
const providerRef = useRef59(null);
|
|
47941
48008
|
const retryTimeoutRef = useRef59(null);
|
|
@@ -48036,7 +48103,7 @@ function useCollaborativeYDoc(_options) {
|
|
|
48036
48103
|
}
|
|
48037
48104
|
|
|
48038
48105
|
// src/mantine/hooks/useCollaborativeIxoEditor.ts
|
|
48039
|
-
import { useMemo as useMemo176, useEffect as useEffect185, useState as
|
|
48106
|
+
import { useMemo as useMemo176, useEffect as useEffect185, useState as useState249, useRef as useRef61 } from "react";
|
|
48040
48107
|
|
|
48041
48108
|
// src/core/lib/matrixMetadata.ts
|
|
48042
48109
|
var COVER_IMAGE_EVENT_TYPE = "ixo.page.cover_image";
|
|
@@ -48703,7 +48770,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
48703
48770
|
}),
|
|
48704
48771
|
[theme, editable, sideMenu, slashMenu, formattingToolbar, linkToolbar, filePanel, tableHandles]
|
|
48705
48772
|
);
|
|
48706
|
-
const [providerReady, setProviderReady] =
|
|
48773
|
+
const [providerReady, setProviderReady] = useState249(false);
|
|
48707
48774
|
useEffect185(() => {
|
|
48708
48775
|
if (matrixProvider && !providerReady) setProviderReady(true);
|
|
48709
48776
|
}, [matrixProvider, providerReady]);
|
|
@@ -48948,7 +49015,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
48948
49015
|
titleText.insert(0, options.title);
|
|
48949
49016
|
}
|
|
48950
49017
|
}, [connectionStatus, root, titleText, permissions.write, options.docId, options.title, options.sourceTemplateId, memoizedUser.id]);
|
|
48951
|
-
const [connectedUsers, setConnectedUsers] =
|
|
49018
|
+
const [connectedUsers, setConnectedUsers] = useState249([]);
|
|
48952
49019
|
const activeBlockIdRef = useRef61(null);
|
|
48953
49020
|
const awarenessInstance = matrixProvider?.awarenessInstance ?? null;
|
|
48954
49021
|
useEffect185(() => {
|
|
@@ -49020,18 +49087,18 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
49020
49087
|
}
|
|
49021
49088
|
|
|
49022
49089
|
// src/mantine/components/Base/BaseIconPicker.tsx
|
|
49023
|
-
import React435, { useState as
|
|
49024
|
-
import { TextInput as TextInput11, Tabs as Tabs4, Box as Box74, Stack as Stack308, UnstyledButton as
|
|
49090
|
+
import React435, { useState as useState251, useMemo as useMemo177, useEffect as useEffect186 } from "react";
|
|
49091
|
+
import { TextInput as TextInput11, Tabs as Tabs4, Box as Box74, Stack as Stack308, UnstyledButton as UnstyledButton8, Text as Text291, Center as Center15, ScrollArea as ScrollArea10, Group as Group166, Popover as Popover5 } from "@mantine/core";
|
|
49025
49092
|
import * as TablerIcons2 from "@tabler/icons-react";
|
|
49026
49093
|
import { IconSearch as IconSearch11, IconX as IconX22, IconChevronLeft, IconChevronRight as IconChevronRight14 } from "@tabler/icons-react";
|
|
49027
49094
|
|
|
49028
49095
|
// src/mantine/components/Base/CoverImageButton.tsx
|
|
49029
|
-
import React434, { forwardRef, useState as
|
|
49030
|
-
import { UnstyledButton as
|
|
49096
|
+
import React434, { forwardRef, useState as useState250 } from "react";
|
|
49097
|
+
import { UnstyledButton as UnstyledButton7, Group as Group165, Text as Text290 } from "@mantine/core";
|
|
49031
49098
|
var CoverImageButton = forwardRef(function CoverImageButton2({ isActive = false, onClick, icon: icon2, children, style }, ref) {
|
|
49032
|
-
const [hovered, setHovered] =
|
|
49099
|
+
const [hovered, setHovered] = useState250(false);
|
|
49033
49100
|
return /* @__PURE__ */ React434.createElement(
|
|
49034
|
-
|
|
49101
|
+
UnstyledButton7,
|
|
49035
49102
|
{
|
|
49036
49103
|
ref,
|
|
49037
49104
|
onClick,
|
|
@@ -49098,9 +49165,9 @@ var localStorageService = {
|
|
|
49098
49165
|
var iconsKey = "editor_recent_icons";
|
|
49099
49166
|
var ICONS_PER_PAGE = 500;
|
|
49100
49167
|
function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove, children, currentIcon }) {
|
|
49101
|
-
const [searchQuery, setSearchQuery] =
|
|
49102
|
-
const [activeTab, setActiveTab] =
|
|
49103
|
-
const [currentPage, setCurrentPage] =
|
|
49168
|
+
const [searchQuery, setSearchQuery] = useState251("");
|
|
49169
|
+
const [activeTab, setActiveTab] = useState251("icons");
|
|
49170
|
+
const [currentPage, setCurrentPage] = useState251(1);
|
|
49104
49171
|
const allIcons = useMemo177(() => {
|
|
49105
49172
|
const iconEntries = Object.entries(TablerIcons2).filter(([name]) => name.startsWith("Icon") && name !== "IconProps");
|
|
49106
49173
|
return iconEntries;
|
|
@@ -49149,7 +49216,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
|
|
|
49149
49216
|
icons.map(([name, IconComponent]) => {
|
|
49150
49217
|
const isSelected = currentIcon === name.replace("Icon", "").replace(/([A-Z])/g, "-$1").toLowerCase().slice(1);
|
|
49151
49218
|
return /* @__PURE__ */ React435.createElement(
|
|
49152
|
-
|
|
49219
|
+
UnstyledButton8,
|
|
49153
49220
|
{
|
|
49154
49221
|
key: name,
|
|
49155
49222
|
onClick: () => handleIconClick(name),
|
|
@@ -49190,7 +49257,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
|
|
|
49190
49257
|
p: 0
|
|
49191
49258
|
},
|
|
49192
49259
|
onRemove && /* @__PURE__ */ React435.createElement(
|
|
49193
|
-
|
|
49260
|
+
UnstyledButton8,
|
|
49194
49261
|
{
|
|
49195
49262
|
onClick: () => {
|
|
49196
49263
|
onRemove();
|
|
@@ -49216,7 +49283,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
|
|
|
49216
49283
|
leftSection: /* @__PURE__ */ React435.createElement(IconSearch11, { size: 18 }),
|
|
49217
49284
|
value: searchQuery,
|
|
49218
49285
|
onChange: (e) => setSearchQuery(e.currentTarget.value),
|
|
49219
|
-
rightSection: searchQuery && /* @__PURE__ */ React435.createElement(
|
|
49286
|
+
rightSection: searchQuery && /* @__PURE__ */ React435.createElement(UnstyledButton8, { onClick: () => setSearchQuery("") }, /* @__PURE__ */ React435.createElement(IconX22, { size: 18 })),
|
|
49220
49287
|
style: { flex: 1 },
|
|
49221
49288
|
styles: {
|
|
49222
49289
|
input: {
|
|
@@ -49240,7 +49307,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
|
|
|
49240
49307
|
}
|
|
49241
49308
|
|
|
49242
49309
|
// src/mantine/components/CoverImage.tsx
|
|
49243
|
-
import React438, { useState as
|
|
49310
|
+
import React438, { useState as useState253, useRef as useRef62, useEffect as useEffect188, useMemo as useMemo179 } from "react";
|
|
49244
49311
|
import { Box as Box77, Group as Group168 } from "@mantine/core";
|
|
49245
49312
|
import { IconMoodSmile, IconPhoto as IconPhoto6, IconSettings as IconSettings24, IconArrowsMove, IconTrash as IconTrash15, IconRefresh as IconRefresh16 } from "@tabler/icons-react";
|
|
49246
49313
|
|
|
@@ -49431,13 +49498,13 @@ function PageIcon({ src, iconSize = 64, useCenter = false, style }) {
|
|
|
49431
49498
|
import { useDisclosure as useDisclosure7 } from "@mantine/hooks";
|
|
49432
49499
|
|
|
49433
49500
|
// src/mantine/components/FlowSettingsPanel.tsx
|
|
49434
|
-
import React437, { useState as
|
|
49501
|
+
import React437, { useState as useState252, useEffect as useEffect187, useCallback as useCallback199 } from "react";
|
|
49435
49502
|
import { Stack as Stack309, Group as Group167, Button as Button105, ActionIcon as ActionIcon55, Text as Text292, Box as Box76 } from "@mantine/core";
|
|
49436
49503
|
import { IconPlus as IconPlus12, IconTrash as IconTrash14 } from "@tabler/icons-react";
|
|
49437
49504
|
var SYSTEM_KEYS = /* @__PURE__ */ new Set(["@context", "_type", "schema_version", "doc_id", "title", "createdAt", "createdBy", "flowOwnerDid"]);
|
|
49438
49505
|
var FlowSettingsPanel = ({ editor }) => {
|
|
49439
49506
|
const { closePanel } = usePanelStore();
|
|
49440
|
-
const [rows, setRows] =
|
|
49507
|
+
const [rows, setRows] = useState252([]);
|
|
49441
49508
|
const loadSettings = useCallback199(() => {
|
|
49442
49509
|
const metadata = editor.getFlowMetadata?.();
|
|
49443
49510
|
if (!metadata) return;
|
|
@@ -49505,13 +49572,13 @@ var FlowSettingsPanel = ({ editor }) => {
|
|
|
49505
49572
|
// src/mantine/components/CoverImage.tsx
|
|
49506
49573
|
function CoverImage({ coverImageUrl, logoUrl }) {
|
|
49507
49574
|
const { editor, handlers, editable } = useBlocknoteContext();
|
|
49508
|
-
const [isHovering, setIsHovering] =
|
|
49509
|
-
const [isRepositioning, setIsRepositioning] =
|
|
49510
|
-
const [coverPosition, setCoverPosition] =
|
|
49575
|
+
const [isHovering, setIsHovering] = useState253(false);
|
|
49576
|
+
const [isRepositioning, setIsRepositioning] = useState253(false);
|
|
49577
|
+
const [coverPosition, setCoverPosition] = useState253(() => editor?.getPageMetadata?.()?.coverPosition ?? 50);
|
|
49511
49578
|
const coverFileInputRef = useRef62(null);
|
|
49512
49579
|
const logoFileInputRef = useRef62(null);
|
|
49513
49580
|
const [opened, { open, close }] = useDisclosure7(false);
|
|
49514
|
-
const [metadata, setMetadata] =
|
|
49581
|
+
const [metadata, setMetadata] = useState253(() => editor?.getPageMetadata?.() || null);
|
|
49515
49582
|
const settingsPanelContent = useMemo179(() => editor ? /* @__PURE__ */ React438.createElement(FlowSettingsPanel, { editor }) : null, [editor]);
|
|
49516
49583
|
const { open: openSettings } = usePanel("flow-settings-panel", settingsPanelContent);
|
|
49517
49584
|
useEffect188(() => {
|
|
@@ -49804,7 +49871,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
49804
49871
|
}
|
|
49805
49872
|
|
|
49806
49873
|
// src/mantine/components/PageTitle.tsx
|
|
49807
|
-
import React439, { useState as
|
|
49874
|
+
import React439, { useState as useState254, useEffect as useEffect189, useRef as useRef63, useCallback as useCallback200 } from "react";
|
|
49808
49875
|
import { Box as Box78 } from "@mantine/core";
|
|
49809
49876
|
var DEFAULT_TITLE = "New page";
|
|
49810
49877
|
function isUserTitle(name) {
|
|
@@ -49849,8 +49916,8 @@ function insertPlainTextAtSelection(root, text) {
|
|
|
49849
49916
|
}
|
|
49850
49917
|
function PageTitle({ editor, editable }) {
|
|
49851
49918
|
const t = useTranslate();
|
|
49852
|
-
const [title, setTitle] =
|
|
49853
|
-
const [hasIcon, setHasIcon] =
|
|
49919
|
+
const [title, setTitle] = useState254("");
|
|
49920
|
+
const [hasIcon, setHasIcon] = useState254(false);
|
|
49854
49921
|
const titleRef = useRef63(null);
|
|
49855
49922
|
const isComposing = useRef63(false);
|
|
49856
49923
|
useEffect189(() => {
|
|
@@ -50007,7 +50074,7 @@ if (typeof document !== "undefined") {
|
|
|
50007
50074
|
}
|
|
50008
50075
|
|
|
50009
50076
|
// src/mantine/components/ExternalDropZone.tsx
|
|
50010
|
-
import React440, { useCallback as useCallback201, useEffect as useEffect190, useRef as useRef64, useState as
|
|
50077
|
+
import React440, { useCallback as useCallback201, useEffect as useEffect190, useRef as useRef64, useState as useState255 } from "react";
|
|
50011
50078
|
import { Box as Box79 } from "@mantine/core";
|
|
50012
50079
|
var SCROLL_ZONE_SIZE = 80;
|
|
50013
50080
|
var SCROLL_SPEED = 12;
|
|
@@ -50021,9 +50088,9 @@ var ExternalDropZone = ({
|
|
|
50021
50088
|
children
|
|
50022
50089
|
}) => {
|
|
50023
50090
|
const containerRef = useRef64(null);
|
|
50024
|
-
const [isValidDrag, setIsValidDrag] =
|
|
50025
|
-
const [isHoveringInPlacementMode, setIsHoveringInPlacementMode] =
|
|
50026
|
-
const [indicatorStyle, setIndicatorStyle] =
|
|
50091
|
+
const [isValidDrag, setIsValidDrag] = useState255(false);
|
|
50092
|
+
const [isHoveringInPlacementMode, setIsHoveringInPlacementMode] = useState255(false);
|
|
50093
|
+
const [indicatorStyle, setIndicatorStyle] = useState255({});
|
|
50027
50094
|
const dropPositionRef = useRef64(null);
|
|
50028
50095
|
const scrollAnimationRef = useRef64(null);
|
|
50029
50096
|
const scrollDirectionRef = useRef64(null);
|
|
@@ -50378,7 +50445,7 @@ function sanitizeThemeForMantine7(theme) {
|
|
|
50378
50445
|
}
|
|
50379
50446
|
|
|
50380
50447
|
// src/mantine/components/CommandPalette.tsx
|
|
50381
|
-
import React441, { useEffect as useEffect191, useRef as useRef65, useState as
|
|
50448
|
+
import React441, { useEffect as useEffect191, useRef as useRef65, useState as useState256, useMemo as useMemo180, useCallback as useCallback202 } from "react";
|
|
50382
50449
|
import { Box as Box80, Text as Text293, Stack as Stack310 } from "@mantine/core";
|
|
50383
50450
|
var GROUP_ORDER = {
|
|
50384
50451
|
Headings: 0,
|
|
@@ -50409,7 +50476,7 @@ function translateGroupLabel(groupKey, t) {
|
|
|
50409
50476
|
}
|
|
50410
50477
|
function PaletteItem({ item, isSelected, onClick, id }) {
|
|
50411
50478
|
const ref = useRef65(null);
|
|
50412
|
-
const [hovered, setHovered] =
|
|
50479
|
+
const [hovered, setHovered] = useState256(false);
|
|
50413
50480
|
useEffect191(() => {
|
|
50414
50481
|
if (isSelected && ref.current) {
|
|
50415
50482
|
ref.current.scrollIntoView({ block: "nearest" });
|
|
@@ -50899,7 +50966,7 @@ function IxoEditor({
|
|
|
50899
50966
|
}
|
|
50900
50967
|
|
|
50901
50968
|
// src/mantine/components/DevUcanGrantButton.tsx
|
|
50902
|
-
import React444, { useEffect as useEffect193, useMemo as useMemo182, useState as
|
|
50969
|
+
import React444, { useEffect as useEffect193, useMemo as useMemo182, useState as useState257 } from "react";
|
|
50903
50970
|
import { Alert as Alert53, Badge as Badge63, Button as Button106, Checkbox as Checkbox16, Divider as Divider44, Group as Group169, Loader as Loader101, Modal as Modal4, Paper as Paper27, Select as Select11, Stack as Stack311, Text as Text294 } from "@mantine/core";
|
|
50904
50971
|
import { IconKey as IconKey7, IconShieldPlus as IconShieldPlus4 } from "@tabler/icons-react";
|
|
50905
50972
|
var FLOW_AGENT_COMMAND_TYPES = [
|
|
@@ -50977,13 +51044,13 @@ function DevUcanGrantButton({ editor, handlers: propHandlers }) {
|
|
|
50977
51044
|
const { handlers: contextHandlers } = useBlocknoteContext();
|
|
50978
51045
|
const editorHandlers = getHandlersFromEditor(editor);
|
|
50979
51046
|
const handlers = propHandlers || contextHandlers || editorHandlers;
|
|
50980
|
-
const [opened, setOpened] =
|
|
50981
|
-
const [members, setMembers] =
|
|
50982
|
-
const [selectedMemberDid, setSelectedMemberDid] =
|
|
50983
|
-
const [selectedCapabilities, setSelectedCapabilities] =
|
|
50984
|
-
const [loadingMembers, setLoadingMembers] =
|
|
50985
|
-
const [signing, setSigning] =
|
|
50986
|
-
const [message, setMessage] =
|
|
51047
|
+
const [opened, setOpened] = useState257(false);
|
|
51048
|
+
const [members, setMembers] = useState257([]);
|
|
51049
|
+
const [selectedMemberDid, setSelectedMemberDid] = useState257(null);
|
|
51050
|
+
const [selectedCapabilities, setSelectedCapabilities] = useState257([]);
|
|
51051
|
+
const [loadingMembers, setLoadingMembers] = useState257(false);
|
|
51052
|
+
const [signing, setSigning] = useState257(false);
|
|
51053
|
+
const [message, setMessage] = useState257(null);
|
|
50987
51054
|
const roomId = editor.getRoomId?.() || "";
|
|
50988
51055
|
const matrixClient = editor.getMatrixClient?.();
|
|
50989
51056
|
const flowOwnerDid = editor.getFlowOwnerDid?.() || editor.user?.id || "";
|
|
@@ -51180,15 +51247,15 @@ function DevUcanGrantButton({ editor, handlers: propHandlers }) {
|
|
|
51180
51247
|
}
|
|
51181
51248
|
|
|
51182
51249
|
// src/mantine/components/EntitySigningSetup.tsx
|
|
51183
|
-
import React445, { useState as
|
|
51250
|
+
import React445, { useState as useState258 } from "react";
|
|
51184
51251
|
import { Modal as Modal5, Stack as Stack312, Text as Text295, TextInput as TextInput12, Button as Button107, Alert as Alert54, Group as Group170 } from "@mantine/core";
|
|
51185
51252
|
import { IconAlertCircle as IconAlertCircle53, IconCheck as IconCheck54, IconKey as IconKey8 } from "@tabler/icons-react";
|
|
51186
51253
|
var EntitySigningSetup = ({ opened, onClose, entityDid, entityName, onSetup }) => {
|
|
51187
|
-
const [pin, setPin] =
|
|
51188
|
-
const [confirmPin, setConfirmPin] =
|
|
51189
|
-
const [loading, setLoading] =
|
|
51190
|
-
const [error, setError] =
|
|
51191
|
-
const [success, setSuccess] =
|
|
51254
|
+
const [pin, setPin] = useState258("");
|
|
51255
|
+
const [confirmPin, setConfirmPin] = useState258("");
|
|
51256
|
+
const [loading, setLoading] = useState258(false);
|
|
51257
|
+
const [error, setError] = useState258(null);
|
|
51258
|
+
const [success, setSuccess] = useState258(false);
|
|
51192
51259
|
const handleSetup = async () => {
|
|
51193
51260
|
if (pin.length < 4) {
|
|
51194
51261
|
setError("PIN must be at least 4 characters");
|
|
@@ -51252,13 +51319,13 @@ var EntitySigningSetup = ({ opened, onClose, entityDid, entityName, onSetup }) =
|
|
|
51252
51319
|
};
|
|
51253
51320
|
|
|
51254
51321
|
// src/mantine/components/FlowPermissionsPanel.tsx
|
|
51255
|
-
import React446, { useState as
|
|
51322
|
+
import React446, { useState as useState259, useEffect as useEffect194, useMemo as useMemo183 } from "react";
|
|
51256
51323
|
import { Stack as Stack313, Text as Text296, Paper as Paper28, Group as Group171, Badge as Badge64, Button as Button108, ActionIcon as ActionIcon56, Loader as Loader102, Alert as Alert55, Divider as Divider45 } from "@mantine/core";
|
|
51257
51324
|
import { IconPlus as IconPlus13, IconTrash as IconTrash16, IconShieldCheck as IconShieldCheck19, IconUser as IconUser15, IconRobot as IconRobot5, IconBuilding as IconBuilding2 } from "@tabler/icons-react";
|
|
51258
51325
|
var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission, onRevokePermission, getUserDisplayName }) => {
|
|
51259
|
-
const [delegations, setDelegations] =
|
|
51260
|
-
const [loading, setLoading] =
|
|
51261
|
-
const [revoking, setRevoking] =
|
|
51326
|
+
const [delegations, setDelegations] = useState259([]);
|
|
51327
|
+
const [loading, setLoading] = useState259(true);
|
|
51328
|
+
const [revoking, setRevoking] = useState259(null);
|
|
51262
51329
|
const rootDelegation = useMemo183(() => {
|
|
51263
51330
|
if (editor.getUcanService) {
|
|
51264
51331
|
return editor.getUcanService()?.getRootDelegation() || null;
|
|
@@ -51339,27 +51406,27 @@ var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission,
|
|
|
51339
51406
|
};
|
|
51340
51407
|
|
|
51341
51408
|
// src/mantine/components/GrantPermissionModal.tsx
|
|
51342
|
-
import React447, { useState as
|
|
51409
|
+
import React447, { useState as useState260, useCallback as useCallback203 } from "react";
|
|
51343
51410
|
import { Modal as Modal6, Stack as Stack314, Text as Text297, TextInput as TextInput13, Button as Button109, Group as Group172, Radio as Radio7, Checkbox as Checkbox17, Alert as Alert56, Paper as Paper29, Loader as Loader103, Badge as Badge65, ActionIcon as ActionIcon57, Divider as Divider46, NumberInput as NumberInput16 } from "@mantine/core";
|
|
51344
51411
|
import { IconSearch as IconSearch12, IconUser as IconUser16, IconRobot as IconRobot6, IconX as IconX23, IconShieldPlus as IconShieldPlus5 } from "@tabler/icons-react";
|
|
51345
51412
|
var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, searchUsers, getOracles, onGrant }) => {
|
|
51346
51413
|
const singleBlockMode = !!targetBlockId || blocks.length === 1;
|
|
51347
51414
|
const fixedBlockId = targetBlockId || (blocks.length === 1 ? blocks[0].id : null);
|
|
51348
51415
|
const fixedBlock = fixedBlockId ? blocks.find((b) => b.id === fixedBlockId) || blocks[0] : null;
|
|
51349
|
-
const [recipientType, setRecipientType] =
|
|
51350
|
-
const [searchQuery, setSearchQuery] =
|
|
51351
|
-
const [searchResults, setSearchResults] =
|
|
51352
|
-
const [searching, setSearching] =
|
|
51353
|
-
const [selectedRecipient, setSelectedRecipient] =
|
|
51354
|
-
const [manualDid, setManualDid] =
|
|
51355
|
-
const [scopeType, setScopeType] =
|
|
51356
|
-
const [selectedBlocks, setSelectedBlocks] =
|
|
51357
|
-
const [expirationEnabled, setExpirationEnabled] =
|
|
51358
|
-
const [expirationDays, setExpirationDays] =
|
|
51359
|
-
const [canDelegate, setCanDelegate] =
|
|
51360
|
-
const [pin, setPin] =
|
|
51361
|
-
const [loading, setLoading] =
|
|
51362
|
-
const [error, setError] =
|
|
51416
|
+
const [recipientType, setRecipientType] = useState260("user");
|
|
51417
|
+
const [searchQuery, setSearchQuery] = useState260("");
|
|
51418
|
+
const [searchResults, setSearchResults] = useState260([]);
|
|
51419
|
+
const [searching, setSearching] = useState260(false);
|
|
51420
|
+
const [selectedRecipient, setSelectedRecipient] = useState260(null);
|
|
51421
|
+
const [manualDid, setManualDid] = useState260("");
|
|
51422
|
+
const [scopeType, setScopeType] = useState260("full");
|
|
51423
|
+
const [selectedBlocks, setSelectedBlocks] = useState260([]);
|
|
51424
|
+
const [expirationEnabled, setExpirationEnabled] = useState260(false);
|
|
51425
|
+
const [expirationDays, setExpirationDays] = useState260(30);
|
|
51426
|
+
const [canDelegate, setCanDelegate] = useState260(false);
|
|
51427
|
+
const [pin, setPin] = useState260("");
|
|
51428
|
+
const [loading, setLoading] = useState260(false);
|
|
51429
|
+
const [error, setError] = useState260(null);
|
|
51363
51430
|
const handleSearch = useCallback203(async () => {
|
|
51364
51431
|
if (searchQuery.length < 2) return;
|
|
51365
51432
|
setSearching(true);
|
|
@@ -51654,4 +51721,4 @@ export {
|
|
|
51654
51721
|
ixoGraphQLClient,
|
|
51655
51722
|
getEntity
|
|
51656
51723
|
};
|
|
51657
|
-
//# sourceMappingURL=chunk-
|
|
51724
|
+
//# sourceMappingURL=chunk-OVS6HMTH.js.map
|