@ixo/editor 5.1.0 → 5.3.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.
- package/dist/{chunk-ZA2A4NPL.mjs → chunk-DRPUOYZY.mjs} +315 -52
- package/dist/chunk-DRPUOYZY.mjs.map +1 -0
- package/dist/{chunk-75MWYZJ2.mjs → chunk-GSW6ADEY.mjs} +9 -46
- package/dist/chunk-GSW6ADEY.mjs.map +1 -0
- package/dist/{chunk-AT7JTDI3.mjs → chunk-YXBRGFBX.mjs} +2 -2
- package/dist/core/index.mjs +2 -2
- package/dist/index.mjs +3 -3
- package/dist/mantine/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-75MWYZJ2.mjs.map +0 -1
- package/dist/chunk-ZA2A4NPL.mjs.map +0 -1
- /package/dist/{chunk-AT7JTDI3.mjs.map → chunk-YXBRGFBX.mjs.map} +0 -0
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
tempDomainCreatorSurvey,
|
|
29
29
|
transformSurveyToCredentialSubject,
|
|
30
30
|
writeRunRecordAndReconcile
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-GSW6ADEY.mjs";
|
|
32
32
|
|
|
33
33
|
// src/mantine/hooks/useCreateIxoEditor.ts
|
|
34
34
|
import { useCreateBlockNote } from "@blocknote/react";
|
|
@@ -6311,6 +6311,44 @@ import React66, { useState as useState22, useEffect as useEffect22, useCallback
|
|
|
6311
6311
|
import { Loader as Loader5, Stack as Stack41, Text as Text40, ActionIcon as ActionIcon9, Alert as Alert7, Box as Box19, Group as Group15 } from "@mantine/core";
|
|
6312
6312
|
import { IconArrowLeft as IconArrowLeft2, IconAlertCircle as IconAlertCircle2 } from "@tabler/icons-react";
|
|
6313
6313
|
import { Survey as Survey2, SurveyModel as SurveyModel2 } from "@ixo/surveys";
|
|
6314
|
+
|
|
6315
|
+
// src/mantine/utils/surveyAnalytics.ts
|
|
6316
|
+
function buildBlockLabel(blockId, title) {
|
|
6317
|
+
const trimmedTitle = typeof title === "string" ? title.trim() : "";
|
|
6318
|
+
if (trimmedTitle) return trimmedTitle;
|
|
6319
|
+
if (blockId) return `Block ${blockId.slice(0, 8)}`;
|
|
6320
|
+
return "Block (unknown)";
|
|
6321
|
+
}
|
|
6322
|
+
function getFlowRoomContext(editor) {
|
|
6323
|
+
const roomId = editor?.getRoomId?.();
|
|
6324
|
+
if (!roomId) return {};
|
|
6325
|
+
const matrixClient = editor?.getMatrixClient?.();
|
|
6326
|
+
const room = matrixClient?.getRoom?.(roomId);
|
|
6327
|
+
if (!room) return { flowRoomId: roomId };
|
|
6328
|
+
return {
|
|
6329
|
+
flowRoomId: roomId,
|
|
6330
|
+
flowName: room.name,
|
|
6331
|
+
flowAlias: room.getCanonicalAlias() || void 0
|
|
6332
|
+
};
|
|
6333
|
+
}
|
|
6334
|
+
function attachSurveyAnalytics({ model, handlers, flowType, sectionName, extraProps }) {
|
|
6335
|
+
const emit = handlers?.onAnalyticsEvent;
|
|
6336
|
+
if (!emit || !model) return () => {
|
|
6337
|
+
};
|
|
6338
|
+
const onComplete = () => {
|
|
6339
|
+
emit("editor_flow_section_completed", {
|
|
6340
|
+
flowType,
|
|
6341
|
+
sectionName,
|
|
6342
|
+
...extraProps ?? {}
|
|
6343
|
+
});
|
|
6344
|
+
};
|
|
6345
|
+
model.onComplete.add(onComplete);
|
|
6346
|
+
return () => {
|
|
6347
|
+
model.onComplete.remove(onComplete);
|
|
6348
|
+
};
|
|
6349
|
+
}
|
|
6350
|
+
|
|
6351
|
+
// src/mantine/blocks/claim/flow/ClaimsListSheet.tsx
|
|
6314
6352
|
var ClaimsListSheet = ({
|
|
6315
6353
|
editor,
|
|
6316
6354
|
block,
|
|
@@ -6397,6 +6435,17 @@ var ClaimsListSheet = ({
|
|
|
6397
6435
|
async (sender) => {
|
|
6398
6436
|
console.log("[ClaimsListSheet] handleSurveyComplete fired", { data: sender?.data });
|
|
6399
6437
|
const surveyData = sender.data;
|
|
6438
|
+
const submissionProps = {
|
|
6439
|
+
flowType: "claim-submission",
|
|
6440
|
+
entityDid: handlers.getEntityDid?.(),
|
|
6441
|
+
...getFlowRoomContext(editor),
|
|
6442
|
+
blockId: block.id,
|
|
6443
|
+
blockTitle: block?.props?.title,
|
|
6444
|
+
blockLabel: buildBlockLabel(block.id, block?.props?.title),
|
|
6445
|
+
deedId,
|
|
6446
|
+
collectionId
|
|
6447
|
+
};
|
|
6448
|
+
let submittedEmitted = false;
|
|
6400
6449
|
try {
|
|
6401
6450
|
const pin = await handlers.requestPin({
|
|
6402
6451
|
title: "Verify Identity",
|
|
@@ -6411,6 +6460,7 @@ var ClaimsListSheet = ({
|
|
|
6411
6460
|
if (!adminAddress) {
|
|
6412
6461
|
throw new Error("Admin address is not set. Please configure the claim block first.");
|
|
6413
6462
|
}
|
|
6463
|
+
handlers.onAnalyticsEvent?.("editor_flow_submission_attempted", submissionProps);
|
|
6414
6464
|
console.log("[ClaimsListSheet] submitClaim payload", {
|
|
6415
6465
|
deedId,
|
|
6416
6466
|
collectionId,
|
|
@@ -6445,6 +6495,8 @@ var ClaimsListSheet = ({
|
|
|
6445
6495
|
throw new Error("No result returned from submitClaim");
|
|
6446
6496
|
}
|
|
6447
6497
|
const claimId = result?.claimId || result?.id || `${execution.flowNode.id}-${Date.now()}`;
|
|
6498
|
+
handlers.onAnalyticsEvent?.("editor_flow_submitted", { ...submissionProps, claimId });
|
|
6499
|
+
submittedEmitted = true;
|
|
6448
6500
|
return {
|
|
6449
6501
|
claimId,
|
|
6450
6502
|
submittedByDid: execution.actorDid,
|
|
@@ -6460,6 +6512,9 @@ var ClaimsListSheet = ({
|
|
|
6460
6512
|
onSubmitComplete?.();
|
|
6461
6513
|
} catch (error2) {
|
|
6462
6514
|
const errorMsg = error2 instanceof Error ? error2.message : "Failed to submit claim";
|
|
6515
|
+
if (!submittedEmitted) {
|
|
6516
|
+
handlers.onAnalyticsEvent?.("editor_flow_submission_failed", { ...submissionProps, reason: errorMsg });
|
|
6517
|
+
}
|
|
6463
6518
|
if (error2 instanceof Error && error2.message === "No PIN provided") {
|
|
6464
6519
|
} else if (error2 instanceof Error && error2.message === "No result returned from submitClaim") {
|
|
6465
6520
|
} else if (error2 instanceof Error && error2.message.includes("requestPin")) {
|
|
@@ -6486,6 +6541,23 @@ var ClaimsListSheet = ({
|
|
|
6486
6541
|
}
|
|
6487
6542
|
return void 0;
|
|
6488
6543
|
}, [surveyModel, handleSurveyComplete]);
|
|
6544
|
+
useEffect22(() => {
|
|
6545
|
+
return attachSurveyAnalytics({
|
|
6546
|
+
model: surveyModel,
|
|
6547
|
+
handlers,
|
|
6548
|
+
flowType: "claim-submission",
|
|
6549
|
+
sectionName: "claim-survey",
|
|
6550
|
+
extraProps: {
|
|
6551
|
+
entityDid: handlers?.getEntityDid?.(),
|
|
6552
|
+
...getFlowRoomContext(editor),
|
|
6553
|
+
blockId: block.id,
|
|
6554
|
+
blockTitle: block?.props?.title,
|
|
6555
|
+
blockLabel: buildBlockLabel(block.id, block?.props?.title),
|
|
6556
|
+
deedId,
|
|
6557
|
+
collectionId
|
|
6558
|
+
}
|
|
6559
|
+
});
|
|
6560
|
+
}, [surveyModel, handlers, editor, deedId, collectionId, block.id, block?.props?.title]);
|
|
6489
6561
|
const handleNewClaim = () => {
|
|
6490
6562
|
console.log("[ClaimsListSheet] handleNewClaim", { hasSurveyJson: !!surveyJson });
|
|
6491
6563
|
if (!surveyJson) {
|
|
@@ -7220,6 +7292,7 @@ import { useState as useState30, useEffect as useEffect28, useMemo as useMemo30,
|
|
|
7220
7292
|
import { SurveyModel as SurveyModel4 } from "@ixo/surveys";
|
|
7221
7293
|
function useBidSurvey(deedId, collectionId, role, onSubmitComplete, execution, executeHookedActions) {
|
|
7222
7294
|
const handlers = useBlocknoteHandlers();
|
|
7295
|
+
const { editor } = useBlocknoteContext();
|
|
7223
7296
|
const { closePanel } = usePanelStore();
|
|
7224
7297
|
const [surveyJson, setSurveyJson] = useState30(null);
|
|
7225
7298
|
const [loading, setLoading] = useState30(true);
|
|
@@ -7254,8 +7327,20 @@ function useBidSurvey(deedId, collectionId, role, onSubmitComplete, execution, e
|
|
|
7254
7327
|
const handleSurveyComplete = useCallback26(
|
|
7255
7328
|
async (sender) => {
|
|
7256
7329
|
const surveyData = sender.data;
|
|
7330
|
+
const submissionProps = {
|
|
7331
|
+
flowType: "bid-submission",
|
|
7332
|
+
entityDid: handlers.getEntityDid?.(),
|
|
7333
|
+
...getFlowRoomContext(editor),
|
|
7334
|
+
blockId: execution.flowNode?.id,
|
|
7335
|
+
blockLabel: buildBlockLabel(execution.flowNode?.id),
|
|
7336
|
+
deedId,
|
|
7337
|
+
collectionId,
|
|
7338
|
+
role
|
|
7339
|
+
};
|
|
7340
|
+
let submittedEmitted = false;
|
|
7257
7341
|
try {
|
|
7258
7342
|
const bidRole = role === "service_agent" ? "SA" /* serviceProviders */ : "EA" /* evaluators */;
|
|
7343
|
+
handlers.onAnalyticsEvent?.("editor_flow_submission_attempted", submissionProps);
|
|
7259
7344
|
const actionResult = await executeNode({
|
|
7260
7345
|
node: execution.flowNode,
|
|
7261
7346
|
actorDid: execution.actorDid,
|
|
@@ -7278,6 +7363,8 @@ function useBidSurvey(deedId, collectionId, role, onSubmitComplete, execution, e
|
|
|
7278
7363
|
surveyAnswers: surveyData
|
|
7279
7364
|
});
|
|
7280
7365
|
const claimId = submission?.claimId || submission?.id || submission?.bidId || `${execution.flowNode.id}-${Date.now()}`;
|
|
7366
|
+
handlers.onAnalyticsEvent?.("editor_flow_submitted", { ...submissionProps, bidId: claimId });
|
|
7367
|
+
submittedEmitted = true;
|
|
7281
7368
|
return {
|
|
7282
7369
|
claimId,
|
|
7283
7370
|
submittedByDid: execution.actorDid,
|
|
@@ -7302,11 +7389,32 @@ function useBidSurvey(deedId, collectionId, role, onSubmitComplete, execution, e
|
|
|
7302
7389
|
closePanel();
|
|
7303
7390
|
onSubmitComplete?.();
|
|
7304
7391
|
} catch (error2) {
|
|
7305
|
-
|
|
7392
|
+
const reason = error2 instanceof Error ? error2.message : "Failed to submit bid";
|
|
7393
|
+
if (!submittedEmitted) {
|
|
7394
|
+
handlers.onAnalyticsEvent?.("editor_flow_submission_failed", { ...submissionProps, reason });
|
|
7395
|
+
}
|
|
7396
|
+
setError(reason);
|
|
7306
7397
|
}
|
|
7307
7398
|
},
|
|
7308
7399
|
[handlers, collectionId, role, closePanel, onSubmitComplete, execution, executeHookedActions, deedId]
|
|
7309
7400
|
);
|
|
7401
|
+
useEffect28(() => {
|
|
7402
|
+
return attachSurveyAnalytics({
|
|
7403
|
+
model: surveyModel,
|
|
7404
|
+
handlers,
|
|
7405
|
+
flowType: "bid-submission",
|
|
7406
|
+
sectionName: `bid-${role}-survey`,
|
|
7407
|
+
extraProps: {
|
|
7408
|
+
entityDid: handlers?.getEntityDid?.(),
|
|
7409
|
+
...getFlowRoomContext(editor),
|
|
7410
|
+
blockId: execution.flowNode?.id,
|
|
7411
|
+
blockLabel: buildBlockLabel(execution.flowNode?.id),
|
|
7412
|
+
deedId,
|
|
7413
|
+
collectionId,
|
|
7414
|
+
role
|
|
7415
|
+
}
|
|
7416
|
+
});
|
|
7417
|
+
}, [surveyModel, handlers, editor, deedId, collectionId, role, execution.flowNode?.id]);
|
|
7310
7418
|
return {
|
|
7311
7419
|
surveyModel,
|
|
7312
7420
|
loading,
|
|
@@ -25116,10 +25224,23 @@ var BidFlowDetail = ({
|
|
|
25116
25224
|
setError("Bid action is not registered");
|
|
25117
25225
|
return;
|
|
25118
25226
|
}
|
|
25227
|
+
const submissionProps = {
|
|
25228
|
+
flowType: "bid-submission",
|
|
25229
|
+
entityDid: handlers.getEntityDid?.(),
|
|
25230
|
+
...getFlowRoomContext(editor),
|
|
25231
|
+
blockId: block.id,
|
|
25232
|
+
blockTitle: block?.props?.title,
|
|
25233
|
+
blockLabel: buildBlockLabel(block.id, block?.props?.title),
|
|
25234
|
+
deedId: deedDid,
|
|
25235
|
+
collectionId,
|
|
25236
|
+
role
|
|
25237
|
+
};
|
|
25238
|
+
let submittedEmitted = false;
|
|
25119
25239
|
setSubmitting(true);
|
|
25120
25240
|
setError(null);
|
|
25121
25241
|
updateRuntime({ state: "running", error: void 0 });
|
|
25122
25242
|
try {
|
|
25243
|
+
handlers.onAnalyticsEvent?.("editor_flow_submission_attempted", submissionProps);
|
|
25123
25244
|
const outcome = await executeNode({
|
|
25124
25245
|
node: flowNode,
|
|
25125
25246
|
actorDid,
|
|
@@ -25153,6 +25274,11 @@ var BidFlowDetail = ({
|
|
|
25153
25274
|
editor
|
|
25154
25275
|
}
|
|
25155
25276
|
);
|
|
25277
|
+
handlers.onAnalyticsEvent?.("editor_flow_submitted", {
|
|
25278
|
+
...submissionProps,
|
|
25279
|
+
bidId: result.output?.bidId
|
|
25280
|
+
});
|
|
25281
|
+
submittedEmitted = true;
|
|
25156
25282
|
return {
|
|
25157
25283
|
payload: result.output,
|
|
25158
25284
|
submittedByDid: actorDid || void 0
|
|
@@ -25171,6 +25297,9 @@ var BidFlowDetail = ({
|
|
|
25171
25297
|
});
|
|
25172
25298
|
} catch (err) {
|
|
25173
25299
|
const message = err instanceof Error ? err.message : "Failed to submit bid";
|
|
25300
|
+
if (!submittedEmitted) {
|
|
25301
|
+
handlers.onAnalyticsEvent?.("editor_flow_submission_failed", { ...submissionProps, reason: message });
|
|
25302
|
+
}
|
|
25174
25303
|
setError(message);
|
|
25175
25304
|
updateRuntime({
|
|
25176
25305
|
state: "failed",
|
|
@@ -25206,6 +25335,24 @@ var BidFlowDetail = ({
|
|
|
25206
25335
|
surveyModel.onComplete.remove(handleSurveyComplete);
|
|
25207
25336
|
};
|
|
25208
25337
|
}, [surveyModel, handleSurveyComplete]);
|
|
25338
|
+
useEffect88(() => {
|
|
25339
|
+
return attachSurveyAnalytics({
|
|
25340
|
+
model: surveyModel,
|
|
25341
|
+
handlers,
|
|
25342
|
+
flowType: "bid-submission",
|
|
25343
|
+
sectionName: `bid-${role}-survey`,
|
|
25344
|
+
extraProps: {
|
|
25345
|
+
entityDid: handlers?.getEntityDid?.(),
|
|
25346
|
+
...getFlowRoomContext(editor),
|
|
25347
|
+
blockId: block.id,
|
|
25348
|
+
blockTitle: block?.props?.title,
|
|
25349
|
+
blockLabel: buildBlockLabel(block.id, block?.props?.title),
|
|
25350
|
+
deedId: deedDid,
|
|
25351
|
+
collectionId,
|
|
25352
|
+
role
|
|
25353
|
+
}
|
|
25354
|
+
});
|
|
25355
|
+
}, [surveyModel, handlers, editor, deedDid, collectionId, role, block.id, block?.props?.title]);
|
|
25209
25356
|
useEffect88(() => {
|
|
25210
25357
|
if (!provideSigningHandler || !surveyModel) return;
|
|
25211
25358
|
provideSigningHandler(async () => {
|
|
@@ -26319,10 +26466,22 @@ var ClaimFlowDetail = ({
|
|
|
26319
26466
|
setError("claim action is not registered");
|
|
26320
26467
|
return;
|
|
26321
26468
|
}
|
|
26469
|
+
const submissionProps = {
|
|
26470
|
+
flowType: "claim-submission",
|
|
26471
|
+
entityDid: handlers.getEntityDid?.(),
|
|
26472
|
+
...getFlowRoomContext(editor),
|
|
26473
|
+
blockId: block.id,
|
|
26474
|
+
blockTitle: block?.props?.title,
|
|
26475
|
+
blockLabel: buildBlockLabel(block.id, block?.props?.title),
|
|
26476
|
+
deedId: deedDid,
|
|
26477
|
+
collectionId
|
|
26478
|
+
};
|
|
26479
|
+
let submittedEmitted = false;
|
|
26322
26480
|
setSubmitting(true);
|
|
26323
26481
|
setError(null);
|
|
26324
26482
|
updateRuntime({ state: "running", error: void 0 });
|
|
26325
26483
|
try {
|
|
26484
|
+
handlers.onAnalyticsEvent?.("editor_flow_submission_attempted", submissionProps);
|
|
26326
26485
|
const outcome = await executeNode({
|
|
26327
26486
|
node: flowNode,
|
|
26328
26487
|
actorDid,
|
|
@@ -26356,6 +26515,11 @@ var ClaimFlowDetail = ({
|
|
|
26356
26515
|
editor
|
|
26357
26516
|
}
|
|
26358
26517
|
);
|
|
26518
|
+
handlers.onAnalyticsEvent?.("editor_flow_submitted", {
|
|
26519
|
+
...submissionProps,
|
|
26520
|
+
claimId: result.output?.claimId
|
|
26521
|
+
});
|
|
26522
|
+
submittedEmitted = true;
|
|
26359
26523
|
return {
|
|
26360
26524
|
payload: result.output,
|
|
26361
26525
|
submittedByDid: actorDid || void 0
|
|
@@ -26377,6 +26541,9 @@ var ClaimFlowDetail = ({
|
|
|
26377
26541
|
await fetchClaimsAndAdmin();
|
|
26378
26542
|
} catch (err) {
|
|
26379
26543
|
const message = err instanceof Error ? err.message : "Failed to submit claim";
|
|
26544
|
+
if (!submittedEmitted) {
|
|
26545
|
+
handlers.onAnalyticsEvent?.("editor_flow_submission_failed", { ...submissionProps, reason: message });
|
|
26546
|
+
}
|
|
26380
26547
|
setError(message);
|
|
26381
26548
|
updateRuntime({
|
|
26382
26549
|
state: "failed",
|
|
@@ -26415,6 +26582,23 @@ var ClaimFlowDetail = ({
|
|
|
26415
26582
|
surveyModel.onComplete.remove(handleSurveyComplete);
|
|
26416
26583
|
};
|
|
26417
26584
|
}, [surveyModel, handleSurveyComplete]);
|
|
26585
|
+
useEffect92(() => {
|
|
26586
|
+
return attachSurveyAnalytics({
|
|
26587
|
+
model: surveyModel,
|
|
26588
|
+
handlers,
|
|
26589
|
+
flowType: "claim-submission",
|
|
26590
|
+
sectionName: "claim-survey",
|
|
26591
|
+
extraProps: {
|
|
26592
|
+
entityDid: handlers?.getEntityDid?.(),
|
|
26593
|
+
...getFlowRoomContext(editor),
|
|
26594
|
+
blockId: block.id,
|
|
26595
|
+
blockTitle: block?.props?.title,
|
|
26596
|
+
blockLabel: buildBlockLabel(block.id, block?.props?.title),
|
|
26597
|
+
deedId: deedDid,
|
|
26598
|
+
collectionId
|
|
26599
|
+
}
|
|
26600
|
+
});
|
|
26601
|
+
}, [surveyModel, handlers, editor, deedDid, collectionId, block.id, block?.props?.title]);
|
|
26418
26602
|
if (selectedClaim) {
|
|
26419
26603
|
return /* @__PURE__ */ React262.createElement(Stack179, { gap: "md" }, /* @__PURE__ */ React262.createElement(Group99, { gap: "xs", align: "center" }, /* @__PURE__ */ React262.createElement(ActionIcon39, { variant: "subtle", color: "gray", size: "sm", onClick: () => setSelectedClaimId("") }, /* @__PURE__ */ React262.createElement(IconArrowLeft8, { size: 16 })), /* @__PURE__ */ React262.createElement(Text156, { fw: 500, size: "sm", title: selectedClaim.claimId }, "Claim #", truncateId(selectedClaim.claimId))), selectedClaimStatus && /* @__PURE__ */ React262.createElement(Group99, { gap: "xs", align: "center" }, /* @__PURE__ */ React262.createElement(Text156, { size: "sm", c: "dimmed" }, "Status:"), /* @__PURE__ */ React262.createElement(Text156, { fw: 500, size: "sm", c: selectedClaimStatus.color }, selectedClaimStatus.label), /* @__PURE__ */ React262.createElement(Text156, { size: "xs", c: "dimmed" }, "\xB7 ", getTimeAgo2(selectedClaim.submissionDate || ""))), isSelectedDisputed && /* @__PURE__ */ React262.createElement(Alert48, { color: "orange", title: "Claim disputed", styles: actionAlertStyles }, loadingDispute ? /* @__PURE__ */ React262.createElement(Group99, { gap: "xs" }, /* @__PURE__ */ React262.createElement(Loader45, { size: "xs" }), /* @__PURE__ */ React262.createElement(Text156, { size: "xs" }, "Loading dispute details\u2026")) : disputeDetails ? /* @__PURE__ */ React262.createElement(Stack179, { gap: 6 }, disputeDetails.reason ? /* @__PURE__ */ React262.createElement(Text156, { size: "sm" }, disputeDetails.reason) : /* @__PURE__ */ React262.createElement(Text156, { size: "sm", c: "dimmed" }, "The evaluator disputed this claim but did not provide a message."), (disputeDetails.evaluatorDid || disputeDetails.disputedAt) && /* @__PURE__ */ React262.createElement(Text156, { size: "xs", c: "dimmed" }, disputeDetails.evaluatorDid ? `By ${truncateAddress3(disputeDetails.evaluatorDid)}` : "", disputeDetails.evaluatorDid && disputeDetails.disputedAt ? " \xB7 " : "", disputeDetails.disputedAt ? new Date(disputeDetails.disputedAt).toLocaleString() : ""), /* @__PURE__ */ React262.createElement(BasePrimaryButton, { onClick: amendAndResubmit, disabled: isDisabled || submitting || !isServiceAgentAuthorized || !selectedClaimData }, "Amend & Resubmit")) : typeof handlers.getClaimDisputeDetails !== "function" ? /* @__PURE__ */ React262.createElement(Text156, { size: "xs", c: "dimmed" }, "Dispute details unavailable in this environment.") : /* @__PURE__ */ React262.createElement(Text156, { size: "xs", c: "dimmed" }, "No dispute record found on-chain for this claim.")), loadingClaimDetail ? /* @__PURE__ */ React262.createElement(Group99, { gap: "xs" }, /* @__PURE__ */ React262.createElement(Loader45, { size: "xs" }), /* @__PURE__ */ React262.createElement(Text156, { size: "xs", c: "dimmed" }, "Loading submission\u2026")) : detailSurveyModel ? /* @__PURE__ */ React262.createElement(StableSurvey, { model: detailSurveyModel }) : /* @__PURE__ */ React262.createElement(Text156, { size: "xs", c: "dimmed" }, "No submission data available."), error && /* @__PURE__ */ React262.createElement(Alert48, { color: "red", styles: actionAlertStyles }, error));
|
|
26420
26604
|
}
|
|
@@ -31316,7 +31500,8 @@ var TEMPLATE_FIELDS = [
|
|
|
31316
31500
|
"pubKey",
|
|
31317
31501
|
"pin",
|
|
31318
31502
|
"oracleName",
|
|
31319
|
-
"avatarUrl"
|
|
31503
|
+
"avatarUrl",
|
|
31504
|
+
"formAnswers"
|
|
31320
31505
|
];
|
|
31321
31506
|
function parseIdentityCreateInputs(json) {
|
|
31322
31507
|
try {
|
|
@@ -31445,14 +31630,26 @@ var IdentityCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime,
|
|
|
31445
31630
|
const resolveOpts = useMemo119(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
31446
31631
|
const resolvedInputs = useMemo119(() => {
|
|
31447
31632
|
const r = (val) => resolveReferences(val || "", editorDocument, resolveOpts).trim();
|
|
31633
|
+
const formAnswersStr = r(parsed.formAnswers);
|
|
31634
|
+
const form = (() => {
|
|
31635
|
+
if (!formAnswersStr) return {};
|
|
31636
|
+
try {
|
|
31637
|
+
const p = JSON.parse(formAnswersStr);
|
|
31638
|
+
return p && typeof p === "object" ? p : {};
|
|
31639
|
+
} catch {
|
|
31640
|
+
return {};
|
|
31641
|
+
}
|
|
31642
|
+
})();
|
|
31643
|
+
const pick = (top, fromForm) => top || (typeof fromForm === "string" ? fromForm : "");
|
|
31448
31644
|
return {
|
|
31449
31645
|
mnemonic: r(parsed.mnemonic),
|
|
31450
31646
|
did: r(parsed.did),
|
|
31451
31647
|
address: r(parsed.address),
|
|
31452
31648
|
pubKey: r(parsed.pubKey),
|
|
31453
|
-
pin: r(parsed.pin),
|
|
31454
|
-
oracleName: r(parsed.oracleName),
|
|
31455
|
-
avatarUrl: r(parsed.avatarUrl)
|
|
31649
|
+
pin: pick(r(parsed.pin), form.pin),
|
|
31650
|
+
oracleName: pick(r(parsed.oracleName), form.oracleName),
|
|
31651
|
+
avatarUrl: pick(r(parsed.avatarUrl), form.logoUrl),
|
|
31652
|
+
formAnswers: formAnswersStr
|
|
31456
31653
|
};
|
|
31457
31654
|
}, [parsed, editorDocument, resolveOpts]);
|
|
31458
31655
|
const inputsReady = !!(resolvedInputs.mnemonic && resolvedInputs.did && resolvedInputs.address && resolvedInputs.pubKey && resolvedInputs.pin && resolvedInputs.oracleName);
|
|
@@ -31640,7 +31837,9 @@ function parseEntityCreateOracleInputs(json) {
|
|
|
31640
31837
|
capabilities: parsed?.capabilities || "",
|
|
31641
31838
|
mcpConfig: parsed?.mcpConfig || "",
|
|
31642
31839
|
pin: parsed?.pin || "",
|
|
31643
|
-
parentProtocol: parsed?.parentProtocol || ""
|
|
31840
|
+
parentProtocol: parsed?.parentProtocol || "",
|
|
31841
|
+
opening: parsed?.opening || "",
|
|
31842
|
+
formAnswers: parsed?.formAnswers || ""
|
|
31644
31843
|
};
|
|
31645
31844
|
} catch {
|
|
31646
31845
|
return {
|
|
@@ -31663,7 +31862,9 @@ function parseEntityCreateOracleInputs(json) {
|
|
|
31663
31862
|
capabilities: "",
|
|
31664
31863
|
mcpConfig: "",
|
|
31665
31864
|
pin: "",
|
|
31666
|
-
parentProtocol: ""
|
|
31865
|
+
parentProtocol: "",
|
|
31866
|
+
opening: "",
|
|
31867
|
+
formAnswers: ""
|
|
31667
31868
|
};
|
|
31668
31869
|
}
|
|
31669
31870
|
}
|
|
@@ -31878,27 +32079,48 @@ var EntityCreateOracleFlowDetail = ({ inputs, editor, block, runtime, updateRunt
|
|
|
31878
32079
|
const resolveOpts = useMemo120(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
31879
32080
|
const resolvedInputs = useMemo120(() => {
|
|
31880
32081
|
const r = (val) => resolveReferences(val || "", editorDocument, resolveOpts).trim();
|
|
32082
|
+
const formAnswersStr = r(parsed.formAnswers);
|
|
32083
|
+
const form = (() => {
|
|
32084
|
+
if (!formAnswersStr) return {};
|
|
32085
|
+
try {
|
|
32086
|
+
const p = JSON.parse(formAnswersStr);
|
|
32087
|
+
return p && typeof p === "object" ? p : {};
|
|
32088
|
+
} catch {
|
|
32089
|
+
return {};
|
|
32090
|
+
}
|
|
32091
|
+
})();
|
|
32092
|
+
const pick = (top, fromForm) => {
|
|
32093
|
+
if (top) return top;
|
|
32094
|
+
if (typeof fromForm === "string") return fromForm;
|
|
32095
|
+
if (typeof fromForm === "number" || typeof fromForm === "boolean") return String(fromForm);
|
|
32096
|
+
return "";
|
|
32097
|
+
};
|
|
31881
32098
|
return {
|
|
32099
|
+
// From upstream runtime (wallet / identity blocks)
|
|
31882
32100
|
mnemonic: r(parsed.mnemonic),
|
|
31883
32101
|
address: r(parsed.address),
|
|
31884
32102
|
did: r(parsed.did),
|
|
31885
32103
|
pubKey: r(parsed.pubKey),
|
|
31886
32104
|
matrixAccessToken: r(parsed.matrixAccessToken),
|
|
31887
32105
|
matrixRoomId: r(parsed.matrixRoomId),
|
|
31888
|
-
|
|
31889
|
-
|
|
31890
|
-
|
|
31891
|
-
|
|
31892
|
-
|
|
31893
|
-
|
|
31894
|
-
|
|
31895
|
-
|
|
31896
|
-
|
|
31897
|
-
|
|
31898
|
-
|
|
31899
|
-
|
|
32106
|
+
// From form (with top-level override)
|
|
32107
|
+
pin: pick(r(parsed.pin), form.pin),
|
|
32108
|
+
oracleName: pick(r(parsed.oracleName), form.oracleName),
|
|
32109
|
+
orgName: pick(r(parsed.orgName), form.orgName),
|
|
32110
|
+
description: pick(r(parsed.description), form.description),
|
|
32111
|
+
location: pick(r(parsed.location), form.location),
|
|
32112
|
+
logoUrl: pick(r(parsed.logoUrl), form.logoUrl),
|
|
32113
|
+
coverImageUrl: pick(r(parsed.coverImageUrl), form.coverImageUrl),
|
|
32114
|
+
apiUrl: pick(r(parsed.apiUrl), form.apiUrl),
|
|
32115
|
+
price: pick(r(parsed.price), form.price),
|
|
32116
|
+
llmModel: pick(r(parsed.llmModel), form.llmModel),
|
|
32117
|
+
opening: pick(r(parsed.opening), form.opening),
|
|
32118
|
+
communicationStyle: pick(r(parsed.communicationStyle), form.communicationStyle),
|
|
32119
|
+
capabilities: pick(r(parsed.capabilities), form.capabilities),
|
|
31900
32120
|
mcpConfig: r(parsed.mcpConfig),
|
|
31901
|
-
parentProtocol: r(parsed.parentProtocol)
|
|
32121
|
+
parentProtocol: r(parsed.parentProtocol),
|
|
32122
|
+
// Pass the raw blob through so actionDef.run can also merge
|
|
32123
|
+
formAnswers: formAnswersStr
|
|
31902
32124
|
};
|
|
31903
32125
|
}, [parsed, editorDocument, resolveOpts]);
|
|
31904
32126
|
const inputsReady = !!(resolvedInputs.mnemonic && resolvedInputs.address && resolvedInputs.did && resolvedInputs.pubKey && resolvedInputs.matrixAccessToken && resolvedInputs.matrixRoomId && resolvedInputs.pin && resolvedInputs.oracleName && resolvedInputs.apiUrl && resolvedInputs.price);
|
|
@@ -33850,7 +34072,8 @@ var TEMPLATE_FIELDS4 = [
|
|
|
33850
34072
|
"matrixUserId",
|
|
33851
34073
|
"matrixAccountRoomId",
|
|
33852
34074
|
"oracleAddress",
|
|
33853
|
-
"oracleDid"
|
|
34075
|
+
"oracleDid",
|
|
34076
|
+
"formAnswers"
|
|
33854
34077
|
];
|
|
33855
34078
|
function parseOracleConfigureOracleInputs(json) {
|
|
33856
34079
|
try {
|
|
@@ -34122,6 +34345,22 @@ var OracleConfigureOracleFlowDetail = ({ inputs, editor, block, runtime, updateR
|
|
|
34122
34345
|
const resolveOpts = useMemo126(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
34123
34346
|
const resolvedInputs = useMemo126(() => {
|
|
34124
34347
|
const r = (val) => resolveReferences(String(val ?? ""), editorDocument, resolveOpts).trim();
|
|
34348
|
+
const formAnswersStr = r(parsed.formAnswers);
|
|
34349
|
+
const form = (() => {
|
|
34350
|
+
if (!formAnswersStr) return {};
|
|
34351
|
+
try {
|
|
34352
|
+
const p = JSON.parse(formAnswersStr);
|
|
34353
|
+
return p && typeof p === "object" ? p : {};
|
|
34354
|
+
} catch {
|
|
34355
|
+
return {};
|
|
34356
|
+
}
|
|
34357
|
+
})();
|
|
34358
|
+
const pick = (top, fromForm) => {
|
|
34359
|
+
if (top) return top;
|
|
34360
|
+
if (typeof fromForm === "string") return fromForm;
|
|
34361
|
+
if (typeof fromForm === "number" || typeof fromForm === "boolean") return String(fromForm);
|
|
34362
|
+
return "";
|
|
34363
|
+
};
|
|
34125
34364
|
return {
|
|
34126
34365
|
// Contract
|
|
34127
34366
|
oracleEntityDid: r(parsed.oracleEntityDid),
|
|
@@ -34134,27 +34373,29 @@ var OracleConfigureOracleFlowDetail = ({ inputs, editor, block, runtime, updateR
|
|
|
34134
34373
|
mnemonic: r(parsed.mnemonic),
|
|
34135
34374
|
matrixPassword: r(parsed.matrixPassword),
|
|
34136
34375
|
matrixRecoveryPhrase: r(parsed.matrixRecoveryPhrase),
|
|
34137
|
-
pin: r(parsed.pin),
|
|
34138
|
-
// Config
|
|
34139
|
-
oracleName: r(parsed.oracleName),
|
|
34140
|
-
orgName: r(parsed.orgName),
|
|
34141
|
-
description: r(parsed.description),
|
|
34142
|
-
location: r(parsed.location),
|
|
34143
|
-
price: r(parsed.price),
|
|
34144
|
-
apiUrl: r(parsed.apiUrl),
|
|
34376
|
+
pin: pick(r(parsed.pin), form.pin),
|
|
34377
|
+
// Config (form fallback)
|
|
34378
|
+
oracleName: pick(r(parsed.oracleName), form.oracleName),
|
|
34379
|
+
orgName: pick(r(parsed.orgName), form.orgName),
|
|
34380
|
+
description: pick(r(parsed.description), form.description),
|
|
34381
|
+
location: pick(r(parsed.location), form.location),
|
|
34382
|
+
price: pick(r(parsed.price), form.price),
|
|
34383
|
+
apiUrl: pick(r(parsed.apiUrl), form.apiUrl),
|
|
34145
34384
|
entityDid: r(parsed.entityDid),
|
|
34146
|
-
logoUrl: r(parsed.logoUrl),
|
|
34147
|
-
llmModel: r(parsed.llmModel),
|
|
34148
|
-
opening: r(parsed.opening),
|
|
34149
|
-
communicationStyle: r(parsed.communicationStyle),
|
|
34150
|
-
capabilities: r(parsed.capabilities),
|
|
34385
|
+
logoUrl: pick(r(parsed.logoUrl), form.logoUrl),
|
|
34386
|
+
llmModel: pick(r(parsed.llmModel), form.llmModel),
|
|
34387
|
+
opening: pick(r(parsed.opening), form.opening),
|
|
34388
|
+
communicationStyle: pick(r(parsed.communicationStyle), form.communicationStyle),
|
|
34389
|
+
capabilities: pick(r(parsed.capabilities), form.capabilities),
|
|
34151
34390
|
skills: parsed.skills,
|
|
34152
34391
|
mcpServers: parsed.mcpServers,
|
|
34153
34392
|
// Identifiers
|
|
34154
34393
|
matrixUserId: r(parsed.matrixUserId),
|
|
34155
34394
|
matrixAccountRoomId: r(parsed.matrixAccountRoomId),
|
|
34156
34395
|
oracleAddress: r(parsed.oracleAddress),
|
|
34157
|
-
oracleDid: r(parsed.oracleDid)
|
|
34396
|
+
oracleDid: r(parsed.oracleDid),
|
|
34397
|
+
// Pass the raw blob through so actionDef.run can also merge
|
|
34398
|
+
formAnswers: formAnswersStr
|
|
34158
34399
|
};
|
|
34159
34400
|
}, [parsed, editorDocument, resolveOpts]);
|
|
34160
34401
|
const requiredFieldEntries = [
|
|
@@ -34785,7 +35026,8 @@ var TEMPLATE_FIELDS6 = [
|
|
|
34785
35026
|
"matrixUsername",
|
|
34786
35027
|
"matrixAccountRoomId",
|
|
34787
35028
|
"freshAccessToken",
|
|
34788
|
-
"openRouterApiKey"
|
|
35029
|
+
"openRouterApiKey",
|
|
35030
|
+
"formAnswers"
|
|
34789
35031
|
];
|
|
34790
35032
|
function parseOracleDeployInputs(json) {
|
|
34791
35033
|
try {
|
|
@@ -34831,32 +35073,53 @@ var OracleDeployFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, i
|
|
|
34831
35073
|
const resolveOpts = useMemo129(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
34832
35074
|
const resolvedInputs = useMemo129(() => {
|
|
34833
35075
|
const r = (val) => resolveReferences(String(val ?? ""), editorDocument, resolveOpts).trim();
|
|
35076
|
+
const formAnswersStr = r(parsed.formAnswers);
|
|
35077
|
+
const form = (() => {
|
|
35078
|
+
if (!formAnswersStr) return {};
|
|
35079
|
+
try {
|
|
35080
|
+
const p = JSON.parse(formAnswersStr);
|
|
35081
|
+
return p && typeof p === "object" ? p : {};
|
|
35082
|
+
} catch {
|
|
35083
|
+
return {};
|
|
35084
|
+
}
|
|
35085
|
+
})();
|
|
35086
|
+
const pick = (top, fromForm) => {
|
|
35087
|
+
if (top) return top;
|
|
35088
|
+
if (typeof fromForm === "string") return fromForm;
|
|
35089
|
+
if (typeof fromForm === "number" || typeof fromForm === "boolean") return String(fromForm);
|
|
35090
|
+
return "";
|
|
35091
|
+
};
|
|
34834
35092
|
return {
|
|
34835
|
-
name
|
|
34836
|
-
|
|
34837
|
-
|
|
34838
|
-
|
|
34839
|
-
|
|
34840
|
-
|
|
34841
|
-
|
|
35093
|
+
// Deploy handler expects `name` = form.projectName (folder name on disk).
|
|
35094
|
+
// The action's run() renames form.projectName → name, but rawInputs spreads
|
|
35095
|
+
// *after* that rename, so an empty name here would clobber it. Resolve here.
|
|
35096
|
+
name: pick(r(parsed.name), form.projectName),
|
|
35097
|
+
oracleName: pick(r(parsed.oracleName), form.oracleName),
|
|
35098
|
+
orgName: pick(r(parsed.orgName), form.orgName),
|
|
35099
|
+
description: pick(r(parsed.description), form.description),
|
|
35100
|
+
location: pick(r(parsed.location), form.location),
|
|
35101
|
+
price: pick(r(parsed.price), form.price),
|
|
35102
|
+
apiUrl: pick(r(parsed.apiUrl), form.apiUrl),
|
|
34842
35103
|
network: r(parsed.network),
|
|
34843
35104
|
entityDid: r(parsed.entityDid),
|
|
34844
35105
|
roomId: r(parsed.roomId),
|
|
34845
|
-
logoUrl: r(parsed.logoUrl),
|
|
34846
|
-
llmModel: r(parsed.llmModel),
|
|
34847
|
-
opening: r(parsed.opening),
|
|
34848
|
-
communicationStyle: r(parsed.communicationStyle),
|
|
34849
|
-
capabilities: r(parsed.capabilities),
|
|
35106
|
+
logoUrl: pick(r(parsed.logoUrl), form.logoUrl),
|
|
35107
|
+
llmModel: pick(r(parsed.llmModel), form.llmModel),
|
|
35108
|
+
opening: pick(r(parsed.opening), form.opening),
|
|
35109
|
+
communicationStyle: pick(r(parsed.communicationStyle), form.communicationStyle),
|
|
35110
|
+
capabilities: pick(r(parsed.capabilities), form.capabilities),
|
|
34850
35111
|
skills: parsed.skills || "",
|
|
34851
35112
|
mcpServers: parsed.mcpServers || "",
|
|
34852
35113
|
mnemonic: r(parsed.mnemonic),
|
|
34853
35114
|
matrixPassword: r(parsed.matrixPassword),
|
|
34854
35115
|
matrixRecoveryPhrase: r(parsed.matrixRecoveryPhrase),
|
|
34855
|
-
pin: r(parsed.pin),
|
|
35116
|
+
pin: pick(r(parsed.pin), form.pin),
|
|
34856
35117
|
matrixUsername: r(parsed.matrixUsername),
|
|
34857
35118
|
matrixAccountRoomId: r(parsed.matrixAccountRoomId),
|
|
34858
35119
|
freshAccessToken: r(parsed.freshAccessToken),
|
|
34859
|
-
openRouterApiKey: r(parsed.openRouterApiKey)
|
|
35120
|
+
openRouterApiKey: r(parsed.openRouterApiKey),
|
|
35121
|
+
// Pass the raw blob through so actionDef.run can also merge
|
|
35122
|
+
formAnswers: formAnswersStr
|
|
34860
35123
|
};
|
|
34861
35124
|
}, [parsed, editorDocument, resolveOpts]);
|
|
34862
35125
|
const inputsReady = !!(resolvedInputs.name && resolvedInputs.entityDid && resolvedInputs.oracleName);
|
|
@@ -40820,4 +41083,4 @@ export {
|
|
|
40820
41083
|
getExtraSlashMenuItems,
|
|
40821
41084
|
useCreateIxoEditor
|
|
40822
41085
|
};
|
|
40823
|
-
//# sourceMappingURL=chunk-
|
|
41086
|
+
//# sourceMappingURL=chunk-DRPUOYZY.mjs.map
|